Skip to content

Commit

Permalink
fix(manager-dashboard): correctly set isPano for street projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ofr1tz committed Jan 16, 2025
1 parent 508edf8 commit 4811d94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions manager-dashboard/app/views/NewProject/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const defaultProjectFormValue: PartialProjectFormType = {
// maxTasksPerUser: -1,
inputType: PROJECT_INPUT_TYPE_UPLOAD,
filter: FILTER_BUILDINGS,
isPano: false,
panoOnly: false,
};

interface Props {
Expand Down Expand Up @@ -320,6 +320,7 @@ function NewProject(props: Props) {

valuesToCopy.startTimestamp = valuesToCopy.dateRange?.startDate ?? null;
valuesToCopy.endTimestamp = valuesToCopy.dateRange?.endDate ?? null;
valuesToCopy.isPano = valuesToCopy.panoOnly ? true : null;

const storage = getStorage();
const timestamp = (new Date()).getTime();
Expand Down Expand Up @@ -756,8 +757,8 @@ function NewProject(props: Props) {
disabled={submissionPending || projectTypeEmpty}
/>
<Checkbox
name={'isPano' as const}
value={value?.isPano}
name={'panoOnly' as const}
value={value?.panoOnly}
label="Only use 360 degree panorama images."
onChange={setFieldValue}
disabled={submissionPending || projectTypeEmpty}
Expand Down
6 changes: 5 additions & 1 deletion manager-dashboard/app/views/NewProject/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export interface ProjectFormType {
endTimestamp?: string | null;
organizationId?: number;
creatorId?: number;
isPano?: boolean;
panoOnly?: boolean;
isPano?: boolean | null;
samplingThreshold?: number;
}

Expand Down Expand Up @@ -305,6 +306,9 @@ export const projectFormSchema: ProjectFormSchema = {
greaterThanCondition(0),
],
},
panoOnly: {
required: false,
},
isPano: {
required: false,
},
Expand Down

0 comments on commit 4811d94

Please sign in to comment.