aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/pages/Cases.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages/Cases.tsx')
-rw-r--r--packages/aml-backoffice-ui/src/pages/Cases.tsx16
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/Cases.tsx b/packages/aml-backoffice-ui/src/pages/Cases.tsx
index 2e92c111e..f66eca33f 100644
--- a/packages/aml-backoffice-ui/src/pages/Cases.tsx
+++ b/packages/aml-backoffice-ui/src/pages/Cases.tsx
@@ -24,7 +24,9 @@ import {
ErrorLoading,
InputChoiceHorizontal,
Loading,
- useTranslationContext
+ UIHandlerId,
+ amlStateConverter,
+ useTranslationContext,
} from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import { useEffect, useState } from "preact/hooks";
@@ -55,6 +57,7 @@ export function CasesUI({
const { i18n } = useTranslationContext();
const [form, status] = useFormState<FormType>(
+ [".state"] as Array<UIHandlerId>,
{
state: filter,
},
@@ -106,18 +109,19 @@ export function CasesUI({
name="state"
label={i18n.str`Filter`}
handler={form.state}
+ converter={amlStateConverter}
choices={[
{
label: i18n.str`Pending`,
- value: TalerExchangeApi.AmlState.pending,
+ value: "pending",
},
{
label: i18n.str`Frozen`,
- value: TalerExchangeApi.AmlState.frozen,
+ value: "frozen",
},
{
label: i18n.str`Normal`,
- value: TalerExchangeApi.AmlState.normal,
+ value: "normal",
},
]}
/>
@@ -234,7 +238,7 @@ export function Cases() {
<Fragment>
<Attention type="danger" title={i18n.str`Operation denied`}>
<i18n.Translate>
- This account doesnt have access. Request account activation
+ This account doesn't have access. Request account activation
sending your public key.
</i18n.Translate>
</Attention>
@@ -269,7 +273,7 @@ export function Cases() {
onNext={list.isLastPage ? undefined : list.loadNext}
filter={stateFilter}
onChangeFilter={(d) => {
- setStateFilter(d)
+ setStateFilter(d);
}}
/>
);