@hmcts/ccd-case-ui-toolkit 6.19.3-mv-upgrade → 6.19.4-sscs-joh-fixes
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 +45 -11
- 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-editor/case-editor.module.js +5 -5
- package/esm2015/lib/shared/components/create-case-filters/create-case-filters.component.js +13 -8
- package/esm2015/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.js +16 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +4 -5
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +12 -1
- package/esm2015/lib/shared/domain/definition/jurisdiction.model.js +1 -1
- package/esm2015/lib/shared/services/jurisdiction/jurisdiction.service.js +6 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +43 -11
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-editor/case-editor.module.d.ts +8 -8
- package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts +3 -1
- package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts.map +1 -1
- package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts +5 -3
- package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/domain/definition/jurisdiction.model.d.ts +1 -0
- package/lib/shared/domain/definition/jurisdiction.model.d.ts.map +1 -1
- package/lib/shared/services/jurisdiction/jurisdiction.service.d.ts +3 -2
- package/lib/shared/services/jurisdiction/jurisdiction.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7699,14 +7699,18 @@
|
|
|
7699
7699
|
var JurisdictionService = /** @class */ (function () {
|
|
7700
7700
|
function JurisdictionService(httpService) {
|
|
7701
7701
|
this.httpService = httpService;
|
|
7702
|
+
// We retain the Subject observable because subscribing code couldn't happen a null value
|
|
7702
7703
|
this.selectedJurisdictionSource = new rxjs.Subject();
|
|
7704
|
+
this.selectedJurisdictionBS = new rxjs.BehaviorSubject(null);
|
|
7703
7705
|
this.selectedJurisdiction = this.selectedJurisdictionSource.asObservable();
|
|
7704
7706
|
}
|
|
7705
7707
|
JurisdictionService.prototype.getJurisdictions = function () {
|
|
7706
7708
|
return this.httpService.get('/aggregated/caseworkers/:uid/jurisdictions?access=read');
|
|
7707
7709
|
};
|
|
7708
7710
|
JurisdictionService.prototype.announceSelectedJurisdiction = function (jurisdiction) {
|
|
7711
|
+
console.info('Announcing selected jurisdiction = ' + (jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.id));
|
|
7709
7712
|
this.selectedJurisdictionSource.next(jurisdiction);
|
|
7713
|
+
this.selectedJurisdictionBS.next(jurisdiction);
|
|
7710
7714
|
};
|
|
7711
7715
|
JurisdictionService.prototype.searchJudicialUsers = function (searchTerm, serviceId) {
|
|
7712
7716
|
return this.httpService.post('api/prd/judicial/getJudicialUsersSearch', { searchString: searchTerm, serviceCode: serviceId });
|
|
@@ -16400,12 +16404,24 @@
|
|
|
16400
16404
|
}
|
|
16401
16405
|
};
|
|
16402
16406
|
WriteJudicialUserFieldComponent.prototype.setJurisdictionAndCaseType = function () {
|
|
16407
|
+
var _this = this;
|
|
16403
16408
|
var caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
16404
16409
|
if (caseInfoStr) {
|
|
16405
16410
|
var caseInfo = JSON.parse(caseInfoStr);
|
|
16406
16411
|
this.jurisdiction = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.jurisdiction;
|
|
16407
16412
|
this.caseType = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.caseType;
|
|
16408
16413
|
}
|
|
16414
|
+
else {
|
|
16415
|
+
// If there is no case info, attempt to get the current jurisdiction and case type via the JurisdictionService
|
|
16416
|
+
this.jurisdictionSubscription = this.jurisdictionService.selectedJurisdictionBS.subscribe(function (jurisdiction) {
|
|
16417
|
+
if (jurisdiction) {
|
|
16418
|
+
_this.jurisdiction = jurisdiction.id;
|
|
16419
|
+
if (jurisdiction.currentCaseType) {
|
|
16420
|
+
_this.caseType = jurisdiction.currentCaseType.id;
|
|
16421
|
+
}
|
|
16422
|
+
}
|
|
16423
|
+
});
|
|
16424
|
+
}
|
|
16409
16425
|
};
|
|
16410
16426
|
WriteJudicialUserFieldComponent.prototype.displayJudicialUser = function (judicialUser) {
|
|
16411
16427
|
return judicialUser
|
|
@@ -16451,6 +16467,10 @@
|
|
|
16451
16467
|
this.judicialUserControl.setValidators(i2$1.Validators.required);
|
|
16452
16468
|
}
|
|
16453
16469
|
};
|
|
16470
|
+
WriteJudicialUserFieldComponent.prototype.ngOnDestroy = function () {
|
|
16471
|
+
var _a;
|
|
16472
|
+
(_a = this.jurisdictionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
16473
|
+
};
|
|
16454
16474
|
return WriteJudicialUserFieldComponent;
|
|
16455
16475
|
}(WriteComplexFieldComponent));
|
|
16456
16476
|
WriteJudicialUserFieldComponent.ɵfac = function WriteJudicialUserFieldComponent_Factory(t) { return new (t || WriteJudicialUserFieldComponent)(i0__namespace.ɵɵdirectiveInject(JurisdictionService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe), i0__namespace.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
@@ -26880,13 +26900,13 @@
|
|
|
26880
26900
|
CaseFlagRefdataService,
|
|
26881
26901
|
YesNoService,
|
|
26882
26902
|
CollectionCreateCheckerService,
|
|
26903
|
+
JurisdictionService,
|
|
26883
26904
|
PaletteService,
|
|
26884
26905
|
FormValidatorsService,
|
|
26885
26906
|
FileUploadStateService,
|
|
26886
26907
|
FileUploadProgressGuard,
|
|
26887
26908
|
WindowService,
|
|
26888
26909
|
CommonDataService,
|
|
26889
|
-
JurisdictionService,
|
|
26890
26910
|
LinkedCasesService,
|
|
26891
26911
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
26892
26912
|
], imports: [[
|
|
@@ -27236,17 +27256,16 @@
|
|
|
27236
27256
|
CaseFlagRefdataService,
|
|
27237
27257
|
YesNoService,
|
|
27238
27258
|
CollectionCreateCheckerService,
|
|
27259
|
+
JurisdictionService,
|
|
27239
27260
|
PaletteService,
|
|
27240
27261
|
FormValidatorsService,
|
|
27241
27262
|
FileUploadStateService,
|
|
27242
27263
|
FileUploadProgressGuard,
|
|
27243
27264
|
WindowService,
|
|
27244
27265
|
CommonDataService,
|
|
27245
|
-
JurisdictionService,
|
|
27246
27266
|
LinkedCasesService,
|
|
27247
27267
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
27248
|
-
]
|
|
27249
|
-
entryComponents: [CaseFileViewFolderSelectorComponent]
|
|
27268
|
+
]
|
|
27250
27269
|
}]
|
|
27251
27270
|
}], null, null);
|
|
27252
27271
|
})();
|
|
@@ -28592,13 +28611,13 @@
|
|
|
28592
28611
|
i2$1.FormsModule,
|
|
28593
28612
|
i2$1.ReactiveFormsModule,
|
|
28594
28613
|
CaseEditDataModule,
|
|
28595
|
-
PaletteModule,
|
|
28596
28614
|
LabelSubstitutorModule,
|
|
28597
28615
|
ConditionalShowModule,
|
|
28598
28616
|
ErrorsModule,
|
|
28599
28617
|
i6$2.PortalModule,
|
|
28600
28618
|
LoadingSpinnerModule,
|
|
28601
28619
|
BannersModule,
|
|
28620
|
+
PaletteModule,
|
|
28602
28621
|
i1.RpxTranslationModule.forChild()
|
|
28603
28622
|
]] });
|
|
28604
28623
|
(function () {
|
|
@@ -28617,13 +28636,13 @@
|
|
|
28617
28636
|
i2$1.FormsModule,
|
|
28618
28637
|
i2$1.ReactiveFormsModule,
|
|
28619
28638
|
CaseEditDataModule,
|
|
28620
|
-
PaletteModule,
|
|
28621
28639
|
LabelSubstitutorModule,
|
|
28622
28640
|
ConditionalShowModule,
|
|
28623
28641
|
ErrorsModule,
|
|
28624
28642
|
i6$2.PortalModule,
|
|
28625
28643
|
LoadingSpinnerModule,
|
|
28626
|
-
BannersModule,
|
|
28644
|
+
BannersModule,
|
|
28645
|
+
PaletteModule, i1__namespace.RpxTranslationModule], exports: [CaseEditConfirmComponent,
|
|
28627
28646
|
CaseEditComponent,
|
|
28628
28647
|
CaseEditPageComponent,
|
|
28629
28648
|
CaseEditFormComponent,
|
|
@@ -28642,13 +28661,13 @@
|
|
|
28642
28661
|
i2$1.FormsModule,
|
|
28643
28662
|
i2$1.ReactiveFormsModule,
|
|
28644
28663
|
CaseEditDataModule,
|
|
28645
|
-
PaletteModule,
|
|
28646
28664
|
LabelSubstitutorModule,
|
|
28647
28665
|
ConditionalShowModule,
|
|
28648
28666
|
ErrorsModule,
|
|
28649
28667
|
i6$2.PortalModule,
|
|
28650
28668
|
LoadingSpinnerModule,
|
|
28651
28669
|
BannersModule,
|
|
28670
|
+
PaletteModule,
|
|
28652
28671
|
i1.RpxTranslationModule.forChild()
|
|
28653
28672
|
],
|
|
28654
28673
|
declarations: [
|
|
@@ -29796,6 +29815,7 @@
|
|
|
29796
29815
|
});
|
|
29797
29816
|
};
|
|
29798
29817
|
WorkbasketFiltersComponent.prototype.apply = function (init) {
|
|
29818
|
+
var _this = this;
|
|
29799
29819
|
// Save filters as query parameters for current route
|
|
29800
29820
|
var queryParams = {};
|
|
29801
29821
|
if (this.selected.jurisdiction) {
|
|
@@ -29827,9 +29847,20 @@
|
|
|
29827
29847
|
if (init) {
|
|
29828
29848
|
this.windowService.setLocalStorage(SAVED_QUERY_PARAM_LOC_STORAGE, JSON.stringify(queryParams));
|
|
29829
29849
|
if (Object.keys(this.formGroup.controls).length > 0) {
|
|
29850
|
+
// Find all "special case" JudicialUser FormControl keys and remove the corresponding values from the
|
|
29851
|
+
// FormGroup value because these values are not intended to be stored and subsequently passed as query string
|
|
29852
|
+
// parameters when calling searchCases API endpoint
|
|
29853
|
+
var judicialUserControlValuesToRemove = Object.keys(this.formGroup.controls).filter(function (key) { return key.endsWith('_judicialUserControl'); });
|
|
29854
|
+
judicialUserControlValuesToRemove.forEach(function (controlKey) { return delete _this.formGroup.value[controlKey]; });
|
|
29830
29855
|
this.windowService.setLocalStorage(FORM_GROUP_VAL_LOC_STORAGE, JSON.stringify(this.formGroup.value));
|
|
29831
29856
|
}
|
|
29832
29857
|
}
|
|
29858
|
+
// Announce selected jurisdiction via JurisdictionService
|
|
29859
|
+
if (this.selected.jurisdiction) {
|
|
29860
|
+
// Set the selected case type as the current case type of the selected jurisdiction
|
|
29861
|
+
this.selected.jurisdiction.currentCaseType = this.selected.caseType;
|
|
29862
|
+
this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
|
|
29863
|
+
}
|
|
29833
29864
|
// Apply filters
|
|
29834
29865
|
this.onApply.emit({ selected: this.selected, queryParams: queryParams });
|
|
29835
29866
|
this.setFocusToTop();
|
|
@@ -35412,10 +35443,11 @@
|
|
|
35412
35443
|
}
|
|
35413
35444
|
}
|
|
35414
35445
|
var CreateCaseFiltersComponent = /** @class */ (function () {
|
|
35415
|
-
function CreateCaseFiltersComponent(orderService, definitionsService, sessionStorageService) {
|
|
35446
|
+
function CreateCaseFiltersComponent(orderService, definitionsService, sessionStorageService, jurisdictionService) {
|
|
35416
35447
|
this.orderService = orderService;
|
|
35417
35448
|
this.definitionsService = definitionsService;
|
|
35418
35449
|
this.sessionStorageService = sessionStorageService;
|
|
35450
|
+
this.jurisdictionService = jurisdictionService;
|
|
35419
35451
|
this.selectionSubmitted = new i0.EventEmitter();
|
|
35420
35452
|
this.selectionChanged = new i0.EventEmitter();
|
|
35421
35453
|
this.formGroup = new i2$1.FormGroup({});
|
|
@@ -35469,6 +35501,8 @@
|
|
|
35469
35501
|
!this.isDisabled;
|
|
35470
35502
|
};
|
|
35471
35503
|
CreateCaseFiltersComponent.prototype.apply = function () {
|
|
35504
|
+
this.selected.jurisdiction.currentCaseType = this.selected.caseType;
|
|
35505
|
+
this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
|
|
35472
35506
|
this.selectionSubmitted.emit({
|
|
35473
35507
|
jurisdictionId: this.selected.jurisdiction.id,
|
|
35474
35508
|
caseTypeId: this.selected.caseType.id,
|
|
@@ -35552,7 +35586,7 @@
|
|
|
35552
35586
|
};
|
|
35553
35587
|
return CreateCaseFiltersComponent;
|
|
35554
35588
|
}());
|
|
35555
|
-
CreateCaseFiltersComponent.ɵfac = function CreateCaseFiltersComponent_Factory(t) { return new (t || CreateCaseFiltersComponent)(i0__namespace.ɵɵdirectiveInject(OrderService), i0__namespace.ɵɵdirectiveInject(DefinitionsService), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
35589
|
+
CreateCaseFiltersComponent.ɵfac = function CreateCaseFiltersComponent_Factory(t) { return new (t || CreateCaseFiltersComponent)(i0__namespace.ɵɵdirectiveInject(OrderService), i0__namespace.ɵɵdirectiveInject(DefinitionsService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(JurisdictionService)); };
|
|
35556
35590
|
CreateCaseFiltersComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CreateCaseFiltersComponent, selectors: [["ccd-create-case-filters"]], inputs: { isDisabled: "isDisabled", startButtonText: "startButtonText" }, outputs: { selectionSubmitted: "selectionSubmitted", selectionChanged: "selectionChanged" }, decls: 31, vars: 28, consts: [[3, "ngSubmit"], [1, "form-group"], ["for", "cc-jurisdiction", 1, "form-label"], ["id", "cc-jurisdiction", "name", "jurisdiction", 1, "form-control", "ccd-dropdown", 3, "formControl", "change"], ["value", ""], [3, "value", 4, "ngFor", "ngForOf"], ["for", "cc-case-type", 1, "form-label"], ["id", "cc-case-type", "name", "case-type", 1, "form-control", "ccd-dropdown", 3, "formControl", "change"], ["for", "cc-event", 1, "form-label"], ["id", "cc-event", "name", "event", 1, "form-control", "ccd-dropdown", 3, "formControl", "change"], ["type", "submit", 1, "button", 3, "disabled"], [3, "value"]], template: function CreateCaseFiltersComponent_Template(rf, ctx) {
|
|
35557
35591
|
if (rf & 1) {
|
|
35558
35592
|
i0__namespace.ɵɵelementStart(0, "form", 0);
|
|
@@ -35643,7 +35677,7 @@
|
|
|
35643
35677
|
selector: 'ccd-create-case-filters',
|
|
35644
35678
|
templateUrl: './create-case-filters.component.html'
|
|
35645
35679
|
}]
|
|
35646
|
-
}], function () { return [{ type: OrderService }, { type: DefinitionsService }, { type: SessionStorageService }]; }, { isDisabled: [{
|
|
35680
|
+
}], function () { return [{ type: OrderService }, { type: DefinitionsService }, { type: SessionStorageService }, { type: JurisdictionService }]; }, { isDisabled: [{
|
|
35647
35681
|
type: i0.Input
|
|
35648
35682
|
}], startButtonText: [{
|
|
35649
35683
|
type: i0.Input
|