@hmcts/ccd-case-ui-toolkit 7.0.4-mv-upgrade → 7.0.4-task-completion-error-message
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/esm2020/lib/shared/commons/constants.mjs +2 -1
- package/esm2020/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +67 -27
- package/esm2020/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +4 -1
- package/esm2020/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +4 -14
- package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +6 -25
- package/esm2020/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.mjs +22 -9
- package/esm2020/lib/shared/components/palette/datetime-picker/datetime-picker-utils.mjs +3 -3
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +14 -2
- package/esm2020/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.mjs +25 -12
- package/esm2020/lib/shared/domain/case-view/service-org-response.model.mjs +2 -0
- package/esm2020/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.mjs +4 -3
- package/esm2020/lib/shared/services/common-data-service/common-data-service.mjs +7 -1
- package/esm2020/lib/shared/services/fields/fields.purger.mjs +16 -6
- package/esm2020/lib/shared/services/form/form-value.service.mjs +10 -7
- package/esm2020/lib/shared/services/utils/retry/retry.service.mjs +1 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +165 -94
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +164 -94
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/commons/constants.d.ts +1 -0
- package/lib/shared/commons/constants.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +7 -3
- package/lib/shared/components/case-editor/case-edit/case-edit.component.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.map +1 -1
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts +5 -2
- package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +6 -3
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/domain/case-view/service-org-response.model.d.ts +14 -0
- package/lib/shared/domain/case-view/service-org-response.model.d.ts.map +1 -0
- package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts +2 -0
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/form/form-value.service.d.ts +1 -1
- package/lib/shared/services/form/form-value.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ class ArtificialDelayContext {
|
|
|
8
8
|
this.artificialDelayOn = true;
|
|
9
9
|
this.selectedDelay = this.selectActualDelayTime();
|
|
10
10
|
}
|
|
11
|
-
;
|
|
12
11
|
switchArtificialDelays(status) {
|
|
13
12
|
this.artificialDelayOn = status;
|
|
14
13
|
this.selectedDelay = this.selectActualDelayTime();
|
|
@@ -84,4 +83,4 @@ RetryUtil.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: RetryUtil, fac
|
|
|
84
83
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RetryUtil, [{
|
|
85
84
|
type: Injectable
|
|
86
85
|
}], null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JC5waXBlKHRpbWVvdXQodGltZU91dEFmdGVyU2Vjb25kcyAqIDEwMDApKTtcbiAgICAgICAgcmV0dXJuIG91dCQ7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBwaXBlUmV0cnlNZWNoYW5pc21PbjxUPihpbiQ6IE9ic2VydmFibGU8VD4sIGFydGlmaWNpYWxEZWxheUNvbnRleHQ6IEFydGlmaWNpYWxEZWxheUNvbnRleHQpOiBPYnNlcnZhYmxlPFQ+IHtcbiAgICAgICAgY29uc3QgcmV0cnlTdHJhdGVneSA9IChlcnJvcnMpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBlcnJvcnMucGlwZShcbiAgICAgICAgICAgICAgICBtZXJnZU1hcCgoZXJyb3I6IEVycm9yLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoYE1hcHBpbmcgZXJyb3IgJHtlcnJvcj8ubmFtZX0sICR7aX1gKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcj8ubmFtZSA9PT0gJ1RpbWVvdXRFcnJvcicgJiYgaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXJ0aWZpY2lhbERlbGF5Q29udGV4dC50dXJuT2ZmQXJ0aWZpY2lhbERlbGF5cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKCdXaWxsIHJldHJ5LCBhZnRlciBhIHRpbWVvdXQgZXJyb3IuJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdXaWxsIE5PVCByZXRyeS4nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aW1lcigwKTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBmaW5hbGl6ZSgoKSA9PiBjb25zb2xlLmxvZygnV2UgYXJlIGRvbmUhJykpKTtcbiAgICAgICAgfTtcbiAgICAgICAgY29uc3Qgb3V0JCA9IGluJC5waXBlKHJldHJ5V2hlbihyZXRyeVN0cmF0ZWd5KSk7XG4gICAgICAgIHJldHVybiBvdXQkO1xuICAgIH1cblxuICAgIHByaXZhdGUgcGlwZUFydGlmaWNpYWxEZWxheU9uPFQ+KGluJDogT2JzZXJ2YWJsZTxUPiwgYXJ0aWZpY2lhbERlbGF5Q29udGV4dDogQXJ0aWZpY2lhbERlbGF5Q29udGV4dCk6IE9ic2VydmFibGU8VD4ge1xuICAgICAgICBsZXQgb3V0JCA9IGluJC5waXBlKHRhcCgoKSA9PiB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhgQXJ0aWZpY2lhbGx5IGRlbGF5aW5nIGZvciAke2FydGlmaWNpYWxEZWxheUNvbnRleHQuZ2V0QWN0dWFsRGVsYXkoKX0gc2Vjb25kcy4uYCk7XG4gICAgICAgIH0pKTtcbiAgICAgICAgb3V0JCA9IG91dCQucGlwZShkZWxheVdoZW4oKCkgPT4gdGltZXIoYXJ0aWZpY2lhbERlbGF5Q29udGV4dC5nZXRBY3R1YWxEZWxheSgpICogMTAwMCkpKTtcbiAgICAgICAgb3V0JCA9IG91dCQucGlwZSh0YXAoKCkgPT4ge1xuICAgICAgICAgICAgY29uc29sZS5sb2coYEFydGlmaWNpYWxseSBkZWxheWVkIGZvciAke2FydGlmaWNpYWxEZWxheUNvbnRleHQuZ2V0QWN0dWFsRGVsYXkoKX0gc2Vjb25kcy4uYCk7XG4gICAgICAgIH0pKTtcbiAgICAgICAgcmV0dXJuIG91dCQ7XG4gICAgfVxufVxuIl19
|
|
@@ -8,7 +8,7 @@ import * as i1$2 from '@angular/router';
|
|
|
8
8
|
import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
9
9
|
import * as i3 from '@angular/forms';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
|
-
import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent, forkJoin } from 'rxjs';
|
|
11
|
+
import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent, forkJoin, Subscription } from 'rxjs';
|
|
12
12
|
import * as i1$3 from '@angular/common/http';
|
|
13
13
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
14
14
|
import { catchError, map, debounceTime, publish, refCount, delay, distinctUntilChanged, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, switchMap, takeUntil, filter } from 'rxjs/operators';
|
|
@@ -4320,6 +4320,7 @@ class Constants {
|
|
|
4320
4320
|
}
|
|
4321
4321
|
Constants.MANDATORY = 'MANDATORY';
|
|
4322
4322
|
Constants.REGEX_WHITESPACES = '^[^ ]+(?:\\s+[^ ]+)*$';
|
|
4323
|
+
Constants.TASK_COMPLETION_ERROR = 'The associated task for this event failed to complete automatically. Please complete the task manually in the Tasks tab on the case';
|
|
4323
4324
|
Constants.ɵfac = function Constants_Factory(t) { return new (t || Constants)(); };
|
|
4324
4325
|
Constants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Constants, factory: Constants.ɵfac });
|
|
4325
4326
|
(function () {
|
|
@@ -4960,11 +4961,21 @@ class FieldsPurger {
|
|
|
4960
4961
|
* @returns A new array with the mapped values
|
|
4961
4962
|
*/
|
|
4962
4963
|
mapArrayValuesToNull(array) {
|
|
4963
|
-
|
|
4964
|
-
return
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4964
|
+
if (array && array.length > 0) {
|
|
4965
|
+
return array.map(element => {
|
|
4966
|
+
if (element !== undefined && element !== null) {
|
|
4967
|
+
return typeof element === 'object'
|
|
4968
|
+
? Object.assign({}, ...Object.keys(element).map(k => ({ [k]: null })))
|
|
4969
|
+
: null;
|
|
4970
|
+
}
|
|
4971
|
+
else {
|
|
4972
|
+
return {};
|
|
4973
|
+
}
|
|
4974
|
+
});
|
|
4975
|
+
}
|
|
4976
|
+
else {
|
|
4977
|
+
return array;
|
|
4978
|
+
}
|
|
4968
4979
|
}
|
|
4969
4980
|
}
|
|
4970
4981
|
FieldsPurger.ɵfac = function FieldsPurger_Factory(t) { return new (t || FieldsPurger)(i0.ɵɵinject(FieldsUtils)); };
|
|
@@ -5440,7 +5451,7 @@ class FormValueService {
|
|
|
5440
5451
|
* @param clearEmpty Whether or not we should clear out empty, optional, complex objects.
|
|
5441
5452
|
* @param clearNonCase Whether or not we should clear out non-case fields at the top level.
|
|
5442
5453
|
*/
|
|
5443
|
-
removeUnnecessaryFields(data, caseFields, clearEmpty = false, clearNonCase = false, fromPreviousPage = false, currentPageCaseFields = []) {
|
|
5454
|
+
removeUnnecessaryFields(data, caseFields, clearEmpty = false, clearNonCase = false, fromPreviousPage = false, currentPageCaseFields = [], isCalledFromSubmit = false) {
|
|
5444
5455
|
if (data && caseFields && caseFields.length > 0) {
|
|
5445
5456
|
// check if there is any data at the top level of the form that's not in the caseFields
|
|
5446
5457
|
if (clearNonCase) {
|
|
@@ -5451,10 +5462,13 @@ class FormValueService {
|
|
|
5451
5462
|
// Retain anything that is readonly and not a label.
|
|
5452
5463
|
continue;
|
|
5453
5464
|
}
|
|
5454
|
-
if (field.hidden === true && field.display_context !== 'HIDDEN' && field.display_context !== 'HIDDEN_TEMP' && field.id !== 'caseLinks'
|
|
5465
|
+
if (field.hidden === true && field.display_context !== 'HIDDEN' && field.display_context !== 'HIDDEN_TEMP' && field.id !== 'caseLinks') {
|
|
5455
5466
|
// Delete anything that is hidden (that is NOT readonly), and that
|
|
5456
5467
|
// hasn't had its display_context overridden to make it hidden.
|
|
5457
|
-
|
|
5468
|
+
// in event submission check for field's retain_hidden_value defore deletion
|
|
5469
|
+
if ((isCalledFromSubmit && !field.retain_hidden_value) || !isCalledFromSubmit) {
|
|
5470
|
+
delete data[field.id];
|
|
5471
|
+
}
|
|
5458
5472
|
}
|
|
5459
5473
|
else if (field.field_type) {
|
|
5460
5474
|
switch (field.field_type.type) {
|
|
@@ -5468,7 +5482,7 @@ class FormValueService {
|
|
|
5468
5482
|
}
|
|
5469
5483
|
break;
|
|
5470
5484
|
case 'Complex':
|
|
5471
|
-
this.removeUnnecessaryFields(data[field.id], field.field_type.complex_fields, clearEmpty);
|
|
5485
|
+
this.removeUnnecessaryFields(data[field.id], field.field_type.complex_fields, clearEmpty, false, false, [], isCalledFromSubmit);
|
|
5472
5486
|
// Also remove any optional complex objects that are completely empty.
|
|
5473
5487
|
// EUI-4244: Ritesh's fix, passing true instead of clearEmpty.
|
|
5474
5488
|
if (FormValueService.clearOptionalEmpty(true, data[field.id], field)) {
|
|
@@ -5491,8 +5505,8 @@ class FormValueService {
|
|
|
5491
5505
|
if (field.field_type.collection_field_type.type === 'Complex') {
|
|
5492
5506
|
// Iterate through the elements and remove any unnecessary fields within.
|
|
5493
5507
|
for (const item of collection) {
|
|
5494
|
-
this.removeUnnecessaryFields(item, field.field_type.collection_field_type.complex_fields, clearEmpty);
|
|
5495
|
-
this.removeUnnecessaryFields(item.value, field.field_type.collection_field_type.complex_fields, false);
|
|
5508
|
+
this.removeUnnecessaryFields(item, field.field_type.collection_field_type.complex_fields, clearEmpty, false, false, [], isCalledFromSubmit);
|
|
5509
|
+
this.removeUnnecessaryFields(item.value, field.field_type.collection_field_type.complex_fields, false, false, false, [], isCalledFromSubmit);
|
|
5496
5510
|
}
|
|
5497
5511
|
}
|
|
5498
5512
|
}
|
|
@@ -6992,7 +7006,6 @@ class ArtificialDelayContext {
|
|
|
6992
7006
|
this.artificialDelayOn = true;
|
|
6993
7007
|
this.selectedDelay = this.selectActualDelayTime();
|
|
6994
7008
|
}
|
|
6995
|
-
;
|
|
6996
7009
|
switchArtificialDelays(status) {
|
|
6997
7010
|
this.artificialDelayOn = status;
|
|
6998
7011
|
this.selectedDelay = this.selectActualDelayTime();
|
|
@@ -8337,18 +8350,9 @@ class EventCompletionStateMachineService {
|
|
|
8337
8350
|
state.trigger(EventCompletionStates.Final);
|
|
8338
8351
|
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8339
8352
|
if (taskStr) {
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
context.workAllocationService.completeTask(task.id).subscribe(response => {
|
|
8344
|
-
// Emit event can be completed event
|
|
8345
|
-
context.component.eventCanBeCompleted.emit(true);
|
|
8346
|
-
}, error => {
|
|
8347
|
-
// Emit event cannot be completed event
|
|
8348
|
-
context.component.eventCanBeCompleted.emit(false);
|
|
8349
|
-
context.alertService.error(error.message);
|
|
8350
|
-
return throwError(error);
|
|
8351
|
-
});
|
|
8353
|
+
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
8354
|
+
// just set event can be completed
|
|
8355
|
+
context.component.eventCanBeCompleted.emit(true);
|
|
8352
8356
|
}
|
|
8353
8357
|
else {
|
|
8354
8358
|
// Emit event cannot be completed event
|
|
@@ -8367,18 +8371,8 @@ class EventCompletionStateMachineService {
|
|
|
8367
8371
|
// Get task details
|
|
8368
8372
|
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8369
8373
|
if (taskStr) {
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
// Assign and complete task
|
|
8373
|
-
context.workAllocationService.assignAndCompleteTask(task.id).subscribe(response => {
|
|
8374
|
-
// Emit event can be completed event
|
|
8375
|
-
context.component.eventCanBeCompleted.emit(true);
|
|
8376
|
-
}, error => {
|
|
8377
|
-
// Emit event cannot be completed event
|
|
8378
|
-
context.component.eventCanBeCompleted.emit(false);
|
|
8379
|
-
context.alertService.error(error.message);
|
|
8380
|
-
return throwError(error);
|
|
8381
|
-
});
|
|
8374
|
+
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
8375
|
+
context.component.eventCanBeCompleted.emit(true);
|
|
8382
8376
|
}
|
|
8383
8377
|
else {
|
|
8384
8378
|
// Emit event cannot be completed event
|
|
@@ -8734,7 +8728,7 @@ ValidPageListCaseFieldsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({
|
|
|
8734
8728
|
})();
|
|
8735
8729
|
|
|
8736
8730
|
class CaseEditComponent {
|
|
8737
|
-
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService) {
|
|
8731
|
+
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService) {
|
|
8738
8732
|
this.fb = fb;
|
|
8739
8733
|
this.caseNotifier = caseNotifier;
|
|
8740
8734
|
this.router = router;
|
|
@@ -8749,6 +8743,8 @@ class CaseEditComponent {
|
|
|
8749
8743
|
this.formErrorService = formErrorService;
|
|
8750
8744
|
this.loadingService = loadingService;
|
|
8751
8745
|
this.validPageListCaseFieldsService = validPageListCaseFieldsService;
|
|
8746
|
+
this.workAllocationService = workAllocationService;
|
|
8747
|
+
this.alertService = alertService;
|
|
8752
8748
|
this.cancelled = new EventEmitter();
|
|
8753
8749
|
this.submitted = new EventEmitter();
|
|
8754
8750
|
this.isEventCompletionChecksRequired = false;
|
|
@@ -8922,7 +8918,7 @@ class CaseEditComponent {
|
|
|
8922
8918
|
const pageListCaseFields = this.validPageListCaseFieldsService.validPageListCaseFields(this.validPageList, eventTrigger.case_fields, form.controls['data'].value);
|
|
8923
8919
|
// Remove unnecessary case fields which are hidden, only if the submission is *not* for Case Flags
|
|
8924
8920
|
if (!this.isCaseFlagSubmission) {
|
|
8925
|
-
this.formValueService.removeUnnecessaryFields(caseEventData.data, pageListCaseFields, true, true);
|
|
8921
|
+
this.formValueService.removeUnnecessaryFields(caseEventData.data, pageListCaseFields, true, true, false, [], true);
|
|
8926
8922
|
}
|
|
8927
8923
|
caseEventData.event_token = eventTrigger.event_token;
|
|
8928
8924
|
caseEventData.ignore_warning = this.ignoreWarning;
|
|
@@ -9035,31 +9031,68 @@ class CaseEditComponent {
|
|
|
9035
9031
|
}
|
|
9036
9032
|
caseSubmit({ form, caseEventData, submit }) {
|
|
9037
9033
|
const loadingSpinnerToken = this.loadingService.register();
|
|
9038
|
-
|
|
9039
|
-
|
|
9034
|
+
// keep the initial event response to finalise process after task completion
|
|
9035
|
+
let eventResponse;
|
|
9036
|
+
submit(caseEventData).pipe(switchMap((response) => {
|
|
9037
|
+
eventResponse = response;
|
|
9038
|
+
return this.postCompleteTaskIfRequired();
|
|
9039
|
+
}), finalize(() => {
|
|
9040
|
+
this.sessionStorageService.removeItem('taskToComplete');
|
|
9041
|
+
this.sessionStorageService.removeItem('assignNeeded');
|
|
9040
9042
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9041
9043
|
}))
|
|
9042
|
-
.subscribe(
|
|
9043
|
-
this.
|
|
9044
|
-
this
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9044
|
+
.subscribe(() => {
|
|
9045
|
+
this.finishEventCompletionLogic(eventResponse);
|
|
9046
|
+
/* NOTE: Uncomment this to test event confirmation page display of error
|
|
9047
|
+
Replicates lines 458-459
|
|
9048
|
+
this.alertService.setPreserveAlerts(true);
|
|
9049
|
+
this.alertService.error({phrase: 'The associated task for this event failed to complete automatically. Please complete the task manually in the Tasks tab on the case'}); */
|
|
9050
|
+
}, error => {
|
|
9051
|
+
if (!eventResponse) {
|
|
9052
|
+
// event submission error
|
|
9053
|
+
this.error = error;
|
|
9054
|
+
this.callbackErrorsSubject.next(error);
|
|
9055
|
+
/* istanbul ignore else */
|
|
9056
|
+
if (this.error.details) {
|
|
9057
|
+
this.formErrorService
|
|
9058
|
+
.mapFieldErrors(this.error.details.field_errors, form.controls['data'], 'validation');
|
|
9059
|
+
}
|
|
9060
|
+
this.isSubmitting = false;
|
|
9048
9061
|
}
|
|
9049
9062
|
else {
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
if (this.error.details) {
|
|
9057
|
-
this.formErrorService
|
|
9058
|
-
.mapFieldErrors(this.error.details.field_errors, form.controls['data'], 'validation');
|
|
9063
|
+
// task assignment/completion error - handled within workallocation service
|
|
9064
|
+
// could set task to be deleted (or completed later)?
|
|
9065
|
+
this.finishEventCompletionLogic(eventResponse);
|
|
9066
|
+
// below allows error to be shown on navigation to confirmation page
|
|
9067
|
+
this.alertService.setPreserveAlerts(true);
|
|
9068
|
+
this.alertService.error({ phrase: Constants.TASK_COMPLETION_ERROR });
|
|
9059
9069
|
}
|
|
9060
|
-
this.isSubmitting = false;
|
|
9061
9070
|
});
|
|
9062
9071
|
}
|
|
9072
|
+
postCompleteTaskIfRequired() {
|
|
9073
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
9074
|
+
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
9075
|
+
if (taskStr && assignNeeded) {
|
|
9076
|
+
const task = JSON.parse(taskStr);
|
|
9077
|
+
return this.workAllocationService.assignAndCompleteTask(task.id);
|
|
9078
|
+
}
|
|
9079
|
+
else if (taskStr) {
|
|
9080
|
+
const task = JSON.parse(taskStr);
|
|
9081
|
+
return this.workAllocationService.completeTask(task.id);
|
|
9082
|
+
}
|
|
9083
|
+
return of(true);
|
|
9084
|
+
}
|
|
9085
|
+
finishEventCompletionLogic(eventResponse) {
|
|
9086
|
+
this.caseNotifier.cachedCaseView = null;
|
|
9087
|
+
this.sessionStorageService.removeItem('eventUrl');
|
|
9088
|
+
const confirmation = this.buildConfirmation(eventResponse);
|
|
9089
|
+
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
9090
|
+
this.confirm(confirmation);
|
|
9091
|
+
}
|
|
9092
|
+
else {
|
|
9093
|
+
this.emitSubmitted(eventResponse);
|
|
9094
|
+
}
|
|
9095
|
+
}
|
|
9063
9096
|
buildConfirmation(response) {
|
|
9064
9097
|
if (response['after_submit_callback_response']) {
|
|
9065
9098
|
return new Confirmation(response['id'], response['callback_response_status'], response['after_submit_callback_response']['confirmation_header'], response['after_submit_callback_response']['confirmation_body']);
|
|
@@ -9088,7 +9121,7 @@ class CaseEditComponent {
|
|
|
9088
9121
|
}
|
|
9089
9122
|
CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
|
|
9090
9123
|
CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
|
|
9091
|
-
CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
|
|
9124
|
+
CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
|
|
9092
9125
|
CaseEditComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) {
|
|
9093
9126
|
if (rf & 1) {
|
|
9094
9127
|
i0.ɵɵelement(0, "router-outlet");
|
|
@@ -9098,7 +9131,7 @@ CaseEditComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditC
|
|
|
9098
9131
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
|
|
9099
9132
|
type: Component,
|
|
9100
9133
|
args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], template: "<router-outlet></router-outlet>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.case-field-change{width:5%}\n"] }]
|
|
9101
|
-
}], function () { return [{ type: i3.FormBuilder }, { type: CaseNotifier }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, { eventTrigger: [{
|
|
9134
|
+
}], function () { return [{ type: i3.FormBuilder }, { type: CaseNotifier }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }]; }, { eventTrigger: [{
|
|
9102
9135
|
type: Input
|
|
9103
9136
|
}], submit: [{
|
|
9104
9137
|
type: Input
|
|
@@ -9956,6 +9989,7 @@ class CaseEditPageComponent {
|
|
|
9956
9989
|
}
|
|
9957
9990
|
submit() {
|
|
9958
9991
|
this.caseEditDataService.clearFormValidationErrors();
|
|
9992
|
+
console.log('Page submit event fired!');
|
|
9959
9993
|
if (this.currentPageIsNotValid()) {
|
|
9960
9994
|
// The generateErrorMessage method filters out the hidden fields.
|
|
9961
9995
|
// The error message for LinkedCases journey will never get displayed because the
|
|
@@ -9969,6 +10003,7 @@ class CaseEditPageComponent {
|
|
|
9969
10003
|
}
|
|
9970
10004
|
}
|
|
9971
10005
|
if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10006
|
+
console.log('Case Edit Error', this.caseEdit.error);
|
|
9972
10007
|
if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
|
|
9973
10008
|
this.caseEdit.validPageList.push(this.currentPage);
|
|
9974
10009
|
}
|
|
@@ -10154,6 +10189,7 @@ class CaseEditPageComponent {
|
|
|
10154
10189
|
this.formErrorService
|
|
10155
10190
|
.mapFieldErrors(this.caseEdit.error.details.field_errors, (_b = (_a = this.editForm) === null || _a === void 0 ? void 0 : _a.controls) === null || _b === void 0 ? void 0 : _b['data'], 'validation');
|
|
10156
10191
|
}
|
|
10192
|
+
console.log('handleError ', error);
|
|
10157
10193
|
}
|
|
10158
10194
|
resetErrors() {
|
|
10159
10195
|
this.caseEdit.error = null;
|
|
@@ -13355,7 +13391,19 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13355
13391
|
if (0 === error.status || 502 === error.status) {
|
|
13356
13392
|
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
|
|
13357
13393
|
}
|
|
13358
|
-
|
|
13394
|
+
let errorMsg = 'Error uploading file';
|
|
13395
|
+
if (error === null || error === void 0 ? void 0 : error.error) {
|
|
13396
|
+
const fullError = error.error;
|
|
13397
|
+
const start = fullError.indexOf('{');
|
|
13398
|
+
if (start >= 0) {
|
|
13399
|
+
const json = fullError.substring(start, fullError.length - 1).split('<EOL>').join('');
|
|
13400
|
+
const obj = JSON.parse(json);
|
|
13401
|
+
if (obj === null || obj === void 0 ? void 0 : obj.error) {
|
|
13402
|
+
errorMsg = obj.error;
|
|
13403
|
+
}
|
|
13404
|
+
}
|
|
13405
|
+
}
|
|
13406
|
+
return errorMsg;
|
|
13359
13407
|
}
|
|
13360
13408
|
buildDocumentUploadData(selectedFile) {
|
|
13361
13409
|
const documentUpload = new FormData();
|
|
@@ -16820,6 +16868,12 @@ class CommonDataService {
|
|
|
16820
16868
|
}
|
|
16821
16869
|
return of(null);
|
|
16822
16870
|
}
|
|
16871
|
+
getServiceOrgData(url) {
|
|
16872
|
+
if (url) {
|
|
16873
|
+
return this.http.get(url, { observe: 'body' });
|
|
16874
|
+
}
|
|
16875
|
+
return of(null);
|
|
16876
|
+
}
|
|
16823
16877
|
}
|
|
16824
16878
|
CommonDataService.ɵfac = function CommonDataService_Factory(t) { return new (t || CommonDataService)(i0.ɵɵinject(i1$3.HttpClient)); };
|
|
16825
16879
|
CommonDataService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CommonDataService, factory: CommonDataService.ɵfac });
|
|
@@ -17064,6 +17118,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17064
17118
|
this.linkedCasesPages = LinkedCasesPages;
|
|
17065
17119
|
this.linkedCasesEventTriggers = LinkedCasesEventTriggers;
|
|
17066
17120
|
this.linkedCases = [];
|
|
17121
|
+
this.subscriptions = new Subscription();
|
|
17067
17122
|
}
|
|
17068
17123
|
ngOnInit() {
|
|
17069
17124
|
// This is required to enable Continue button validation
|
|
@@ -17072,17 +17127,17 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17072
17127
|
// Clear validation errors
|
|
17073
17128
|
this.caseEditDataService.clearFormValidationErrors();
|
|
17074
17129
|
// Get linked case reasons from ref data
|
|
17075
|
-
this.getLinkedCaseReasons();
|
|
17076
17130
|
this.linkedCasesService.editMode = false;
|
|
17077
|
-
this.caseEditDataService.caseDetails$.subscribe({
|
|
17078
|
-
next: caseDetails => this.initialiseCaseDetails(caseDetails)
|
|
17079
|
-
});
|
|
17080
|
-
this.
|
|
17131
|
+
this.subscriptions.add(this.caseEditDataService.caseDetails$.subscribe({
|
|
17132
|
+
next: caseDetails => { this.initialiseCaseDetails(caseDetails); }
|
|
17133
|
+
}));
|
|
17134
|
+
this.getOrgService();
|
|
17135
|
+
this.subscriptions.add(this.caseEditDataService.caseEventTriggerName$.subscribe({
|
|
17081
17136
|
next: name => this.linkedCasesService.isLinkedCasesEventTrigger = (name === LinkedCasesEventTriggers.LINK_CASES)
|
|
17082
|
-
});
|
|
17083
|
-
this.caseEditDataService.caseEditForm$.subscribe({
|
|
17137
|
+
}));
|
|
17138
|
+
this.subscriptions.add(this.caseEditDataService.caseEditForm$.subscribe({
|
|
17084
17139
|
next: editForm => this.caseEditForm = editForm
|
|
17085
|
-
});
|
|
17140
|
+
}));
|
|
17086
17141
|
}
|
|
17087
17142
|
initialiseCaseDetails(caseDetails) {
|
|
17088
17143
|
if (caseDetails) {
|
|
@@ -17118,18 +17173,27 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17118
17173
|
}
|
|
17119
17174
|
}
|
|
17120
17175
|
}
|
|
17121
|
-
getLinkedCaseReasons() {
|
|
17122
|
-
const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
|
|
17176
|
+
getLinkedCaseReasons(serviceId) {
|
|
17177
|
+
const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode?serviceId=${serviceId}`;
|
|
17123
17178
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17124
17179
|
next: reasons => {
|
|
17125
17180
|
// Sort in ascending order
|
|
17126
17181
|
const linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
|
|
17127
|
-
// Move Other option to the end of the list
|
|
17128
17182
|
this.linkedCasesService.linkCaseReasons = linkCaseReasons === null || linkCaseReasons === void 0 ? void 0 : linkCaseReasons.filter(reason => reason.value_en !== 'Other');
|
|
17183
|
+
// Move Other option to the end of the list
|
|
17129
17184
|
this.linkedCasesService.linkCaseReasons.push(linkCaseReasons === null || linkCaseReasons === void 0 ? void 0 : linkCaseReasons.find(reason => reason.value_en === 'Other'));
|
|
17130
17185
|
}
|
|
17131
17186
|
});
|
|
17132
17187
|
}
|
|
17188
|
+
getOrgService() {
|
|
17189
|
+
var _a, _b;
|
|
17190
|
+
const servicesApiUrl = `refdata/location/orgServices?ccdCaseType=${(_b = (_a = this.caseDetails) === null || _a === void 0 ? void 0 : _a.case_type) === null || _b === void 0 ? void 0 : _b.id}`;
|
|
17191
|
+
this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe(result => {
|
|
17192
|
+
result.forEach(ids => {
|
|
17193
|
+
this.getLinkedCaseReasons(ids.service_id);
|
|
17194
|
+
});
|
|
17195
|
+
});
|
|
17196
|
+
}
|
|
17133
17197
|
proceedToNextPage() {
|
|
17134
17198
|
if (this.isAtFinalPage()) {
|
|
17135
17199
|
// Continue button event must be allowed in final page
|
|
@@ -17184,6 +17248,9 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17184
17248
|
: LinkedCasesPages.NO_LINKED_CASES;
|
|
17185
17249
|
});
|
|
17186
17250
|
}
|
|
17251
|
+
ngOnDestroy() {
|
|
17252
|
+
this.subscriptions.unsubscribe();
|
|
17253
|
+
}
|
|
17187
17254
|
}
|
|
17188
17255
|
WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
17189
17256
|
WriteLinkedCasesFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) {
|
|
@@ -22387,10 +22454,10 @@ WriteDateFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
|
|
|
22387
22454
|
|
|
22388
22455
|
const CUSTOM_MOMENT_FORMATS = {
|
|
22389
22456
|
parse: {
|
|
22390
|
-
dateInput: 'YYYY
|
|
22457
|
+
dateInput: 'DD-MM-YYYY HH:mm:ss'
|
|
22391
22458
|
},
|
|
22392
22459
|
display: {
|
|
22393
|
-
dateInput: 'YYYY
|
|
22460
|
+
dateInput: 'DD-MM-YYYY HH:mm:ss',
|
|
22394
22461
|
monthYearLabel: 'MMMM YYYY',
|
|
22395
22462
|
dateA11yLabel: 'EEE/MMM/YYYY',
|
|
22396
22463
|
monthYearA11yLabel: 'MMMM YYYY',
|
|
@@ -23631,8 +23698,9 @@ class ReadFieldsFilterPipe {
|
|
|
23631
23698
|
return isNotEmpty;
|
|
23632
23699
|
}
|
|
23633
23700
|
static isEmpty(value) {
|
|
23634
|
-
|
|
23635
|
-
|
|
23701
|
+
const fieldValue = (value === null || value === void 0 ? void 0 : value.hasOwnProperty('list_items')) && (value === null || value === void 0 ? void 0 : value.hasOwnProperty('value')) ? value.value : value;
|
|
23702
|
+
return ReadFieldsFilterPipe.EMPTY_VALUES.indexOf(fieldValue) !== -1
|
|
23703
|
+
|| fieldValue.length === 0;
|
|
23636
23704
|
}
|
|
23637
23705
|
static isCompound(field) {
|
|
23638
23706
|
return ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type];
|
|
@@ -25589,18 +25657,9 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
25589
25657
|
// Get task details
|
|
25590
25658
|
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
25591
25659
|
if (taskStr) {
|
|
25592
|
-
|
|
25593
|
-
|
|
25594
|
-
|
|
25595
|
-
this.subscription = this.workAllocationService.assignAndCompleteTask(task.id).subscribe(response => {
|
|
25596
|
-
// Emit event can be completed event
|
|
25597
|
-
this.parentComponent.eventCanBeCompleted.emit(true);
|
|
25598
|
-
}, error => {
|
|
25599
|
-
// Emit event cannot be completed event
|
|
25600
|
-
this.parentComponent.eventCanBeCompleted.emit(false);
|
|
25601
|
-
this.alertService.error(error.message);
|
|
25602
|
-
return throwError(error);
|
|
25603
|
-
});
|
|
25660
|
+
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
25661
|
+
// set event can be completed to true
|
|
25662
|
+
this.parentComponent.eventCanBeCompleted.emit(true);
|
|
25604
25663
|
}
|
|
25605
25664
|
else {
|
|
25606
25665
|
// Emit event cannot be completed event
|
|
@@ -28108,7 +28167,7 @@ function CaseEventTriggerComponent_div_0_Template(rf, ctx) {
|
|
|
28108
28167
|
}
|
|
28109
28168
|
}
|
|
28110
28169
|
class CaseEventTriggerComponent {
|
|
28111
|
-
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService) {
|
|
28170
|
+
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService) {
|
|
28112
28171
|
this.ngZone = ngZone;
|
|
28113
28172
|
this.casesService = casesService;
|
|
28114
28173
|
this.caseNotifier = caseNotifier;
|
|
@@ -28117,6 +28176,7 @@ class CaseEventTriggerComponent {
|
|
|
28117
28176
|
this.route = route;
|
|
28118
28177
|
this.caseReferencePipe = caseReferencePipe;
|
|
28119
28178
|
this.activityPollingService = activityPollingService;
|
|
28179
|
+
this.sessionStorageService = sessionStorageService;
|
|
28120
28180
|
this.BANNER = DisplayMode.BANNER;
|
|
28121
28181
|
}
|
|
28122
28182
|
ngOnInit() {
|
|
@@ -28178,21 +28238,30 @@ class CaseEventTriggerComponent {
|
|
|
28178
28238
|
}
|
|
28179
28239
|
submitted(event) {
|
|
28180
28240
|
const eventStatus = event['status'];
|
|
28241
|
+
const task = this.sessionStorageService.getItem('taskToComplete');
|
|
28181
28242
|
this.router
|
|
28182
28243
|
.navigate([this.parentUrl])
|
|
28183
28244
|
.then(() => {
|
|
28184
28245
|
const caseReference = this.caseReferencePipe.transform(this.caseDetails.case_id.toString());
|
|
28185
28246
|
const replacements = { CASEREFERENCE: caseReference, NAME: this.eventTrigger.name };
|
|
28186
|
-
|
|
28247
|
+
this.alertService.setPreserveAlerts(true);
|
|
28248
|
+
if (task) {
|
|
28249
|
+
// if task still present in session storage, we know that the task has not been correctly completed
|
|
28250
|
+
this.alertService.warning({
|
|
28251
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE + '. ' + Constants.TASK_COMPLETION_ERROR,
|
|
28252
|
+
replacements
|
|
28253
|
+
});
|
|
28254
|
+
this.sessionStorageService.removeItem('taskToComplete');
|
|
28255
|
+
}
|
|
28256
|
+
else if (EventStatusService.isIncomplete(eventStatus)) {
|
|
28187
28257
|
this.alertService.warning({
|
|
28188
|
-
phrase:
|
|
28189
|
-
but the callback service cannot be completed`,
|
|
28258
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE + CaseEventTriggerComponent.CALLBACK_FAILED_MESSAGE,
|
|
28190
28259
|
replacements
|
|
28191
28260
|
});
|
|
28192
28261
|
}
|
|
28193
28262
|
else {
|
|
28194
28263
|
this.alertService.success({
|
|
28195
|
-
phrase:
|
|
28264
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE,
|
|
28196
28265
|
replacements,
|
|
28197
28266
|
preserve: true
|
|
28198
28267
|
});
|
|
@@ -28211,7 +28280,9 @@ class CaseEventTriggerComponent {
|
|
|
28211
28280
|
return !!(this.eventTrigger && this.caseDetails);
|
|
28212
28281
|
}
|
|
28213
28282
|
}
|
|
28214
|
-
CaseEventTriggerComponent
|
|
28283
|
+
CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE = `Case #%CASEREFERENCE% has been updated with event: %NAME%`;
|
|
28284
|
+
CaseEventTriggerComponent.CALLBACK_FAILED_MESSAGE = ' but the callback service cannot be completed';
|
|
28285
|
+
CaseEventTriggerComponent.ɵfac = function CaseEventTriggerComponent_Factory(t) { return new (t || CaseEventTriggerComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
28215
28286
|
CaseEventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventTriggerComponent, selectors: [["ccd-case-event-trigger"]], decls: 1, vars: 1, consts: [["class", "screen-990", 4, "ngIf"], [1, "screen-990"], [3, "caseId", "displayMode"], [3, "caseDetails", "submit", "validate", "eventTrigger", "cancelled", "submitted"]], template: function CaseEventTriggerComponent_Template(rf, ctx) {
|
|
28216
28287
|
if (rf & 1) {
|
|
28217
28288
|
i0.ɵɵtemplate(0, CaseEventTriggerComponent_div_0_Template, 3, 6, "div", 0);
|
|
@@ -28224,7 +28295,7 @@ CaseEventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: C
|
|
|
28224
28295
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventTriggerComponent, [{
|
|
28225
28296
|
type: Component,
|
|
28226
28297
|
args: [{ selector: 'ccd-case-event-trigger', template: "<div *ngIf=\"isDataLoaded()\" class=\"screen-990\">\n <ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n <ccd-case-edit [caseDetails]=\"caseDetails\"\n [submit]=\"submit()\"\n [validate]=\"validate()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"cancel()\"\n (submitted)=\"submitted($event)\"></ccd-case-edit>\n</div>\n" }]
|
|
28227
|
-
}], function () { return [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$2.Router }, { type: AlertService }, { type: i1$2.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }]; }, null);
|
|
28298
|
+
}], function () { return [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$2.Router }, { type: AlertService }, { type: i1$2.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }]; }, null);
|
|
28228
28299
|
})();
|
|
28229
28300
|
|
|
28230
28301
|
function CaseViewComponent_div_0_Template(rf, ctx) {
|