Skip to content

Commit

Permalink
Added are you sure page when starting new claim
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky saunders committed Sep 22, 2023
1 parent 69f921e commit 814226c
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 11 deletions.
13 changes: 13 additions & 0 deletions app/routes/routes-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,18 @@ router.post(version +'/facility-search-for-facility', function(req, res) {
}
});

router.post(version +'/are-you-sure-create-new-claim', function(req, res) {
{
if (req.session.data.cancelClaimCreation =='yes'){

res.redirect(version +'/facility-card-list')
}
else{
res.redirect(version +'/facility-search-result')
}
}
});



}
57 changes: 57 additions & 0 deletions app/views/v1/are-you-sure-create-new-claim.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{% extends "layout.html" %}

{% block main %}
{% block beforeContent %}
<div class="govuk-width-container">
<nav class="govuk-!-display-none-print">
{{govukBackLink({
text: "Back",
"href": "javascript: window.history.go(-1)"
})}}
<a href="ukef-tiles.html" class="govuk-link govuk-link--no-visited-state govuk-!-margin-top-3 govuk-!-margin-bottom-3 float-right">
</a>
</nav>
{% endblock %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">

<h1 class="govuk-heading-xl govuk-!-margin-bottom-4" style="margin-left:10px;">

Are you sure you wish to create a new claim?

</h1><br />
</div>
<div class="govuk-grid-column-two-thirds">
<form method="post">
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="changed-name-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
</h1>
</legend>

<div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changed-name" name="cancelClaimCreation" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="changed-name">
Yes
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changed-name-2" name="cancelClaimCreation" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="changed-name-2">
No
</label>
</div>
</div>
</fieldset>
</div>
<button class="govuk-button" data-module="govuk-button">
Confirm
</button>
<!-- <input type="hidden" name="cancelClaimCreation" value="false">-->
</form>
</div>
</div>
</div>
{% endblock %}
15 changes: 4 additions & 11 deletions app/views/v1/facility-search-result.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ <h2 class="govuk-heading-s">
<span class="govuk-tag govuk-tag--grey">N/A</span></td>
<td class="govuk-table__cell">

{% if data.setupShowCardview =='yes' %}
<a href="facility-card-list?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">
{% else %}
<a href="facility-task-list?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">
{% endif %}
<a href="are-you-sure-create-new-claim?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">
<!-- <a href="facility-card-list?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">-->
<!-- <a href="facility-task-list?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">-->
Create new claim</a></td>
</tr>
{% endif %}
Expand All @@ -274,12 +272,7 @@ <h2 class="govuk-heading-s">
<td class="govuk-table__cell ">
<span class="govuk-tag govuk-tag--grey">N/A</span></td>
<td class="govuk-table__cell">

{% if data.setupShowCardview =='yes' %}
<a href="facility-card-list?company=Premier Furnishings&buyer=Jeffersons Home Mart&bank=Barclays&facility=98212341&deal=28181034&address1=99 Straits Avenue&address2=Bracknell&address3=Berkshire&address4=SL6 7PJ&email=ramesh.kham@premierfurnishings.com&phone=01766 344333">
{% else %}
<a href="facility-task-list?company=Lush Costmetics&buyer=Body Shop&bank=HSBC&facility=12341037&deal=87256276&address1=71 High Street&address2=Poole&address3=Dorset&address4=BH7 7HN&email=head@lush.com&phone=01202 779671">
{% endif %}
<a href="are-you-sure-create-new-claim?company=Premier Furnishings&buyer=Jeffersons Home Mart&bank=Barclays&facility=98212341&deal=28181034&address1=99 Straits Avenue&address2=Bracknell&address3=Berkshire&address4=SL6 7PJ&email=ramesh.kham@premierfurnishings.com&phone=01766 344333">
Create new claim</a></td>
</tr>
{% endif %}
Expand Down

0 comments on commit 814226c

Please sign in to comment.