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 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-08-31 18:51:27 +00:00
|
|
|
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 }))
|
|
|
|
|
);
|
|
|
|
|
|
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,
|
|
|
|
|
},
|
2026-09-04 09:41:37 +00:00
|
|
|
element: <Outlet context={params} />,
|
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,
|
|
|
|
|
},
|
2026-09-04 09:41:37 +00:00
|
|
|
element: <ProformasCreatePage />,
|
2026-06-29 09:13:10 +00:00
|
|
|
},
|
|
|
|
|
|
2026-06-02 16:40:23 +00:00
|
|
|
{
|
|
|
|
|
path: "proformas/:id/edit",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-fullscreen",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-09-04 09:41:37 +00:00
|
|
|
element: <ProformaUpdatePage />,
|
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,
|
|
|
|
|
},
|
2026-09-04 09:41:37 +00:00
|
|
|
element: <ProformaDetailPage />,
|
2026-07-30 19:04:26 +00:00
|
|
|
},
|
2026-08-31 18:51:27 +00:00
|
|
|
{
|
|
|
|
|
path: "recurring-proformas",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-sidebar",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <RecurringProformasListPage />,
|
2026-08-31 18:51:27 +00:00
|
|
|
},
|
2026-09-02 10:04:05 +00:00
|
|
|
{
|
|
|
|
|
path: "recurring-proformas/archived",
|
|
|
|
|
handle: {
|
|
|
|
|
layout: "app-sidebar",
|
|
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <RecurringProformasListPage />,
|
2026-09-02 10:04:05 +00:00
|
|
|
},
|
2026-08-31 18:51:27 +00:00
|
|
|
{
|
|
|
|
|
path: "recurring-proformas/create",
|
|
|
|
|
handle: {
|
2026-09-01 07:16:52 +00:00
|
|
|
layout: "app-fullscreen",
|
2026-08-31 18:51:27 +00:00
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <RecurringProformaCreatePage />,
|
2026-08-31 18:51:27 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recurring-proformas/:recurring_proforma_id",
|
|
|
|
|
handle: {
|
2026-09-01 09:36:20 +00:00
|
|
|
layout: "app-fullscreen",
|
2026-08-31 18:51:27 +00:00
|
|
|
protected: true,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <RecurringProformaDetailPage />,
|
2026-08-31 18:51:27 +00:00
|
|
|
},
|
2026-07-30 19:04:26 +00:00
|
|
|
|
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,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <Outlet context={params} />,
|
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,
|
|
|
|
|
},
|
2026-09-04 09:53:59 +00:00
|
|
|
element: <IssuedInvoiceDetailPage />,
|
2026-08-11 15:25:17 +00:00
|
|
|
},
|
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
|
|
|
];
|
|
|
|
|
};
|