Skip to content

Commit c27e228

Browse files
committed
feat(street-tutorial): ensure that custom options are written to tutorial and project drafts
1 parent f3ae549 commit c27e228

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ export const projectFormSchema: ProjectFormSchema = {
324324
['projectType'],
325325
['customOptions'],
326326
(formValues) => {
327-
if (formValues?.projectType === PROJECT_TYPE_FOOTPRINT) {
327+
if (formValues?.projectType === PROJECT_TYPE_FOOTPRINT
328+
|| formValues?.projectType === PROJECT_TYPE_STREET) {
328329
return {
329330
customOptions: {
330331
keySelector: (key) => key.value,

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,15 @@ export const defaultStreetCustomOptions: PartialTutorialFormType['customOptions'
265265
title: 'Yes',
266266
icon: 'checkmark-outline',
267267
iconColor: colorKeyToColorMap.green,
268-
description: '',
268+
description: 'the object you are looking for is in the image.',
269269
},
270270
{
271271
optionId: 2,
272272
value: 0,
273273
title: 'No',
274274
icon: 'close-outline',
275275
iconColor: colorKeyToColorMap.red,
276-
description: '',
276+
description: 'the object you are looking for is NOT in the image.',
277277
},
278278
{
279279
optionId: 3,
@@ -775,7 +775,8 @@ export const tutorialFormSchema: TutorialFormSchema = {
775775
}),
776776
};
777777

778-
if (formValues?.projectType === PROJECT_TYPE_FOOTPRINT) {
778+
if (formValues?.projectType === PROJECT_TYPE_FOOTPRINT
779+
|| formValues?.projectType === PROJECT_TYPE_STREET) {
779780
return {
780781
customOptions: customOptionField,
781782
};

0 commit comments

Comments
 (0)