Skip to content

Commit

Permalink
Revert "feat(cb2-13299): VTM - Pass and issue Documents Centrally for…
Browse files Browse the repository at this point in the history
… a Notif…" (#1523)

This reverts commit aafbbb2.
  • Loading branch information
tomcrawleyy authored Jul 29, 2024
1 parent aafbbb2 commit 70c3984
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 408 deletions.
27 changes: 19 additions & 8 deletions src/app/forms/models/testTypeId.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ export const TEST_TYPES_GROUP2: string[] = ['15', '16', '23', '19', '22'];
// 38 through 36 - tests for PSV - Notifiable alteration check, voluntary brake test, voluntary multi check, voluntary speed limiter check
// voluntary smoke test, voluntary headlamp aim test, vitesse 100 replacement, vitesse 100 application, voluntary tempo 100
// 86 through 90 - tests for HGV - voluntary multi-check, voluntary speed limiter check, voluntary smoke and headlamp aim test
// NOTE: the 47, and 48 from group 8 are excluded and use there own template to enable issuing documents centrally
export const TEST_TYPES_GROUP3_4_8: string[] = ['38', '30', '33', '34', '32', '31', '100', '121', '36', '86', '88', '89', '90', '87', '85'];

// 47 - free notifiable alteration (HGV/TRL), 48 - paid notifiable alteration (HGV/TRL)
export const TEST_TYPES_GROUP8_NOTIFABLE = ['47', '48'];

// 87 through 85 - tests for HGV and TRL - voluntary shaker plate check, Free/Paid notifiable alteration, voluntary break test
export const TEST_TYPES_GROUP8_VOLUNTARY = ['85', '87'];
export const TEST_TYPES_GROUP3_4_8: string[] = [
'38',
'30',
'33',
'34',
'32',
'31',
'100',
'121',
'36',
'86',
'88',
'89',
'90',
'87',
'47',
'48',
'85',
];

// 56 and 49 - tests for HGV and TRL - Paid TIR retest, TIR test
// 57 - test for TRL - Free TIR retest
Expand Down Expand Up @@ -198,7 +210,6 @@ export const TEST_TYPES = {
testTypesGroup2: TEST_TYPES_GROUP2,
testTypesGroup3And4And8: TEST_TYPES_GROUP3_4_8,
testTypesGroup7: TEST_TYPES_GROUP7,
testTypesGroup8Notifiable: TEST_TYPES_GROUP8_NOTIFABLE,
testTypesGroup9And10: TEST_TYPES_GROUP9_10,
testTypesGroup6And11: TEST_TYPES_GROUP6_11,
testTypesGroup12And14: TEST_TYPES_GROUP12_14,
Expand Down
32 changes: 0 additions & 32 deletions src/app/forms/templates/test-records/create-master.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { ContingencyTestSectionGroup3And4And8 } from './section-templates/test/c
import { ContingencyTestSectionGroup5And13 } from './section-templates/test/contingency/contingency-test-section-group5And13.template';
import { ContingencyTestSectionGroup6And11 } from './section-templates/test/contingency/contingency-test-section-group6And11.template';
import { ContingencyTestSectionGroup7 } from './section-templates/test/contingency/contingency-test-section-group7.template';
import { ContingencyTestSectionGroup8Notifiable } from './section-templates/test/contingency/contingency-test-section-group8Notifiable.template';
import { ContingencyTestSectionGroup9And10 } from './section-templates/test/contingency/contingency-test-section-group9And10.template';
import { ContingencyTestSectionSpecialistGroup1 } from './section-templates/test/contingency/contingency-test-section-specialist-group1.template';
import { ContingencyTestSectionSpecialistGroup2 } from './section-templates/test/contingency/contingency-test-section-specialist-group2.template';
Expand Down Expand Up @@ -101,17 +100,6 @@ export const contingencyTestTemplates: Record<VehicleTypes, Partial<Record<keyof
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSection,
},
testTypesGroup8Notifiable: {
vehicle: ContingencyVehicleSectionDefaultPsvHgvLight,
test: ContingencyTestSectionGroup8Notifiable,
visit: ContingencyVisitSection,
seatbelts: SeatbeltHiddenSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
defects: defectsHiddenSection,
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSection,
},
testTypesGroup15And16: {
required: CreateRequiredSection,
vehicle: ContingencyVehicleSectionDefaultPsvHgvLight,
Expand Down Expand Up @@ -268,16 +256,6 @@ export const contingencyTestTemplates: Record<VehicleTypes, Partial<Record<keyof
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSectionHgvTrl,
},
testTypesGroup8Notifiable: {
vehicle: ContingencyVehicleSectionDefaultPsvHgvLight,
test: ContingencyTestSectionGroup8Notifiable,
visit: ContingencyVisitSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
defects: defectsHiddenSection,
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSectionHgvTrl,
},
testTypesGroup5And13: {
required: CreateRequiredSectionHgvTrl,
vehicle: ContingencyVehicleSectionDefaultPsvHgvLight,
Expand Down Expand Up @@ -452,16 +430,6 @@ export const contingencyTestTemplates: Record<VehicleTypes, Partial<Record<keyof
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSectionHgvTrl,
},
testTypesGroup8Notifiable: {
vehicle: ContingencyVehicleSectionDefaultTrl,
test: ContingencyTestSectionGroup8Notifiable,
visit: ContingencyVisitSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
defects: defectsHiddenSection,
reasonForCreation: reasonForCreationSection,
required: CreateRequiredSectionHgvTrl,
},
testTypesGroup5And13: {
required: CreateRequiredSectionHgvTrl,
vehicle: ContingencyVehicleSectionDefaultTrl,
Expand Down
56 changes: 13 additions & 43 deletions src/app/forms/templates/test-records/master.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@ import { TEST_TYPES } from '@forms/models/testTypeId.enum';
import { FormNode } from '@forms/services/dynamic-form.types';
import { VehicleTypes } from '@models/vehicle-tech-record.model';
import { DefectsTpl } from '../general/defect.template';
import { RequiredStandardsTpl } from '../general/required-standards.template';
import { AdditionalDefectsSection } from './section-templates/additionalDefects/additional-defects-section.template';
import { CustomDefectsSection } from './section-templates/customDefects/custom-defects-section.template';
import { EmissionsSection } from './section-templates/emissions/emissions-section.template';
import { NotesSection } from './section-templates/notes/notes-section.template';
import { reasonForCreationSection } from './section-templates/reasonForCreation/reasonForCreation.template';
import { CustomDefectsHiddenSection } from './section-templates/required/custom-defects-hidden-section.template';
import { defectsHiddenSection } from './section-templates/required/defect-hidden-section.template';
import {
AmendDeskBasedRequiredHiddenSectionGroup4Motorcyle,
} from './section-templates/required/desk-based-required-hidden-group4-motorcycle-amend.template';
import { DeskBasedRequiredHiddenSectionGroup5Lgv } from './section-templates/required/desk-based-required-hidden-group5-lgv.template';
import { DeskBasedRequiredSectionHgvTrl } from './section-templates/required/desk-based-required-hidden-section-hgv-trl.template';
import { DeskBasedRequiredSectionPsv } from './section-templates/required/desk-based-required-hidden-section-psv.template';
import { AmendDeskBasedRequiredHiddenSectionGroup4 } from './section-templates/required/desk-based-required-section-group4-amend.template';
import { RequiredSectionHGVTRL } from './section-templates/required/required-hidden-section-hgv-trl.template';
import { RequiredSection } from './section-templates/required/required-hidden-section.template';
import { SpecialistRequiredSectionHGVTRL } from './section-templates/required/specialist-required-hidden-section-hgv-trl.template';
Expand All @@ -29,10 +23,6 @@ import { amendDeskBasedTestSectionGroup1And4HgvTrl } from './section-templates/t
import { AmendDeskBasedTestSectionGroup2And5 } from './section-templates/test/desk-based/desk-based-test-section-group2.template';
import { AmendDeskBasedTestSectionGroup3 } from './section-templates/test/desk-based/desk-based-test-section-group3.template';
import { amendDeskBasedTestSectionGroup4Psv } from './section-templates/test/desk-based/desk-based-test-section-group4-PSV.template';
import { AmendDeskBasedTestSectionGroup4LgvCarMotorcycle } from './section-templates/test/desk-based/desk-based-test-section-group4-lgv-template';
import { AmendDeskBasedTestSectionLgvGroup5 } from './section-templates/test/desk-based/desk-based-test-section-group5-LGV';
import { OldIVASpecialistTestSectionGroup1 } from './section-templates/test/specialist/old-specialist-test-section-group1.template';
import { OldIVASpecialistTestSectionGroup5 } from './section-templates/test/specialist/old-specialist-test-section-group5.template';
import { SpecialistTestSectionGroup1 } from './section-templates/test/specialist/specialist-test-section-group1.template';
import { SpecialistTestSectionGroup2 } from './section-templates/test/specialist/specialist-test-section-group2.template';
import { SpecialistTestSectionGroup3And4 } from './section-templates/test/specialist/specialist-test-section-group3And4.template';
Expand All @@ -45,22 +35,29 @@ import { TestSectionGroup3And4And8 } from './section-templates/test/test-section
import { TestSectionGroup5And13 } from './section-templates/test/test-section-group5And13.template';
import { TestSectionGroup6And11 } from './section-templates/test/test-section-group6And11.template';
import { TestSectionGroup7 } from './section-templates/test/test-section-group7.template';
import { TestSectionGroup8Notifiable } from './section-templates/test/test-section-group8Notifiable.template';
import { TestSectionGroup9And10 } from './section-templates/test/test-section-group9And10.template';
import { TestSection } from './section-templates/test/test-section.template';
import { IvaMsvaVehicleSection } from './section-templates/vehicle/amend-iva-msva-psv-hgv-light.template';
import { VehicleSectionDefaultPsvHgvLight } from './section-templates/vehicle/default-psv-hgv-light-vehicle-section.template';
import { VehicleSectionDefaultTrl } from './section-templates/vehicle/default-trl-vehicle-section.template';
import {
DeskBasedVehicleSectionDefaultPsvHgv,
} from './section-templates/vehicle/desk-based-default-psv-hgv-vehicle-section.template';
import { DeskBasedVehicleSectionDefaultPsvHgv } from './section-templates/vehicle/desk-based-default-psv-hgv-vehicle-section.template';
import { DeskBasedVehicleSectionDefaultTrl } from './section-templates/vehicle/desk-based-default-trl-vehicle-section.template';
import {
DeskBasedVehicleSectionHgvGroup1And2And4 as DeskBasedVehicleSectionHgvGroup1And2And4And5,
} from './section-templates/vehicle/desk-based-test-hgv-vehicle-section-group1And2And4.template';
import { DeskBasedVehicleSectionGroup4LGV } from './section-templates/vehicle/desk-based-vehicle-section-group4-lgv.template';
import { DeskBasedVehicleSectionGroup5Lgv } from './section-templates/vehicle/desk-based-vehicle-section-group5-lgv.template';
import { VisitSection } from './section-templates/visit/visit-section.template';
import { DeskBasedVehicleSectionGroup5Lgv } from './section-templates/vehicle/desk-based-vehicle-section-group5-lgv.template';
import { AmendDeskBasedRequiredHiddenSectionGroup4 } from './section-templates/required/desk-based-required-section-group4-amend.template';
import {
AmendDeskBasedRequiredHiddenSectionGroup4Motorcyle,
} from './section-templates/required/desk-based-required-hidden-group4-motorcycle-amend.template';
import { AmendDeskBasedTestSectionLgvGroup5 } from './section-templates/test/desk-based/desk-based-test-section-group5-LGV';
import { AmendDeskBasedTestSectionGroup4LgvCarMotorcycle } from './section-templates/test/desk-based/desk-based-test-section-group4-lgv-template';
import { RequiredStandardsTpl } from '../general/required-standards.template';
import { AdditionalDefectsSection } from './section-templates/additionalDefects/additional-defects-section.template';
import { OldIVASpecialistTestSectionGroup1 } from './section-templates/test/specialist/old-specialist-test-section-group1.template';
import { IvaMsvaVehicleSection } from './section-templates/vehicle/amend-iva-msva-psv-hgv-light.template';
import { OldIVASpecialistTestSectionGroup5 } from './section-templates/test/specialist/old-specialist-test-section-group5.template';

/**
* Keys of root object must a a valid vehicle type.
Expand Down Expand Up @@ -112,15 +109,6 @@ export const masterTpl: Record<VehicleTypes, Partial<Record<keyof typeof TEST_TY
reasonForCreation: reasonForCreationSection,
required: RequiredSection,
},
testTypesGroup8Notifiable: {
vehicle: VehicleSectionDefaultPsvHgvLight,
test: TestSectionGroup8Notifiable,
visit: VisitSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
reasonForCreation: reasonForCreationSection,
required: RequiredSection,
},
testTypesGroup15And16: {
vehicle: VehicleSectionDefaultPsvHgvLight,
test: TestSectionGroup15And16,
Expand Down Expand Up @@ -260,15 +248,6 @@ export const masterTpl: Record<VehicleTypes, Partial<Record<keyof typeof TEST_TY
reasonForCreation: reasonForCreationSection,
required: RequiredSectionHGVTRL,
},
testTypesGroup8Notifiable: {
vehicle: VehicleSectionDefaultPsvHgvLight,
test: TestSectionGroup8Notifiable,
visit: VisitSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
reasonForCreation: reasonForCreationSection,
required: RequiredSectionHGVTRL,
},
testTypesGroup5And13: {
vehicle: VehicleSectionDefaultPsvHgvLight,
test: TestSectionGroup5And13,
Expand Down Expand Up @@ -435,15 +414,6 @@ export const masterTpl: Record<VehicleTypes, Partial<Record<keyof typeof TEST_TY
reasonForCreation: reasonForCreationSection,
required: RequiredSectionHGVTRL,
},
testTypesGroup8Notifiable: {
vehicle: VehicleSectionDefaultTrl,
test: TestSectionGroup8Notifiable,
visit: VisitSection,
notes: NotesSection,
customDefects: CustomDefectsSection,
reasonForCreation: reasonForCreationSection,
required: RequiredSectionHGVTRL,
},
testTypesGroup5And13: {
vehicle: VehicleSectionDefaultTrl,
test: TestSectionGroup5And13,
Expand Down

This file was deleted.

Loading

0 comments on commit 70c3984

Please sign in to comment.