commit 381a18530f16570de843f04dda1c1f78fa34d68a
parent 3cb75779fefdda06226ad458f5d662e7d13454c7
Author: Florian Dold <florian@dold.me>
Date: Thu, 8 May 2025 22:04:33 +0200
purge vqf_902_9 form, we have the split versions
Diffstat:
6 files changed, 1 insertion(+), 217 deletions(-)
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts
@@ -14,8 +14,6 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import {
- AcceptTermOfServiceContext,
- acceptTos,
form_generic_note,
form_vqf_902_11_customer,
form_vqf_902_11_officer,
@@ -24,7 +22,6 @@ import {
form_vqf_902_1_officer,
form_vqf_902_4,
form_vqf_902_5,
- form_vqf_902_9,
form_vqf_902_9_customer,
form_vqf_902_9_officer,
GLS_Onboarding,
@@ -39,7 +36,6 @@ export const preloadedForms: (
form_vqf_902_1_officer(i18n),
form_vqf_902_4(i18n),
form_vqf_902_5(i18n),
- form_vqf_902_9(i18n),
form_vqf_902_11_customer(i18n),
form_vqf_902_11_officer(i18n),
form_vqf_902_14(i18n),
diff --git a/packages/kyc-ui/src/forms/index.ts b/packages/kyc-ui/src/forms/index.ts
@@ -25,7 +25,6 @@ import {
form_vqf_902_1_officer,
form_vqf_902_4,
form_vqf_902_5,
- form_vqf_902_9,
form_vqf_902_9_customer,
form_vqf_902_9_officer,
FormMetadata,
@@ -67,7 +66,6 @@ export const preloadedForms: (
form_vqf_902_1_officer(i18n),
form_vqf_902_4(i18n),
form_vqf_902_5(i18n),
- form_vqf_902_9(i18n),
form_vqf_902_9_customer(i18n),
form_vqf_902_9_officer(i18n),
form_vqf_902_11_customer(i18n),
diff --git a/packages/web-util/src/forms/gana/VQF_902_9.stories.tsx b/packages/web-util/src/forms/gana/VQF_902_9.stories.tsx
@@ -1,35 +0,0 @@
-/*
- This file is part of GNU Taler
- (C) 2025 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 { 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_9 } from "./VQF_902_9.js";
-export default {
- title: "vqf_902_9",
-};
-
-setupI18n("en", {});
-
-export const EmptyForm = tests.createExample(TestedComponent, {
- design: VQF_902_9(i18n),
- initial: {},
-});
diff --git a/packages/web-util/src/forms/gana/VQF_902_9.ts b/packages/web-util/src/forms/gana/VQF_902_9.ts
@@ -1,173 +0,0 @@
-import { TalerFormAttributes } from "@gnu-taler/taler-util";
-import {
- DoubleColumnFormDesign,
- FormMetadata,
- InternationalizationAPI,
-} from "../../index.browser.js";
-import { countryNationalityList } from "../../utils/select-ui-lists.js";
-import { format, isFuture, parse } from "date-fns";
-
-export const form_vqf_902_9 = (
- i18n: InternationalizationAPI,
-): FormMetadata => ({
- label: i18n.str`Declaration of identity of the beneficial owner (A)`,
- id: "vqf_902_9",
- version: 1,
- config: VQF_902_9(i18n),
-});
-
-export function VQF_902_9(
- i18n: InternationalizationAPI,
-): DoubleColumnFormDesign {
- const today = format(new Date(), "yyyy-MM-dd");
- return {
- type: "double-column",
- title: i18n.str`Declaration of identity of the beneficial owner`,
- sections: [
- {
- title: "Information about submitter",
- fields: [
- {
- id: TalerFormAttributes.SUBMITTED_BY,
- label: i18n.str`Who is filling out the form?`,
- type: "choiceHorizontal",
- required: true,
- choices: [
- {
- label: "Taler Operations staff",
- value: "AML_OFFICER",
- },
- {
- label: "The customer",
- value: "CUSTOMER",
- },
- ],
- },
- ],
- },
- {
- title: "Identity of the contracting partner",
- hide(root) {
- return !root[TalerFormAttributes.SUBMITTED_BY];
- },
- fields: [
- {
- id: TalerFormAttributes.IDENTITY_CONTRACTING_PARTNER,
- label: i18n.str`Contracting partner`,
- type: "textArea",
- required: true,
- },
- ],
- },
- {
- title: i18n.str`Beneficial owner details`,
- hide(root) {
- return !root[TalerFormAttributes.SUBMITTED_BY];
- },
- fields: [
- {
- id: TalerFormAttributes.IDENTITY_LIST,
- label: i18n.str`Beneficial owner(s)`,
- help: i18n.str`The person(s) listed below is/are the beneficial owner(s) of the assets involved in the business relationship. If the contracting partner is also the sole beneficial owner of the assets, the contracting partner's detail must be set out below`,
- type: "array",
- validator(persons) {
- if (!persons || persons.length < 1) {
- return i18n.str`Can't be empty`;
- }
- return undefined;
- },
- labelFieldId: TalerFormAttributes.FULL_NAME,
- fields: [
- {
- id: TalerFormAttributes.FULL_NAME,
- label: i18n.str`Full name`,
- type: "text",
- required: true,
- },
- {
- id: TalerFormAttributes.DOMICILE_ADDRESS,
- label: i18n.str`Domicile address`,
- type: "textArea",
- required: true,
- },
- {
- id: TalerFormAttributes.DATE_OF_BIRTH,
- label: i18n.str`Date of birth`,
- type: "isoDateText",
- placeholder: "dd/MM/yyyy",
- pattern: "dd/MM/yyyy",
- required: true,
- validator(text, form) {
- //FIXME: why returning in this format even if pattern is in another?
- const time = parse(text, "yyyy-MM-dd", new Date());
- if (isFuture(time)) {
- return i18n.str`it can't be in the future`;
- }
- return undefined;
- },
- },
- {
- id: TalerFormAttributes.NATIONALITY,
- label: i18n.str`Nationality`,
- type: "selectOne",
- choices: countryNationalityList(i18n),
- preferredChoiceVals: ["CH"],
- required: true,
- },
- ],
- required: false,
- },
- ],
- },
- {
- title: i18n.str`Signature(s)`,
- description: i18n.str`It is a criminal offence to deliberately provide false information on this form (article 251 of the Swiss Criminal Code, documents forgery)`,
- hide(root) {
- return root[TalerFormAttributes.SUBMITTED_BY] != "CUSTOMER";
- },
- fields: [
- {
- type: "caption",
- label: i18n.str`The contracting partner hereby undertakes to inform automatically of any changes to the information contained herein.`,
- },
- {
- id: TalerFormAttributes.SIGNATURE,
- label: i18n.str`Signature(s)`,
- type: "text",
- required: true,
- },
- {
- id: TalerFormAttributes.SIGN_DATE,
- label: i18n.str`Date`,
- type: "isoDateText",
- placeholder: "dd/MM/yyyy",
- pattern: "dd/MM/yyyy",
- required: true,
- disabled: true,
- defaultValue: today,
- },
- ],
- },
- {
- title: i18n.str`Signed Declaration`,
- description: i18n.str`Signed declaration by the customer`,
- hide(root) {
- return root[TalerFormAttributes.SUBMITTED_BY] != "AML_OFFICER";
- },
- fields: [
- {
- type: "caption",
- label: i18n.str`The uploaded document must contain the customer's signature on the beneficial owner declaration.`,
- },
- {
- id: TalerFormAttributes.ATTACHMENT_SIGNED_DOCUMENT,
- label: i18n.str`Signed Document`,
- type: "file",
- accept: "application/pdf",
- required: true,
- },
- ],
- },
- ],
- };
-}
diff --git a/packages/web-util/src/forms/gana/index.stories.ts b/packages/web-util/src/forms/gana/index.stories.ts
@@ -9,6 +9,5 @@ export * as vqf_902_1_customer_stories from "./VQF_902_1_customer.stories.js";
export * as vqf_902_1_officer_stories from "./VQF_902_1_officer.stories.js";
export * as vqf_902_4_stories from "./VQF_902_4.stories.js";
export * as vqf_902_5_stories from "./VQF_902_5.stories.js";
-export * as vqf_902_9_stories from "./VQF_902_9.stories.js";
-export * as vqf_902_9_officer_stories from "./VQF_902_9_officer.stories.js";
export * as vqf_902_9_customer_stories from "./VQF_902_9_customer.stories.js";
+export * as vqf_902_9_officer_stories from "./VQF_902_9_officer.stories.js";
diff --git a/packages/web-util/src/forms/index.ts b/packages/web-util/src/forms/index.ts
@@ -30,7 +30,6 @@ export * from "./gana/VQF_902_1_customer.js";
export * from "./gana/VQF_902_1_officer.js";
export * from "./gana/VQF_902_4.js";
export * from "./gana/VQF_902_5.js";
-export * from "./gana/VQF_902_9.js";
export * from "./gana/VQF_902_9_customer.js";
export * from "./gana/VQF_902_9_officer.js";