Skip to content

Commit

Permalink
v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jen committed Jul 14, 2019
1 parent 5496b0c commit a2283aa
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 46 deletions.
74 changes: 37 additions & 37 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ router.post('/claimant-reduced-qs-yes-or-no', function (req, res) {
let questionsYesorNo = req.session.data['pc-questions']

if (questionsYesorNo == 'Yes') {
res.redirect('/sex?defendant=false')
res.redirect('/sex?defendant=false&')
} else {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/dashboard/new-dashboard/claimant/all-claims')
}
Expand All @@ -21,7 +21,7 @@ router.post('/defendant-reduced-qs-yes-or-no', function (req, res) {
let questionsYesorNo = req.session.data['pc-questions']

if (questionsYesorNo == 'Yes') {
res.redirect('/sex?defendant=true')
res.redirect('/sex?defendant=true&')
} else {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/dashboard/new-dashboard/defendant/all-claims')
}
Expand All @@ -32,9 +32,9 @@ router.post('/claimant-disability-answer', function (req, res) {
let disabilityInformation = req.session.data['disability-information']

if (disabilityInformation == 'Yes') {
res.redirect('/disability/disability-yes?defendant=false')
res.redirect('/disability/disability-yes?defendant=false&')
} else {
res.redirect('/pregnancy?defendant=false')
res.redirect('/pregnancy?defendant=false&')
}

})
Expand All @@ -43,9 +43,9 @@ router.post('/defendant-disability-answer', function (req, res) {
let disabilityInformation = req.session.data['disability-information']

if (disabilityInformation == 'Yes') {
res.redirect('/disability/disability-yes?defendant=true')
res.redirect('/disability/disability-yes?defendant=true&')
} else {
res.redirect('/pregnancy?defendant=true')
res.redirect('/pregnancy?defendant=true&')
}

})
Expand All @@ -55,10 +55,10 @@ router.post('/claimant-disability-details', function (req, res) {
let disabilityYes = req.session.data['disability-yes']

if (disabilityYes == 'Yes, limited a little' || disabilityYes == 'Yes, limited a lot') {
res.redirect('/disability/disability-yes-detail?defendant=false')
res.redirect('/disability/disability-yes-detail?defendant=false&')
}
else {
res.redirect('/pregnancy?defendant=false')
res.redirect('/pregnancy?defendant=false&')
}

})
Expand All @@ -68,10 +68,10 @@ router.post('/defendant-disability-details', function (req, res) {
let disabilityYes = req.session.data['disability-yes']

if (disabilityYes == 'Yes, limited a little' || disabilityYes == 'Yes, limited a lot') {
res.redirect('/disability/disability-yes-detail?defendant=true')
res.redirect('/disability/disability-yes-detail?defendant=true&')
}
else {
res.redirect('/pregnancy?defendant=true')
res.redirect('/pregnancy?defendant=true&')
}

})
Expand All @@ -80,19 +80,19 @@ router.post('/defendant-ethnicity-answer', function (req, res) {
let ethnicGroup = req.session.data['ethnic-group']

if (ethnicGroup == "Prefer not to say") {
res.redirect('pregnancy?defendant=true')
res.redirect('pregnancy?defendant=true&')
} else if (ethnicGroup == "White") {
res.redirect('ethnic-group/ethnicity-white?defendant=true')
res.redirect('ethnic-group/ethnicity-white?defendant=true&')
} else if (ethnicGroup == "Mixed or multiple ethnic groups") {
res.redirect('ethnic-group/ethnicity-mixed?defendant=true')
res.redirect('ethnic-group/ethnicity-mixed?defendant=true&')
} else if (ethnicGroup == "Asian or Asian British") {
res.redirect('ethnic-group/ethnicity-asian?defendant=true')
res.redirect('ethnic-group/ethnicity-asian?defendant=true&')
} else if (ethnicGroup == "Black, African, Black British or Caribbean") {
res.redirect('ethnic-group/ethnicity-black?defendant=true')
res.redirect('ethnic-group/ethnicity-black?defendant=true&')
} else if (ethnicGroup == "Another ethnic group") {
res.redirect('ethnic-group/ethnicity-another?defendant=true')
res.redirect('ethnic-group/ethnicity-another?defendant=true&')
} else {
res.redirect('pregnancy?defendant=true')
res.redirect('pregnancy?defendant=true&')
}

})
Expand All @@ -101,19 +101,19 @@ router.post('/claimant-ethnicity-answer', function (req, res) {
let ethnicGroup = req.session.data['ethnic-group']

if (ethnicGroup == "Prefer not to say") {
res.redirect('pregnancy?defendant=false')
res.redirect('pregnancy?defendant=false&')
} else if (ethnicGroup == "White") {
res.redirect('ethnic-group/ethnicity-white?defendant=false')
res.redirect('ethnic-group/ethnicity-white?defendant=false&')
} else if (ethnicGroup == "Mixed or multiple ethnic groups") {
res.redirect('ethnic-group/ethnicity-mixed?defendant=false')
res.redirect('ethnic-group/ethnicity-mixed?defendant=false&')
} else if (ethnicGroup == "Asian or Asian British") {
res.redirect('ethnic-group/ethnicity-asian?defendant=false')
res.redirect('ethnic-group/ethnicity-asian?defendant=false&')
} else if (ethnicGroup == "Black, African, Black British or Caribbean") {
res.redirect('ethnic-group/ethnicity-black?defendant=false')
res.redirect('ethnic-group/ethnicity-black?defendant=false&')
} else if (ethnicGroup == "Another ethnic group") {
res.redirect('ethnic-group/ethnicity-another?defendant=false')
res.redirect('ethnic-group/ethnicity-another?defendant=false&')
} else {
res.redirect('pregnancy?defendant=false')
res.redirect('pregnancy?defendant=false&')
}

})
Expand All @@ -123,15 +123,15 @@ router.post('/defendant-ethnicity-answer-reduced', function (req, res) {
if (ethnicGroup == "Prefer not to say") {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/defendant/task-list?confirm_details=complete&')
} else if (ethnicGroup == "White") {
res.redirect('ethnic-group/ethnicity-white?defendant=true')
res.redirect('ethnic-group/ethnicity-white?defendant=true&')
} else if (ethnicGroup == "Mixed or multiple ethnic groups") {
res.redirect('ethnic-group/ethnicity-mixed?defendant=true')
res.redirect('ethnic-group/ethnicity-mixed?defendant=true&')
} else if (ethnicGroup == "Asian or Asian British") {
res.redirect('ethnic-group/ethnicity-asian?defendant=true')
res.redirect('ethnic-group/ethnicity-asian?defendant=true&')
} else if (ethnicGroup == "Black, African, Black British or Caribbean") {
res.redirect('ethnic-group/ethnicity-black?defendant=true')
res.redirect('ethnic-group/ethnicity-black?defendant=true&')
} else if (ethnicGroup == "Another ethnic group") {
res.redirect('ethnic-group/ethnicity-another?defendant=true')
res.redirect('ethnic-group/ethnicity-another?defendant=true&')
} else {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/defendant/task-list?confirm_details=complete&')
}
Expand All @@ -142,15 +142,15 @@ router.post('/claimant-ethnicity-answer-reduced', function (req, res) {
if (ethnicGroup == "Prefer not to say") {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/claimant/task-list?your_details=complete&')
} else if (ethnicGroup == "White") {
res.redirect('ethnic-group/ethnicity-white?defendant=false')
res.redirect('ethnic-group/ethnicity-white?defendant=false&')
} else if (ethnicGroup == "Mixed or multiple ethnic groups") {
res.redirect('ethnic-group/ethnicity-mixed?defendant=false')
res.redirect('ethnic-group/ethnicity-mixed?defendant=false&')
} else if (ethnicGroup == "Asian or Asian British") {
res.redirect('ethnic-group/ethnicity-asian?defendant=false')
res.redirect('ethnic-group/ethnicity-asian?defendant=false&')
} else if (ethnicGroup == "Black, African, Black British or Caribbean") {
res.redirect('ethnic-group/ethnicity-black?defendant=fasle')
} else if (ethnicGroup == "Another ethnic group") {
res.redirect('ethnic-group/ethnicity-another?defendant=false')
res.redirect('ethnic-group/ethnicity-another?defendant=false&')
} else {
res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/claimant/task-list?your_details=complete&')
}
Expand All @@ -163,10 +163,10 @@ router.post('/defendant-english-first-language', function (req, res) {
let language = req.session.data['english-language']

if (language == 'Other') {
res.redirect('/english-level?defendant=true')
res.redirect('/english-level?defendant=true&')
}
else {
res.redirect('/religion?defendant=true')
res.redirect('/religion?defendant=true&')
}
})

Expand All @@ -175,10 +175,10 @@ router.post('/claimant-english-first-language', function (req, res) {
let language = req.session.data['english-language']

if (language == 'Other') {
res.redirect('/english-level?defendant=false')
res.redirect('/english-level?defendant=false&')
}
else {
res.redirect('/religion?defendant=false')
res.redirect('/religion?defendant=false&')
}
})

Expand Down
2 changes: 1 addition & 1 deletion app/views/gender.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="govuk-grid-column-two-thirds">

{% if data['defendant'] == 'true' %}
<form action="/marriage-or-civil-partnership?defendant=true" method="post" novalidate>
<form action="/marriage-or-civil-partnership?defendant=true&" method="post" novalidate>
{% else %}
<form action="/marriage-or-civil-partnership?defendant=false" method="post" novalidate>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions app/views/marriage-or-civil-partnership.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<div class="govuk-grid-column-two-thirds">

{% if data['defendant'] == 'true' %}
<form action="/income?defendant=true" method="post" novalidate>
<form action="/income?defendant=true&" method="post" novalidate>
{% else %}
<form action="/income?defendant=false" method="post" novalidate>
<form action="/income?defendant=false&" method="post" novalidate>
{% endif %}


Expand Down
4 changes: 2 additions & 2 deletions app/views/pregnancy.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<div class="govuk-grid-column-two-thirds">

{% if data['defendant'] == 'true' %}
<form action="/sexual-orientation?defendant=true" method="post" novalidate>
<form action="/sexual-orientation?defendant=true&" method="post" novalidate>
{% else %}
<form action="/sexual-orientation?defendant=false" method="post" novalidate>
<form action="/sexual-orientation?defendant=false&" method="post" novalidate>
{% endif %}


Expand Down
4 changes: 2 additions & 2 deletions app/views/religion.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<div class="govuk-grid-column-two-thirds">

{% if data['defendant'] == 'true' %}
<form action="/disability?defendant=true" method="post" novalidate>
<form action="/disability?defendant=true&" method="post" novalidate>
{% else %}
<form action="/disability?defendant=false" method="post" novalidate>
<form action="/disability?defendant=false&" method="post" novalidate>
{% endif %}


Expand Down
4 changes: 2 additions & 2 deletions app/views/sexual-orientation.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<div class="govuk-grid-column-two-thirds">

{% if data['defendant'] == 'true' %}
<form action="/gender?defendant=true" method="post" novalidate>
<form action="/gender?defendant=true&" method="post" novalidate>
{% else %}
<form action="/gender?defendant=false" method="post" novalidate>
<form action="/gender?defendant=false&" method="post" novalidate>
{% endif %}

{% set otherOtherHtml %}
Expand Down

0 comments on commit a2283aa

Please sign in to comment.