diff --git a/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.html b/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.html index 52d754749..3b4d2d078 100644 --- a/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.html +++ b/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.html @@ -1,6 +1,9 @@
+ diff --git a/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.spec.ts b/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.spec.ts index cac1bda6d..49990b478 100644 --- a/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.spec.ts +++ b/src/app/forms/custom-sections/adr-examiner-notes-history-view/adr-examiner-notes-history-view.component.spec.ts @@ -1,14 +1,14 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms'; +import { TechRecordType } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-vehicle-type'; import { CustomFormControl, FormNodeTypes } from '@forms/services/dynamic-form.types'; -import { provideMockStore } from '@ngrx/store/testing'; -import { State, initialAppState } from '@store/index'; -import { TechnicalRecordService } from '@services/technical-record/technical-record.service'; import { mockVehicleTechnicalRecord } from '@mocks/mock-vehicle-technical-record.mock'; import { VehicleTypes } from '@models/vehicle-tech-record.model'; -import { TechRecordType } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-vehicle-type'; -import { of } from 'rxjs'; +import { provideMockStore } from '@ngrx/store/testing'; import { RouterService } from '@services/router/router.service'; +import { TechnicalRecordService } from '@services/technical-record/technical-record.service'; +import { State, initialAppState } from '@store/index'; +import { of } from 'rxjs'; import { AdrExaminerNotesHistoryViewComponent } from './adr-examiner-notes-history-view.component'; describe('AdrExaminerNotesHistoryViewComponent', () => { @@ -24,6 +24,7 @@ describe('AdrExaminerNotesHistoryViewComponent', () => { const control = new CustomFormControl({ name: 'techRecord_adrDetails_additionalExaminerNotes', type: FormNodeTypes.CONTROL, + label: 'Additional Examiner Notes History', }); beforeEach(async () => { diff --git a/src/app/forms/templates/general/adr-summary.template.ts b/src/app/forms/templates/general/adr-summary.template.ts index 14064937c..832e83a15 100644 --- a/src/app/forms/templates/general/adr-summary.template.ts +++ b/src/app/forms/templates/general/adr-summary.template.ts @@ -1,10 +1,6 @@ -import { - ADRAdditionalNotesNumber, -} from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrAdditionalNotesNumber.enum.js'; +import { ADRAdditionalNotesNumber } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrAdditionalNotesNumber.enum.js'; import { ADRBodyType } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrBodyType.enum.js'; -import { - ADRCompatibilityGroupJ, -} from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrCompatibilityGroupJ.enum.js'; +import { ADRCompatibilityGroupJ } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrCompatibilityGroupJ.enum.js'; import { ADRDangerousGood } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrDangerousGood.enum.js'; import { ADRTankDetailsTankStatementSelect } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrTankDetailsTankStatementSelect.enum.js'; import { ADRTankStatementSubstancePermitted } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/adrTankStatementSubstancePermitted.js'; @@ -37,11 +33,7 @@ import { ValidatorNames } from '@forms/models/validators.enum'; import { getOptionsFromEnum } from '@forms/utils/enum-map'; import { TC2Types } from '@models/adr.enum'; import { - FormNode, - FormNodeEditTypes, - FormNodeTypes, - FormNodeViewTypes, - FormNodeWidth, + FormNode, FormNodeEditTypes, FormNodeTypes, FormNodeViewTypes, FormNodeWidth, } from '../../services/dynamic-form.types'; export const AdrSummaryTemplate: FormNode = { @@ -79,9 +71,7 @@ export const AdrSummaryTemplate: FormNode = { value: null, width: FormNodeWidth.XXL, type: FormNodeTypes.CONTROL, - validators: [ - { name: ValidatorNames.MaxLength, args: 150 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 150 }], groups: ['applicant_details', 'dangerous_goods'], hide: true, }, @@ -266,9 +256,7 @@ export const AdrSummaryTemplate: FormNode = { width: FormNodeWidth.L, groups: ['adr_details', 'dangerous_goods'], hide: true, - validators: [ - { name: ValidatorNames.MaxLength, args: 40 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 40 }], }, { name: 'tankDetailsSectionTitle', @@ -516,9 +504,7 @@ export const AdrSummaryTemplate: FormNode = { editType: FormNodeEditTypes.TEXTAREA, groups: ['productList', 'statement_select_hide', 'tank_details_hide', 'dangerous_goods'], hide: true, - validators: [ - { name: ValidatorNames.MaxLength, args: 1500 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 1500 }], }, { name: 'techRecord_adrDetails_tank_tankDetails_specialProvisions', @@ -526,9 +512,7 @@ export const AdrSummaryTemplate: FormNode = { type: FormNodeTypes.CONTROL, editType: FormNodeEditTypes.TEXTAREA, hide: true, - validators: [ - { name: ValidatorNames.MaxLength, args: 1024 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 1024 }], groups: ['dangerous_goods', 'tank_details'], }, { @@ -574,9 +558,7 @@ export const AdrSummaryTemplate: FormNode = { viewType: FormNodeViewTypes.HIDDEN, hide: true, groups: ['tank_details', 'dangerous_goods'], - validators: [ - { name: ValidatorNames.MaxLength, args: 70 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 70 }], }, { name: 'techRecord_adrDetails_tank_tankDetails_tc2Details_tc2IntermediateExpiryDate', @@ -612,9 +594,7 @@ export const AdrSummaryTemplate: FormNode = { editType: FormNodeEditTypes.CHECKBOXGROUP, groups: ['tank_details', 'dangerous_goods'], hide: true, - options: [ - { value: '07/09 3mth leak ext ', label: 'Yes' }, - ], + options: [{ value: '07/09 3mth leak ext ', label: 'Yes' }], validators: [], }, { @@ -702,7 +682,6 @@ export const AdrSummaryTemplate: FormNode = { }, }, ], - }, { name: 'techRecord_adrDetails_brakeDeclarationIssuer', @@ -711,9 +690,7 @@ export const AdrSummaryTemplate: FormNode = { hide: true, groups: ['issuer_section', 'dangerous_goods'], editType: FormNodeEditTypes.TEXTAREA, - validators: [ - { name: ValidatorNames.MaxLength, args: 500 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 500 }], }, { name: 'techRecord_adrDetails_brakeEndurance', @@ -739,7 +716,6 @@ export const AdrSummaryTemplate: FormNode = { }, }, ], - }, { name: 'techRecord_adrDetails_weight', @@ -754,7 +730,6 @@ export const AdrSummaryTemplate: FormNode = { name: ValidatorNames.RequiredIfNotHidden, }, ], - }, { name: 'techRecord_adrDetails_declarationsSeen', @@ -782,13 +757,6 @@ export const AdrSummaryTemplate: FormNode = { groups: ['dangerous_goods'], hide: true, }, - { - name: 'ExaminerNotesSectionTitle', - label: 'Additional Examiner Notes History', - type: FormNodeTypes.TITLE, - groups: ['adr_details', 'dangerous_goods'], - hide: true, - }, { name: 'techRecord_adrDetails_additionalExaminerNotes_note', label: 'Additional Examiner Notes', @@ -797,13 +765,12 @@ export const AdrSummaryTemplate: FormNode = { editType: FormNodeEditTypes.TEXTAREA, groups: ['adr_details', 'dangerous_goods'], hide: true, - validators: [ - { name: ValidatorNames.MaxLength, args: 1024 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 1024 }], }, { name: 'techRecord_adrDetails_additionalExaminerNotes', value: null, + label: 'Additional Examiner Notes History', type: FormNodeTypes.CONTROL, viewType: FormNodeViewTypes.CUSTOM, viewComponent: AdrExaminerNotesHistoryViewComponent, @@ -821,9 +788,7 @@ export const AdrSummaryTemplate: FormNode = { viewType: FormNodeViewTypes.STRING, groups: ['adrDetails', 'dangerous_goods'], hide: true, - validators: [ - { name: ValidatorNames.MaxLength, args: 1500 }, - ], + validators: [{ name: ValidatorNames.MaxLength, args: 1500 }], }, ], }; diff --git a/src/app/forms/templates/general/adr.template.ts b/src/app/forms/templates/general/adr.template.ts index 9fa57e199..ecae0d5e9 100644 --- a/src/app/forms/templates/general/adr.template.ts +++ b/src/app/forms/templates/general/adr.template.ts @@ -787,13 +787,6 @@ export const AdrTemplate: FormNode = { groups: ['dangerous_goods'], hide: true, }, - { - name: 'ExaminerNotesSectionTitle', - label: 'Additional Examiner Notes History', - type: FormNodeTypes.TITLE, - groups: ['adr_details', 'dangerous_goods'], - hide: true, - }, { name: 'techRecord_adrDetails_additionalExaminerNotes_note', label: 'Additional Examiner Notes', @@ -811,6 +804,7 @@ export const AdrTemplate: FormNode = { { name: 'techRecord_adrDetails_additionalExaminerNotes', value: null, + label: 'Additional Examiner Notes History', type: FormNodeTypes.CONTROL, viewType: FormNodeViewTypes.CUSTOM, viewComponent: AdrExaminerNotesHistoryViewComponent,