wallet-core/packages/aml-backoffice-ui/src/pages.ts

56 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-05-18 17:48:01 +02:00
import { Home } from "./pages/Home.js";
import { Settings } from "./pages/Settings.js";
2023-05-19 01:32:20 +02:00
import { AntiMoneyLaunderingForm } from "./pages/AntiMoneyLaunderingForm.js";
2023-05-18 17:48:01 +02:00
import { Welcome } from "./pages/Welcome.js";
import { PageEntry, pageDefinition } from "./route.js";
2023-05-19 01:32:20 +02:00
import { Officer } from "./pages/Officer.js";
import { Cases } from "./pages/Cases.js";
2023-05-26 21:52:30 +02:00
import { CaseDetails } from "./pages/CaseDetails.js";
import { NewFormEntry } from "./pages/NewFormEntry.js";
2023-05-18 17:48:01 +02:00
const home: PageEntry = {
url: "#/",
view: Home,
};
const cases: PageEntry = {
url: "#/cases",
view: Cases,
};
const account: PageEntry<{ account: string }> = {
url: pageDefinition("#/account/:account"),
2023-05-26 21:52:30 +02:00
view: CaseDetails,
};
const newFormEntry: PageEntry<{ account?: string; type?: string }> = {
url: pageDefinition("#/account/:account/new/:type?"),
view: NewFormEntry,
2023-05-19 01:32:20 +02:00
};
2023-05-18 17:48:01 +02:00
const settings: PageEntry = {
url: "#/settings",
view: Settings,
};
2023-05-19 01:32:20 +02:00
const officer: PageEntry = {
url: "#/officer",
view: Officer,
};
2023-05-18 17:48:01 +02:00
const welcome: PageEntry<{ asd?: string; name?: string }> = {
url: pageDefinition("#/welcome/:name?"),
view: Welcome,
};
const form: PageEntry<{ number?: string }> = {
url: pageDefinition("#/form/:number?"),
2023-05-19 01:32:20 +02:00
view: AntiMoneyLaunderingForm,
2023-05-18 17:48:01 +02:00
};
export const Pages = {
home,
info: cases,
officer,
details: account,
settings,
welcome,
form,
newFormEntry,
};