From 252fda2bd44af924aa3d984fd008e2d330cbd9c6 Mon Sep 17 00:00:00 2001 From: David Middleton <122619525+davidmiddletonmoj@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:29:18 +0100 Subject: [PATCH] CDPS-223: Fix prisoner name on work and skills page (#193) --- server/services/workAndSkillsPageService.ts | 4 ++-- .../partials/workAndSkillsPage/coursesAndQualifications.njk | 2 +- .../views/partials/workAndSkillsPage/employabilitySkills.njk | 2 +- server/views/partials/workAndSkillsPage/workAndActivities.njk | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/services/workAndSkillsPageService.ts b/server/services/workAndSkillsPageService.ts index 669567afd..916757737 100644 --- a/server/services/workAndSkillsPageService.ts +++ b/server/services/workAndSkillsPageService.ts @@ -27,7 +27,7 @@ export default class WorkAndSkillsPageService { public async get(prisonerData: Prisoner) { const { prisonerNumber, firstName, lastName } = prisonerData - const prisonerName = `${properCaseName(firstName)} ${properCaseName(lastName)}` + const workAndSkillsPrisonerName = `${properCaseName(firstName)} ${properCaseName(lastName)}` const [ learnerEmployabilitySkills, @@ -56,7 +56,7 @@ export default class WorkAndSkillsPageService { learnerLatestAssessments, learnerGoals, learnerNeurodivergence, - prisonerName, + workAndSkillsPrisonerName, offenderActivitiesHistory, unacceptableAbsences, } diff --git a/server/views/partials/workAndSkillsPage/coursesAndQualifications.njk b/server/views/partials/workAndSkillsPage/coursesAndQualifications.njk index fb3da41bf..9997dd90a 100644 --- a/server/views/partials/workAndSkillsPage/coursesAndQualifications.njk +++ b/server/views/partials/workAndSkillsPage/coursesAndQualifications.njk @@ -12,7 +12,7 @@ {% endif %} {% if(learnerEducation.length == 0) %} -
{{ prisonerName }} is not currently doing any courses.
+{{ workAndSkillsPrisonerName }} is not currently doing any courses.
{% endif %}View full course history diff --git a/server/views/partials/workAndSkillsPage/employabilitySkills.njk b/server/views/partials/workAndSkillsPage/employabilitySkills.njk index ebd8bf31f..36dec75cf 100644 --- a/server/views/partials/workAndSkillsPage/employabilitySkills.njk +++ b/server/views/partials/workAndSkillsPage/employabilitySkills.njk @@ -23,7 +23,7 @@
- {{ prisonerName }} has no employability skills. + {{ workAndSkillsPrisonerName }} has no employability skills.
{{ prisonerName }} has no work or activities.
+{{ workAndSkillsPrisonerName }} has no work or activities.
{% endif %} {% if not prisonerData.restrictedPatient %} @@ -39,6 +39,6 @@{{ prisonerName }} has no unacceptable absences in the last 6 months.
+{{ workAndSkillsPrisonerName }} has no unacceptable absences in the last 6 months.
{% endif %} {%- endcall -%}