Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CB2-14459): fix additional disabled properties added by mistake (… #1673

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ <h1>
[class.govuk-radios__input--error]="hasError"
[(ngModel)]="value"
(ngModelChange)="onChange($event)"
type="text"
(blur)="onTouched()"
[class]="style"
[disabled]="control?.disabled || false"
Expand Down Expand Up @@ -59,4 +58,20 @@ <h1>
<ng-container *ngIf="controlType === 'decimal'">

</ng-container>
<ng-container *ngIf="controlType === 'numericString'">
<input
id="{{ id }}"
name="{{ id }}"
[attr.aria-describedby]="hintId"
[attr.aria-labelledby]="labelId"
[attr.data-testid]="id"
[class.govuk-radios__input--error]="hasError"
[(ngModel)]="value"
(ngModelChange)="onChange($event)"
appNumberOnly
(blur)="onTouched()"
[class]="style"
[disabled]="control?.disabled || false"
/>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ export class BodySectionEditComponent implements OnInit, OnDestroy {

get hgvAndTrailerFields(): Partial<Record<keyof TechRecordType<'hgv'>, FormControl>> {
return {
techRecord_make: this.fb.control<string | null>({ value: null, disabled: true }, [
techRecord_make: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(20, 'Body make must be less than or equal to 20'),
]),
techRecord_model: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(20, 'Body model must be less than or equal to 20'),
]),
techRecord_bodyType_description: this.fb.control<string | null>({ value: null, disabled: true }, [
techRecord_bodyType_description: this.fb.control<string | null>(null, [
this.commonValidators.required('Body type is required'),
]),
techRecord_bodyType_code: this.fb.control<string | null>({ value: null, disabled: true }, []),
techRecord_bodyType_code: this.fb.control<string | null>(null, []),
techRecord_brakes_dtpNumber: this.fb.control<string | null>(null),
techRecord_functionCode: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(1, 'Function code must be less than or equal to 1'),
Expand Down Expand Up @@ -189,8 +189,8 @@ export class BodySectionEditComponent implements OnInit, OnDestroy {
techRecord_bodyModel: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(20, 'Body model must be less than or equal to 20'),
]),
techRecord_bodyType_code: this.fb.control<string | null>({ value: null, disabled: true }, []),
techRecord_bodyType_description: this.fb.control<string | null>({ value: null, disabled: true }, [
techRecord_bodyType_code: this.fb.control<string | null>(null, []),
techRecord_bodyType_description: this.fb.control<string | null>(null, [
this.commonValidators.required('Body type is required'),
]),
techRecord_modelLiteral: this.fb.control<string | null>(null, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h1>
label="Number of seat belts"
[tags]="[{ label: TagTypeLabels.REQUIRED, colour: TagType.RED }]"
formControlName="techRecord_numberOfSeatbelts"
type="number"
type="numericString"
></govuk-form-group-input>

<!-- Seatbelt installation approval date / type approved -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class VehicleSectionEditComponent implements OnInit, OnDestroy {
this.handlePsvPassengersChange(),
]),
techRecord_vehicleSize: this.fb.control<string | null>(null),
techRecord_numberOfSeatbelts: this.fb.control<number | null>(null, [
techRecord_numberOfSeatbelts: this.fb.control<string | null>(null, [
this.commonValidators.max(99, 'Number of seat belts must be less than or equal to 99'),
]),
techRecord_seatbeltInstallationApprovalDate: this.fb.control<string | null>(null, [
Expand Down
Loading