diff options
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages/Cases.tsx')
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/Cases.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/Cases.tsx b/packages/aml-backoffice-ui/src/pages/Cases.tsx index 5f79db71e..624f2c985 100644 --- a/packages/aml-backoffice-ui/src/pages/Cases.tsx +++ b/packages/aml-backoffice-ui/src/pages/Cases.tsx @@ -4,17 +4,16 @@ import { VNode, h } from "preact"; import { useState } from "preact/hooks"; import { createNewForm } from "../handlers/forms.js"; import { useCases } from "../hooks/useCases.js"; -import { useOfficer } from "../hooks/useOfficer.js"; import { Pages } from "../pages.js"; import { AmlExchangeBackend } from "../types.js"; import { amlStateConverter } from "./CaseDetails.js"; +import { Officer } from "./Officer.js"; export function Cases() { const { i18n } = useTranslationContext(); const form = createNewForm<{ state: AmlExchangeBackend.AmlState }>(); - const initial = AmlExchangeBackend.AmlState.pending; const [stateFilter, setStateFilter] = useState(initial); @@ -23,16 +22,15 @@ export function Cases() { if (!list) { return <Loading /> } - if (list instanceof TalerError) { return <ErrorLoading error={list} /> } if (list.data.type === "fail") { switch (list.data.case) { - case "unauthorized": - case "officer-not-found": - case "officer-disabled": return <div /> + case "unauthorized": return <Officer /> + case "officer-not-found": return <Officer /> + case "officer-disabled": return <Officer /> default: assertUnreachable(list.data) } } @@ -116,7 +114,7 @@ export function Cases() { <td class="whitespace-nowrap px-3 py-5 text-sm text-gray-500 "> <div class="text-gray-900"> <a - href={Pages.details.url({ account: r.h_payto })} + href={Pages.account.url({ account: r.h_payto })} class="text-indigo-600 hover:text-indigo-900" > {r.h_payto} |