commit b2a7f80efeaa092a6152f06f28cbd8d3800a2aa2
parent bf04461f0981fb6cbe327b0a2c360989c2aa769c
Author: Sebastian <sebasjm@taler-systems.com>
Date: Wed, 15 Jul 2026 13:56:20 -0300
qc note: default amount should be emptied after choices are choosen
Diffstat:
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/packages/taler-merchant-webui/src/paths/instance/orders/create/CreatePage.tsx b/packages/taler-merchant-webui/src/paths/instance/orders/create/CreatePage.tsx
@@ -501,7 +501,16 @@ export function CreatePage({
<ChoicesListForm
initial={value.choices ?? []}
onUpdate={(cs) => {
- valueHandler((d) => ({ ...d, choices: cs }));
+ valueHandler((d) => {
+ if (d.pricing) {
+ d.pricing.order_price = undefined;
+ d.pricing.products_price = undefined;
+ }
+ return {
+ ...d,
+ choices: cs,
+ };
+ });
setEditChoices(false);
}}
focus
@@ -625,18 +634,18 @@ export function CreatePage({
<FragmentPersonaFlag
point={UIElement.option_orderChoices}
>
- <Tooltip
- text={i18n.str`Switch to multiple payment choices`}
- >
- <button
- class="button is-info"
- type="button"
- accessKey="+"
- onClick={() => setEditChoices(true)}
+ <Tooltip
+ text={i18n.str`Switch to multiple payment choices`}
>
- <i class="icon mdi mdi-menu mdi-36px" />
- </button>
- </Tooltip>
+ <button
+ class="button is-info"
+ type="button"
+ accessKey="+"
+ onClick={() => setEditChoices(true)}
+ >
+ <i class="icon mdi mdi-menu mdi-36px" />
+ </button>
+ </Tooltip>
</FragmentPersonaFlag>
}
/>