mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
fix(rates): render stored rate currency, default last mile to birr
The rate matrix currency cell hardcoded USD, so a last-mile rate priced in ETB still displayed as dollars. formatCell now takes the row and reads its currency code, falling back to USD. Last-mile currency select gets defaultValue ETB (new generic FormFieldDef.defaultValue for create-time pre-selection) and lists ETB (Birr) first; USD stays selectable. Backend already persisted and validated the chosen currency.
This commit is contained in:
@@ -127,6 +127,8 @@ const buildInitialValues = (
|
||||
} else {
|
||||
values[field.name] = raw;
|
||||
}
|
||||
} else if (field.defaultValue !== undefined) {
|
||||
values[field.name] = field.defaultValue;
|
||||
} else if (field.type === "boolean") {
|
||||
values[field.name] = false;
|
||||
} else if (field.type === "number") {
|
||||
|
||||
Reference in New Issue
Block a user