@hmcts/ccd-case-ui-toolkit 7.1.60 → 7.1.61-is-caseworker
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +6 -22
- package/esm2022/lib/shared/components/case-viewer/services/case.resolver.mjs +4 -3
- package/esm2022/lib/shared/components/create-case-filters/create-case-filters.component.mjs +3 -2
- package/esm2022/lib/shared/components/palette/palette.module.mjs +2 -2
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +4 -3
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +6 -8
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +57 -42
- package/esm2022/lib/shared/components/palette/query-management/enums/raise-query-error-message.enum.mjs +2 -1
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +5 -7
- package/esm2022/lib/shared/services/activity/activity.service.mjs +4 -3
- package/esm2022/lib/shared/utils.mjs +10 -0
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +83 -80
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts +1 -6
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts +2 -0
- package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/enums/raise-query-error-message.enum.d.ts +1 -0
- package/lib/shared/components/palette/query-management/enums/raise-query-error-message.enum.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +1 -1
- package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/utils.d.ts +6 -0
- package/lib/shared/utils.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1644,6 +1644,16 @@ class SessionStorageService {
|
|
|
1644
1644
|
type: Injectable
|
|
1645
1645
|
}], null, null); })();
|
|
1646
1646
|
|
|
1647
|
+
const USER_DETAILS = 'userDetails';
|
|
1648
|
+
const PUI_CASE_MANAGER = 'pui-case-manager';
|
|
1649
|
+
const JUDGE = 'judge';
|
|
1650
|
+
function isCaseworker(sessionStorageService) {
|
|
1651
|
+
const userDetails = JSON.parse(sessionStorageService?.getItem(USER_DETAILS));
|
|
1652
|
+
return userDetails && userDetails.roles
|
|
1653
|
+
&& !(userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
1654
|
+
|| userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1647
1657
|
// @dynamic
|
|
1648
1658
|
class ActivityService {
|
|
1649
1659
|
http;
|
|
@@ -1669,7 +1679,7 @@ class ActivityService {
|
|
|
1669
1679
|
return error;
|
|
1670
1680
|
}
|
|
1671
1681
|
getOptions() {
|
|
1672
|
-
const userDetails = JSON.parse(this.sessionStorageService.getItem(
|
|
1682
|
+
const userDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
1673
1683
|
const headers = new HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
1674
1684
|
return {
|
|
1675
1685
|
headers,
|
|
@@ -1703,7 +1713,7 @@ class ActivityService {
|
|
|
1703
1713
|
}
|
|
1704
1714
|
}
|
|
1705
1715
|
verifyUserIsAuthorized() {
|
|
1706
|
-
if (this.sessionStorageService.getItem(
|
|
1716
|
+
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
1707
1717
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
1708
1718
|
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
1709
1719
|
});
|
|
@@ -8896,10 +8906,7 @@ class WorkAllocationService {
|
|
|
8896
8906
|
.post(url, { actionByEvent: true, eventName: eventName })
|
|
8897
8907
|
.pipe(catchError(error => {
|
|
8898
8908
|
this.errorService.setError(error);
|
|
8899
|
-
|
|
8900
|
-
this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
|
|
8901
|
-
this.handleTaskCompletionError(response);
|
|
8902
|
-
});
|
|
8909
|
+
this.handleTaskCompletionError();
|
|
8903
8910
|
return throwError(error);
|
|
8904
8911
|
}));
|
|
8905
8912
|
}
|
|
@@ -8925,10 +8932,7 @@ class WorkAllocationService {
|
|
|
8925
8932
|
})
|
|
8926
8933
|
.pipe(catchError(error => {
|
|
8927
8934
|
this.errorService.setError(error);
|
|
8928
|
-
|
|
8929
|
-
this.http.get(this.appConfig.getUserInfoApiUrl()).pipe(map(response => response)).subscribe((response) => {
|
|
8930
|
-
this.handleTaskCompletionError(response);
|
|
8931
|
-
});
|
|
8935
|
+
this.handleTaskCompletionError();
|
|
8932
8936
|
return throwError(error);
|
|
8933
8937
|
}));
|
|
8934
8938
|
}
|
|
@@ -8936,24 +8940,13 @@ class WorkAllocationService {
|
|
|
8936
8940
|
* Handles the response from the observable to get the user details when task is completed.
|
|
8937
8941
|
* @param response is the response given from the observable which contains the user detaild.
|
|
8938
8942
|
*/
|
|
8939
|
-
handleTaskCompletionError(
|
|
8940
|
-
|
|
8941
|
-
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
8943
|
+
handleTaskCompletionError() {
|
|
8944
|
+
if (isCaseworker(this.sessionStorageService)) {
|
|
8942
8945
|
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
8943
8946
|
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
8944
8947
|
this.alertService.warning({ phrase: 'A task could not be completed successfully. Please complete the task associated with the case manually.' });
|
|
8945
8948
|
}
|
|
8946
8949
|
}
|
|
8947
|
-
/**
|
|
8948
|
-
* Returns true if the user's role is equivalent to a caseworker.
|
|
8949
|
-
* @param roles is the list of roles found from the current user.
|
|
8950
|
-
*/
|
|
8951
|
-
userIsCaseworker(roles) {
|
|
8952
|
-
const lowerCaseRoles = roles.map(role => role.toLowerCase());
|
|
8953
|
-
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
8954
|
-
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
8955
|
-
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
8956
|
-
}
|
|
8957
8950
|
/**
|
|
8958
8951
|
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
8959
8952
|
* 1. No tasks found => Success.
|
|
@@ -20492,6 +20485,7 @@ var RaiseQueryErrorMessage;
|
|
|
20492
20485
|
RaiseQueryErrorMessage["QUERY_BODY"] = "Enter query details";
|
|
20493
20486
|
RaiseQueryErrorMessage["QUERY_HEARING_RELATED"] = "Select whether the query is hearing related or not";
|
|
20494
20487
|
RaiseQueryErrorMessage["QUERY_HEARING_DATE"] = "Enter a valid date";
|
|
20488
|
+
RaiseQueryErrorMessage["QUERY_SUBJECT_MAX_LENGTH"] = "Query subject must be less than 201 characters in length";
|
|
20495
20489
|
RaiseQueryErrorMessage["RESPOND_QUERY_BODY"] = "Add a response before continue";
|
|
20496
20490
|
})(RaiseQueryErrorMessage || (RaiseQueryErrorMessage = {}));
|
|
20497
20491
|
|
|
@@ -21270,7 +21264,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21270
21264
|
this.router.navigate(['/', 'service-down']);
|
|
21271
21265
|
}
|
|
21272
21266
|
generateCaseQueriesCollectionData() {
|
|
21273
|
-
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(
|
|
21267
|
+
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21274
21268
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21275
21269
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21276
21270
|
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
@@ -21510,7 +21504,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21510
21504
|
}], querySubmitted: [{
|
|
21511
21505
|
type: Output
|
|
21512
21506
|
}] }); })();
|
|
21513
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber:
|
|
21507
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 28 }); })();
|
|
21514
21508
|
|
|
21515
21509
|
function QueryDetailsComponent_ng_container_0_cut_alert_1_Template(rf, ctx) { if (rf & 1) {
|
|
21516
21510
|
i0.ɵɵelementStart(0, "cut-alert", 11);
|
|
@@ -21860,10 +21854,7 @@ class QueryDetailsComponent {
|
|
|
21860
21854
|
this.backClicked.emit(true);
|
|
21861
21855
|
}
|
|
21862
21856
|
isCaseworker() {
|
|
21863
|
-
|
|
21864
|
-
return userDetails && userDetails.roles
|
|
21865
|
-
&& !(userDetails.roles.includes('pui-case-manager')
|
|
21866
|
-
|| userDetails.roles.some((role) => role.toLowerCase().includes('judge')));
|
|
21857
|
+
return isCaseworker(this.sessionStorageService);
|
|
21867
21858
|
}
|
|
21868
21859
|
ngOnChanges() {
|
|
21869
21860
|
this.toggleLinkVisibility();
|
|
@@ -21907,7 +21898,7 @@ class QueryDetailsComponent {
|
|
|
21907
21898
|
}], hasResponded: [{
|
|
21908
21899
|
type: Output
|
|
21909
21900
|
}] }); })();
|
|
21910
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
21901
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 15 }); })();
|
|
21911
21902
|
|
|
21912
21903
|
class QueryEventCompletionComponent {
|
|
21913
21904
|
eventCompletionParams;
|
|
@@ -22295,11 +22286,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_11_Template(rf, ctx) { if (rf &
|
|
|
22295
22286
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22296
22287
|
i0.ɵɵelementEnd();
|
|
22297
22288
|
} if (rf & 2) {
|
|
22298
|
-
const
|
|
22289
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
22299
22290
|
i0.ɵɵadvance(2);
|
|
22300
|
-
i0.ɵɵ
|
|
22291
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
|
|
22301
22292
|
i0.ɵɵadvance(2);
|
|
22302
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22293
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.getSubjectErrorMessage()), " ");
|
|
22303
22294
|
} }
|
|
22304
22295
|
function QueryWriteRaiseQueryComponent_div_11_p_21_Template(rf, ctx) { if (rf & 1) {
|
|
22305
22296
|
i0.ɵɵelementStart(0, "p", 29)(1, "span", 28);
|
|
@@ -22310,11 +22301,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_21_Template(rf, ctx) { if (rf &
|
|
|
22310
22301
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22311
22302
|
i0.ɵɵelementEnd();
|
|
22312
22303
|
} if (rf & 2) {
|
|
22313
|
-
const
|
|
22304
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
22314
22305
|
i0.ɵɵadvance(2);
|
|
22315
22306
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22316
22307
|
i0.ɵɵadvance(2);
|
|
22317
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22308
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r1.raiseQueryErrorMessage.QUERY_BODY), " ");
|
|
22318
22309
|
} }
|
|
22319
22310
|
function QueryWriteRaiseQueryComponent_div_11_p_30_Template(rf, ctx) { if (rf & 1) {
|
|
22320
22311
|
i0.ɵɵelementStart(0, "p", 30)(1, "span", 28);
|
|
@@ -22325,11 +22316,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_30_Template(rf, ctx) { if (rf &
|
|
|
22325
22316
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22326
22317
|
i0.ɵɵelementEnd();
|
|
22327
22318
|
} if (rf & 2) {
|
|
22328
|
-
const
|
|
22319
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
22329
22320
|
i0.ɵɵadvance(2);
|
|
22330
22321
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22331
22322
|
i0.ɵɵadvance(2);
|
|
22332
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22323
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r1.raiseQueryErrorMessage.QUERY_HEARING_RELATED), " ");
|
|
22333
22324
|
} }
|
|
22334
22325
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template(rf, ctx) { if (rf & 1) {
|
|
22335
22326
|
i0.ɵɵelementStart(0, "p", 36)(1, "span", 28);
|
|
@@ -22340,11 +22331,11 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template(rf, c
|
|
|
22340
22331
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22341
22332
|
i0.ɵɵelementEnd();
|
|
22342
22333
|
} if (rf & 2) {
|
|
22343
|
-
const
|
|
22334
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22344
22335
|
i0.ɵɵadvance(2);
|
|
22345
22336
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22346
22337
|
i0.ɵɵadvance(2);
|
|
22347
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22338
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r1.raiseQueryErrorMessage.QUERY_HEARING_DATE), " ");
|
|
22348
22339
|
} }
|
|
22349
22340
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template(rf, ctx) { if (rf & 1) {
|
|
22350
22341
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22357,15 +22348,16 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template(rf, ctx)
|
|
|
22357
22348
|
i0.ɵɵelementEnd()();
|
|
22358
22349
|
i0.ɵɵelementContainerEnd();
|
|
22359
22350
|
} if (rf & 2) {
|
|
22360
|
-
const
|
|
22351
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
22361
22352
|
i0.ɵɵadvance();
|
|
22362
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$C,
|
|
22353
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$C, ctx_r1.submitted && ctx_r1.formGroup.get("isHearingRelated").value === true && ctx_r1.formGroup.get("hearingDate").value === null));
|
|
22363
22354
|
i0.ɵɵadvance(4);
|
|
22364
22355
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 3, "What is the date of the hearing?"), " ");
|
|
22365
22356
|
i0.ɵɵadvance(2);
|
|
22366
|
-
i0.ɵɵproperty("ngIf",
|
|
22357
|
+
i0.ɵɵproperty("ngIf", ctx_r1.submitted && ctx_r1.formGroup.get("isHearingRelated").value === true && ctx_r1.formGroup.get("hearingDate").value === null);
|
|
22367
22358
|
} }
|
|
22368
22359
|
function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
22360
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
22369
22361
|
i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "div")(3, "div", 7)(4, "div", 8)(5, "label", 9);
|
|
22370
22362
|
i0.ɵɵtext(6);
|
|
22371
22363
|
i0.ɵɵpipe(7, "rpxTranslate");
|
|
@@ -22375,7 +22367,8 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22375
22367
|
i0.ɵɵpipe(10, "rpxTranslate");
|
|
22376
22368
|
i0.ɵɵelementEnd();
|
|
22377
22369
|
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_p_11_Template, 6, 6, "p", 11);
|
|
22378
|
-
i0.ɵɵ
|
|
22370
|
+
i0.ɵɵelementStart(12, "input", 12);
|
|
22371
|
+
i0.ɵɵlistener("input", function QueryWriteRaiseQueryComponent_div_11_Template_input_input_12_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSubjectInput()); });
|
|
22379
22372
|
i0.ɵɵelementEnd()();
|
|
22380
22373
|
i0.ɵɵelementStart(13, "div", 7)(14, "div", 8)(15, "label", 13);
|
|
22381
22374
|
i0.ɵɵtext(16);
|
|
@@ -22407,50 +22400,46 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22407
22400
|
i0.ɵɵpipe(41, "rpxTranslate");
|
|
22408
22401
|
i0.ɵɵelementEnd()()()();
|
|
22409
22402
|
i0.ɵɵtemplate(42, QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template, 9, 7, "ng-container", 26);
|
|
22410
|
-
i0.ɵɵelementEnd()()();
|
|
22403
|
+
i0.ɵɵelementEnd()()()();
|
|
22411
22404
|
} if (rf & 2) {
|
|
22412
|
-
|
|
22413
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
22405
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
22414
22406
|
i0.ɵɵadvance();
|
|
22415
|
-
i0.ɵɵproperty("formGroup",
|
|
22407
|
+
i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
|
|
22416
22408
|
i0.ɵɵadvance(2);
|
|
22417
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
22409
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(40, _c0$C, ctx_r1.submitted && ctx_r1.formGroup.get("subject").hasError("required")));
|
|
22418
22410
|
i0.ɵɵadvance(3);
|
|
22419
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7,
|
|
22411
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 22, "Query subject"), " ");
|
|
22420
22412
|
i0.ɵɵadvance(3);
|
|
22421
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10,
|
|
22413
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 24, "The subject should be a summary of your query"), " ");
|
|
22422
22414
|
i0.ɵɵadvance(2);
|
|
22423
|
-
i0.ɵɵproperty("ngIf",
|
|
22424
|
-
i0.ɵɵadvance();
|
|
22425
|
-
i0.ɵɵ
|
|
22426
|
-
i0.ɵɵproperty("formControlName", "subject");
|
|
22427
|
-
i0.ɵɵadvance();
|
|
22428
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(45, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required")));
|
|
22415
|
+
i0.ɵɵproperty("ngIf", ctx_r1.submitted && (ctx_r1.formGroup.get("subject").hasError("required") || ctx_r1.formGroup.get("subject").hasError("maxlength")));
|
|
22416
|
+
i0.ɵɵadvance(2);
|
|
22417
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(42, _c0$C, ctx_r1.submitted && ctx_r1.formGroup.get("body").hasError("required")));
|
|
22429
22418
|
i0.ɵɵadvance(3);
|
|
22430
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17,
|
|
22419
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 26, "Query detail"), " ");
|
|
22431
22420
|
i0.ɵɵadvance(3);
|
|
22432
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20,
|
|
22421
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 28, "Include as many details as possible so case workers can respond to your query"), " ");
|
|
22433
22422
|
i0.ɵɵadvance(2);
|
|
22434
|
-
i0.ɵɵproperty("ngIf",
|
|
22423
|
+
i0.ɵɵproperty("ngIf", ctx_r1.submitted && ctx_r1.formGroup.get("body").hasError("required"));
|
|
22435
22424
|
i0.ɵɵadvance();
|
|
22436
|
-
i0.ɵɵclassProp("govuk-textarea--error",
|
|
22425
|
+
i0.ɵɵclassProp("govuk-textarea--error", ctx_r1.submitted && ctx_r1.formGroup.get("body").hasError("required"));
|
|
22437
22426
|
i0.ɵɵproperty("formControlName", "body");
|
|
22438
22427
|
i0.ɵɵadvance(2);
|
|
22439
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
22428
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(44, _c0$C, ctx_r1.submitted && ctx_r1.formGroup.get("isHearingRelated").hasError("required")));
|
|
22440
22429
|
i0.ɵɵadvance(4);
|
|
22441
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29,
|
|
22430
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 30, "Is the query hearing related?"), " ");
|
|
22442
22431
|
i0.ɵɵadvance(2);
|
|
22443
|
-
i0.ɵɵproperty("ngIf",
|
|
22432
|
+
i0.ɵɵproperty("ngIf", ctx_r1.submitted && ctx_r1.formGroup.get("isHearingRelated").hasError("required"));
|
|
22444
22433
|
i0.ɵɵadvance(3);
|
|
22445
|
-
i0.ɵɵproperty("checked",
|
|
22434
|
+
i0.ɵɵproperty("checked", ctx_r1.formGroup.get("isHearingRelated").value === true)("value", true);
|
|
22446
22435
|
i0.ɵɵadvance(2);
|
|
22447
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(36,
|
|
22436
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(36, 32, "Is the query hearing related?", null, "Yes"), " ");
|
|
22448
22437
|
i0.ɵɵadvance(3);
|
|
22449
|
-
i0.ɵɵproperty("checked",
|
|
22438
|
+
i0.ɵɵproperty("checked", ctx_r1.formGroup.get("isHearingRelated").value === false)("value", false);
|
|
22450
22439
|
i0.ɵɵadvance(2);
|
|
22451
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(41,
|
|
22440
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(41, 36, "Is the query hearing related?", null, "No"), " ");
|
|
22452
22441
|
i0.ɵɵadvance(2);
|
|
22453
|
-
i0.ɵɵproperty("ngIf",
|
|
22442
|
+
i0.ɵɵproperty("ngIf", ctx_r1.formGroup.get("isHearingRelated").value);
|
|
22454
22443
|
} }
|
|
22455
22444
|
class QueryWriteRaiseQueryComponent {
|
|
22456
22445
|
formGroup;
|
|
@@ -22458,8 +22447,25 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22458
22447
|
caseDetails;
|
|
22459
22448
|
showForm;
|
|
22460
22449
|
raiseQueryErrorMessage = RaiseQueryErrorMessage;
|
|
22450
|
+
onSubjectInput() {
|
|
22451
|
+
const control = this.formGroup.get('subject');
|
|
22452
|
+
const value = control?.value;
|
|
22453
|
+
if (value && value.length > 200) {
|
|
22454
|
+
control?.setValue(value.substring(0, 200));
|
|
22455
|
+
}
|
|
22456
|
+
}
|
|
22457
|
+
getSubjectErrorMessage() {
|
|
22458
|
+
const control = this.formGroup.get('subject');
|
|
22459
|
+
if (control.hasError('required')) {
|
|
22460
|
+
return this.raiseQueryErrorMessage.QUERY_SUBJECT;
|
|
22461
|
+
}
|
|
22462
|
+
if (control.hasError('maxlength')) {
|
|
22463
|
+
return this.raiseQueryErrorMessage.QUERY_SUBJECT_MAX_LENGTH;
|
|
22464
|
+
}
|
|
22465
|
+
return '';
|
|
22466
|
+
}
|
|
22461
22467
|
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(t) { return new (t || QueryWriteRaiseQueryComponent)(); };
|
|
22462
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "
|
|
22468
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22463
22469
|
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
|
|
22464
22470
|
i0.ɵɵtext(3);
|
|
22465
22471
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -22472,7 +22478,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22472
22478
|
i0.ɵɵelement(9, "ccd-query-case-details-header", 3);
|
|
22473
22479
|
i0.ɵɵelementEnd();
|
|
22474
22480
|
i0.ɵɵelement(10, "hr");
|
|
22475
|
-
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_Template, 43,
|
|
22481
|
+
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_Template, 43, 46, "div", 4);
|
|
22476
22482
|
i0.ɵɵelementEnd();
|
|
22477
22483
|
} if (rf & 2) {
|
|
22478
22484
|
i0.ɵɵadvance(3);
|
|
@@ -22487,7 +22493,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22487
22493
|
}
|
|
22488
22494
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
22489
22495
|
type: Component,
|
|
22490
|
-
args: [{ selector: 'ccd-query-write-raise-query', template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n
|
|
22496
|
+
args: [{ selector: 'ccd-query-write-raise-query', template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
22491
22497
|
}], null, { formGroup: [{
|
|
22492
22498
|
type: Input
|
|
22493
22499
|
}], submitted: [{
|
|
@@ -22930,10 +22936,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
22930
22936
|
this.query = null;
|
|
22931
22937
|
}
|
|
22932
22938
|
isCaseworker() {
|
|
22933
|
-
|
|
22934
|
-
return userDetails && userDetails.roles
|
|
22935
|
-
&& !(userDetails.roles.includes('pui-case-manager')
|
|
22936
|
-
|| userDetails.roles.some((role) => role.toLowerCase().includes('judge')));
|
|
22939
|
+
return isCaseworker(this.sessionStorageService);
|
|
22937
22940
|
}
|
|
22938
22941
|
static ɵfac = function ReadQueryManagementFieldComponent_Factory(t) { return new (t || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
22939
22942
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -22947,7 +22950,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
22947
22950
|
type: Component,
|
|
22948
22951
|
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isCaseworker()\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n</ng-template>\n" }]
|
|
22949
22952
|
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
22950
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
22953
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
|
|
22951
22954
|
|
|
22952
22955
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
22953
22956
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(t) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(t || ReadTextAreaFieldComponent); }; })();
|
|
@@ -30603,7 +30606,7 @@ ReadQueryManagementFieldComponent, function () { return [i5.NgForOf, i5.NgIf, i1
|
|
|
30603
30606
|
i0.ɵɵsetComponentScope(QueryDetailsComponent, function () { return [i5.NgForOf, i5.NgIf, AlertComponent, QueryAttachmentsReadComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
|
|
30604
30607
|
i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryDetailsComponent,
|
|
30605
30608
|
QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
30606
|
-
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
|
|
30609
|
+
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.MaxLengthValidator, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
|
|
30607
30610
|
QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
30608
30611
|
i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
|
|
30609
30612
|
QueryAttachmentsReadComponent,
|
|
@@ -33675,9 +33678,9 @@ class CaseResolver {
|
|
|
33675
33678
|
// as discussed for EUI-5456, need functionality to go to default page
|
|
33676
33679
|
goToDefaultPage() {
|
|
33677
33680
|
console.info('Going to default page!');
|
|
33678
|
-
const userDetails = JSON.parse(this.sessionStorage.getItem(
|
|
33681
|
+
const userDetails = JSON.parse(this.sessionStorage.getItem(USER_DETAILS));
|
|
33679
33682
|
userDetails && userDetails.roles
|
|
33680
|
-
&& !userDetails.roles.includes(
|
|
33683
|
+
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
33681
33684
|
&&
|
|
33682
33685
|
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
33683
33686
|
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
@@ -37816,7 +37819,7 @@ class CreateCaseFiltersComponent {
|
|
|
37816
37819
|
return events.filter(event => event.pre_states.length === 0);
|
|
37817
37820
|
}
|
|
37818
37821
|
retainEventsWithCreateRights(events) {
|
|
37819
|
-
const userProfile = JSON.parse(this.sessionStorageService.getItem(
|
|
37822
|
+
const userProfile = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
37820
37823
|
return events.filter(event => userProfile && userProfile.roles &&
|
|
37821
37824
|
!!userProfile.roles.find(role => this.hasCreateAccess(event, role)));
|
|
37822
37825
|
}
|