import { TalerError, TranslatedString, assertUnreachable } from "@gnu-taler/taler-util";
import { ErrorLoading, Loading, useTranslationContext } from "@gnu-taler/web-util/browser";
import { VNode, h } from "preact";
import { useState } from "preact/hooks";
import { createNewForm } from "../handlers/forms.js";
import { useCases } from "../hooks/useCases.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);
const list = useCases(stateFilter);
if (!list) {
return
A list of all the account with the status
Account Id | Status | Threshold |
---|---|---|
{((state: AmlExchangeBackend.AmlState): VNode => { switch (state) { case AmlExchangeBackend.AmlState.normal: { return ( Normal ); } case AmlExchangeBackend.AmlState.pending: { return ( Pending ); } case AmlExchangeBackend.AmlState.frozen: { return ( Frozen ); } } })(r.current_state)} | {r.threshold} |