From 1c7f05f4046a5d8c102b90fe0bd269ff1a0f120b Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Sat, 29 Aug 2026 17:27:48 +1000 Subject: [PATCH] Surface dxf_warning from scad_save/scad_save_new as a toast --- src/components/Footer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 5ac6a58..a76a2d7 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -42,7 +42,11 @@ async function saveToCmms(model: any, toast: React.RefObject) { const data = await resp.json(); if (!resp.ok || !data.ok) throw new Error(data.error || `HTTP ${resp.status}`); if (data.id) cfg.attachmentId = String(data.id); - toast.current?.show({severity: 'success', summary: 'Saved to CMMS', life: 3000}); + if (data.dxf_warning) { + toast.current?.show({severity: 'warn', summary: 'Saved, but the DXF companion could not be regenerated', detail: String(data.dxf_warning), life: 8000}); + } else { + toast.current?.show({severity: 'success', summary: 'Saved to CMMS', life: 3000}); + } } catch (e: any) { toast.current?.show({severity: 'error', summary: 'Save failed', detail: String(e?.message ?? e), life: 6000}); }