-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into view-licence-contact-details-page
- Loading branch information
Showing
10 changed files
with
635 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/services/bill-runs/two-part-tariff/submit-review-bill-run.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict' | ||
|
||
/** | ||
* Updates the session cookie with the filter data needed for the two-part tariff review bill run page | ||
* @module SubmitReviewBillRunService | ||
*/ | ||
|
||
/** | ||
* Updates the session cookie with the filter data needed for the two-part tariff review bill run page | ||
* | ||
* @param {Object} payload The `request.payload` containing the filter data. | ||
* @param {Object} yar - The Hapi `request.yar` session manager passed on by the controller | ||
*/ | ||
async function go (payload, yar) { | ||
const clearFilters = payload?.clearFilters | ||
const filterIssues = payload?.filterIssues | ||
const filterLicenceHolder = payload?.filterLicenceHolder | ||
const filterLicenceStatus = payload?.filterLicenceStatus | ||
|
||
if (clearFilters) { | ||
yar.clear('reviewFilters') | ||
} else { | ||
yar.set('reviewFilters', { | ||
filterIssues, | ||
filterLicenceHolder, | ||
filterLicenceStatus | ||
}) | ||
} | ||
} | ||
|
||
module.exports = { | ||
go | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.