Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dl/hto 6536 alternative additional costs #26

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/views/alpha/_portal-routes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
module.exports = function (folderForViews, urlPrefix, router) {

router.post('/start-journey', function (req, res) {

if (req.session.data['journey-type'] == "additionalcosts") {
req.session.data['journey-type'] = "supportworker"
req.session.data['additional-costs-journey'] = true
}
else {
req.session.data['additional-costs-journey'] = false
}
if (req.session.data['journey-type'] == "multipleawards") {
req.session.data['multiple-awards'] = true
req.session.data['multiple-employers'] = false
36 changes: 36 additions & 0 deletions app/views/alpha/support-worker/_support-worker-routes.js
Original file line number Diff line number Diff line change
@@ -992,6 +992,7 @@ module.exports = function (folderForViews, urlPrefix, router) {
const cost = req.session.data['cost-of-support']
const journeytype = req.session.data['journey-type']
const checked = req.session.data['contact-confirmed']
const acjourney = req.session.data['additional-costs-journey']

if (cost === '100') {
res.redirect(`/${urlPrefix}/support-worker/employer-contribution`)
@@ -1000,8 +1001,43 @@ module.exports = function (folderForViews, urlPrefix, router) {
} else if (journeytype === 'supportworker' && checked) {
res.redirect(`/${urlPrefix}/support-worker/check-your-answers`)
} else if (journeytype === 'supportworker') {
if (acjourney){
res.redirect(`/${urlPrefix}/support-worker/additional-costs`)
}
else{
res.redirect(`/${urlPrefix}/support-worker/providing-evidence`)
}
}
})

router.post('/support-worker/additional-costs', function (req, res) {
const claimAdditionalCosts = req.session.data['claim-additional-costs']

if (claimAdditionalCosts == 'yes'){
res.redirect(`/${urlPrefix}/support-worker/additional-cost-types`)
}
else {
res.redirect(`/${urlPrefix}/support-worker/providing-evidence`)
}

})

router.post('/support-worker/additional-cost-types', function (req, res) {
const additionalCostTypes = req.session.data['additional-cost-types']

if (additionalCostTypes == 'none'){
res.redirect(`/${urlPrefix}/support-worker/providing-evidence`)
}
else {
res.redirect(`/${urlPrefix}/support-worker/claim-additional-costs`)
}

})

router.post('/support-worker/claim-additional-costs', function (req, res) {
const change = req.session.data['change-cost']

res.redirect(`/${urlPrefix}/support-worker/providing-evidence`)
})

router.post('/support-worker/change-cost-answer', function (req, res) {
60 changes: 60 additions & 0 deletions app/views/alpha/support-worker/additional-cost-types.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{% extends "layout.html" %}

{% block pageTitle %}
Claim money back from Access to Work
{% endblock %}

{% from "govuk/components/checkboxes/macro.njk" import govukCheckboxes %}

{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<form action="#" method="post" class="form">

{{ govukCheckboxes({
name: "additional-cost-types",
fieldset: {
legend: {
text: "What additional costs do you need to claim for?",
isPageHeading: true,
classes: "govuk-fieldset__legend--l"
}
},
hint: {
text: "Select all additional costs that apply to this support worker claim"
},
items: [
{
value: "travel",
text: "Travel"
},
{
value: "accommodation",
text: "Accomodation"
},
{
value: "food",
text: "Food"
},
{
divider: "or"
},
{
value: "none",
text: "I do not need to claim for any additional costs",
behaviour: "exclusive"
}
]
}) }}

<button type="submit" class="govuk-button" data-module="govuk-button">
Continue
</button>

</form>
</div>
</div>


{% endblock %}
48 changes: 48 additions & 0 deletions app/views/alpha/support-worker/additional-costs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends "layout.html" %}

{% block pageTitle %}
Claim money back from Access to Work
{% endblock %}

{% from "govuk/components/checkboxes/macro.njk" import govukCheckboxes %}

{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<form action="#" method="post" class="form">

{% from "govuk/components/radios/macro.njk" import govukRadios %}

{{ govukRadios({
classes: "govuk-radios--inline",
name: "claim-additional-costs",
fieldset: {
legend: {
text: "Do you claim for additional costs?",
isPageHeading: true,
classes: "govuk-fieldset__legend--l"
}
},
items: [
{
value: "yes",
text: "Yes"
},
{
value: "no",
text: "No"
}
]
}) }}

<button type="submit" class="govuk-button" data-module="govuk-button">
Continue
</button>

</form>
</div>
</div>


{% endblock %}
87 changes: 87 additions & 0 deletions app/views/alpha/support-worker/check-your-answers-body.html
Original file line number Diff line number Diff line change
@@ -199,6 +199,93 @@ <h2 class="govuk-summary-card__title">Total hours and costs</h2>
</div>
</div>

{% if ((data['additional-cost-types'] != 'none') and (data['claim-additional-costs'] == 'yes') and (data['additional-costs-journey'])) %}

<div class="govuk-summary-card">
<div class="govuk-summary-card__title-wrapper">
<h2 class="govuk-summary-card__title">Additional costs</h2>
</div>
<div class="govuk-summary-card__content">

<table class="govuk-summary-list govuk-!-margin-bottom-0">
<tbody class="govuk-summary-list">

{% if data['additional-cost-types'].includes('travel') %}
<tr class="govuk-summary-list__row">
<th scope="row" class="govuk-summary-list__key">
Travel costs
</th>
<td class="govuk-summary-list__value">
£{{data['travelcosts']}}
</td>

{% if print != true %}
<td class="govuk-summary-list__actions govuk-!-display-none-print">
{% if (data['view-claim']) %}
{% else %}
<a href="additional-cost-types.html">
Change
<span class="govuk-visually-hidden"> cost of travel</span>
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endif %}

{% if data['additional-cost-types'].includes('accommodation') %}
<tr class="govuk-summary-list__row">
<th scope="row" class="govuk-summary-list__key">
Accomodation costs
</th>
<td class="govuk-summary-list__value">
£{{data['accommodationcosts']}}
</td>

{% if print != true %}
<td class="govuk-summary-list__actions govuk-!-display-none-print">
{% if (data['view-claim']) %}
{% else %}
<a href="additional-cost-types.html">
Change
<span class="govuk-visually-hidden"> cost of accommodation</span>
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endif %}

{% if data['additional-cost-types'].includes('food') %}
<tr class="govuk-summary-list__row">
<th scope="row" class="govuk-summary-list__key">
Food costs
</th>
<td class="govuk-summary-list__value">
£{{data['foodcosts']}}
</td>

{% if print != true %}
<td class="govuk-summary-list__actions govuk-!-display-none-print">
{% if (data['view-claim']) %}
{% else %}
<a href="additional-cost-types.html">
Change
<span class="govuk-visually-hidden"> cost of food</span>
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endif %}
</tbody>
</table>

</div>
</div>

{% endif %}

{%if (data['journey-type'] == "traveltowork-ammendment") or (data['sw-declaration']) %}

{% elseif (data['existing-payee'] == "one") or (data['existing-payee'] == "two") or (data['existing-payee'] ==
77 changes: 77 additions & 0 deletions app/views/alpha/support-worker/claim-additional-costs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{% extends "layout.html" %}

{% block pageTitle %}
Claim money back from Access to Work
{% endblock %}

{% from "govuk/components/checkboxes/macro.njk" import govukCheckboxes %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">Additional costs</h1>
<form action="#" method="post" class="form">

{% if data['additional-cost-types'].includes('travel') %}

{{ govukInput({
label: {
text: "What is the total travel costs for this claim, in pounds?",
classes: "govuk-label--s"
},
prefix: {
text: "£"
},
classes: "govuk-input--width-5",
id: "travel-costs",
name: "travelcosts"
}) }}

{% endif %}

{% if data['additional-cost-types'].includes('accommodation') %}

{{ govukInput({
label: {
text: "What is the total accommodation costs for this claim, in pounds?",
classes: "govuk-label--s"
},
prefix: {
text: "£"
},
classes: "govuk-input--width-5",
id: "accommodation-costs",
name: "accommodationcosts"
}) }}

{% endif %}

{% if data['additional-cost-types'].includes('food') %}

{{ govukInput({
label: {
text: "What is the total food costs for this claim, in pounds?",
classes: "govuk-label--s"
},
prefix: {
text: "£"
},
classes: "govuk-input--width-5",
id: "food-costs",
name: "foodcosts"
}) }}

{% endif %}

<button type="submit" class="govuk-button" data-module="govuk-button">
Continue
</button>

</form>
</div>
</div>


{% endblock %}
29 changes: 26 additions & 3 deletions app/views/alpha/support-worker/cost-of-support.html
Original file line number Diff line number Diff line change
@@ -13,13 +13,12 @@
<div class="govuk-grid-column-two-thirds">
<form action="cost-of-support-answer" method="post" class="form">

{% if data['additional-costs-journey'] %}

{{ govukInput({
id: "cost-of-support",
name: "cost-of-support",
value: data['cost-of-support'],
hint: {
text: "Include any related costs like travel or accommodation for your support worker your grant covers."
},
label: {
text: "How much did your support cost in total, in pounds?",
classes: "govuk-label--l",
@@ -32,6 +31,30 @@
spellcheck: false
}) }}

{% else %}

{{ govukInput({
id: "cost-of-support",
name: "cost-of-support",
value: data['cost-of-support'],
hint: {
text: "Include any related costs like travel or accommodation for your support worker your grant covers."
},
label: {
text: "How much did your support cost in total, in pounds?",
classes: "govuk-label--l",
isPageHeading: true
},
prefix: {
text: "£"
},
classes: "govuk-input--width-5",
spellcheck: false
}) }}

{% endif %}


<button type="submit" class="govuk-button" data-module="govuk-button">
Continue
</button>
7 changes: 6 additions & 1 deletion app/views/index.html
Original file line number Diff line number Diff line change
@@ -57,14 +57,19 @@ <h2 class="govuk-heading-m">Current journeys</h2>
</form>



<form action="alpha/start-journey" method="post" class="form">
<input type="hidden" id="journey-type" name="journey-type" value="supportworker">
<button type="submit" class="govuk-button" data-module="govuk-button">
Support worker
</button>
</form>

<form action="alpha/start-journey" method="post" class="form">
<input type="hidden" id="journey-type" name="journey-type" value="additionalcosts">
<button type="submit" class="govuk-button" data-module="govuk-button">
Additional costs
</button>
</form>

<form action="alpha/start-journey" method="post" class="form">
<input type="hidden" id="journey-type" name="journey-type" value="specialaidsandequipment">