diff --git a/src/app/dashboard/financial/delivery-notes/inbox-3/unit-input.tsx b/src/app/dashboard/financial/delivery-notes/inbox-3/unit-input.tsx index 911c31b..5d157e8 100644 --- a/src/app/dashboard/financial/delivery-notes/inbox-3/unit-input.tsx +++ b/src/app/dashboard/financial/delivery-notes/inbox-3/unit-input.tsx @@ -1,6 +1,6 @@ "use client"; -import { UNIT_SUGGESTIONS } from "@/lib/inbox-three/line-rows"; +import { UNIT_SUGGESTIONS } from "@/lib/inbox-three/units"; /** * The unit on a slip line, and the conversion it needs. diff --git a/src/lib/inbox-three/line-rows.ts b/src/lib/inbox-three/line-rows.ts index 6746313..3080a0f 100644 --- a/src/lib/inbox-three/line-rows.ts +++ b/src/lib/inbox-three/line-rows.ts @@ -66,7 +66,9 @@ export interface LineRow { ready: boolean; posted: boolean; problem: string | null; } -export const UNIT_SUGGESTIONS = ["each", "roll", "m", "m²", "m³", "kg", "5kg bag", "ton", "length", "box", "pack"] as const; +// Re-exported so the plan's import path keeps working; the list itself +// lives in a module the browser can load. +export { UNIT_SUGGESTIONS } from "./units"; const round2 = (n: number) => Math.round((n + Number.EPSILON) * 100) / 100; /** A factor has to be a real conversion: above zero and no bigger than a roll of 10000. */ diff --git a/src/lib/inbox-three/units.ts b/src/lib/inbox-three/units.ts new file mode 100644 index 0000000..71bb086 --- /dev/null +++ b/src/lib/inbox-three/units.ts @@ -0,0 +1,7 @@ +/** + * The units a slip is likely to use. + * + * Kept on its own, free of any Node-only import, so the office's screen can + * offer them without dragging the matching engine into the browser. + */ +export const UNIT_SUGGESTIONS = ["each", "roll", "m", "m²", "m³", "kg", "5kg bag", "ton", "length", "box", "pack"] as const;