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(() =>
|
2026-04-12 19:12:10 +00:00
|
|
|
import("./proformas/shared/ui").then((m) => ({ default: m.ProformaLayout }))
|
2025-11-17 10:26:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const ProformasListPage = lazy(() =>
|
2026-04-05 18:17:47 +00:00
|
|
|
import("./proformas/list").then((m) => ({ default: m.ListProformasPage }))
|
2025-06-11 15:13:44 +00:00
|
|
|
);
|
2025-06-24 18:38:57 +00:00
|
|
|
|
2026-07-29 20:40:38 +00:00
|
|
|
const ArchivedProformasListPage = lazy(() =>
|
|
|
|
|
import("./proformas/list").then((m) => ({ default: m.ListArchivedProformasPage }))
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const DeletedProformasListPage = lazy(() =>
|
|
|
|
|
import("./proformas/list").then((m) => ({ default: m.ListDeletedProformasPage }))
|
|
|
|
|
);
|
|
|
|
|
|
2026-06-29 09:13:10 +00:00
|
|
|
const ProformasCreatePage = lazy(() =>
|
2026-03-07 18:27:23 +00:00
|
|
|
import("./proformas/create").then((m) => ({ default: m.ProformaCreatePage }))
|
2026-06-29 09:13:10 +00:00
|
|
|
);
|
2025-06-24 18:38:57 +00:00
|
|
|
|
2026-04-07 19:44:51 +00:00
|
|
|
const ProformaUpdatePage = lazy(() =>
|
|
|
|
|
import("./proformas/update").then((m) => ({ default: m.ProformaUpdatePage }))
|
|
|
|
|
);
|
2025-06-11 15:13:44 +00:00
|
|
|
|
2026-07-30 19:04:26 +00:00
|
|
|
const ProformaDetailPage = lazy(() =>
|
|
|
|
|
import("./proformas/detail").then((m) => ({ default: m.ProformaDetailPage }))
|
|
|
|
|
);
|
|
|
|
|
|
2026-03-07 18:27:23 +00:00
|
|
|
const IssuedInvoicesLayout = lazy(() =>
|
2026-04-12 19:12:10 +00:00
|
|
|
import("./issued-invoices/shared/ui").then((m) => ({ default: m.IssuedInvoicesLayout }))
|
2026-03-07 18:27:23 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const IssuedInvoiceListPage = lazy(() =>
|
2026-04-12 17:44:56 +00:00
|
|
|
import("./issued-invoices/list").then((m) => ({ default: m.ListIssuedInvoicesPage }))
|
2026-03-07 18:27:23 +00:00
|
|
|
);
|
|
|
|
|
|
2026-08-11 15:25:17 +00:00
|
|
|
const IssuedInvoiceDetailPage = lazy(() =>
|
|
|
|
|
import("./issued-invoices/detail").then((m) => ({ default: m.IssuedInvoiceDetailPage }))
|
|
|
|
|
);
|
|
|
|
|
|
2026-08-12 11:31:31 +00:00
|
|
|
const CompanyVerifactuSettingsPage = lazy(() =>
|
|
|
|
|
import("./settings/verifactu").then((m) => ({ default: m.CompanyVerifactuSettingsPage }))
|
|
|
|
|
);
|
|
|
|
|
|
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",
|
2026-06-02 16:40:23 +00:00
|
|
|
handle: {
|
|
|
|
|
layout: "app-sidebar",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
2025-11-11 18:57:04 +00:00
|
|
|
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: [
|
2026-06-02 16:40:23 +00:00
|
|
|
{
|
|
|
|
|
index: true,
|
|
|
|
|
element: <ProformasListPage />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "list",
|
|
|
|
|
element: <ProformasListPage />,
|
|
|
|
|
},
|
2026-07-29 20:40:38 +00:00
|
|
|
{
|
|
|
|
|
path: "archived",
|
|
|
|
|
element: <ArchivedProformasListPage />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "deleted",
|
|
|
|
|
element: <DeletedProformasListPage />,
|
|
|
|
|
},
|
2025-11-11 18:57:04 +00:00
|
|
|
],
|
|
|
|
|
},
|
2026-06-02 16:40:23 +00:00
|
|
|
|
2026-06-29 09:13:10 +00:00
|
|
|
{
|
|
|
|
|
path: "proformas/create",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-fullscreen",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
|
|
|
|
element: (
|
|
|
|
|
<ProformaLayout>
|
|
|
|
|
<ProformasCreatePage />
|
|
|
|
|
</ProformaLayout>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
|
2026-06-02 16:40:23 +00:00
|
|
|
{
|
|
|
|
|
path: "proformas/:id/edit",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-fullscreen",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-06-25 11:49:59 +00:00
|
|
|
element: (
|
|
|
|
|
<ProformaLayout>
|
|
|
|
|
<ProformaUpdatePage />
|
|
|
|
|
</ProformaLayout>
|
|
|
|
|
),
|
2026-06-02 16:40:23 +00:00
|
|
|
},
|
|
|
|
|
|
2026-07-30 19:04:26 +00:00
|
|
|
{
|
|
|
|
|
path: "proformas/:id",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-fullscreen",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
|
|
|
|
element: (
|
|
|
|
|
<ProformaLayout>
|
|
|
|
|
<ProformaDetailPage />
|
|
|
|
|
</ProformaLayout>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
|
2025-11-16 21:11:46 +00:00
|
|
|
{
|
2025-06-24 18:38:57 +00:00
|
|
|
path: "customer-invoices",
|
2026-06-02 16:40:23 +00:00
|
|
|
handle: {
|
|
|
|
|
layout: "app-sidebar",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
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 /> },
|
2026-04-07 19:44:51 +00:00
|
|
|
|
2025-06-11 15:13:44 +00:00
|
|
|
{ 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
|
|
|
},
|
2026-08-11 15:25:17 +00:00
|
|
|
{
|
|
|
|
|
path: "customer-invoices/:id",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-fullscreen",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
|
|
|
|
element: (
|
|
|
|
|
<IssuedInvoicesLayout>
|
|
|
|
|
<IssuedInvoiceDetailPage />
|
|
|
|
|
</IssuedInvoicesLayout>
|
|
|
|
|
),
|
|
|
|
|
},
|
2026-08-12 11:31:31 +00:00
|
|
|
{
|
|
|
|
|
path: "settings/billing/verifactu",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-sidebar",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
|
|
|
|
element: <CompanyVerifactuSettingsPage />,
|
|
|
|
|
},
|
2025-06-11 15:13:44 +00:00
|
|
|
];
|
|
|
|
|
};
|