From c22abd74cd99a3d2b451e57cbb0fd59f53c305da Mon Sep 17 00:00:00 2001 From: Ryan Hsieh <79906532+HalcyonJAC@users.noreply.github.com> Date: Thu, 10 Oct 2024 09:03:52 +0100 Subject: [PATCH] Feature/apply 1209 Update character section of the application form (#2574) * add guidance reference v2 * add comment * update constant of guidance reference v2 * add year to guidance reference * add comment --- src/filters.js | 12 +++++++++++- src/helpers/constants.js | 12 ++++++++++++ src/store/exercise/document.js | 8 ++++++++ src/views/Exercise/Reports/CharacterIssues.vue | 12 +++++++++--- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/filters.js b/src/filters.js index 198661c1a..d3751763a 100644 --- a/src/filters.js +++ b/src/filters.js @@ -1,5 +1,5 @@ import * as filters from '@jac-uk/jac-kit/filters/filters'; -import { ADVERT_TYPES, EXERCISE_STAGE, APPLICATION_STATUS, TASK_TYPE, OFFENCE_CATEGORY, GUIDANCE_REFERENCE, INDEPENDENT_ASSESSMENTS_STATUS, ASSESSOR_TYPES, ASSESSMENT_METHOD, APPLICATION_FORM_PARTS, WORKING_BASIS } from '@/helpers/constants'; +import { ADVERT_TYPES, EXERCISE_STAGE, APPLICATION_STATUS, TASK_TYPE, OFFENCE_CATEGORY, GUIDANCE_REFERENCE, GUIDANCE_REFERENCE_V2, INDEPENDENT_ASSESSMENTS_STATUS, ASSESSOR_TYPES, ASSESSMENT_METHOD, APPLICATION_FORM_PARTS, WORKING_BASIS } from '@/helpers/constants'; const lookup = (value) => { let returnValue; @@ -298,6 +298,7 @@ const lookup = (value) => { lookup[OFFENCE_CATEGORY.MIXED] = 'Mixed'; // character issues guide reference + // V1 lookup[GUIDANCE_REFERENCE.CRIMINAL_OFFENCES] = 'Criminal offences: paras 21-24'; lookup[GUIDANCE_REFERENCE.MOTERING_OFFENCES] = 'Motoring offences: paras 25-30'; lookup[GUIDANCE_REFERENCE.FIXED_PENALTY_NOTICES] = 'Fixed penalty notices: paras 31-34'; @@ -305,6 +306,15 @@ const lookup = (value) => { lookup[GUIDANCE_REFERENCE.FINANCIAL_VAT_TAX] = 'Financial VAT and Tax: paras 39-43'; lookup[GUIDANCE_REFERENCE.PROFESSIONAL_CONDUCT] = 'Professional conduct: paras 44-57'; lookup[GUIDANCE_REFERENCE.FURTHER_DISCLOSURES] = 'Further disclosures: paras 58-65'; + // V2 + lookup[GUIDANCE_REFERENCE_V2.CRIMINAL_OFFENCES] = 'Criminal offences: paras 15-17'; + lookup[GUIDANCE_REFERENCE_V2.MOTERING_OFFENCES] = 'Motoring offences: paras 18-23'; + lookup[GUIDANCE_REFERENCE_V2.FIXED_PENALTY_NOTICES] = 'Fixed penalty notices: paras 24-26'; + lookup[GUIDANCE_REFERENCE_V2.FINANCIAL_INSOLVENCY_DEBT] = 'Financial insolvency and debt: paras 28-32'; + lookup[GUIDANCE_REFERENCE_V2.FINANCIAL_VAT_TAX] = 'Financial VAT and Tax: paras 33-38'; + lookup[GUIDANCE_REFERENCE_V2.PROFESSIONAL_CONDUCT] = 'Professional conduct: paras 39-51'; + lookup[GUIDANCE_REFERENCE_V2.CIVIL_PROCEEDINGS] = 'Civil proceedings: paras 52-53'; + lookup[GUIDANCE_REFERENCE_V2.FURTHER_DISCLOSURES] = 'Further disclosures: paras 56-60'; // assessment methods lookup[ASSESSMENT_METHOD.SELF_ASSESSMENT_WITH_COMPETENCIES] = 'Self Assessment with competencies'; diff --git a/src/helpers/constants.js b/src/helpers/constants.js index 0fb22ec8d..e54fde3b4 100644 --- a/src/helpers/constants.js +++ b/src/helpers/constants.js @@ -187,6 +187,17 @@ const GUIDANCE_REFERENCE = { PROFESSIONAL_CONDUCT: 'professionalConduct', FURTHER_DISCLOSURES: 'furtherDisclosures', }; +// for exercises launched after 15/10/2024 +const GUIDANCE_REFERENCE_V2 = { + CRIMINAL_OFFENCES: 'criminalOffencesV2', + MOTERING_OFFENCES: 'moteringOffencesV2', + FIXED_PENALTY_NOTICES: 'fixedPenaltyNoticesV2', + FINANCIAL_INSOLVENCY_DEBT: 'financialInsolvencyDebtV2', + FINANCIAL_VAT_TAX: 'financialVatTaxV2', + PROFESSIONAL_CONDUCT: 'professionalConductV2', + CIVIL_PROCEEDINGS: 'civilProceedingsV2', + FURTHER_DISCLOSURES: 'furtherDisclosuresV2', +}; const TASK_QT_MAP = {}; TASK_QT_MAP[TASK_TYPE.CRITICAL_ANALYSIS] = QUALIFYING_TEST.TYPE.CRITICAL_ANALYSIS; @@ -276,6 +287,7 @@ export { ASSESSOR_TYPES, OFFENCE_CATEGORY, GUIDANCE_REFERENCE, + GUIDANCE_REFERENCE_V2, ASSESSMENT_METHOD, APPLICATION_FORM_PARTS, DEFAULT_WORD_COUNT, diff --git a/src/store/exercise/document.js b/src/store/exercise/document.js index 710aa4da3..8af0032ff 100644 --- a/src/store/exercise/document.js +++ b/src/store/exercise/document.js @@ -283,6 +283,14 @@ export default { // Used to facilitate different fields after 01-04-2023 return state.record.applicationOpenDate > new Date('2023-04-01'); }, + applicationOpenDatePost15102024: (state, getters, rootState, rootGetters) => { + const { isDevelop } = rootGetters; + // hard-coded exercises for testing + if (isDevelop && ['JAC00010'].includes(state.record.referenceNumber)) { + return true; + } + return state.record.applicationOpenDate > new Date('2024-10-15'); + }, hasInitialApprovalDate(state) { return checkNested(state.record, '_approval', 'initialApprovalDate'); }, diff --git a/src/views/Exercise/Reports/CharacterIssues.vue b/src/views/Exercise/Reports/CharacterIssues.vue index 58f474b08..140035e93 100644 --- a/src/views/Exercise/Reports/CharacterIssues.vue +++ b/src/views/Exercise/Reports/CharacterIssues.vue @@ -444,7 +444,7 @@