Skip to content

Commit 2a458b5

Browse files
authored
Merge pull request #990 from mapswipe/feat/manager-dashboard/randomize-order-street
Add randomizeOrder input for new Street projects
2 parents 2d41751 + 624127b commit 2a458b5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const defaultProjectFormValue: PartialProjectFormType = {
108108
// maxTasksPerUser: -1,
109109
inputType: PROJECT_INPUT_TYPE_UPLOAD,
110110
filter: FILTER_BUILDINGS,
111+
randomizeOrder: false,
111112
panoOnly: false,
112113
};
113114

@@ -763,6 +764,13 @@ function NewProject(props: Props) {
763764
onChange={setFieldValue}
764765
disabled={submissionPending || projectTypeEmpty}
765766
/>
767+
<Checkbox
768+
name={'randomizeOrder' as const}
769+
value={value?.randomizeOrder}
770+
label="Randomize the order of images in the project."
771+
onChange={setFieldValue}
772+
disabled={submissionPending || projectTypeEmpty}
773+
/>
766774
</div>
767775
</InputSection>
768776
)}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export interface ProjectFormType {
8383
endTimestamp?: string | null;
8484
organizationId?: number;
8585
creatorId?: number;
86+
randomizeOrder?: boolean;
8687
panoOnly?: boolean;
8788
isPano?: boolean | null;
8889
samplingThreshold?: number;
@@ -312,6 +313,9 @@ export const projectFormSchema: ProjectFormSchema = {
312313
isPano: {
313314
required: false,
314315
},
316+
randomizeOrder: {
317+
required: false,
318+
},
315319
};
316320

317321
baseSchema = addCondition(

0 commit comments

Comments
 (0)