feat: add sparepart management page and update routing in App component

This commit is contained in:
2025-11-24 12:17:31 +07:00
parent 7d2b18a94d
commit 899695f548
3 changed files with 413 additions and 11 deletions

View File

@@ -10,13 +10,15 @@ import Home from './pages/home/Home';
import Blank from './pages/blank/Blank';
// Master
import IndexDevice from './pages/master/device/IndexDevice';
import IndexTag from './pages/master/tag/IndexTag';
import IndexUnit from './pages/master/unit/IndexUnit';
import IndexPlantSubSection from './pages/master/plantSubSection/IndexPlantSubSection';
import IndexBrandDevice from './pages/master/brandDevice/IndexBrandDevice';
import IndexDevice from './pages/master/device/IndexDevice';
import IndexUnit from './pages/master/unit/IndexUnit';
import IndexTag from './pages/master/tag/IndexTag';
import IndexStatus from './pages/master/status/IndexStatus';
import IndexSparepart from './pages/master/sparepart/IndexSparepart';
import IndexShift from './pages/master/shift/IndexShift';
// Brand device
// Brand device
import AddBrandDevice from './pages/master/brandDevice/AddBrandDevice';
import EditBrandDevice from './pages/master/brandDevice/EditBrandDevice';
import ViewBrandDevice from './pages/master/brandDevice/ViewBrandDevice';
@@ -48,7 +50,6 @@ import SvgAirDryerB from './pages/home/SvgAirDryerB';
import SvgAirDryerC from './pages/home/SvgAirDryerC';
import IndexHistoryAlarm from './pages/history/alarm/IndexHistoryAlarm';
import IndexHistoryEvent from './pages/history/event/IndexHistoryEvent';
import IndexPlantSubSection from './pages/master/plantSubSection/IndexPlantSubSection';
const App = () => {
return (
@@ -59,9 +60,14 @@ const App = () => {
<Route path="/signin" element={<SignIn />} />
<Route path="/signup" element={<SignUp />} />
<Route path="/svg" element={<SvgTest />} />
<Route path="/detail-notification/:notificationId" element={<DetailNotificationTab />} />
<Route path="/verification-sparepart/:notificationId" element={<IndexVerificationSparepart />} />
<Route
path="/detail-notification/:notificationId"
element={<DetailNotificationTab />}
/>
<Route
path="/verification-sparepart/:notificationId"
element={<IndexVerificationSparepart />}
/>
{/* Protected Routes */}
<Route path="/dashboard" element={<ProtectedRoute />}>
@@ -84,13 +90,23 @@ const App = () => {
<Route path="device" element={<IndexDevice />} />
<Route path="tag" element={<IndexTag />} />
<Route path="unit" element={<IndexUnit />} />
<Route path="sparepart" element={<IndexSparepart />} />
<Route path="brand-device" element={<IndexBrandDevice />} />
<Route path="brand-device/add" element={<AddBrandDevice />} />
<Route path="brand-device/edit/:id" element={<EditBrandDevice />} />
<Route path="brand-device/view/:id" element={<ViewBrandDevice />} />
<Route path="brand-device/edit/:id/files/:fileType/:fileName" element={<ViewFilePage />} />
<Route path="brand-device/view/:id/files/:fileType/:fileName" element={<ViewFilePage />} />
<Route path="brand-device/view/temp/files/:fileName" element={<ViewFilePage />} />
<Route
path="brand-device/edit/:id/files/:fileType/:fileName"
element={<ViewFilePage />}
/>
<Route
path="brand-device/view/:id/files/:fileType/:fileName"
element={<ViewFilePage />}
/>
<Route
path="brand-device/view/temp/files/:fileName"
element={<ViewFilePage />}
/>
<Route path="plant-sub-section" element={<IndexPlantSubSection />} />
<Route path="shift" element={<IndexShift />} />
<Route path="status" element={<IndexStatus />} />