@hmcts/ccd-case-ui-toolkit 7.0.9 → 7.0.10-exui-1184-rc1
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 +12 -6
- package/esm2020/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.mjs +22 -9
- package/esm2020/lib/shared/components/palette/yes-no/write-yes-no-field.component.mjs +3 -3
- package/esm2020/lib/shared/components/search-filters/search-filters.component.mjs +24 -4
- package/esm2020/lib/shared/services/fields/fields.purger.mjs +8 -3
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +61 -18
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +61 -18
- 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 +3 -2
- package/lib/shared/components/case-editor/case-edit/case-edit.component.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/search-filters/search-filters.component.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -55,6 +55,7 @@ import * as i2$2 from 'ngx-pagination';
|
|
|
55
55
|
import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
|
|
56
56
|
import * as i10 from '@angular/material/legacy-tabs';
|
|
57
57
|
import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
|
|
58
|
+
import { decompressFromUTF16, compressToUTF16 } from 'lz-string';
|
|
58
59
|
|
|
59
60
|
function FooterComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
60
61
|
i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
|
|
@@ -4533,6 +4534,7 @@ class Constants {
|
|
|
4533
4534
|
}
|
|
4534
4535
|
Constants.MANDATORY = 'MANDATORY';
|
|
4535
4536
|
Constants.REGEX_WHITESPACES = '^[^ ]+(?:\\s+[^ ]+)*$';
|
|
4537
|
+
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';
|
|
4536
4538
|
Constants.ɵfac = function Constants_Factory(t) { return new (t || Constants)(); };
|
|
4537
4539
|
Constants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Constants, factory: Constants.ɵfac });
|
|
4538
4540
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Constants, [{
|
|
@@ -4956,7 +4958,7 @@ class FieldsPurger {
|
|
|
4956
4958
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
4957
4959
|
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
4958
4960
|
}
|
|
4959
|
-
resetField(form, field) {
|
|
4961
|
+
resetField(form, field, calledFromResetPage = false) {
|
|
4960
4962
|
/**
|
|
4961
4963
|
* If the hidden field's value is to be retained, do nothing (except if it is a Complex type or collection of
|
|
4962
4964
|
* Complex types). This is a change to the previous behaviour (which used to clear the field value but remove it
|
|
@@ -5019,6 +5021,11 @@ class FieldsPurger {
|
|
|
5019
5021
|
}
|
|
5020
5022
|
}
|
|
5021
5023
|
}
|
|
5024
|
+
else if (calledFromResetPage) {
|
|
5025
|
+
// Delete the field from formGroup
|
|
5026
|
+
const dataGroup = form.get('data');
|
|
5027
|
+
dataGroup.removeControl(field.id);
|
|
5028
|
+
}
|
|
5022
5029
|
else {
|
|
5023
5030
|
// Delete the field value
|
|
5024
5031
|
this.deleteFieldValue(form.get('data'), field);
|
|
@@ -5027,7 +5034,7 @@ class FieldsPurger {
|
|
|
5027
5034
|
resetPage(form, wizardPage) {
|
|
5028
5035
|
wizardPage.wizard_page_fields.forEach(wpf => {
|
|
5029
5036
|
const caseField = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5030
|
-
this.resetField(form, caseField);
|
|
5037
|
+
this.resetField(form, caseField, true);
|
|
5031
5038
|
});
|
|
5032
5039
|
}
|
|
5033
5040
|
getType(elem) {
|
|
@@ -8655,7 +8662,7 @@ ValidPageListCaseFieldsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({
|
|
|
8655
8662
|
}], function () { return [{ type: FieldsUtils }]; }, null); })();
|
|
8656
8663
|
|
|
8657
8664
|
class CaseEditComponent {
|
|
8658
|
-
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService) {
|
|
8665
|
+
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService) {
|
|
8659
8666
|
this.fb = fb;
|
|
8660
8667
|
this.caseNotifier = caseNotifier;
|
|
8661
8668
|
this.router = router;
|
|
@@ -8671,6 +8678,7 @@ class CaseEditComponent {
|
|
|
8671
8678
|
this.loadingService = loadingService;
|
|
8672
8679
|
this.validPageListCaseFieldsService = validPageListCaseFieldsService;
|
|
8673
8680
|
this.workAllocationService = workAllocationService;
|
|
8681
|
+
this.alertService = alertService;
|
|
8674
8682
|
this.cancelled = new EventEmitter();
|
|
8675
8683
|
this.submitted = new EventEmitter();
|
|
8676
8684
|
this.isEventCompletionChecksRequired = false;
|
|
@@ -8959,6 +8967,7 @@ class CaseEditComponent {
|
|
|
8959
8967
|
const loadingSpinnerToken = this.loadingService.register();
|
|
8960
8968
|
// keep the initial event response to finalise process after task completion
|
|
8961
8969
|
let eventResponse;
|
|
8970
|
+
this.sessionStorageService.setItem('taskCompletionError', 'false');
|
|
8962
8971
|
submit(caseEventData).pipe(switchMap((response) => {
|
|
8963
8972
|
eventResponse = response;
|
|
8964
8973
|
return this.postCompleteTaskIfRequired();
|
|
@@ -8980,10 +8989,13 @@ class CaseEditComponent {
|
|
|
8980
8989
|
this.isSubmitting = false;
|
|
8981
8990
|
}
|
|
8982
8991
|
else {
|
|
8992
|
+
this.sessionStorageService.setItem('taskCompletionError', 'true');
|
|
8983
8993
|
// task assignment/completion error - handled within workallocation service
|
|
8984
8994
|
// could set task to be deleted (or completed later)?
|
|
8985
|
-
// note: think error messages only shown if user is caseworker - might reqauire changing
|
|
8986
8995
|
this.finishEventCompletionLogic(eventResponse);
|
|
8996
|
+
// below allows error to be shown on navigation to confirmation page
|
|
8997
|
+
this.alertService.setPreserveAlerts(true);
|
|
8998
|
+
this.alertService.error({ phrase: Constants.TASK_COMPLETION_ERROR });
|
|
8987
8999
|
}
|
|
8988
9000
|
});
|
|
8989
9001
|
}
|
|
@@ -9039,14 +9051,14 @@ class CaseEditComponent {
|
|
|
9039
9051
|
}
|
|
9040
9052
|
CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
|
|
9041
9053
|
CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
|
|
9042
|
-
CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.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)); };
|
|
9054
|
+
CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.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)); };
|
|
9043
9055
|
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) { if (rf & 1) {
|
|
9044
9056
|
i0.ɵɵelement(0, "router-outlet");
|
|
9045
9057
|
} }, dependencies: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
|
|
9046
9058
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
|
|
9047
9059
|
type: Component,
|
|
9048
9060
|
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%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
|
|
9049
|
-
}], function () { return [{ type: i3.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }]; }, { eventTrigger: [{
|
|
9061
|
+
}], function () { return [{ type: i3.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.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: [{
|
|
9050
9062
|
type: Input
|
|
9051
9063
|
}], submit: [{
|
|
9052
9064
|
type: Input
|
|
@@ -20358,7 +20370,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
20358
20370
|
i0.ɵɵadvance(1);
|
|
20359
20371
|
i0.ɵɵproperty("for", ctx_r3.createElementId(value_r4));
|
|
20360
20372
|
i0.ɵɵadvance(1);
|
|
20361
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4));
|
|
20373
|
+
i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
|
|
20362
20374
|
} }
|
|
20363
20375
|
const _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
20364
20376
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
@@ -20396,7 +20408,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
20396
20408
|
} }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i3.DefaultValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
20397
20409
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteYesNoFieldComponent, [{
|
|
20398
20410
|
type: Component,
|
|
20399
|
-
args: [{ selector: 'ccd-write-yes-no-field', template: "<div [id]=\"id()\" class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !yesNoControl.valid && (yesNoControl.dirty || yesNoControl.touched)}\">\n\t<fieldset class=\"inline\">\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </legend>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"yesNoControl.errors && (yesNoControl.dirty || yesNoControl.touched)\">\n {{yesNoControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div [id]=\"createElementId('radio')\">\n \t <div class=\"multiple-choice\" *ngFor=\"let value of yesNoValues\" [ngClass]=\"{selected: yesNoControl.value === value}\">\n \t <input class=\"form-control\" [id]=\"createElementId(value)\" [attr.name]=\"id()\" [name]=\"id()\" type=\"radio\" [formControl]=\"yesNoControl\" [value]=\"value\">\n
|
|
20411
|
+
args: [{ selector: 'ccd-write-yes-no-field', template: "<div [id]=\"id()\" class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !yesNoControl.valid && (yesNoControl.dirty || yesNoControl.touched)}\">\n\t<fieldset class=\"inline\">\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </legend>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"yesNoControl.errors && (yesNoControl.dirty || yesNoControl.touched)\">\n {{yesNoControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div [id]=\"createElementId('radio')\">\n \t <div class=\"multiple-choice\" *ngFor=\"let value of yesNoValues\" [ngClass]=\"{selected: yesNoControl.value === value}\">\n \t <input class=\"form-control\" [id]=\"createElementId(value)\" [attr.name]=\"id()\" [name]=\"id()\" type=\"radio\" [formControl]=\"yesNoControl\" [value]=\"value\">\n <label class=\"form-label\" [for]=\"createElementId(value)\">{{caseField.label ? (caseField.label | rpxTranslate:null:value) : value}}</label>\n \t </div>\n </div>\n\t</fieldset>\n</div>\n" }]
|
|
20400
20412
|
}], function () { return [{ type: YesNoService }]; }, null); })();
|
|
20401
20413
|
|
|
20402
20414
|
class PaletteService {
|
|
@@ -30098,7 +30110,7 @@ function CaseEventTriggerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
30098
30110
|
i0.ɵɵproperty("caseDetails", ctx_r0.caseDetails)("submit", ctx_r0.submit())("validate", ctx_r0.validate())("eventTrigger", ctx_r0.eventTrigger);
|
|
30099
30111
|
} }
|
|
30100
30112
|
class CaseEventTriggerComponent {
|
|
30101
|
-
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService) {
|
|
30113
|
+
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService) {
|
|
30102
30114
|
this.ngZone = ngZone;
|
|
30103
30115
|
this.casesService = casesService;
|
|
30104
30116
|
this.caseNotifier = caseNotifier;
|
|
@@ -30107,6 +30119,7 @@ class CaseEventTriggerComponent {
|
|
|
30107
30119
|
this.route = route;
|
|
30108
30120
|
this.caseReferencePipe = caseReferencePipe;
|
|
30109
30121
|
this.activityPollingService = activityPollingService;
|
|
30122
|
+
this.sessionStorageService = sessionStorageService;
|
|
30110
30123
|
this.BANNER = DisplayMode.BANNER;
|
|
30111
30124
|
}
|
|
30112
30125
|
ngOnInit() {
|
|
@@ -30155,21 +30168,30 @@ class CaseEventTriggerComponent {
|
|
|
30155
30168
|
}
|
|
30156
30169
|
submitted(event) {
|
|
30157
30170
|
const eventStatus = event['status'];
|
|
30171
|
+
const taskCompletionFailed = this.sessionStorageService.getItem('taskCompletionError') === 'true';
|
|
30158
30172
|
this.router
|
|
30159
30173
|
.navigate([this.parentUrl])
|
|
30160
30174
|
.then(() => {
|
|
30161
30175
|
const caseReference = this.caseReferencePipe.transform(this.caseDetails.case_id.toString());
|
|
30162
30176
|
const replacements = { CASEREFERENCE: caseReference, NAME: this.eventTrigger.name };
|
|
30163
|
-
|
|
30177
|
+
this.alertService.setPreserveAlerts(true);
|
|
30178
|
+
if (taskCompletionFailed) {
|
|
30179
|
+
// if task still present in session storage, we know that the task has not been correctly completed
|
|
30180
|
+
this.alertService.warning({
|
|
30181
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE + '. ' + Constants.TASK_COMPLETION_ERROR,
|
|
30182
|
+
replacements
|
|
30183
|
+
});
|
|
30184
|
+
this.sessionStorageService.removeItem('taskCompletionError');
|
|
30185
|
+
}
|
|
30186
|
+
else if (EventStatusService.isIncomplete(eventStatus)) {
|
|
30164
30187
|
this.alertService.warning({
|
|
30165
|
-
phrase:
|
|
30166
|
-
but the callback service cannot be completed`,
|
|
30188
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE + CaseEventTriggerComponent.CALLBACK_FAILED_MESSAGE,
|
|
30167
30189
|
replacements
|
|
30168
30190
|
});
|
|
30169
30191
|
}
|
|
30170
30192
|
else {
|
|
30171
30193
|
this.alertService.success({
|
|
30172
|
-
phrase:
|
|
30194
|
+
phrase: CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE,
|
|
30173
30195
|
replacements,
|
|
30174
30196
|
preserve: true
|
|
30175
30197
|
});
|
|
@@ -30188,7 +30210,9 @@ class CaseEventTriggerComponent {
|
|
|
30188
30210
|
return !!(this.eventTrigger && this.caseDetails);
|
|
30189
30211
|
}
|
|
30190
30212
|
}
|
|
30191
|
-
CaseEventTriggerComponent
|
|
30213
|
+
CaseEventTriggerComponent.EVENT_COMPLETION_MESSAGE = `Case #%CASEREFERENCE% has been updated with event: %NAME%`;
|
|
30214
|
+
CaseEventTriggerComponent.CALLBACK_FAILED_MESSAGE = ' but the callback service cannot be completed';
|
|
30215
|
+
CaseEventTriggerComponent.ɵfac = function CaseEventTriggerComponent_Factory(t) { return new (t || CaseEventTriggerComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
30192
30216
|
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) { if (rf & 1) {
|
|
30193
30217
|
i0.ɵɵtemplate(0, CaseEventTriggerComponent_div_0_Template, 3, 6, "div", 0);
|
|
30194
30218
|
} if (rf & 2) {
|
|
@@ -30197,7 +30221,7 @@ CaseEventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: C
|
|
|
30197
30221
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventTriggerComponent, [{
|
|
30198
30222
|
type: Component,
|
|
30199
30223
|
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" }]
|
|
30200
|
-
}], function () { return [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }]; }, null); })();
|
|
30224
|
+
}], function () { return [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }]; }, null); })();
|
|
30201
30225
|
|
|
30202
30226
|
function CaseViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
30203
30227
|
i0.ɵɵelementStart(0, "div");
|
|
@@ -34041,8 +34065,18 @@ class SearchFiltersComponent {
|
|
|
34041
34065
|
if (this.jurisdictions.length === 1 || jurisdiction) {
|
|
34042
34066
|
this.selected.jurisdiction = this.jurisdictions[0];
|
|
34043
34067
|
if (jurisdiction) {
|
|
34044
|
-
|
|
34045
|
-
|
|
34068
|
+
try {
|
|
34069
|
+
console.log('jurisdiction retrieved from local storage len = ' + jurisdiction.length);
|
|
34070
|
+
const localStorageJurisdiction = JSON.parse(decompressFromUTF16(jurisdiction));
|
|
34071
|
+
if (localStorageJurisdiction) {
|
|
34072
|
+
this.selected.jurisdiction = this.jurisdictions
|
|
34073
|
+
.filter(j => j.id === localStorageJurisdiction.id)[0];
|
|
34074
|
+
}
|
|
34075
|
+
}
|
|
34076
|
+
catch (e) {
|
|
34077
|
+
console.log("Failed to retrieve jurisdiction from local storage");
|
|
34078
|
+
this.windowService.setLocalStorage(JURISDICTION_LOC_STORAGE, null);
|
|
34079
|
+
}
|
|
34046
34080
|
}
|
|
34047
34081
|
this.onJurisdictionIdChange();
|
|
34048
34082
|
}
|
|
@@ -34067,6 +34101,7 @@ class SearchFiltersComponent {
|
|
|
34067
34101
|
this.onReset.emit();
|
|
34068
34102
|
}
|
|
34069
34103
|
apply() {
|
|
34104
|
+
console.log("Search filters apply");
|
|
34070
34105
|
this.selected.formGroup = this.formGroup;
|
|
34071
34106
|
this.selected.page = 1;
|
|
34072
34107
|
this.selected.metadataFields = this.getMetadataFields();
|
|
@@ -34080,7 +34115,15 @@ class SearchFiltersComponent {
|
|
|
34080
34115
|
populateValuesInLocalStorage() {
|
|
34081
34116
|
this.windowService.setLocalStorage(FORM_GROUP_VALUE_LOC_STORAGE, JSON.stringify(this.selected.formGroup.value));
|
|
34082
34117
|
this.windowService.setLocalStorage(META_FIELDS_LOC_STORAGE, JSON.stringify(this.selected.metadataFields));
|
|
34083
|
-
|
|
34118
|
+
try {
|
|
34119
|
+
const compJurisd = compressToUTF16(JSON.stringify(this.selected.jurisdiction));
|
|
34120
|
+
this.windowService.setLocalStorage(JURISDICTION_LOC_STORAGE, compJurisd);
|
|
34121
|
+
console.log('jurisdiction compressed into local storage, length = ' + compJurisd.length);
|
|
34122
|
+
}
|
|
34123
|
+
catch (e) {
|
|
34124
|
+
console.log('Could not store jurisdiction in local storage');
|
|
34125
|
+
this.windowService.setLocalStorage(JURISDICTION_LOC_STORAGE, null);
|
|
34126
|
+
}
|
|
34084
34127
|
if (this.selected.caseType) {
|
|
34085
34128
|
this.windowService.setLocalStorage(CASE_TYPE_LOC_STORAGE, JSON.stringify(this.selected.caseType));
|
|
34086
34129
|
}
|