Skip to content

Commit

Permalink
logic to filter existing and new claims
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky saunders committed Sep 22, 2023
1 parent 3c5494f commit 7bd0a75
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
30 changes: 26 additions & 4 deletions app/views/v1/facility-search-for-facility.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@
{% block main %}
{% block beforeContent %}
<div class="govuk-width-container">
<h1 class="govuk-heading-l govuk-!-margin-top-7">Search for a facility to add a start claim</h1>

{% if (data.claimType == 'new') %}

<h1 class="govuk-heading-l govuk-!-margin-top-7">Search for a facility to add a new claim</h1>

{% else %}

<h1 class="govuk-heading-l govuk-!-margin-top-7">Search for a facility to view an existing claim</h1>

{% endif %}

</div>

Expand All @@ -20,7 +27,18 @@ <h1 class="govuk-heading-l govuk-!-margin-top-7">Search for a facility to add a
<div class="homepage-search">
<div class="govuk-width-container">
<h2 class="govuk-heading-m govuk-!-margin-bottom-1">Search for a facility</h2>
<p class="govuk-body govuk-hint"> Enter the facility ID, deal ID or company name.</p>

{% if (data.claimType == 'new') %}

<p class="govuk-body govuk-hint"> Enter the facility ID, deal ID or company name.</p>

{% else %}

<p class="govuk-body govuk-hint"> Enter the existing claim ID, facility ID, deal ID or company name.</p>

{% endif %}


<form method="post" class="horizontal-form" data-test="homepage-search-form" name="facilitySearch">
<div class="govuk-form-group">
<label class="govuk-label" for="keywords">
Expand All @@ -34,11 +52,15 @@ <h2 class="govuk-heading-m govuk-!-margin-bottom-1">Search for a facility</h2>
</label>
<select class="govuk-select" id="location" name="Home-Search" data-test="homepage-search-location">
<option value="Home-Search">Select category</option>

{% if (data.claimType !== 'new') %}
<option value="Claim">Claim ID</option>
{% endif %}
<option value="Facility ">Facility ID</option>
<option value="Deal">Deal ID</option>
<option value="Company">Company name</option>
<option value="Claim">Claim ID</option>



</select>
</div>
<button type="submit" class="govuk-button" data-module="govuk-button">
Expand Down
22 changes: 15 additions & 7 deletions app/views/v1/facility-search-result.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ <h2 class="govuk-heading-s">
</tr>
</thead>
<tbody class="govuk-table__body">
{% if data.claimType =='existing' %}
<tr class="govuk-table__row ">
<td class="govuk-table__cell"><strong><a href="#">12345678</a></strong></td>
<td class="govuk-table__cell">Airbus UK</td>
Expand All @@ -244,6 +245,10 @@ <h2 class="govuk-heading-s">
{% endif %}
View claim</a></td>
</tr>

{% endif %}

{% if data.claimType =='new' %}
<tr class="govuk-table__row ">
<td class="govuk-table__cell"><strong><a href="#">12341037</a></strong></td>
<td class="govuk-table__cell">Lush Cosmetics</td>
Expand All @@ -254,14 +259,16 @@ <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">
{% else %}
<a href="facility-task-list">
{% endif %}
Create new claim</a></td>
</tr>
{% if data.setupShowCardview =='yes' %}
<a href="facility-card-list">
{% else %}
<a href="facility-task-list">
{% endif %}
Create new claim</a></td>
</tr>
{% endif %}

{% if data.claimType =='new' %}
<tr class="govuk-table__row ">
<td class="govuk-table__cell"><strong><a href="#">98212341</a></strong></td>
<td class="govuk-table__cell">Premier furnishings LTD</td>
Expand All @@ -279,6 +286,7 @@ <h2 class="govuk-heading-s">
{% endif %}
Create new claim</a></td>
</tr>
{% endif %}
</tbody>
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/v1/ukef-tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2 class="govuk-heading-m card__heading">
<li class="govuk-grid-column-one-third card-group__item" id="tile_unlock">
<div class="card card--clickable" data-test="manage-prisoner-whereabouts">
<h2 class="govuk-heading-m card__heading">
<a class="govuk-link card__link govuk-link--no-visited-state" href="facility-task-list">
<a class="govuk-link card__link govuk-link--no-visited-state" href="facility-search-for-facility?claimType=existing"">
Manage an existing claim
</a>
</h2>
Expand Down

0 comments on commit 7bd0a75

Please sign in to comment.