@hmcts/ccd-case-ui-toolkit 7.3.54-exui-3229 → 7.3.54-exui-2837-1

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
  }
@@ -4033,6 +4034,16 @@ class FieldsUtils {
4033
4034
  }
4034
4035
  return obj;
4035
4036
  }
4037
+ static buildFieldId(fieldId, elementPath, dataType) {
4038
+ if (!fieldId || !elementPath) {
4039
+ return fieldId;
4040
+ }
4041
+ const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
4042
+ if (normalizedType === 'collection') {
4043
+ return `${fieldId}.value.${elementPath}`;
4044
+ }
4045
+ return `${fieldId}.${elementPath}`;
4046
+ }
4036
4047
  static toValuesMap(caseFields) {
4037
4048
  const valueMap = {};
4038
4049
  caseFields.forEach(field => {
@@ -8876,14 +8887,9 @@ class CaseEditWizardGuard {
8876
8887
  }
8877
8888
  goToFirst(wizard, canShowPredicate, route) {
8878
8889
  const firstPage = wizard.firstPage(canShowPredicate);
8879
- // This route transition is an internal wizard redirect used to append the first page id to the URL.
8880
- // Mark it in navigation state so EventStartGuard can skip duplicate work allocation checks.
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
- });
8890
+ // If there’s no specific wizard page called, it makes another navigation to either the first page available or to the submit page
8891
+ // TODO should find a way to navigate to target page without going through the whole loop (and make a second call to BE) again
8892
+ return this.router.navigate([...this.parentUrlSegments(route), firstPage ? firstPage.id : 'submit'], { queryParams: route.queryParams });
8887
8893
  }
8888
8894
  goToSubmit(route) {
8889
8895
  return this.router.navigate([...this.parentUrlSegments(route), 'submit'], { queryParams: route.queryParams });
@@ -10106,7 +10112,6 @@ class CaseEditComponent {
10106
10112
  }] }); })();
10107
10113
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 39 }); })();
10108
10114
 
10109
- const EVENT_START_FIRST_PAGE_REDIRECT = 'eventStartFirstPageRedirect';
10110
10115
  function convertNonASCIICharacter(character) {
10111
10116
  if (character === '£') {
10112
10117
  // pound sign will be frequently used and works for btoa despite being non-ASCII
@@ -34502,9 +34507,7 @@ class WorkbasketFiltersComponent {
34502
34507
  .sort(this.orderService.sortAsc);
34503
34508
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
34504
34509
  workbasketInputs.forEach(item => {
34505
- if (item.field.elementPath) {
34506
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
34507
- }
34510
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
34508
34511
  item.field.label = item.label;
34509
34512
  if (formValue) {
34510
34513
  const searchFormValueObject = JSON.parse(formValue);
@@ -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
- constructor(label, order, field, metadata, display_context_parameter) {
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
- if (item.field.elementPath) {
40281
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
40282
- }
40278
+ item.field.id = FieldsUtils.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];