@hmcts/ccd-case-ui-toolkit 6.14.1 → 6.14.4-eui-4157-b
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 +378 -432
- 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/components/form/date-input/date-input.component.js +8 -8
- package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
- package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
- package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/base-field/payment-field.component.js +1 -4
- package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
- package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
- package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +5 -5
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +3 -3
- package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +1 -1
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +1 -1
- package/esm2015/lib/shared/components/palette/payment/case-payment-history-viewer-field.component.js +3 -3
- package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
- package/esm2015/lib/shared/components/palette/waystopay/waystopay-field.component.js +4 -4
- package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +3 -7
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
- package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
- package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
- package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
- package/esm2015/lib/shared/pipes/complex/index.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
- package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
- package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
- package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
- package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
- package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +4 -4
- package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
- package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
- package/esm2015/lib/shared/services/search/search.service.js +5 -10
- package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
- package/esm2015/lib/shared/services/window/window.service.js +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +366 -412
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts +0 -2
- package/lib/app.config.d.ts.map +1 -1
- package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts +0 -1
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
- package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
- package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
- package/lib/shared/fixture/case-field-builder.d.ts +6 -6
- package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
- package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
- package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
- package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/complex/index.d.ts +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +1 -1
- package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +1 -4
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +0 -2
- package/lib/shared/services/search/search.service.d.ts.map +1 -1
- package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
- package/lib/shared/services/window/window.service.d.ts.map +1 -1
- package/package.json +2 -2
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -1036,22 +1036,22 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
1038
|
DateInputComponent.prototype.dayId = function () {
|
|
1039
|
-
return this.id +
|
|
1039
|
+
return this.id + "-day";
|
|
1040
1040
|
};
|
|
1041
1041
|
DateInputComponent.prototype.monthId = function () {
|
|
1042
|
-
return this.id +
|
|
1042
|
+
return this.id + "-month";
|
|
1043
1043
|
};
|
|
1044
1044
|
DateInputComponent.prototype.yearId = function () {
|
|
1045
|
-
return this.id +
|
|
1045
|
+
return this.id + "-year";
|
|
1046
1046
|
};
|
|
1047
1047
|
DateInputComponent.prototype.hourId = function () {
|
|
1048
|
-
return this.id +
|
|
1048
|
+
return this.id + "-hour";
|
|
1049
1049
|
};
|
|
1050
1050
|
DateInputComponent.prototype.minuteId = function () {
|
|
1051
|
-
return this.id +
|
|
1051
|
+
return this.id + "-minute";
|
|
1052
1052
|
};
|
|
1053
1053
|
DateInputComponent.prototype.secondId = function () {
|
|
1054
|
-
return this.id +
|
|
1054
|
+
return this.id + "-second";
|
|
1055
1055
|
};
|
|
1056
1056
|
DateInputComponent.prototype.viewValue = function () {
|
|
1057
1057
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
this.minute ? this.pad(this.minute) : '',
|
|
1067
1067
|
this.second ? this.pad(this.second) : ''
|
|
1068
1068
|
].join(':');
|
|
1069
|
-
return date +
|
|
1069
|
+
return date + "T" + time + ".000";
|
|
1070
1070
|
}
|
|
1071
1071
|
else {
|
|
1072
1072
|
return date;
|
|
@@ -2131,7 +2131,7 @@
|
|
|
2131
2131
|
});
|
|
2132
2132
|
ActivityService.handleHttpError = function (response) {
|
|
2133
2133
|
var error = HttpErrorService.convertToHttpError(response);
|
|
2134
|
-
if (response
|
|
2134
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
2135
2135
|
error.status = response.status;
|
|
2136
2136
|
}
|
|
2137
2137
|
return error;
|
|
@@ -2139,12 +2139,11 @@
|
|
|
2139
2139
|
ActivityService.prototype.getOptions = function () {
|
|
2140
2140
|
var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
2141
2141
|
var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
2142
|
-
|
|
2142
|
+
return {
|
|
2143
2143
|
headers: headers,
|
|
2144
2144
|
withCredentials: true,
|
|
2145
2145
|
observe: 'body',
|
|
2146
2146
|
};
|
|
2147
|
-
return options;
|
|
2148
2147
|
};
|
|
2149
2148
|
ActivityService.prototype.getActivities = function () {
|
|
2150
2149
|
var caseId = [];
|
|
@@ -2153,41 +2152,33 @@
|
|
|
2153
2152
|
}
|
|
2154
2153
|
try {
|
|
2155
2154
|
var options = this.getOptions();
|
|
2156
|
-
var url = this.activityUrl() +
|
|
2155
|
+
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2157
2156
|
return this.http
|
|
2158
2157
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2159
2158
|
.pipe(operators.map(function (response) { return response; }));
|
|
2160
2159
|
}
|
|
2161
2160
|
catch (error) {
|
|
2162
|
-
console.log(
|
|
2161
|
+
console.log("user may not be authenticated." + error);
|
|
2163
2162
|
}
|
|
2164
2163
|
};
|
|
2165
2164
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2166
2165
|
try {
|
|
2167
2166
|
var options = this.getOptions();
|
|
2168
|
-
var url = this.activityUrl() +
|
|
2167
|
+
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2169
2168
|
var body = { activity: activity };
|
|
2170
2169
|
return this.http
|
|
2171
2170
|
.post(url, body, options, false)
|
|
2172
2171
|
.pipe(operators.map(function (response) { return response; }));
|
|
2173
2172
|
}
|
|
2174
2173
|
catch (error) {
|
|
2175
|
-
console.log(
|
|
2174
|
+
console.log("user may not be authenticated." + error);
|
|
2176
2175
|
}
|
|
2177
2176
|
};
|
|
2178
2177
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2179
2178
|
var _this = this;
|
|
2180
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2181
|
-
return;
|
|
2182
|
-
}
|
|
2183
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2179
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2184
2180
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2185
|
-
|
|
2186
|
-
_this.userAuthorised = false;
|
|
2187
|
-
}
|
|
2188
|
-
else {
|
|
2189
|
-
_this.userAuthorised = true;
|
|
2190
|
-
}
|
|
2181
|
+
_this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2191
2182
|
});
|
|
2192
2183
|
}
|
|
2193
2184
|
};
|
|
@@ -2300,7 +2291,7 @@
|
|
|
2300
2291
|
requests.get(activity.caseId).next(activity);
|
|
2301
2292
|
});
|
|
2302
2293
|
}, function (err) {
|
|
2303
|
-
console.log(
|
|
2294
|
+
console.log("error: " + err);
|
|
2304
2295
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2305
2296
|
}); });
|
|
2306
2297
|
});
|
|
@@ -2440,9 +2431,9 @@
|
|
|
2440
2431
|
};
|
|
2441
2432
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2442
2433
|
var resultText = prefix;
|
|
2443
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2434
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
|
|
2444
2435
|
if (unknownCount > 0) {
|
|
2445
|
-
resultText += (namesArray.length > 0 ?
|
|
2436
|
+
resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
|
|
2446
2437
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2447
2438
|
}
|
|
2448
2439
|
else {
|
|
@@ -2450,10 +2441,10 @@
|
|
|
2450
2441
|
}
|
|
2451
2442
|
if (suffix.length > 0) {
|
|
2452
2443
|
if (namesArray.length + unknownCount > 1) {
|
|
2453
|
-
resultText +=
|
|
2444
|
+
resultText += " are " + suffix;
|
|
2454
2445
|
}
|
|
2455
2446
|
else {
|
|
2456
|
-
resultText +=
|
|
2447
|
+
resultText += " is " + suffix;
|
|
2457
2448
|
}
|
|
2458
2449
|
}
|
|
2459
2450
|
return resultText;
|
|
@@ -2792,7 +2783,7 @@
|
|
|
2792
2783
|
break;
|
|
2793
2784
|
case 'n':
|
|
2794
2785
|
case 'N':
|
|
2795
|
-
maybePush(result,
|
|
2786
|
+
maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2796
2787
|
break;
|
|
2797
2788
|
case 'V':
|
|
2798
2789
|
case 'O':
|
|
@@ -2926,9 +2917,9 @@
|
|
|
2926
2917
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
2927
2918
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2928
2919
|
resultDate += ', ';
|
|
2929
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
2930
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
2931
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
2920
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
|
|
2921
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ":";
|
|
2922
|
+
resultDate += this.pad(offsetDate.getSeconds()) + " ";
|
|
2932
2923
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2933
2924
|
}
|
|
2934
2925
|
}
|
|
@@ -3744,25 +3735,25 @@
|
|
|
3744
3735
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3745
3736
|
var simpleAddress = '';
|
|
3746
3737
|
if (organisationModel.addressLine1) {
|
|
3747
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3738
|
+
simpleAddress += organisationModel.addressLine1 + "<br>";
|
|
3748
3739
|
}
|
|
3749
3740
|
if (organisationModel.addressLine2) {
|
|
3750
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3741
|
+
simpleAddress += organisationModel.addressLine2 + "<br>";
|
|
3751
3742
|
}
|
|
3752
3743
|
if (organisationModel.addressLine3) {
|
|
3753
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3744
|
+
simpleAddress += organisationModel.addressLine3 + "<br>";
|
|
3754
3745
|
}
|
|
3755
3746
|
if (organisationModel.townCity) {
|
|
3756
|
-
simpleAddress += organisationModel.townCity +
|
|
3747
|
+
simpleAddress += organisationModel.townCity + "<br>";
|
|
3757
3748
|
}
|
|
3758
3749
|
if (organisationModel.county) {
|
|
3759
|
-
simpleAddress += organisationModel.county +
|
|
3750
|
+
simpleAddress += organisationModel.county + "<br>";
|
|
3760
3751
|
}
|
|
3761
3752
|
if (organisationModel.country) {
|
|
3762
|
-
simpleAddress += organisationModel.country +
|
|
3753
|
+
simpleAddress += organisationModel.country + "<br>";
|
|
3763
3754
|
}
|
|
3764
3755
|
if (organisationModel.postCode) {
|
|
3765
|
-
simpleAddress += organisationModel.postCode +
|
|
3756
|
+
simpleAddress += organisationModel.postCode + "<br>";
|
|
3766
3757
|
}
|
|
3767
3758
|
return simpleAddress;
|
|
3768
3759
|
};
|
|
@@ -3941,9 +3932,9 @@
|
|
|
3941
3932
|
});
|
|
3942
3933
|
return valueMap;
|
|
3943
3934
|
};
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
}
|
|
3935
|
+
// public static getType(elem: any): string {
|
|
3936
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3937
|
+
// }
|
|
3947
3938
|
FieldsUtils.isObject = function (elem) {
|
|
3948
3939
|
return typeof elem === 'object' && elem !== null;
|
|
3949
3940
|
};
|
|
@@ -4501,7 +4492,6 @@
|
|
|
4501
4492
|
if (!condition) {
|
|
4502
4493
|
return null;
|
|
4503
4494
|
}
|
|
4504
|
-
;
|
|
4505
4495
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4506
4496
|
return peg.parse(condition.trim(), {});
|
|
4507
4497
|
};
|
|
@@ -4515,14 +4505,12 @@
|
|
|
4515
4505
|
if (!conditions || conditions.length === 0) {
|
|
4516
4506
|
return true;
|
|
4517
4507
|
}
|
|
4518
|
-
;
|
|
4519
4508
|
var validJoinComparators = ['AND', 'OR'];
|
|
4520
|
-
|
|
4509
|
+
return conditions.reduce(function (accumulator, condition, index) {
|
|
4521
4510
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4522
4511
|
if (isJoinComparator(condition)) {
|
|
4523
4512
|
return accumulator;
|
|
4524
4513
|
}
|
|
4525
|
-
;
|
|
4526
4514
|
var currentConditionResult = true;
|
|
4527
4515
|
if (Array.isArray(condition)) {
|
|
4528
4516
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4539,7 +4527,6 @@
|
|
|
4539
4527
|
}
|
|
4540
4528
|
return currentConditionResult;
|
|
4541
4529
|
}, true);
|
|
4542
|
-
return result;
|
|
4543
4530
|
};
|
|
4544
4531
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4545
4532
|
switch (comparator) {
|
|
@@ -4746,8 +4733,8 @@
|
|
|
4746
4733
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4747
4734
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4748
4735
|
this.processedList.push(condition.fieldReference);
|
|
4749
|
-
var regularExp = new RegExp(
|
|
4750
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4736
|
+
var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
|
|
4737
|
+
return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
|
|
4751
4738
|
}
|
|
4752
4739
|
else {
|
|
4753
4740
|
return originalCondition;
|
|
@@ -5316,14 +5303,14 @@
|
|
|
5316
5303
|
var formFields = form.getRawValue();
|
|
5317
5304
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5318
5305
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5319
|
-
var
|
|
5320
|
-
if (_this.hasShowConditionField(
|
|
5321
|
-
var condition = new ShowCondition(
|
|
5322
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5323
|
-
_this.resetField(form,
|
|
5306
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5307
|
+
if (_this.hasShowConditionField(caseField, formFields)) {
|
|
5308
|
+
var condition = new ShowCondition(caseField.show_condition);
|
|
5309
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
|
|
5310
|
+
_this.resetField(form, caseField);
|
|
5324
5311
|
}
|
|
5325
5312
|
}
|
|
5326
|
-
_this.retainHiddenValueByFieldType(
|
|
5313
|
+
_this.retainHiddenValueByFieldType(caseField, form);
|
|
5327
5314
|
});
|
|
5328
5315
|
};
|
|
5329
5316
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5354,13 +5341,13 @@
|
|
|
5354
5341
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5355
5342
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5356
5343
|
};
|
|
5357
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5358
|
-
return
|
|
5344
|
+
FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
|
|
5345
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
5359
5346
|
};
|
|
5360
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5347
|
+
FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
|
|
5361
5348
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5362
5349
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5363
|
-
return
|
|
5350
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
5364
5351
|
};
|
|
5365
5352
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5366
5353
|
var e_1, _a;
|
|
@@ -5456,8 +5443,8 @@
|
|
|
5456
5443
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5457
5444
|
var _this = this;
|
|
5458
5445
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5459
|
-
var
|
|
5460
|
-
_this.resetField(form,
|
|
5446
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5447
|
+
_this.resetField(form, caseField);
|
|
5461
5448
|
});
|
|
5462
5449
|
};
|
|
5463
5450
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5467,8 +5454,8 @@
|
|
|
5467
5454
|
return this.getType(elem) === 'Object';
|
|
5468
5455
|
};
|
|
5469
5456
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5470
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5471
|
-
return
|
|
5457
|
+
FieldsPurger.prototype.isReadonly = function (caseField) {
|
|
5458
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
5472
5459
|
};
|
|
5473
5460
|
/**
|
|
5474
5461
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -6363,7 +6350,6 @@
|
|
|
6363
6350
|
});
|
|
6364
6351
|
}
|
|
6365
6352
|
}
|
|
6366
|
-
;
|
|
6367
6353
|
});
|
|
6368
6354
|
}
|
|
6369
6355
|
};
|
|
@@ -6802,7 +6788,7 @@
|
|
|
6802
6788
|
return addressModel;
|
|
6803
6789
|
};
|
|
6804
6790
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6805
|
-
var addressLine
|
|
6791
|
+
var addressLine;
|
|
6806
6792
|
if (classification === AddressType.RD06) {
|
|
6807
6793
|
addressLine =
|
|
6808
6794
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6815,7 +6801,7 @@
|
|
|
6815
6801
|
return this.removeNonAddressValues(addressLine);
|
|
6816
6802
|
};
|
|
6817
6803
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6818
|
-
var addressLine
|
|
6804
|
+
var addressLine;
|
|
6819
6805
|
if (classification === AddressType.RD06) {
|
|
6820
6806
|
addressLine = address.BUILDING_NAME + " ";
|
|
6821
6807
|
}
|
|
@@ -6826,7 +6812,7 @@
|
|
|
6826
6812
|
return this.removeNonAddressValues(addressLine);
|
|
6827
6813
|
};
|
|
6828
6814
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6829
|
-
var addressLine
|
|
6815
|
+
var addressLine;
|
|
6830
6816
|
if (classification === AddressType.RD06) {
|
|
6831
6817
|
addressLine =
|
|
6832
6818
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6854,7 +6840,7 @@
|
|
|
6854
6840
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6855
6841
|
};
|
|
6856
6842
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6857
|
-
return value ?
|
|
6843
|
+
return value ? ", " + value : value;
|
|
6858
6844
|
};
|
|
6859
6845
|
return AddressParser;
|
|
6860
6846
|
}());
|
|
@@ -7104,7 +7090,7 @@
|
|
|
7104
7090
|
if (flagType) {
|
|
7105
7091
|
url += "?flag-type=" + flagType;
|
|
7106
7092
|
}
|
|
7107
|
-
if (welshRequired
|
|
7093
|
+
if (typeof welshRequired === 'boolean') {
|
|
7108
7094
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7109
7095
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7110
7096
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7710,18 +7696,6 @@
|
|
|
7710
7696
|
}], null, null);
|
|
7711
7697
|
})();
|
|
7712
7698
|
|
|
7713
|
-
var HasLoadingState = /** @class */ (function () {
|
|
7714
|
-
function HasLoadingState() {
|
|
7715
|
-
}
|
|
7716
|
-
Object.defineProperty(HasLoadingState.prototype, "isLoading", {
|
|
7717
|
-
get: function () {
|
|
7718
|
-
return;
|
|
7719
|
-
},
|
|
7720
|
-
enumerable: false,
|
|
7721
|
-
configurable: true
|
|
7722
|
-
});
|
|
7723
|
-
return HasLoadingState;
|
|
7724
|
-
}());
|
|
7725
7699
|
var LoadingService = /** @class */ (function () {
|
|
7726
7700
|
function LoadingService() {
|
|
7727
7701
|
this.registered = new Map();
|
|
@@ -7746,7 +7720,7 @@
|
|
|
7746
7720
|
};
|
|
7747
7721
|
LoadingService.prototype.generateToken = function () {
|
|
7748
7722
|
var timestamp = window.performance.now();
|
|
7749
|
-
return
|
|
7723
|
+
return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7750
7724
|
};
|
|
7751
7725
|
return LoadingService;
|
|
7752
7726
|
}());
|
|
@@ -7767,10 +7741,7 @@
|
|
|
7767
7741
|
}
|
|
7768
7742
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7769
7743
|
var _this = this;
|
|
7770
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7771
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7772
|
-
+ ("/case-types/" + caseTypeId)
|
|
7773
|
-
+ "/cases";
|
|
7744
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
|
|
7774
7745
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7775
7746
|
var loadingToken = this.loadingService.register();
|
|
7776
7747
|
return this.httpService
|
|
@@ -7779,15 +7750,14 @@
|
|
|
7779
7750
|
};
|
|
7780
7751
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7781
7752
|
var _this = this;
|
|
7782
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7783
|
-
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7753
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7784
7754
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7785
7755
|
var loadingToken = this.loadingService.register();
|
|
7786
7756
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7787
7757
|
};
|
|
7788
7758
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7789
7759
|
var _this = this;
|
|
7790
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7760
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7791
7761
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7792
7762
|
var body = {
|
|
7793
7763
|
sort: sort,
|
|
@@ -7832,9 +7802,8 @@
|
|
|
7832
7802
|
return SearchService;
|
|
7833
7803
|
}());
|
|
7834
7804
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7835
|
-
|
|
7805
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
7836
7806
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7837
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7838
7807
|
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
|
|
7839
7808
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7840
7809
|
(function () {
|
|
@@ -7964,17 +7933,12 @@
|
|
|
7964
7933
|
this.appConfig = appConfig;
|
|
7965
7934
|
}
|
|
7966
7935
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
7967
|
-
var url = this.appConfig.getApiUrl()
|
|
7968
|
-
+ "/caseworkers/:uid"
|
|
7969
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7970
|
-
+ ("/case-types?access=" + access);
|
|
7936
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
|
|
7971
7937
|
return this.http
|
|
7972
7938
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
7973
7939
|
};
|
|
7974
7940
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
7975
|
-
var url = this.appConfig.getApiUrl()
|
|
7976
|
-
+ "/caseworkers/:uid"
|
|
7977
|
-
+ ("/jurisdictions?access=" + access);
|
|
7941
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
|
|
7978
7942
|
return this.http
|
|
7979
7943
|
.get(url)
|
|
7980
7944
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8056,8 +8020,8 @@
|
|
|
8056
8020
|
compare: function (a, b) {
|
|
8057
8021
|
var fieldA = a.case_fields[fieldId];
|
|
8058
8022
|
var fieldB = b.case_fields[fieldId];
|
|
8059
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8060
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8023
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
8024
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
8061
8025
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8062
8026
|
}
|
|
8063
8027
|
};
|
|
@@ -8067,8 +8031,8 @@
|
|
|
8067
8031
|
compare: function (a, b) {
|
|
8068
8032
|
var fieldA = a.case_fields[fieldId];
|
|
8069
8033
|
var fieldB = b.case_fields[fieldId];
|
|
8070
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8071
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8034
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
8035
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
8072
8036
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8073
8037
|
}
|
|
8074
8038
|
};
|
|
@@ -8364,7 +8328,7 @@
|
|
|
8364
8328
|
});
|
|
8365
8329
|
};
|
|
8366
8330
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8367
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8331
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
|
|
8368
8332
|
};
|
|
8369
8333
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8370
8334
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8421,223 +8385,13 @@
|
|
|
8421
8385
|
}], null, null);
|
|
8422
8386
|
})();
|
|
8423
8387
|
|
|
8424
|
-
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
8425
|
-
var WorkAllocationService = /** @class */ (function () {
|
|
8426
|
-
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
8427
|
-
this.http = http;
|
|
8428
|
-
this.appConfig = appConfig;
|
|
8429
|
-
this.errorService = errorService;
|
|
8430
|
-
this.alertService = alertService;
|
|
8431
|
-
this.sessionStorageService = sessionStorageService;
|
|
8432
|
-
// Check to see if work allocation is enabled
|
|
8433
|
-
}
|
|
8434
|
-
/**
|
|
8435
|
-
* Call the API to get tasks matching the search criteria.
|
|
8436
|
-
* @param searchRequest The search parameters that specify which tasks to match.
|
|
8437
|
-
*/
|
|
8438
|
-
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
8439
|
-
var _this = this;
|
|
8440
|
-
// Do not need to check if WA enabled as parent method will do that
|
|
8441
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
8442
|
-
return this.http
|
|
8443
|
-
.post(url, { searchRequest: searchRequest }, null, false)
|
|
8444
|
-
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
8445
|
-
_this.errorService.setError(error);
|
|
8446
|
-
// explicitly eat away 401 error and 400 error
|
|
8447
|
-
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
8448
|
-
// do nothing
|
|
8449
|
-
console.log('error status 401 or 400', error);
|
|
8450
|
-
}
|
|
8451
|
-
else {
|
|
8452
|
-
return rxjs.throwError(error);
|
|
8453
|
-
}
|
|
8454
|
-
}));
|
|
8455
|
-
};
|
|
8456
|
-
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
8457
|
-
this.features = this.appConfig.getWAServiceConfig();
|
|
8458
|
-
var enabled = false;
|
|
8459
|
-
if (!jurisdiction || !caseType) {
|
|
8460
|
-
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
8461
|
-
jurisdiction = caseInfo.jurisdiction;
|
|
8462
|
-
caseType = caseInfo.caseType;
|
|
8463
|
-
}
|
|
8464
|
-
if (!this.features || !this.features.configurations) {
|
|
8465
|
-
return false;
|
|
8466
|
-
}
|
|
8467
|
-
this.features.configurations.forEach(function (serviceConfig) {
|
|
8468
|
-
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
8469
|
-
enabled = true;
|
|
8470
|
-
}
|
|
8471
|
-
});
|
|
8472
|
-
return enabled;
|
|
8473
|
-
};
|
|
8474
|
-
/**
|
|
8475
|
-
* Call the API to assign a task.
|
|
8476
|
-
* @param taskId specifies which task should be assigned.
|
|
8477
|
-
* @param userId specifies the user the task should be assigned to.
|
|
8478
|
-
*/
|
|
8479
|
-
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
8480
|
-
var _this = this;
|
|
8481
|
-
if (!this.isWAEnabled()) {
|
|
8482
|
-
return rxjs.of(null);
|
|
8483
|
-
}
|
|
8484
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
8485
|
-
return this.http
|
|
8486
|
-
.post(url, { userId: userId })
|
|
8487
|
-
.pipe(operators.catchError(function (error) {
|
|
8488
|
-
_this.errorService.setError(error);
|
|
8489
|
-
return rxjs.throwError(error);
|
|
8490
|
-
}));
|
|
8491
|
-
};
|
|
8492
|
-
/**
|
|
8493
|
-
* Call the API to complete a task.
|
|
8494
|
-
* @param taskId specifies which task should be completed.
|
|
8495
|
-
*/
|
|
8496
|
-
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
8497
|
-
var _this = this;
|
|
8498
|
-
if (!this.isWAEnabled()) {
|
|
8499
|
-
return rxjs.of(null);
|
|
8500
|
-
}
|
|
8501
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8502
|
-
return this.http
|
|
8503
|
-
.post(url, {})
|
|
8504
|
-
.pipe(operators.catchError(function (error) {
|
|
8505
|
-
_this.errorService.setError(error);
|
|
8506
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8507
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8508
|
-
_this.handleTaskCompletionError(response);
|
|
8509
|
-
});
|
|
8510
|
-
return rxjs.throwError(error);
|
|
8511
|
-
}));
|
|
8512
|
-
};
|
|
8513
|
-
/**
|
|
8514
|
-
* Call the API to assign and complete a task.
|
|
8515
|
-
* @param taskId specifies which task should be completed.
|
|
8516
|
-
*/
|
|
8517
|
-
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
8518
|
-
var _this = this;
|
|
8519
|
-
if (!this.isWAEnabled()) {
|
|
8520
|
-
return rxjs.of(null);
|
|
8521
|
-
}
|
|
8522
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8523
|
-
return this.http
|
|
8524
|
-
.post(url, {
|
|
8525
|
-
completion_options: {
|
|
8526
|
-
assign_and_complete: true
|
|
8527
|
-
}
|
|
8528
|
-
})
|
|
8529
|
-
.pipe(operators.catchError(function (error) {
|
|
8530
|
-
_this.errorService.setError(error);
|
|
8531
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8532
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8533
|
-
_this.handleTaskCompletionError(response);
|
|
8534
|
-
});
|
|
8535
|
-
return rxjs.throwError(error);
|
|
8536
|
-
}));
|
|
8537
|
-
};
|
|
8538
|
-
/**
|
|
8539
|
-
* Handles the response from the observable to get the user details when task is completed.
|
|
8540
|
-
* @param response is the response given from the observable which contains the user detaild.
|
|
8541
|
-
*/
|
|
8542
|
-
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
8543
|
-
var userDetails = response;
|
|
8544
|
-
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
8545
|
-
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
8546
|
-
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
8547
|
-
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
8548
|
-
}
|
|
8549
|
-
};
|
|
8550
|
-
/**
|
|
8551
|
-
* Returns true if the user's role is equivalent to a caseworker.
|
|
8552
|
-
* @param roles is the list of roles found from the current user.
|
|
8553
|
-
*/
|
|
8554
|
-
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
8555
|
-
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
8556
|
-
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
8557
|
-
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
8558
|
-
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
8559
|
-
};
|
|
8560
|
-
/**
|
|
8561
|
-
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
8562
|
-
* 1. No tasks found => Success.
|
|
8563
|
-
* 2. One task found => Mark as done => Success.
|
|
8564
|
-
* 3. One task found => Mark as done throws error => Failure.
|
|
8565
|
-
* 4. More than one task found => Failure.
|
|
8566
|
-
* 5. Search call throws an error => Failure.
|
|
8567
|
-
* @param ccdId The ID of the case to find tasks for.
|
|
8568
|
-
* @param eventId The ID of the event to find tasks for.
|
|
8569
|
-
*/
|
|
8570
|
-
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
8571
|
-
var _this = this;
|
|
8572
|
-
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
8573
|
-
return rxjs.of(null);
|
|
8574
|
-
}
|
|
8575
|
-
var taskSearchParameter = {
|
|
8576
|
-
ccdId: ccdId,
|
|
8577
|
-
eventId: eventId,
|
|
8578
|
-
jurisdiction: jurisdiction,
|
|
8579
|
-
caseTypeId: caseTypeId
|
|
8580
|
-
};
|
|
8581
|
-
return this.searchTasks(taskSearchParameter)
|
|
8582
|
-
.pipe(operators.map(function (response) {
|
|
8583
|
-
var tasks = response.tasks;
|
|
8584
|
-
if (tasks && tasks.length > 0) {
|
|
8585
|
-
if (tasks.length === 1) {
|
|
8586
|
-
_this.completeTask(tasks[0].id).subscribe();
|
|
8587
|
-
}
|
|
8588
|
-
else {
|
|
8589
|
-
// This is a problem. Throw an appropriate error.
|
|
8590
|
-
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
8591
|
-
}
|
|
8592
|
-
}
|
|
8593
|
-
return true; // All good. Nothing to see here.
|
|
8594
|
-
}), operators.catchError(function (error) {
|
|
8595
|
-
// Simply rethrow it.
|
|
8596
|
-
return rxjs.throwError(error);
|
|
8597
|
-
}));
|
|
8598
|
-
};
|
|
8599
|
-
/**
|
|
8600
|
-
* Return tasks for case and event.
|
|
8601
|
-
*/
|
|
8602
|
-
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
8603
|
-
var defaultPayload = {
|
|
8604
|
-
task_required_for_event: false,
|
|
8605
|
-
tasks: []
|
|
8606
|
-
};
|
|
8607
|
-
if (!this.isWAEnabled()) {
|
|
8608
|
-
return rxjs.of(defaultPayload);
|
|
8609
|
-
}
|
|
8610
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
8611
|
-
};
|
|
8612
|
-
/**
|
|
8613
|
-
* Call the API to get a task
|
|
8614
|
-
*/
|
|
8615
|
-
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
8616
|
-
if (!this.isWAEnabled()) {
|
|
8617
|
-
return rxjs.of({ task: null });
|
|
8618
|
-
}
|
|
8619
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
8620
|
-
};
|
|
8621
|
-
return WorkAllocationService;
|
|
8622
|
-
}());
|
|
8623
|
-
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
8624
|
-
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
8625
|
-
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8626
|
-
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
8627
|
-
(function () {
|
|
8628
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
8629
|
-
type: i0.Injectable
|
|
8630
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
8631
|
-
})();
|
|
8632
|
-
|
|
8633
8388
|
var CasesService = /** @class */ (function () {
|
|
8634
|
-
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper,
|
|
8389
|
+
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
|
|
8635
8390
|
this.http = http;
|
|
8636
8391
|
this.appConfig = appConfig;
|
|
8637
8392
|
this.orderService = orderService;
|
|
8638
8393
|
this.errorService = errorService;
|
|
8639
8394
|
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8640
|
-
this.workAllocationService = workAllocationService;
|
|
8641
8395
|
this.loadingService = loadingService;
|
|
8642
8396
|
this.sessionStorageService = sessionStorageService;
|
|
8643
8397
|
this.get = this.getCaseView;
|
|
@@ -8656,11 +8410,7 @@
|
|
|
8656
8410
|
};
|
|
8657
8411
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8658
8412
|
var _this = this;
|
|
8659
|
-
var url = this.appConfig.getApiUrl()
|
|
8660
|
-
+ "/caseworkers/:uid"
|
|
8661
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8662
|
-
+ ("/case-types/" + caseTypeId)
|
|
8663
|
-
+ ("/cases/" + caseId);
|
|
8413
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
|
|
8664
8414
|
var loadingToken = this.loadingService.register();
|
|
8665
8415
|
return this.http
|
|
8666
8416
|
.get(url)
|
|
@@ -8712,7 +8462,7 @@
|
|
|
8712
8462
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8713
8463
|
var _this = this;
|
|
8714
8464
|
var caseId = caseDetails.case_id;
|
|
8715
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
8465
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8716
8466
|
var headers = new i1$2.HttpHeaders()
|
|
8717
8467
|
.set('experimental', 'true')
|
|
8718
8468
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8726,9 +8476,8 @@
|
|
|
8726
8476
|
};
|
|
8727
8477
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8728
8478
|
var _this = this;
|
|
8729
|
-
var pageIdString = pageId ?
|
|
8730
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8731
|
-
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8479
|
+
var pageIdString = pageId ? "?pageId=" + pageId : '';
|
|
8480
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
|
|
8732
8481
|
var headers = new i1$2.HttpHeaders()
|
|
8733
8482
|
.set('experimental', 'true')
|
|
8734
8483
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8746,8 +8495,7 @@
|
|
|
8746
8495
|
if (eventData.ignore_warning) {
|
|
8747
8496
|
ignoreWarning = 'true';
|
|
8748
8497
|
}
|
|
8749
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8750
|
-
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8498
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
|
|
8751
8499
|
var headers = new i1$2.HttpHeaders()
|
|
8752
8500
|
.set('experimental', 'true')
|
|
8753
8501
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8761,9 +8509,7 @@
|
|
|
8761
8509
|
};
|
|
8762
8510
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8763
8511
|
var _this = this;
|
|
8764
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8765
|
-
+ ("/cases/" + caseId)
|
|
8766
|
-
+ "/documents";
|
|
8512
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
|
|
8767
8513
|
var headers = new i1$2.HttpHeaders()
|
|
8768
8514
|
.set('experimental', 'true')
|
|
8769
8515
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -8872,12 +8618,12 @@
|
|
|
8872
8618
|
CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8873
8619
|
CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8874
8620
|
CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
|
|
8875
|
-
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(
|
|
8621
|
+
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8876
8622
|
CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8877
8623
|
(function () {
|
|
8878
8624
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
|
|
8879
8625
|
type: i0.Injectable
|
|
8880
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type:
|
|
8626
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8881
8627
|
})();
|
|
8882
8628
|
|
|
8883
8629
|
var EventTriggerService = /** @class */ (function () {
|
|
@@ -9499,7 +9245,7 @@
|
|
|
9499
9245
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9500
9246
|
var formFields = editForm.getRawValue();
|
|
9501
9247
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9502
|
-
if (path && path.indexOf(
|
|
9248
|
+
if (path && path.indexOf("_" + caseField.id + "_") === -1) {
|
|
9503
9249
|
path = "" + path + caseField.id;
|
|
9504
9250
|
}
|
|
9505
9251
|
return !condition.match(formFields.data, path);
|
|
@@ -9531,6 +9277,215 @@
|
|
|
9531
9277
|
}], function () { return [{ type: CaseFieldService }]; }, null);
|
|
9532
9278
|
})();
|
|
9533
9279
|
|
|
9280
|
+
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
9281
|
+
var WorkAllocationService = /** @class */ (function () {
|
|
9282
|
+
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
9283
|
+
this.http = http;
|
|
9284
|
+
this.appConfig = appConfig;
|
|
9285
|
+
this.errorService = errorService;
|
|
9286
|
+
this.alertService = alertService;
|
|
9287
|
+
this.sessionStorageService = sessionStorageService;
|
|
9288
|
+
// Check to see if work allocation is enabled
|
|
9289
|
+
}
|
|
9290
|
+
/**
|
|
9291
|
+
* Call the API to get tasks matching the search criteria.
|
|
9292
|
+
* @param searchRequest The search parameters that specify which tasks to match.
|
|
9293
|
+
*/
|
|
9294
|
+
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
9295
|
+
var _this = this;
|
|
9296
|
+
// Do not need to check if WA enabled as parent method will do that
|
|
9297
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
9298
|
+
return this.http
|
|
9299
|
+
.post(url, { searchRequest: searchRequest }, null, false)
|
|
9300
|
+
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
9301
|
+
_this.errorService.setError(error);
|
|
9302
|
+
// explicitly eat away 401 error and 400 error
|
|
9303
|
+
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
9304
|
+
// do nothing
|
|
9305
|
+
console.log('error status 401 or 400', error);
|
|
9306
|
+
}
|
|
9307
|
+
else {
|
|
9308
|
+
return rxjs.throwError(error);
|
|
9309
|
+
}
|
|
9310
|
+
}));
|
|
9311
|
+
};
|
|
9312
|
+
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
9313
|
+
this.features = this.appConfig.getWAServiceConfig();
|
|
9314
|
+
var enabled = false;
|
|
9315
|
+
if (!jurisdiction || !caseType) {
|
|
9316
|
+
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
9317
|
+
jurisdiction = caseInfo.jurisdiction;
|
|
9318
|
+
caseType = caseInfo.caseType;
|
|
9319
|
+
}
|
|
9320
|
+
if (!this.features || !this.features.configurations) {
|
|
9321
|
+
return false;
|
|
9322
|
+
}
|
|
9323
|
+
this.features.configurations.forEach(function (serviceConfig) {
|
|
9324
|
+
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
9325
|
+
enabled = true;
|
|
9326
|
+
}
|
|
9327
|
+
});
|
|
9328
|
+
return enabled;
|
|
9329
|
+
};
|
|
9330
|
+
/**
|
|
9331
|
+
* Call the API to assign a task.
|
|
9332
|
+
* @param taskId specifies which task should be assigned.
|
|
9333
|
+
* @param userId specifies the user the task should be assigned to.
|
|
9334
|
+
*/
|
|
9335
|
+
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
9336
|
+
var _this = this;
|
|
9337
|
+
if (!this.isWAEnabled()) {
|
|
9338
|
+
return rxjs.of(null);
|
|
9339
|
+
}
|
|
9340
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
9341
|
+
return this.http
|
|
9342
|
+
.post(url, { userId: userId })
|
|
9343
|
+
.pipe(operators.catchError(function (error) {
|
|
9344
|
+
_this.errorService.setError(error);
|
|
9345
|
+
return rxjs.throwError(error);
|
|
9346
|
+
}));
|
|
9347
|
+
};
|
|
9348
|
+
/**
|
|
9349
|
+
* Call the API to complete a task.
|
|
9350
|
+
* @param taskId specifies which task should be completed.
|
|
9351
|
+
*/
|
|
9352
|
+
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
9353
|
+
var _this = this;
|
|
9354
|
+
if (!this.isWAEnabled()) {
|
|
9355
|
+
return rxjs.of(null);
|
|
9356
|
+
}
|
|
9357
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9358
|
+
return this.http
|
|
9359
|
+
.post(url, {})
|
|
9360
|
+
.pipe(operators.catchError(function (error) {
|
|
9361
|
+
_this.errorService.setError(error);
|
|
9362
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9363
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9364
|
+
_this.handleTaskCompletionError(response);
|
|
9365
|
+
});
|
|
9366
|
+
return rxjs.throwError(error);
|
|
9367
|
+
}));
|
|
9368
|
+
};
|
|
9369
|
+
/**
|
|
9370
|
+
* Call the API to assign and complete a task.
|
|
9371
|
+
* @param taskId specifies which task should be completed.
|
|
9372
|
+
*/
|
|
9373
|
+
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
9374
|
+
var _this = this;
|
|
9375
|
+
if (!this.isWAEnabled()) {
|
|
9376
|
+
return rxjs.of(null);
|
|
9377
|
+
}
|
|
9378
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9379
|
+
return this.http
|
|
9380
|
+
.post(url, {
|
|
9381
|
+
completion_options: {
|
|
9382
|
+
assign_and_complete: true
|
|
9383
|
+
}
|
|
9384
|
+
})
|
|
9385
|
+
.pipe(operators.catchError(function (error) {
|
|
9386
|
+
_this.errorService.setError(error);
|
|
9387
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9388
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9389
|
+
_this.handleTaskCompletionError(response);
|
|
9390
|
+
});
|
|
9391
|
+
return rxjs.throwError(error);
|
|
9392
|
+
}));
|
|
9393
|
+
};
|
|
9394
|
+
/**
|
|
9395
|
+
* Handles the response from the observable to get the user details when task is completed.
|
|
9396
|
+
* @param response is the response given from the observable which contains the user detaild.
|
|
9397
|
+
*/
|
|
9398
|
+
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
9399
|
+
var userDetails = response;
|
|
9400
|
+
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
9401
|
+
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
9402
|
+
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
9403
|
+
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
9404
|
+
}
|
|
9405
|
+
};
|
|
9406
|
+
/**
|
|
9407
|
+
* Returns true if the user's role is equivalent to a caseworker.
|
|
9408
|
+
* @param roles is the list of roles found from the current user.
|
|
9409
|
+
*/
|
|
9410
|
+
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
9411
|
+
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
9412
|
+
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
9413
|
+
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
9414
|
+
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
9415
|
+
};
|
|
9416
|
+
/**
|
|
9417
|
+
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
9418
|
+
* 1. No tasks found => Success.
|
|
9419
|
+
* 2. One task found => Mark as done => Success.
|
|
9420
|
+
* 3. One task found => Mark as done throws error => Failure.
|
|
9421
|
+
* 4. More than one task found => Failure.
|
|
9422
|
+
* 5. Search call throws an error => Failure.
|
|
9423
|
+
* @param ccdId The ID of the case to find tasks for.
|
|
9424
|
+
* @param eventId The ID of the event to find tasks for.
|
|
9425
|
+
*/
|
|
9426
|
+
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
9427
|
+
var _this = this;
|
|
9428
|
+
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
9429
|
+
return rxjs.of(null);
|
|
9430
|
+
}
|
|
9431
|
+
var taskSearchParameter = {
|
|
9432
|
+
ccdId: ccdId,
|
|
9433
|
+
eventId: eventId,
|
|
9434
|
+
jurisdiction: jurisdiction,
|
|
9435
|
+
caseTypeId: caseTypeId
|
|
9436
|
+
};
|
|
9437
|
+
return this.searchTasks(taskSearchParameter)
|
|
9438
|
+
.pipe(operators.map(function (response) {
|
|
9439
|
+
var tasks = response.tasks;
|
|
9440
|
+
if (tasks && tasks.length > 0) {
|
|
9441
|
+
if (tasks.length === 1) {
|
|
9442
|
+
_this.completeTask(tasks[0].id).subscribe();
|
|
9443
|
+
}
|
|
9444
|
+
else {
|
|
9445
|
+
// This is a problem. Throw an appropriate error.
|
|
9446
|
+
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
9447
|
+
}
|
|
9448
|
+
}
|
|
9449
|
+
return true; // All good. Nothing to see here.
|
|
9450
|
+
}), operators.catchError(function (error) {
|
|
9451
|
+
// Simply rethrow it.
|
|
9452
|
+
return rxjs.throwError(error);
|
|
9453
|
+
}));
|
|
9454
|
+
};
|
|
9455
|
+
/**
|
|
9456
|
+
* Return tasks for case and event.
|
|
9457
|
+
*/
|
|
9458
|
+
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
9459
|
+
var defaultPayload = {
|
|
9460
|
+
task_required_for_event: false,
|
|
9461
|
+
tasks: []
|
|
9462
|
+
};
|
|
9463
|
+
if (!this.isWAEnabled()) {
|
|
9464
|
+
return rxjs.of(defaultPayload);
|
|
9465
|
+
}
|
|
9466
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
9467
|
+
};
|
|
9468
|
+
/**
|
|
9469
|
+
* Call the API to get a task
|
|
9470
|
+
*/
|
|
9471
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
9472
|
+
if (!this.isWAEnabled()) {
|
|
9473
|
+
return rxjs.of({ task: null });
|
|
9474
|
+
}
|
|
9475
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
9476
|
+
};
|
|
9477
|
+
return WorkAllocationService;
|
|
9478
|
+
}());
|
|
9479
|
+
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
9480
|
+
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
9481
|
+
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
9482
|
+
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
9483
|
+
(function () {
|
|
9484
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
9485
|
+
type: i0.Injectable
|
|
9486
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
9487
|
+
})();
|
|
9488
|
+
|
|
9534
9489
|
var CaseEditComponent = /** @class */ (function () {
|
|
9535
9490
|
function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
|
|
9536
9491
|
this.fb = fb;
|
|
@@ -10469,7 +10424,7 @@
|
|
|
10469
10424
|
var label = casefield.label || 'Field';
|
|
10470
10425
|
var id_1 = casefield.id;
|
|
10471
10426
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10472
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10427
|
+
if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
|
|
10473
10428
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10474
10429
|
}
|
|
10475
10430
|
else {
|
|
@@ -11007,7 +10962,7 @@
|
|
|
11007
10962
|
|
|
11008
10963
|
var AddressOption = /** @class */ (function () {
|
|
11009
10964
|
function AddressOption(addressModel, description) {
|
|
11010
|
-
if (description
|
|
10965
|
+
if (description === null) {
|
|
11011
10966
|
this.value = addressModel;
|
|
11012
10967
|
this.description = this.getDescription();
|
|
11013
10968
|
}
|
|
@@ -11016,13 +10971,10 @@
|
|
|
11016
10971
|
}
|
|
11017
10972
|
}
|
|
11018
10973
|
AddressOption.prototype.getDescription = function () {
|
|
11019
|
-
return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
|
|
11020
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
11021
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
11022
|
-
+ ', ' + this.value.PostTown);
|
|
10974
|
+
return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
|
|
11023
10975
|
};
|
|
11024
10976
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
11025
|
-
return value ?
|
|
10977
|
+
return value ? ", " + value : value;
|
|
11026
10978
|
};
|
|
11027
10979
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
11028
10980
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11166,7 +11118,7 @@
|
|
|
11166
11118
|
this.missingPostcode = false;
|
|
11167
11119
|
var postcode_1 = this.postcode.value;
|
|
11168
11120
|
this.caseField.value = null;
|
|
11169
|
-
this.addressOptions =
|
|
11121
|
+
this.addressOptions = [];
|
|
11170
11122
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11171
11123
|
result.forEach(function (address) {
|
|
11172
11124
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11209,7 +11161,7 @@
|
|
|
11209
11161
|
var hasAddress = false;
|
|
11210
11162
|
if (address) {
|
|
11211
11163
|
Object.keys(address).forEach(function (key) {
|
|
11212
|
-
if (address[key]
|
|
11164
|
+
if (address[key] !== null) {
|
|
11213
11165
|
hasAddress = true;
|
|
11214
11166
|
}
|
|
11215
11167
|
});
|
|
@@ -11232,7 +11184,7 @@
|
|
|
11232
11184
|
};
|
|
11233
11185
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11234
11186
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11235
|
-
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') +
|
|
11187
|
+
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
11236
11188
|
};
|
|
11237
11189
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11238
11190
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -12977,16 +12929,16 @@
|
|
|
12977
12929
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
12978
12930
|
this.collItems[i].caseField.id = i.toString();
|
|
12979
12931
|
}
|
|
12980
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
12981
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
12932
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12933
|
+
var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
|
|
12982
12934
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
12983
12935
|
this.collItems[i].prefix = idPrefix1;
|
|
12984
12936
|
}
|
|
12985
12937
|
var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
|
|
12986
12938
|
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
12987
12939
|
var idPrefix2 = idPrefixAvailable ?
|
|
12988
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
12989
|
-
var idPrefix2current = idPrefix2.replace(
|
|
12940
|
+
this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12941
|
+
var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
|
|
12990
12942
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
12991
12943
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
12992
12944
|
}
|
|
@@ -15397,7 +15349,7 @@
|
|
|
15397
15349
|
casesResponse.push(_this.mapResponse(result));
|
|
15398
15350
|
});
|
|
15399
15351
|
});
|
|
15400
|
-
|
|
15352
|
+
_this.linkedCases = casesResponse.map(function (item) {
|
|
15401
15353
|
return {
|
|
15402
15354
|
caseReference: item.caseReference,
|
|
15403
15355
|
caseName: item.caseName,
|
|
@@ -15411,7 +15363,6 @@
|
|
|
15411
15363
|
}),
|
|
15412
15364
|
};
|
|
15413
15365
|
});
|
|
15414
|
-
_this.linkedCases = caseLinks;
|
|
15415
15366
|
_this.serverLinkedApiError = null;
|
|
15416
15367
|
}, function (err) {
|
|
15417
15368
|
_this.serverLinkedApiError = {
|
|
@@ -17491,7 +17442,7 @@
|
|
|
17491
17442
|
this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(function (field) { return field.id === 'caseLinks'; });
|
|
17492
17443
|
}
|
|
17493
17444
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17494
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17445
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17495
17446
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17496
17447
|
next: function (reasons) {
|
|
17497
17448
|
_this.reasonListLoaded = true;
|
|
@@ -17753,7 +17704,7 @@
|
|
|
17753
17704
|
};
|
|
17754
17705
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
17755
17706
|
var _this = this;
|
|
17756
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17707
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17757
17708
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17758
17709
|
next: function (reasons) {
|
|
17759
17710
|
// Sort in ascending order
|
|
@@ -17812,11 +17763,10 @@
|
|
|
17812
17763
|
var _this = this;
|
|
17813
17764
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
17814
17765
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
17815
|
-
|
|
17766
|
+
return tab.fields.some(function (_b) {
|
|
17816
17767
|
var field_type = _b.field_type;
|
|
17817
17768
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
17818
17769
|
});
|
|
17819
|
-
return linkField;
|
|
17820
17770
|
});
|
|
17821
17771
|
if (caseViewFiltered) {
|
|
17822
17772
|
var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(function (field) { return field.id === 'caseLinks'; })[0].value; });
|
|
@@ -19135,9 +19085,6 @@
|
|
|
19135
19085
|
PaymentField.prototype.getRefundsUrl = function () {
|
|
19136
19086
|
return this.appConfig.getRefundsUrl();
|
|
19137
19087
|
};
|
|
19138
|
-
PaymentField.prototype.getNotificationUrl = function () {
|
|
19139
|
-
return this.appConfig.getNotificationUrl();
|
|
19140
|
-
};
|
|
19141
19088
|
PaymentField.prototype.getUserRoles = function () {
|
|
19142
19089
|
var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
|
|
19143
19090
|
if (!userDetails || !userDetails.hasOwnProperty('roles')) {
|
|
@@ -19163,12 +19110,12 @@
|
|
|
19163
19110
|
return CasePaymentHistoryViewerFieldComponent;
|
|
19164
19111
|
}(PaymentField));
|
|
19165
19112
|
CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
19166
|
-
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars:
|
|
19113
|
+
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 15, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
|
|
19167
19114
|
if (rf & 1) {
|
|
19168
19115
|
i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
|
|
19169
19116
|
}
|
|
19170
19117
|
if (rf & 2) {
|
|
19171
|
-
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())("
|
|
19118
|
+
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");
|
|
19172
19119
|
}
|
|
19173
19120
|
}, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
|
|
19174
19121
|
(function () {
|
|
@@ -19606,7 +19553,7 @@
|
|
|
19606
19553
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
19607
19554
|
if (this.browserService.isIEOrEdge()) {
|
|
19608
19555
|
event.target.style.height = 'auto';
|
|
19609
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19556
|
+
event.target.style.height = event.target.scrollHeight + "px";
|
|
19610
19557
|
event.target.scrollTop = event.target.scrollHeight;
|
|
19611
19558
|
}
|
|
19612
19559
|
};
|
|
@@ -19801,7 +19748,7 @@
|
|
|
19801
19748
|
}
|
|
19802
19749
|
if (rf & 2) {
|
|
19803
19750
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19804
|
-
i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("
|
|
19751
|
+
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");
|
|
19805
19752
|
}
|
|
19806
19753
|
}
|
|
19807
19754
|
var WaysToPayFieldComponent = /** @class */ (function (_super) {
|
|
@@ -19815,9 +19762,9 @@
|
|
|
19815
19762
|
return WaysToPayFieldComponent;
|
|
19816
19763
|
}(PaymentField));
|
|
19817
19764
|
WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
19818
|
-
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", "
|
|
19765
|
+
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) {
|
|
19819
19766
|
if (rf & 1) {
|
|
19820
|
-
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1,
|
|
19767
|
+
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 14, "ccpay-payment-lib", 0);
|
|
19821
19768
|
}
|
|
19822
19769
|
if (rf & 2) {
|
|
19823
19770
|
i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
|
|
@@ -22181,7 +22128,7 @@
|
|
|
22181
22128
|
// is expected not to have a party name)
|
|
22182
22129
|
if (this.flagsData) {
|
|
22183
22130
|
this.filteredFlagsData =
|
|
22184
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22131
|
+
this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22185
22132
|
}
|
|
22186
22133
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22187
22134
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23478,13 +23425,13 @@
|
|
|
23478
23425
|
field.value = { CaseReference: value };
|
|
23479
23426
|
return field;
|
|
23480
23427
|
};
|
|
23481
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23428
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
|
|
23482
23429
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23483
23430
|
id: id,
|
|
23484
23431
|
label: label,
|
|
23485
23432
|
display_context: 'READONLY',
|
|
23486
23433
|
value: value,
|
|
23487
|
-
field_type:
|
|
23434
|
+
field_type: fieldType
|
|
23488
23435
|
});
|
|
23489
23436
|
};
|
|
23490
23437
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
@@ -25320,7 +25267,7 @@
|
|
|
25320
25267
|
function CcdPageFieldsPipe() {
|
|
25321
25268
|
}
|
|
25322
25269
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25323
|
-
var
|
|
25270
|
+
var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25324
25271
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25325
25272
|
return control['caseField'];
|
|
25326
25273
|
}).filter(function (field) {
|
|
@@ -25340,7 +25287,7 @@
|
|
|
25340
25287
|
field_type: {
|
|
25341
25288
|
id: page.id,
|
|
25342
25289
|
type: 'Complex',
|
|
25343
|
-
complex_fields:
|
|
25290
|
+
complex_fields: complexFields
|
|
25344
25291
|
}
|
|
25345
25292
|
});
|
|
25346
25293
|
};
|
|
@@ -25519,11 +25466,11 @@
|
|
|
25519
25466
|
}
|
|
25520
25467
|
return childrenCaseFields;
|
|
25521
25468
|
};
|
|
25522
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
25523
|
-
return
|
|
25469
|
+
CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
|
|
25470
|
+
return caseField.field_type.type === 'Complex';
|
|
25524
25471
|
};
|
|
25525
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
25526
|
-
return
|
|
25472
|
+
CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
|
|
25473
|
+
return caseField.field_type.type === 'Collection';
|
|
25527
25474
|
};
|
|
25528
25475
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
25529
25476
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -26072,7 +26019,7 @@
|
|
|
26072
26019
|
i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
|
|
26073
26020
|
i0__namespace.ɵɵsetComponentScope(
|
|
26074
26021
|
// ComponentLauncher web components
|
|
26075
|
-
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace
|
|
26022
|
+
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.MediaViewerComponent], []);
|
|
26076
26023
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
26077
26024
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesFromReasonValuePipe]);
|
|
26078
26025
|
i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
@@ -26724,7 +26671,7 @@
|
|
|
26724
26671
|
if (caseField.field_type.type === 'Complex') {
|
|
26725
26672
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
26726
26673
|
// handle both null and undefined values
|
|
26727
|
-
if (caseField.value
|
|
26674
|
+
if (caseField.value !== null) {
|
|
26728
26675
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
26729
26676
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
26730
26677
|
// parent)
|
|
@@ -28753,7 +28700,7 @@
|
|
|
28753
28700
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
28754
28701
|
workbasketInputs.forEach(function (item) {
|
|
28755
28702
|
if (item.field.elementPath) {
|
|
28756
|
-
item.field.id = item.field.id +
|
|
28703
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
28757
28704
|
}
|
|
28758
28705
|
item.field.label = item.label;
|
|
28759
28706
|
if (formValue) {
|
|
@@ -28805,7 +28752,7 @@
|
|
|
28805
28752
|
var value = formGroupLS[key];
|
|
28806
28753
|
// Clear the filter form group control values if it has a value in local storage
|
|
28807
28754
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28808
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
28755
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
28809
28756
|
this.formGroup.get(key).setValue(null);
|
|
28810
28757
|
}
|
|
28811
28758
|
}
|
|
@@ -31186,7 +31133,7 @@
|
|
|
31186
31133
|
* or the empty string
|
|
31187
31134
|
*/
|
|
31188
31135
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
31189
|
-
if (remoteUrl
|
|
31136
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
31190
31137
|
var printServiceUrlPathname = void 0;
|
|
31191
31138
|
/**
|
|
31192
31139
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -31202,7 +31149,7 @@
|
|
|
31202
31149
|
printServiceUrlPathname = urlParser.pathname;
|
|
31203
31150
|
if (printServiceUrlPathname[0] !== '/') {
|
|
31204
31151
|
// Fix for IE11; it returns the pathname without leading slash
|
|
31205
|
-
printServiceUrlPathname =
|
|
31152
|
+
printServiceUrlPathname = "/" + printServiceUrlPathname;
|
|
31206
31153
|
}
|
|
31207
31154
|
}
|
|
31208
31155
|
else {
|
|
@@ -31405,10 +31352,10 @@
|
|
|
31405
31352
|
};
|
|
31406
31353
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
31407
31354
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
31408
|
-
var
|
|
31409
|
-
var
|
|
31410
|
-
this.accessGranted =
|
|
31411
|
-
this.userAccessType =
|
|
31355
|
+
var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
31356
|
+
var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
31357
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
31358
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
31412
31359
|
}
|
|
31413
31360
|
};
|
|
31414
31361
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -32704,11 +32651,11 @@
|
|
|
32704
32651
|
};
|
|
32705
32652
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
32706
32653
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
32707
|
-
.subscribe(function (
|
|
32654
|
+
.subscribe(function () {
|
|
32708
32655
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
32709
32656
|
// Angular 7.2!
|
|
32710
32657
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
32711
|
-
}, function (
|
|
32658
|
+
}, function () {
|
|
32712
32659
|
// Navigate to error page
|
|
32713
32660
|
});
|
|
32714
32661
|
}
|
|
@@ -32722,7 +32669,7 @@
|
|
|
32722
32669
|
}
|
|
32723
32670
|
};
|
|
32724
32671
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
32725
|
-
return input.value
|
|
32672
|
+
return input.value === null || input.value.trim().length === 0;
|
|
32726
32673
|
};
|
|
32727
32674
|
return CaseChallengedAccessRequestComponent;
|
|
32728
32675
|
}());
|
|
@@ -33346,11 +33293,11 @@
|
|
|
33346
33293
|
};
|
|
33347
33294
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
33348
33295
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33349
|
-
.subscribe(function (
|
|
33296
|
+
.subscribe(function () {
|
|
33350
33297
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33351
33298
|
// Angular 7.2
|
|
33352
33299
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33353
|
-
}, function (
|
|
33300
|
+
}, function () {
|
|
33354
33301
|
// Navigate to error page
|
|
33355
33302
|
});
|
|
33356
33303
|
}
|
|
@@ -33365,7 +33312,7 @@
|
|
|
33365
33312
|
}
|
|
33366
33313
|
};
|
|
33367
33314
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33368
|
-
return input.value
|
|
33315
|
+
return input.value === null || input.value.trim().length === 0;
|
|
33369
33316
|
};
|
|
33370
33317
|
return CaseSpecificAccessRequestComponent;
|
|
33371
33318
|
}());
|
|
@@ -34266,7 +34213,7 @@
|
|
|
34266
34213
|
}
|
|
34267
34214
|
searchInputs.forEach(function (item) {
|
|
34268
34215
|
if (item.field.elementPath) {
|
|
34269
|
-
item.field.id = item.field.id +
|
|
34216
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
34270
34217
|
}
|
|
34271
34218
|
item.field.label = item.label;
|
|
34272
34219
|
if (formValueObject) {
|
|
@@ -35533,24 +35480,24 @@
|
|
|
35533
35480
|
this.caseField.id = id;
|
|
35534
35481
|
return this;
|
|
35535
35482
|
};
|
|
35536
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
35537
|
-
this.caseField.field_type =
|
|
35483
|
+
CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
|
|
35484
|
+
this.caseField.field_type = fieldType;
|
|
35538
35485
|
return this;
|
|
35539
35486
|
};
|
|
35540
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
35541
|
-
this.caseField.display_context =
|
|
35487
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
|
|
35488
|
+
this.caseField.display_context = displayContext;
|
|
35542
35489
|
return this;
|
|
35543
35490
|
};
|
|
35544
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
35545
|
-
this.caseField.display_context_parameter =
|
|
35491
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
|
|
35492
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
35546
35493
|
return this;
|
|
35547
35494
|
};
|
|
35548
35495
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
35549
35496
|
this.caseField.hidden = hidden;
|
|
35550
35497
|
return this;
|
|
35551
35498
|
};
|
|
35552
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
35553
|
-
this.caseField.hint_text =
|
|
35499
|
+
CaseFieldBuilder.prototype.withHintText = function (hintText) {
|
|
35500
|
+
this.caseField.hint_text = hintText;
|
|
35554
35501
|
return this;
|
|
35555
35502
|
};
|
|
35556
35503
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -35561,12 +35508,12 @@
|
|
|
35561
35508
|
this.caseField.order = order;
|
|
35562
35509
|
return this;
|
|
35563
35510
|
};
|
|
35564
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
35565
|
-
this.caseField.security_label =
|
|
35511
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
|
|
35512
|
+
this.caseField.security_label = securityLabel;
|
|
35566
35513
|
return this;
|
|
35567
35514
|
};
|
|
35568
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
35569
|
-
this.caseField.show_condition =
|
|
35515
|
+
CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
|
|
35516
|
+
this.caseField.show_condition = showCondition;
|
|
35570
35517
|
return this;
|
|
35571
35518
|
};
|
|
35572
35519
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -35594,21 +35541,21 @@
|
|
|
35594
35541
|
complex_fields: []
|
|
35595
35542
|
};
|
|
35596
35543
|
};
|
|
35597
|
-
var createCaseEventTrigger = function (id, name,
|
|
35598
|
-
if (
|
|
35599
|
-
if (
|
|
35544
|
+
var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
|
|
35545
|
+
if (wizardPages === void 0) { wizardPages = []; }
|
|
35546
|
+
if (canSaveDraft === void 0) { canSaveDraft = false; }
|
|
35600
35547
|
var eventTrigger = new CaseEventTrigger();
|
|
35601
35548
|
eventTrigger.id = id;
|
|
35602
35549
|
eventTrigger.name = name;
|
|
35603
|
-
eventTrigger.case_id =
|
|
35604
|
-
eventTrigger.show_summary =
|
|
35605
|
-
eventTrigger.wizard_pages =
|
|
35550
|
+
eventTrigger.case_id = caseId;
|
|
35551
|
+
eventTrigger.show_summary = showSummary;
|
|
35552
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
35606
35553
|
eventTrigger.event_token = 'test-token';
|
|
35607
|
-
eventTrigger.case_fields =
|
|
35608
|
-
eventTrigger.can_save_draft =
|
|
35554
|
+
eventTrigger.case_fields = caseFields;
|
|
35555
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
35609
35556
|
return eventTrigger;
|
|
35610
35557
|
};
|
|
35611
|
-
var aCaseField = function (id, label, type,
|
|
35558
|
+
var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
|
|
35612
35559
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
35613
35560
|
return ({
|
|
35614
35561
|
id: id || 'personFirstName',
|
|
@@ -35617,10 +35564,10 @@
|
|
|
35617
35564
|
type: type || 'Text',
|
|
35618
35565
|
complex_fields: typeComplexFields || []
|
|
35619
35566
|
},
|
|
35620
|
-
display_context:
|
|
35567
|
+
display_context: displayContext || 'OPTIONAL',
|
|
35621
35568
|
label: label || 'First name',
|
|
35622
|
-
show_summary_content_option:
|
|
35623
|
-
retain_hidden_value:
|
|
35569
|
+
show_summary_content_option: showSummaryContentOption,
|
|
35570
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
35624
35571
|
hidden: hidden || false
|
|
35625
35572
|
});
|
|
35626
35573
|
};
|
|
@@ -35662,48 +35609,48 @@
|
|
|
35662
35609
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
35663
35610
|
return complexFieldOverride;
|
|
35664
35611
|
};
|
|
35665
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
35612
|
+
var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
|
|
35666
35613
|
if (order === void 0) { order = undefined; }
|
|
35667
|
-
if (
|
|
35668
|
-
if (
|
|
35614
|
+
if (showCondition === void 0) { showCondition = undefined; }
|
|
35615
|
+
if (acls === void 0) { acls = undefined; }
|
|
35669
35616
|
return CaseFieldBuilder.create()
|
|
35670
35617
|
.withId(id || 'personFirstName')
|
|
35671
35618
|
.withFieldType(fieldType || textFieldType())
|
|
35672
|
-
.withDisplayContext(
|
|
35619
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35673
35620
|
.withLabel(label || 'First name')
|
|
35674
35621
|
.withHintText(hint || 'First name hint text')
|
|
35675
35622
|
.withShowSummaryContentOption(0)
|
|
35676
35623
|
.withOrder(order)
|
|
35677
|
-
.withShowCondition(
|
|
35678
|
-
.withACLs(
|
|
35624
|
+
.withShowCondition(showCondition || undefined)
|
|
35625
|
+
.withACLs(acls)
|
|
35679
35626
|
.withHidden(hidden || false)
|
|
35680
35627
|
.build();
|
|
35681
35628
|
};
|
|
35682
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
35629
|
+
var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
|
|
35683
35630
|
if (order === void 0) { order = undefined; }
|
|
35684
35631
|
return CaseFieldBuilder.create()
|
|
35685
35632
|
.withId(id || 'personFirstName')
|
|
35686
35633
|
.withFieldType(fieldType || textFieldType())
|
|
35687
|
-
.withDisplayContext(
|
|
35634
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35688
35635
|
.withHintText(hint || 'First name hint text')
|
|
35689
35636
|
.withLabel(label || 'First name')
|
|
35690
35637
|
.withOrder(order)
|
|
35691
35638
|
.withShowSummaryContentOption(0);
|
|
35692
35639
|
};
|
|
35693
|
-
var createFieldType = function (typeId, type,
|
|
35694
|
-
if (
|
|
35695
|
-
if (
|
|
35640
|
+
var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
|
|
35641
|
+
if (complexFields === void 0) { complexFields = []; }
|
|
35642
|
+
if (collectionFieldType === void 0) { collectionFieldType = undefined; }
|
|
35696
35643
|
return {
|
|
35697
35644
|
id: typeId || 'Text',
|
|
35698
35645
|
type: type || 'Text',
|
|
35699
|
-
complex_fields:
|
|
35700
|
-
collection_field_type:
|
|
35646
|
+
complex_fields: complexFields || [],
|
|
35647
|
+
collection_field_type: collectionFieldType || undefined
|
|
35701
35648
|
};
|
|
35702
35649
|
};
|
|
35703
35650
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
35704
35651
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35705
35652
|
return {
|
|
35706
|
-
id:
|
|
35653
|
+
id: "FixedList-" + typeId,
|
|
35707
35654
|
type: 'FixedList',
|
|
35708
35655
|
fixed_list_items: fixedListItems || []
|
|
35709
35656
|
};
|
|
@@ -35711,18 +35658,18 @@
|
|
|
35711
35658
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
35712
35659
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35713
35660
|
return {
|
|
35714
|
-
id:
|
|
35661
|
+
id: "MultiSelectList-" + typeId,
|
|
35715
35662
|
type: 'MultiSelectList',
|
|
35716
35663
|
fixed_list_items: fixedListItems || []
|
|
35717
35664
|
};
|
|
35718
35665
|
};
|
|
35719
|
-
var createACL = function (role,
|
|
35666
|
+
var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
|
|
35720
35667
|
return ({
|
|
35721
35668
|
role: role || 'roleX',
|
|
35722
|
-
create:
|
|
35723
|
-
read:
|
|
35724
|
-
update:
|
|
35725
|
-
delete:
|
|
35669
|
+
create: aclCreate,
|
|
35670
|
+
read: aclRead,
|
|
35671
|
+
update: aclUpdate,
|
|
35672
|
+
delete: aclDelete
|
|
35726
35673
|
});
|
|
35727
35674
|
};
|
|
35728
35675
|
|
|
@@ -35941,7 +35888,6 @@
|
|
|
35941
35888
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
35942
35889
|
exports.GreyBarService = GreyBarService;
|
|
35943
35890
|
exports.HRef = HRef;
|
|
35944
|
-
exports.HasLoadingState = HasLoadingState;
|
|
35945
35891
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
35946
35892
|
exports.HeadersModule = HeadersModule;
|
|
35947
35893
|
exports.HttpError = HttpError;
|