Skip to content

Commit 0188ba1

Browse files
committed
feat(manager-dashboard): invisible tile server input in street projects
1 parent e1ec359 commit 0188ba1

File tree

1 file changed

+18
-11
lines changed
  • manager-dashboard/app/views/NewProject

1 file changed

+18
-11
lines changed

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

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ function NewProject(props: Props) {
418418
|| projectSubmissionStatus === 'projectSubmit'
419419
);
420420

421+
const tileServerVisible = value.projectType === PROJECT_TYPE_BUILD_AREA
422+
|| value.projectType === PROJECT_TYPE_FOOTPRINT
423+
|| value.projectType === PROJECT_TYPE_COMPLETENESS
424+
|| value.projectType === PROJECT_TYPE_CHANGE_DETECTION;
425+
421426
const tileServerBVisible = value.projectType === PROJECT_TYPE_CHANGE_DETECTION
422427
|| value.projectType === PROJECT_TYPE_COMPLETENESS;
423428

@@ -662,17 +667,19 @@ function NewProject(props: Props) {
662667
/>
663668
</InputSection>
664669

665-
<InputSection
666-
heading={tileServerBVisible ? 'Tile Server A' : 'Tile Server'}
667-
>
668-
<TileServerInput
669-
name={'tileServer' as const}
670-
value={value.tileServer}
671-
error={error?.tileServer}
672-
onChange={setFieldValue}
673-
disabled={submissionPending || projectTypeEmpty}
674-
/>
675-
</InputSection>
670+
{tileServerVisible && (
671+
<InputSection
672+
heading={tileServerBVisible ? 'Tile Server A' : 'Tile Server'}
673+
>
674+
<TileServerInput
675+
name={'tileServer' as const}
676+
value={value.tileServer}
677+
error={error?.tileServer}
678+
onChange={setFieldValue}
679+
disabled={submissionPending || projectTypeEmpty}
680+
/>
681+
</InputSection>
682+
)}
676683

677684
{tileServerBVisible && (
678685
<InputSection

0 commit comments

Comments
 (0)