taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit b1525499822162a7caf29436b72215afbb5bd2ee
parent 56e40d8face45fb13a2c8e2b0d11c1ba47856bf3
Author: Florian Dold <florian@dold.me>
Date:   Fri, 21 Mar 2025 18:38:57 +0100

remove obsolete forms, make date entry output actual ISO dates

Diffstat:
Mpackages/aml-backoffice-ui/src/forms/index.ts | 15---------------
Mpackages/kyc-ui/src/forms/index.ts | 27++++++---------------------
Mpackages/web-util/src/forms/FormProvider.tsx | 10+++++++++-
Mpackages/web-util/src/forms/field-types.ts | 10+++++-----
Apackages/web-util/src/forms/fields/InputIsoDate.stories.tsx | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/web-util/src/forms/fields/InputIsoDate.tsx | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpackages/web-util/src/forms/fields/InputIsoTime.stories.tsx | 63---------------------------------------------------------------
Dpackages/web-util/src/forms/fields/InputIsoTime.tsx | 91-------------------------------------------------------------------------------
Mpackages/web-util/src/forms/forms-types.ts | 14+++++++-------
Mpackages/web-util/src/forms/forms-utils.ts | 8++++----
Mpackages/web-util/src/forms/gana/GLS_Onboarding.ts | 6+++---
Mpackages/web-util/src/forms/gana/VQF_902_12.ts | 12++++++------
Dpackages/web-util/src/forms/gana/VQF_902_13.stories.tsx | 40----------------------------------------
Dpackages/web-util/src/forms/gana/VQF_902_13.ts | 439-------------------------------------------------------------------------------
Dpackages/web-util/src/forms/gana/VQF_902_15.stories.tsx | 40----------------------------------------
Dpackages/web-util/src/forms/gana/VQF_902_15.ts | 159-------------------------------------------------------------------------------
Mpackages/web-util/src/forms/gana/VQF_902_1_customer.stories.tsx | 2+-
Mpackages/web-util/src/forms/gana/VQF_902_1_customer.ts | 7+++++--
Mpackages/web-util/src/forms/gana/VQF_902_1_officer.ts | 2+-
Mpackages/web-util/src/forms/gana/VQF_902_4.ts | 6+++---
Mpackages/web-util/src/forms/gana/VQF_902_9.ts | 2+-
Mpackages/web-util/src/forms/gana/index.stories.ts | 2--
Mpackages/web-util/src/forms/index.stories.ts | 2+-
Mpackages/web-util/src/forms/index.ts | 2--
24 files changed, 216 insertions(+), 907 deletions(-)

diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts @@ -16,9 +16,7 @@ import { VQF_902_11, VQF_902_12, - VQF_902_13, VQF_902_14, - VQF_902_15, VQF_902_1_customer, VQF_902_1_officer, VQF_902_4, @@ -196,25 +194,12 @@ export const preloadedForms: ( config: VQF_902_12(i18n), }, { - label: i18n.str`Declaration for trusts (T)`, - id: "vqf_902_13", - version: 1, - config: VQF_902_13(i18n), - }, - { label: i18n.str`Special Clarifications`, description: i18n.str`When a business relationship or transaction is associated with increased risk, appears unusual or evidence exists that the assets are the proceeds of a felony or a qualified tax offence, the member has to perform additional clarifications.`, id: "vqf_902_14", version: 1, config: VQF_902_14(i18n), }, - { - label: i18n.str`Insurance policies (I)`, - description: i18n.str`Information of life insurance policies with separately managed accounts/securities accounts (so-called insurance wrappers)`, - id: "vqf_902_15", - version: 1, - config: VQF_902_15(i18n), - }, ]; const currencies = (i18n: InternationalizationAPI) => [ diff --git a/packages/kyc-ui/src/forms/index.ts b/packages/kyc-ui/src/forms/index.ts @@ -19,9 +19,7 @@ import { InternationalizationAPI, VQF_902_11, VQF_902_12, - VQF_902_13, VQF_902_14, - VQF_902_15, VQF_902_1_customer, VQF_902_4, VQF_902_5, @@ -70,57 +68,44 @@ export const preloadedForms: ( }, { label: i18n.str`Risk Profile AMLA`, - id: "vqf-902-4", + id: "vqf_902_4", version: 1, config: VQF_902_4(i18n), }, { label: i18n.str`Customer Profile`, description: i18n.str`The information below has to refer to the persons from whom the assets originate ultimately (e.g. beneficial owner of the assets, founder/creator of a trust or foundation). Is the customer an operational legal entity or partnership the information may refer to the entity itself (not to the controlling person), unless the entity holds the assets in trust for a third party.`, - id: "vqf-902-5", + id: "vqf_902_5", version: 1, config: VQF_902_5(i18n), }, { label: i18n.str`Declaration of identity of the beneficial owner (A)`, - id: "vqf-902-9", + id: "vqf_902_9", version: 1, config: VQF_902_9(i18n), }, { label: i18n.str`Establishing of the controlling person of operating legal entities and partnerships both not quoted on the stock exchange (K)`, description: i18n.str`for operating legal entities and partnerships that are contracting partner as well as analogously for operating legal entities and partnership that are beneficial owners`, - id: "vqf-902-11", + id: "vqf_902_11", version: 1, config: VQF_902_11(i18n), }, { label: i18n.str`Foundations (as well as similar constructs) (S)`, - id: "vqf-902-12", + id: "vqf_902_12", version: 1, config: VQF_902_12(i18n), }, { - label: i18n.str`Declaration for trusts (T)`, - id: "vqf-902-13", - version: 1, - config: VQF_902_13(i18n), - }, - { label: i18n.str`Special Clarifications`, description: i18n.str`When a business relationship or transaction is associated with increased risk, appears unusual or evidence exists that the assets are the proceeds of a felony or a qualified tax offence, the member has to perform additional clarifications.`, - id: "vqf-902-14", + id: "vqf_902_14", version: 1, config: VQF_902_14(i18n), }, { - label: i18n.str`Insurance policies (I)`, - description: i18n.str`Information of life insurance policies with separately managed accounts/securities accounts (so-called insurance wrappers)`, - id: "vqf-902-15", - version: 1, - config: VQF_902_15(i18n), - }, - { label: i18n.str`Name and birthdate`, id: "name_and_dob", version: 1, diff --git a/packages/web-util/src/forms/FormProvider.tsx b/packages/web-util/src/forms/FormProvider.tsx @@ -53,7 +53,9 @@ export interface UIFormProps<T extends object, K extends keyof T> { before?: Addon; after?: Addon; - // converter to string and back + /** + * converter to string and back + */ converter?: StringConverter<T[K]>; handler?: UIFieldHandler; @@ -92,6 +94,12 @@ export interface TextAddon { export type Addon = IconAddon | ButtonAddon | TextAddon; export interface StringConverter<T> { + /** + * Convert the form attribute value to a UI string. + */ toStringUI: (v?: T) => string; + /** + * Convert a UI string to a form attribute value. + */ fromStringUI: (v?: string) => T; } diff --git a/packages/web-util/src/forms/field-types.ts b/packages/web-util/src/forms/field-types.ts @@ -19,7 +19,7 @@ import { Group } from "./Group.js"; import { HtmlIframe } from "./HtmlIframe.js"; import { InputDurationText } from "./fields/InputDurationText.js"; import { ExternalLink } from "./ExternalLink.js"; -import { InputIsoTime } from "./fields/InputIsoTime.js"; +import { InputIsoDate } from "./fields/InputIsoDate.js"; /** * Constrain the type with the ui props */ @@ -38,7 +38,7 @@ type FieldType<T extends object = any, K extends keyof T = any> = { choiceStacked: Parameters<typeof InputChoiceStacked<T, K>>[0]; choiceHorizontal: Parameters<typeof InputChoiceHorizontal<T, K>>[0]; absoluteTimeText: Parameters<typeof InputAbsoluteTime<T, K>>[0]; - isoTimeText: Parameters<typeof InputIsoTime<T, K>>[0]; + isoDateText: Parameters<typeof InputIsoDate<T, K>>[0]; integer: Parameters<typeof InputInteger<T, K>>[0]; secret: Parameters<typeof InputSecret<T, K>>[0]; toggle: Parameters<typeof InputToggle<T, K>>[0]; @@ -82,8 +82,8 @@ export type UIFormField = properties: FieldType["absoluteTimeText"]; } | { - type: "isoTimeText"; - properties: FieldType["isoTimeText"]; + type: "isoDateText"; + properties: FieldType["isoDateText"]; } | { type: "duration"; @@ -120,7 +120,7 @@ export const UIFormConfiguration: UIFormFieldMap = { //@ts-ignore absoluteTimeText: InputAbsoluteTime, //@ts-ignore - isoTimeText: InputIsoTime, + isoDateText: InputIsoDate, //@ts-ignore choiceStacked: InputChoiceStacked, //@ts-ignore diff --git a/packages/web-util/src/forms/fields/InputIsoDate.stories.tsx b/packages/web-util/src/forms/fields/InputIsoDate.stories.tsx @@ -0,0 +1,64 @@ +/* + This file is part of GNU Taler + (C) 2022 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ + +/** + * + * @author Sebastian Javier Marchano (sebasjm) + */ + +import { TranslatedString } from "@gnu-taler/taler-util"; +import * as tests from "../../tests/hook.js"; +import { FormDesign, UIHandlerId } from "../forms-types.js"; +import { DefaultForm as TestedComponent } from "../forms-ui.js"; +export default { + title: "Input Iso Date", +}; + +export namespace Simplest { + export interface Form { + comment: string; + } +} + +type TargetObject = { + today: string; +}; + +const initial: TargetObject = { + today: "2020-01-01", +}; + +const design: FormDesign = { + type: "double-column", + sections: [ + { + title: "this is a simple form" as TranslatedString, + fields: [ + { + type: "isoDateText", + label: "label of the field" as TranslatedString, + id: "today" as UIHandlerId, + pattern: "dd/MM/yyyy", + }, + ], + }, + ], +}; + +export const SimpleComment = tests.createExample(TestedComponent, { + initial, + design, +}); diff --git a/packages/web-util/src/forms/fields/InputIsoDate.tsx b/packages/web-util/src/forms/fields/InputIsoDate.tsx @@ -0,0 +1,100 @@ +import { AbsoluteTime } from "@gnu-taler/taler-util"; +import { format, parse } from "date-fns"; +import { Fragment, VNode, h } from "preact"; +import { useState } from "preact/hooks"; +import { Calendar } from "../Calendar.js"; +import { Dialog } from "../Dialog.js"; +import { UIFormProps } from "../FormProvider.js"; +import { noHandlerPropsAndNoContextForField } from "./InputArray.js"; +import { InputLine } from "./InputLine.js"; + +export interface InputIsoDateProps { + /** + * Pattern for displaying / parsing the date in the UI. + * + * Defaults to "dd/MM/yyyy". + */ + pattern?: string; +} + +export function InputIsoDate<T extends object, K extends keyof T>( + properties: InputIsoDateProps & UIFormProps<T, K>, +): VNode { + const pattern = properties.pattern ?? "dd/MM/yyyy"; + const [open, setOpen] = useState(false); + + const { value, onChange } = + properties.handler ?? noHandlerPropsAndNoContextForField(properties.name); + + const time = parse(value, pattern, Date.now()).getTime(); + // const strTime = format(time, pattern); + return ( + <Fragment> + <InputLine<T, K> + type="text" + {...properties} + after={{ + type: "button", + onClick: () => { + setOpen(true); + }, + // icon: <CalendarIcon class="h-6 w-6" />, + children: ( + <svg + xmlns="http://www.w3.org/2000/svg" + fill="none" + viewBox="0 0 24 24" + stroke-width="1.5" + stroke="currentColor" + class="w-6 h-6" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" + /> + </svg> + ), + }} + converter={{ + //@ts-ignore + toStringUI(v) { + if (!v || typeof v !== "string") { + return undefined; + } + try { + const d = parse(v, "yyyy-MM-dd", Date.now()); + return format(d, pattern); + } catch (e) { + return undefined; + } + }, + //@ts-ignore + fromStringUI: (v): string | undefined => { + if (!v) return undefined; + try { + const t_ms = parse(v, pattern, Date.now()).getTime(); + return format(t_ms, pattern); + } catch (e) { + return undefined; + } + }, + }} + /> + {open && ( + <Dialog onClose={() => setOpen(false)}> + <Calendar + value={AbsoluteTime.fromMilliseconds(time)} + onChange={(v) => { + // The date is always *stored* as an ISO date. + onChange( + v.t_ms === "never" ? undefined : format(v.t_ms, "yyyy-MM-dd"), + ); + setOpen(false); + }} + /> + </Dialog> + )} + </Fragment> + ); +} diff --git a/packages/web-util/src/forms/fields/InputIsoTime.stories.tsx b/packages/web-util/src/forms/fields/InputIsoTime.stories.tsx @@ -1,63 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2022 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -/** - * - * @author Sebastian Javier Marchano (sebasjm) - */ - -import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util"; -import * as tests from "../../tests/hook.js"; -import { FormDesign, UIHandlerId } from "../forms-types.js"; -import { DefaultForm as TestedComponent } from "../forms-ui.js"; -export default { - title: "Input Iso Time", -}; - -export namespace Simplest { - export interface Form { - comment: string; - } -} - -type TargetObject = { - today: string; -}; -const initial: TargetObject = { - today: "1/12/3333344", -}; - -const design: FormDesign = { - type: "double-column", - sections: [ - { - title: "this is a simple form" as TranslatedString, - fields: [ - { - type: "isoTimeText", - label: "label of the field" as TranslatedString, - id: "today" as UIHandlerId, - pattern: "dd/MM/yyyy", - }, - ], - }, - ], -}; - -export const SimpleComment = tests.createExample(TestedComponent, { - initial, - design, -}); diff --git a/packages/web-util/src/forms/fields/InputIsoTime.tsx b/packages/web-util/src/forms/fields/InputIsoTime.tsx @@ -1,91 +0,0 @@ -import { AbsoluteTime } from "@gnu-taler/taler-util"; -import { format, parse } from "date-fns"; -import { Fragment, VNode, h } from "preact"; -import { useState } from "preact/hooks"; -import { Calendar } from "../Calendar.js"; -import { Dialog } from "../Dialog.js"; -import { UIFormProps } from "../FormProvider.js"; -import { noHandlerPropsAndNoContextForField } from "./InputArray.js"; -import { InputLine } from "./InputLine.js"; - -export function InputIsoTime<T extends object, K extends keyof T>( - properties: { pattern?: string } & UIFormProps<T, K>, -): VNode { - const pattern = properties.pattern ?? "dd/MM/yyyy"; - const [open, setOpen] = useState(false); - - const { value, onChange } = - properties.handler ?? noHandlerPropsAndNoContextForField(properties.name); - - const time = parse(value, pattern, Date.now()).getTime(); - // const strTime = format(time, pattern); - return ( - <Fragment> - <InputLine<T, K> - type="text" - {...properties} - after={{ - type: "button", - onClick: () => { - setOpen(true); - }, - // icon: <CalendarIcon class="h-6 w-6" />, - children: ( - <svg - xmlns="http://www.w3.org/2000/svg" - fill="none" - viewBox="0 0 24 24" - stroke-width="1.5" - stroke="currentColor" - class="w-6 h-6" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" - /> - </svg> - ), - }} - converter={{ - //@ts-ignore - fromStringUI: (v): string | undefined => { - if (!v) return undefined; - try { - const t_ms = parse(v, pattern, Date.now()).getTime(); - return format(t_ms, pattern); - } catch (e) { - return undefined; - } - }, - }} - /> - {open && ( - <Dialog onClose={() => setOpen(false)}> - <Calendar - value={AbsoluteTime.fromMilliseconds(time)} - onChange={(v) => { - onChange( - v.t_ms === "never" ? undefined : format(v.t_ms, pattern), - ); - setOpen(false); - }} - /> - </Dialog> - )} - {/* {open && ( - <Dialog onClose={() => setOpen(false)}> - <TimePicker - value={AbsoluteTime.fromMilliseconds(time)} - onChange={(v) => { - onChange(v as any); - }} - onConfirm={() => { - setOpen(false); - }} - /> - </Dialog> - )} */} - </Fragment> - ); -} diff --git a/packages/web-util/src/forms/forms-types.ts b/packages/web-util/src/forms/forms-types.ts @@ -63,7 +63,7 @@ export type UIFormElementConfig = | UIFormElementExternalLink | UIFormElementHtmlIframe | UIFormFieldAbsoluteTime - | UIFormFieldIsoTime + | UIFormFieldIsoDate | UIFormFieldAmount | UIFormFieldArray | UIFormFieldChoiceHorizontal @@ -91,8 +91,8 @@ type UIFormFieldAbsoluteTime = { pattern: string; } & UIFormFieldBaseConfig; -type UIFormFieldIsoTime = { - type: "isoTimeText"; +type UIFormFieldIsoDate = { + type: "isoDateText"; max?: TalerProtocolTimestamp; min?: TalerProtocolTimestamp; pattern: string; @@ -304,9 +304,9 @@ const codecForUiFormFieldAbsoluteTime = (): Codec<UIFormFieldAbsoluteTime> => .property("min", codecOptional(codecForTimestamp)) .build("UIFormFieldAbsoluteTime"); -const codecForUiFormFieldIsoTime = (): Codec<UIFormFieldIsoTime> => - codecForUIFormFieldBaseConfigTemplate<UIFormFieldIsoTime>() - .property("type", codecForConstString("isoTimeText")) +const codecForUiFormFieldIsoDate = (): Codec<UIFormFieldIsoDate> => + codecForUIFormFieldBaseConfigTemplate<UIFormFieldIsoDate>() + .property("type", codecForConstString("isoDateText")) .property("pattern", codecForString()) .property("max", codecOptional(codecForTimestamp)) .property("min", codecOptional(codecForTimestamp)) @@ -461,7 +461,7 @@ const codecForUiFormField = (): Codec<UIFormElementConfig> => .alternative("download-link", codecForUIFormElementLink()) .alternative("external-link", codecForUIFormElementExternalLink()) .alternative("absoluteTimeText", codecForUiFormFieldAbsoluteTime()) - .alternative("isoTimeText", codecForUiFormFieldIsoTime()) + .alternative("isoDateText", codecForUiFormFieldIsoDate()) .alternative("amount", codecForUiFormFieldAmount()) .alternative("caption", codecForUiFormFieldCaption()) .alternative("htmlIframe", codecForUiFormFieldHtmlIFrame()) diff --git a/packages/web-util/src/forms/forms-utils.ts b/packages/web-util/src/forms/forms-utils.ts @@ -5,14 +5,14 @@ import { assertUnreachable, TranslatedString, } from "@gnu-taler/taler-util"; +import { format, parse } from "date-fns"; import { InternationalizationAPI, UIFieldElementDescription, } from "../index.browser.js"; +import { UIFormField } from "./field-types.js"; import { Addon, StringConverter, UIFieldHandler } from "./FormProvider.js"; import { UIFormElementConfig, UIFormFieldBaseConfig } from "./forms-types.js"; -import { UIFormField } from "./field-types.js"; -import { format, parse } from "date-fns"; /** * convert field configuration to render function @@ -130,9 +130,9 @@ export function convertFormConfigToUiField( }, } as UIFormField; } - case "isoTimeText": { + case "isoDateText": { return { - type: "isoTimeText", + type: "isoDateText", properties: { ...converBaseFieldsProps(i18n_, config), ...converInputFieldsProps( diff --git a/packages/web-util/src/forms/gana/GLS_Onboarding.ts b/packages/web-util/src/forms/gana/GLS_Onboarding.ts @@ -35,7 +35,7 @@ export function GLS_Onboarding( { id: TalerFormAttributes.GLS_Onboarding.PERSON_DATE_OF_BIRTH.id, label: i18n.str`Date of birth`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -99,7 +99,7 @@ export function GLS_Onboarding( id: TalerFormAttributes.GLS_Onboarding.BUSINESS_REGISTRATION_DATE .id, label: i18n.str`Registration date`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -143,7 +143,7 @@ export function GLS_Onboarding( id: TalerFormAttributes.GLS_BusinessRepresentative .GLS_REPRESENTATIVE_DATE_OF_BIRTH.id, label: i18n.str`Date of birth`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, diff --git a/packages/web-util/src/forms/gana/VQF_902_12.ts b/packages/web-util/src/forms/gana/VQF_902_12.ts @@ -106,7 +106,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_founder .FOUNDATION_FOUNDER_BIRTHDATE.id, label: i18n.str`Birthdate`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -123,7 +123,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_founder .FOUNDATION_FOUNDER_DEATHDATE.id, label: i18n.str`Date of death`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", }, @@ -179,7 +179,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_pre.FOUNDATION_PRE_BIRTHDATE .id, label: i18n.str`Birthdate`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -196,7 +196,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_pre.FOUNDATION_PRE_DEATHDATE .id, label: i18n.str`Date of death`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", }, @@ -244,7 +244,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_beneficiary .FOUNDATION_BENEFICIARY_BIRTHDATE.id, label: i18n.str`Full name`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -317,7 +317,7 @@ export function VQF_902_12( id: TalerFormAttributes.VQF_902_12_representative .FOUNDATION_REPRESENTATIVE_BIRTHDATE.id, label: i18n.str`Birthdate`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, diff --git a/packages/web-util/src/forms/gana/VQF_902_13.stories.tsx b/packages/web-util/src/forms/gana/VQF_902_13.stories.tsx @@ -1,40 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2022 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -/** - * - * @author Sebastian Javier Marchano (sebasjm) - */ - -import { AbsoluteTime, i18n, setupI18n } from "@gnu-taler/taler-util"; -import * as tests from "../../tests/hook.js"; -import { DefaultForm as TestedComponent } from "../forms-ui.js"; -import { VQF_902_13 } from "./VQF_902_13.js"; -import { TalerFormAttributes } from "./taler_form_attributes.js"; -export default { - title: "VQF 902 13e", -}; -setupI18n("en", {}); -type TargetObject = {}; -const initial: TargetObject = { - [TalerFormAttributes.VQF_902_9.SIGNATURE.id]: "The officer", - [TalerFormAttributes.VQF_902_9.SIGN_DATE.id]: AbsoluteTime.now(), -}; - -export const EmptyForm = tests.createExample(TestedComponent, { - initial, - design: VQF_902_13(i18n), -}); diff --git a/packages/web-util/src/forms/gana/VQF_902_13.ts b/packages/web-util/src/forms/gana/VQF_902_13.ts @@ -1,439 +0,0 @@ -import { - DoubleColumnFormDesign, - InternationalizationAPI, -} from "../../index.browser.js"; -import { - countryNameList, - countryNationalityList, -} from "../../utils/select-ui-lists.js"; -import { TalerFormAttributes } from "./taler_form_attributes.js"; - -export function VQF_902_13( - i18n: InternationalizationAPI, -): DoubleColumnFormDesign { - return { - type: "double-column", - sections: [ - { - title: i18n.str`Declaration for trusts (T)`, - fields: [ - { - id: TalerFormAttributes.VQF_902_13.TRUST_CONTRACTING_PARTNER.id, - label: i18n.str`Contracting partner`, - type: "textArea", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13.TRUST_KNOWN_AS.id, - label: i18n.str`The undersigned hereby declare(s) that as trustee or a member of highest supervisory body of an underlying company of a trust known as:`, - type: "text", - required: true, - }, - { - type: "caption", - label: i18n.str`and, such capacity, provide(s) to best of his/her/their knowledge the following information:`, - }, - ], - }, - { - title: i18n.str`Name and information pertaining to the trust`, - fields: [ - // { - // id: TalerFormAttributes.VQF_902_13.TRUST_NAME.id, - // label: i18n.str`Name`, - // type: "text", - // required: true, - // }, - { - id: TalerFormAttributes.VQF_902_13.TRUST_DISCRETIONARY.id, - label: i18n.str`Discretionary`, - type: "choiceStacked", - choices: [ - { label: i18n.str`Discretionary foundation`, value: "true" }, - { label: i18n.str`Non-discretionary foundation`, value: "false" }, - ], - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13.TRUST_REVOCABLE.id, - label: i18n.str`Revocable`, - type: "choiceStacked", - choices: [ - { label: i18n.str`Revolcable foundation`, value: "true" }, - { label: i18n.str`Irrevocable foundation`, value: "false" }, - ], - required: true, - }, - ], - }, - { - title: i18n.str`Settlors`, - fields: [ - { - id: TalerFormAttributes.VQF_902_13.TRUST_SETTLOR_LIST.id, - label: i18n.str`Persons`, - help: i18n.str`Information pertaining to the (ultimate economic, not fiduciary) settlor of the trust (individual or entity)`, - type: "array", - labelFieldId: - TalerFormAttributes.VQF_902_13_settlor.TRUST_SETTLOR_FULL_NAME.id, - fields: [ - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`Last name(s), first name(s)/entity`, - type: "text", - - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_settlor.TRUST_SETTLOR_COUNTRY - .id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_DEATHDATE.id, - label: i18n.str`Date of death`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - }, - { - id: TalerFormAttributes.VQF_902_13_settlor - .TRUST_SETTLOR_RIGHT_TO_REVOKE.id, - label: i18n.str`Right to revoke`, - help: i18n.str`In case of a revocable trust: does the settlor have the right to revoke the trust?`, - type: "toggle", - }, - ], - required: true, - }, - ], - }, - { - title: i18n.str`Pre-existing trust`, - fields: [ - { - id: TalerFormAttributes.VQF_902_13.TRUST_PRE_LIST.id, - label: i18n.str`Persons`, - help: i18n.str`If the trust results from a restructuring of a pre-existing trust (re-settlement) or a merger of pre-existing trusts, the following information pertaining to the (actual) settlor of the pre-existing trust(s) has to be given`, - type: "array", - labelFieldId: - TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_FULL_NAME.id, - fields: [ - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`Last name(s), first name(s)/entity`, - type: "text", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_COUNTRY.id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_pre.TRUST_PRE_DEATHDATE.id, - label: i18n.str`Date of death`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - }, - ], - - required: true, - }, - ], - }, - { - title: i18n.str`Beneficiaries`, - fields: [ - { - id: TalerFormAttributes.VQF_902_13.TRUST_BENEFICIARY_LIST.id, - label: i18n.str`Persons`, - help: i18n.str`Pertaining to the beneficiary/ies at the time of the signing of this form`, - type: "array", - labelFieldId: - TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_FULL_NAME.id, - fields: [ - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`Last name(s), first name(s)/entity`, - type: "text", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_COUNTRY.id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_RIGHT_TO_CLAIM.id, - label: i18n.str`Right to claim`, - help: i18n.str`Has/Have the beneficiary/-ies an actual right to claim a distribution?`, - type: "toggle", - required: false, - }, - ], - - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13_beneficiary - .TRUST_BENEFICIARY_ADDITION.id, - label: i18n.str`and in addition to certain beneficiaries or if no beneficiary/-ies has/have been determined, pertaining to (a) group(s) of beneficiaries (e.g. descendants of the settlor) known at the time of the signing of this form`, - type: "textArea", - required: false, - }, - ], - }, - { - title: i18n.str`Protectors and people with the right to revoke the trust or to appoint the trustee of a trust`, - description: i18n.str`Information pertaining to the protector(s) as well as (a) further person(s) having the right to revoke the trust (in case of revocable trusts) or to appoint the trustee of a trust`, - fields: [ - { - id: TalerFormAttributes.VQF_902_13.TRUST_PROTECTOR_LIST.id, - label: i18n.str`Protectors`, - help: i18n.str`Information pertaining to the protector(s)`, - type: "array", - labelFieldId: - TalerFormAttributes.VQF_902_13_protector.TRUST_PROTECTOR_FULL_NAME - .id, - fields: [ - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`Last name(s), first name(s)/entity`, - type: "text", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_COUNTRY.id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_protector - .TRUST_PROTECTOR_RIGHT_TO_REVOKE.id, - label: i18n.str`Right to revoke`, - help: i18n.str`In case of a revocable trust: does the protector have the right to revoke the trust?`, - type: "toggle", - required: false, - }, - ], - - required: true, - }, - { - id: TalerFormAttributes.VQF_902_13.TRUST_FURTHER_LIST.id, - label: i18n.str`Persons`, - help: i18n.str`Information pertaining to (a) further person(s)`, - type: "array", - labelFieldId: - TalerFormAttributes.VQF_902_13_further.TRUST_FURTHER_FULL_NAME.id, - fields: [ - { - id: TalerFormAttributes.VQF_902_13_further - .TRUST_FURTHER_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`Last name(s), first name(s)/entity`, - type: "text", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_further - .TRUST_FURTHER_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_further.TRUST_FURTHER_COUNTRY - .id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_further - .TRUST_FURTHER_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_further - .TRUST_FURTHER_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - - required: false, - }, - { - id: TalerFormAttributes.VQF_902_13_further - .TRUST_FURTHER_RIGHT_TO_REVOKE.id, - label: i18n.str`Right to revoke`, - help: i18n.str`In case of a revocable trust: Has this further person the right to revoke the trust?`, - type: "toggle", - required: false, - }, - ], - - required: true, - }, - ], - }, - { - title: i18n.str`It is a criminal offence to deliberately provide false information on this form (article 251 of the Swiss Criminal Code, documents forgery)`, - fields: [ - { - type: "caption", - label: i18n.str`The contracting partner(s) hereby declare(s) to be entitled to open a business relationship for the trust above or its underlying company.`, - }, - { - type: "caption", - label: i18n.str`The contracting partner(s) hereby undertake(s) to automatically inform of any changes to the information contained herein.`, - }, - - { - id: TalerFormAttributes.VQF_902_9.SIGNATURE.id, - label: i18n.str`Signature`, - type: "text", - required: true, - disabled: true, - }, - { - id: TalerFormAttributes.VQF_902_9.SIGN_DATE.id, - label: i18n.str`Date`, - type: "absoluteTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - required: true, - disabled: true, - }, - ], - }, - ], - }; -} diff --git a/packages/web-util/src/forms/gana/VQF_902_15.stories.tsx b/packages/web-util/src/forms/gana/VQF_902_15.stories.tsx @@ -1,40 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2022 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -/** - * - * @author Sebastian Javier Marchano (sebasjm) - */ - -import { AbsoluteTime, i18n, setupI18n } from "@gnu-taler/taler-util"; -import * as tests from "../../tests/hook.js"; -import { DefaultForm as TestedComponent } from "../forms-ui.js"; -import { VQF_902_15 } from "./VQF_902_15.js"; -import { TalerFormAttributes } from "./taler_form_attributes.js"; -export default { - title: "VQF 902 15e", -}; - -setupI18n("en", {}); -type TargetObject = {}; -const initial: TargetObject = { - [TalerFormAttributes.VQF_902_9.SIGNATURE.id]: "The officer", - [TalerFormAttributes.VQF_902_9.SIGN_DATE.id]: AbsoluteTime.now(), -}; -export const EmptyForm = tests.createExample(TestedComponent, { - initial, - design: VQF_902_15(i18n), -}); diff --git a/packages/web-util/src/forms/gana/VQF_902_15.ts b/packages/web-util/src/forms/gana/VQF_902_15.ts @@ -1,159 +0,0 @@ -import { - DoubleColumnFormDesign, - InternationalizationAPI, -} from "../../index.browser.js"; -import { - countryNameList, - countryNationalityList, -} from "../../utils/select-ui-lists.js"; -import { TalerFormAttributes } from "./taler_form_attributes.js"; - -export function VQF_902_15( - i18n: InternationalizationAPI, -): DoubleColumnFormDesign { - return { - type: "double-column", - sections: [ - { - title: i18n.str`Information on life insurance policies with separately managed accounts/securities accounts (so-called insurance wrappers) (I)`, - fields: [ - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_CONTRACTING_PARTNER.id, - label: i18n.str`Contracting partner`, - type: "textArea", - required: true, - }, - ], - }, - { - title: i18n.str`Relationship`, - description: i18n.str`Information about the contractua relationship between the contracting party and the financial intermediary`, - fields: [ - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_RELATIONSHIP_NAME.id, - label: i18n.str`Name`, - help: i18n.str`Name or number of the contractual relationship between the contracting party and the financial intermediary`, - type: "text", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_RELATIONSHIP_POLICY.id, - label: i18n.str`Insurance policy`, - type: "text", - required: true, - }, - { - type: "caption", - label: i18n.str`The contracting partner confirms in accordance with the Art. 41a SRO Regulations that it is a licensed and state-surpervised insurance company and that it has entered into the above-mentioned contractal relationship the assets connected to the life insurance policy also mentioned above.`, - }, - ], - }, - { - title: i18n.str`Policy holder`, - description: i18n.str`In relation with the above insurance policy, the contracting partner gives the following further details`, - fields: [ - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_HOLDER_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`First name(s), last name(s)/ entity`, - type: "text", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_HOLDER_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_HOLDER_COUNTRY.id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - required: true, - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_HOLDER_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - required: true, - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_HOLDER_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - required: true, - }, - ], - }, - { - title: i18n.str`Person actually (not in a fiduciary capacity) paying the premiums`, - description: i18n.str`To be filled in if not identical with "Policy holder" above`, - fields: [ - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_PAYER_FULL_NAME.id, - label: i18n.str`Full name`, - help: i18n.str`First name(s), last name(s)/ entity`, - type: "text", - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_PAYER_DOMICILE.id, - label: i18n.str`Actual address of domicile/registered office`, - type: "textArea", - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_PAYER_COUNTRY.id, - label: i18n.str`Country`, - type: "selectOne", - choices: countryNameList(i18n), - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_PAYER_BIRTHDATE.id, - label: i18n.str`Birthdate`, - type: "isoTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - }, - { - id: TalerFormAttributes.VQF_902_15.INSURANCE_PAYER_NATIONALITY.id, - label: i18n.str`Nationality`, - type: "selectOne", - choices: countryNationalityList(i18n), - }, - ], - }, - { - title: i18n.str`It is a criminal offence to deliberately provide false information on this form (article 251 of the Swiss Criminal Code, documents forgery)`, - fields: [ - { - type: "caption", - label: i18n.str`The contracting partner hereby undertakes to automatically inform the financial intermediary of any changes.`, - }, - { - type: "caption", - label: i18n.str`The contracting partner hereby also declares having been given permission by the above individuals and/or entities to transmit their data to the financial intermediary.`, - }, - { - id: TalerFormAttributes.VQF_902_9.SIGNATURE.id, - label: i18n.str`Signature`, - type: "text", - required: true, - disabled: true, - }, - { - id: TalerFormAttributes.VQF_902_9.SIGN_DATE.id, - label: i18n.str`Date`, - type: "absoluteTimeText", - placeholder: "dd/MM/yyyy", - pattern: "dd/MM/yyyy", - required: true, - disabled: true, - }, - ], - }, - ], - }; -} diff --git a/packages/web-util/src/forms/gana/VQF_902_1_customer.stories.tsx b/packages/web-util/src/forms/gana/VQF_902_1_customer.stories.tsx @@ -24,7 +24,7 @@ import * as tests from "../../tests/hook.js"; import { DefaultForm as TestedComponent } from "../forms-ui.js"; import { VQF_902_1_customer } from "./VQF_902_1_customer.js"; export default { - title: "VQF_902_1e customer fields", + title: "vqf_902_1_customer", }; setupI18n("en", {}); diff --git a/packages/web-util/src/forms/gana/VQF_902_1_customer.ts b/packages/web-util/src/forms/gana/VQF_902_1_customer.ts @@ -87,7 +87,7 @@ member act as director of a domiciliary company, this domiciliary company is the { id: TalerFormAttributes.VQF_902_1.CUSTOMER_NATURAL_BIRTHDATE.id, label: i18n.str`Date of birth`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, @@ -188,6 +188,9 @@ member act as director of a domiciliary company, this domiciliary company is the { title: i18n.str`Information on the natural persons who establish the business relationship for legal entities and partnerships`, description: i18n.str`For legal entities and partnerships the identity of the natural persons who establish the business relationship must be verified.`, + hide(root) { + return root["CUSTOMER_INFO_TYPE"] !== "LEGAL_ENTITY"; + }, fields: [ { id: TalerFormAttributes.VQF_902_1.FOUNDER_LIST.id, @@ -213,7 +216,7 @@ member act as director of a domiciliary company, this domiciliary company is the { id: TalerFormAttributes.VQF_902_1_founder.FOUNDER_BIRTHDATE.id, label: i18n.str`Date of birth`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, diff --git a/packages/web-util/src/forms/gana/VQF_902_1_officer.ts b/packages/web-util/src/forms/gana/VQF_902_1_officer.ts @@ -23,7 +23,7 @@ export function VQF_902_1_officer( { id: TalerFormAttributes.VQF_902_1.ACCEPTANCE_DATE.id, label: i18n.str`Date (conclusion of contract)`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, diff --git a/packages/web-util/src/forms/gana/VQF_902_4.ts b/packages/web-util/src/forms/gana/VQF_902_4.ts @@ -40,7 +40,7 @@ export function VQF_902_4( id: TalerFormAttributes.VQF_902_4.PEP_ACCEPTANCE_DATE.id, label: i18n.str`Acceptance date`, help: i18n.str`When the decision of the Senior executive body on the acceptance of a business relationship with a PEP was obtain on.`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: false, @@ -62,7 +62,7 @@ export function VQF_902_4( id: TalerFormAttributes.VQF_902_4.HIGH_RISK_ACCEPTANCE_DATE.id, label: i18n.str`Acceptance date`, help: i18n.str`When the decision of the Senior executive body on the acceptance of such a business relationship was obtained on.`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: false, @@ -341,7 +341,7 @@ export function VQF_902_4( .id, label: i18n.str`Acceptance date`, help: i18n.str`When the decision of the Senior executive body on the acceptance of a business relationship with increased risk was obtained on.`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: false, diff --git a/packages/web-util/src/forms/gana/VQF_902_9.ts b/packages/web-util/src/forms/gana/VQF_902_9.ts @@ -56,7 +56,7 @@ export function VQF_902_9( id: TalerFormAttributes.VQF_902_9_identity.IDENTITY_BIRTHDATE .id, label: i18n.str`Birhtdate`, - type: "isoTimeText", + type: "isoDateText", placeholder: "dd/MM/yyyy", pattern: "dd/MM/yyyy", required: true, diff --git a/packages/web-util/src/forms/gana/index.stories.ts b/packages/web-util/src/forms/gana/index.stories.ts @@ -6,6 +6,4 @@ export * as a4 from "./VQF_902_5.stories.js"; export * as a5 from "./VQF_902_9.stories.js"; export * as a6 from "./VQF_902_11.stories.js"; export * as a7 from "./VQF_902_12.stories.js"; -export * as a8 from "./VQF_902_13.stories.js"; export * as a9 from "./VQF_902_14.stories.js"; -export * as a10 from "./VQF_902_15.stories.js"; diff --git a/packages/web-util/src/forms/index.stories.ts b/packages/web-util/src/forms/index.stories.ts @@ -13,5 +13,5 @@ export * as a13 from "./fields/InputToggle.stories.js"; export * as a14 from "./fields/InputSecret.stories.js"; export * as a15 from "./fields/InputDuration.stories.js"; export * as a16 from "./fields/InputDurationText.stories.js"; -export * as a18 from "./fields/InputIsoTime.stories.js"; +export * as a18 from "./fields/InputIsoDate.stories.js"; export * as a17 from "./gana/index.stories.js"; diff --git a/packages/web-util/src/forms/index.ts b/packages/web-util/src/forms/index.ts @@ -11,9 +11,7 @@ export * from "./gana/VQF_902_5.js"; export * from "./gana/VQF_902_9.js"; export * from "./gana/VQF_902_11.js"; export * from "./gana/VQF_902_12.js"; -export * from "./gana/VQF_902_13.js"; export * from "./gana/VQF_902_14.js"; -export * from "./gana/VQF_902_15.js"; export * from "./gana/GLS_Onboarding.js"; export * from "./gana/taler_form_attributes.js"; export * from "./fields/InputAbsoluteTime.js";