From 087222cea07e7fb83592071038ba2e58d3fb7d80 Mon Sep 17 00:00:00 2001 From: "MSI\\derek" Date: Fri, 28 Feb 2025 11:36:41 +0800 Subject: [PATCH] update nav bar --- src/app/(main)/{homeX => NotInUse}/page.tsx | 0 src/app/(main)/masterData/user/page.tsx | 20 ++ .../{staffReimbursement => material}/page.tsx | 10 +- src/app/(main)/production/page.tsx | 47 ++++ .../staffReimbursement/ClaimApproval/page.tsx | 11 - .../staffReimbursement/ClaimSummary/page.tsx | 11 - .../(main)/staffReimbursement/create/page.tsx | 21 -- .../NavigationContent/NavigationContent.tsx | 230 ++++++++++++++++-- src/middleware.ts | 2 +- 9 files changed, 276 insertions(+), 76 deletions(-) rename src/app/(main)/{homeX => NotInUse}/page.tsx (100%) create mode 100644 src/app/(main)/masterData/user/page.tsx rename src/app/(main)/{staffReimbursement => material}/page.tsx (84%) create mode 100644 src/app/(main)/production/page.tsx delete mode 100644 src/app/(main)/staffReimbursement/ClaimApproval/page.tsx delete mode 100644 src/app/(main)/staffReimbursement/ClaimSummary/page.tsx delete mode 100644 src/app/(main)/staffReimbursement/create/page.tsx diff --git a/src/app/(main)/homeX/page.tsx b/src/app/(main)/NotInUse/page.tsx similarity index 100% rename from src/app/(main)/homeX/page.tsx rename to src/app/(main)/NotInUse/page.tsx diff --git a/src/app/(main)/masterData/user/page.tsx b/src/app/(main)/masterData/user/page.tsx new file mode 100644 index 0000000..1cfb841 --- /dev/null +++ b/src/app/(main)/masterData/user/page.tsx @@ -0,0 +1,20 @@ +import { Metadata } from "next"; +import { I18nProvider } from "@/i18n"; +import Typography from "@mui/material/Typography"; + +export const metadata: Metadata = { + title: "Project Status by Client", +}; + +const User: React.FC = () => { + return ( + + + User + + <> + {/* */} + + ); +}; +export default User; diff --git a/src/app/(main)/staffReimbursement/page.tsx b/src/app/(main)/material/page.tsx similarity index 84% rename from src/app/(main)/staffReimbursement/page.tsx rename to src/app/(main)/material/page.tsx index 1a1afcf..a83f0ec 100644 --- a/src/app/(main)/staffReimbursement/page.tsx +++ b/src/app/(main)/material/page.tsx @@ -13,9 +13,9 @@ export const metadata: Metadata = { title: "Claims", }; -const StaffReimbursement: React.FC = async () => { +const material: React.FC = async () => { const { t } = await getServerI18n("claims"); - preloadClaims(); +// preloadClaims(); return ( <> @@ -26,13 +26,13 @@ const StaffReimbursement: React.FC = async () => { rowGap={2} > - {t("Staff Reimbursement")} + {t("Material")} @@ -44,4 +44,4 @@ const StaffReimbursement: React.FC = async () => { ); }; -export default StaffReimbursement; +export default material; diff --git a/src/app/(main)/production/page.tsx b/src/app/(main)/production/page.tsx new file mode 100644 index 0000000..180b348 --- /dev/null +++ b/src/app/(main)/production/page.tsx @@ -0,0 +1,47 @@ +import { preloadClaims } from "@/app/api/claims"; +import ClaimSearch from "@/components/ClaimSearch"; +import { getServerI18n } from "@/i18n"; +import Add from "@mui/icons-material/Add"; +import Button from "@mui/material/Button"; +import Stack from "@mui/material/Stack"; +import Typography from "@mui/material/Typography"; +import { Metadata } from "next"; +import Link from "next/link"; +import { Suspense } from "react"; + +export const metadata: Metadata = { + title: "Claims", +}; + +const production: React.FC = async () => { + const { t } = await getServerI18n("claims"); +// preloadClaims(); + + return ( + <> + + + {t("Production")} + + + + }> + + + + ); +}; + +export default production; diff --git a/src/app/(main)/staffReimbursement/ClaimApproval/page.tsx b/src/app/(main)/staffReimbursement/ClaimApproval/page.tsx deleted file mode 100644 index 9388d1a..0000000 --- a/src/app/(main)/staffReimbursement/ClaimApproval/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Metadata } from "next"; - -export const metadata: Metadata = { - title: "Claim", -}; - -const Claim: React.FC = async () => { - return "Claim"; -}; - -export default Claim; diff --git a/src/app/(main)/staffReimbursement/ClaimSummary/page.tsx b/src/app/(main)/staffReimbursement/ClaimSummary/page.tsx deleted file mode 100644 index 9388d1a..0000000 --- a/src/app/(main)/staffReimbursement/ClaimSummary/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Metadata } from "next"; - -export const metadata: Metadata = { - title: "Claim", -}; - -const Claim: React.FC = async () => { - return "Claim"; -}; - -export default Claim; diff --git a/src/app/(main)/staffReimbursement/create/page.tsx b/src/app/(main)/staffReimbursement/create/page.tsx deleted file mode 100644 index eafce4f..0000000 --- a/src/app/(main)/staffReimbursement/create/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import CreateClaim from "@/components/CreateClaim"; -import { getServerI18n } from "@/i18n"; -import Typography from "@mui/material/Typography"; -import { Metadata } from "next"; - -export const metadata: Metadata = { - title: "Create Claim", -}; - -const CreateClaims: React.FC = async () => { - const { t } = await getServerI18n("claims"); - - return ( - <> - {t("Create Claim")} - - - ); -}; - -export default CreateClaims; diff --git a/src/components/NavigationContent/NavigationContent.tsx b/src/components/NavigationContent/NavigationContent.tsx index 769baa8..8818c05 100644 --- a/src/components/NavigationContent/NavigationContent.tsx +++ b/src/components/NavigationContent/NavigationContent.tsx @@ -32,61 +32,237 @@ interface NavigationItem { } const navigationItems: NavigationItem[] = [ - // { icon: , label: "User Workspace", path: "/home" }, { icon: , label: "Dashboard", path: "", children: [ + // { + // icon: , + // label: "Project Financial Summary", + // path: "/dashboard/ProjectFinancialSummary", + // }, + // { + // icon: , + // label: "Company / Team Cash Flow", + // path: "/dashboard/CompanyTeamCashFlow", + // }, + // { + // icon: , + // label: "Project Cash Flow", + // path: "/dashboard/ProjectCashFlow", + // }, + // { + // icon: , + // label: "Project Status by Client", + // path: "/dashboard/ProjectStatusByClient", + // }, + // { + // icon: , + // label: "Staff Utilization", + // path: "/dashboard/StaffUtilization", + // }, + ], + }, + { + icon: , + label: "Raw Material", + path: "", + children: [ + { + icon: , + label: "Purchase Order", + path: "", + }, + { + icon: , + label: "Pick Order", + path: "", + }, + { + icon: , + label: "Cons. Pick Order", + path: "", + }, + { + icon: , + label: "Delivery Pick Order", + path: "", + }, + { + icon: , + label: "Warehouse", + path: "", + }, + { + icon: , + label: "Location Transfer Order", + path: "", + }, + { + icon: , + label: "View item In-out And invertory Ledger", + path: "", + }, + ], + }, + { + icon: , + label: "Production", + path: "", + children: [ + { + icon: , + label: "Job Order", + path: "", + }, { - icon: , - label: "Project Financial Summary", - path: "/dashboard/ProjectFinancialSummary", + icon: , + label: "Job Order Traceablity ", + path: "", }, { - icon: , - label: "Company / Team Cash Flow", - path: "/dashboard/CompanyTeamCashFlow", + icon: , + label: "Work Order", + path: "", }, { - icon: , - label: "Project Cash Flow", - path: "/dashboard/ProjectCashFlow", + icon: , + label: "Work Order Traceablity ", + path: "", }, + ], + }, + { + icon: , + label: "Quality Control Log", + path: "", + children: [ { - icon: , - label: "Project Status by Client", - path: "/dashboard/ProjectStatusByClient", + icon: , + label: "Quality Control Log", + path: "", }, + ], + }, + { + icon: , + label: "Delivery", + path: "", + children: [ { - icon: , - label: "Staff Utilization", - path: "/dashboard/StaffUtilization", + icon: , + label: "Delivery Order", + path: "", }, ], }, { icon: , - label: "Staff Reimbursement", - path: "/staffReimbursement", + label: "Report", + path: "", children: [ { icon: , - label: "ClaimApproval", - path: "/staffReimbursement/ClaimApproval", + label: "report", + path: "", + }, + ], + }, + { + icon: , + label: "Recipe", + path: "", + children: [ + { + icon: , + label: "FG Recipe", + path: "", + }, + { + icon: , + label: "SFG Recipe", + path: "", + }, + { + icon: , + label: "Recipe", + path: "", + }, + ], + }, + { + icon: , + label: "Master Data", + path: "", + children: [ + { + icon: , + label: "User", + path: "/masterData/user", + }, + { + icon: , + label: "User Group", + path: "/masterData/user", + }, + { + icon: , + label: "Material", + path: "/masterData/user", + }, + { + icon: , + label: "Maintain By-product", + path: "/masterData/user", + }, + { + icon: , + label: "Finished Goods", + path: "/masterData/user", + }, + { + icon: , + label: "Equipment Type", + path: "/masterData/user", + }, + { + icon: , + label: "Equipment", + path: "/masterData/user", + }, + { + icon: , + label: "Warehouse", + path: "/masterData/user", + }, + { + icon: , + label: "Supplier", + path: "/masterData/user", + }, + { + icon: , + label: "Customer", + path: "/masterData/user", + }, + { + icon: , + label: "QC Check Item", + path: "/masterData/user", + }, + { + icon: , + label: "QC Category", + path: "/masterData/user", }, { icon: , - label: "ClaimSummary", - path: "/staffReimbursement/ClaimSummary", + label: "QC Check Template", + path: "/masterData/user", }, ], }, - { icon: , label: "Project Management", path: "/projects" }, - { icon: , label: "Task Template", path: "/tasks" }, - { icon: , label: "Invoice", path: "/invoice" }, - { icon: , label: "Analysis Report", path: "/analytics" }, - { icon: , label: "Setting", path: "/settings" }, ]; const NavigationContent: React.FC = () => { diff --git a/src/middleware.ts b/src/middleware.ts index 85204dd..f97f81e 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -10,7 +10,7 @@ const PRIVATE_ROUTES = [ "/projects", "/tasks", "/settings", - "/staffReimbursement", + "/material", ]; const LANG_QUERY_PARAM = "lang";