diff --git a/components/details/CO2GalvoDetail.tsx b/components/details/CO2GalvoDetail.tsx index a89052c9..918b59a9 100644 --- a/components/details/CO2GalvoDetail.tsx +++ b/components/details/CO2GalvoDetail.tsx @@ -74,7 +74,7 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number; } const yesNo = (v: any) => (v ? "Yes" : "No"); - // 🔧 NEW: always stringify possibly-object options for display + // stringify possibly-object options for display const optLabel = (v: any): string => { if (v == null) return "—"; if (typeof v === "string" || typeof v === "number") return String(v); @@ -196,7 +196,7 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number; const isMine = meId && ownerId ? meId === ownerId : false; - // Small field renderer (label on top, value below). Accepts React nodes. + // Small field renderer (label on top, value below) const Field = ({ label, value, suffix }: { label: string; value: React.ReactNode | string | number | null | undefined; suffix?: string }) => { const primitive = typeof value === "string" || typeof value === "number" || typeof value === "boolean"; @@ -214,7 +214,6 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number; {suffix ? {suffix} : null} ) : ( - // render React node directly (e.g., Notes paragraph) value )} @@ -353,7 +352,6 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number; - {/* 🔧 patched to stringify */} + + +
{showIncrement && } +
+ +
@@ -418,25 +422,43 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number;

Line Settings

- {rec.line_settings!.map((r: any, i: number) => ( -
-
{r.name || `Line ${i + 1}`}
-
- - - - - - - - - - - - -
-
- ))} + {rec.line_settings!.map((r: any, i: number) => { + const perfEnabled = !!r.perf; + const wobbleEnabled = !!r.wobble; + return ( +
+
{r.name || `Line ${i + 1}`}
+ + {/* Base fields – match form order */} +
+ + + + + +
+ + {/* Perforation row */} +
+ + {perfEnabled && } + {perfEnabled && } +
+ + {/* Wobble row */} +
+ + {wobbleEnabled && } + {wobbleEnabled && } +
+ + {/* Simple toggle */} +
+ +
+
+ ); + })}
)} @@ -445,27 +467,33 @@ export default function CO2GalvoDetail({ id, editable }: { id: string | number;

Raster Settings

- {rec.raster_settings!.map((r: any, i: number) => ( -
-
{r.name || `Raster ${i + 1}`}
-
- - - - - - - - - {!!r.halftone_cell && } - {!!r.halftone_angle && } - - - - -
-
- ))} + {rec.raster_settings!.map((r: any, i: number) => { + const isHalftone = r?.dither === "halftone"; + return ( +
+
{r.name || `Raster ${i + 1}`}
+
+ + + + + + + + + {isHalftone && } + {isHalftone && } + +
+ +
+ + + +
+
+ ); + })}
)}