Skip to content

Commit

Permalink
feat(cb2-15556): fix spacing and adding of alteration marker
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonT95 committed Dec 11, 2024
1 parent 5e01f21 commit 98655f0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
formControlName="techRecord_noOfAxles"
></govuk-form-group-input>

<div class="flex-row">
<div class="flex-row" *ngIf="getVehicleType() === VehicleTypes.HGV || getVehicleType() === VehicleTypes.PSV">
<!-- Speed limiter exempt for HGV (required to generate plates) -->
<govuk-form-group-radio
*ngIf="techRecord().techRecord_vehicleType === VehicleTypes.HGV"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,17 @@
{{ vm.techRecord_departmentalVehicleMarker | defaultNullOrEmpty }}
</dd>
</div>
<div class="govuk-summary-list__row" *ngIf="hasChanged('techRecord_alterationMarker')">
<dt class="govuk-summary-list__key">Alteration marker</dt>
<dd class="govuk-summary-list__value" id="test-techRecord_alterationMarker">
{{ vm.techRecord_alterationMarker | defaultNullOrEmpty }}
</dd>
</div>
</ng-container>

</dl>
<dl *ngIf="vm.techRecord_vehicleType === VehicleTypes.PSV" class="govuk-summary-list">
<div class="govuk-summary-list__row">
<div class="govuk-summary-list__row" *ngIf="displaySeatsHeading">
<h3>
Seats:
</h3>
Expand Down Expand Up @@ -284,5 +290,11 @@ <h3>
{{ vm.techRecord_departmentalVehicleMarker | defaultNullOrEmpty }}
</dd>
</div>
<div class="govuk-summary-list__row" *ngIf="hasChanged('techRecord_alterationMarker')">
<dt class="govuk-summary-list__key">Alteration marker</dt>
<dd class="govuk-summary-list__value" id="test-techRecord_alterationMarker-psv">
{{ vm.techRecord_alterationMarker | defaultNullOrEmpty }}
</dd>
</div>
</dl>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export class VehicleSectionSummaryComponent {
currentTechRecord = this.store.selectSignal(techRecord);
amendedTechRecord = this.store.selectSignal(editingTechRecord);

get displaySeatsHeading(): boolean {
return (
this.hasChanged('techRecord_seatsUpperDeck') ||
this.hasChanged('techRecord_seatsLowerDeck') ||
this.hasChanged('techRecord_standingCapacity')
);
}

hasChanged(property: string) {
const current = this.currentTechRecord();
const amended = this.amendedTechRecord();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@
{{ vm.techRecord_departmentalVehicleMarker | defaultNullOrEmpty }}
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">Alteration marker</dt>
<dd class="govuk-summary-list__value" id="test-techRecord_alterationMarker">
{{ vm.techRecord_alterationMarker | defaultNullOrEmpty }}
</dd>
</div>
</ng-container>

</dl>
Expand Down Expand Up @@ -286,5 +292,11 @@ <h3>
{{ vm.techRecord_departmentalVehicleMarker | defaultNullOrEmpty }}
</dd>
</div>
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">Alteration marker</dt>
<dd class="govuk-summary-list__value" id="test-techRecord_alterationMarker-psv">
{{ vm.techRecord_alterationMarker | defaultNullOrEmpty }}
</dd>
</div>
</dl>
</ng-container>

0 comments on commit 98655f0

Please sign in to comment.