Skip to content

Commit e62d69b

Browse files
authored
Merge pull request #988 from mapswipe/fix/street-pano-filter
fix(manager-dashboard): correctly set isPano for street projects
2 parents 508edf8 + 4811d94 commit e62d69b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const defaultProjectFormValue: PartialProjectFormType = {
108108
// maxTasksPerUser: -1,
109109
inputType: PROJECT_INPUT_TYPE_UPLOAD,
110110
filter: FILTER_BUILDINGS,
111-
isPano: false,
111+
panoOnly: false,
112112
};
113113

114114
interface Props {
@@ -320,6 +320,7 @@ function NewProject(props: Props) {
320320

321321
valuesToCopy.startTimestamp = valuesToCopy.dateRange?.startDate ?? null;
322322
valuesToCopy.endTimestamp = valuesToCopy.dateRange?.endDate ?? null;
323+
valuesToCopy.isPano = valuesToCopy.panoOnly ? true : null;
323324

324325
const storage = getStorage();
325326
const timestamp = (new Date()).getTime();
@@ -756,8 +757,8 @@ function NewProject(props: Props) {
756757
disabled={submissionPending || projectTypeEmpty}
757758
/>
758759
<Checkbox
759-
name={'isPano' as const}
760-
value={value?.isPano}
760+
name={'panoOnly' as const}
761+
value={value?.panoOnly}
761762
label="Only use 360 degree panorama images."
762763
onChange={setFieldValue}
763764
disabled={submissionPending || projectTypeEmpty}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export interface ProjectFormType {
8383
endTimestamp?: string | null;
8484
organizationId?: number;
8585
creatorId?: number;
86-
isPano?: boolean;
86+
panoOnly?: boolean;
87+
isPano?: boolean | null;
8788
samplingThreshold?: number;
8889
}
8990

@@ -305,6 +306,9 @@ export const projectFormSchema: ProjectFormSchema = {
305306
greaterThanCondition(0),
306307
],
307308
},
309+
panoOnly: {
310+
required: false,
311+
},
308312
isPano: {
309313
required: false,
310314
},

0 commit comments

Comments
 (0)