@hmcts/ccd-case-ui-toolkit 7.3.54-exui-3229 → 7.3.54-exui-2837
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.
|
@@ -3985,6 +3985,7 @@ class WorkbasketInputModel {
|
|
|
3985
3985
|
label;
|
|
3986
3986
|
order;
|
|
3987
3987
|
field;
|
|
3988
|
+
dataType;
|
|
3988
3989
|
metadata;
|
|
3989
3990
|
display_context_parameter;
|
|
3990
3991
|
}
|
|
@@ -8876,14 +8877,9 @@ class CaseEditWizardGuard {
|
|
|
8876
8877
|
}
|
|
8877
8878
|
goToFirst(wizard, canShowPredicate, route) {
|
|
8878
8879
|
const firstPage = wizard.firstPage(canShowPredicate);
|
|
8879
|
-
//
|
|
8880
|
-
//
|
|
8881
|
-
return this.router.navigate([...this.parentUrlSegments(route), firstPage ? firstPage.id : 'submit'], {
|
|
8882
|
-
queryParams: route.queryParams,
|
|
8883
|
-
state: {
|
|
8884
|
-
[EVENT_START_FIRST_PAGE_REDIRECT]: true
|
|
8885
|
-
}
|
|
8886
|
-
});
|
|
8880
|
+
// If there’s no specific wizard page called, it makes another navigation to either the first page available or to the submit page
|
|
8881
|
+
// TODO should find a way to navigate to target page without going through the whole loop (and make a second call to BE) again
|
|
8882
|
+
return this.router.navigate([...this.parentUrlSegments(route), firstPage ? firstPage.id : 'submit'], { queryParams: route.queryParams });
|
|
8887
8883
|
}
|
|
8888
8884
|
goToSubmit(route) {
|
|
8889
8885
|
return this.router.navigate([...this.parentUrlSegments(route), 'submit'], { queryParams: route.queryParams });
|
|
@@ -10106,7 +10102,6 @@ class CaseEditComponent {
|
|
|
10106
10102
|
}] }); })();
|
|
10107
10103
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 39 }); })();
|
|
10108
10104
|
|
|
10109
|
-
const EVENT_START_FIRST_PAGE_REDIRECT = 'eventStartFirstPageRedirect';
|
|
10110
10105
|
function convertNonASCIICharacter(character) {
|
|
10111
10106
|
if (character === '£') {
|
|
10112
10107
|
// pound sign will be frequently used and works for btoa despite being non-ASCII
|
|
@@ -34502,9 +34497,7 @@ class WorkbasketFiltersComponent {
|
|
|
34502
34497
|
.sort(this.orderService.sortAsc);
|
|
34503
34498
|
const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
34504
34499
|
workbasketInputs.forEach(item => {
|
|
34505
|
-
|
|
34506
|
-
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
34507
|
-
}
|
|
34500
|
+
item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
|
|
34508
34501
|
item.field.label = item.label;
|
|
34509
34502
|
if (formValue) {
|
|
34510
34503
|
const searchFormValueObject = JSON.parse(formValue);
|
|
@@ -34653,6 +34646,16 @@ class WorkbasketFiltersComponent {
|
|
|
34653
34646
|
this.caseFields = this.workbasketInputs.map(item => FieldsUtils.convertToCaseField(item.field));
|
|
34654
34647
|
}
|
|
34655
34648
|
}
|
|
34649
|
+
buildFieldId(fieldId, elementPath, dataType) {
|
|
34650
|
+
if (!fieldId || !elementPath) {
|
|
34651
|
+
return fieldId;
|
|
34652
|
+
}
|
|
34653
|
+
const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
|
|
34654
|
+
if (normalizedType === 'collection') {
|
|
34655
|
+
return `${fieldId}.value.${elementPath}`;
|
|
34656
|
+
}
|
|
34657
|
+
return `${fieldId}.${elementPath}`;
|
|
34658
|
+
}
|
|
34656
34659
|
static ɵfac = function WorkbasketFiltersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WorkbasketFiltersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(WorkbasketInputFilterService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(JurisdictionService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(WindowService)); };
|
|
34657
34660
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WorkbasketFiltersComponent, selectors: [["ccd-workbasket-filters"]], inputs: { jurisdictions: "jurisdictions", defaults: "defaults" }, outputs: { onApply: "onApply", onReset: "onReset" }, standalone: false, decls: 45, vars: 55, consts: [["id", "filters", 1, "global-display"], [1, "form-group", "flex"], ["aria-label", "Filters", 1, "heading-h2"], ["type", "button", 1, "button", "workbasket-filters-apply", 3, "click", "disabled", "title"], ["type", "button", 1, "button", "button-secondary", 3, "click", "title"], [1, "form-group"], ["for", "wb-jurisdiction", 1, "form-label"], ["id", "wb-jurisdiction", "name", "jurisdiction", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], ["for", "wb-case-type", 1, "form-label"], ["id", "wb-case-type", "name", "case-type", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel", "disabled"], ["for", "wb-case-state", 1, "form-label"], ["id", "wb-case-state", "name", "state", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "ngModel", "disabled"], [3, "ngValue"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields", 4, "ngIf"], ["type", "button", 1, "button", 3, "click", "title"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields"], ["id", "dynamicFilters"], ["class", "form-group", 4, "ngFor", "ngForOf"], [3, "keyup.enter", "caseField", "formGroup", "isExpanded", "isInSearchBlock"]], template: function WorkbasketFiltersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
34658
34661
|
i0.ɵɵelementStart(0, "form", 0)(1, "div", 1)(2, "fieldset", 2);
|
|
@@ -37878,10 +37881,6 @@ class EventStartGuard {
|
|
|
37878
37881
|
}
|
|
37879
37882
|
}
|
|
37880
37883
|
return caseDataObservable.pipe(switchMap(() => {
|
|
37881
|
-
if (this.shouldSkipDuplicateWorkAllocationCall()) {
|
|
37882
|
-
this.abstractConfig.logMessage(`EventStartGuard: skipping duplicate work allocation call for caseId ${caseId} and eventId ${eventId}`);
|
|
37883
|
-
return of(true);
|
|
37884
|
-
}
|
|
37885
37884
|
if (this.jurisdiction && this.caseType) {
|
|
37886
37885
|
if (this.caseId === caseId) {
|
|
37887
37886
|
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, this.caseType, this.jurisdiction)
|
|
@@ -37895,9 +37894,6 @@ class EventStartGuard {
|
|
|
37895
37894
|
return of(false);
|
|
37896
37895
|
}));
|
|
37897
37896
|
}
|
|
37898
|
-
shouldSkipDuplicateWorkAllocationCall() {
|
|
37899
|
-
return this.router.getCurrentNavigation()?.extras?.state?.[EVENT_START_FIRST_PAGE_REDIRECT] === true;
|
|
37900
|
-
}
|
|
37901
37897
|
checkTaskInEventNotRequired(payload, caseId, taskId, eventId, userId) {
|
|
37902
37898
|
if (!payload || !payload.tasks) {
|
|
37903
37899
|
return true;
|
|
@@ -40074,12 +40070,14 @@ class SearchInput {
|
|
|
40074
40070
|
field;
|
|
40075
40071
|
metadata;
|
|
40076
40072
|
display_context_parameter;
|
|
40077
|
-
|
|
40073
|
+
dataType;
|
|
40074
|
+
constructor(label, order, field, metadata, display_context_parameter, dataType) {
|
|
40078
40075
|
this.label = label;
|
|
40079
40076
|
this.order = order;
|
|
40080
40077
|
this.field = field;
|
|
40081
40078
|
this.metadata = metadata;
|
|
40082
40079
|
this.display_context_parameter = display_context_parameter;
|
|
40080
|
+
this.dataType = dataType;
|
|
40083
40081
|
}
|
|
40084
40082
|
}
|
|
40085
40083
|
|
|
@@ -40277,9 +40275,7 @@ class SearchFiltersComponent {
|
|
|
40277
40275
|
formValueObject = JSON.parse(formValue);
|
|
40278
40276
|
}
|
|
40279
40277
|
searchInputs.forEach(item => {
|
|
40280
|
-
|
|
40281
|
-
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
40282
|
-
}
|
|
40278
|
+
item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
|
|
40283
40279
|
item.field.label = item.label;
|
|
40284
40280
|
if (formValueObject) {
|
|
40285
40281
|
item.field.value = formValueObject[item.field.id];
|
|
@@ -40341,6 +40337,16 @@ class SearchFiltersComponent {
|
|
|
40341
40337
|
this.caseFields = this.searchInputs.map(item => FieldsUtils.convertToCaseField(item.field));
|
|
40342
40338
|
}
|
|
40343
40339
|
}
|
|
40340
|
+
buildFieldId(fieldId, elementPath, dataType) {
|
|
40341
|
+
if (!fieldId || !elementPath) {
|
|
40342
|
+
return fieldId;
|
|
40343
|
+
}
|
|
40344
|
+
const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
|
|
40345
|
+
if (normalizedType === 'collection') {
|
|
40346
|
+
return `${fieldId}.value.${elementPath}`;
|
|
40347
|
+
}
|
|
40348
|
+
return `${fieldId}.${elementPath}`;
|
|
40349
|
+
}
|
|
40344
40350
|
static ɵfac = function SearchFiltersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchFiltersComponent)(i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(JurisdictionService), i0.ɵɵdirectiveInject(WindowService)); };
|
|
40345
40351
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchFiltersComponent, selectors: [["ccd-search-filters"]], inputs: { jurisdictions: "jurisdictions", autoApply: "autoApply" }, outputs: { onApply: "onApply", onReset: "onReset", onJurisdiction: "onJurisdiction" }, standalone: false, decls: 28, vars: 34, consts: [["aria-label", "Filters", 1, "heading-h2"], [1, "global-display"], [1, "form-group", 2, "margin-top", "13px"], ["for", "s-jurisdiction", 1, "form-label"], ["id", "s-jurisdiction", "name", "jurisdiction", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel"], [3, "ngValue", 4, "ngFor", "ngForOf"], [1, "form-group"], ["for", "s-case-type", 1, "form-label"], ["id", "s-case-type", "name", "case-type", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "disabled", "ngModel"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields", 4, "ngIf"], ["type", "button", 1, "button", 3, "click", "keyup.enter", "disabled", "title"], ["id", "reset", "type", "button", 1, "button", "button-secondary", 3, "click", "title"], [3, "ngValue"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields"], ["id", "dynamicFilters"], ["class", "form-group", 4, "ngFor", "ngForOf"], [3, "keyup.enter", "caseField", "formGroup", "isExpanded"]], template: function SearchFiltersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
40346
40352
|
i0.ɵɵelementStart(0, "h2", 0);
|