Skip to content

Commit 32ce566

Browse files
committed
feat(street-tutorials): prepare scenario pages input for street tutorial
1 parent 92f0ae9 commit 32ce566

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

manager-dashboard/app/views/NewTutorial/ScenarioPageInput/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
PROJECT_TYPE_FOOTPRINT,
1818
PROJECT_TYPE_CHANGE_DETECTION,
1919
PROJECT_TYPE_COMPLETENESS,
20+
PROJECT_TYPE_STREET,
2021
} from '#utils/common';
2122
import TextInput from '#components/TextInput';
2223
import Heading from '#components/Heading';
@@ -318,7 +319,14 @@ export default function ScenarioPageInput(props: Props) {
318319
lookFor={lookFor}
319320
/>
320321
)}
321-
{(projectType && projectType !== PROJECT_TYPE_FOOTPRINT) && (
322+
{projectType === PROJECT_TYPE_STREET && (
323+
<div>
324+
Preview not available.
325+
</div>
326+
)}
327+
{(projectType
328+
&& projectType !== PROJECT_TYPE_FOOTPRINT
329+
&& projectType !== PROJECT_TYPE_STREET) && (
322330
<SegmentInput
323331
name={undefined}
324332
value={activeSegmentInput}

manager-dashboard/app/views/NewTutorial/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ function getGeoJSONError(
190190
tile_y: 'number',
191191
tile_z: 'number',
192192
},
193+
[PROJECT_TYPE_STREET]: {
194+
id: ['string', 'number'],
195+
reference: 'number',
196+
screen: 'number',
197+
},
193198
};
194199
const schemaErrors = tutorialTasks.features.map(
195200
(feature) => checkSchema(

manager-dashboard/app/views/NewTutorial/utils.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ export interface ChangeDetectionProperties {
348348
// taskId: string;
349349
}
350350

351+
export interface StreetProperties {
352+
id: string;
353+
reference: number;
354+
screen: number;
355+
}
356+
351357
export type BuildAreaGeoJSON = GeoJSON.FeatureCollection<
352358
GeoJSON.Geometry,
353359
BuildAreaProperties
@@ -363,9 +369,14 @@ export type ChangeDetectionGeoJSON = GeoJSON.FeatureCollection<
363369
ChangeDetectionProperties
364370
>;
365371

372+
export type StreetGeoJSON = GeoJSON.FeatureCollection<
373+
GeoJSON.Geometry,
374+
StreetProperties
375+
>;
376+
366377
export type TutorialTasksGeoJSON = GeoJSON.FeatureCollection<
367378
GeoJSON.Geometry,
368-
BuildAreaProperties | FootprintProperties | ChangeDetectionProperties
379+
BuildAreaProperties | FootprintProperties | ChangeDetectionProperties | StreetProperties
369380
>;
370381

371382
export type CustomOptions = {

0 commit comments

Comments
 (0)