debug refahi province manager
This commit is contained in:
@@ -37,7 +37,7 @@ const Confirm = ({rowId, fetchUrl, mutate}) => {
|
||||
},
|
||||
onSubmit: (values, {setSubmitting}) => {
|
||||
const formData = new FormData();
|
||||
if (values.description != "") formData.append("expert_description", values.description);
|
||||
if (values.description != "") formData.append("description", values.description);
|
||||
if (values.confirm_img != null) formData.append("attachment", values.confirm_img);
|
||||
|
||||
requestServer(`${CONFIRM_REFAHI_PROVINCE_MANAGER}/${rowId}`, 'post', {
|
||||
|
||||
@@ -43,7 +43,7 @@ const Reject = ({rowId, fetchUrl, mutate}) => {
|
||||
validationSchema,
|
||||
onSubmit: (values, {setSubmitting}) => {
|
||||
const formData = new FormData();
|
||||
formData.append("expert_description", values.description);
|
||||
formData.append("description", values.description);
|
||||
if (values.reject_img != null) formData.append("attachment", values.reject_img);
|
||||
|
||||
requestServer(`${REJECT_REFAHI_PROVINCE_MANAGER}/${rowId}`, 'post', {
|
||||
|
||||
@@ -227,7 +227,7 @@ function DashboardRefahiProvinceManagerComponent() {
|
||||
enableHiding={true}
|
||||
enableFullScreenToggle={false}
|
||||
enableGlobalFilter={false}
|
||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||
enableRowActions={true}
|
||||
TableRowAction={TableRowActions}
|
||||
/>
|
||||
|
||||
@@ -54,7 +54,7 @@ export const CONFIRM_MACHINARY_OFFICE =
|
||||
|
||||
export const REJECT_MACHINARY_OFFICE =
|
||||
BASE_URL + "/dashboard/machinery_expert/reject";
|
||||
//passenger office
|
||||
//machinary office
|
||||
|
||||
//commercial chief
|
||||
export const GET_COMMERCIAL_CHIEF =
|
||||
|
||||
@@ -7,6 +7,8 @@ import DesktopWindowsIcon from "@mui/icons-material/DesktopWindows";
|
||||
import GavelIcon from '@mui/icons-material/Gavel';
|
||||
import BusinessCenterIcon from '@mui/icons-material/BusinessCenter';
|
||||
import GradingIcon from '@mui/icons-material/Grading';
|
||||
import SupervisedUserCircleIcon from '@mui/icons-material/SupervisedUserCircle';
|
||||
import Diversity3Icon from '@mui/icons-material/Diversity3';
|
||||
|
||||
const sidebarMenu = [
|
||||
[
|
||||
@@ -63,13 +65,20 @@ const sidebarMenu = [
|
||||
role: "province_manager",
|
||||
},
|
||||
{
|
||||
key: "sidebar.refahi-province-manager",
|
||||
secondary: "secondary.refahi-province-manager",
|
||||
key: "sidebar.province-head-expert",
|
||||
type: "page",
|
||||
route: "/dashboard/refahi-province-manager",
|
||||
icon: <DesktopWindowsIcon/>,
|
||||
route: "/dashboard/province-head-expert",
|
||||
icon: <GavelIcon/>,
|
||||
selected: false,
|
||||
role: "province_manager",
|
||||
role: "province_head_expert",
|
||||
},
|
||||
{
|
||||
key: "sidebar.inspector-expert",
|
||||
type: "page",
|
||||
route: "/dashboard/inspector-expert",
|
||||
icon: <GradingIcon/>,
|
||||
selected: false,
|
||||
role: "inspector_expert",
|
||||
},
|
||||
{
|
||||
key: "sidebar.commercial-chief",
|
||||
@@ -83,25 +92,18 @@ const sidebarMenu = [
|
||||
key: "sidebar.development-assistant",
|
||||
type: "page",
|
||||
route: "/dashboard/development-assistant",
|
||||
icon: <DesktopWindowsIcon/>,
|
||||
icon: <Diversity3Icon/>,
|
||||
selected: false,
|
||||
role: "development_assistant",
|
||||
},
|
||||
{
|
||||
key: "sidebar.inspector-expert",
|
||||
key: "sidebar.refahi-province-manager",
|
||||
secondary: "secondary.refahi-province-manager",
|
||||
type: "page",
|
||||
route: "/dashboard/inspector-expert",
|
||||
icon: <GradingIcon/>,
|
||||
route: "/dashboard/refahi-province-manager",
|
||||
icon: <SupervisedUserCircleIcon/>,
|
||||
selected: false,
|
||||
role: "inspector_expert",
|
||||
},
|
||||
{
|
||||
key: "sidebar.province-head-expert",
|
||||
type: "page",
|
||||
route: "/dashboard/province-head-expert",
|
||||
icon: <GavelIcon/>,
|
||||
selected: false,
|
||||
role: "province_head_expert",
|
||||
role: "province_manager",
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
@@ -4,7 +4,7 @@ import {parse} from "next-useragent";
|
||||
import DashboardRefahiProvinceManagerComponent from "@/components/dashboard/refahi-province-manager";
|
||||
|
||||
const requiredPermissions = ["province_manager"];
|
||||
export default function PassengerOffice() {
|
||||
export default function RefahiProvinceManager() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
||||
|
||||
Reference in New Issue
Block a user