Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it can not be false. or? Is this intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is as originally intended. The input allows a project creator to decide whether they want all images (isPano = null) or only panoramic ones (isPano = true). In case there should be a need for creating projects with only non-panoramic features, we could adapt the Manager Dashboard later accordingly.


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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt isPano be removed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to remain as a type check for valuesToCopy.isPano.

samplingThreshold?: number;
}

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