diff --git a/apps/demo-app/src/components/AppRouter.tsx b/apps/demo-app/src/components/AppRouter.tsx index d04c57069..d641ac0bc 100644 --- a/apps/demo-app/src/components/AppRouter.tsx +++ b/apps/demo-app/src/components/AppRouter.tsx @@ -8,6 +8,8 @@ import { VehicleTypeSelectionPage, } from '../pages'; import { App } from './App'; +import { CaptureSelectionPage } from '../pages/CaptureSelectionPage'; +import { DamageDisclosurePage } from '../pages/DamageDisclosurePage'; export function AppRouter() { return ( @@ -34,6 +36,15 @@ export function AppRouter() { } index /> + + + + } + index + /> + + + + } + index + /> } /> diff --git a/apps/demo-app/src/local-config.json b/apps/demo-app/src/local-config.json index dd3cb92ed..4ca0c124f 100644 --- a/apps/demo-app/src/local-config.json +++ b/apps/demo-app/src/local-config.json @@ -15,6 +15,7 @@ "apiDomain": "api.preview.monk.ai/v1", "thumbnailDomain": "europe-west1-monk-preview-321715.cloudfunctions.net/image_resize", "enableSightTutorial": false, + "enableTutorial": "first_time_only", "startTasksOnComplete": true, "showCloseButton": false, "enforceOrientation": "landscape", diff --git a/apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.module.css b/apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.module.css new file mode 100644 index 000000000..e69de29bb diff --git a/apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.tsx b/apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.tsx new file mode 100644 index 000000000..88243c295 --- /dev/null +++ b/apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.tsx @@ -0,0 +1,17 @@ +import { CaptureSelection } from '@monkvision/common-ui-web'; +import { useNavigate } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { Page } from '../pages'; + +export function CaptureSelectionPage() { + const navigate = useNavigate(); + const { i18n } = useTranslation(); + + return ( + navigate(Page.PHOTO_CAPTURE)} + onAddDamage={() => navigate(Page.DAMAGE_DISCLOSURE)} + /> + ); +} diff --git a/apps/demo-app/src/pages/CaptureSelectionPage/index.ts b/apps/demo-app/src/pages/CaptureSelectionPage/index.ts new file mode 100644 index 000000000..cda9efddf --- /dev/null +++ b/apps/demo-app/src/pages/CaptureSelectionPage/index.ts @@ -0,0 +1 @@ +export * from './CaptureSelectionPage'; diff --git a/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.module.css b/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.module.css new file mode 100644 index 000000000..fadb213e9 --- /dev/null +++ b/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.module.css @@ -0,0 +1,7 @@ +.container { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} diff --git a/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.tsx b/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.tsx new file mode 100644 index 000000000..b9913121a --- /dev/null +++ b/apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.tsx @@ -0,0 +1,30 @@ +import { useTranslation } from 'react-i18next'; +import { useMonkAppState } from '@monkvision/common'; +import { DamageDisclosure } from '@monkvision/inspection-capture-web'; +import { useNavigate } from 'react-router-dom'; +import styles from './DamageDisclosurePage.module.css'; +import { Page } from '../pages'; + +export function DamageDisclosurePage() { + const navigate = useNavigate(); + const { i18n } = useTranslation(); + const { config, authToken, inspectionId } = useMonkAppState({ + requireInspection: true, + }); + + return ( +
+ navigate(Page.PHOTO_CAPTURE)} + lang={i18n.language} + /> +
+ ); +} diff --git a/apps/demo-app/src/pages/DamageDisclosurePage/index.ts b/apps/demo-app/src/pages/DamageDisclosurePage/index.ts new file mode 100644 index 000000000..c5b4b6d1e --- /dev/null +++ b/apps/demo-app/src/pages/DamageDisclosurePage/index.ts @@ -0,0 +1 @@ +export * from './DamageDisclosurePage'; diff --git a/apps/demo-app/src/pages/VehicleTypeSelectionPage/VehicleTypeSelectionPage.tsx b/apps/demo-app/src/pages/VehicleTypeSelectionPage/VehicleTypeSelectionPage.tsx index bd8152e00..dafe44ba3 100644 --- a/apps/demo-app/src/pages/VehicleTypeSelectionPage/VehicleTypeSelectionPage.tsx +++ b/apps/demo-app/src/pages/VehicleTypeSelectionPage/VehicleTypeSelectionPage.tsx @@ -12,7 +12,7 @@ export function VehicleTypeSelectionPage() { const { i18n } = useTranslation(); if (vehicleType || !config.allowVehicleTypeSelection) { - return ; + return ; } return ( diff --git a/apps/demo-app/src/pages/pages.ts b/apps/demo-app/src/pages/pages.ts index 4d359e618..40a7f3a23 100644 --- a/apps/demo-app/src/pages/pages.ts +++ b/apps/demo-app/src/pages/pages.ts @@ -2,5 +2,7 @@ export enum Page { LOG_IN = '/log-in', CREATE_INSPECTION = '/create-inspection', PHOTO_CAPTURE = '/photo-capture', + DAMAGE_DISCLOSURE = '/damage-disclosure', VEHICLE_TYPE_SELECTION = '/vehicle-type-selection', + CAPTURE_SELECTION = '/capture-selection', }