taler-typescript-core

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

commit 6dc62e6942dd4f8df2b285e750e6cc9432c3f5e5
parent 90e6420f0de7cd1d61e97b3dbd0a95f39f26aba5
Author: Florian Dold <florian@dold.me>
Date:   Tue, 25 Mar 2025 01:55:19 +0100

form tweaks

Diffstat:
Mpackages/web-util/src/forms/gana/VQF_902_14.stories.tsx | 12+++---------
Mpackages/web-util/src/forms/gana/VQF_902_14.ts | 29+++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/packages/web-util/src/forms/gana/VQF_902_14.stories.tsx b/packages/web-util/src/forms/gana/VQF_902_14.stories.tsx @@ -19,22 +19,16 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { AbsoluteTime, i18n, setupI18n } from "@gnu-taler/taler-util"; +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_14 } from "./VQF_902_14.js"; -import { TalerFormAttributes } from "./taler_form_attributes.js"; export default { - title: "VQF 902 14e", + title: "vqf_902_14", }; setupI18n("en", {}); -type TargetObject = {}; -const initial: TargetObject = { - [TalerFormAttributes.SIGNATURE]: "The officer", - [TalerFormAttributes.SIGN_DATE]: AbsoluteTime.now(), -}; export const EmptyForm = tests.createExample(TestedComponent, { - initial, + initial: {}, design: VQF_902_14(i18n), }); diff --git a/packages/web-util/src/forms/gana/VQF_902_14.ts b/packages/web-util/src/forms/gana/VQF_902_14.ts @@ -9,6 +9,7 @@ export function VQF_902_14( ): DoubleColumnFormDesign { return { type: "double-column", + title: "Special Clarifications", sections: [ { title: i18n.str`Reason for special clarifications`, @@ -61,6 +62,34 @@ export function VQF_902_14( ], }, { + title: i18n.str`Supplemental File Upload`, + description: i18n.str`Optional supplemental information for the special clarifications.`, + fields: [ + { + id: TalerFormAttributes.SUPPLEMENTAL_FILES_LIST, + label: i18n.str`Supplemental Files`, + type: "array", + labelFieldId: "FILE.FILENAME", + required: false, + fields: [ + { + id: TalerFormAttributes.DESCRIPTION, + label: i18n.str`Description`, + type: "textArea", + required: true, + }, + { + id: TalerFormAttributes.FILE, + label: i18n.str`File (PDF)`, + type: "file", + accept: "application/pdf", + required: true, + }, + ], + }, + ], + }, + { title: i18n.str`Summary and plausbility check of the gathered information`, description: i18n.str`The results of the clarifications have to be documented and their plausability has to be checked.`, fields: [