2025-11-11 18:57:04 +00:00
|
|
|
import type { ModuleClientParams } from "@erp/core/client";
|
2025-06-11 15:13:44 +00:00
|
|
|
import { lazy } from "react";
|
2025-11-11 18:57:04 +00:00
|
|
|
import { Outlet, type RouteObject } from "react-router-dom";
|
2025-06-11 15:13:44 +00:00
|
|
|
|
2025-11-17 10:26:54 +00:00
|
|
|
const ProformaLayout = lazy(() =>
|
|
|
|
|
import("./proformas/ui").then((m) => ({ default: m.ProformaLayout }))
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const IssuedInvoicesLayout = lazy(() =>
|
|
|
|
|
import("./issued-invoices/ui").then((m) => ({ default: m.IssuedInvoicesLayout }))
|
|
|
|
|
);
|
2025-11-16 21:11:46 +00:00
|
|
|
|
2025-11-17 10:26:54 +00:00
|
|
|
const ProformasListPage = lazy(() =>
|
2025-11-21 18:42:17 +00:00
|
|
|
import("./proformas/list").then((m) => ({ default: m.ProformaListPage }))
|
2025-06-11 15:13:44 +00:00
|
|
|
);
|
2025-06-24 18:38:57 +00:00
|
|
|
|
2025-11-17 10:26:54 +00:00
|
|
|
const IssuedInvoiceListPage = lazy(() =>
|
|
|
|
|
import("./issued-invoices/pages").then((m) => ({ default: m.IssuedInvoiceListPage }))
|
2025-11-12 17:22:05 +00:00
|
|
|
);
|
2025-06-24 18:38:57 +00:00
|
|
|
|
2025-11-17 10:26:54 +00:00
|
|
|
/*const CustomerInvoiceAdd = lazy(() =>
|
2025-06-24 18:38:57 +00:00
|
|
|
import("./pages").then((m) => ({ default: m.CustomerInvoiceCreate }))
|
|
|
|
|
);
|
2025-10-18 19:57:52 +00:00
|
|
|
const InvoiceUpdatePage = lazy(() =>
|
2025-10-12 10:43:06 +00:00
|
|
|
import("./pages").then((m) => ({ default: m.InvoiceUpdatePage }))
|
2025-11-17 10:26:54 +00:00
|
|
|
);*/
|
2025-06-11 15:13:44 +00:00
|
|
|
|
|
|
|
|
export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] => {
|
|
|
|
|
return [
|
2025-11-11 18:57:04 +00:00
|
|
|
{
|
|
|
|
|
path: "proformas",
|
|
|
|
|
element: (
|
2025-11-17 10:26:54 +00:00
|
|
|
<ProformaLayout>
|
2025-11-11 18:57:04 +00:00
|
|
|
<Outlet context={params} />
|
2025-11-17 10:26:54 +00:00
|
|
|
</ProformaLayout>
|
2025-11-11 18:57:04 +00:00
|
|
|
),
|
|
|
|
|
children: [
|
2025-11-17 10:26:54 +00:00
|
|
|
{ path: "", index: true, element: <ProformasListPage /> }, // index
|
|
|
|
|
{ path: "list", element: <ProformasListPage /> },
|
|
|
|
|
//{ path: "create", element: <CustomerInvoiceAdd /> },
|
|
|
|
|
//{ path: ":id/edit", element: <InvoiceUpdatePage /> },
|
2025-11-11 18:57:04 +00:00
|
|
|
],
|
|
|
|
|
},
|
2025-11-16 21:11:46 +00:00
|
|
|
{
|
2025-06-24 18:38:57 +00:00
|
|
|
path: "customer-invoices",
|
2025-06-11 15:13:44 +00:00
|
|
|
element: (
|
2025-11-17 10:26:54 +00:00
|
|
|
<IssuedInvoicesLayout>
|
2025-06-11 15:13:44 +00:00
|
|
|
<Outlet context={params} />
|
2025-11-17 10:26:54 +00:00
|
|
|
</IssuedInvoicesLayout>
|
2025-06-11 15:13:44 +00:00
|
|
|
),
|
|
|
|
|
children: [
|
2025-11-16 21:11:46 +00:00
|
|
|
{ path: "", index: true, element: <IssuedInvoiceListPage /> }, // index
|
|
|
|
|
{ path: "list", element: <IssuedInvoiceListPage /> },
|
|
|
|
|
/*
|
2025-11-13 11:49:36 +00:00
|
|
|
{ path: "create", element: <CustomerInvoicesList /> },
|
2025-06-11 15:13:44 +00:00
|
|
|
{ path: ":id", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/edit", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/delete", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/view", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/print", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/email", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/download", element: <CustomerInvoicesList /> },
|
|
|
|
|
{ path: ":id/duplicate", element: <CustomerInvoicesList /> },
|
2025-11-13 11:49:36 +00:00
|
|
|
{ path: ":id/preview", element: <CustomerInvoicesList /> },
|
2025-11-16 21:11:46 +00:00
|
|
|
*/
|
2025-06-11 15:13:44 +00:00
|
|
|
],
|
2025-11-16 21:11:46 +00:00
|
|
|
},
|
2025-06-11 15:13:44 +00:00
|
|
|
];
|
|
|
|
|
};
|