diff options
Diffstat (limited to 'packages/aml-backoffice-ui/src/handlers/forms.ts')
-rw-r--r-- | packages/aml-backoffice-ui/src/handlers/forms.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/aml-backoffice-ui/src/handlers/forms.ts b/packages/aml-backoffice-ui/src/handlers/forms.ts index b1fcc2937..1c212fafa 100644 --- a/packages/aml-backoffice-ui/src/handlers/forms.ts +++ b/packages/aml-backoffice-ui/src/handlers/forms.ts @@ -1,6 +1,6 @@ import { TranslatedString } from "@gnu-taler/taler-util"; import { InputText } from "./InputText.js"; -import { InputDate } from "./InputDate.js"; +import { InputAbsoluteTime } from "./InputAbsoluteTime.js"; import { InputInteger } from "./InputInteger.js"; import { h as create, Fragment, VNode } from "preact"; import { InputChoiceStacked } from "./InputChoiceStacked.js"; @@ -15,6 +15,7 @@ import { FormProvider, FormState } from "./FormProvider.js"; import { InputLine } from "./InputLine.js"; import { InputAmount } from "./InputAmount.js"; import { InputChoiceHorizontal } from "./InputChoiceHorizontal.js"; +import { InputToggle } from "./InputToggle.js"; export type DoubleColumnForm = Array<DoubleColumnFormSection | undefined>; @@ -42,8 +43,9 @@ type FieldType<T extends object = any, K extends keyof T = any> = { textArea: Parameters<typeof InputTextArea<T, K>>[0]; choiceStacked: Parameters<typeof InputChoiceStacked<T, K>>[0]; choiceHorizontal: Parameters<typeof InputChoiceHorizontal<T, K>>[0]; - date: Parameters<typeof InputDate<T, K>>[0]; + absoluteTime: Parameters<typeof InputAbsoluteTime<T, K>>[0]; integer: Parameters<typeof InputInteger<T, K>>[0]; + toggle: Parameters<typeof InputToggle<T, K>>[0]; amount: Parameters<typeof InputAmount<T, K>>[0]; }; @@ -63,7 +65,8 @@ export type UIFormField = | { type: "choiceStacked"; props: FieldType["choiceStacked"] } | { type: "choiceHorizontal"; props: FieldType["choiceHorizontal"] } | { type: "integer"; props: FieldType["integer"] } - | { type: "date"; props: FieldType["date"] }; + | { type: "toggle"; props: FieldType["toggle"] } + | { type: "absoluteTime"; props: FieldType["absoluteTime"] }; type FieldComponentFunction<key extends keyof FieldType> = ( props: FieldType[key], @@ -86,7 +89,7 @@ const UIFormConfiguration: UIFormFieldMap = { file: InputFile, textArea: InputTextArea, //@ts-ignore - date: InputDate, + absoluteTime: InputAbsoluteTime, //@ts-ignore choiceStacked: InputChoiceStacked, //@ts-ignore @@ -97,6 +100,8 @@ const UIFormConfiguration: UIFormFieldMap = { //@ts-ignore selectMultiple: InputSelectMultiple, //@ts-ignore + toggle: InputToggle, + //@ts-ignore amount: InputAmount, }; |