@hmcts/ccd-case-ui-toolkit 6.16.0-query-management-write-view-v11 → 6.16.0-query-management-raise-query-trigger-v2
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 +59 -39
- 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/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +48 -41
- package/esm2015/lib/shared/domain/case-view/case-view-event-ids.enum.js +6 -0
- package/esm2015/lib/shared/domain/case-view/case-view-trigger.model.js +1 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +51 -41
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +1 -1
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view-event-ids.enum.d.ts +5 -0
- package/lib/shared/domain/case-view/case-view-event-ids.enum.d.ts.map +1 -0
- package/lib/shared/domain/case-view/case-view-trigger.model.d.ts +0 -1
- package/lib/shared/domain/case-view/case-view-trigger.model.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3707,7 +3707,6 @@
|
|
|
3707
3707
|
}
|
|
3708
3708
|
return CaseViewTrigger;
|
|
3709
3709
|
}());
|
|
3710
|
-
CaseViewTrigger.DELETE = 'DELETE';
|
|
3711
3710
|
|
|
3712
3711
|
var CaseEvent = /** @class */ (function () {
|
|
3713
3712
|
function CaseEvent() {
|
|
@@ -33931,6 +33930,12 @@
|
|
|
33931
33930
|
}] });
|
|
33932
33931
|
})();
|
|
33933
33932
|
|
|
33933
|
+
var CaseViewEventIds;
|
|
33934
|
+
(function (CaseViewEventIds) {
|
|
33935
|
+
CaseViewEventIds["DELETE"] = "DELETE";
|
|
33936
|
+
CaseViewEventIds["QueryManagementRaiseQuery"] = "queryManagementRaiseQuery";
|
|
33937
|
+
})(CaseViewEventIds || (CaseViewEventIds = {}));
|
|
33938
|
+
|
|
33934
33939
|
var DeleteOrCancelDialogComponent = /** @class */ (function () {
|
|
33935
33940
|
function DeleteOrCancelDialogComponent(matDialogRef) {
|
|
33936
33941
|
this.matDialogRef = matDialogRef;
|
|
@@ -34461,45 +34466,60 @@
|
|
|
34461
34466
|
this.triggerText = CaseFullAccessViewComponent.TRIGGER_TEXT_START;
|
|
34462
34467
|
};
|
|
34463
34468
|
CaseFullAccessViewComponent.prototype.applyTrigger = function (trigger) {
|
|
34464
|
-
|
|
34465
|
-
|
|
34466
|
-
|
|
34467
|
-
|
|
34468
|
-
|
|
34469
|
-
|
|
34470
|
-
|
|
34471
|
-
|
|
34472
|
-
|
|
34473
|
-
|
|
34474
|
-
|
|
34475
|
-
|
|
34476
|
-
.
|
|
34477
|
-
|
|
34478
|
-
|
|
34479
|
-
|
|
34480
|
-
|
|
34469
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
34470
|
+
var theQueryParams, dialogRef;
|
|
34471
|
+
var _this = this;
|
|
34472
|
+
return __generator(this, function (_a) {
|
|
34473
|
+
switch (_a.label) {
|
|
34474
|
+
case 0:
|
|
34475
|
+
this.error = null;
|
|
34476
|
+
theQueryParams = {};
|
|
34477
|
+
if (this.ignoreWarning) {
|
|
34478
|
+
theQueryParams['ignoreWarning'] = this.ignoreWarning;
|
|
34479
|
+
}
|
|
34480
|
+
if (!(trigger.id === CaseViewEventIds.QueryManagementRaiseQuery)) return [3 /*break*/, 2];
|
|
34481
|
+
return [4 /*yield*/, this.router.navigate(["/cases/query/" + this.caseDetails.case_id])];
|
|
34482
|
+
case 1:
|
|
34483
|
+
_a.sent();
|
|
34484
|
+
return [3 /*break*/, 3];
|
|
34485
|
+
case 2:
|
|
34486
|
+
if (trigger.id === CaseViewEventIds.DELETE) {
|
|
34487
|
+
dialogRef = this.dialog.open(DeleteOrCancelDialogComponent, this.dialogConfig);
|
|
34488
|
+
dialogRef.afterClosed().subscribe(function (result) {
|
|
34489
|
+
if (result === 'Delete') {
|
|
34490
|
+
_this.draftService.deleteDraft(_this.caseDetails.case_id)
|
|
34491
|
+
.subscribe(function (_) {
|
|
34492
|
+
_this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.DRAFT_DELETED });
|
|
34493
|
+
}, function (_) {
|
|
34494
|
+
_this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.ERROR_DELETING_DRAFT });
|
|
34495
|
+
});
|
|
34496
|
+
}
|
|
34497
|
+
});
|
|
34498
|
+
}
|
|
34499
|
+
else if (this.isDraft() && trigger.id !== CaseViewEventIds.DELETE) {
|
|
34500
|
+
theQueryParams[DRAFT_QUERY_PARAM] = this.caseDetails.case_id;
|
|
34501
|
+
theQueryParams[CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM] = 'viewDraft';
|
|
34502
|
+
this.navigationNotifierService.announceNavigation({
|
|
34503
|
+
action: exports.NavigationOrigin.DRAFT_RESUMED,
|
|
34504
|
+
jid: this.caseDetails.case_type.jurisdiction.id,
|
|
34505
|
+
ctid: this.caseDetails.case_type.id,
|
|
34506
|
+
etid: trigger.id,
|
|
34507
|
+
queryParams: theQueryParams
|
|
34508
|
+
});
|
|
34509
|
+
}
|
|
34510
|
+
else {
|
|
34511
|
+
this.navigationNotifierService.announceNavigation({
|
|
34512
|
+
action: exports.NavigationOrigin.EVENT_TRIGGERED,
|
|
34513
|
+
queryParams: theQueryParams,
|
|
34514
|
+
etid: trigger.id,
|
|
34515
|
+
relativeTo: this.route
|
|
34516
|
+
});
|
|
34517
|
+
}
|
|
34518
|
+
_a.label = 3;
|
|
34519
|
+
case 3: return [2 /*return*/];
|
|
34481
34520
|
}
|
|
34482
34521
|
});
|
|
34483
|
-
}
|
|
34484
|
-
else if (this.isDraft() && trigger.id !== CaseViewTrigger.DELETE) {
|
|
34485
|
-
theQueryParams[DRAFT_QUERY_PARAM] = this.caseDetails.case_id;
|
|
34486
|
-
theQueryParams[CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM] = 'viewDraft';
|
|
34487
|
-
this.navigationNotifierService.announceNavigation({
|
|
34488
|
-
action: exports.NavigationOrigin.DRAFT_RESUMED,
|
|
34489
|
-
jid: this.caseDetails.case_type.jurisdiction.id,
|
|
34490
|
-
ctid: this.caseDetails.case_type.id,
|
|
34491
|
-
etid: trigger.id,
|
|
34492
|
-
queryParams: theQueryParams
|
|
34493
|
-
});
|
|
34494
|
-
}
|
|
34495
|
-
else {
|
|
34496
|
-
this.navigationNotifierService.announceNavigation({
|
|
34497
|
-
action: exports.NavigationOrigin.EVENT_TRIGGERED,
|
|
34498
|
-
queryParams: theQueryParams,
|
|
34499
|
-
etid: trigger.id,
|
|
34500
|
-
relativeTo: this.route
|
|
34501
|
-
});
|
|
34502
|
-
}
|
|
34522
|
+
});
|
|
34503
34523
|
};
|
|
34504
34524
|
CaseFullAccessViewComponent.prototype.hasTabsPresent = function () {
|
|
34505
34525
|
return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
|
|
@@ -34651,7 +34671,7 @@
|
|
|
34651
34671
|
// Clone and sort tabs array
|
|
34652
34672
|
this.sortedTabs = this.orderService.sort(this.caseDetails.tabs);
|
|
34653
34673
|
this.caseFields = this.getTabFields();
|
|
34654
|
-
this.sortedTabs = this.sortTabFieldsAndFilterTabs(this.sortedTabs);
|
|
34674
|
+
// this.sortedTabs = this.sortTabFieldsAndFilterTabs(this.sortedTabs);
|
|
34655
34675
|
this.formGroup = this.buildFormGroup(this.caseFields);
|
|
34656
34676
|
if (this.caseDetails.triggers && this.error) {
|
|
34657
34677
|
this.resetErrors();
|