From 03e13503ab02ebc5b7c936a39c4258490493026a Mon Sep 17 00:00:00 2001 From: james-peacock-gds <114914553+james-peacock-gds@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:06:52 +0000 Subject: [PATCH] PP-13312 route, controller and template (#4367) --- .../settings/card-types/card-types.controller.js | 9 +++++++++ app/controllers/simplified-account/settings/index.js | 1 + app/simplified-account-routes.js | 3 +++ .../simplified-account/settings/card-types/index.njk | 8 ++++++++ 4 files changed, 21 insertions(+) create mode 100644 app/controllers/simplified-account/settings/card-types/card-types.controller.js create mode 100644 app/views/simplified-account/settings/card-types/index.njk diff --git a/app/controllers/simplified-account/settings/card-types/card-types.controller.js b/app/controllers/simplified-account/settings/card-types/card-types.controller.js new file mode 100644 index 000000000..199f1a357 --- /dev/null +++ b/app/controllers/simplified-account/settings/card-types/card-types.controller.js @@ -0,0 +1,9 @@ +const { response } = require('@utils/response') + +function get (req, res) { + response(req, res, 'simplified-account/settings/card-types/index', { }) +} + +module.exports = { + get +} diff --git a/app/controllers/simplified-account/settings/index.js b/app/controllers/simplified-account/settings/index.js index 675313af5..d10a34865 100644 --- a/app/controllers/simplified-account/settings/index.js +++ b/app/controllers/simplified-account/settings/index.js @@ -3,3 +3,4 @@ module.exports.emailNotifications = require('./email-notifications/email-notific module.exports.stripeDetails = require('./stripe-details/stripe-details.controller') module.exports.teamMembers = require('./team-members/team-members.controller') module.exports.organisationDetails = require('./organisation-details/organisation-details.controller') +module.exports.cardTypes = require('./card-types/card-types.controller') diff --git a/app/simplified-account-routes.js b/app/simplified-account-routes.js index d1e816f4c..baa765be6 100644 --- a/app/simplified-account-routes.js +++ b/app/simplified-account-routes.js @@ -58,6 +58,9 @@ simplifiedAccount.get(paths.simplifiedAccount.settings.organisationDetails.index simplifiedAccount.get(paths.simplifiedAccount.settings.organisationDetails.edit, enforceLiveAccountOnly, permission('merchant-details:update'), serviceSettingsController.organisationDetails.edit.get) simplifiedAccount.post(paths.simplifiedAccount.settings.organisationDetails.edit, enforceLiveAccountOnly, permission('merchant-details:update'), serviceSettingsController.organisationDetails.edit.post) +// card types +simplifiedAccount.get(paths.simplifiedAccount.settings.cardTypes.index, permission('transactions:read'), serviceSettingsController.cardTypes.get) + // stripe details const stripeDetailsPath = paths.simplifiedAccount.settings.stripeDetails const stripeDetailsRouter = new Router({ mergeParams: true }) diff --git a/app/views/simplified-account/settings/card-types/index.njk b/app/views/simplified-account/settings/card-types/index.njk new file mode 100644 index 000000000..447667725 --- /dev/null +++ b/app/views/simplified-account/settings/card-types/index.njk @@ -0,0 +1,8 @@ +{% extends "../settings-layout.njk" %} + +{% block settingsPageTitle %} + Card types +{% endblock %} + +{% block settingsContent %} +{% endblock %}