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

Case flags v2 based on master #1548

Closed
wants to merge 128 commits into from
Closed
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
e29553c
EUI-4157 Remove unused constructor argument from cases service.
bradley-hmcts Mar 8, 2023
1434b39
Merge remote-tracking branch 'origin/master' into EUI-4157-Cases-serv…
bradley-hmcts Mar 14, 2023
46e4dea
EUI-7931 Yarn V3 upgrade (#1385)
bradley-hmcts Mar 22, 2023
5f0d59c
Rename files
LucaDelBuonoHMCTS Mar 23, 2023
0924fb8
Linting
LucaDelBuonoHMCTS Mar 23, 2023
455a3fd
EUI-4157 Set version to 6.13.10_eui-4157
bradley-hmcts Mar 23, 2023
759f9b7
Linting - Add public to methods
LucaDelBuonoHMCTS Mar 23, 2023
023fcab
Fix version
bradley-hmcts Mar 23, 2023
d2919b0
Linting - strict equality
LucaDelBuonoHMCTS Mar 23, 2023
9907ca1
Linting
LucaDelBuonoHMCTS Mar 23, 2023
dfa0786
Merge branch 'master' into Release
RiteshHMCTS Mar 23, 2023
f9bf1db
Merge branch 'master' into Release
RiteshHMCTS Mar 24, 2023
e2034b0
Merge branch 'master' into EUI-8030-Linting
LucaDelBuonoHMCTS Mar 27, 2023
84a5d78
EUI-8030: More linting
LucaDelBuonoHMCTS Mar 27, 2023
62e13b1
Merge branch 'Release' into EUI-8030-Linting
LucaDelBuonoHMCTS Mar 28, 2023
e5b9811
EUI-8030: update yarn.lock
LucaDelBuonoHMCTS Mar 28, 2023
ecf28ca
EUI-8030: Revert changes
LucaDelBuonoHMCTS Mar 28, 2023
aabb9cf
Merge remote-tracking branch 'origin/Release' into EUI-4157-Cases-ser…
bradley-hmcts Mar 28, 2023
1a99909
Merge remote-tracking branch 'origin/master' into EUI-4157-Cases-serv…
bradley-hmcts Mar 28, 2023
d17c794
Yarn lock update
bradley-hmcts Mar 28, 2023
d3a580e
EUI-4157 Bump version to b
bradley-hmcts Mar 29, 2023
3f5f766
EUI-163: Tests
LucaDelBuonoHMCTS Mar 30, 2023
ee9d6d1
EUI-163: Tests
LucaDelBuonoHMCTS Mar 30, 2023
246f0db
Merge remote-tracking branch 'origin/master' into EUI-4157-Cases-serv…
bradley-hmcts Apr 3, 2023
221fdcf
Bump version to 6.13.10-eui-4157b
bradley-hmcts Apr 3, 2023
bd022e5
Add empty Yarn.lock to project dir
bradley-hmcts Apr 3, 2023
7a6da69
Bump yarn engine to v3
bradley-hmcts Apr 3, 2023
e760b8c
Revert yarn.lock to Release version
bradley-hmcts Apr 3, 2023
1582b62
version bump to 6.13.10-eui-4157e
bradley-hmcts Apr 3, 2023
8d0e237
Update yarn.lock
bradley-hmcts Apr 3, 2023
5a8143c
bump version to 6.13.10-eui-4157f
bradley-hmcts Apr 3, 2023
802de1b
yarn lock
bradley-hmcts Apr 3, 2023
8b7f045
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 3, 2023
7fc7326
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 3, 2023
efa1830
Update yarn.lock
johnbenjamin-hmcts Apr 3, 2023
b32f370
Bump version to 6.13.10-eui-4157g
bradley-hmcts Apr 3, 2023
bc2f0cc
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 3, 2023
bc89565
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 4, 2023
f52b008
Bump version to 6.13.10-eui-4157h
bradley-hmcts Apr 4, 2023
daec611
Update npm publish workflow
bradley-hmcts Apr 4, 2023
9930032
Update github actions build workflow
bradley-hmcts Apr 4, 2023
342e19d
Update version
bradley-hmcts Apr 4, 2023
c61e473
Use new yarn publish cmd
bradley-hmcts Apr 4, 2023
8336725
Add npm auth token
bradley-hmcts Apr 4, 2023
7516f4d
Fix gpr publish
bradley-hmcts Apr 4, 2023
02041f8
Merge remote-tracking branch 'origin/master' into Release
bradley-hmcts Apr 4, 2023
8f083ee
NPM Publish fix
bradley-hmcts Apr 4, 2023
943301f
Remove old yarnrc
bradley-hmcts Apr 4, 2023
610396e
Fix gpr publish cmd
bradley-hmcts Apr 4, 2023
1394c24
Merge remote-tracking branch 'origin/npm-publish-fix' into EUI-4157-C…
bradley-hmcts Apr 4, 2023
4633ca0
Version 6.13.10-b-eui-4157
bradley-hmcts Apr 4, 2023
9a35ca1
Add publish registry config
bradley-hmcts Apr 4, 2023
5ab0934
Merge branch 'npm-publish-fix' into EUI-4157-Cases-service-constructo…
bradley-hmcts Apr 4, 2023
c5168dc
Bump version
bradley-hmcts Apr 4, 2023
44ca37f
Update actions to V3
bradley-hmcts Apr 4, 2023
7fb3d8a
Add yarnrc to projects dir
bradley-hmcts Apr 4, 2023
2136d5f
Move publish conditional up to job instead of steps
bradley-hmcts Apr 4, 2023
aea0ad9
Adjust github workflow
bradley-hmcts Apr 4, 2023
4725fbc
Get branch in line with 197
bradley-hmcts Apr 4, 2023
93a6039
Merge pull request #1413 from hmcts/npm-publish-fix
bradley-hmcts Apr 4, 2023
1f31361
Merge remote-tracking branch 'origin/Release' into EUI-4157-Cases-ser…
bradley-hmcts Apr 4, 2023
22fd3cd
Merge branch 'Release' into bug/EUI-8025-Linked-cases-continue-button…
johnbenjamin-hmcts Apr 4, 2023
66806f8
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 4, 2023
fa3e8fe
Merge branch 'Release' into EUI-8030-Linting
LucaDelBuonoHMCTS Apr 5, 2023
196e821
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 5, 2023
699b870
Workflow change...
bradley-hmcts Apr 5, 2023
65cbf3d
Merge pull request #1410 from hmcts/bug/EUI-8025-Linked-cases-continu…
johnbenjamin-hmcts Apr 5, 2023
209363f
Workfloaw and workspace tweak
bradley-hmcts Apr 5, 2023
9cbefae
Revert "Workfloaw and workspace tweak"
bradley-hmcts Apr 5, 2023
50d4b05
Publish fix
bradley-hmcts Apr 5, 2023
6ed4581
Merge remote-tracking branch 'origin/master' into publish-fix
bradley-hmcts Apr 5, 2023
48451cd
Merge pull request #1417 from hmcts/publish-fix
bradley-hmcts Apr 5, 2023
3461c8d
Merge remote-tracking branch 'origin/Release' into EUI-4157-Cases-ser…
bradley-hmcts Apr 5, 2023
f67f039
Merge branch 'Release' into feature/Hearings-Post-Go-Live-1.2
johnbenjamin-hmcts Apr 5, 2023
db36558
EUI-8025 Linked cases continue button not showing error message
johnbenjamin-hmcts Apr 5, 2023
a6e1ecd
bug/EUI-8026 reasons sort
Kartheek-S Apr 5, 2023
579536e
Merge branch 'feature/Hearings-Post-Go-Live-1.2' into bug/EUI-8026
Kartheek-S Apr 5, 2023
3c5449c
CR comments fix
Kartheek-S Apr 6, 2023
b077aed
Merge pull request #1399 from hmcts/EUI-8030-Linting
RiteshHMCTS Apr 6, 2023
c893e6e
Merge remote-tracking branch 'origin/Release' into EUI-4157-Cases-ser…
bradley-hmcts Apr 6, 2023
2507262
Verison bump to 6.14.4-eui-4157-b
bradley-hmcts Apr 6, 2023
4a7114d
EXUI-163: More linting
LucaDelBuonoHMCTS Apr 6, 2023
25a0268
EXUI-163: Fix test
LucaDelBuonoHMCTS Apr 6, 2023
6d14c0d
Merge pull request #1419 from hmcts/EXUI-163-Linting
RiteshHMCTS Apr 6, 2023
0f3768b
Merge pull request #1390 from hmcts/EUI-4157-Cases-service-constructo…
bradley-hmcts Apr 12, 2023
c2b7adc
Merge pull request #1418 from hmcts/bug/EUI-8026
johnbenjamin-hmcts Apr 13, 2023
85daf59
Merge branch 'Release' into feature/Hearings-Post-Go-Live-1.2
johnbenjamin-hmcts Apr 18, 2023
07a46b1
Merge from release
johnbenjamin-hmcts Apr 18, 2023
d44a3b0
Merge branch 'master' into Release
RiteshHMCTS Apr 18, 2023
97ea218
Merge branch 'Release' into feature/Hearings-Post-Go-Live-1.2
RiteshHMCTS Apr 26, 2023
d3e1285
Merge pull request #1415 from hmcts/feature/Hearings-Post-Go-Live-1.2
RiteshHMCTS Apr 26, 2023
72ae027
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 2, 2023
fa61e46
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 3, 2023
3eb6511
Lint fixes
johnbenjamin-hmcts May 3, 2023
bdff3dd
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 3, 2023
0fc15dd
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 4, 2023
425a89d
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 4, 2023
a090dec
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 4, 2023
ffdc177
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 4, 2023
8a0f43d
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 4, 2023
9b831de
EUI-8303 QM Orchestrator
johnbenjamin-hmcts May 5, 2023
09b0522
Merge pull request #1445 from hmcts/feature/EUI-8303-QM-Orchestrator
johnbenjamin-hmcts May 5, 2023
5cf2953
Tech/marge master release 4 (#1448)
connorpgpmcelroy May 10, 2023
97f42ad
Update npmpublish.yml to node 16
andywilkinshmcts May 11, 2023
a570ed3
Feature/e UI 8112 (#1450)
MateiHMCTS May 16, 2023
7a179a1
Feature/EUI 8139 (#1453)
DavidJayakumar May 17, 2023
ecf5aba
QM WriteTest paletteService changes (#1455)
MateiHMCTS May 17, 2023
418f98d
Case Flags v2 (Reasonable Adjustments) feature (#1321)
Daniel-Lam May 19, 2023
1a126ad
Merge branch 'master' into Case-flags-v2-based-on-master
johnbenjamin-hmcts Aug 17, 2023
9df8b37
Case flags v2
johnbenjamin-hmcts Aug 17, 2023
1ab7472
Case-flags-v2-based-on-master
johnbenjamin-hmcts Aug 18, 2023
69678e6
revert the changes made to node version
johnbenjamin-hmcts Aug 21, 2023
f99eb2b
EUI-8779 Merge unmerged RA code
johnbenjamin-hmcts Aug 24, 2023
2050389
EUI-8779 Merge unmerged RA code
johnbenjamin-hmcts Aug 24, 2023
62c8e11
EUI-8779 Merge unmerged RA code
johnbenjamin-hmcts Aug 25, 2023
15e6448
EUI-8779 Merge unmerged RA code
johnbenjamin-hmcts Aug 25, 2023
f347fda
Merge pull request #1552 from hmcts/feature/EUI-8779---Merge-unmerged…
johnbenjamin-hmcts Aug 31, 2023
65b5b24
Merge branch 'master' into Case-flags-v2-based-on-master
johnbenjamin-hmcts Sep 5, 2023
abded83
Merge from master
johnbenjamin-hmcts Sep 5, 2023
df384cc
EUI-8778: Prevent flag status tag text from wrapping in Case Flags table
Daniel-Lam Sep 12, 2023
7d99280
EUI-8778: Prevent flag status tag text from wrapping in Case Flags ta…
Daniel-Lam Sep 12, 2023
d5410d0
Merge branch 'Case-flags-v2-based-on-master' of https://github.com/hm…
Daniel-Lam Sep 12, 2023
03f2f06
Merge branch 'master' into Case-flags-v2-based-on-master
johnbenjamin-hmcts Sep 19, 2023
fd4922c
Merge branch 'master' into Case-flags-v2-based-on-master
johnbenjamin-hmcts Sep 28, 2023
4d25fb6
Merge from master
johnbenjamin-hmcts Sep 28, 2023
862b020
Merge branch 'master' into Case-flags-v2-based-on-master
johnbenjamin-hmcts Sep 29, 2023
8df6d45
Merge from master
johnbenjamin-hmcts Sep 29, 2023
894db59
Merge branch 'master' into Case-flags-v2-based-on-master
DavidJayakumar Nov 21, 2023
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
56 changes: 56 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## RELEASE NOTES
### Version 6.19.2-case-flags-v2-reasonable-adjustments-v2
**EUI-7243** Case flags v2 reasonable adjustments

### Version 6.18.3-hotfix-EUI-8738
**EUI-8738** Remove JudicialUser FormControls from FormGroup displayed on "Check your answers" page

Expand All @@ -19,6 +22,59 @@
**EUI-8515** Fix Case Flags and Linked Cases submissions not to depend on presence of "Check your answers" page
**EUI-8550** Fix incorrect behaviour of showEventNotes() function on Case Event submission, introduced in error by EUI-6693

### Version 6.16.0-query-management-orchestrator-v3
**EUI-8303** Query management orchestrator to get the mock data

### Version 6.10.7-case-flags-v2-welsh-language-support-additional-rework-2
**EUI-8116** Additional rework of Welsh language support

### Version 6.10.7-case-flags-v2-reasonable-adjustments-fixes
**EUI-8370** Ensure "Other" support type is not shown at the top-level selection when the user is external
**EUI-8371** Show details of the selected support being updated when the user is external

### Version 6.10.7-case-flags-v2-hide-event-summary-and-description-on-cya-page-v2
**EUI-8246** Reasonable Adjustments legal rep hide Event Summary and Event Description section on CYA page

### Version 6.10.7-case-flags-v2-view-case-flags-ui-amendments-v2
**EUI-8069** Fix Case Flags table display to show selected language for "Language Interpreter" flag types (ported from Case Flags v1)
**EUI-8070** Display "decision reason" (flag update comment) for "Not approved" flags to internal HMCTS users only
**EUI-8071** Hide "Active flags" banner from external users

### Version 6.10.7-case-flags-legal-rep-comments-page-v3
**EUI-7373** Reasonable Adjustments legal rep display and edit 'Tell us why the support is no longer needed' screen

### Version 6.10.7-case-flags-welsh-language-support
**EUI-7858** Ensure support for Welsh language toggle by storing flag description and comments entries in correct `_cy` fields, and displaying flag comments according to language selection

### Version 6.10.7-case-flags-legal-rep-review-details-page
**EUI-7375** Reasonable adjustments legal rep display review flag details page

### Version 6.10.7-case-flags-review-details-page-v4
**EUI-7351** Reasonable adjustments display review flag details page

### Version 6.10.7-manage-case-flags-valid-status-progression
**EUI-7929** Set the valid flag status options available on the "Update flag" page, based on the current status of the selected flag

### Version 6.10.7-manage-case-flags-filter-out-inactive-and-not-approved
**EUI-7354** Ensure flags with a status of either "Inactive" or "Not approved" are filtered out from display on "Manage case flags" page, so they cannot be selected for update

### Version 6.10.7-case-flags-add-translations-page-validation
**EUI-7932** Add validation to "Add translations to flag" page and map additional fields for "Other" description (English/Welsh) and flag comments (Welsh) for persistence as part of flag update

### Version 6.10.7-case-flags-manage-case-flags-ui-amendments
**EUI-7777** Change wording for "translation needed" checkbox on "Update flag" page
**EUI-7842** Remove read-only setting from English description and comments boxes on "Add Welsh translation to flag" page
**EUI-7900** Add validation to "Update flag" page

### Version 6.10.7-case-flags-confirm-flag-status-page-validation
**EUI-7611** Add validation to "Confirm the status of the flag" page

### Version 6.10.7-case-flags-write-component-fixes-for-legal-rep-journey
**EUI-7362** Ensure correct titles and captions are shown for "Request support" and "Manage support" journeys for legal reps

### Version 6.10.7-case-flags-confirm-flag-status-step
**EUI-7350** Add "confirm flag status" step of Create Case Flag journey

### Version 6.13.10-case-flags-show-language-for-interpreter-flag-types
**EUI-8069** Fix Case Flags table display to show selected language for "Language Interpreter" flag types

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.3-RetryCaseRetrievals.1",
"version": "6.19.2-case-flags-v2-reasonable-adjustments-v2",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down Expand Up @@ -99,7 +99,7 @@
"@angular/cli": "^11.2.19",
"@angular/compiler-cli": "~11.2.14",
"@babel/core": "^7.18.10",
"@compodoc/compodoc": "1.1.12",
"@compodoc/compodoc": "^1.1.12",
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
"@storybook/addon-interactions": "^6.5.10",
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.3-RetryCaseRetrievals.1",
"version": "6.19.2-case-flags-v2-reasonable-adjustments-v2",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { CaseEditDataModule } from './case-edit-data.module';

describe('JurisdictionService', () => {
describe('forRoot', () => {
it('shouldto be truthy', () => {
expect(CaseEditDataModule.forRoot()).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { take } from 'rxjs/operators';
import { CaseEditDataService } from './case-edit-data.service';

describe('CaseEditDataService', () => {
let service: CaseEditDataService;

describe('setCaseTitle', () => {
it('should update title', (done) => {
service = new CaseEditDataService();
service.setCaseTitle('mr');
service.caseTitle$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual('mr');
done();
});
});
});

describe('setCaseEventTriggerName', () => {
it('should update eventTriggerName', (done) => {
service = new CaseEditDataService();
service.setCaseEventTriggerName('test');
service.caseEventTriggerName$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual('test');
done();
});
});
});

describe('setFormValidationErrors', () => {
it('should update formValidationErrors', (done) => {
const result = [{
id: 'id',
message: 'message'
}];
service = new CaseEditDataService();
service.setFormValidationErrors(result);
service.caseFormValidationErrors$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual(result);
done();
});
});
});

describe('addFormValidationError', () => {
it('should update formValidationErrors', (done) => {
const result = [{
id: 'id',
message: 'message'
}];
service = new CaseEditDataService();
service.addFormValidationError(result[0]);
service.caseFormValidationErrors$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual(result);
done();
});
});
});

describe('setTriggerSubmitEvent', () => {
it('should update triggerSubmitEvent', (done) => {
const result = true;
service = new CaseEditDataService();
service.setTriggerSubmitEvent(result);
service.caseTriggerSubmitEvent$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual(result);
done();
});
});
});

describe('clearFormValidationErrors', () => {
it('should clear formValidationErrors', (done) => {
const result = [];
service = new CaseEditDataService();
service.clearFormValidationErrors();

service.caseFormValidationErrors$.pipe(take(1)).subscribe((actual) => {
expect(actual).toEqual(result);
done();
});
});
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ describe('CaseCreateComponent failed to resolve event trigger', () => {
}));

it('should alert warning message and never announce event trigger if getting event trigger fails', () => {
expect(alertService.error).toHaveBeenCalledWith({ phrase: 'ERROR!'});
expect(alertService.error).toHaveBeenCalledWith({ phrase: 'ERROR!' });
expect(eventTriggerService.announceEventTrigger).not.toHaveBeenCalled();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
ProfileNotifier,
SessionStorageService
} from '../../../services';
import { MockRpxTranslatePipe } from '../../../test/mock-rpx-translate.pipe';
import { IsCompoundPipe } from '../../palette/utils/is-compound.pipe';
import { CaseEditPageText } from '../case-edit-page/case-edit-page-text.enum';
import { aWizardPage } from '../case-edit.spec';
Expand Down Expand Up @@ -204,7 +205,8 @@ describe('CaseEditSubmitComponent', () => {
CcdCYAPageLabelFilterPipe,
CcdPageFieldsPipe,
CaseReferencePipe,
CcdCaseTitlePipe
CcdCaseTitlePipe,
MockRpxTranslatePipe
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
Expand Down Expand Up @@ -532,7 +534,8 @@ describe('CaseEditSubmitComponent', () => {
CcdPageFieldsPipe,
CcdCYAPageLabelFilterPipe,
CaseReferencePipe,
CcdCaseTitlePipe
CcdCaseTitlePipe,
MockRpxTranslatePipe
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
Expand Down Expand Up @@ -683,7 +686,8 @@ describe('CaseEditSubmitComponent', () => {
CcdPageFieldsPipe,
CcdCYAPageLabelFilterPipe,
CaseReferencePipe,
CcdCaseTitlePipe
CcdCaseTitlePipe,
MockRpxTranslatePipe
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div *ngIf="!caseEdit.isEventCompletionChecksRequired">
<!-- Event trigger name -->
<h1 class="govuk-heading-l">{{ eventTrigger.name}}</h1>
<h1 class="govuk-heading-l">{{eventTrigger.name | rpxTranslate}}</h1>

<!--Case ID or Title -->
<div *ngIf="getCaseTitle(); then titleBlock; else idBlock"></div>
Expand All @@ -22,7 +22,7 @@ <h2 *ngIf="getCaseId()" class="heading-h2">#{{ getCaseId() | ccdCaseReference }}
<h2 class="heading-h2">{{pageTitle | rpxTranslate }}</h2>
<span class="text-16" *ngIf="!caseEdit.isCaseFlagSubmission">{{'Check the information below carefully.' | rpxTranslate}}</span>

<table class="form-table" aria-describedby="check your answers table">
<table class="form-table" [attr.aria-describedby]="'check your answers table' | rpxTranslate">
<tbody>
<ng-container *ngFor="let page of wizard.pages">
<ng-container *ngIf="isShown(page)">
Expand All @@ -33,15 +33,21 @@ <h2 class="heading-h2">{{pageTitle | rpxTranslate }}</h2>
<ng-container *ngIf="canShowFieldInCYA(field)">
<tr ccdLabelSubstitutor [caseField]="field" [hidden]="field.hidden"
[formGroup]="editForm.controls['data']" [contextFields]="contextFields">
<th *ngIf="!isLabel(field) && !caseEdit.isCaseFlagSubmission" class="valign-top case-field-label"><span class="text-16">{{field.label}}</span></th>
<th *ngIf="!isLabel(field) && !caseEdit.isCaseFlagSubmission" class="valign-top case-field-label">
<span class="text-16">{{field.label | rpxTranslate}}</span>
</th>
<td class="form-cell case-field-content" [attr.colspan]="isLabel(field) ? '2' : '1'">
<ccd-field-read
[formGroup]="editForm.controls['data']" [topLevelFormGroup]="editForm.controls['data']"
[caseField]="summaryCaseField(field)" [context]="paletteContext" [caseFields]="contextFields"></ccd-field-read>
</td>
<td class="valign-top check-your-answers__change case-field-change">
<a *ngIf="isChangeAllowed(field)" (click)="navigateToPage(page.id)"
href="javascript:void(0)"><span class="text-16" attr.aria-label="Change {{ field.label }}">Change</span></a>
href="javascript:void(0)">
<span class="text-16" attr.aria-label="{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}">
{{'Change' | rpxTranslate}}
</span>
</a>
</td>
</tr>
</ng-container>
Expand All @@ -53,12 +59,12 @@ <h2 class="heading-h2">{{pageTitle | rpxTranslate }}</h2>
</ng-container>
<ng-container *ngIf="readOnlySummaryFieldsToDisplayExists()">

<table class="summary-fields" aria-describedby="summary fields table">
<table class="summary-fields" [attr.aria-describedby]="'summary fields table' | rpxTranslate">
<tbody>
<ng-container *ngFor="let field of showSummaryFields">
<ng-container [ngSwitch]="!(field | ccdIsCompound)">
<tr *ngSwitchCase="true" ccdLabelSubstitutor [caseField]="field" [formGroup]="editForm.controls['data']" [contextFields]="contextFields">
<th id="summary-field-label">{{field.label}}</th>
<th id="summary-field-label">{{field.label | rpxTranslate}}</th>
<td class="form-cell">
<ccd-field-read [formGroup]="editForm.controls['data']" [caseField]="summaryCaseField(field)"></ccd-field-read>
</td>
Expand All @@ -78,23 +84,31 @@ <h2 class="heading-h2">{{pageTitle | rpxTranslate }}</h2>
<legend style="display: none;"></legend>
<div class="form-group">
<label for="field-trigger-summary" class="form-label">
Event summary (optional)
<span class="form-hint">A few words describing the purpose of the event.</span>
{{'Event summary (optional)' | rpxTranslate}}
<span class="form-hint">{{'A few words describing the purpose of the event.' | rpxTranslate}}</span>
</label>
<input type="text" id="field-trigger-summary" class="form-control bottom-30 width-50" formControlName="summary" maxlength="1024">
</div>
<div class="form-group">
<label for="field-trigger-description" class="form-label">Event description (optional)</label>
<label for="field-trigger-description" class="form-label">{{'Event description(optional)' | rpxTranslate}}</label>
<textarea id="field-trigger-description" class="form-control bottom-30 width-50" formControlName="description"
maxlength="65536"></textarea>
</div>
</fieldset>
</ng-container>
<div class="form-group form-group-related">
<button class="button button-secondary" type="button" [disabled]="!hasPrevious() || caseEdit.isSubmitting" (click)="previous()">Previous</button>
<button type="submit" [disabled]="isDisabled" class="button">{{triggerText}}</button>
<button class="button button-secondary" type="button" [disabled]="!hasPrevious() || caseEdit.isSubmitting" (click)="previous()">
{{'Previous' | rpxTranslate}}
</button>
<button type="submit" [disabled]="isDisabled" class="button">
{{triggerText | rpxTranslate}}
</button>
</div>
<p class="cancel"><a (click)="cancel()" href="javascript:void(0)" [class.disabled]="caseEdit.isSubmitting">{{getCancelText()}}</a></p>
<p class="cancel">
<a (click)="cancel()" href="javascript:void(0)" [class.disabled]="caseEdit.isSubmitting">
{{getCancelText() | rpxTranslate}}
</a>
</p>
</form>
</div>
<ccd-case-event-completion *ngIf="caseEdit.isEventCompletionChecksRequired"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ a.disabled {
width: 50%
}

.no-bottom-border {
border-bottom: none;
}

.case-field-change {
width: 5%
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
WorkAllocationService
} from './services';
import { CaseEditWizardGuard } from './services/case-edit-wizard.guard';
import { CaseFlagStateService } from './services/case-flag-state.service';
import { CaseworkerService } from './services/case-worker.service';

@NgModule({
Expand Down Expand Up @@ -121,7 +122,8 @@ import { CaseworkerService } from './services/case-worker.service';
JudicialworkerService,
CaseworkerService,
SessionStorageService,
EventCompletionStateMachineService
EventCompletionStateMachineService,
CaseFlagStateService
]
})
export class CaseEditorModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { TestBed } from '@angular/core/testing';
import { FormControl } from '@angular/forms';
import { CaseFlagStateService } from './case-flag-state.service';

describe('CaseFlagStateService', () => {
let caseFlagStateService: CaseFlagStateService;

beforeEach(() => {
TestBed.configureTestingModule({
providers: [CaseFlagStateService]
});
caseFlagStateService = TestBed.inject(CaseFlagStateService);
});

it('should be created', () => {
expect(caseFlagStateService).toBeTruthy();
});

it('calling resetCache should reset the form group and set location', () => {
const formControlName = 'test' ;
caseFlagStateService.formGroup.addControl(formControlName, new FormControl());
expect(caseFlagStateService.formGroup.get(formControlName)).toBeTruthy();
const newLocation = 'newLocation';
caseFlagStateService.resetCache(newLocation);
expect(caseFlagStateService.formGroup.get(formControlName)).toBeNull();
expect(caseFlagStateService.pageLocation).toBe(newLocation);
});
});
Loading