mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 15:58:18 +00:00
feat(ui-common): shared currency formatting + DJF in CurrencySelector
New lib/currency.ts is the single source of truth for currency display across both freight web apps: symbol, name and decimals per code (DJF is zero-decimal by convention, unlike ETB/USD). Portal's own currency lib and backoffice's ad-hoc formatters are rewired onto this in the next two commits instead of each guessing decimals. CurrencySelector gets an allowDjf prop mirroring the existing allowUsd gate, so import-shipment currency pickers can offer DJF the same way they offer USD. Claude-Session: https://claude.ai/code/session_01CZy77vCWhka3pnmVF9NDkL
This commit is contained in:
@@ -80,3 +80,12 @@ export type {
|
||||
BookingWindowStateInput,
|
||||
BookingWindowUiState,
|
||||
} from "./lib/booking-window-display";
|
||||
|
||||
export {
|
||||
CURRENCY_META,
|
||||
CURRENCY_CODES,
|
||||
currencyDecimals,
|
||||
currencySymbol,
|
||||
formatCurrency,
|
||||
} from "./lib/currency";
|
||||
export type { SupportedCurrency } from "./lib/currency";
|
||||
|
||||
Reference in New Issue
Block a user