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

VIH-11109 Re-name Case type on VH to Service #1450

Merged
merged 7 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
oliver-scott marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 class="govuk-error-summary__title" id="error-summary-title">Please complete
<a (click)="goToDiv('caseName-error')">Please enter a case name</a>
</li>
<li *ngIf="caseType.invalid">
<a (click)="goToDiv('caseType-error')">Please enter a case type</a>
<a (click)="goToDiv('caseType-error')">Please enter a service</a>
</li>
</ul>
</div>
Expand Down Expand Up @@ -66,7 +66,7 @@ <h2 class="govuk-error-summary__title" id="error-summary-title">Please complete
</div>

<div *ngIf="availableCaseTypes.length > 1" [ngClass]="caseTypeInvalid ? 'govuk-form-group--error' : 'govuk-form-group'">
<label class="govuk-label govuk-!-width-one-half" for="caseType"> Case type </label>
<label class="govuk-label govuk-!-width-one-half" for="caseType">Service</label>
<!--suppress XmlDuplicatedId -->
<select *ngIf="!this.editMode" class="govuk-select govuk-!-width-one-half" id="caseType" formControlName="caseType">
<option *ngFor="let availableCaseType of availableCaseTypes" [ngValue]="availableCaseType">
Expand All @@ -83,7 +83,7 @@ <h2 class="govuk-error-summary__title" id="error-summary-title">Please complete
formControlName="caseType"
/>
<div *ngIf="caseTypeInvalid" class="alert alert-danger">
<span id="caseType-error" class="govuk-error-message"> Please select a case type </span>
<span id="caseType-error" class="govuk-error-message">Please select a service</span>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<label class="govuk-label" for="case-type-list">Case types</label>
<label class="govuk-label" for="case-type-list">Services</label>
<div [formGroup]="form">
<ng-select
id="case-type-list"
Expand All @@ -8,17 +8,17 @@
bindLabel="item"
bindValue="item"
formControlName="selectedCaseTypes"
[placeholder]="'Select case types'"
[placeholder]="'Select services'"
[multiple]="true"
[attr.aria-label]="'Case type list'"
[attr.aria-label]="'Service list'"
[closeOnSelect]="false"
[clearSearchOnAdd]="true"
[selectOnTab]="true"
(add)="onSelect()"
(change)="onSelect()"
>
<ng-template ng-option-tmp let-item="item" let-item$="item$" let-index="index">
<input id="item-{{ index }}" type="checkbox" [checked]="item$.selected" [attr.aria-label]="'Case type ' + item" />
<input id="item-{{ index }}" type="checkbox" [checked]="item$.selected" [attr.aria-label]="'Service ' + item" />
{{ item }}
</ng-template>
</ng-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('CaseTypesMenuComponent', () => {

it('should render menu item', () => {
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.govuk-label').textContent).toContain('Case types');
expect(compiled.querySelector('.govuk-label').textContent).toContain('Services');
});

describe('enable', () => {
Expand Down Expand Up @@ -77,7 +77,7 @@ describe('CaseTypesMenuComponent', () => {
});

describe('onSelect', () => {
it('should select case type', () => {
it('should select Service', () => {
component.loadItems();
component.form.controls[component.formGroupName].setValue(caseType);
component.onSelect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class CaseTypesMenuComponent extends MenuBase {
];
this.logger.debug(`${this.loggerPrefix} Updating list of case-types.`, { caseTypes: data.length });
},
error: error => this.handleListError(error, 'case types')
error: error => this.handleListError(error, 'Services')
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
#selectCaseType
(selectionChange)="onCaseTypeSelected($event)"
[items]="caseTypesSelectOptions"
ariaLabel="Case types list"
placeholder="Select case types"
title="Case types"
ariaLabel="Services list"
placeholder="Select Services"
title="Services"
multiple
[selectedEntityIds]="selectedCaseTypeIds"
></app-select>
Expand Down Expand Up @@ -151,7 +151,7 @@
<th scope="col" class="govuk-table__header">Start time</th>
<th scope="col" class="govuk-table__header">Estimated duration</th>
<th scope="col" class="govuk-table__header">Case number</th>
<th scope="col" class="govuk-table__header">Case Type</th>
<th scope="col" class="govuk-table__header">Service</th>
<th scope="col" class="govuk-table__header">Allocated officer</th>
<th scope="col" class="govuk-table__header no-border"></th>
<th scope="col" class="govuk-table__header no-border"></th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ describe('AllocateHearingsComponent', () => {
expect(allocateServiceSpy.getAllocationHearings).toHaveBeenCalled();
});

it('should map selected options for case types to id array', () => {
it('should map selected options for Services to id array', () => {
const id = newGuid();
const id2 = newGuid();
const label = '';
Expand Down