Skip to content

Kemi: unify quantity formatting (W1/W2 vs W6/Excel) and close the W1 mockup gaps #1459

Open

Description

@renemadsen

What is wrong

Quantities read differently on the inventory/drawer screens (W1/W2) than on the history screen (W6) and the Excel files. W1/W2 use the Angular number: '1.0-3' pipe (app locale, with grouping: "1,000.5 L"); W6 and the Excel use formatHistoryNumber / decimal.ToString("0.###") ("1000.5 L"). Three decimals are kept on both sides, so nothing is lost; this is presentation drift. The T12 mockup-fidelity review also noted three W1 differences from the mockup: the banner lacks the breakdown ("2 afmeldte ... senest 01-03-2027, og 1 udløbet ..."), the Frist cell shows "date + kind" instead of "01-03-2027 · 5 mdr", and the number pipe uses the app locale (3.5) where the mockup shows a decimal comma (3,5).

Where (stable a81a41b)

  • eform-client/src/app/plugins/modules/backend-configuration-pn/modules/chemicals/components/chemical-inventory-page/chemical-inventory-page.component.html:99
  • eform-client/src/app/plugins/modules/backend-configuration-pn/modules/chemicals/components/chemical-product-drawer/chemical-product-drawer.component.html:60,80,81
  • the move and stock dialogs (chemical-move-dialog, chemical-stock-dialog templates)
  • eform-client/src/app/plugins/modules/backend-configuration-pn/modules/chemicals/helpers/chemical-history.helper.ts:117 (formatHistoryNumber)

Suggested fix

One shared quantity pipe built on formatHistoryNumber, used by W1, W2 and the dialogs (or take the decimal-comma decision from the mockup owner first). Bring the W1 banner breakdown and the Frist cell "· 5 mdr" in line with the mockup, or update the mockup.

Origin

Plan E final review m-4 and T12 m-11, PR #1437 (merged as a81a41b).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions