/*
This file is part of GNU Taler
(C) 2022-2024 Taler Systems S.A.
GNU Taler is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see
*/
import {
HttpStatusCode,
TalerError,
TalerExchangeApi,
assertUnreachable,
} from "@gnu-taler/taler-util";
import {
Attention,
Loading,
useTranslationContext,
} from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import {
useCurrentDecisions,
useCurrentDecisionsUnderInvestigation,
} from "../hooks/decisions.js";
import { privatePages } from "../Routing.js";
import { ErrorLoadingWithDebug } from "../components/ErrorLoadingWithDebug.js";
import { Officer } from "./Officer.js";
type FormType = {
// state: TalerExchangeApi.AmlState;
};
export function CasesUI({
records,
onFirstPage,
onNext,
filtered,
}: {
filtered: boolean;
onFirstPage?: () => void;
onNext?: () => void;
records: TalerExchangeApi.AmlDecision[];
}): VNode {
const { i18n } = useTranslationContext();
// const [form, status] = useFormState(
// [".state"] as Array,
// {
// // state: filter,
// },
// (state) => {
// const errors = undefinedIfEmpty>({
// state: state.state === undefined ? i18n.str`required` : undefined,
// });
// if (errors === undefined) {
// const result: FormType = {
// state: state.state!,
// };
// return {
// status: "ok",
// result,
// errors,
// };
// }
// const result: RecursivePartial = {
// state: state.state,
// };
// return {
// status: "fail",
// result,
// errors,
// };
// },
// );
// useEffect(() => {
// if (status.status === "ok" && filter !== status.result.state) {
// onChangeFilter(status.result.state);
// }
// }, [form?.state?.value]);
return (
{filtered ? (
Cases under investigation
A list of all the accounts which are waiting for a deicison to
be made.