Просмотр исходного кода

update nav bar

feature/axios_provider
MSI\derek 6 месяцев назад
Родитель
Сommit
f22c50b617
3 измененных файлов: 223 добавлений и 236 удалений
  1. +2
    -0
      src/components/LoginPage/LoginForm.tsx
  2. +211
    -236
      src/components/NavigationContent/NavigationContent.tsx
  3. +10
    -0
      src/theme/devias-material-kit/components.ts

+ 2
- 0
src/components/LoginPage/LoginForm.tsx Просмотреть файл

@@ -32,6 +32,8 @@ const getHumanFriendlyErrorMessage = (
};

const LoginForm: React.FC = () => {
// clean abilities before login
window.localStorage.removeItem("abilities")
const { t } = useTranslation("login");
const {
register,


+ 211
- 236
src/components/NavigationContent/NavigationContent.tsx Просмотреть файл

@@ -1,6 +1,6 @@
import Divider from "@mui/material/Divider";
import Box from "@mui/material/Box";
import React from "react";
import React, { useEffect } from "react";
import List from "@mui/material/List";
import ListItemButton from "@mui/material/ListItemButton";
import ListItemText from "@mui/material/ListItemText";
@@ -29,243 +29,218 @@ interface NavigationItem {
label: string;
path: string;
children?: NavigationItem[];
isHidden?: true | undefined
}

const navigationItems: NavigationItem[] = [
{
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: <RequestQuote />,
label: "Job Order Traceablity ",
path: "",
},
{
icon: <RequestQuote />,
label: "Work Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Work Order Traceablity ",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Delivery",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Delivery Order",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Report",
path: "",
children: [
{
icon: <RequestQuote />,
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: "Settings",
path: "",
children: [
{
icon: <RequestQuote />,
label: "User",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "User Group",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Material",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Maintain By-product",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Finished Goods",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Equipment Type",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Equipment",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Warehouse",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Supplier",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Customer",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Check Item",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Category",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Check Template",
path: "/settings/user",
},
],
},
];

const NavigationContent: React.FC = () => {
// const abilities = window.localStorage.getItem("abilites")
// console.log(abilities)
const navigationItems: NavigationItem[] = [
{
icon: <Dashboard />,
label: "Dashboard",
path: "",
},
{
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: <RequestQuote />,
label: "Job Order Traceablity ",
path: "",
},
{
icon: <RequestQuote />,
label: "Work Order",
path: "",
},
{
icon: <RequestQuote />,
label: "Work Order Traceablity ",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Quality Control Log",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Delivery",
path: "",
children: [
{
icon: <RequestQuote />,
label: "Delivery Order",
path: "",
},
],
},
{
icon: <RequestQuote />,
label: "Report",
path: "",
children: [
{
icon: <RequestQuote />,
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: "Settings",
path: "",
children: [
{
icon: <RequestQuote />,
label: "User",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "User Group",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Material",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Maintain By-product",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Finished Goods",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Equipment Type",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Equipment",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Warehouse",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Supplier",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "Customer",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Check Item",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Category",
path: "/settings/user",
},
{
icon: <RequestQuote />,
label: "QC Check Template",
path: "/settings/user",
},
],
},
];
const { t } = useTranslation("common");
const pathname = usePathname();

@@ -297,7 +272,7 @@ const NavigationContent: React.FC = () => {
</ListItemButton>
{item.children && isOpen && (
<List sx={{ pl: 2 }}>
{item.children.map((child) => renderNavigationItem(child))}
{item.children.map((child) => (!child.isHidden && renderNavigationItem(child)))}
</List>
)}
</Box>


+ 10
- 0
src/theme/devias-material-kit/components.ts Просмотреть файл

@@ -172,6 +172,16 @@ const components: ThemeOptions["components"] = {
},
},
},
MuiAutocomplete: {
styleOverrides: {
root: {
"& .MuiFilledInput-root": {
paddingTop: 8,
paddingBottom: 8,
},
},
},
},
MuiFilledInput: {
styleOverrides: {
root: {


Загрузка…
Отмена
Сохранить