mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-17 11:25:48 +02:00
* feat: print files directly from project view (closes #930) Show printable files from linked library folders directly in the project detail page, with Print Now and Add to Queue buttons per file. Removes the detour through the File Manager for common reprint workflows.
This commit is contained in:
@@ -48,6 +48,7 @@ export function PrintModal({
|
||||
initialSelectedPrinterIds,
|
||||
onClose,
|
||||
onSuccess,
|
||||
projectId,
|
||||
}: PrintModalProps) {
|
||||
const { t } = useTranslation();
|
||||
const queryClient = useQueryClient();
|
||||
@@ -654,6 +655,7 @@ export function PrintModal({
|
||||
? new Date(scheduleOptions.scheduledTime).toISOString()
|
||||
: undefined,
|
||||
...printOptions,
|
||||
project_id: projectId ?? undefined,
|
||||
});
|
||||
|
||||
// Model-based assignment
|
||||
@@ -734,8 +736,11 @@ export function PrintModal({
|
||||
plate_name: selectedPlateName,
|
||||
ams_mapping: printerMapping,
|
||||
...printOptions,
|
||||
project_id: projectId,
|
||||
});
|
||||
} else {
|
||||
// project_id is intentionally omitted here: reprintArchive targets an existing
|
||||
// archive that already carries its own project association from the original print.
|
||||
await api.reprintArchive(archiveId!, printerId, {
|
||||
plate_id: selectedPlate ?? undefined,
|
||||
plate_name: selectedPlateName,
|
||||
|
||||
@@ -32,6 +32,8 @@ export interface PrintModalProps {
|
||||
onClose: () => void;
|
||||
/** Handler for successful operation */
|
||||
onSuccess?: () => void;
|
||||
/** Project ID to associate the resulting archive with (only when triggered from project view) */
|
||||
projectId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user