Skip to content

Commit b8b2c14

Browse files
committed
feat(manager-dashboard): Add randomizeOrder input for new Street projects
1 parent 508edf8 commit b8b2c14

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
@@ -109,6 +109,7 @@ const defaultProjectFormValue: PartialProjectFormType = {
109109
inputType: PROJECT_INPUT_TYPE_UPLOAD,
110110
filter: FILTER_BUILDINGS,
111111
isPano: false,
112+
randomizeOrder: false,
112113
};
113114

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

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export interface ProjectFormType {
8484
organizationId?: number;
8585
creatorId?: number;
8686
isPano?: boolean;
87+
randomizeOrder?: boolean;
8788
samplingThreshold?: number;
8889
}
8990

@@ -308,6 +309,9 @@ export const projectFormSchema: ProjectFormSchema = {
308309
isPano: {
309310
required: false,
310311
},
312+
randomizeOrder: {
313+
required: false,
314+
},
311315
};
312316

313317
baseSchema = addCondition(

0 commit comments

Comments
 (0)