commit 47e1fd5ee5ee48d38390f004a7d4c057aa0c981e
parent 111adbc4032cb3940df0915cde241ea388d63f10
Author: Florian Dold <florian@dold.me>
Date: Mon, 24 Mar 2025 18:43:50 +0100
-forms
Diffstat:
2 files changed, 47 insertions(+), 32 deletions(-)
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
@@ -17,6 +17,7 @@
import {
DoubleColumnFormDesign,
InternationalizationAPI,
+ UIFormElementConfig,
} from "../../index.browser.js";
import { countryNationalityList } from "../../utils/select-ui-lists.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
@@ -36,6 +37,33 @@ export const form_vqf_902_1_customer = (i18n: InternationalizationAPI) => ({
config: design_VQF_902_1_customer(i18n),
});
+const fieldCorrespondenceLanguage = (
+ i18n: InternationalizationAPI,
+): UIFormElementConfig => ({
+ id: TalerFormAttributes.CORRESPONDENCE_LANGUAGE,
+ required: true,
+ label: i18n.str`Correspondence language:`,
+ type: "choiceStacked",
+ choices: [
+ {
+ value: "en",
+ label: i18n.str`English`,
+ },
+ {
+ value: "de",
+ label: i18n.str`German`,
+ },
+ {
+ value: "fr",
+ label: i18n.str`French`,
+ },
+ {
+ value: "it",
+ label: i18n.str`Italian`,
+ },
+ ],
+});
+
/**
* Form vqf_902_1_customer.
*/
@@ -70,7 +98,7 @@ export function design_VQF_902_1_customer(
},
{
title: i18n.str`Information on customer`,
- description: i18n.str`The customer is a natural person`,
+ description: i18n.str`Applicable if customer is a natural person`,
hide(root) {
return root[TalerFormAttributes.CUSTOMER_TYPE] !== "NATURAL_PERSON";
},
@@ -131,7 +159,7 @@ export function design_VQF_902_1_customer(
},
{
title: i18n.str`Information on customer (sole proprietor)`,
- description: i18n.str`The customer is a sole proprietor`,
+ description: i18n.str`Applicable only if customer is a sole proprietor`,
hide(root) {
return (
root[TalerFormAttributes.CUSTOMER_TYPE] !== "NATURAL_PERSON" ||
@@ -161,8 +189,8 @@ export function design_VQF_902_1_customer(
],
},
{
- title: i18n.str`Information on customer`,
- description: i18n.str`The customer is a legal entity`,
+ title: i18n.str`Information on customer (legal entity)`,
+ description: i18n.str`Applicable if customer is a legal entity`,
hide(root) {
return root[TalerFormAttributes.CUSTOMER_TYPE] !== "LEGAL_ENTITY";
},
@@ -207,6 +235,13 @@ export function design_VQF_902_1_customer(
],
},
{
+ title: i18n.str`Correspondence Preferences`,
+ hide(root) {
+ return !root[TalerFormAttributes.CUSTOMER_TYPE];
+ },
+ fields: [fieldCorrespondenceLanguage(i18n)],
+ },
+ {
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) {
@@ -256,19 +291,19 @@ export function design_VQF_902_1_customer(
},
{
id: TalerFormAttributes.SIGNING_AUTHORITY,
- label: i18n.str`Type of authorization`,
+ label: i18n.str`Type of authorization (signing authority)`,
type: "text",
required: true,
},
{
id: TalerFormAttributes.SIGNING_AUTHORITY_EVIDENCE,
required: true,
- label: i18n.str`Power of attorney arrangements`,
+ label: i18n.str`Evidence of signing authority.`,
type: "choiceStacked",
choices: [
{
value: "CR",
- label: i18n.str`CR extract`,
+ label: i18n.str`Company register extract`,
},
{
value: "MANDATE",
@@ -298,8 +333,8 @@ export function design_VQF_902_1_customer(
},
// Version of the question for natural persons
{
- title: i18n.str`Information on the beneficial owner of the assets and/or controlling personnformation 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.`,
+ title: i18n.str`Customer classification`,
+ description: i18n.str`Classification for the establishment of the beneficial owner of the assets and/or controlling person`,
hide(root) {
return root[TalerFormAttributes.CUSTOMER_TYPE] !== "NATURAL_PERSON";
},
@@ -324,8 +359,8 @@ export function design_VQF_902_1_customer(
},
// Version for Businesses
{
- title: i18n.str`Information on the beneficial owner of the assets and/or controlling personnformation 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.`,
+ title: i18n.str`Customer classification`,
+ description: i18n.str`Classification for the establishment of the beneficial owner of the assets and/or controlling person`,
hide(root) {
return root[TalerFormAttributes.CUSTOMER_TYPE] !== "LEGAL_ENTITY";
},
@@ -350,7 +385,7 @@ export function design_VQF_902_1_customer(
},
{
value: "LIFE_INSURANCE",
- label: i18n.str`a life insurance policy with separately managed accounts / securities accounts (so-called insurance wrappers)`,
+ label: i18n.str`A life insurance policy with separately managed accounts / securities accounts (so-called insurance wrappers)`,
},
{
value: "OTHER",
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
@@ -65,26 +65,6 @@ export function VQF_902_1_officer(
required: true,
},
{
- id: TalerFormAttributes.CORRESPONDENCE_LANGUAGE,
- required: true,
- label: i18n.str`Correspondence language:`,
- type: "choiceStacked",
- choices: [
- {
- value: "en",
- label: i18n.str`English`,
- },
- {
- value: "de",
- label: i18n.str`German`,
- },
- {
- value: "fr",
- label: i18n.str`French`,
- },
- ],
- },
- {
id: TalerFormAttributes.ACCEPTANCE_FURTHER_INFO,
label: i18n.str`Further information:`,
type: "textArea",