taler-typescript-core

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

commit 60dc432e7775d6b0f6d8a6fed23c2cebe5780b84
parent 232b1b85be161cc520aeb1e6b49fe3c4fec52cf8
Author: Sebastian <sebasjm@taler-systems.com>
Date:   Mon,  5 Jan 2026 13:25:48 -0300

fix #10791

Diffstat:
Mpackages/aml-backoffice-ui/src/settings.json | 2+-
Mpackages/taler-util/src/taler-form-attributes.ts | 62+++++++++++++++++++++++++++++++++++++-------------------------
Mpackages/web-util/src/forms/gana/VQF_902_14.ts | 14++++++++++++++
Mpackages/web-util/src/forms/gana/VQF_902_1_customer.ts | 38++++++++++++++++++++++++++++++++++++--
Mpackages/web-util/src/forms/gana/VQF_902_4.ts | 14++++++++++++++
Mpackages/web-util/src/forms/gana/VQF_902_5.ts | 14++++++++++++++
Mpackages/web-util/src/forms/index.ts | 12------------
7 files changed, 116 insertions(+), 40 deletions(-)

diff --git a/packages/aml-backoffice-ui/src/settings.json b/packages/aml-backoffice-ui/src/settings.json @@ -1,4 +1,4 @@ { - "backendBaseURL": "http://exchange.taler.test/", + "backendBaseURL": "https://exchange.taler/", "signupEmail": "do-not-contact-me@exchange.taler.test" } diff --git a/packages/taler-util/src/taler-form-attributes.ts b/packages/taler-util/src/taler-form-attributes.ts @@ -27,6 +27,30 @@ export const TalerFormAttributes = { /** + * Description: Reserved for technical reasons, do not use in actual forms. + * + * GANA Type: String + */ + DATADIR: "DATADIR" as const, + /** + * Description: Date (in human readable format) on which the form was submitted. Generated by the exchange for PDF generation, do not use in the actual forms. + * + * GANA Type: String + */ + FILING_DATE: "FILING_DATE" as const, + /** + * Description: Name of the AML officer submitting the form. Generated by the exchange for PDF generation, do not use in the actual forms. + * + * GANA Type: String + */ + AML_STAFF_NAME: "AML_STAFF_NAME" as const, + /** + * Description: True if an AML officer submitted the form. Generated by the exchange for PDF generation, do not use in the actual forms. + * + * GANA Type: Boolean + */ + BY_AML_OFFICER: "BY_AML_OFFICER" as const, + /** * Description: Suppress flagging this account when it creates a hit on a sanctions list, this is a false-positive. * * GANA Type: Boolean @@ -51,6 +75,12 @@ export const TalerFormAttributes = { */ CUSTOMER_TYPE: "CUSTOMER_TYPE" as const, /** + * Description: Name of the customer required by VQF. + * + * GANA Type: String + */ + CUSTOMER_NAME: "CUSTOMER_NAME" as const, + /** * Description: Date of birth for natural persons. It should be in the past and less than 120 years. * * GANA Type: ISO Date @@ -143,19 +173,19 @@ export const TalerFormAttributes = { /** * Description: * - * GANA Type: 'CR' | 'MANDATE' | 'OTHER' + * GANA Type: 'CR' | 'MANDATE' | 'OTHER' */ SIGNING_AUTHORITY_EVIDENCE: "SIGNING_AUTHORITY_EVIDENCE" as const, /** * Description: * - * GANA Type: String + * GANA Type: String */ SIGNING_AUTHORITY_EVIDENCE_OTHER: "SIGNING_AUTHORITY_EVIDENCE_OTHER" as const, /** * Description: * - * GANA Type: File + * GANA Type: File */ SIGNING_AUTHORITY_EVIDENCE_DOCUMENT_COPY: "SIGNING_AUTHORITY_EVIDENCE_DOCUMENT_COPY" as const, /** @@ -443,7 +473,7 @@ export const TalerFormAttributes = { /** * Description: * - * GANA Type: String + * GANA Type: String */ INCRISK_MEANS_OTHER: "INCRISK_MEANS_OTHER" as const, /** @@ -467,7 +497,7 @@ export const TalerFormAttributes = { /** * Description: * - * GANA Type: String + * GANA Type: String */ INCRISK_RESULT_OTHER: "INCRISK_RESULT_OTHER" as const, /** @@ -483,24 +513,6 @@ export const TalerFormAttributes = { */ PERSON_LAST_NAME: "PERSON_LAST_NAME" as const, /** - * Description: Identification number or string of national identity card. - * - * GANA Type: String - */ - PERSON_NATIONAL_ID: "PERSON_NATIONAL_ID" as const, - /** - * Description: Scan of a recognized national identity card of an individual. - * - * GANA Type: File - */ - PERSON_NATIONAL_ID_SCAN: "PERSON_NATIONAL_ID_SCAN" as const, - /** - * Description: Nationality of an individual. Format is 2-letter ISO country-code. - * - * GANA Type: CountryCode - */ - PERSON_NATIONALITY: "PERSON_NATIONALITY" as const, - /** * Description: Confirmation that the wallet user is a private customer, not a business. * * GANA Type: Boolean @@ -515,13 +527,13 @@ export const TalerFormAttributes = { /** * Description: Type of company form or business (selection from fixed list). * - * GANA Type: String + * GANA Type: String */ BUSINESS_TYPE: "BUSINESS_TYPE" as const, /** * Description: Type of company form or business (free-form entry for OTHER). * - * GANA Type: String + * GANA Type: String */ BUSINESS_TYPE_OTHER: "BUSINESS_TYPE_OTHER" as const, /** diff --git a/packages/web-util/src/forms/gana/VQF_902_14.ts b/packages/web-util/src/forms/gana/VQF_902_14.ts @@ -1,5 +1,6 @@ import { TalerFormAttributes } from "@gnu-taler/taler-util"; import { + Descr, DoubleColumnFormDesign, FormMetadata, InternationalizationAPI, @@ -23,6 +24,19 @@ export function VQF_902_14( title: "Special Clarifications", sections: [ { + title: i18n.str`Information on customer`, + description: Descr.CUSTOMER_INFO_TYPE(i18n), + fields: [ + { + id: TalerFormAttributes.CUSTOMER_NAME, + label: i18n.str`Customer`, + // help: i18n.str``, + type: "text", + required: true, + }, + ], + }, + { title: i18n.str`Reason for special clarifications`, fields: [ { 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 @@ -15,7 +15,13 @@ */ import { TalerFormAttributes } from "@gnu-taler/taler-util"; -import { intervalToDuration, isDate, isFuture, isValid, parse } from "date-fns"; +import { + format, + intervalToDuration, + isFuture, + isValid, + parse +} from "date-fns"; import { DoubleColumnFormDesign, InternationalizationAPI, @@ -23,7 +29,7 @@ import { } from "../../index.browser.js"; import { countryNationalityList } from "../../utils/select-ui-lists.js"; -const Descr = { +export const Descr = { CUSTOMER_INFO_TYPE: ( i18n: InternationalizationAPI, ) => i18n.str`The customer is the person with whom the member concludes the contract with regard to the financial service provided (civil law). Does the @@ -71,6 +77,8 @@ const fieldCorrespondenceLanguage = ( export function design_VQF_902_1_customer( i18n: InternationalizationAPI, ): DoubleColumnFormDesign { + const today = format(new Date(), "yyyy-MM-dd"); + return { type: "double-column", title: i18n.str`Identification form (basic customer information)`, @@ -471,6 +479,32 @@ export function design_VQF_902_1_customer( }, ], }, + { + 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)`, + 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", + defaultValue: today, + placeholder: "dd/MM/yyyy", + disabled: true, + 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 @@ -1,5 +1,6 @@ import { TalerFormAttributes } from "@gnu-taler/taler-util"; import { + Descr, DoubleColumnFormDesign, FormMetadata, InternationalizationAPI, @@ -22,6 +23,19 @@ export function VQF_902_4( type: "double-column", sections: [ { + title: i18n.str`Information on customer`, + description: Descr.CUSTOMER_INFO_TYPE(i18n), + fields: [ + { + id: TalerFormAttributes.CUSTOMER_NAME, + label: i18n.str`Customer`, + // help: i18n.str``, + type: "text", + required: true, + }, + ], + }, + { title: i18n.str`Evaluation of politically exposed persons (PEP-Check)`, description: i18n.str`This evaluation has to be completed by all members for every business relationship.`, fields: [ diff --git a/packages/web-util/src/forms/gana/VQF_902_5.ts b/packages/web-util/src/forms/gana/VQF_902_5.ts @@ -1,4 +1,5 @@ import { + Descr, DoubleColumnFormDesign, FormMetadata, InternationalizationAPI, @@ -22,6 +23,19 @@ export function VQF_902_5( type: "double-column", sections: [ { + title: i18n.str`Information on customer`, + description: Descr.CUSTOMER_INFO_TYPE(i18n), + fields: [ + { + id: TalerFormAttributes.CUSTOMER_NAME, + label: i18n.str`Customer`, + // help: i18n.str``, + type: "text", + required: true, + }, + ], + }, + { title: i18n.str`Business activity`, fields: [ { diff --git a/packages/web-util/src/forms/index.ts b/packages/web-util/src/forms/index.ts @@ -102,21 +102,9 @@ export const preloadedForms: ( version: 1, config: nameAndDob(i18n), }, - form_vqf_902_1_customer(i18n), - form_vqf_902_1_officer(i18n), - form_vqf_902_4(i18n), - form_vqf_902_5(i18n), - form_vqf_902_11_customer(i18n), - form_vqf_902_11_officer(i18n), - form_vqf_902_14(i18n), - form_vqf_902_9_customer(i18n), - form_vqf_902_9_officer(i18n), - form_generic_note(i18n), form_challenger_email(i18n), form_challenger_sms(i18n), form_challenger_postal(i18n), - form_gls_merchant_onboarding(i18n), - form_gls_wallet_confirmation(i18n), form_multi_upload(i18n), form_vqf_902_1_customer(i18n), form_vqf_902_1_officer(i18n),