import type { ModuleClientParams } from "@erp/core/client"; import { lazy } from "react"; import { Outlet, type RouteObject } from "react-router-dom"; const ProformasListPage = lazy(() => import("./proformas/list").then((m) => ({ default: m.ListProformasPage })) ); const ArchivedProformasListPage = lazy(() => import("./proformas/list").then((m) => ({ default: m.ListArchivedProformasPage })) ); const DeletedProformasListPage = lazy(() => import("./proformas/list").then((m) => ({ default: m.ListDeletedProformasPage })) ); const ProformasCreatePage = lazy(() => import("./proformas/create").then((m) => ({ default: m.ProformaCreatePage })) ); const ProformaUpdatePage = lazy(() => import("./proformas/update").then((m) => ({ default: m.ProformaUpdatePage })) ); const ProformaDetailPage = lazy(() => import("./proformas/detail").then((m) => ({ default: m.ProformaDetailPage })) ); const RecurringProformasListPage = lazy(() => import("./recurring-proformas").then((m) => ({ default: m.ListRecurringProformasPage })) ); const RecurringProformaCreatePage = lazy(() => import("./recurring-proformas").then((m) => ({ default: m.RecurringProformaCreatePage })) ); const RecurringProformaDetailPage = lazy(() => import("./recurring-proformas").then((m) => ({ default: m.RecurringProformaDetailPage })) ); const IssuedInvoiceListPage = lazy(() => import("./issued-invoices/list").then((m) => ({ default: m.ListIssuedInvoicesPage })) ); const IssuedInvoiceDetailPage = lazy(() => import("./issued-invoices/detail").then((m) => ({ default: m.IssuedInvoiceDetailPage })) ); const CompanyVerifactuSettingsPage = lazy(() => import("./settings/verifactu").then((m) => ({ default: m.CompanyVerifactuSettingsPage })) ); export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] => { return [ { path: "proformas", handle: { layout: "app-sidebar", protected: true, }, element: , children: [ { index: true, element: , }, { path: "list", element: , }, { path: "archived", element: , }, { path: "deleted", element: , }, ], }, { path: "proformas/create", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "proformas/:id/edit", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "proformas/:id", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "recurring-proformas", handle: { layout: "app-sidebar", protected: true, }, element: , }, { path: "recurring-proformas/archived", handle: { layout: "app-sidebar", protected: true, }, element: , }, { path: "recurring-proformas/create", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "recurring-proformas/:recurring_proforma_id", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "customer-invoices", handle: { layout: "app-sidebar", protected: true, }, element: , children: [ { path: "", index: true, element: }, // index { path: "list", element: }, /* { path: "create", element: }, { path: ":id", element: }, { path: ":id/delete", element: }, { path: ":id/view", element: }, { path: ":id/print", element: }, { path: ":id/email", element: }, { path: ":id/download", element: }, { path: ":id/duplicate", element: }, { path: ":id/preview", element: }, */ ], }, { path: "customer-invoices/:id", handle: { layout: "app-fullscreen", protected: true, }, element: , }, { path: "settings/billing/verifactu", handle: { layout: "app-sidebar", protected: true, }, element: , }, ]; };