Feature/faaliyat rozane cartable
This commit is contained in:
11
src/app/(withAuth)/dashboard/road-items/operator/page.js
Normal file
11
src/app/(withAuth)/dashboard/road-items/operator/page.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import WithPermission from "@/core/middlewares/withPermission";
|
||||
import OperatorPage from "@/components/dashboard/roadItems/operator";
|
||||
const Page = () => {
|
||||
return (
|
||||
<WithPermission permission_name={["create-road-item"]}>
|
||||
<OperatorPage />
|
||||
</WithPermission>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
13
src/app/(withAuth)/dashboard/road-items/supervisor/page.js
Normal file
13
src/app/(withAuth)/dashboard/road-items/supervisor/page.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import WithPermission from "@/core/middlewares/withPermission";
|
||||
import SupervisorPage from "@/components/dashboard/roadItems/supervisor";
|
||||
const Page = () => {
|
||||
return (
|
||||
<WithPermission
|
||||
permission_name={["show-road-item-supervise-cartable", "show-road-item-supervise-cartable-province"]}
|
||||
>
|
||||
<SupervisorPage />
|
||||
</WithPermission>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
import WithAuthMiddleware from "@/core/middlewares/withAuth";
|
||||
import LoadingHardPage from "@/core/components/LoadingHardPage";
|
||||
import { useAuth } from "@/lib/contexts/auth";
|
||||
import { Typography, Stack } from "@mui/material";
|
||||
import WithAuthMiddleware from "@/core/middlewares/withAuth";
|
||||
import LoadingHardPage from "@/core/components/LoadingHardPage";
|
||||
|
||||
const Layout = ({ children }) => {
|
||||
const { isAuth, initAuthState, errorState } = useAuth();
|
||||
|
||||
84
src/app/api/fake-road-items/operator/route.js
Normal file
84
src/app/api/fake-road-items/operator/route.js
Normal file
@@ -0,0 +1,84 @@
|
||||
const data = [
|
||||
{
|
||||
id: 1,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
},
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 0, // Replace with actual status
|
||||
car_id: 1,
|
||||
person_id: [0, 1, 2],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
},
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 2, // Replace with actual status
|
||||
car_id: 10,
|
||||
person_id: [10, 11, 12],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 0, // Replace with actual status
|
||||
car_id: 11,
|
||||
person_id: [20, 15, 29],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 1, // Replace with actual status
|
||||
car_id: 26,
|
||||
person_id: [78, 18, 56],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
];
|
||||
|
||||
export async function GET() {
|
||||
return new Response(JSON.stringify({ data }), {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
}
|
||||
84
src/app/api/fake-road-items/supervisor/route.js
Normal file
84
src/app/api/fake-road-items/supervisor/route.js
Normal file
@@ -0,0 +1,84 @@
|
||||
const data = [
|
||||
{
|
||||
id: 1,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 0, // Replace with actual status
|
||||
car_id: 1,
|
||||
person_id: [0, 1, 2],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 2, // Replace with actual status
|
||||
car_id: 10,
|
||||
person_id: [10, 11, 12],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 0, // Replace with actual status
|
||||
car_id: 11,
|
||||
person_id: [20, 15, 29],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
province: "تهران",
|
||||
office: "اداره کل",
|
||||
action_item: "بررسی خودرو", // Replace with the correct label
|
||||
observed_subject: "تنظیم سطح بستر حریم", // Replace with the correct label
|
||||
value: "1 کیلومتر", // Replace with actual value
|
||||
images: {
|
||||
before: "https://cdn-icons-png.flaticon.com/512/783/783154.png",
|
||||
after: "https://cdn-icons-png.flaticon.com/512/1651/1651833.png",
|
||||
}, // Add URLs to images if needed
|
||||
location: [{ lat: 35.6892, lng: 51.389 }], // Add URLs to images if needed
|
||||
register_date: "2024-11-03T11:01:14.000000Z",
|
||||
start_date: "2024-11-02T11:48:22.000000Z",
|
||||
status: 1, // Replace with actual status
|
||||
car_id: 26,
|
||||
person_id: [78, 18, 56],
|
||||
description: "بررسی شد", // Replace with actual description
|
||||
},
|
||||
];
|
||||
|
||||
export async function GET() {
|
||||
return new Response(JSON.stringify({ data }), {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user