From 473cc9ca6ee131b2ff2b7dd5967567e533e809fd Mon Sep 17 00:00:00 2001
From: Dana Lambert
Date: Wed, 20 Oct 2021 16:52:06 +1300
Subject: [PATCH] Add sample step components for the remaining steps with
accompaning text - rename step subfolders from step to
---
frontend/src/assets/data/staticText.json | 20 +++++++++++-------
frontend/src/components/Stepper.js | 16 ++++++++------
.../steps/habitat/HabitatSelector.js | 12 +++++++++++
.../components/steps/habitat/HabitatStep.js | 21 +++++++++++++++++++
.../LocationStep.js | 0
.../steps/{locationstep => location}/Map.js | 0
.../SoilSelector.js | 0
.../SoilStep.js | 2 +-
.../specifics/ProjectSpecificsSelector.js | 12 +++++++++++
.../steps/specifics/ProjectSpecificsStep.js | 21 +++++++++++++++++++
.../steps/summary/SummaryContent.js | 12 +++++++++++
.../src/components/steps/summary/ZoneStep.js | 21 +++++++++++++++++++
.../src/components/steps/zone/ZoneSelector.js | 12 +++++++++++
.../src/components/steps/zone/ZoneStep.js | 21 +++++++++++++++++++
14 files changed, 155 insertions(+), 15 deletions(-)
create mode 100644 frontend/src/components/steps/habitat/HabitatSelector.js
create mode 100644 frontend/src/components/steps/habitat/HabitatStep.js
rename frontend/src/components/steps/{locationstep => location}/LocationStep.js (100%)
rename frontend/src/components/steps/{locationstep => location}/Map.js (100%)
rename frontend/src/components/steps/{soilvariantstep => soilvariant}/SoilSelector.js (100%)
rename frontend/src/components/steps/{soilvariantstep => soilvariant}/SoilStep.js (95%)
create mode 100644 frontend/src/components/steps/specifics/ProjectSpecificsSelector.js
create mode 100644 frontend/src/components/steps/specifics/ProjectSpecificsStep.js
create mode 100644 frontend/src/components/steps/summary/SummaryContent.js
create mode 100644 frontend/src/components/steps/summary/ZoneStep.js
create mode 100644 frontend/src/components/steps/zone/ZoneSelector.js
create mode 100644 frontend/src/components/steps/zone/ZoneStep.js
diff --git a/frontend/src/assets/data/staticText.json b/frontend/src/assets/data/staticText.json
index 3f382dd..24da39e 100644
--- a/frontend/src/assets/data/staticText.json
+++ b/frontend/src/assets/data/staticText.json
@@ -11,20 +11,24 @@
"optionsHelperText": "Please select your soil variant from the options above."
},
"habitat": {
- "title": "",
- "description": ""
+ "title": "Habitat Selection",
+ "description": "We now need to specify the type of environment that characterizes your site. Please select one of the options to the right."
},
"zone": {
- "title": "",
- "description": ""
+ "title": "Zone Selection",
+ "description": "Please click on the subregion within the images that most accurately defines your planting project."
},
"projectSpecifics": {
- "title": "",
- "description": ""
+ "title": "Project Specifics",
+ "description": "If you have specific requirements for your site, please state them using the options listed on the right:"
},
"summary": {
- "title": "",
- "description": ""
+ "title": "Summary",
+ "description": "You have specified the following inputs – if these are correct go to the next step, otherwise go back and refine your input on the previous pages."
+ },
+ "results": {
+ "title": "Your Results",
+ "description": "Please review the plant species list – it can be saved as a CSV file or appended to a planting plan guidebook. Additional information on each species can be obtained by entering the plant species name into the search box at https://inaturalist.nz or in the “search flora” box at https://www.nzpcn.org.nz/. Click below to create a planting plan guidebook specific to your project site.."
}
}
}
\ No newline at end of file
diff --git a/frontend/src/components/Stepper.js b/frontend/src/components/Stepper.js
index 2b19abe..a0ec809 100644
--- a/frontend/src/components/Stepper.js
+++ b/frontend/src/components/Stepper.js
@@ -5,17 +5,21 @@ import Step from '@mui/material/Step';
import StepLabel from '@mui/material/StepLabel';
import Button from '@mui/material/Button';
-import LocationStep from './steps/locationstep/LocationStep'
-import SoilStep from './steps/soilvariantstep/SoilStep'
+import LocationStep from './steps/location/LocationStep'
+import SoilStep from './steps/soilvariant/SoilStep'
+import HabitatStep from './steps/habitat/HabitatStep';
+import ZoneStep from './steps/zone/ZoneStep';
+import ProjectSpecificsStep from './steps/specifics/ProjectSpecificsStep';
+import SummaryStep from './steps/summary/ZoneStep';
import ResultsStep from './steps/Results'
const steps = [
{'label': 'Select location', 'component': LocationStep },
{'label': 'Choose soil', 'component': SoilStep },
- {'label': 'Choose habitat', 'component': SoilStep },
- {'label': 'Select zone', 'component': SoilStep },
- {'label': 'Project specifics', 'component': SoilStep },
- {'label': 'Summary', 'component': SoilStep }
+ {'label': 'Choose habitat', 'component': HabitatStep },
+ {'label': 'Select zone', 'component': ZoneStep },
+ {'label': 'Project specifics', 'component': ProjectSpecificsStep },
+ {'label': 'Summary', 'component': SummaryStep }
];
export default function StepperWizard(props) {
diff --git a/frontend/src/components/steps/habitat/HabitatSelector.js b/frontend/src/components/steps/habitat/HabitatSelector.js
new file mode 100644
index 0000000..398fe20
--- /dev/null
+++ b/frontend/src/components/steps/habitat/HabitatSelector.js
@@ -0,0 +1,12 @@
+import { useEffect } from 'react';
+
+export default function HabitatSelector(props) {
+
+ useEffect(() => {
+ props.setNextDisabled(false);
+ });
+
+ return (
+ Habitat Selector
+ )
+}
diff --git a/frontend/src/components/steps/habitat/HabitatStep.js b/frontend/src/components/steps/habitat/HabitatStep.js
new file mode 100644
index 0000000..34cb0fa
--- /dev/null
+++ b/frontend/src/components/steps/habitat/HabitatStep.js
@@ -0,0 +1,21 @@
+import Step from '../Step';
+import HabitatSelector from './HabitatSelector'
+import StepInformation from '../StepInformation';
+import staticText from '../../../assets/data/staticText.json'
+
+export default function HabitatStep(props) {
+ const habitatInfoPanel = (
+ {staticText.steps.habitat.description}
}
+ />
+ )
+
+ const habitatSelectionPanel = (
+
+ )
+
+ return (
+
+ )
+}
diff --git a/frontend/src/components/steps/locationstep/LocationStep.js b/frontend/src/components/steps/location/LocationStep.js
similarity index 100%
rename from frontend/src/components/steps/locationstep/LocationStep.js
rename to frontend/src/components/steps/location/LocationStep.js
diff --git a/frontend/src/components/steps/locationstep/Map.js b/frontend/src/components/steps/location/Map.js
similarity index 100%
rename from frontend/src/components/steps/locationstep/Map.js
rename to frontend/src/components/steps/location/Map.js
diff --git a/frontend/src/components/steps/soilvariantstep/SoilSelector.js b/frontend/src/components/steps/soilvariant/SoilSelector.js
similarity index 100%
rename from frontend/src/components/steps/soilvariantstep/SoilSelector.js
rename to frontend/src/components/steps/soilvariant/SoilSelector.js
diff --git a/frontend/src/components/steps/soilvariantstep/SoilStep.js b/frontend/src/components/steps/soilvariant/SoilStep.js
similarity index 95%
rename from frontend/src/components/steps/soilvariantstep/SoilStep.js
rename to frontend/src/components/steps/soilvariant/SoilStep.js
index 2a5fb3c..cf3914a 100644
--- a/frontend/src/components/steps/soilvariantstep/SoilStep.js
+++ b/frontend/src/components/steps/soilvariant/SoilStep.js
@@ -12,7 +12,7 @@ export default function SoilVariantStep(props) {
const soilVarientInfoPanel = (
)
diff --git a/frontend/src/components/steps/specifics/ProjectSpecificsSelector.js b/frontend/src/components/steps/specifics/ProjectSpecificsSelector.js
new file mode 100644
index 0000000..8ce008b
--- /dev/null
+++ b/frontend/src/components/steps/specifics/ProjectSpecificsSelector.js
@@ -0,0 +1,12 @@
+import { useEffect } from 'react';
+
+export default function ProjectSpecificsSelector(props) {
+
+ useEffect(() => {
+ props.setNextDisabled(false);
+ });
+
+ return (
+ Project Specifics Selector
+ )
+}
diff --git a/frontend/src/components/steps/specifics/ProjectSpecificsStep.js b/frontend/src/components/steps/specifics/ProjectSpecificsStep.js
new file mode 100644
index 0000000..9bfc6b9
--- /dev/null
+++ b/frontend/src/components/steps/specifics/ProjectSpecificsStep.js
@@ -0,0 +1,21 @@
+import Step from '../Step';
+import ProjectSpecificsSelector from './ProjectSpecificsSelector'
+import StepInformation from '../StepInformation';
+import staticText from '../../../assets/data/staticText.json'
+
+export default function ProjectSpecificsStep(props) {
+ const projectSpecificsInfoPanel = (
+ {staticText.steps.projectSpecifics.description}}
+ />
+ )
+
+ const projectSpecificsSelectionPanel = (
+
+ )
+
+ return (
+
+ )
+}
diff --git a/frontend/src/components/steps/summary/SummaryContent.js b/frontend/src/components/steps/summary/SummaryContent.js
new file mode 100644
index 0000000..6db4d7a
--- /dev/null
+++ b/frontend/src/components/steps/summary/SummaryContent.js
@@ -0,0 +1,12 @@
+import { useEffect } from 'react';
+
+export default function SummaryContent(props) {
+
+ useEffect(() => {
+ props.setNextDisabled(false);
+ });
+
+ return (
+ Summary Content
+ )
+}
diff --git a/frontend/src/components/steps/summary/ZoneStep.js b/frontend/src/components/steps/summary/ZoneStep.js
new file mode 100644
index 0000000..89183e0
--- /dev/null
+++ b/frontend/src/components/steps/summary/ZoneStep.js
@@ -0,0 +1,21 @@
+import Step from '../Step';
+import SummaryContent from './SummaryContent'
+import StepInformation from '../StepInformation';
+import staticText from '../../../assets/data/staticText.json'
+
+export default function SummaryStep(props) {
+ const summaryInfoPanel = (
+ {staticText.steps.summary.description}}
+ />
+ )
+
+ const summaryContent = (
+
+ )
+
+ return (
+
+ )
+}
diff --git a/frontend/src/components/steps/zone/ZoneSelector.js b/frontend/src/components/steps/zone/ZoneSelector.js
new file mode 100644
index 0000000..4b2128c
--- /dev/null
+++ b/frontend/src/components/steps/zone/ZoneSelector.js
@@ -0,0 +1,12 @@
+import { useEffect } from 'react';
+
+export default function ZoneSelector(props) {
+
+ useEffect(() => {
+ props.setNextDisabled(false);
+ });
+
+ return (
+ Zone Selector
+ )
+}
diff --git a/frontend/src/components/steps/zone/ZoneStep.js b/frontend/src/components/steps/zone/ZoneStep.js
new file mode 100644
index 0000000..e67b10b
--- /dev/null
+++ b/frontend/src/components/steps/zone/ZoneStep.js
@@ -0,0 +1,21 @@
+import Step from '../Step';
+import ZoneSelector from './ZoneSelector'
+import StepInformation from '../StepInformation';
+import staticText from '../../../assets/data/staticText.json'
+
+export default function ZoneStep(props) {
+ const zoneInfoPanel = (
+ {staticText.steps.zone.description}}
+ />
+ )
+
+ const zoneSelectionPanel = (
+
+ )
+
+ return (
+
+ )
+}