@hmcts/ccd-case-ui-toolkit 7.0.3-event-before-task → 7.0.3-event-before-task-with-logic
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/components/case-editor/case-edit/case-edit.component.mjs +14 -11
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +13 -10
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +13 -10
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +1 -0
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8728,15 +8728,7 @@ class CaseEditComponent {
|
|
|
8728
8728
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
8729
8729
|
}))
|
|
8730
8730
|
.subscribe(() => {
|
|
8731
|
-
this.
|
|
8732
|
-
this.sessionStorageService.removeItem('eventUrl');
|
|
8733
|
-
const confirmation = this.buildConfirmation(eventResponse);
|
|
8734
|
-
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
8735
|
-
this.confirm(confirmation);
|
|
8736
|
-
}
|
|
8737
|
-
else {
|
|
8738
|
-
this.emitSubmitted(eventResponse);
|
|
8739
|
-
}
|
|
8731
|
+
this.finishEventCompletionLogic(eventResponse);
|
|
8740
8732
|
}, error => {
|
|
8741
8733
|
if (!eventResponse) {
|
|
8742
8734
|
// event submission error
|
|
@@ -8753,7 +8745,7 @@ class CaseEditComponent {
|
|
|
8753
8745
|
// task assignment/completion error - handled within workallocation service
|
|
8754
8746
|
// could set task to be deleted (or completed later)?
|
|
8755
8747
|
// note: think error messages only shown if user is caseworker - might reqauire changing
|
|
8756
|
-
this.
|
|
8748
|
+
this.finishEventCompletionLogic(eventResponse);
|
|
8757
8749
|
}
|
|
8758
8750
|
});
|
|
8759
8751
|
}
|
|
@@ -8770,6 +8762,17 @@ class CaseEditComponent {
|
|
|
8770
8762
|
}
|
|
8771
8763
|
return of(true);
|
|
8772
8764
|
}
|
|
8765
|
+
finishEventCompletionLogic(eventResponse) {
|
|
8766
|
+
this.caseNotifier.cachedCaseView = null;
|
|
8767
|
+
this.sessionStorageService.removeItem('eventUrl');
|
|
8768
|
+
const confirmation = this.buildConfirmation(eventResponse);
|
|
8769
|
+
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
8770
|
+
this.confirm(confirmation);
|
|
8771
|
+
}
|
|
8772
|
+
else {
|
|
8773
|
+
this.emitSubmitted(eventResponse);
|
|
8774
|
+
}
|
|
8775
|
+
}
|
|
8773
8776
|
buildConfirmation(response) {
|
|
8774
8777
|
if (response['after_submit_callback_response']) {
|
|
8775
8778
|
return new Confirmation(response['id'], response['callback_response_status'], response['after_submit_callback_response']['confirmation_header'], response['after_submit_callback_response']['confirmation_body']);
|