From 6717ef1918e7db179cdfec1ddfd829771bfe4331 Mon Sep 17 00:00:00 2001 From: pbardy2000 <146740183+pbardy2000@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:08:20 +0000 Subject: [PATCH] fix(CB2-15820): add plates tag to tyre use code --- .../tyres-section-edit/tyres-section-edit.component.html | 2 ++ .../tyres-section-edit/tyres-section-edit.component.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.html b/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.html index 78bd4e72f..28cb5ae6e 100644 --- a/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.html +++ b/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.html @@ -150,6 +150,7 @@ formControlName="techRecord_tyreUseCode" [width]="FormNodeWidth.UNSET" [options]="HGV_TYRE_USE_CODE_OPTIONS" + [tags]="[{ colour: TagType.PURPLE, label: TagTypeLabels.PLATES }]" > @@ -159,5 +160,6 @@ formControlName="techRecord_tyreUseCode" [width]="FormNodeWidth.UNSET" [options]="TRL_TYRE_USE_CODE_OPTIONS" + [tags]="[{ colour: TagType.PURPLE, label: TagTypeLabels.PLATES }]" > diff --git a/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.ts b/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.ts index bbbb82f9d..f2593315a 100644 --- a/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.ts +++ b/src/app/forms/custom-sections/tyres-section/tyres-section-edit/tyres-section-edit.component.ts @@ -1,3 +1,4 @@ +import { TagType } from '@/src/app/components/tag/tag.component'; import { FITMENR_CODE_OPTIONS, HGV_TYRE_USE_CODE_OPTIONS, @@ -9,7 +10,7 @@ import { ReferenceDataTyre, ReferenceDataTyreLoadIndex, } from '@/src/app/models/reference-data.model'; -import { FormNodeWidth } from '@/src/app/services/dynamic-forms/dynamic-form.types'; +import { FormNodeWidth, TagTypeLabels } from '@/src/app/services/dynamic-forms/dynamic-form.types'; import { ReferenceDataService } from '@/src/app/services/reference-data/reference-data.service'; import { addAxle, removeAxle, updateScrollPosition } from '@/src/app/store/technical-records'; import { ViewportScroller } from '@angular/common'; @@ -32,6 +33,8 @@ import { ReplaySubject, combineLatest, filter, takeUntil } from 'rxjs'; export class TyresSectionEditComponent implements OnInit, OnDestroy { protected readonly VehicleTypes = VehicleTypes; protected readonly FormNodeWidth = FormNodeWidth; + protected readonly TagType = TagType; + protected readonly TagTypeLabels = TagTypeLabels; protected readonly HGV_TYRE_USE_CODE_OPTIONS = HGV_TYRE_USE_CODE_OPTIONS; protected readonly TRL_TYRE_USE_CODE_OPTIONS = TRL_TYRE_USE_CODE_OPTIONS; protected readonly SPEED_CATEGORY_SYMBOL_OPTIONS = SPEED_CATEGORY_SYMBOL_OPTIONS;