commit f3b7be56353f557f3e915d8e5e306547627417e9
parent a98265845c2810851681f6fabab113eaf7b516fb
Author: Sebastian <sebasjm@taler-systems.com>
Date: Tue, 20 Jan 2026 11:35:01 -0300
fix #10891
Diffstat:
3 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx b/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx
@@ -46,7 +46,7 @@ export function InputGroup<T>({
return (
<div class="card">
- <header class="card-header">
+ <header class="card-header" style={{cursor:"pointer"}} onClick={(): void => setActive(!active)}>
<p class="card-header-title">
{label}
{tooltip && (
@@ -55,13 +55,19 @@ export function InputGroup<T>({
</span>
)}
{group?.hasError && (
- <span class="has-text-danger" data-tooltip={tooltip} style={{marginLeft:5}}>
+ <span
+ class="has-text-danger"
+ data-tooltip={tooltip}
+ style={{ marginLeft: 5 }}
+ >
*
</span>
)}
</p>
{!fixed && (
- <button type="button" class="card-header-icon"
+ <button
+ type="button"
+ class="card-header-icon"
aria-label="more options"
onClick={(): void => setActive(!active)}
>
diff --git a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx
@@ -88,6 +88,12 @@ export function DefaultInstanceFormFields({
tooltip={i18n.str`Logo image.`}
/>
+ <InputToggle<Entity>
+ name="use_stefan"
+ label={i18n.str`Pay transaction fee`}
+ tooltip={i18n.str`Cover the transaction cost or pass it on to the user.`}
+ />
+
<InputGroup
name="address"
label={i18n.str`Address`}
@@ -104,8 +110,11 @@ export function DefaultInstanceFormFields({
<InputLocation name="jurisdiction" />
</InputGroup>
- <InputGroup label={i18n.str`Default cut-off times`} tooltip={i18n.str`These will be the values are going to be used if are not overriden in the order creation.`} name="" >
-
+ <InputGroup
+ label={i18n.str`Default cut-off times`}
+ tooltip={i18n.str`These will be the values are going to be used if are not overriden in the order creation.`}
+ name=""
+ >
<InputDuration<Entity>
name="default_pay_delay"
label={i18n.str`Payment delay`}
@@ -167,12 +176,6 @@ export function DefaultInstanceFormFields({
}}
/>
</InputGroup>
-
- <InputToggle<Entity>
- name="use_stefan"
- label={i18n.str`Pay transaction fee`}
- tooltip={i18n.str`Cover the transaction cost or pass it on to the user.`}
- />
</FragmentPersonaFlag>
</Fragment>
);
diff --git a/packages/merchant-backoffice-ui/src/paths/settings/index.tsx b/packages/merchant-backoffice-ui/src/paths/settings/index.tsx
@@ -26,9 +26,10 @@ import {
} from "../../components/form/FormProvider.js";
import { InputSelector } from "../../components/form/InputSelector.js";
import { LangSelector } from "../../components/menu/LangSelector.js";
-import { Preferences, usePreference } from "../../hooks/preference.js";
+import { dateFormatForSettings, datetimeFormatForSettings, Preferences, usePreference } from "../../hooks/preference.js";
import { useSessionContext } from "../../context/session.js";
import { NotificationCard } from "../../components/menu/index.js";
+import { format } from "date-fns";
const TALER_SCREEN_ID = 83;
@@ -62,6 +63,7 @@ export function Settings({ onClose }: { onClose?: () => void }): VNode {
updateValue(v);
}
+ const [settings] = usePreference();
return (
<div>
@@ -99,13 +101,10 @@ export function Settings({ onClose }: { onClose?: () => void }): VNode {
label={i18n.str`Date format`}
expand={true}
help={
- formValue.dateFormat === "dmy"
- ? "31/12/2001"
- : formValue.dateFormat === "mdy"
- ? "12/31/2001"
- : formValue.dateFormat === "ymd"
- ? "2001/12/31"
- : ""
+ <p>
+ {format(new Date(), dateFormatForSettings(settings))}<br/>
+ {format(new Date(), datetimeFormatForSettings(settings))}<br/>
+ </p>
}
toStr={(e) => {
if (e === "ymd") return "year month day";