added locations page
This commit is contained in:
1 parent
d8821a0199
commit
6a85c42fde
17 files changed
+2294
No files matched your search
@@ -157,6 +157,16 @@ const CardTypeCreatePage = lazy(() => import("@/pages/settings/card/cardTypesCre
|
||||
const CardTypesViewPage = lazy(() => import("@/pages/settings/card/cardTypesView"));
|
||||
const CardTypeEditPage = lazy(() => import("@/pages/settings/card/cardTypesEdit"));
|
||||
|
||||
const DistrictsPage = lazy(() => import("@/pages/settings/location/districts"));
|
||||
const DistrictCreatePage = lazy(() => import("@/pages/settings/location/districtsCreate"));
|
||||
const DistrictsViewPage = lazy(() => import("@/pages/settings/location/districtsView"));
|
||||
const DistrictEditPage = lazy(() => import("@/pages/settings/location/districtsEdit"));
|
||||
|
||||
const BranchesPage = lazy(() => import("@/pages/settings/location/branches"));
|
||||
const BranchCreatePage = lazy(() => import("@/pages/settings/location/branchesCreate"));
|
||||
const BranchesViewPage = lazy(() => import("@/pages/settings/location/branchesView"));
|
||||
const BranchEditPage = lazy(() => import("@/pages/settings/location/branchesEdit"));
|
||||
|
||||
function AuthGuard() {
|
||||
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
||||
if (!isAuthenticated) return <Navigate to="/login" replace />;
|
||||
@@ -901,6 +911,70 @@ export const router = createBrowserRouter([
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{ // Sidebar: /settings/location/districts
|
||||
path: "/settings/location/districts",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<DistrictsPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/districts/create",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<DistrictCreatePage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/districts/:id",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<DistrictsViewPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/districts/:id/edit",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<DistrictEditPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{ // Sidebar: /settings/location/branches
|
||||
path: "/settings/location/branches",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<BranchesPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/branches/create",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<BranchCreatePage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/branches/:id",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<BranchesViewPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/settings/location/branches/:id/edit",
|
||||
element: (
|
||||
<Suspense fallback={<PageLoader />}>
|
||||
<BranchEditPage />
|
||||
</Suspense>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user