Skip to content

Commit

Permalink
feat/CB2-10740 - Mark if a vehicle is used for international journeys…
Browse files Browse the repository at this point in the history
… on VTM (#1467)

* feat(cb2-10740): hook up template and values correctly to type definition

* feat(cb2-10740): lint fix

---------

Co-authored-by: pbardy2000 <[email protected]>
  • Loading branch information
tomcrawleyy and pbardy2000 authored Apr 15, 2024
1 parent 49993bd commit e5d2de9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@angular/router": "^17.2.1",
"@azure/msal-angular": "^3.0.13",
"@azure/msal-browser": "^3.10.0",
"@dvsa/cvs-type-definitions": "^6.2.0",
"@dvsa/cvs-type-definitions": "^6.3.0",
"@ngrx/effects": "^17.1.0",
"@ngrx/entity": "^17.1.0",
"@ngrx/router-store": "^17.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import { mockVehicleTechnicalRecord } from '@mocks/mock-vehicle-technical-record
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 { AdrExaminerNotesHistoryViewComponent } from './adr-examiner-notes-history-view.component';
import { RouterService } from '@services/router/router.service';

import { AdrExaminerNotesHistoryViewComponent } from './adr-examiner-notes-history-view.component';

describe('AdrExaminerNotesHistoryViewComponent', () => {
let component: AdrExaminerNotesHistoryViewComponent;
Expand Down
12 changes: 12 additions & 0 deletions src/app/forms/templates/general/adr-summary.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ export const AdrSummaryTemplate: FormNode = {
},
],
},
{
name: 'techRecord_adrDetails_vehicleDetails_usedOnInternationalJourneys',
label: 'Vehicle used on international journeys',
type: FormNodeTypes.CONTROL,
options: [
{ value: 'yes', label: 'Yes' },
{ value: 'no', label: 'No' },
{ value: 'n/a', label: 'Not applicable' },
],
hide: true,
groups: ['adr_details', 'dangerous_goods'],
},
{
name: 'techRecord_adrDetails_vehicleDetails_approvalDate',
label: 'Date processed',
Expand Down
17 changes: 16 additions & 1 deletion src/app/forms/templates/general/adr.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import {
import {
AdrTankDetailsInitialInspectionViewComponent,
} from '@forms/custom-sections/adr-tank-details-initial-inspection-view/adr-tank-details-initial-inspection-view.component';
import { AdrTankDetailsM145ViewComponent } from '@forms/custom-sections/adr-tank-details-m145-view/adr-tank-details-m145-view.component';
import {
AdrTankDetailsM145ViewComponent,
} from '@forms/custom-sections/adr-tank-details-m145-view/adr-tank-details-m145-view.component';
import {
AdrTankDetailsSubsequentInspectionsEditComponent,
} from '@forms/custom-sections/adr-tank-details-subsequent-inspections-edit/adr-tank-details-subsequent-inspections-edit.component';
Expand Down Expand Up @@ -178,6 +180,19 @@ export const AdrTemplate: FormNode = {
},
],
},
{
name: 'techRecord_adrDetails_vehicleDetails_usedOnInternationalJourneys',
label: 'Vehicle used on international journeys',
type: FormNodeTypes.CONTROL,
editType: FormNodeEditTypes.RADIO,
options: [
{ value: 'yes', label: 'Yes' },
{ value: 'no', label: 'No' },
{ value: 'n/a', label: 'Not applicable' },
],
hide: true,
groups: ['adr_details', 'dangerous_goods'],
},
{
name: 'techRecord_adrDetails_vehicleDetails_approvalDate',
label: 'Date processed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ function handleClearADRDetails(state: TechnicalRecordServiceState) {
editingTechRecord: {
...editingTechRecord,
techRecord_adrDetails_vehicleDetails_type: null,
techRecord_adrDetails_vehicleDetails_usedOnInternationalJourneys: null,
techRecord_adrDetails_vehicleDetails_approvalDate: null,
techRecord_adrDetails_permittedDangerousGoods: null,
...nulledCompatibilityGroupJ,
Expand Down

0 comments on commit e5d2de9

Please sign in to comment.