Skip to content

Commit

Permalink
Release (#24)
Browse files Browse the repository at this point in the history
* remove app end message

* cyclewise v2 amends

* form amends (#17)

* add promotion end page

* add form route

* add azure routing json

* remove foobar route

* fix: title (#19)

* update app title

* form amends

* update logo url

* feat: survey amends (#22)

* copy amends

* question updates

* form amends

* add district dropdown

* feat: survey amends (#23)

* copy amends

* question updates

* form amends

* add district dropdown

* add in all questions
  • Loading branch information
rolorogan committed Oct 22, 2023
1 parent 3c76b34 commit bea3f85
Show file tree
Hide file tree
Showing 16 changed files with 120 additions and 101 deletions.
4 changes: 2 additions & 2 deletions src/Application/ApplicationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const ApplicationForm = () => {
setGoToPage={setGoToPage}
>
<EligibilityCheck />
<RegistrationName />
<DateOfBirth validate={validateDateOfBirth} />
{/* <RegistrationName />
<DateOfBirth validate={validateDateOfBirth} /> */}
<RegistrationAddress
orderNo={2}
registrationAddresses={registrationAddresses}
Expand Down
2 changes: 1 addition & 1 deletion src/Application/SubmitError.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SubmitError = () => {
<div className="wmnds-container-alerts-sign-up">
<div className="wmnds-grid">
<div className="wmnds-col-1 wmnds-col-sm-2-3">
<h1>Apply for support with West Midlands Cycle Hire costs</h1>
<h1>Apply for support with West Midlands Cycle Hire and Scooter costs</h1>
</div>
<div className="wmnds-col-1 wmnds-col-md-3-4 wmnds-col-lg-1-2">
{/* Error message */}
Expand Down
2 changes: 1 addition & 1 deletion src/Application/SubmitSuccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const SubmitSuccess = () => {
folder before contacting us.
</p>
<p>
If you haven’t received an e-mail, contact Ticketing Services:
If you haven’t received an e-mail, contact Customer Services:
</p>
<ul>
<li>
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Survey/EthnicGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const EthnicGroup = ({ setEthnicGroup, setGoToPage }) => {
/>
<Question text={question} />
<p>
Q16 - How would you describe your ethnic group? Choose one option that
Q15 - How would you describe your ethnic group? Choose one option that
best describes your ethnic group or background
</p>
<RadioGroup error={error}>
Expand Down
62 changes: 31 additions & 31 deletions src/Application/Survey/Q11Q12Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ const Q11Q12Survey = () => {
const formValues = stateApi.values;
const formApi = useForm();

const q13error =
const q12error =
stateApi.submitFailed && stateApi.hasValidationErrors
? stateApi.errors?.q13
? stateApi.errors?.q12
: null;

const q13berror =
const q12berror =
stateApi.submitFailed && stateApi.hasValidationErrors
? stateApi.errors?.formData.SurveyData.q13b
? stateApi.errors?.formData.SurveyData.q12b
: null;

const q14error =
const q13error =
stateApi.submitFailed && stateApi.hasValidationErrors
? stateApi.errors?.formData.SurveyData.q14
? stateApi.errors?.formData.SurveyData.q13
: null;

useEffect(() => {
Expand All @@ -37,10 +37,10 @@ const Q11Q12Survey = () => {
// copy q11 value to survey data
useEffect(() => {
formApi.mutators.setFormAttribute(
"formData.SurveyData.q13",
stateApi.values.q13
"formData.SurveyData.q12",
stateApi.values.q12
);
}, [formApi.mutators, stateApi.values.q13]);
}, [formApi.mutators, stateApi.values.q12]);

return (
<FormSection>
Expand All @@ -49,50 +49,50 @@ const Q11Q12Survey = () => {
sectionName="LACF Survey"
/>
<Question text="About You" isRequired={true} />
<p>Q13 - Are you: *</p>
<RadioGroup error={q13error}>
<FieldError text={q13error} />
<p>Q12 - Are you: *</p>
<RadioGroup error={q12error}>
<FieldError text={q12error} />
<RadioButton
key={1}
label="Male"
validation={required}
value="Male"
fieldName="q13"
fieldName="q12"
/>
<RadioButton
key={2}
label="Female"
validation={required}
value="Female"
fieldName="q13"
fieldName="q12"
/>
<RadioButton
key={3}
label="Prefer to self-describe"
validation={required}
value="Prefer to self-describe"
fieldName="q13"
fieldName="q12"
/>
<RadioButton
key={4}
label="Prefer not to say"
validation={required}
value="Prefer not to say"
fieldName="q13"
fieldName="q12"
/>
</RadioGroup>
{formValues.q13 === "Prefer to self-describe" ? (
{formValues.q12 === "Prefer to self-describe" ? (
<TextInput
fieldName="formData.SurveyData.q13b"
label="Q13b - Please self-describe:"
fieldName="formData.SurveyData.q12b"
label="Q12b - Please self-describe:"
validation={required}
error={q13berror}
error={q12berror}
isRequired={true}
/>
) : null}
<p>Q14 - Which of these age groups do you belong to? *</p>
<RadioGroup error={q14error}>
<FieldError text={q14error} />
<p>Q13 - Which of these age groups do you belong to? *</p>
<RadioGroup error={q13error}>
<FieldError text={q13error} />
{/* <RadioButton
key={1}
label="14 – 15"
Expand All @@ -105,56 +105,56 @@ const Q11Q12Survey = () => {
label="16 – 17"
validation={required}
value="16 – 17"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={3}
label="18 – 24"
validation={required}
value="18 – 24"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={4}
label="25 – 34"
validation={required}
value="25 – 34"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={5}
label="35 – 44"
validation={required}
value="35 – 44"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={6}
label="45 – 54"
validation={required}
value="45 – 54"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={7}
label="55 – 64"
validation={required}
value="55 – 64"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
<RadioButton
key={8}
label="65+"
validation={required}
value="65+"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>{" "}
<RadioButton
key={9}
label="Prefer not to say"
validation={required}
value="Prefer not to say"
fieldName="formData.SurveyData.q14"
fieldName="formData.SurveyData.q13"
/>
</RadioGroup>
</FormSection>
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Survey/Q13Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const Q13Survey = () => {
<Question text="About You" isRequired={true} />
<TextInput
fieldName="formData.PostCode"
label="Q15 - What is your home postcode?"
label="Q14 - What is your home postcode?"
validation={required}
disabled="true"
disab="true"
/>
</FormSection>
);
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Survey/Q3Q4Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const Q3Q4Survey = () => {
</RadioGroup>

<p>
Q4 - On average, how much time do you spend e-scooter per week? *
Q4 - On average, how much time do you spend using an e-scooter per week? *
</p>
<RadioGroup error={q4error}>
<FieldError text={q4error} />
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Survey/Q7Q8Q9Q10Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ const Q7Q8Q9Q10Survey = () => {
cycling on roads in your local area please provide more detail below:"
/>

<TextInput
{/* <TextInput
fieldName="formData.SurveyData.q11"
label="Q11 - If you have any comments or suggestions on how your feeling of safety could be improved
when cycling on roads in your local area please provide more detail below:"
/>
/> */}

{/* <p>
Q11 - And how confident do you feel about cycling on roads in your local
Expand Down
34 changes: 17 additions & 17 deletions src/Application/Survey/Q8Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,102 +41,102 @@ const Q8Survey = () => {
/>
<Question text="About You" isRequired={true} />
<p>
Q20 - How many people, including yourself, currently live in your
Q19 - How many people, including yourself, currently live in your
household? *
</p>
<TextInput
fieldName="formData.SurveyData.q20.Adults18OrOver"
fieldName="formData.SurveyData.q19.Adults18OrOver"
label="Adults aged 18 or over"
/>
<TextInput
fieldName="formData.SurveyData.q20.Children16Or17"
fieldName="formData.SurveyData.q19.Children16Or17"
label="Children aged 16 or 17"
/>
<TextInput
fieldName="formData.SurveyData.q20.Children12To15"
fieldName="formData.SurveyData.q19.Children12To15"
label="Children aged 12 to 15"
/>
<TextInput
fieldName="formData.SurveyData.q20.Children5To11"
fieldName="formData.SurveyData.q19.Children5To11"
label="Children aged 5 to 11"
/>
<TextInput
fieldName="formData.SurveyData.q20.Children4OrUnder"
fieldName="formData.SurveyData.q19.Children4OrUnder"
label="Children aged 4 or under"
/>

<p>q21 - What is your estimated household annual income? *</p>
<p>q20 - What is your estimated household annual income? *</p>
<RadioGroup error={q20error}>
<FieldError text={q20error} />
<RadioButton
key={2}
label="Less than £10,000"
validation={required}
value="Less than £10,000"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={3}
label="£10,000–£19,999"
validation={required}
value="£10,000–£19,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={4}
label="£20,000–£29,999"
validation={required}
value="£20,000–£29,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={5}
label="£30,000–£39,999"
validation={required}
value="£30,000–£39,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={6}
label="£40,000–£49,999"
validation={required}
value="£40,000–£49,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={7}
label="£50,000–£59,999"
validation={required}
value="£50,000–£59,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>{" "}
<RadioButton
key={8}
label="£60,000–£74,999"
validation={required}
value="£60,000–£74,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={9}
label="£75,000–£99,999"
validation={required}
value="£75,000–£99,999"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={10}
label="£100,000 or more"
validation={required}
value="£100,000 or more"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
<RadioButton
key={11}
label="Prefer not to say"
validation={required}
value="Prefer not to say"
fieldName="formData.SurveyData.q21"
fieldName="formData.SurveyData.q20"
/>
</RadioGroup>
</FormSection>
Expand Down
Loading

0 comments on commit bea3f85

Please sign in to comment.