diff --git a/web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx b/web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx index f309e5e8..c179c7bf 100644 --- a/web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx +++ b/web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx @@ -83,7 +83,7 @@ type GroupRatioVisualEditorProps = { type GroupPricingRow = { _id: string name: string - ratio: number + ratio: string topupRatio: string selectable: boolean description: string @@ -149,7 +149,7 @@ function buildGroupPricingRows( return [...names].map((name) => ({ _id: createGroupPricingId(), name, - ratio: normalizeRatio(ratioMap[name]), + ratio: String(normalizeRatio(ratioMap[name])), topupRatio: Object.hasOwn(topupMap, name) ? String(topupMap[name]) : '', selectable: Object.hasOwn(usableMap, name), description: String(usableMap[name] ?? ''), @@ -491,7 +491,7 @@ function GroupPricingTable({ { _id: createGroupPricingId(), name, - ratio: 1, + ratio: '1', topupRatio: '', selectable: true, description: '', @@ -567,13 +567,9 @@ function GroupPricingTable({ type='number' min={0} step={0.1} - value={String(row.ratio)} + value={row.ratio} onChange={(event) => - updateRow( - row._id, - 'ratio', - normalizeRatio(event.target.value) - ) + updateRow(row._id, 'ratio', event.target.value) } /> ),