@hmcts/ccd-case-ui-toolkit 6.13.11-welsh-release-v4 → 6.13.11-welsh-release-v5
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +97 -105
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +5 -8
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +19 -3
- package/esm2015/lib/shared/components/palette/base-field/payment-field.component.js +4 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +26 -2
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +36 -86
- package/esm2015/lib/shared/components/palette/palette.module.js +2 -2
- package/esm2015/lib/shared/components/palette/payment/case-payment-history-viewer-field.component.js +3 -3
- package/esm2015/lib/shared/components/palette/waystopay/waystopay-field.component.js +4 -4
- package/esm2015/lib/shared/services/fields/fields.utils.js +8 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +97 -100
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts +2 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +3 -5
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +2 -0
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts +1 -0
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts +2 -0
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts +0 -4
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +0 -4
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +2 -0
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4225,6 +4225,13 @@
|
|
|
4225
4225
|
}
|
|
4226
4226
|
return caseField.field_type.type === 'ComponentLauncher';
|
|
4227
4227
|
};
|
|
4228
|
+
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
4229
|
+
return FieldsUtils.isComponentLauncherCaseField(caseField) &&
|
|
4230
|
+
caseField.id === 'LinkedCasesComponentLauncher';
|
|
4231
|
+
};
|
|
4232
|
+
FieldsUtils.containsLinkedCasesCaseField = function (caseFields) {
|
|
4233
|
+
return caseFields === null || caseFields === void 0 ? void 0 : caseFields.some(function (caseField) { return FieldsUtils.isLinkedCasesCaseField(caseField); });
|
|
4234
|
+
};
|
|
4228
4235
|
FieldsUtils.isFlagsFieldType = function (fieldType) {
|
|
4229
4236
|
if (!fieldType) {
|
|
4230
4237
|
return false;
|
|
@@ -10126,14 +10133,14 @@
|
|
|
10126
10133
|
this.title$ = new rxjs.BehaviorSubject(null);
|
|
10127
10134
|
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
10128
10135
|
this.editForm$ = new rxjs.BehaviorSubject(null);
|
|
10129
|
-
this.
|
|
10136
|
+
this.isLinkedCasesJourneyAtFinalStep$ = new rxjs.BehaviorSubject(null);
|
|
10130
10137
|
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
10131
10138
|
this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
|
|
10132
10139
|
this.caseDetails$ = this.details$.asObservable();
|
|
10133
10140
|
this.caseTitle$ = this.title$.asObservable();
|
|
10134
10141
|
this.caseEditForm$ = this.editForm$.asObservable();
|
|
10135
10142
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
10136
|
-
this.
|
|
10143
|
+
this.caseIsLinkedCasesJourneyAtFinalStep$ = this.isLinkedCasesJourneyAtFinalStep$.asObservable();
|
|
10137
10144
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
10138
10145
|
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
10139
10146
|
}
|
|
@@ -10146,9 +10153,6 @@
|
|
|
10146
10153
|
CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
|
|
10147
10154
|
this.eventTriggerName$.next(triggerName);
|
|
10148
10155
|
};
|
|
10149
|
-
CaseEditDataService.prototype.setCaseLinkError = function (error) {
|
|
10150
|
-
this.linkError$.next(error);
|
|
10151
|
-
};
|
|
10152
10156
|
CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
|
|
10153
10157
|
this.formValidationErrors$.next(validationErrors);
|
|
10154
10158
|
};
|
|
@@ -10158,8 +10162,8 @@
|
|
|
10158
10162
|
CaseEditDataService.prototype.clearFormValidationErrors = function () {
|
|
10159
10163
|
this.formValidationErrors$.next([]);
|
|
10160
10164
|
};
|
|
10161
|
-
CaseEditDataService.prototype.
|
|
10162
|
-
this.
|
|
10165
|
+
CaseEditDataService.prototype.setLinkedCasesJourneyAtFinalStep = function (isAtFinalStep) {
|
|
10166
|
+
this.isLinkedCasesJourneyAtFinalStep$.next(isAtFinalStep);
|
|
10163
10167
|
};
|
|
10164
10168
|
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
10165
10169
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
@@ -10545,6 +10549,9 @@
|
|
|
10545
10549
|
this.caseEditDataService.caseEditForm$.subscribe({
|
|
10546
10550
|
next: function (editForm) { return _this.editForm = editForm; }
|
|
10547
10551
|
});
|
|
10552
|
+
this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
|
|
10553
|
+
next: function (isLinkedCasesJourneyAtFinalStep) { return _this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep; }
|
|
10554
|
+
});
|
|
10548
10555
|
this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
10549
10556
|
next: function (state) {
|
|
10550
10557
|
if (state) {
|
|
@@ -10564,7 +10571,11 @@
|
|
|
10564
10571
|
return this.caseEdit.first();
|
|
10565
10572
|
};
|
|
10566
10573
|
CaseEditPageComponent.prototype.currentPageIsNotValid = function () {
|
|
10567
|
-
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm)
|
|
10574
|
+
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
|
|
10575
|
+
(this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
|
|
10576
|
+
};
|
|
10577
|
+
CaseEditPageComponent.prototype.isLinkedCasesJourney = function () {
|
|
10578
|
+
return FieldsUtils.containsLinkedCasesCaseField(this.currentPage.case_fields);
|
|
10568
10579
|
};
|
|
10569
10580
|
/**
|
|
10570
10581
|
* caseEventData.event_data contains all the values from the previous pages so we set caseEventData.data = caseEventData.event_data
|
|
@@ -10664,7 +10675,16 @@
|
|
|
10664
10675
|
var _this = this;
|
|
10665
10676
|
this.caseEditDataService.clearFormValidationErrors();
|
|
10666
10677
|
if (this.currentPageIsNotValid()) {
|
|
10667
|
-
|
|
10678
|
+
// The generateErrorMessage method filters out the hidden fields.
|
|
10679
|
+
// The error message for LinkedCases journey will never get displayed because the
|
|
10680
|
+
// LinkedCases is configured with ComponentLauncher field as visible and caseLinks field as hidden.
|
|
10681
|
+
if (this.isLinkedCasesJourney()) {
|
|
10682
|
+
this.validationErrors.push({ id: 'next-button', message: 'Please select Next to go to the next page' });
|
|
10683
|
+
CaseEditPageComponent.scrollToTop();
|
|
10684
|
+
}
|
|
10685
|
+
else {
|
|
10686
|
+
this.generateErrorMessage(this.currentPage.case_fields);
|
|
10687
|
+
}
|
|
10668
10688
|
}
|
|
10669
10689
|
if (!this.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10670
10690
|
this.isSubmitting = true;
|
|
@@ -17434,6 +17454,7 @@
|
|
|
17434
17454
|
searchCases.forEach(function (response) {
|
|
17435
17455
|
casesResponse.push(_this.mapResponse(response));
|
|
17436
17456
|
});
|
|
17457
|
+
casesResponse = _this.sortReasonCodes(casesResponse);
|
|
17437
17458
|
_this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
|
|
17438
17459
|
_this.isLoaded = true;
|
|
17439
17460
|
var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
|
|
@@ -17459,6 +17480,30 @@
|
|
|
17459
17480
|
});
|
|
17460
17481
|
}
|
|
17461
17482
|
};
|
|
17483
|
+
LinkedCasesToTableComponent.prototype.sortReasonCodes = function (searchCasesResponse) {
|
|
17484
|
+
var _this = this;
|
|
17485
|
+
searchCasesResponse.forEach(function (item) {
|
|
17486
|
+
var _a;
|
|
17487
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.reasons) === null || _a === void 0 ? void 0 : _a.length) {
|
|
17488
|
+
item.reasons.forEach(function (reason) {
|
|
17489
|
+
reason.sortOrder = _this.getReasonSortOrder(reason.value.Reason);
|
|
17490
|
+
});
|
|
17491
|
+
item.reasons = item.reasons.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17492
|
+
item.sortOrder = item.reasons[0].sortOrder;
|
|
17493
|
+
}
|
|
17494
|
+
});
|
|
17495
|
+
searchCasesResponse = searchCasesResponse === null || searchCasesResponse === void 0 ? void 0 : searchCasesResponse.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17496
|
+
return searchCasesResponse;
|
|
17497
|
+
};
|
|
17498
|
+
LinkedCasesToTableComponent.prototype.getReasonSortOrder = function (reasonCode) {
|
|
17499
|
+
if (reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE) {
|
|
17500
|
+
return 1;
|
|
17501
|
+
}
|
|
17502
|
+
else if (reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE) {
|
|
17503
|
+
return 2;
|
|
17504
|
+
}
|
|
17505
|
+
return 3;
|
|
17506
|
+
};
|
|
17462
17507
|
LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
17463
17508
|
return rxjs.forkJoin(searchCasesResponse);
|
|
17464
17509
|
};
|
|
@@ -18091,87 +18136,52 @@
|
|
|
18091
18136
|
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null);
|
|
18092
18137
|
})();
|
|
18093
18138
|
|
|
18094
|
-
function
|
|
18095
|
-
if (rf & 1) {
|
|
18096
|
-
var _r9_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18097
|
-
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
18098
|
-
i0__namespace.ɵɵelementStart(1, "ul", 8);
|
|
18099
|
-
i0__namespace.ɵɵelementStart(2, "li");
|
|
18100
|
-
i0__namespace.ɵɵelementStart(3, "a", 9);
|
|
18101
|
-
i0__namespace.ɵɵlistener("click", function WriteLinkedCasesFieldComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
|
|
18102
|
-
i0__namespace.ɵɵtext(4);
|
|
18103
|
-
i0__namespace.ɵɵelementEnd();
|
|
18104
|
-
i0__namespace.ɵɵelementEnd();
|
|
18105
|
-
i0__namespace.ɵɵelementEnd();
|
|
18106
|
-
i0__namespace.ɵɵelementEnd();
|
|
18107
|
-
}
|
|
18108
|
-
if (rf & 2) {
|
|
18109
|
-
var errorMessage_r7 = ctx.$implicit;
|
|
18110
|
-
i0__namespace.ɵɵadvance(4);
|
|
18111
|
-
i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
|
|
18112
|
-
}
|
|
18113
|
-
}
|
|
18114
|
-
function WriteLinkedCasesFieldComponent_div_0_Template(rf, ctx) {
|
|
18139
|
+
function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) {
|
|
18115
18140
|
if (rf & 1) {
|
|
18116
|
-
i0__namespace.ɵɵ
|
|
18117
|
-
i0__namespace.ɵɵ
|
|
18118
|
-
i0__namespace.ɵɵ
|
|
18119
|
-
i0__namespace.ɵɵ
|
|
18120
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_div_0_div_3_Template, 5, 1, "div", 6);
|
|
18141
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18142
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
18143
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
|
|
18144
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onLinkedCasesStateEmitted($event); });
|
|
18121
18145
|
i0__namespace.ɵɵelementEnd();
|
|
18122
|
-
|
|
18123
|
-
if (rf & 2) {
|
|
18124
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
18125
|
-
i0__namespace.ɵɵadvance(3);
|
|
18126
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
|
|
18146
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
18127
18147
|
}
|
|
18128
18148
|
}
|
|
18129
18149
|
function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) {
|
|
18130
18150
|
if (rf & 1) {
|
|
18131
|
-
var
|
|
18151
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18132
18152
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
18133
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases
|
|
18134
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
18153
|
+
i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
|
|
18154
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onLinkedCasesStateEmitted($event); });
|
|
18135
18155
|
i0__namespace.ɵɵelementEnd();
|
|
18136
18156
|
i0__namespace.ɵɵelementContainerEnd();
|
|
18137
18157
|
}
|
|
18138
18158
|
}
|
|
18139
18159
|
function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) {
|
|
18140
18160
|
if (rf & 1) {
|
|
18141
|
-
var
|
|
18161
|
+
var _r10_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18142
18162
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
18143
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
18144
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
18163
|
+
i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 3);
|
|
18164
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.onLinkedCasesStateEmitted($event); });
|
|
18145
18165
|
i0__namespace.ɵɵelementEnd();
|
|
18146
18166
|
i0__namespace.ɵɵelementContainerEnd();
|
|
18147
18167
|
}
|
|
18148
18168
|
}
|
|
18149
18169
|
function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) {
|
|
18150
18170
|
if (rf & 1) {
|
|
18151
|
-
var
|
|
18171
|
+
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18152
18172
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
18153
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
18154
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
18173
|
+
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 3);
|
|
18174
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(); return ctx_r11.onLinkedCasesStateEmitted($event); });
|
|
18155
18175
|
i0__namespace.ɵɵelementEnd();
|
|
18156
18176
|
i0__namespace.ɵɵelementContainerEnd();
|
|
18157
18177
|
}
|
|
18158
18178
|
}
|
|
18159
18179
|
function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
18160
18180
|
if (rf & 1) {
|
|
18161
|
-
var
|
|
18162
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
18163
|
-
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
|
|
18164
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
|
|
18165
|
-
i0__namespace.ɵɵelementEnd();
|
|
18166
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
18167
|
-
}
|
|
18168
|
-
}
|
|
18169
|
-
function WriteLinkedCasesFieldComponent_ng_container_7_Template(rf, ctx) {
|
|
18170
|
-
if (rf & 1) {
|
|
18171
|
-
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18181
|
+
var _r14_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18172
18182
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
18173
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers",
|
|
18174
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
18183
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
|
|
18184
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r14_1); var ctx_r13 = i0__namespace.ɵɵnextContext(); return ctx_r13.onLinkedCasesStateEmitted($event); });
|
|
18175
18185
|
i0__namespace.ɵɵelementEnd();
|
|
18176
18186
|
i0__namespace.ɵɵelementContainerEnd();
|
|
18177
18187
|
}
|
|
@@ -18188,11 +18198,13 @@
|
|
|
18188
18198
|
_this.linkedCasesPages = exports.LinkedCasesPages;
|
|
18189
18199
|
_this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
|
|
18190
18200
|
_this.linkedCases = [];
|
|
18191
|
-
_this.errorMessages = [];
|
|
18192
18201
|
return _this;
|
|
18193
18202
|
}
|
|
18194
18203
|
WriteLinkedCasesFieldComponent.prototype.ngOnInit = function () {
|
|
18195
18204
|
var _this = this;
|
|
18205
|
+
// This is required to enable Continue button validation
|
|
18206
|
+
// Continue button should be enabled only at check your answers page
|
|
18207
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
18196
18208
|
// Clear validation errors
|
|
18197
18209
|
this.caseEditDataService.clearFormValidationErrors();
|
|
18198
18210
|
// Get linked case reasons from ref data
|
|
@@ -18229,11 +18241,10 @@
|
|
|
18229
18241
|
};
|
|
18230
18242
|
WriteLinkedCasesFieldComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
|
|
18231
18243
|
var _this = this;
|
|
18232
|
-
|
|
18244
|
+
// Clear validation errors
|
|
18233
18245
|
this.caseEditDataService.clearFormValidationErrors();
|
|
18234
18246
|
if (linkedCasesState.navigateToNextPage) {
|
|
18235
18247
|
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
18236
|
-
this.setContinueButtonValidationErrorMessage();
|
|
18237
18248
|
this.proceedToNextPage();
|
|
18238
18249
|
}
|
|
18239
18250
|
else {
|
|
@@ -18257,27 +18268,19 @@
|
|
|
18257
18268
|
}
|
|
18258
18269
|
});
|
|
18259
18270
|
};
|
|
18260
|
-
WriteLinkedCasesFieldComponent.prototype.setContinueButtonValidationErrorMessage = function () {
|
|
18261
|
-
var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
|
|
18262
|
-
? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
|
|
18263
|
-
: exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
|
|
18264
|
-
var buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
18265
|
-
? 'back-button'
|
|
18266
|
-
: 'next-button';
|
|
18267
|
-
this.caseEditDataService.setCaseLinkError({
|
|
18268
|
-
componentId: buttonId,
|
|
18269
|
-
errorMessage: errorMessage
|
|
18270
|
-
});
|
|
18271
|
-
};
|
|
18272
18271
|
WriteLinkedCasesFieldComponent.prototype.proceedToNextPage = function () {
|
|
18273
18272
|
if (this.isAtFinalPage()) {
|
|
18274
18273
|
// Continue button event must be allowed in final page
|
|
18275
|
-
this.caseEditDataService.
|
|
18274
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
|
|
18276
18275
|
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
18277
18276
|
this.formGroup.updateValueAndValidity();
|
|
18278
18277
|
// update form value
|
|
18279
18278
|
this.submitLinkedCases();
|
|
18280
18279
|
}
|
|
18280
|
+
else {
|
|
18281
|
+
// Continue button event must not be allowed if not in final page
|
|
18282
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
18283
|
+
}
|
|
18281
18284
|
};
|
|
18282
18285
|
WriteLinkedCasesFieldComponent.prototype.submitLinkedCases = function () {
|
|
18283
18286
|
if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
|
|
@@ -18321,38 +18324,24 @@
|
|
|
18321
18324
|
&& !_this.linkedCasesService.serverLinkedApiError)
|
|
18322
18325
|
? exports.LinkedCasesPages.BEFORE_YOU_START
|
|
18323
18326
|
: exports.LinkedCasesPages.NO_LINKED_CASES;
|
|
18324
|
-
// Initialise the error to be displayed when clicked on Continue button
|
|
18325
|
-
_this.setContinueButtonValidationErrorMessage();
|
|
18326
18327
|
});
|
|
18327
18328
|
};
|
|
18328
|
-
WriteLinkedCasesFieldComponent.prototype.navigateToErrorElement = function (elementId) {
|
|
18329
|
-
if (elementId) {
|
|
18330
|
-
var htmlElement = document.getElementById(elementId);
|
|
18331
|
-
if (htmlElement) {
|
|
18332
|
-
htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
18333
|
-
htmlElement.focus();
|
|
18334
|
-
}
|
|
18335
|
-
}
|
|
18336
|
-
};
|
|
18337
18329
|
return WriteLinkedCasesFieldComponent;
|
|
18338
18330
|
}(AbstractFieldWriteComponent));
|
|
18339
18331
|
WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
18340
|
-
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
18332
|
+
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) {
|
|
18341
18333
|
if (rf & 1) {
|
|
18342
|
-
i0__namespace.ɵɵ
|
|
18334
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
18343
18335
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
18344
|
-
i0__namespace.ɵɵ
|
|
18345
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container",
|
|
18346
|
-
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container",
|
|
18347
|
-
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container",
|
|
18348
|
-
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container",
|
|
18349
|
-
i0__namespace.ɵɵtemplate(7, WriteLinkedCasesFieldComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
|
|
18336
|
+
i0__namespace.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2);
|
|
18337
|
+
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2);
|
|
18338
|
+
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2);
|
|
18339
|
+
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2);
|
|
18340
|
+
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
|
|
18350
18341
|
i0__namespace.ɵɵelementEnd();
|
|
18351
18342
|
i0__namespace.ɵɵelementEnd();
|
|
18352
18343
|
}
|
|
18353
18344
|
if (rf & 2) {
|
|
18354
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
18355
|
-
i0__namespace.ɵɵadvance(1);
|
|
18356
18345
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
18357
18346
|
i0__namespace.ɵɵadvance(1);
|
|
18358
18347
|
i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
|
|
@@ -19698,6 +19687,9 @@
|
|
|
19698
19687
|
PaymentField.prototype.getRefundsUrl = function () {
|
|
19699
19688
|
return this.appConfig.getRefundsUrl();
|
|
19700
19689
|
};
|
|
19690
|
+
PaymentField.prototype.getNotificationUrl = function () {
|
|
19691
|
+
return this.appConfig.getNotificationUrl();
|
|
19692
|
+
};
|
|
19701
19693
|
PaymentField.prototype.getUserRoles = function () {
|
|
19702
19694
|
var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
|
|
19703
19695
|
if (!userDetails || !userDetails.hasOwnProperty('roles')) {
|
|
@@ -19723,12 +19715,12 @@
|
|
|
19723
19715
|
return CasePaymentHistoryViewerFieldComponent;
|
|
19724
19716
|
}(PaymentField));
|
|
19725
19717
|
CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
19726
|
-
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars:
|
|
19718
|
+
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 16, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
|
|
19727
19719
|
if (rf & 1) {
|
|
19728
19720
|
i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
|
|
19729
19721
|
}
|
|
19730
19722
|
if (rf & 2) {
|
|
19731
|
-
i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
|
|
19723
|
+
i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
|
|
19732
19724
|
}
|
|
19733
19725
|
}, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
|
|
19734
19726
|
(function () {
|
|
@@ -20147,7 +20139,7 @@
|
|
|
20147
20139
|
}
|
|
20148
20140
|
if (rf & 2) {
|
|
20149
20141
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
20150
|
-
i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
|
|
20142
|
+
i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
|
|
20151
20143
|
}
|
|
20152
20144
|
}
|
|
20153
20145
|
var WaysToPayFieldComponent = /** @class */ (function (_super) {
|
|
@@ -20161,9 +20153,9 @@
|
|
|
20161
20153
|
return WaysToPayFieldComponent;
|
|
20162
20154
|
}(PaymentField));
|
|
20163
20155
|
WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
20164
|
-
WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
|
|
20156
|
+
WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
|
|
20165
20157
|
if (rf & 1) {
|
|
20166
|
-
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1,
|
|
20158
|
+
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
|
|
20167
20159
|
}
|
|
20168
20160
|
if (rf & 2) {
|
|
20169
20161
|
i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
|
|
@@ -26522,7 +26514,7 @@
|
|
|
26522
26514
|
AddCommentsComponent,
|
|
26523
26515
|
ManageCaseFlagsComponent,
|
|
26524
26516
|
UpdateFlagComponent], []);
|
|
26525
|
-
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2__namespace
|
|
26517
|
+
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2__namespace$1.NgControlStatusGroup, i2__namespace$1.FormGroupDirective, i2__namespace.NgSwitch, i2__namespace.NgSwitchCase, BeforeYouStartComponent,
|
|
26526
26518
|
NoLinkedCasesComponent,
|
|
26527
26519
|
LinkCasesComponent,
|
|
26528
26520
|
UnLinkCasesComponent,
|