Переглянути джерело

update nav bar

feature/axios_provider
MSI\derek 6 місяці тому
джерело
коміт
087222cea0
9 змінених файлів з 276 додано та 76 видалено
  1. +0
    -0
      src/app/(main)/NotInUse/page.tsx
  2. +20
    -0
      src/app/(main)/masterData/user/page.tsx
  3. +5
    -5
      src/app/(main)/material/page.tsx
  4. +47
    -0
      src/app/(main)/production/page.tsx
  5. +0
    -11
      src/app/(main)/staffReimbursement/ClaimApproval/page.tsx
  6. +0
    -11
      src/app/(main)/staffReimbursement/ClaimSummary/page.tsx
  7. +0
    -21
      src/app/(main)/staffReimbursement/create/page.tsx
  8. +203
    -27
      src/components/NavigationContent/NavigationContent.tsx
  9. +1
    -1
      src/middleware.ts

src/app/(main)/homeX/page.tsx → src/app/(main)/NotInUse/page.tsx Переглянути файл


+ 20
- 0
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 (
<I18nProvider namespaces={["dashboard"]}>
<Typography variant="h4" marginInlineEnd={2}>
User
</Typography>
<></>
{/* <CompanyTeamCashFlowComponent /> */}
</I18nProvider>
);
};
export default User;

src/app/(main)/staffReimbursement/page.tsx → 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}
>
<Typography variant="h4" marginInlineEnd={2}>
{t("Staff Reimbursement")}
{t("Material")}
</Typography>
<Button
variant="contained"
startIcon={<Add />}
LinkComponent={Link}
href="/staffReimbursement/create"
href="/material/create"
>
{t("Create Claim")}
</Button>
@@ -44,4 +44,4 @@ const StaffReimbursement: React.FC = async () => {
);
};

export default StaffReimbursement;
export default material;

+ 47
- 0
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 (
<>
<Stack
direction="row"
justifyContent="space-between"
flexWrap="wrap"
rowGap={2}
>
<Typography variant="h4" marginInlineEnd={2}>
{t("Production")}
</Typography>
<Button
variant="contained"
startIcon={<Add />}
LinkComponent={Link}
href="/production/create"
>
{t("Create Claim")}
</Button>
</Stack>
<Suspense fallback={<ClaimSearch.Loading />}>
<ClaimSearch />
</Suspense>
</>
);
};

export default production;

+ 0
- 11
src/app/(main)/staffReimbursement/ClaimApproval/page.tsx Переглянути файл

@@ -1,11 +0,0 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Claim",
};

const Claim: React.FC = async () => {
return "Claim";
};

export default Claim;

+ 0
- 11
src/app/(main)/staffReimbursement/ClaimSummary/page.tsx Переглянути файл

@@ -1,11 +0,0 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Claim",
};

const Claim: React.FC = async () => {
return "Claim";
};

export default Claim;

+ 0
- 21
src/app/(main)/staffReimbursement/create/page.tsx Переглянути файл

@@ -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 (
<>
<Typography variant="h4">{t("Create Claim")}</Typography>
<CreateClaim />
</>
);
};

export default CreateClaims;

+ 203
- 27
src/components/NavigationContent/NavigationContent.tsx Переглянути файл

@@ -32,61 +32,237 @@ interface NavigationItem {
}

const navigationItems: NavigationItem[] = [
// { icon: <WorkHistory />, label: "User Workspace", path: "/home" },
{
icon: <Dashboard />,
label: "Dashboard",
path: "",
children: [
// {
// icon: <SummarizeIcon />,
// label: "Project Financial Summary",
// path: "/dashboard/ProjectFinancialSummary",
// },
// {
// icon: <PaymentsIcon />,
// label: "Company / Team Cash Flow",
// path: "/dashboard/CompanyTeamCashFlow",
// },
// {
// icon: <PaymentsIcon />,
// label: "Project Cash Flow",
// path: "/dashboard/ProjectCashFlow",
// },
// {
// icon: <AccountTreeIcon />,
// label: "Project Status by Client",
// path: "/dashboard/ProjectStatusByClient",
// },
// {
// icon: <PeopleIcon />,
// label: "Staff Utilization",
// path: "/dashboard/StaffUtilization",
// },
],
},
{
icon: <RequestQuote />,
label: "Raw Material",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Purchase Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Pick Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Cons. Pick Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Delivery Pick Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Warehouse",
path: "",
},
{
icon: <RequestQuote />,
label: "Location Transfer Order",
path: "",
},
{
icon: <RequestQuote />,
label: "View item In-out And invertory Ledger",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Production",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Job Order",
path: "",
},
{
icon: <SummarizeIcon />,
label: "Project Financial Summary",
path: "/dashboard/ProjectFinancialSummary",
icon: <RequestQuote />,
label: "Job Order Traceablity ",
path: "",
},
{
icon: <PaymentsIcon />,
label: "Company / Team Cash Flow",
path: "/dashboard/CompanyTeamCashFlow",
icon: <RequestQuote />,
label: "Work Order",
path: "",
},
{
icon: <PaymentsIcon />,
label: "Project Cash Flow",
path: "/dashboard/ProjectCashFlow",
icon: <RequestQuote />,
label: "Work Order Traceablity ",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
children: [
{
icon: <AccountTreeIcon />,
label: "Project Status by Client",
path: "/dashboard/ProjectStatusByClient",
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Delivery",
path: "",
children: [
{
icon: <PeopleIcon />,
label: "Staff Utilization",
path: "/dashboard/StaffUtilization",
icon: <RequestQuote />,
label: "Delivery Order",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Staff Reimbursement",
path: "/staffReimbursement",
label: "Report",
path: "",
children: [
{
icon: <RequestQuote />,
label: "ClaimApproval",
path: "/staffReimbursement/ClaimApproval",
label: "report",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Recipe",
path: "",
children: [
{
icon: <RequestQuote />,
label: "FG Recipe",
path: "",
},
{
icon: <RequestQuote />,
label: "SFG Recipe",
path: "",
},
{
icon: <RequestQuote />,
label: "Recipe",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Master Data",
path: "",
children: [
{
icon: <RequestQuote />,
label: "User",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "User Group",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Material",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Maintain By-product",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Finished Goods",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Equipment Type",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Equipment",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Warehouse",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Supplier",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "Customer",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "QC Check Item",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "QC Category",
path: "/masterData/user",
},
{
icon: <RequestQuote />,
label: "ClaimSummary",
path: "/staffReimbursement/ClaimSummary",
label: "QC Check Template",
path: "/masterData/user",
},
],
},
{ icon: <Assignment />, label: "Project Management", path: "/projects" },
{ icon: <Task />, label: "Task Template", path: "/tasks" },
{ icon: <Payments />, label: "Invoice", path: "/invoice" },
{ icon: <Analytics />, label: "Analysis Report", path: "/analytics" },
{ icon: <Settings />, label: "Setting", path: "/settings" },
];

const NavigationContent: React.FC = () => {


+ 1
- 1
src/middleware.ts Переглянути файл

@@ -10,7 +10,7 @@ const PRIVATE_ROUTES = [
"/projects",
"/tasks",
"/settings",
"/staffReimbursement",
"/material",
];
const LANG_QUERY_PARAM = "lang";



Завантаження…
Відмінити
Зберегти