From 7cf09bc178d1738376ecc21b2c182ef4b8a2eac3 Mon Sep 17 00:00:00 2001 From: jeznorth Date: Mon, 1 Nov 2021 13:55:41 -0700 Subject: [PATCH] BHBC-1461 (#622) --- app/src/components/boundary/MapBoundary.tsx | 18 +- .../fields/HorizontalSplitFormComponent.tsx | 8 +- ...HorizontalSplitFormComponent.test.tsx.snap | 18 +- .../CreatePermitPage.test.tsx.snap | 96 +- .../ProjectLocationForm.test.tsx.snap | 95 +- app/src/features/surveys/CreateSurveyPage.tsx | 14 +- .../CreateSurveyPage.test.tsx.snap | 1592 ++++++----- .../components/GeneralInformationForm.tsx | 265 +- .../components/ProprietaryDataForm.tsx | 307 +- .../surveys/components/StudyAreaForm.tsx | 38 +- .../GeneralInformationForm.test.tsx.snap | 2461 ++++++++--------- .../ProprietaryDataForm.test.tsx.snap | 134 +- .../__snapshots__/StudyAreaForm.test.tsx.snap | 2189 +++++++-------- app/src/themes/appTheme.ts | 6 + .../ProjectStepComponents.test.tsx.snap | 21 +- 15 files changed, 3642 insertions(+), 3620 deletions(-) diff --git a/app/src/components/boundary/MapBoundary.tsx b/app/src/components/boundary/MapBoundary.tsx index ed83e301b7..cb49d97e53 100644 --- a/app/src/components/boundary/MapBoundary.tsx +++ b/app/src/components/boundary/MapBoundary.tsx @@ -1,3 +1,4 @@ +import Alert from '@material-ui/lab/Alert'; import Box from '@material-ui/core/Box'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; @@ -109,7 +110,9 @@ const MapBoundary: React.FC = (props) => { dialogTitle="Upload Boundary" onClose={() => setOpenUploadBoundary(false)}> - Accepted file types: .gpx, .klm, .zip (shapefiles) + + If uploading a shapefile, it must be configured with a valid projection. + = (props) => { {title} - - You may select a boundary from an existing layer or upload a KML or Shapefile, KMZ files will not be - accepted. The Shapefile being uploaded must be configured with a valid projection. To select a boundary from - an existing layer, toggle the appropriate layer and select a boundary from the map, then press add boundary. - When done, press the hide layer button. + + Define your boundary by selecting a boundary from an existing layer or by uploading KML file or shapefile. + + + To select a boundary from an existing layer, select a layer from the dropdown, click a boundary on the map + and click 'Add Boundary'. + +
-
+
+ -
-

- Funding Sources -

-
-
+ Permits + +

+ If a permit is required for this survey, select a permit or add new one. +

- -

- Lead biologist for this survey + OR

-
-
-
- -
- - -
-
+ + + + + Add Permit + + + +
+
+ +
+ + Funding Sources + + - +
`; @@ -1815,10 +1809,10 @@ exports[`General Information Form renders correctly when errors exist 1`] = ` /> +
+ + Permits + +

+ If a permit is required for this survey, select a permit or add new one. +

+
+
+ +
+
+

+ OR +

+
+
+ +
+
+
+
+ + Funding Sources + + +
`; diff --git a/app/src/features/surveys/components/__snapshots__/ProprietaryDataForm.test.tsx.snap b/app/src/features/surveys/components/__snapshots__/ProprietaryDataForm.test.tsx.snap index cb7a2abdfc..45a0a3b088 100644 --- a/app/src/features/surveys/components/__snapshots__/ProprietaryDataForm.test.tsx.snap +++ b/app/src/features/surveys/components/__snapshots__/ProprietaryDataForm.test.tsx.snap @@ -12,26 +12,32 @@ exports[`Proprietary Data Form renders correctly the empty component correctly w
- - Is the data captured in this survey proprietary? - -
-
+

@@ -146,7 +152,7 @@ exports[`Proprietary Data Form renders correctly the empty component correctly w

@@ -169,26 +175,32 @@ exports[`Proprietary Data Form renders correctly the filled component correctly
- - Is the data captured in this survey proprietary? - -
-
+

@@ -303,7 +315,7 @@ exports[`Proprietary Data Form renders correctly the filled component correctly

@@ -313,7 +325,7 @@ exports[`Proprietary Data Form renders correctly the filled component correctly class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12" >

Proprietary Information

@@ -531,15 +543,9 @@ exports[`Proprietary Data Form renders correctly the filled component correctly class="MuiFormControl-root" > Data and Information Sharing Agreement (DISA) -

- - Is the data captured in this survey proprietary? - -

-
+

@@ -817,7 +829,7 @@ exports[`Proprietary Data Form renders correctly when errors exist when survey d

error on survey data proprietary field

@@ -829,7 +841,7 @@ exports[`Proprietary Data Form renders correctly when errors exist when survey d class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12" >

Proprietary Information

@@ -1068,15 +1080,9 @@ exports[`Proprietary Data Form renders correctly when errors exist when survey d class="MuiFormControl-root" > Data and Information Sharing Agreement (DISA) -

-
- -
+ +
+ +
+ + Survey Area Name * + + +
+ +
+

+ Study Area Boundary +

- Study Area Boundary + Define your boundary by selecting a boundary from an existing layer or by uploading KML file or shapefile.

- You may select a boundary from an existing layer or upload a KML or Shapefile, KMZ files will not be accepted. The Shapefile being uploaded must be configured with a valid projection. To select a boundary from an existing layer, toggle the appropriate layer and select a boundary from the map, then press add boundary. When done, press the hide layer button. + To select a boundary from an existing layer, select a layer from the dropdown, click a boundary on the map and click 'Add Boundary'.

-
+
+ + Upload Boundary + + + +
+
- -
+ ​ + +
+ +
+ +
- - - -
+ +
+ +
+
-
-
- -
+
-
-
-
-
-
+
+
+
+
+
+
+ + +
+
@@ -443,469 +448,474 @@ exports[`Study Area Form renders correctly the filled component correctly 1`] =
-
- -
+ +
+ +
+ + Survey Area Name * + + +
+
+
+

+ Study Area Boundary +

- Study Area Boundary + Define your boundary by selecting a boundary from an existing layer or by uploading KML file or shapefile.

- You may select a boundary from an existing layer or upload a KML or Shapefile, KMZ files will not be accepted. The Shapefile being uploaded must be configured with a valid projection. To select a boundary from an existing layer, toggle the appropriate layer and select a boundary from the map, then press add boundary. When done, press the hide layer button. + To select a boundary from an existing layer, select a layer from the dropdown, click a boundary on the map and click 'Add Boundary'.

-
+
+ + Upload Boundary + + + +
+
- -
+ ​ + +
+ +
+ +
- - - -
+ +
+
+
+
-
-
- -
+
-
- -
-
-
- -
-
+
+ -
+
+
+
+
+
+
+ + + @@ -916,476 +926,481 @@ exports[`Study Area Form renders correctly when errors exist 1`] = `
-
- -
+ +
+ +
-

- error on survey area name field -

+ + Survey Area Name * + + +
+

+ error on survey area name field +

+
+
+

+ Study Area Boundary +

- Study Area Boundary + Define your boundary by selecting a boundary from an existing layer or by uploading KML file or shapefile.

- You may select a boundary from an existing layer or upload a KML or Shapefile, KMZ files will not be accepted. The Shapefile being uploaded must be configured with a valid projection. To select a boundary from an existing layer, toggle the appropriate layer and select a boundary from the map, then press add boundary. When done, press the hide layer button. + To select a boundary from an existing layer, select a layer from the dropdown, click a boundary on the map and click 'Add Boundary'.

-
+
+ + Upload Boundary + + + +
+
- -
+ ​ + +
+ +
+ +
- - - -
+ +
+
+
+
-
-
- -
+
-
- -
-
-
- -
-
+
+ -
+
+
+
+
+
+
+ + + diff --git a/app/src/themes/appTheme.ts b/app/src/themes/appTheme.ts index 7c41b6255f..64d732aa3b 100644 --- a/app/src/themes/appTheme.ts +++ b/app/src/themes/appTheme.ts @@ -56,6 +56,12 @@ const appTheme = createMuiTheme({ fontWeight: 700 } }, + MuiAlert: { + root: { + alignItems: 'center', + fontSize: '1rem' + } + }, MuiButton: { root: { textTransform: 'none' diff --git a/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap b/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap index a84f3cc92d..cef9d09bc5 100644 --- a/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap +++ b/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap @@ -1333,13 +1333,22 @@ exports[`ProjectStepComponents renders the project location 1`] = ` class="MuiBox-root MuiBox-root-74" >

- You may select a boundary from an existing layer or upload a KML or Shapefile, KMZ files will not be accepted. The Shapefile being uploaded must be configured with a valid projection. To select a boundary from an existing layer, toggle the appropriate layer and select a boundary from the map, then press add boundary. When done, press the hide layer button. + Define your boundary by selecting a boundary from an existing layer or by uploading KML file or shapefile.

+
+

+ To select a boundary from an existing layer, select a layer from the dropdown, click a boundary on the map and click 'Add Boundary'. +

+