Feature: print files directly from project view (closes #930) (#932)

* 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:
lietschaend
2026-04-10 12:54:27 +02:00
committed by GitHub
parent b453385d22
commit f95b2acd7d
21 changed files with 566 additions and 31 deletions
@@ -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;
}
/**