diff --git a/app/controllers/return-requirements.controller.js b/app/controllers/return-requirements.controller.js index 3a36681762..b75eaca00d 100644 --- a/app/controllers/return-requirements.controller.js +++ b/app/controllers/return-requirements.controller.js @@ -140,6 +140,17 @@ async function saveNote (request, h) { return h.redirect(`/system/return-requirements/${id}/returns-check-your-answers`) } +async function returnsFrequency (request, h) { + const { sessionId } = request.params + + const session = await SessionModel.query().findById(sessionId) + + return h.view('return-requirements/frequency.njk', { + activeNavBar: 'search', + ...session + }) +} + async function returnsSettings (request, h) { const { sessionId } = request.params @@ -183,6 +194,7 @@ module.exports = { returnsCheckYourAnswers, returnsSettings, returnsHowDoYouWant, + returnsFrequency, saveNoReturnsCheckYourAnswers, saveNoReturnsRequired, saveNote, diff --git a/app/routes/return-requirement.routes.js b/app/routes/return-requirement.routes.js index e4b6539ac8..39289b5336 100644 --- a/app/routes/return-requirement.routes.js +++ b/app/routes/return-requirement.routes.js @@ -183,6 +183,18 @@ const routes = [ }, description: 'Save note' } + }, { + method: 'GET', + path: '/return-requirements/{sessionId}/frequency', + handler: ReturnRequirementsController.returnsFrequency, + options: { + auth: { + access: { + scope: ['billing'] + } + }, + description: 'Returns Select how often collected readings or volumes are reported page' + } }, { method: 'GET', path: '/return-requirements/{sessionId}/settings', diff --git a/app/views/return-requirements/frequency.njk b/app/views/return-requirements/frequency.njk new file mode 100644 index 0000000000..1e338f274c --- /dev/null +++ b/app/views/return-requirements/frequency.njk @@ -0,0 +1,29 @@ +{% extends 'layout.njk' %} +{% from "govuk/components/back-link/macro.njk" import govukBackLink %} +{% from "govuk/components/button/macro.njk" import govukButton %} + +{% set title = "Select how often collected readings or volumes are reported" %} +{% set rootLink = "/system/return-requirements/" + id %} + +{% block breadcrumbs %} + {# Back link #} + {{ + govukBackLink({ + text: 'Back', + href: rootLink + "/frequency-collected" + }) + }} +{% endblock %} + +{% block content %} + {# Main heading #} +