Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishewison1983 committed Jan 25, 2022
1 parent 2c74ad1 commit c160c62
Show file tree
Hide file tree
Showing 8 changed files with 413 additions and 222 deletions.
24 changes: 14 additions & 10 deletions app/assets/javascripts/application-GENERAL.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,21 @@ $('.clear-selection').on("click", function (e) {
});

$('#applications-action').on("click", function (e) {
// $('.applications-selected .number').text('0');
$('.clear-selection').hide();
// if ($('#type-of-action').val() == 'shortlist') {
// $('#applications_actions_form').attr("action", '5C-pledge-details');
// } else if ($('#type-of-action').val() == 'approve') {
// $('#applications_actions_form').attr("action", '10A-approval');
// } else if ($('#type-of-action').val() == 'reject') {
// $('#applications_actions_form').attr("action", '11-reject');
// } else if ($('#type-of-action').val() == 'remove-from-shortlist') {
// $('#applications_actions_form').attr("action", '9-shortlist');
// }
});

$('#applications-action-multiple').on("click", function (e) {
$('.applications-selected .number').text('0');
$('.clear-selection').hide();
if ($('#type-of-action').val() == 'shortlist') {
$('#applications_actions_form').attr("action", '5C-pledge-details');
} else if ($('#type-of-action').val() == 'approve') {
$('#applications_actions_form').attr("action", '10A-approval');
} else if ($('#type-of-action').val() == 'reject') {
$('#applications_actions_form').attr("action", '11-reject');
} else if ($('#type-of-action').val() == 'remove-from-shortlist') {
$('#applications_actions_form').attr("action", '9-shortlist');
}
});


Expand Down
281 changes: 191 additions & 90 deletions app/assets/javascripts/my-cookies-APPLICATIONS.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,105 @@
/// APPLICATION
$('#applications-action').on("click", function (e) {

// REJECTED ITEMS
// if ($('#type-of-action').val() == 'reject') {}
$.cookie("number_of_applications_rejected", parseInt($(":checkbox:checked").length), {path:'/'});

if ($('input[id=application_select_1]').is(':checked')) {
$.cookie("application_select_1", 'rejected', {path:'/'});
}
if ($('input[id=application_select_2]').is(':checked')) {
$.cookie("application_select_2", 'rejected', {path:'/'});
}
if ($('input[id=application_select_3]').is(':checked')) {
$.cookie("application_select_3", 'rejected', {path:'/'});
}
if ($('input[id=application_select_4]').is(':checked')) {
$.cookie("application_select_4", 'rejected', {path:'/'});
}
if ($('input[id=application_select_5]').is(':checked')) {
$.cookie("application_select_5", 'rejected', {path:'/'});
}
if ($('input[id=application_select_6]').is(':checked')) {
$.cookie("application_select_6", 'rejected', {path:'/'});
}
if ($('input[id=application_select_7]').is(':checked')) {
$.cookie("application_select_7", 'rejected', {path:'/'});
}
if ($('input[id=application_select_8]').is(':checked')) {
$.cookie("application_select_8", 'rejected', {path:'/'});
}
if ($('input[id=application_select_9]').is(':checked')) {
$.cookie("application_select_9", 'rejected', {path:'/'});
}
if ($('input[id=application_select_10]').is(':checked')) {
$.cookie("application_select_10", 'rejected', {path:'/'});
}
if ($('input[id=application_select_11]').is(':checked')) {
$.cookie("application_select_11", 'rejected', {path:'/'});
}
if ($('input[id=application_select_12]').is(':checked')) {
$.cookie("application_select_12", 'rejected', {path:'/'});
}
if ($('input[id=application_select_13]').is(':checked')) {
$.cookie("application_select_13", 'rejected', {path:'/'});
}
if ($('input[id=application_select_14]').is(':checked')) {
$.cookie("application_select_14", 'rejected', {path:'/'});
}
if ($('input[id=application_select_15]').is(':checked')) {
$.cookie("application_select_15", 'rejected', {path:'/'});
}
if ($('input[id=application_select_16]').is(':checked')) {
$.cookie("application_select_16", 'rejected', {path:'/'});
}
if ($('input[id=application_select_17]').is(':checked')) {
$.cookie("application_select_17", 'rejected', {path:'/'});
}
if ($('input[id=application_select_18]').is(':checked')) {
$.cookie("application_select_18", 'rejected', {path:'/'});
}
if ($('input[id=application_select_19]').is(':checked')) {
$.cookie("application_select_19", 'rejected', {path:'/'});
}
if ($('input[id=application_select_20]').is(':checked')) {
$.cookie("application_select_20", 'rejected', {path:'/'});
}
if ($('input[id=application_select_21]').is(':checked')) {
$.cookie("application_select_21", 'rejected', {path:'/'});
}
if ($('input[id=application_select_22]').is(':checked')) {
$.cookie("application_select_22", 'rejected', {path:'/'});
}
if ($('input[id=application_select_23]').is(':checked')) {
$.cookie("application_select_23", 'rejected', {path:'/'});
}
if ($('input[id=application_select_24]').is(':checked')) {
$.cookie("application_select_24", 'rejected', {path:'/'});
}
if ($('input[id=application_select_25]').is(':checked')) {
$.cookie("application_select_25", 'rejected', {path:'/'});
}
if ($('input[id=application_select_26]').is(':checked')) {
$.cookie("application_select_26", 'rejected', {path:'/'});
}
if ($('input[id=application_select_27]').is(':checked')) {
$.cookie("application_select_27", 'rejected', {path:'/'});
}
if ($('input[id=application_select_28]').is(':checked')) {
$.cookie("application_select_28", 'rejected', {path:'/'});
}
if ($('input[id=application_select_29]').is(':checked')) {
$.cookie("application_select_29", 'rejected', {path:'/'});
}
if ($('input[id=application_select_30]').is(':checked')) {
$.cookie("application_select_30", 'rejected', {path:'/'});
}

});

$('#applications-action-multiple').on("click", function (e) {

// SHORTLIST ITEMS
if ($('#type-of-action').val() == 'shortlist') {
$.cookie("shortlist_active", true, {path:'/'});
Expand Down Expand Up @@ -100,97 +199,99 @@ $('#applications-action').on("click", function (e) {

// REJECTED ITEMS
// if ($('#type-of-action').val() == 'reject') {}
$.cookie("number_of_applications_rejected", parseInt($(":checkbox:checked").length), {path:'/'});
if ($('#type-of-action').val() == 'reject') {
$.cookie("number_of_applications_rejected", parseInt($(":checkbox:checked").length), {path:'/'});

if ($('input[id=application_select_1]').is(':checked')) {
$.cookie("application_select_1", 'rejected', {path:'/'});
}
if ($('input[id=application_select_2]').is(':checked')) {
$.cookie("application_select_2", 'rejected', {path:'/'});
}
if ($('input[id=application_select_3]').is(':checked')) {
$.cookie("application_select_3", 'rejected', {path:'/'});
}
if ($('input[id=application_select_4]').is(':checked')) {
$.cookie("application_select_4", 'rejected', {path:'/'});
}
if ($('input[id=application_select_5]').is(':checked')) {
$.cookie("application_select_5", 'rejected', {path:'/'});
}
if ($('input[id=application_select_6]').is(':checked')) {
$.cookie("application_select_6", 'rejected', {path:'/'});
}
if ($('input[id=application_select_7]').is(':checked')) {
$.cookie("application_select_7", 'rejected', {path:'/'});
}
if ($('input[id=application_select_8]').is(':checked')) {
$.cookie("application_select_8", 'rejected', {path:'/'});
}
if ($('input[id=application_select_9]').is(':checked')) {
$.cookie("application_select_9", 'rejected', {path:'/'});
}
if ($('input[id=application_select_10]').is(':checked')) {
$.cookie("application_select_10", 'rejected', {path:'/'});
}
if ($('input[id=application_select_11]').is(':checked')) {
$.cookie("application_select_11", 'rejected', {path:'/'});
}
if ($('input[id=application_select_12]').is(':checked')) {
$.cookie("application_select_12", 'rejected', {path:'/'});
}
if ($('input[id=application_select_13]').is(':checked')) {
$.cookie("application_select_13", 'rejected', {path:'/'});
}
if ($('input[id=application_select_14]').is(':checked')) {
$.cookie("application_select_14", 'rejected', {path:'/'});
}
if ($('input[id=application_select_15]').is(':checked')) {
$.cookie("application_select_15", 'rejected', {path:'/'});
}
if ($('input[id=application_select_16]').is(':checked')) {
$.cookie("application_select_16", 'rejected', {path:'/'});
}
if ($('input[id=application_select_17]').is(':checked')) {
$.cookie("application_select_17", 'rejected', {path:'/'});
}
if ($('input[id=application_select_18]').is(':checked')) {
$.cookie("application_select_18", 'rejected', {path:'/'});
}
if ($('input[id=application_select_19]').is(':checked')) {
$.cookie("application_select_19", 'rejected', {path:'/'});
}
if ($('input[id=application_select_20]').is(':checked')) {
$.cookie("application_select_20", 'rejected', {path:'/'});
}
if ($('input[id=application_select_21]').is(':checked')) {
$.cookie("application_select_21", 'rejected', {path:'/'});
}
if ($('input[id=application_select_22]').is(':checked')) {
$.cookie("application_select_22", 'rejected', {path:'/'});
}
if ($('input[id=application_select_23]').is(':checked')) {
$.cookie("application_select_23", 'rejected', {path:'/'});
}
if ($('input[id=application_select_24]').is(':checked')) {
$.cookie("application_select_24", 'rejected', {path:'/'});
}
if ($('input[id=application_select_25]').is(':checked')) {
$.cookie("application_select_25", 'rejected', {path:'/'});
}
if ($('input[id=application_select_26]').is(':checked')) {
$.cookie("application_select_26", 'rejected', {path:'/'});
}
if ($('input[id=application_select_27]').is(':checked')) {
$.cookie("application_select_27", 'rejected', {path:'/'});
}
if ($('input[id=application_select_28]').is(':checked')) {
$.cookie("application_select_28", 'rejected', {path:'/'});
}
if ($('input[id=application_select_29]').is(':checked')) {
$.cookie("application_select_29", 'rejected', {path:'/'});
}
if ($('input[id=application_select_30]').is(':checked')) {
$.cookie("application_select_30", 'rejected', {path:'/'});
if ($('input[id=application_select_1]').is(':checked')) {
$.cookie("application_select_1", 'rejected', {path:'/'});
}
if ($('input[id=application_select_2]').is(':checked')) {
$.cookie("application_select_2", 'rejected', {path:'/'});
}
if ($('input[id=application_select_3]').is(':checked')) {
$.cookie("application_select_3", 'rejected', {path:'/'});
}
if ($('input[id=application_select_4]').is(':checked')) {
$.cookie("application_select_4", 'rejected', {path:'/'});
}
if ($('input[id=application_select_5]').is(':checked')) {
$.cookie("application_select_5", 'rejected', {path:'/'});
}
if ($('input[id=application_select_6]').is(':checked')) {
$.cookie("application_select_6", 'rejected', {path:'/'});
}
if ($('input[id=application_select_7]').is(':checked')) {
$.cookie("application_select_7", 'rejected', {path:'/'});
}
if ($('input[id=application_select_8]').is(':checked')) {
$.cookie("application_select_8", 'rejected', {path:'/'});
}
if ($('input[id=application_select_9]').is(':checked')) {
$.cookie("application_select_9", 'rejected', {path:'/'});
}
if ($('input[id=application_select_10]').is(':checked')) {
$.cookie("application_select_10", 'rejected', {path:'/'});
}
if ($('input[id=application_select_11]').is(':checked')) {
$.cookie("application_select_11", 'rejected', {path:'/'});
}
if ($('input[id=application_select_12]').is(':checked')) {
$.cookie("application_select_12", 'rejected', {path:'/'});
}
if ($('input[id=application_select_13]').is(':checked')) {
$.cookie("application_select_13", 'rejected', {path:'/'});
}
if ($('input[id=application_select_14]').is(':checked')) {
$.cookie("application_select_14", 'rejected', {path:'/'});
}
if ($('input[id=application_select_15]').is(':checked')) {
$.cookie("application_select_15", 'rejected', {path:'/'});
}
if ($('input[id=application_select_16]').is(':checked')) {
$.cookie("application_select_16", 'rejected', {path:'/'});
}
if ($('input[id=application_select_17]').is(':checked')) {
$.cookie("application_select_17", 'rejected', {path:'/'});
}
if ($('input[id=application_select_18]').is(':checked')) {
$.cookie("application_select_18", 'rejected', {path:'/'});
}
if ($('input[id=application_select_19]').is(':checked')) {
$.cookie("application_select_19", 'rejected', {path:'/'});
}
if ($('input[id=application_select_20]').is(':checked')) {
$.cookie("application_select_20", 'rejected', {path:'/'});
}
if ($('input[id=application_select_21]').is(':checked')) {
$.cookie("application_select_21", 'rejected', {path:'/'});
}
if ($('input[id=application_select_22]').is(':checked')) {
$.cookie("application_select_22", 'rejected', {path:'/'});
}
if ($('input[id=application_select_23]').is(':checked')) {
$.cookie("application_select_23", 'rejected', {path:'/'});
}
if ($('input[id=application_select_24]').is(':checked')) {
$.cookie("application_select_24", 'rejected', {path:'/'});
}
if ($('input[id=application_select_25]').is(':checked')) {
$.cookie("application_select_25", 'rejected', {path:'/'});
}
if ($('input[id=application_select_26]').is(':checked')) {
$.cookie("application_select_26", 'rejected', {path:'/'});
}
if ($('input[id=application_select_27]').is(':checked')) {
$.cookie("application_select_27", 'rejected', {path:'/'});
}
if ($('input[id=application_select_28]').is(':checked')) {
$.cookie("application_select_28", 'rejected', {path:'/'});
}
if ($('input[id=application_select_29]').is(':checked')) {
$.cookie("application_select_29", 'rejected', {path:'/'});
}
if ($('input[id=application_select_30]').is(':checked')) {
$.cookie("application_select_30", 'rejected', {path:'/'});
}
}

// APPROVED ITEMS
Expand Down
19 changes: 0 additions & 19 deletions app/views/sprint-26/MVS/sender/STEP-14/5-pledge-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -1030,33 +1030,14 @@ <h3 class="govuk-heading-l">
<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-form-group">
<!-- <span class="shortlist-button applications-selected">
<span class="number">0</span>
<div>Selected</div>
</span> -->
</div>
<div class="govuk-form-group">
<form class="" action="6-reject" method="post" id="applications_actions_form">
<p>Reject selected applications:</p>
<!-- <select class="govuk-select" id="type-of-action" name="type-of-action">
<option value="All actions" selected="true" disabled="disabled">-- Actions --</option>
<option disabled="disabled">-----------------------</option>
<option value="approve">Approve applications</option>
<option value="shortlist">Add to shortlist</option>
<option value="reject">Reject applications</option>
</select> -->
<button class="govuk-button" data-module="govuk-button" id="applications-action">Continue</button>
</form>
</div>
<p class="float-right"><a class="clear-selection">Clear selection</a></p>
</div>
<!-- <div class="govuk-grid-column-one-third">
<a href="9-shortlist" class="shortlist-button float-right">
<span class="number">0</span>
<div>View shortlist</div>
</a>
</div> -->
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3 class="govuk-heading-l">
<option value="shortlist">Add to shortlist</option>
<option value="reject">Reject applications</option>
</select>
<button class="govuk-button" data-module="govuk-button" id="applications-action">Continue</button>
<button class="govuk-button" data-module="govuk-button" id="applications-action-multiple">Continue</button>
</form>
</div>
<p><a class="clear-selection">Clear selection</a></p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sprint-26/Post-MVS/ALERTS/1-my-account.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h3 class="govuk-heading-s">Help us improve this service</h3>

<div class="tasks-section">
<h4 class="govuk-heading-s">Tasks</h4>
<p><a href="#"><span class="number">1</span> Transfer pledge application awaiting your approval</a></p>
<p><span class="number">1</span> Transfer pledge application awaiting your approval - <a href="#">view</a></p>
<!--
<p><a href="#"><span class="number">1</span> Transfer application has been cancelled</a></p>
<p><a href="#"><span class="number">3</span> You have had some pledge applications</a></p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sprint-26/Post-MVS/ALERTS/2-my-account.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h3 class="govuk-heading-s">Help us improve this service</h3>

<div class="tasks-section">
<h4 class="govuk-heading-s">Tasks</h4>
<p><a href="#"><span class="number">3</span> Approved transfer pledge funds available to use</a></p>
<p><span class="number">3</span> Approved transfer pledge funds available to use - <a href="#">view</a></p>
</div>

</div>
Expand Down
Loading

0 comments on commit c160c62

Please sign in to comment.