From e144fba4ad0be5c5877721ea519856a5184fa7a3 Mon Sep 17 00:00:00 2001 From: pbardy2000 <146740183+pbardy2000@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:18:43 +0100 Subject: [PATCH] Feat/cb2 12600 (#1504) * feat(cb2-12600): add form control to specialist contingency test group 1 and 5 * feat(cb2-12600): add hint text * feat(cb2-12600): adjust error messages so they match ACs * feat(cb2-12600): fix linting * feat(cb2-12600): enable viewing reapplication date on view history and amend * feat(cb2-12600): fix linting * feat(cb2-12600): remove reapplication date from group 5 templates * feat(cb2-12600): remove reapplication date from group 5 * feat(cb2-12600): fix the linting * feat(cb2-12600): hide reapplication date when amending passed specialist test * feat(cb2-12600): fix linting --- .../specialist-test-section-group1.template.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/forms/templates/test-records/section-templates/test/specialist/specialist-test-section-group1.template.ts b/src/app/forms/templates/test-records/section-templates/test/specialist/specialist-test-section-group1.template.ts index f387454f6..f4e7e4795 100644 --- a/src/app/forms/templates/test-records/section-templates/test/specialist/specialist-test-section-group1.template.ts +++ b/src/app/forms/templates/test-records/section-templates/test/specialist/specialist-test-section-group1.template.ts @@ -60,6 +60,20 @@ export const SpecialistTestSectionGroup1: FormNode = { validators: [ { name: ValidatorNames.HideIfNotEqual, args: { sibling: 'reasonForAbandoning', value: 'abandoned' } }, { name: ValidatorNames.HideIfNotEqual, args: { sibling: 'additionalCommentsForAbandon', value: 'abandoned' } }, + { + name: ValidatorNames.ShowGroupsWhenIncludes, + args: { + values: ['fail'], + groups: ['failOnly'], + }, + }, + { + name: ValidatorNames.HideGroupsWhenExcludes, + args: { + values: ['fail'], + groups: ['failOnly'], + }, + }, ], asyncValidators: [ { name: AsyncValidatorNames.ResultDependantOnRequiredStandards },