commit 77d01b5c4d57d79955d2b68f86f75a6f7c99c21f parent 043cdeeddc74f6380c102bab602ac891a878a903 Author: Sebastian <sebasjm@gmail.com> Date: Tue, 17 Jun 2025 10:00:40 -0300 fix #10113 pretty Diffstat:
26 files changed, 138 insertions(+), 125 deletions(-)
diff --git a/packages/aml-backoffice-ui/src/ExchangeAmlFrame.tsx b/packages/aml-backoffice-ui/src/ExchangeAmlFrame.tsx @@ -153,4 +153,3 @@ export function ExchangeAmlFrame({ </div> ); } - diff --git a/packages/aml-backoffice-ui/src/Routing.tsx b/packages/aml-backoffice-ui/src/Routing.tsx @@ -19,7 +19,7 @@ import { urlPattern, useCurrentLocation, useNavigationContext, - useTranslationContext + useTranslationContext, } from "@gnu-taler/web-util/browser"; import { Fragment, h, VNode } from "preact"; @@ -31,10 +31,7 @@ import { useOfficer } from "./hooks/officer.js"; import { AccountDetails } from "./pages/AccountDetails.js"; import { AccountList } from "./pages/AccountList.js"; import { Dashboard } from "./pages/Dashboard.js"; -import { - DecisionWizard, - WizardSteps, -} from "./pages/DecisionWizard.js"; +import { DecisionWizard, WizardSteps } from "./pages/DecisionWizard.js"; import { HandleAccountNotReady } from "./components/HandleAccountNotReady.js"; import { Profile } from "./pages/Profile.js"; import { Search } from "./pages/Search.js"; @@ -44,7 +41,7 @@ import { HomeIcon, PeopleIcon, SearchIcon, - TransfersIcon + TransfersIcon, } from "./pages/AccountList.js"; export function Routing(): VNode { @@ -303,7 +300,7 @@ function PrivateRouting(): VNode { case "search": { return ( <Search - routeToAccountById={privatePages.account} + routeToAccountById={privatePages.account} onNewDecision={(account, payto) => { startNewRequest(); navigateTo( @@ -349,7 +346,6 @@ function PrivateRouting(): VNode { } } - function Navigation(): VNode { const { i18n } = useTranslationContext(); const pageList = [ @@ -395,7 +391,6 @@ function Navigation(): VNode { })} </ul> </li> - </ul> </nav> </div> diff --git a/packages/aml-backoffice-ui/src/components/CreateAccount.tsx b/packages/aml-backoffice-ui/src/components/CreateAccount.tsx @@ -21,7 +21,7 @@ import { LocalNotificationBanner, useForm, useLocalNotificationHandler, - useTranslationContext + useTranslationContext, } from "@gnu-taler/web-util/browser"; import { VNode, h } from "preact"; import { useOfficer } from "../hooks/officer.js"; @@ -126,4 +126,3 @@ export function CreateAccount(): VNode { </div> ); } - diff --git a/packages/aml-backoffice-ui/src/components/ErrorLoadingWithDebug.tsx b/packages/aml-backoffice-ui/src/components/ErrorLoadingWithDebug.tsx @@ -23,7 +23,12 @@ export function ErrorLoadingWithDebug({ error }: { error: Error }): VNode { if (error instanceof TalerError) { return <ErrorLoading error={error} showDetail={pref.showDebugInfo} />; } else { - console.error(error) - return <ErrorLoading error={TalerError.fromException(error)} showDetail={pref.showDebugInfo} />; + console.error(error); + return ( + <ErrorLoading + error={TalerError.fromException(error)} + showDetail={pref.showDebugInfo} + /> + ); } } diff --git a/packages/aml-backoffice-ui/src/components/MeasuresTable.tsx b/packages/aml-backoffice-ui/src/components/MeasuresTable.tsx @@ -161,7 +161,8 @@ export function CurrentMeasureTable({ </h1> <p class="mt-2 text-sm text-gray-700"> <i18n.Translate> - Will show a label or information to the user until a new state. + Will show a label or information to the user until a new + state. </i18n.Translate> </p> </div> diff --git a/packages/aml-backoffice-ui/src/components/NewMeasure.tsx b/packages/aml-backoffice-ui/src/components/NewMeasure.tsx @@ -451,11 +451,13 @@ function MeasureForm({ switch (formType) { case "verification": { - const cType = JSON.parse(challengeType?.value as any) + const cType = JSON.parse(challengeType?.value as any); return ( <div> <h2 class="mt-4 mb-2"> - <i18n.Translate>Configure verification type: {cType}</i18n.Translate> + <i18n.Translate> + Configure verification type: {cType} + </i18n.Translate> </h2> <div> <button diff --git a/packages/aml-backoffice-ui/src/components/RulesInfo.tsx b/packages/aml-backoffice-ui/src/components/RulesInfo.tsx @@ -3,7 +3,7 @@ import { AmountJson, Amounts, KycRule, - LimitOperationType + LimitOperationType, } from "@gnu-taler/taler-util"; import { Attention, diff --git a/packages/aml-backoffice-ui/src/components/ShowConsolidated.tsx b/packages/aml-backoffice-ui/src/components/ShowConsolidated.tsx @@ -123,12 +123,14 @@ function getConsolidated( kyc: {}, }; return history.reduce((prev, cur) => { - const collectionTime = AbsoluteTime.fromProtocolTimestamp(cur.collection_time); + const collectionTime = AbsoluteTime.fromProtocolTimestamp( + cur.collection_time, + ); if (AbsoluteTime.cmp(when, collectionTime) <= 0) { return prev; } - - const formValues = cur.attributes ?? {} + + const formValues = cur.attributes ?? {}; Object.keys(formValues).forEach((field) => { const value = (formValues as Record<string, unknown>)[field]; prev.kyc[field] = { diff --git a/packages/aml-backoffice-ui/src/components/ShowDecisionLimitInfo.tsx b/packages/aml-backoffice-ui/src/components/ShowDecisionLimitInfo.tsx @@ -4,9 +4,14 @@ import { h, VNode, Fragment } from "preact"; import { useState } from "preact/hooks"; import { RulesInfo } from "./RulesInfo.js"; - export function ShowDecisionLimitInfo({ - rules, since, until, startOpen, justification, fixed, measure, + rules, + since, + until, + startOpen, + justification, + fixed, + measure, }: { since: AbsoluteTime; until: AbsoluteTime; @@ -79,12 +84,14 @@ export function ShowDecisionLimitInfo({ <path stroke-linecap="round" stroke-linejoin="round" - d="m19.5 8.25-7.5 7.5-7.5-7.5" /> + d="m19.5 8.25-7.5 7.5-7.5-7.5" + /> ) : ( <path stroke-linecap="round" stroke-linejoin="round" - d="m4.5 15.75 7.5-7.5 7.5 7.5" /> + d="m4.5 15.75 7.5-7.5 7.5 7.5" + /> )} </svg> </div> diff --git a/packages/aml-backoffice-ui/src/components/UnlockAccount.tsx b/packages/aml-backoffice-ui/src/components/UnlockAccount.tsx @@ -50,12 +50,9 @@ export function UnlockAccount(): VNode { const design = unlockAccountForm(i18n); - const { model: handler, status } = useForm<FormType>( - design, - { - password: undefined, - }, - ); + const { model: handler, status } = useForm<FormType>(design, { + password: undefined, + }); const unlockHandler = status.status === "fail" || officer.state !== "locked" diff --git a/packages/aml-backoffice-ui/src/context/ui-settings.ts b/packages/aml-backoffice-ui/src/context/ui-settings.ts @@ -14,7 +14,13 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { buildCodecForObject, canonicalizeBaseUrl, Codec, codecForString, codecOptional } from "@gnu-taler/taler-util"; +import { + buildCodecForObject, + canonicalizeBaseUrl, + Codec, + codecForString, + codecOptional, +} from "@gnu-taler/taler-util"; import { ComponentChildren, createContext, h, VNode } from "preact"; import { useContext } from "preact/hooks"; @@ -106,5 +112,3 @@ function buildDefaultBackendBaseURL(): string | undefined { } throw Error("No default URL"); } - - diff --git a/packages/aml-backoffice-ui/src/hooks/decision-request.ts b/packages/aml-backoffice-ui/src/hooks/decision-request.ts @@ -80,7 +80,7 @@ export interface DecisionRequest { /** * Errors on the properties */ - properties_errors : object | undefined; + properties_errors: object | undefined; /** * If given all the information, this account need to be investigated */ diff --git a/packages/aml-backoffice-ui/src/hooks/transfers.ts b/packages/aml-backoffice-ui/src/hooks/transfers.ts @@ -89,11 +89,11 @@ type Direction = "credit" | "debit" | "kyc-auth"; export function useTransferList({ direction, threshold, - account + account, }: { direction?: "credit" | "debit" | "kyc-auth"; threshold?: AmountJson; - account?: PaytoHash + account?: PaytoHash; } = {}) { const officer = useOfficer(); const session = officer.state === "ready" ? officer.account : undefined; @@ -108,7 +108,7 @@ export function useTransferList({ string, Direction, AmountJson | undefined, - PaytoHash | undefined + PaytoHash | undefined, ]) { switch (direction) { case "credit": { @@ -117,7 +117,7 @@ export function useTransferList({ offset, limit: PAGINATED_LIST_REQUEST, threshold, - account + account, }); } case "debit": { @@ -126,7 +126,7 @@ export function useTransferList({ offset, limit: PAGINATED_LIST_REQUEST, threshold, - account + account, }); } case "kyc-auth": { @@ -135,7 +135,7 @@ export function useTransferList({ offset, limit: PAGINATED_LIST_REQUEST, threshold, - account + account, }); } } diff --git a/packages/aml-backoffice-ui/src/index.html b/packages/aml-backoffice-ui/src/index.html @@ -15,28 +15,31 @@ @author Sebastian Javier Marchano --> -<!DOCTYPE html> +<!doctype html> <html lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width,initial-scale=1" /> + <meta name="taler-support" content="uri" /> + <meta name="mobile-web-app-capable" content="yes" /> + <meta name="apple-mobile-web-app-capable" content="yes" /> + <meta + http-equiv="Content-Security-Policy" + content="default-src 'none'; script-src 'self'; connect-src *; img-src 'self' data:; style-src 'self';font-src 'self';base-uri 'self';form-action 'self'" + /> + <link + rel="icon" + href="data:;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////7//v38//78/P/+/fz//vz7///+/v/+/f3//vz7///+/v/+/fz//v38///////////////////////+/v3///7+/////////////////////////////////////////////////////////v3//v79///////+/v3///////r28v/ct5//06SG/9Gffv/Xqo7/7N/V/9e2nf/bsJb/6uDW/9Sskf/euKH/+/j2///////+/v3//////+3azv+/eE3/2rWd/9Kkhv/Vr5T/48i2/8J+VP/Qn3//3ryn/795Tf/WrpP/2LCW/8B6T//w4Nb///////Pn4P+/d0v/9u3n/+7d0v/EhV7//v///+HDr//fxLD/zph2/+TJt//8/Pv/woBX//Lm3f/y5dz/v3hN//bu6f/JjGn/4sW0///////Df1j/8OLZ//v6+P+/elH/+vj1//jy7f+/elL//////+zYzP/Eg13//////967p//MlHT/wn5X///////v4Nb/yY1s///////jw7H/06KG////////////z5t9/+fNvf//////x4pn//Pp4v/8+vn/w39X/8WEX///////5s/A/9CbfP//////27Oc/9y2n////////////9itlf/gu6f//////86Vdf/r2Mz//////8SCXP/Df1j//////+7d0v/KkG7//////+HBrf/VpYr////////////RnoH/5sq6///////Ii2n/8ubf//39/P/Cf1j/xohk/+bNvv//////wn5W//Tq4//58/D/wHxV//7+/f/59fH/v3xU//39/P/w4Nf/xIFb///////hw7H/yo9t/+/f1f/AeU3/+/n2/+nSxP/FhmD//////9qzm//Upon/4MSx/96+qf//////xINc/+3bz//48e3/v3hN//Pn3///////6M+//752S//gw6//06aK/8J+VP/kzLr/zZd1/8OCWv/q18r/17KZ/9Ooi//fv6r/v3dK/+vWyP///////v39///////27un/1aeK/9Opjv/m1cf/1KCC/9a0nP/n08T/0Jx8/82YdP/QnHz/16yR//jx7P///////v39///////+/f3///7+///////+//7//v7+///////+/v7//v/+/////////////////////////v7//v79///////////////////+/v/+/Pv//v39///+/v/+/Pv///7+//7+/f/+/Pv//v39//79/P/+/Pv///7+////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + /> + <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" /> + <title>Exchange Backoffice</title> + <!-- Entry point for the SPA. --> + <script type="module" src="index.js"></script> + <link rel="stylesheet" href="index.css" /> + </head> -<head> - <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width,initial-scale=1" /> - <meta name="taler-support" content="uri"> - <meta name="mobile-web-app-capable" content="yes" /> - <meta name="apple-mobile-web-app-capable" content="yes" /> - <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; connect-src *; img-src 'self' data:; style-src 'self';font-src 'self';base-uri 'self';form-action 'self'"> - <link rel="icon" - href="data:;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////7//v38//78/P/+/fz//vz7///+/v/+/f3//vz7///+/v/+/fz//v38///////////////////////+/v3///7+/////////////////////////////////////////////////////////v3//v79///////+/v3///////r28v/ct5//06SG/9Gffv/Xqo7/7N/V/9e2nf/bsJb/6uDW/9Sskf/euKH/+/j2///////+/v3//////+3azv+/eE3/2rWd/9Kkhv/Vr5T/48i2/8J+VP/Qn3//3ryn/795Tf/WrpP/2LCW/8B6T//w4Nb///////Pn4P+/d0v/9u3n/+7d0v/EhV7//v///+HDr//fxLD/zph2/+TJt//8/Pv/woBX//Lm3f/y5dz/v3hN//bu6f/JjGn/4sW0///////Df1j/8OLZ//v6+P+/elH/+vj1//jy7f+/elL//////+zYzP/Eg13//////967p//MlHT/wn5X///////v4Nb/yY1s///////jw7H/06KG////////////z5t9/+fNvf//////x4pn//Pp4v/8+vn/w39X/8WEX///////5s/A/9CbfP//////27Oc/9y2n////////////9itlf/gu6f//////86Vdf/r2Mz//////8SCXP/Df1j//////+7d0v/KkG7//////+HBrf/VpYr////////////RnoH/5sq6///////Ii2n/8ubf//39/P/Cf1j/xohk/+bNvv//////wn5W//Tq4//58/D/wHxV//7+/f/59fH/v3xU//39/P/w4Nf/xIFb///////hw7H/yo9t/+/f1f/AeU3/+/n2/+nSxP/FhmD//////9qzm//Upon/4MSx/96+qf//////xINc/+3bz//48e3/v3hN//Pn3///////6M+//752S//gw6//06aK/8J+VP/kzLr/zZd1/8OCWv/q18r/17KZ/9Ooi//fv6r/v3dK/+vWyP///////v39///////27un/1aeK/9Opjv/m1cf/1KCC/9a0nP/n08T/0Jx8/82YdP/QnHz/16yR//jx7P///////v39///////+/f3///7+///////+//7//v7+///////+/v7//v/+/////////////////////////v7//v79///////////////////+/v/+/Pv//v39///+/v/+/Pv///7+//7+/f/+/Pv//v39//79/P/+/Pv///7+////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" /> - <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" /> - <title>Exchange Backoffice</title> - <!-- Entry point for the SPA. --> - <script type="module" src="index.js"></script> - <link rel="stylesheet" href="index.css" /> -</head> - -<body> - <div id="app"></div> -</body> - + <body> + <div id="app"></div> + </body> </html> diff --git a/packages/aml-backoffice-ui/src/index.tsx b/packages/aml-backoffice-ui/src/index.tsx @@ -19,7 +19,7 @@ import { h, render } from "preact"; const app = document.getElementById("app"); if (!app) { - console.error("could not found app element") + console.error("could not found app element"); } else { render(<App />, app); } diff --git a/packages/aml-backoffice-ui/src/pages/AccountDetails.tsx b/packages/aml-backoffice-ui/src/pages/AccountDetails.tsx @@ -50,7 +50,10 @@ import { import { format } from "date-fns"; import { Fragment, h, Ref, VNode } from "preact"; import { ErrorLoadingWithDebug } from "../components/ErrorLoadingWithDebug.js"; -import { CurrentMeasureTable, MeasureInfo } from "../components/MeasuresTable.js"; +import { + CurrentMeasureTable, + MeasureInfo, +} from "../components/MeasuresTable.js"; import { useAccountInformation } from "../hooks/account.js"; import { DecisionRequest } from "../hooks/decision-request.js"; import { useAccountDecisions } from "../hooks/decisions.js"; @@ -989,4 +992,3 @@ const FREEZE_RULES: (currency: string) => TalerExchangeApi.KycRule[] = ( is_and_combinator: true, }, ]; - diff --git a/packages/aml-backoffice-ui/src/pages/AccountList.tsx b/packages/aml-backoffice-ui/src/pages/AccountList.tsx @@ -307,7 +307,6 @@ export const SearchIcon = () => ( </svg> ); - let latestTimeout: undefined | ReturnType<typeof setTimeout> = undefined; function JumpByIdForm({ @@ -332,21 +331,21 @@ function JumpByIdForm({ if (latestTimeout) { clearTimeout(latestTimeout); } - setError(undefined) - setValid(false) + setError(undefined); + setValid(false); latestTimeout = setTimeout(async function checkAccouunt() { - let found = false + let found = false; try { const result = await lib.exchange.getAmlAttributesForAccount( activeSession, account, { limit: 1 }, ); - found = (result.type === "ok"); + found = result.type === "ok"; } catch (e) { - console.log(e) + console.log(e); } - setValid(found) + setValid(found); if (!found) { setError(i18n.str`account not found`); } diff --git a/packages/aml-backoffice-ui/src/pages/Dashboard.tsx b/packages/aml-backoffice-ui/src/pages/Dashboard.tsx @@ -21,14 +21,14 @@ import { GLS_AmlEventsName, TalerCorebankApi, TalerError, - TranslatedString + TranslatedString, } from "@gnu-taler/taler-util"; import { InternationalizationAPI, Loading, RouteDefinition, useExchangeApiContext, - useTranslationContext + useTranslationContext, } from "@gnu-taler/web-util/browser"; import { format } from "date-fns"; import { Fragment, h, VNode } from "preact"; @@ -227,7 +227,7 @@ function descriptionForEvent( return descriptionForEvent_tops(name as any, i18n); case AmlSpaDialect.GLS: return descriptionForEvent_tops(name as any, i18n); - // return descriptionForEvent_gls(name as GLS_AmlEventsName, i18n); + // return descriptionForEvent_gls(name as GLS_AmlEventsName, i18n); case AmlSpaDialect.TESTING: return descriptionForEvent_tops(name as any, i18n); default: { @@ -377,7 +377,6 @@ function MetricValueNumber({ ); } - function getDateStringForTimeframe( date: AbsoluteTime, timeframe: TalerCorebankApi.MonitorTimeframeParam, diff --git a/packages/aml-backoffice-ui/src/pages/DecisionWizard.tsx b/packages/aml-backoffice-ui/src/pages/DecisionWizard.tsx @@ -81,7 +81,9 @@ export function isAttributesCompleted(request: DecisionRequest): boolean { ); } export function isPropertiesCompleted(request: DecisionRequest): boolean { - return request.properties !== undefined && request.properties_errors === undefined; + return ( + request.properties !== undefined && request.properties_errors === undefined + ); } export function isEventsCompleted(request: DecisionRequest): boolean { return request.custom_events !== undefined; diff --git a/packages/aml-backoffice-ui/src/pages/Search.tsx b/packages/aml-backoffice-ui/src/pages/Search.tsx @@ -73,10 +73,7 @@ export function Search({ type: "single-column", fields: paytoTypeField(i18n), }; - const paytoForm = useForm<FormPayto>( - design, - { paytoType: "iban" }, - ); + const paytoForm = useForm<FormPayto>(design, { paytoType: "iban" }); return ( <div> diff --git a/packages/aml-backoffice-ui/src/pages/ShowCollectedInfo.tsx b/packages/aml-backoffice-ui/src/pages/ShowCollectedInfo.tsx @@ -18,7 +18,7 @@ import { assertUnreachable, HttpStatusCode, TalerError, - TalerFormAttributes + TalerFormAttributes, } from "@gnu-taler/taler-util"; import { Attention, diff --git a/packages/aml-backoffice-ui/src/pages/Transfers.tsx b/packages/aml-backoffice-ui/src/pages/Transfers.tsx @@ -6,7 +6,7 @@ import { encodeCrock, hashNormalizedPaytoUri, HttpStatusCode, - PaytoHash + PaytoHash, } from "@gnu-taler/taler-util"; import { Attention, @@ -146,26 +146,25 @@ export function Transfers({ return ( <div class="px-4 mt-8"> <div class="sm:flex sm:items-center"> - <div class="sm:flex-auto"> - {searchingForAnAccount ? ( - <h1 class="text-base font-semibold leading-6 text-gray-900"> - <i18n.Translate>Transfers history for account</i18n.Translate> - {' '} - <a - href={routeToAccountById.url({ - cid: account, - })} - class="text-indigo-600 hover:text-indigo-900 font-mono" - > - {account} - </a> - </h1> - ) : ( - <h1 class="text-base font-semibold leading-6 text-gray-900"> - <i18n.Translate>Transfers history</i18n.Translate> - </h1> - )} - </div> + <div class="sm:flex-auto"> + {searchingForAnAccount ? ( + <h1 class="text-base font-semibold leading-6 text-gray-900"> + <i18n.Translate>Transfers history for account</i18n.Translate>{" "} + <a + href={routeToAccountById.url({ + cid: account, + })} + class="text-indigo-600 hover:text-indigo-900 font-mono" + > + {account} + </a> + </h1> + ) : ( + <h1 class="text-base font-semibold leading-6 text-gray-900"> + <i18n.Translate>Transfers history</i18n.Translate> + </h1> + )} + </div> </div> <FormUI design={design} model={form.model} /> @@ -210,8 +209,7 @@ export function Transfers({ <div class="sm:flex-auto"> {searchingForAnAccount ? ( <h1 class="text-base font-semibold leading-6 text-gray-900"> - <i18n.Translate>Transfers history for account</i18n.Translate> - {' '} + <i18n.Translate>Transfers history for account</i18n.Translate>{" "} <a href={routeToAccountById.url({ cid: account, @@ -406,4 +404,3 @@ export function Transfers({ </div> ); } - diff --git a/packages/aml-backoffice-ui/src/pages/decision/Measures.tsx b/packages/aml-backoffice-ui/src/pages/decision/Measures.tsx @@ -99,7 +99,7 @@ export function Measures({}: {}): VNode { {!allMeasures.length ? undefined : ( <ActiveMeasureForm editMeasure={(template) => { - template.name! + template.name!; setAddMeasure({ isNew: true, template, @@ -230,18 +230,22 @@ function ActiveMeasureForm({ check: ver.measure.check_name, context: !ver.measure.context ? [] - : Object.entries(ver.measure.context).map(([key, value]) => ({ - key, - type: "json", - value: JSON.stringify(value), - })), + : Object.entries(ver.measure.context).map( + ([key, value]) => ({ + key, + type: "json", + value: JSON.stringify(value), + }), + ), name: ver.name, program: ver.measure.prog_name, }); }} class="m-4 rounded-md w-fit border-0 px-3 py-2 text-center text-sm bg-indigo-700 text-white shadow-sm hover:bg-indigo-700 disabled:bg-gray-600" > - <i18n.Translate>Configure verfication measure: "{ver.name}" </i18n.Translate> + <i18n.Translate> + Configure verfication measure: "{ver.name}"{" "} + </i18n.Translate> </button> ); })} @@ -366,7 +370,7 @@ type SimpleCheckMeasure = { type VerifyMeasure = { type: "verify-template"; name: string; - measure: MeasureInformation, + measure: MeasureInformation; challengeType: "email" | "phone" | "postal"; }; diff --git a/packages/aml-backoffice-ui/src/pages/decision/Summary.tsx b/packages/aml-backoffice-ui/src/pages/decision/Summary.tsx @@ -16,11 +16,14 @@ import { Button, useExchangeApiContext, useLocalNotificationHandler, - useTranslationContext + useTranslationContext, } from "@gnu-taler/web-util/browser"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { CurrentMeasureTable, Mesaures } from "../../components/MeasuresTable.js"; +import { + CurrentMeasureTable, + Mesaures, +} from "../../components/MeasuresTable.js"; import { ShowDecisionLimitInfo } from "../../components/ShowDecisionLimitInfo.js"; import { useCurrentDecisionRequest } from "../../hooks/decision-request.js"; import { useOfficer } from "../../hooks/officer.js"; @@ -225,7 +228,6 @@ export function Summary({ return ( <Fragment> - {INVALID_RULES ? ( <Fragment> {!decision.deadline && ( @@ -383,4 +385,3 @@ function workaround_defaultProgramName( } return measures; } - 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:1180/", "signupEmail": "do-not-contact-me@exchange.taler.test" -} -\ No newline at end of file +} diff --git a/packages/aml-backoffice-ui/src/utils/computeAvailableMesaures.ts b/packages/aml-backoffice-ui/src/utils/computeAvailableMesaures.ts @@ -1,11 +1,10 @@ import type { TalerExchangeApi } from "@gnu-taler/taler-util"; import { MeasureInfo, Mesaures } from "../components/MeasuresTable.js"; - export function computeAvailableMesaures( serverMeasures: TalerExchangeApi.AvailableMeasureSummary | undefined, // customMeasures?: Readonly<CustomMeasures>, - skpiFilter?: (m: MeasureInfo) => boolean + skpiFilter?: (m: MeasureInfo) => boolean, ): Mesaures { const init: Mesaures = { forms: [], procedures: [], info: [] }; if (!serverMeasures) { @@ -42,7 +41,7 @@ export function computeAvailableMesaures( } else { if (!value.prog_name) { console.error( - `ERROR: program name can't be empty for measure "${key}"` + `ERROR: program name can't be empty for measure "${key}"`, ); return prev; } @@ -59,7 +58,7 @@ export function computeAvailableMesaures( } return prev; }, - init + init, ); return server;