diff options
Diffstat (limited to 'packages/exchange-backoffice-ui')
-rw-r--r-- | packages/exchange-backoffice-ui/src/handlers/InputDate.tsx | 4 | ||||
-rw-r--r-- | packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx index e834b6cdb..1fd81aad9 100644 --- a/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx +++ b/packages/exchange-backoffice-ui/src/handlers/InputDate.tsx @@ -18,9 +18,9 @@ export function InputDate<T extends object, K extends keyof T>( converter={{ //@ts-ignore fromStringUI: (v): AbsoluteTime => { - if (!v) return { t_ms: "never" }; + if (!v) return AbsoluteTime.never(); const t_ms = parse(v, pattern, Date.now()).getTime(); - return { t_ms }; + return AbsoluteTime.fromMilliseconds(t_ms); }, //@ts-ignore toStringUI: (v: AbsoluteTime) => { diff --git a/packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx b/packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx index ee9d1ce30..fc5838dd9 100644 --- a/packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx +++ b/packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx @@ -9,6 +9,7 @@ import { v1 as form_902_4e_v1 } from "../forms/902_4e.js"; import { v1 as form_902_5e_v1 } from "../forms/902_5e.js"; import { v1 as form_902_9e_v1 } from "../forms/902_9e.js"; import { DocumentDuplicateIcon } from "@heroicons/react/24/solid"; +import { AbsoluteTime } from "@gnu-taler/taler-util"; export function AntiMoneyLaunderingForm({ number }: { number?: string }) { const selectedForm = Number.parseInt(number ?? "0", 10); @@ -18,9 +19,7 @@ export function AntiMoneyLaunderingForm({ number }: { number?: string }) { const showingFrom = allForms[selectedForm].impl; const storedValue = { fullName: "loggedIn_user_fullname", - when: { - t_ms: new Date().getTime(), - }, + when: AbsoluteTime.now(), }; return ( <NiceForm initial={storedValue} form={showingFrom} onUpdate={() => {}} /> |