CEC-1256/CEC-1330 data logger for vehicles/fleets and details tabs for vehicles/fleets (#136)

* forms for fleet can filters

* unit tests for fleet filters

* removing warnings

* updating regex

* added fleet details page

* fleet pages

* smoothed out bugs

* fleets done

* working update, delete vehicles

* finished mocks, still need snapshots and context tests

* contexts done

* snapshot tests

* updating code smells

* smells
This commit is contained in:
Drew Taylor
2022-04-14 18:11:22 -07:00
committed by GitHub
parent afa3c1e529
commit 07f77cabdb
56 changed files with 5854 additions and 2208 deletions

View File

@@ -28,6 +28,7 @@ const ManifestCreate = React.lazy(() => import("../Manifest/Create"));
const PageNotFound = React.lazy(() => import("../404"));
const SSOForm = React.lazy(() => import("../SSOForm"));
const VehicleAddForm = React.lazy(() => import("../Cars/Add"));
const VehicleUpdateForm = React.lazy(() => import("../Cars/Update"))
const SiteRoutes = () => {
const { token, groups } = useUserContext();
@@ -120,7 +121,7 @@ const SiteRoutes = () => {
type={TYPES.PROTECTED}
token={token}
groups={groups}
roles={[Roles.READ, Roles.CREATE]}
roles={[Roles.CREATE]}
/>
<AuthRoute
path="/fleet-update"
@@ -128,7 +129,7 @@ const SiteRoutes = () => {
type={TYPES.PROTECTED}
token={token}
groups={groups}
roles={[Roles.READ, Roles.CREATE]}
roles={[Roles.CREATE]}
/>
<AuthRoute
path="/home"
@@ -200,6 +201,14 @@ const SiteRoutes = () => {
groups={groups}
roles={[Roles.READ, Roles.CREATE]}
/>
<AuthRoute
path="/vehicle-update"
render={() => <VehicleUpdateForm />}
type={TYPES.PROTECTED}
token={token}
groups={groups}
roles={[Roles.CREATE]}
/>
<PageNotFound />
</Switch>
</Suspense>