From 860e4216cdaf3e3bfb50ec1d9d285d34b6af5470 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 16 Nov 2023 15:38:27 -0300 Subject: some fixes and examples --- packages/aml-backoffice-ui/src/Dashboard.tsx | 43 ++-- packages/aml-backoffice-ui/src/forms/902_11e.ts | 1 - packages/aml-backoffice-ui/src/forms/902_1e.ts | 1 - packages/aml-backoffice-ui/src/forms/902_4e.ts | 3 +- packages/aml-backoffice-ui/src/forms/simplest.ts | 3 +- .../aml-backoffice-ui/src/handlers/InputDate.tsx | 11 +- packages/aml-backoffice-ui/src/pages.ts | 17 +- .../src/pages/AntiMoneyLaunderingForm.stories.tsx | 94 +++++++++ .../src/pages/AntiMoneyLaunderingForm.tsx | 72 +++++-- .../aml-backoffice-ui/src/pages/CaseDetails.tsx | 226 ++------------------- packages/aml-backoffice-ui/src/pages/Cases.tsx | 26 ++- .../src/pages/HandleAccountNotReady.tsx | 10 +- .../aml-backoffice-ui/src/pages/NewFormEntry.tsx | 51 +---- .../src/pages/ShowConsolidated.stories.tsx | 60 ++++++ .../src/pages/ShowConsolidated.tsx | 204 +++++++++++++++++++ .../aml-backoffice-ui/src/pages/UnlockAccount.tsx | 7 +- .../aml-backoffice-ui/src/pages/index.stories.ts | 2 + packages/aml-backoffice-ui/src/route.ts | 14 +- packages/aml-backoffice-ui/src/stories.test.ts | 4 +- packages/aml-backoffice-ui/src/stories.tsx | 7 +- 20 files changed, 533 insertions(+), 323 deletions(-) create mode 100644 packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.stories.tsx create mode 100644 packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx create mode 100644 packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx create mode 100644 packages/aml-backoffice-ui/src/pages/index.stories.ts diff --git a/packages/aml-backoffice-ui/src/Dashboard.tsx b/packages/aml-backoffice-ui/src/Dashboard.tsx index 5d86836d4..d111ae145 100644 --- a/packages/aml-backoffice-ui/src/Dashboard.tsx +++ b/packages/aml-backoffice-ui/src/Dashboard.tsx @@ -1,17 +1,12 @@ -import { Footer, GlobalNotificationsBanner, Header, LangSelector, notifyError, notifyException, useNotifications, useTranslationContext } from "@gnu-taler/web-util/browser"; -import { Dialog, Transition } from "@headlessui/react"; -import { UserIcon, XCircleIcon } from "@heroicons/react/20/solid"; -import { CheckCircleIcon, XMarkIcon } from "@heroicons/react/24/outline"; -import { InformationCircleIcon } from "@heroicons/react/24/solid"; -import { ComponentChildren, Fragment, VNode, h } from "preact"; -import { useEffect, useErrorBoundary, useState } from "preact/hooks"; -import logo from "./assets/logo-2021.svg"; -import { Pages } from "./pages.js"; -import { PageEntry, Router, useCurrentLocation } from "./route.js"; -import { uiSettings } from "./settings.js"; import { TranslatedString } from "@gnu-taler/taler-util"; +import { Footer, GlobalNotificationsBanner, Header, notifyError, notifyException, useTranslationContext } from "@gnu-taler/web-util/browser"; +import { ComponentChildren, Fragment, VNode, h } from "preact"; +import { useEffect, useErrorBoundary } from "preact/hooks"; import { useOfficer } from "./hooks/useOfficer.js"; import { getAllBooleanSettings, getLabelForSetting, useSettings } from "./hooks/useSettings.js"; +import { Pages } from "./pages.js"; +import { PageEntry, useChangeLocation, useCurrentLocation } from "./route.js"; +import { uiSettings } from "./settings.js"; function classNames(...classes: string[]) { return classes.filter(Boolean).join(" "); @@ -101,7 +96,7 @@ function LeftMenu() { "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold", )} > -