diff --git a/packages/exchange-backoffice-ui/src/Dashboard.tsx b/packages/exchange-backoffice-ui/src/Dashboard.tsx index 9be86c533..9f4a43513 100644 --- a/packages/exchange-backoffice-ui/src/Dashboard.tsx +++ b/packages/exchange-backoffice-ui/src/Dashboard.tsx @@ -23,39 +23,14 @@ import { useMemoryStorage, useNotifications, } from "@gnu-taler/web-util/browser"; - -/** - * references between forms - * - * 902.1e - * --> 902.11 (operational legal entity or partnership) - * --> 902.12 (a foundation) - * --> 902.13 (a trust) - * --> 902.15 (life insurance policy) - * --> 902.9 (all other cases) - * --> 902.5 (cash transaction with no customer profile) - * --> 902.4 (risk profile) - * - * 902.11 - * --> 902.9 (beneficial owner in fiduciary holding assets) - * - * 902.12 - * - * 902.13 - * - * 902.15 - * - * 902.9 - * - * 902.5 - * - * 902.4 - */ - -const userNavigation = [ - { name: "Your profile", href: "#" }, - { name: "Sign out", href: "#" }, -]; +import { + AbsoluteTime, + Codec, + buildCodecForObject, + codecForAbsoluteTime, + codecForString, +} from "@gnu-taler/taler-util"; +import logo from "./assets/logo-2021.svg"; function classNames(...classes: string[]) { return classes.filter(Boolean).join(" "); @@ -153,7 +128,7 @@ function LeftMenu() { )} aria-hidden="true" /> - Info + Cases
  • @@ -175,7 +150,7 @@ function LeftMenu() { )} aria-hidden="true" /> - Officer + Account
  • @@ -203,7 +178,7 @@ function LeftMenu() { */} -
  • + {/*
  • Settings -
  • + */} ); @@ -237,26 +212,18 @@ export function Dashboard({ }): VNode { const [sidebarOpen, setSidebarOpen] = useState(false); - const logRef = useRef(null); - function showFormOnSidebar(v: any) { - if (!logRef.current) return; - logRef.current.innerHTML = JSON.stringify(v, undefined, 1); - } return (
    - Taler +
    +

    + Exchange AML Backoffice +

    +
    -
    -
    
    -          
    @@ -362,123 +329,193 @@ function NavigationBar({ ); } +export interface Officer { + salt: string; + when: AbsoluteTime; + key: string; +} + +export const codecForOfficer = (): Codec => + buildCodecForObject() + .property("salt", codecForString()) // FIXME + .property("when", codecForAbsoluteTime) // FIXME + .property("key", codecForString()) + .build("Officer"); + function TopBar({ onOpenSidebar }: { onOpenSidebar: () => void }) { const password = useMemoryStorage("password"); - const officer = useLocalStorage("officer"); + const officer = useLocalStorage("officer", { + codec: codecForOfficer(), + }); return ( -
    - - - {/* Separator */} -