Skip to content

Commit

Permalink
Merge pull request #990 from mapswipe/feat/manager-dashboard/randomiz…
Browse files Browse the repository at this point in the history
…e-order-street

Add randomizeOrder input for new Street projects
  • Loading branch information
ofr1tz authored Feb 6, 2025
2 parents 2d41751 + 624127b commit 2a458b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions manager-dashboard/app/views/NewProject/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const defaultProjectFormValue: PartialProjectFormType = {
// maxTasksPerUser: -1,
inputType: PROJECT_INPUT_TYPE_UPLOAD,
filter: FILTER_BUILDINGS,
randomizeOrder: false,
panoOnly: false,
};

Expand Down Expand Up @@ -763,6 +764,13 @@ function NewProject(props: Props) {
onChange={setFieldValue}
disabled={submissionPending || projectTypeEmpty}
/>
<Checkbox
name={'randomizeOrder' as const}
value={value?.randomizeOrder}
label="Randomize the order of images in the project."
onChange={setFieldValue}
disabled={submissionPending || projectTypeEmpty}
/>
</div>
</InputSection>
)}
Expand Down
4 changes: 4 additions & 0 deletions manager-dashboard/app/views/NewProject/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export interface ProjectFormType {
endTimestamp?: string | null;
organizationId?: number;
creatorId?: number;
randomizeOrder?: boolean;
panoOnly?: boolean;
isPano?: boolean | null;
samplingThreshold?: number;
Expand Down Expand Up @@ -312,6 +313,9 @@ export const projectFormSchema: ProjectFormSchema = {
isPano: {
required: false,
},
randomizeOrder: {
required: false,
},
};

baseSchema = addCondition(
Expand Down

0 comments on commit 2a458b5

Please sign in to comment.