diff --git a/frontend/src/i18n/locales/de.ts b/frontend/src/i18n/locales/de.ts index ac3870e78..bd27bb71d 100644 --- a/frontend/src/i18n/locales/de.ts +++ b/frontend/src/i18n/locales/de.ts @@ -741,6 +741,7 @@ export default { clearPlate: 'Druckplatte freigeben & Nächsten starten', clearPlateSuccess: 'Druckplatte freigegeben — bereit für nächsten Druck', plateReady: 'Druckplatte freigegeben — bereit für nächsten Druck', + plateNumber: 'Platte {{index}}', // Sections sections: { currentlyPrinting: 'Aktuell druckend', diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index ec60b79c7..b384c9461 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -741,6 +741,7 @@ export default { clearPlate: 'Clear Plate & Start Next', clearPlateSuccess: 'Plate cleared — ready for next print', plateReady: 'Plate cleared — ready for next print', + plateNumber: 'Plate {{index}}', // Sections sections: { currentlyPrinting: 'Currently Printing', diff --git a/frontend/src/i18n/locales/fr.ts b/frontend/src/i18n/locales/fr.ts index bb3907029..08e10d7d8 100644 --- a/frontend/src/i18n/locales/fr.ts +++ b/frontend/src/i18n/locales/fr.ts @@ -741,6 +741,7 @@ export default { clearPlate: 'Vider plateau & lancer suivant', clearPlateSuccess: 'Plateau vidé — prêt pour l\'impression suivante', plateReady: 'Plateau vidé — prêt pour l\'impression suivante', + plateNumber: 'Plateau {{index}}', // Sections sections: { currentlyPrinting: 'En cours', diff --git a/frontend/src/i18n/locales/it.ts b/frontend/src/i18n/locales/it.ts index a4c8907e7..1afc233be 100644 --- a/frontend/src/i18n/locales/it.ts +++ b/frontend/src/i18n/locales/it.ts @@ -728,6 +728,7 @@ export default { dragToReorder: 'Trascina per riordinare (solo ASAP)', reorderHint: 'La posizione influisce solo sugli elementi ASAP. Quelli programmati partono all\'orario.', addedBy: 'Aggiunto da {{name}}', + plateNumber: 'Piatto {{index}}', // Sections sections: { currentlyPrinting: 'In stampa', diff --git a/frontend/src/i18n/locales/ja.ts b/frontend/src/i18n/locales/ja.ts index e9897b8f1..e17570065 100644 --- a/frontend/src/i18n/locales/ja.ts +++ b/frontend/src/i18n/locales/ja.ts @@ -811,6 +811,7 @@ export default { clearPlate: 'プレートをクリアして次を開始', clearPlateSuccess: 'プレートをクリアしました — 次の印刷の準備完了', plateReady: 'プレートをクリアしました — 次の印刷の準備完了', + plateNumber: 'プレート {{index}}', sections: { currentlyPrinting: '印刷中', queued: 'キュー中', diff --git a/frontend/src/pages/QueuePage.tsx b/frontend/src/pages/QueuePage.tsx index 91123c437..b76317d32 100644 --- a/frontend/src/pages/QueuePage.tsx +++ b/frontend/src/pages/QueuePage.tsx @@ -314,12 +314,34 @@ function SortableQueueItem({ printerState?: string | null; t: (key: string, options?: Record) => string; }) { + // Fetch printer status every 30 seconds while printing to monitor progress const { data: status } = useQuery({ queryKey: ['printerStatus', item.printer_id], queryFn: () => api.getPrinterStatus(item.printer_id!), refetchInterval: 30000, enabled: item.printer_id != null && printerState === 'printing', }); + + // Determine if we're printing a library file + const isLibraryFile = !!item.library_file_id && !item.archive_id; + // Fetch archive plate details + const { data: archivePlatesData } = useQuery({ + queryKey: ['archive-plates', item.archive_id], + queryFn: () => api.getArchivePlates(item.archive_id!), + enabled: !!item.archive_id && !isLibraryFile, + }); + + // Fetch library file plate details + const { data: libraryPlatesData } = useQuery({ + queryKey: ['library-file-plates', item.library_file_id], + queryFn: () => api.getLibraryFilePlates(item.library_file_id!), + enabled: isLibraryFile && !!item.library_file_id, + }); + + // Combine plates data from either source + const platesData = isLibraryFile ? libraryPlatesData : archivePlatesData; + const plates = platesData?.plates ?? []; + const canReorder = hasPermission('queue:reorder'); const { attributes, @@ -419,6 +441,7 @@ function SortableQueueItem({

{item.archive_name || item.library_file_name || `File #${item.archive_id || item.library_file_id}`} + {(platesData?.is_multi_plate ?? false) && item.plate_id !== undefined && item.plate_id !== null && ` • ${plates.find(plate => plate.index === item.plate_id)?.name || t('queue.plateNumber', { index: item.plate_id })}`}

{item.archive_id ? (