From bea3f85f7312c42378a4c1ca53d9a0abae528f0b Mon Sep 17 00:00:00 2001 From: Nathan Rogan Date: Sun, 22 Oct 2023 15:34:07 +0100 Subject: [PATCH] Release (#24) * 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 --- src/Application/ApplicationForm.js | 4 +- src/Application/SubmitError.js | 2 +- src/Application/SubmitSuccess.js | 2 +- src/Application/Survey/EthnicGroup.js | 2 +- src/Application/Survey/Q11Q12Survey.js | 62 +++++++++---------- src/Application/Survey/Q13Survey.js | 4 +- src/Application/Survey/Q3Q4Survey.js | 2 +- src/Application/Survey/Q7Q8Q9Q10Survey.js | 4 +- src/Application/Survey/Q8Survey.js | 34 +++++----- src/Application/Survey/Q9Survey.js | 40 ++++++------ src/Application/Survey/SuveyIntro.js | 4 +- .../section1/EmploymentStatusGroup.js | 20 +++--- src/Application/section1/WhereDropdown.js | 16 ++--- src/common/Address/AddressDetails.js | 21 ++++++- src/common/BreadCrumb.js | 2 +- src/common/TextInput.js | 2 +- 16 files changed, 120 insertions(+), 101 deletions(-) diff --git a/src/Application/ApplicationForm.js b/src/Application/ApplicationForm.js index 216b367..b6bcb8b 100644 --- a/src/Application/ApplicationForm.js +++ b/src/Application/ApplicationForm.js @@ -63,8 +63,8 @@ const ApplicationForm = () => { setGoToPage={setGoToPage} > - - + {/* + */} {
-

Apply for support with West Midlands Cycle Hire costs

+

Apply for support with West Midlands Cycle Hire and Scooter costs

{/* Error message */} diff --git a/src/Application/SubmitSuccess.js b/src/Application/SubmitSuccess.js index b3604ee..8579f79 100644 --- a/src/Application/SubmitSuccess.js +++ b/src/Application/SubmitSuccess.js @@ -54,7 +54,7 @@ const SubmitSuccess = () => { folder before contacting us.

- If you haven’t received an e-mail, contact Ticketing Services: + If you haven’t received an e-mail, contact Customer Services:

  • diff --git a/src/Application/Survey/EthnicGroup.js b/src/Application/Survey/EthnicGroup.js index 792d801..f3ea00a 100644 --- a/src/Application/Survey/EthnicGroup.js +++ b/src/Application/Survey/EthnicGroup.js @@ -38,7 +38,7 @@ const EthnicGroup = ({ setEthnicGroup, setGoToPage }) => { />

    - 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

    diff --git a/src/Application/Survey/Q11Q12Survey.js b/src/Application/Survey/Q11Q12Survey.js index efd0976..4a32793 100644 --- a/src/Application/Survey/Q11Q12Survey.js +++ b/src/Application/Survey/Q11Q12Survey.js @@ -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(() => { @@ -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 ( @@ -49,50 +49,50 @@ const Q11Q12Survey = () => { sectionName="LACF Survey" /> -

    Q13 - Are you: *

    - - +

    Q12 - Are you: *

    + + - {formValues.q13 === "Prefer to self-describe" ? ( + {formValues.q12 === "Prefer to self-describe" ? ( ) : null} -

    Q14 - Which of these age groups do you belong to? *

    - - +

    Q13 - Which of these age groups do you belong to? *

    + + {/* { label="16 – 17" validation={required} value="16 – 17" - fieldName="formData.SurveyData.q14" + fieldName="formData.SurveyData.q13" /> {" "}
    diff --git a/src/Application/Survey/Q13Survey.js b/src/Application/Survey/Q13Survey.js index 33dc9f7..3c4a7a3 100644 --- a/src/Application/Survey/Q13Survey.js +++ b/src/Application/Survey/Q13Survey.js @@ -37,9 +37,9 @@ const Q13Survey = () => { ); diff --git a/src/Application/Survey/Q3Q4Survey.js b/src/Application/Survey/Q3Q4Survey.js index 82593f6..cdb171f 100644 --- a/src/Application/Survey/Q3Q4Survey.js +++ b/src/Application/Survey/Q3Q4Survey.js @@ -110,7 +110,7 @@ const Q3Q4Survey = () => {

    - 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? *

    diff --git a/src/Application/Survey/Q7Q8Q9Q10Survey.js b/src/Application/Survey/Q7Q8Q9Q10Survey.js index 0f0811b..2a5fd8f 100644 --- a/src/Application/Survey/Q7Q8Q9Q10Survey.js +++ b/src/Application/Survey/Q7Q8Q9Q10Survey.js @@ -141,11 +141,11 @@ const Q7Q8Q9Q10Survey = () => { cycling on roads in your local area please provide more detail below:" /> - + /> */} {/*

    Q11 - And how confident do you feel about cycling on roads in your local diff --git a/src/Application/Survey/Q8Survey.js b/src/Application/Survey/Q8Survey.js index 4620e21..60e848f 100644 --- a/src/Application/Survey/Q8Survey.js +++ b/src/Application/Survey/Q8Survey.js @@ -41,31 +41,31 @@ const Q8Survey = () => { />

    - Q20 - How many people, including yourself, currently live in your + Q19 - How many people, including yourself, currently live in your household? *

    -

    q21 - What is your estimated household annual income? *

    +

    q20 - What is your estimated household annual income? *

    { label="Less than £10,000" validation={required} value="Less than £10,000" - fieldName="formData.SurveyData.q21" + fieldName="formData.SurveyData.q20" /> {" "} diff --git a/src/Application/Survey/Q9Survey.js b/src/Application/Survey/Q9Survey.js index d7190f4..52527a7 100644 --- a/src/Application/Survey/Q9Survey.js +++ b/src/Application/Survey/Q9Survey.js @@ -13,14 +13,14 @@ import { required } from "../../common/validation"; const Q9Survey = () => { const stateApi = useFormState(); - const q17error = + const q16error = stateApi.submitFailed && stateApi.hasValidationErrors - ? stateApi.errors?.formData.SurveyData.q17 + ? stateApi.errors?.formData.SurveyData.q16 : null; - const q18error = + const q17error = stateApi.submitFailed && stateApi.hasValidationErrors - ? stateApi.errors?.formData.SurveyData.q18 + ? stateApi.errors?.formData.SurveyData.q17 : null; // const q21error = @@ -66,86 +66,86 @@ const Q9Survey = () => { sectionName="LACF Survey" /> -

    Q17 - How is your health in general? *

    - - +

    Q16 - How is your health in general? *

    + +

    - Q18 - Do you have any physical or mental health conditions or illnesses + Q17 - Do you have any physical or mental health conditions or illnesses lasting or expected to last 12 months or more? *

    - - + + diff --git a/src/Application/Survey/SuveyIntro.js b/src/Application/Survey/SuveyIntro.js index 4220a13..c9a2e97 100644 --- a/src/Application/Survey/SuveyIntro.js +++ b/src/Application/Survey/SuveyIntro.js @@ -11,7 +11,7 @@ const SurveyIntro = () => {

    Cycling for Everyone Cycle and scoot activity survey.

    Thank you for choosing to participate in Cycling for Everyone - Cycle - and scoot. Before you participate in the cycle hire scheme, Transport + and scoot. Before you participate in the scheme, Transport for West Midlands would like to ask you some questions about your current travel and the journeys that you typically make.

    @@ -28,7 +28,7 @@ const SurveyIntro = () => {

    If you decide not to take part in this survey, please close the window - before submitting. This will cancel your application for Cycle for + before submitting. This will cancel your application for Cycling for Everyone.

    Consent

    diff --git a/src/Application/section1/EmploymentStatusGroup.js b/src/Application/section1/EmploymentStatusGroup.js index 5684179..dd31bb2 100644 --- a/src/Application/section1/EmploymentStatusGroup.js +++ b/src/Application/section1/EmploymentStatusGroup.js @@ -62,18 +62,18 @@ const EmploymentStatusGroup = () => { ? stateApi.errors?.formData.Employmentstatus : null; - const q17berror = + const q18berror = stateApi.submitFailed && stateApi.hasValidationErrors - ? stateApi.errors?.formData.SurveyData.q19b + ? stateApi.errors?.formData.SurveyData.q18b : null; // copy q17 value to survey data useEffect(() => { formApi.mutators.setFormAttribute( - "formData.SurveyData.q17", - stateApi.values.q17 + "formData.SurveyData.q18", + stateApi.values.q18 ); - }, [formApi.mutators, stateApi.values.q17]); + }, [formApi.mutators, stateApi.values.q18]); return ( @@ -81,7 +81,7 @@ const EmploymentStatusGroup = () => { sectionPosition="Section 1 of 2" sectionName="About you" /> - + {Object.keys(EmploymentStatusTypes).map((Employmentstatus, index) => ( @@ -90,16 +90,16 @@ const EmploymentStatusGroup = () => { label={EmploymentStatusTypes[Employmentstatus].radioLabel} validation={required} value={EmploymentStatusTypes[Employmentstatus].radioLabel} - fieldName="q19" + fieldName="q18" /> ))} {formValues.q19 === "Other" ? ( ) : null} diff --git a/src/Application/section1/WhereDropdown.js b/src/Application/section1/WhereDropdown.js index 787a0ac..8dfaec3 100644 --- a/src/Application/section1/WhereDropdown.js +++ b/src/Application/section1/WhereDropdown.js @@ -38,7 +38,7 @@ const WhereDropdown = () => { const error = stateApi.submitFailed && stateApi.hasValidationErrors - ? stateApi.errors?.q12 + ? stateApi.errors?.q11 : null; // const errorOther = @@ -49,8 +49,8 @@ const WhereDropdown = () => { // copy q12 value to survey data useEffect(() => { formApi.mutators.setFormAttribute( - "formData.SurveyData.q12", - stateApi.values.q12 + "formData.SurveyData.q11", + stateApi.values.q11 ); }, [formApi.mutators, stateApi.values.q12]); @@ -61,21 +61,21 @@ const WhereDropdown = () => { sectionName="About you" /> - {formValues.q12 === "Other" ? ( + {formValues.q11 === "Other" ? ( { const formState = useFormState(); const addressId = formState.values[prefix]?.addressId; @@ -56,13 +66,22 @@ const AddressDetails = ({ prefix, addresses }) => { defaultValue={matchingAddress["line_3"]} containerClass="hide" /> - */} + ( href="https://www.tfwm.org.uk/plan-your-journey/ways-to-travel/cycling-in-the-west-midlands/cycling-for-everyone/cycle-hire-apply-for-free-minutes/" className="wmnds-breadcrumb__link" > - Cycle Hire - apply for free minutes + Hire - apply for free minutes
  • diff --git a/src/common/TextInput.js b/src/common/TextInput.js index 0fc8785..0c3dba2 100644 --- a/src/common/TextInput.js +++ b/src/common/TextInput.js @@ -42,7 +42,7 @@ TextInput.propTypes = { error: PropTypes.string, containerClass: PropTypes.string, defaultValue: PropTypes.string, - isRequired: PropTypes.bool, + isRequired: PropTypes.string, disab: PropTypes.bool, };