Skip to content

Commit

Permalink
feat/cb2-14457 (#1646)
Browse files Browse the repository at this point in the history
* feat(cb2-14457): remove id and name

* feat(cb2-14457): add checkbox to ids

* feat(cb2-14457): character count id fix

* feat(cb2-14457): character count corrections

* feat(cb2-14457): add additional details

* feat(cb2-14457): resolve validator message mismatch

---------

Co-authored-by: pbardy2000 <146740183+pbardy2000@users.noreply.github.com>
  • Loading branch information
tomcrawleyy and pbardy2000 authored Nov 15, 2024
1 parent 28f88e8 commit 19aa63a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,16 @@ <h1 class="govuk-label-wrapper">
<a class="govuk-link" href="javascript:void(0)" (click)="addUNNumber()">Add UN Number</a>
</p>
</div>

<!-- Additional details -->
<div class="govuk-form-group-text-area">
<h1>
<label id="techRecord_adrDetails_tank_tankDetails_tankStatement_productList-label">Additional Details </label>
</h1>
<app-control-errors [control]="form.controls.techRecord_adrDetails_tank_tankDetails_tankStatement_productList" />
<textarea govukTextarea formControlName="techRecord_adrDetails_tank_tankDetails_tankStatement_productList"></textarea>
<app-character-count for="techRecord_adrDetails_tank_tankDetails_tankStatement_productList" [limit]="1500" />
</div>
</ng-container>
</ng-container>
</ng-container>
Expand All @@ -458,9 +468,10 @@ <h1>
</h1>
<app-control-errors [control]="form.controls.techRecord_adrDetails_tank_tankDetails_specialProvisions" />
<textarea govukTextarea formControlName="techRecord_adrDetails_tank_tankDetails_specialProvisions"></textarea>
<app-character-count for="techRecord_adrDetails_tank_tankDetails_specialProvisions" [limit]="500" />
<app-character-count for="techRecord_adrDetails_tank_tankDetails_specialProvisions" [limit]="1024" />
</div>


<!-- Tank Inspections section -->
<ng-container>
<span class="govuk-label govuk-label--m">Tank Inspections</span>
Expand Down Expand Up @@ -808,7 +819,7 @@ <h1>
<div id="techRecord_adrDetails_additionalExaminerNotes_note-hint" class="govuk-hint">Will not be present on the ADR certificate</div>
<app-control-errors [control]="form.controls.techRecord_adrDetails_additionalExaminerNotes_note" />
<textarea govukTextarea formControlName="techRecord_adrDetails_additionalExaminerNotes_note"></textarea>
<app-character-count for="techRecord_adrDetails_additionalExaminerNotes_note" [limit]="1024" />
<app-character-count for="techRecord_adrDetails_additionalExaminerNotes_note" [limit]="1500" />
</div>

<!-- ADR Additional Examiner Note History -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ export class AdrSectionEditComponent implements OnInit, OnDestroy {
),
]
),
techRecord_adrDetails_tank_tankDetails_tankStatement_productList: this.fb.control<string | null>(null, []),
techRecord_adrDetails_tank_tankDetails_tankStatement_productList: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(1500, 'Additional Details must be less than or equal to 1500 characters'),
]),
techRecord_adrDetails_tank_tankDetails_specialProvisions: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(1500, 'Special provisions must be less than or equal to 1500 characters'),
this.commonValidators.maxLength(1500, 'Special provisions must be less than or equal to 1024 characters'),
]),

// Tank Details > Tank Inspections
Expand Down Expand Up @@ -191,7 +193,9 @@ export class AdrSectionEditComponent implements OnInit, OnDestroy {

// Miscellaneous
techRecord_adrDetails_newCertificateRequested: this.fb.control<boolean>(false),
techRecord_adrDetails_additionalExaminerNotes_note: this.fb.control<string | null>(null),
techRecord_adrDetails_additionalExaminerNotes_note: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(1500, 'Additional Examiner Notes must be less han or equal to 1024 characters'),
]),
techRecord_adrDetails_additionalExaminerNotes: this.fb.control<AdditionalExaminerNotes[] | null>(null),
techRecord_adrDetails_adrCertificateNotes: this.fb.control<string | null>(null, [
this.commonValidators.maxLength(1500, 'ADR Certificate Notes must be less han or equal to 1500 characters'),
Expand Down

0 comments on commit 19aa63a

Please sign in to comment.