@hmcts/ccd-case-ui-toolkit 7.3.3-exui-3824-rc1 → 7.3.3-exui-3740

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.
@@ -3931,7 +3931,7 @@ class FieldsUtils {
3931
3931
  // Handling of Dynamic Lists in Complex Types
3932
3932
  static SERVER_RESPONSE_FIELD_TYPE_COLLECTION = 'Collection';
3933
3933
  static SERVER_RESPONSE_FIELD_TYPE_COMPLEX = 'Complex';
3934
- static SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE = ['DynamicList', 'DynamicRadioList'];
3934
+ static SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
3935
3935
  static isValidDisplayContext(ctx) {
3936
3936
  return (ctx === 'MANDATORY' || ctx === 'READONLY'
3937
3937
  || ctx === 'OPTIONAL' || ctx === 'HIDDEN'
@@ -4178,9 +4178,12 @@ class FieldsUtils {
4178
4178
  if (dynamicListValue) {
4179
4179
  const list_items = dynamicListValue[0].list_items;
4180
4180
  const complexValue = dynamicListValue.map(data => data.value);
4181
+ const selectedValue = field.field_type.type === 'DynamicMultiSelectList'
4182
+ ? (complexValue[0] || [])
4183
+ : (complexValue.length > 0 ? complexValue : undefined);
4181
4184
  const value = {
4182
4185
  list_items,
4183
- value: complexValue.length > 0 ? complexValue : undefined
4186
+ value: selectedValue
4184
4187
  };
4185
4188
  field.value = {
4186
4189
  ...value
@@ -5099,15 +5102,10 @@ class FormValidatorsService {
5099
5102
  return validator;
5100
5103
  }
5101
5104
  static markDownPatternValidator() {
5102
- // Matches: [text](url), ![alt](url), <img ...>, <a ...>...</a>
5103
- const inlineMarkdownPattern = /(?:!?\[[^\]]{0,500}\]\([^)]{0,500}\)|<(?:img\b[^>]{0,500}>|a\b[^>]{0,500}>[\s\S]*?<\/a>))/i;
5104
- // Matches: [text][id], ![alt][id], and the collapsed form [text][]
5105
- const referenceBoxPattern = /(!)?\[((?:[^[\]\\]|\\.){0,500})\]\s*\[([^\]]{0,100})\]/;
5106
- // Matches: autolinks such as <http://example.com>
5107
- const autolinkPattern = /<(?:[A-Za-z][A-Za-z0-9+.-]*:[^ <>\n]*|[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+)>/;
5105
+ const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
5108
5106
  return (control) => {
5109
5107
  const value = control?.value?.toString().trim();
5110
- return (value && (inlineMarkdownPattern.test(value) || referenceBoxPattern.test(value) || this.matchesReferenceUrlDef(value) || autolinkPattern.test(value) || this.hasMultiBracket(value))) ? { markDownPattern: {} } : null;
5108
+ return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
5111
5109
  };
5112
5110
  }
5113
5111
  // TODO: Strip this out as it's only here for the moment because
@@ -5125,74 +5123,6 @@ class FormValidatorsService {
5125
5123
  }
5126
5124
  return control;
5127
5125
  }
5128
- // Check for multi-bracket markdown links and validate destination URL
5129
- static hasMultiBracket(value) {
5130
- // Sonar-friendly detector: opening-run + text + first closing ']'
5131
- const openingTextClosePattern = /\[{1,10}[^[\]\n]{1,60}\]/;
5132
- // Can add an additional RegEx for additional URL validation rules if needed here
5133
- let scanIndex = 0;
5134
- const totalLength = value.length;
5135
- while (scanIndex < totalLength) {
5136
- const seg = this.findOpeningTextClose(value, scanIndex, openingTextClosePattern);
5137
- if (!seg) {
5138
- return false; // no candidate -> no match
5139
- }
5140
- const runs = this.extendClosingRunAndRequireParen(value, seg.absStart, seg.afterFirstClose);
5141
- // if there is more than one opening '[' and there is at least a matching number of closing ']'
5142
- if (runs && runs.openingRunCount > 1 && runs.openingRunCount === runs.closingRunCount) {
5143
- // If there were additional validation rules, they would be applied here
5144
- return true;
5145
- }
5146
- // Advance to avoid stalling on overlaps
5147
- scanIndex = seg.absStart + 1;
5148
- }
5149
- return false;
5150
- }
5151
- // Find opening '[' run, text, and first closing ']'
5152
- static findOpeningTextClose(source, fromIndex, pattern) {
5153
- const slice = source.slice(fromIndex);
5154
- const match = pattern.exec(slice);
5155
- if (!match) {
5156
- return null;
5157
- }
5158
- const absStart = fromIndex + match.index;
5159
- const afterFirstClose = absStart + match[0].length; // index just after the first ']'
5160
- return { absStart, afterFirstClose };
5161
- }
5162
- // Count opening '[' run, extend the ']' run, and require '(' right after the full ']' run
5163
- static extendClosingRunAndRequireParen(source, absStart, afterFirstClose) {
5164
- const n = source.length;
5165
- // Count opening '[' run (e.g., '[[[')
5166
- let openingRunCount = 0;
5167
- for (let i = absStart; i < n && source[i] === '['; i++) {
5168
- openingRunCount++;
5169
- }
5170
- // Extend closing ']' run forward from the first one
5171
- let closingRunCount = 1;
5172
- let afterClosingRun = afterFirstClose;
5173
- while (afterClosingRun < n && source[afterClosingRun] === ']') {
5174
- closingRunCount++;
5175
- afterClosingRun++;
5176
- }
5177
- return { openingRunCount, closingRunCount, afterOpenParen: afterClosingRun + 1 };
5178
- }
5179
- static isValidReferenceUrlTitleTail(tail) {
5180
- const possibleTitle = tail.trim();
5181
- // Accept exactly one of: "title", 'title', (title) — bounded and single-line.
5182
- if (!possibleTitle || /^"[^"\r\n]{0,300}"$/.test(possibleTitle) || /^'[^'\r\n]{0,300}'$/.test(possibleTitle) || /^\([^)\r\n]{0,300}\)$/.test(possibleTitle)) {
5183
- return true;
5184
- }
5185
- return false;
5186
- }
5187
- static matchesReferenceUrlDef(line) {
5188
- // Single-line, pragmatic CommonMark-style reference definition e.g. [text]: http://example.com
5189
- const baseReferenceUrlPattern = /^[ \t]{0,3}\[([^\]]{1,100})\]:[ \t]*<?([^\s>]{1,2048})>?[ \t]*([^ \t\r\n].*)?$/m;
5190
- const mainRegEx = baseReferenceUrlPattern.exec(line);
5191
- if (!mainRegEx)
5192
- return false;
5193
- const tail = mainRegEx[3] ?? "";
5194
- return this.isValidReferenceUrlTitleTail(tail);
5195
- }
5196
5126
  static ɵfac = function FormValidatorsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormValidatorsService)(); };
5197
5127
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
5198
5128
  }
@@ -6072,6 +6002,9 @@ class FormValueService {
6072
6002
  else if ('CaseReference' === key) {
6073
6003
  sanitisedObject[key] = this.sanitiseValue(this.sanitiseCaseReference(String(rawObject[key])));
6074
6004
  }
6005
+ else if (key === 'servedOrderIds' && Array.isArray(rawObject[key])) {
6006
+ sanitisedObject[key] = this.wrapCollectionItems(rawObject[key]);
6007
+ }
6075
6008
  else {
6076
6009
  sanitisedObject[key] = this.sanitiseValue(rawObject[key]);
6077
6010
  if (Array.isArray(sanitisedObject[key])) {
@@ -6085,6 +6018,14 @@ class FormValueService {
6085
6018
  }
6086
6019
  return sanitisedObject;
6087
6020
  }
6021
+ wrapCollectionItems(entries) {
6022
+ return entries.map((entry) => {
6023
+ if (entry && typeof entry === 'object' && entry.value !== undefined) {
6024
+ return entry;
6025
+ }
6026
+ return { id: entry?.id, value: entry?.value ?? entry };
6027
+ });
6028
+ }
6088
6029
  sanitiseArray(rawArray) {
6089
6030
  if (!rawArray) {
6090
6031
  return rawArray;
@@ -6288,60 +6229,6 @@ class FormValueService {
6288
6229
  }
6289
6230
  }
6290
6231
  }
6291
- // exui-3582 When a form field becomes hidden based on user’s input in the event journey,
6292
- // its stored value must be cleared and it must not be submitted or persisted.
6293
- removeHiddenField(data, caseFields, clearNonCase, formControls) {
6294
- if (clearNonCase && data && caseFields && caseFields.length > 0) {
6295
- for (const field of caseFields) {
6296
- if (!FormValueService.isLabel(field) && FormValueService.isReadOnly(field)) {
6297
- // Retain anything that is readonly and not a label.
6298
- continue;
6299
- }
6300
- // Check if formControls[field.id] exists before accessing its properties
6301
- const caseField = formControls[field.id] ? formControls[field.id]['caseField'] : undefined;
6302
- if (caseField === undefined || field.hidden === true) {
6303
- continue;
6304
- }
6305
- const hasValue = data.hasOwnProperty(field.id) && data[field.id] != null &&
6306
- (typeof data[field.id] !== 'object' || Object.keys(data[field.id]).length > 0);
6307
- if (caseField?.hidden === true &&
6308
- field.display_context !== 'HIDDEN' &&
6309
- field.display_context !== 'HIDDEN_TEMP' &&
6310
- !field.retain_hidden_value &&
6311
- field.id !== 'caseLinks' &&
6312
- hasValue) {
6313
- data[field.id] = null;
6314
- continue; // If field is now hidden, skip checking its children
6315
- }
6316
- if (field.field_type) {
6317
- switch (field.field_type.type) {
6318
- case 'Complex':
6319
- const complexData = data[field.id] ?? data['value'];
6320
- if (complexData && formControls[field.id] && formControls[field.id]['controls']) {
6321
- this.removeHiddenField(complexData, field.field_type.complex_fields, clearNonCase, formControls[field.id]['controls']);
6322
- }
6323
- break;
6324
- case 'Collection':
6325
- const collection = data[field.id];
6326
- if (collection && Array.isArray(collection) && field.field_type.collection_field_type.type === 'Complex') {
6327
- collection.forEach((item, index) => {
6328
- if (formControls[field.id] && formControls[field.id]['controls'] && formControls[field.id]['controls'][index]) {
6329
- const itemControls = formControls[field.id]?.['controls']?.[index]?.['controls']?.['value'];
6330
- const collectionData = item['value'] ?? item;
6331
- if (collectionData && itemControls?.['controls']) {
6332
- this.removeHiddenField(collectionData, field.field_type.collection_field_type.complex_fields, clearNonCase, itemControls['controls']);
6333
- }
6334
- }
6335
- });
6336
- }
6337
- break;
6338
- default:
6339
- break;
6340
- }
6341
- }
6342
- }
6343
- }
6344
- }
6345
6232
  /**
6346
6233
  * Remove any empty collection fields where a value of greater than zero is specified in the field's {@link FieldType}
6347
6234
  * `min` attribute.
@@ -8822,7 +8709,6 @@ var EventCompletionTaskStates;
8822
8709
 
8823
8710
  const EVENT_COMPLETION_STATE_MACHINE = 'EVENT COMPLETION STATE MACHINE';
8824
8711
  class EventCompletionStateMachineService {
8825
- abstractConfig;
8826
8712
  stateCheckTasksCanBeCompleted;
8827
8713
  stateCompleteEventAndTask;
8828
8714
  stateCancelEvent;
@@ -8833,9 +8719,6 @@ class EventCompletionStateMachineService {
8833
8719
  stateTaskAssignToUser;
8834
8720
  stateTaskUnassigned;
8835
8721
  stateFinal;
8836
- constructor(abstractConfig) {
8837
- this.abstractConfig = abstractConfig;
8838
- }
8839
8722
  initialiseStateMachine(context) {
8840
8723
  return new StateMachine(EVENT_COMPLETION_STATE_MACHINE, context);
8841
8724
  }
@@ -8860,10 +8743,9 @@ class EventCompletionStateMachineService {
8860
8743
  this.addTransitionsForStateTaskAssignedToAnotherUser();
8861
8744
  this.addTransitionsForStateTaskUnassigned();
8862
8745
  }
8863
- entryActionForStateCheckTasksCanBeCompleted = (state, context) => {
8746
+ entryActionForStateCheckTasksCanBeCompleted(state, context) {
8864
8747
  const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8865
8748
  context.workAllocationService.getTask(context.task.id).subscribe(taskResponse => {
8866
- this.abstractConfig?.logMessage?.(`entryActionForStateCheckTasksCanBeCompleted: task_state ${taskResponse?.task?.task_state} for task id ${context?.task?.id}`);
8867
8749
  if (taskResponse?.task?.task_state) {
8868
8750
  switch (taskResponse.task.task_state.toUpperCase()) {
8869
8751
  case TaskState.Unassigned:
@@ -8902,30 +8784,27 @@ class EventCompletionStateMachineService {
8902
8784
  else if (!taskResponse?.task) {
8903
8785
  context.alertService.setPreserveAlerts(true);
8904
8786
  context.alertService.warning({ phrase: 'Task statecheck : no task available for completion', replacements: {} });
8905
- this.abstractConfig?.logMessage?.(`Task statecheck : no task available for completion`);
8906
8787
  }
8907
8788
  else {
8908
8789
  context.alertService.setPreserveAlerts(true);
8909
8790
  context.alertService.warning({ phrase: 'Task statecheck : no task state available for completion', replacements: {} });
8910
- this.abstractConfig?.logMessage?.(`Task statecheck : no task state available for completion`);
8911
8791
  }
8912
8792
  }, error => {
8913
8793
  context.alertService.error(error.message);
8914
8794
  return throwError(error);
8915
8795
  });
8916
- };
8796
+ }
8917
8797
  entryActionForStateTaskCompletedOrCancelled(state, context) {
8918
8798
  // Trigger final state to complete processing of state machine
8919
8799
  state.trigger(EventCompletionStates.Final);
8920
8800
  // Load case event completion task cancelled component
8921
8801
  context.component.setTaskState(EventCompletionTaskStates.TaskCancelled);
8922
8802
  }
8923
- entryActionForStateCompleteEventAndTask = (state, context) => {
8803
+ entryActionForStateCompleteEventAndTask(state, context) {
8924
8804
  // Trigger final state to complete processing of state machine
8925
8805
  state.trigger(EventCompletionStates.Final);
8926
8806
  const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
8927
8807
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8928
- this.abstractConfig?.logMessage?.(`entryActionForStateCompleteEventAndTask: userTask task_data ${JSON.stringify(userTask?.task_data?.id)}`);
8929
8808
  if (userTask?.task_data) {
8930
8809
  context.sessionStorageService.setItem('assignNeeded', 'false');
8931
8810
  // just set event can be completed
@@ -8937,7 +8816,7 @@ class EventCompletionStateMachineService {
8937
8816
  // Emit event cannot be completed event
8938
8817
  context.component.eventCanBeCompleted.emit(false);
8939
8818
  }
8940
- };
8819
+ }
8941
8820
  entryActionForStateTaskAssignedToAnotherUser(state, context) {
8942
8821
  // Trigger final state to complete processing of state machine
8943
8822
  state.trigger(EventCompletionStates.Final);
@@ -8991,12 +8870,12 @@ class EventCompletionStateMachineService {
8991
8870
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8992
8871
  return !!userTask.task_data;
8993
8872
  }
8994
- static ɵfac = function EventCompletionStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventCompletionStateMachineService)(i0.ɵɵinject(AbstractAppConfig)); };
8873
+ static ɵfac = function EventCompletionStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventCompletionStateMachineService)(); };
8995
8874
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
8996
8875
  }
8997
8876
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventCompletionStateMachineService, [{
8998
8877
  type: Injectable
8999
- }], () => [{ type: AbstractAppConfig }], null); })();
8878
+ }], null, null); })();
9000
8879
 
9001
8880
  class JudicialworkerService {
9002
8881
  http;
@@ -9327,27 +9206,6 @@ class ValidPageListCaseFieldsService {
9327
9206
  type: Injectable
9328
9207
  }], () => [{ type: FieldsUtils }], null); })();
9329
9208
 
9330
- function CaseEditComponent_div_1_Template(rf, ctx) { if (rf & 1) {
9331
- const _r1 = i0.ɵɵgetCurrentView();
9332
- i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h2", 3);
9333
- i0.ɵɵtext(3, "Page refreshed");
9334
- i0.ɵɵelementEnd();
9335
- i0.ɵɵelementStart(4, "p");
9336
- i0.ɵɵtext(5);
9337
- i0.ɵɵelementEnd();
9338
- i0.ɵɵelementStart(6, "p");
9339
- i0.ɵɵtext(7);
9340
- i0.ɵɵelementEnd();
9341
- i0.ɵɵelementStart(8, "button", 4);
9342
- i0.ɵɵlistener("click", function CaseEditComponent_div_1_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRefreshModalOk()); });
9343
- i0.ɵɵtext(9, "Ok");
9344
- i0.ɵɵelementEnd()()();
9345
- } if (rf & 2) {
9346
- i0.ɵɵadvance(5);
9347
- i0.ɵɵtextInterpolate("As the page has been refreshed mandatory data is now missing. You will be redirected to the first page of this event.");
9348
- i0.ɵɵadvance(2);
9349
- i0.ɵɵtextInterpolate("Please select Ok to continue.");
9350
- } }
9351
9209
  class CaseEditComponent {
9352
9210
  fb;
9353
9211
  caseNotifier;
@@ -9394,7 +9252,6 @@ class CaseEditComponent {
9394
9252
  error;
9395
9253
  callbackErrorsSubject = new Subject();
9396
9254
  validPageList = [];
9397
- isRefreshModalVisible = false;
9398
9255
  constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig, cookieService) {
9399
9256
  this.fb = fb;
9400
9257
  this.caseNotifier = caseNotifier;
@@ -9441,25 +9298,12 @@ class CaseEditComponent {
9441
9298
  checkPageRefresh() {
9442
9299
  if (this.isPageRefreshed && this.initialUrl) {
9443
9300
  this.sessionStorageService.removeItem('eventUrl');
9444
- this.isRefreshModalVisible = true;
9301
+ this.windowsService.alert(CaseEditComponent.ALERT_MESSAGE);
9445
9302
  this.router.navigate([this.initialUrl], { relativeTo: this.route });
9446
9303
  return true;
9447
9304
  }
9448
- // if the url contains /submit there is the potential that the user has gone straight to the submit page
9449
- // we should try and work out if they have been through the journey or not and prevent them submitting directly
9450
- if (this.router.url.includes('/submit') && !this.initialUrl) {
9451
- // we only want to check if the user has done this if there is a multi-page journey
9452
- if (this.eventTrigger.wizard_pages && this.eventTrigger.wizard_pages.length > 0) {
9453
- const firstPage = this.eventTrigger.wizard_pages.reduce((min, page) => page.order < min.order ? page : min, this.eventTrigger.wizard_pages[0]);
9454
- this.isRefreshModalVisible = true;
9455
- this.router.navigate([firstPage ? firstPage.id : 'submit'], { relativeTo: this.route });
9456
- }
9457
- }
9458
9305
  return false;
9459
9306
  }
9460
- onRefreshModalOk() {
9461
- this.isRefreshModalVisible = false;
9462
- }
9463
9307
  getPage(pageId) {
9464
9308
  return this.wizard.getPage(pageId, this.fieldsUtils.buildCanShowPredicate(this.eventTrigger, this.form));
9465
9309
  }
@@ -9552,7 +9396,7 @@ class CaseEditComponent {
9552
9396
  const userId = userInfo.id ? userInfo.id : userInfo.uid;
9553
9397
  const eventDetails = { eventId, caseId, userId, assignNeeded };
9554
9398
  if (this.taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails)) {
9555
- this.abstractConfig.logMessage(`task ${taskInSessionStorage?.id} exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9399
+ this.abstractConfig.logMessage(`task exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9556
9400
  // Show event completion component to perform event completion checks
9557
9401
  this.eventCompletionParams = ({
9558
9402
  caseId,
@@ -9572,7 +9416,6 @@ class CaseEditComponent {
9572
9416
  this.isEventCompletionChecksRequired = true;
9573
9417
  }
9574
9418
  else {
9575
- this.abstractConfig.logMessage(`task does not exist for caseId and eventId as ${caseId} ${eventId}`);
9576
9419
  // Task not in session storage, proceed to submit
9577
9420
  const caseEventData = this.generateCaseEventData({
9578
9421
  eventTrigger,
@@ -9615,11 +9458,6 @@ class CaseEditComponent {
9615
9458
  if (!this.isCaseFlagSubmission) {
9616
9459
  this.formValueService.removeUnnecessaryFields(caseEventData.data, pageListCaseFields, true, true);
9617
9460
  }
9618
- // removeHiddenFields while are hidden in the UI
9619
- // Only remove hidden fields if editForm and its controls are available
9620
- if (form?.controls?.['data']?.['controls']) {
9621
- this.formValueService.removeHiddenField(caseEventData.data, pageListCaseFields, true, form.controls['data']['controls']);
9622
- }
9623
9461
  caseEventData.event_token = eventTrigger.event_token;
9624
9462
  caseEventData.ignore_warning = this.ignoreWarning;
9625
9463
  if (this.confirmation) {
@@ -9742,13 +9580,11 @@ class CaseEditComponent {
9742
9580
  this.sessionStorageService.setItem('taskCompletionError', 'false');
9743
9581
  submit(caseEventData).pipe(switchMap((response) => {
9744
9582
  eventResponse = response;
9745
- this.abstractConfig.logMessage(`Event ${this.eventCompletionParams?.eventId} of case Id ${this.eventCompletionParams?.caseId} and taskId ${this.eventCompletionParams?.task?.id}`);
9746
9583
  return this.postCompleteTaskIfRequired();
9747
9584
  }), finalize(() => {
9748
9585
  this.loadingService.unregister(loadingSpinnerToken);
9749
9586
  // on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
9750
9587
  // Note - Not removeTaskFromClientContext because could interfere with other logic
9751
- this.abstractConfig.logMessage(`Clearing client context and task event completion info after event ${this.eventCompletionParams?.eventId} submission of case Id ${this.eventCompletionParams?.caseId} and task Id ${this.eventCompletionParams?.task?.id}`);
9752
9588
  this.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
9753
9589
  this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
9754
9590
  this.isSubmitting = false;
@@ -9756,7 +9592,6 @@ class CaseEditComponent {
9756
9592
  .subscribe(() => {
9757
9593
  this.finishEventCompletionLogic(eventResponse);
9758
9594
  }, error => {
9759
- this.abstractConfig.logMessage(`An error occurred while submission of event ${this.eventCompletionParams?.eventId} and case Id ${this.eventCompletionParams?.caseId} and taskId ${this.eventCompletionParams?.task?.id}`);
9760
9595
  if (!eventResponse) {
9761
9596
  // event submission error
9762
9597
  this.error = error;
@@ -9784,14 +9619,13 @@ class CaseEditComponent {
9784
9619
  const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9785
9620
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9786
9621
  if (task && assignNeeded && taskToBeCompleted) {
9787
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired with assignNeeded: taskId ${task.id} and event name ${this.eventTrigger?.name}`);
9622
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired with assignNeeded: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9788
9623
  return this.workAllocationService.assignAndCompleteTask(task.id, this.eventTrigger.name);
9789
9624
  }
9790
9625
  else if (task && taskToBeCompleted) {
9791
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger?.name}`);
9626
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9792
9627
  return this.workAllocationService.completeTask(task.id, this.eventTrigger.name);
9793
9628
  }
9794
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired: no task to complete for event name ${this.eventTrigger?.name} and caseId ${this.caseDetails?.case_id}`);
9795
9629
  return of(true);
9796
9630
  }
9797
9631
  finishEventCompletionLogic(eventResponse) {
@@ -9890,17 +9724,13 @@ class CaseEditComponent {
9890
9724
  return task.case_id === eventDetails.caseId && (task.description?.includes(eventDetails.eventId));
9891
9725
  }
9892
9726
  static ɵfac = function CaseEditComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.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), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ReadCookieService)); };
9893
- static ɵ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" }, standalone: false, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 2, vars: 1, consts: [["class", "refresh-modal-backdrop", 4, "ngIf"], [1, "refresh-modal-backdrop"], [1, "refresh-modal"], [1, "heading-h2"], [1, "button", 3, "click"]], template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9727
+ static ɵ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" }, standalone: false, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9894
9728
  i0.ɵɵelement(0, "router-outlet");
9895
- i0.ɵɵtemplate(1, CaseEditComponent_div_1_Template, 10, 2, "div", 0);
9896
- } if (rf & 2) {
9897
- i0.ɵɵadvance();
9898
- i0.ɵɵproperty("ngIf", ctx.isRefreshModalVisible);
9899
- } }, dependencies: [i5.NgIf, 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%}.refresh-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal[_ngcontent-%COMP%]{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-top:12px}"] });
9729
+ } }, 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%}"] });
9900
9730
  }
9901
9731
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
9902
9732
  type: Component,
9903
- args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], standalone: false, template: "<router-outlet></router-outlet>\n<!-- Simple centered modal shown on refresh -->\n<div *ngIf=\"isRefreshModalVisible\" class=\"refresh-modal-backdrop\">\n <div class=\"refresh-modal\">\n <h2 class=\"heading-h2\">Page refreshed</h2>\n <p>{{ 'As the page has been refreshed mandatory data is now missing. You will be redirected to the first page of this event.' }}</p>\n <p>{{ 'Please select Ok to continue.' }}</p>\n <button class=\"button\" (click)=\"onRefreshModalOk()\">Ok</button>\n </div>\n</div>", 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%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
9733
+ args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], standalone: false, 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"] }]
9904
9734
  }], () => [{ type: i4.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 }, { type: AbstractAppConfig }, { type: ReadCookieService }], { eventTrigger: [{
9905
9735
  type: Input
9906
9736
  }], submit: [{
@@ -10478,11 +10308,11 @@ class CaseEditConfirmComponent {
10478
10308
  i0.ɵɵproperty("ngIf", ctx.confirmation.getBody());
10479
10309
  i0.ɵɵadvance(2);
10480
10310
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 10, ctx.triggerText));
10481
- } }, 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%}.refresh-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal[_ngcontent-%COMP%]{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-top:12px}"] });
10311
+ } }, 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%}"] });
10482
10312
  }
10483
10313
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditConfirmComponent, [{
10484
10314
  type: Component,
10485
- args: [{ standalone: false, template: "<!-- Current Page && Event trigger name -->\n<h1 class=\"heading-h1\">{{ eventTrigger.name | rpxTranslate}}</h1>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<form [formGroup]=\"formGroup\" (submit)=\"submit()\">\n <div id=\"confirmation-header\" *ngIf=\"confirmation.getHeader()\">\n <ccd-markdown [content]=\"confirmation.getHeader() | rpxTranslate\"></ccd-markdown>\n </div>\n <div id=\"confirmation-body\" *ngIf=\"confirmation.getBody()\">\n <ccd-markdown [content]=\"confirmation.getBody() | rpxTranslate\"></ccd-markdown>\n </div>\n <button type=\"submit\" class=\"button\" data-ng-click=\"submit()\">{{triggerText | rpxTranslate}}</button>\n</form>\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%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
10315
+ args: [{ standalone: false, template: "<!-- Current Page && Event trigger name -->\n<h1 class=\"heading-h1\">{{ eventTrigger.name | rpxTranslate}}</h1>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<form [formGroup]=\"formGroup\" (submit)=\"submit()\">\n <div id=\"confirmation-header\" *ngIf=\"confirmation.getHeader()\">\n <ccd-markdown [content]=\"confirmation.getHeader() | rpxTranslate\"></ccd-markdown>\n </div>\n <div id=\"confirmation-body\" *ngIf=\"confirmation.getBody()\">\n <ccd-markdown [content]=\"confirmation.getBody() | rpxTranslate\"></ccd-markdown>\n </div>\n <button type=\"submit\" class=\"button\" data-ng-click=\"submit()\">{{triggerText | rpxTranslate}}</button>\n</form>\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"] }]
10486
10316
  }], () => [{ type: CaseEditComponent }, { type: i1$1.Router }], null); })();
10487
10317
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditConfirmComponent, { className: "CaseEditConfirmComponent", filePath: "lib/shared/components/case-editor/case-edit-confirm/case-edit-confirm.component.ts", lineNumber: 16 }); })();
10488
10318
 
@@ -11764,11 +11594,6 @@ class CaseEditPageComponent {
11764
11594
  this.validPageListCaseFieldsService.deleteNonValidatedFields(this.caseEdit.validPageList, caseEventData.data, this.eventTrigger.case_fields, fromPreviousPage, this.editForm.controls['data'].value);
11765
11595
  // Tidy it up before we return it.
11766
11596
  this.formValueService.removeUnnecessaryFields(caseEventData.data, caseFields, clearEmpty, clearNonCase, fromPreviousPage, this.currentPage.case_fields);
11767
- // removeHiddenFields while are hidden in the UI
11768
- // Only remove hidden fields if editForm and its controls are available
11769
- if (this.editForm?.controls?.['data']?.['controls']) {
11770
- this.formValueService.removeHiddenField(caseEventData.data, caseFields, clearNonCase, this.editForm.controls['data']['controls']);
11771
- }
11772
11597
  return caseEventData;
11773
11598
  }
11774
11599
  syncCaseEditDataService() {
@@ -30322,7 +30147,7 @@ class ReadFieldsFilterPipe {
30322
30147
  else if (field.show_condition) {
30323
30148
  let cond;
30324
30149
  if (fieldId && field.show_condition.indexOf(`${fieldId}.`) > -1 && !formGroupAvailable && !!Object.keys(formValue).length) {
30325
- const search = `/.*${fieldId}./`;
30150
+ const search = `${fieldId}.`;
30326
30151
  const searchRegExp = new RegExp(search, 'g');
30327
30152
  const replaceWith = '';
30328
30153
  cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));
@@ -32378,11 +32203,11 @@ class CaseEditSubmitComponent {
32378
32203
  i0.ɵɵclassProp("disabled", ctx.caseEdit.isSubmitting);
32379
32204
  i0.ɵɵadvance();
32380
32205
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(24, 22, ctx.getCancelText()));
32381
- } }, 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%}.refresh-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal[_ngcontent-%COMP%]{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-top:12px}"] });
32206
+ } }, 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%}"] });
32382
32207
  }
32383
32208
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
32384
32209
  type: Component,
32385
- args: [{ selector: 'ccd-case-edit-submit', standalone: false, template: "<div>\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content text-16\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id); $event.preventDefault()\"\n href=\"#\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n </div>\n <ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n </ccd-case-event-completion>\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel(); $event.preventDefault()\" href=\"#\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n\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%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
32210
+ args: [{ selector: 'ccd-case-edit-submit', standalone: false, template: "<div>\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content text-16\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id); $event.preventDefault()\"\n href=\"#\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n </div>\n <ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n </ccd-case-event-completion>\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel(); $event.preventDefault()\" href=\"#\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n\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"] }]
32386
32211
  }], () => [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: MultipageComponentStateService }, { type: FormValidatorsService }, { type: CaseFlagStateService }, { type: LinkedCasesService }], null); })();
32387
32212
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditSubmitComponent, { className: "CaseEditSubmitComponent", filePath: "lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.ts", lineNumber: 31 }); })();
32388
32213
 
@@ -32564,11 +32389,11 @@ class CaseEditGenericErrorsComponent {
32564
32389
  i0.ɵɵproperty("ngIf", ctx.error && (!(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details) && !ctx.error.message));
32565
32390
  i0.ɵɵadvance();
32566
32391
  i0.ɵɵproperty("ngIf", ctx.error && (ctx.error.details || ctx.error.message));
32567
- } }, dependencies: [i5.NgForOf, i5.NgIf], 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%}.refresh-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal[_ngcontent-%COMP%]{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-top:12px}"] });
32392
+ } }, dependencies: [i5.NgForOf, i5.NgIf], 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%}"] });
32568
32393
  }
32569
32394
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditGenericErrorsComponent, [{
32570
32395
  type: Component,
32571
- args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n Something went wrong\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>We're working to fix the problem. Try again shortly.</p>\n <p><a href=\"get-help\" target=\"_blank\">Contact us</a> if you're still having problems.</p>\n </div>\n </div>\n <!-- Event error heading and error message to be displayed if there are specific error details -->\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\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%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
32396
+ args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n Something went wrong\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>We're working to fix the problem. Try again shortly.</p>\n <p><a href=\"get-help\" target=\"_blank\">Contact us</a> if you're still having problems.</p>\n </div>\n </div>\n <!-- Event error heading and error message to be displayed if there are specific error details -->\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\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"] }]
32572
32397
  }], null, { error: [{
32573
32398
  type: Input
32574
32399
  }] }); })();
@@ -34922,10 +34747,8 @@ class EventTriggerResolver {
34922
34747
  this.alertService.setPreserveAlerts(true);
34923
34748
  this.alertService.error(error.message);
34924
34749
  this.errorNotifier.announceError(error);
34925
- if (!this.router.url?.includes('/cases/case-details/')) {
34926
- caseTypeId = route.parent.paramMap.get('caseType');
34927
- this.router.navigate([`/cases/case-details/${jurisdiction}/${caseType}/${cid}/tasks`]);
34928
- }
34750
+ caseTypeId = route.parent.paramMap.get('caseType');
34751
+ this.router.navigate([`/cases/case-details/${jurisdiction}/${caseType}/${cid}/tasks`]);
34929
34752
  return throwError(error);
34930
34753
  })).toPromise();
34931
34754
  }
@@ -37139,7 +36962,6 @@ class EventStartGuard {
37139
36962
  }
37140
36963
  }
37141
36964
  checkForTasks(payload, caseId, eventId, taskId, userId) {
37142
- this.abstractConfig.logMessage(`checkForTasks: for caseId ${caseId} and eventId ${eventId} and taskId ${taskId} and userId ${userId}`);
37143
36965
  if (taskId && payload?.tasks?.length > 0) {
37144
36966
  const task = payload.tasks.find((t) => t.id == taskId);
37145
36967
  if (task) {
@@ -37188,7 +37010,6 @@ class EventStartGuard {
37188
37010
  };
37189
37011
  this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
37190
37012
  this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
37191
- this.abstractConfig.logMessage(`EventStartGuard:setClientContextStorage: set task ${task?.id} in client context for caseId ${caseId} and eventId ${eventId}`);
37192
37013
  }
37193
37014
  static ɵfac = function EventStartGuard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(ReadCookieService), i0.ɵɵinject(CaseNotifier)); };
37194
37015
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
@@ -37215,7 +37036,6 @@ var EventStartStates;
37215
37036
 
37216
37037
  const EVENT_STATE_MACHINE = 'EVENT STATE MACHINE';
37217
37038
  class EventStartStateMachineService {
37218
- abstractConfig;
37219
37039
  stateCheckForMatchingTasks;
37220
37040
  stateNoTask;
37221
37041
  stateOneTask;
@@ -37225,9 +37045,6 @@ class EventStartStateMachineService {
37225
37045
  stateMultipleTasksAssignedToUser;
37226
37046
  stateTaskUnassigned;
37227
37047
  stateFinal;
37228
- constructor(abstractConfig) {
37229
- this.abstractConfig = abstractConfig;
37230
- }
37231
37048
  initialiseStateMachine(context) {
37232
37049
  return new StateMachine(EVENT_STATE_MACHINE, context);
37233
37050
  }
@@ -37332,7 +37149,7 @@ class EventStartStateMachineService {
37332
37149
  // Navigate
37333
37150
  context.router.navigate([`${navigationURL}`], { queryParams: theQueryParams, relativeTo: context.route });
37334
37151
  }
37335
- entryActionForStateOneTaskAssignedToUser = (state, context) => {
37152
+ entryActionForStateOneTaskAssignedToUser(state, context) {
37336
37153
  // Trigger final state to complete processing of state machine
37337
37154
  state.trigger(EventStartStates.FINAL);
37338
37155
  // Get task assigned to user
@@ -37341,7 +37158,6 @@ class EventStartStateMachineService {
37341
37158
  task = context.tasks[0];
37342
37159
  }
37343
37160
  const taskStr = JSON.stringify(task);
37344
- this.abstractConfig?.logMessage?.(`entryActionForStateOneTaskAssignedToUser: task_state ${task?.task_state} for task id ${task?.id}`);
37345
37161
  console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
37346
37162
  // Store task to session
37347
37163
  const currentLanguage = context.cookieService.getCookie('exui-preferred-language');
@@ -37374,7 +37190,7 @@ class EventStartStateMachineService {
37374
37190
  context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
37375
37191
  // Allow user to perform the event
37376
37192
  context.router.navigate([`/cases/case-details/${task.jurisdiction}/${task.case_type_id}/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
37377
- };
37193
+ }
37378
37194
  entryActionForStateMultipleTasksAssignedToUser(state, context) {
37379
37195
  // Trigger final state to complete processing of state machine
37380
37196
  state.trigger(EventStartStates.FINAL);
@@ -37413,12 +37229,12 @@ class EventStartStateMachineService {
37413
37229
  addTransitionsForStateMultipleTasksAssignedToUser() {
37414
37230
  this.stateMultipleTasksAssignedToUser.addTransition(EventStartStates.FINAL, this.stateFinal);
37415
37231
  }
37416
- static ɵfac = function EventStartStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartStateMachineService)(i0.ɵɵinject(AbstractAppConfig)); };
37232
+ static ɵfac = function EventStartStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartStateMachineService)(); };
37417
37233
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartStateMachineService, factory: EventStartStateMachineService.ɵfac });
37418
37234
  }
37419
37235
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartStateMachineService, [{
37420
37236
  type: Injectable
37421
- }], () => [{ type: AbstractAppConfig }], null); })();
37237
+ }], null, null); })();
37422
37238
 
37423
37239
  class EventStartComponent {
37424
37240
  service;
@@ -37426,16 +37242,14 @@ class EventStartComponent {
37426
37242
  route;
37427
37243
  sessionStorageService;
37428
37244
  cookieService;
37429
- abstractConfig;
37430
37245
  stateMachine;
37431
37246
  context;
37432
- constructor(service, router, route, sessionStorageService, cookieService, abstractConfig) {
37247
+ constructor(service, router, route, sessionStorageService, cookieService) {
37433
37248
  this.service = service;
37434
37249
  this.router = router;
37435
37250
  this.route = route;
37436
37251
  this.sessionStorageService = sessionStorageService;
37437
37252
  this.cookieService = cookieService;
37438
- this.abstractConfig = abstractConfig;
37439
37253
  }
37440
37254
  ngOnInit() {
37441
37255
  // Get task and case id payload from route data
@@ -37455,7 +37269,7 @@ class EventStartComponent {
37455
37269
  cookieService: this.cookieService
37456
37270
  };
37457
37271
  // Initialise state machine
37458
- this.service = new EventStartStateMachineService(this.abstractConfig);
37272
+ this.service = new EventStartStateMachineService();
37459
37273
  this.stateMachine = this.service.initialiseStateMachine(this.context);
37460
37274
  // Create states
37461
37275
  this.service.createStates(this.stateMachine);
@@ -37464,14 +37278,14 @@ class EventStartComponent {
37464
37278
  // Start state machine
37465
37279
  this.service.startStateMachine(this.stateMachine);
37466
37280
  }
37467
- static ɵfac = function EventStartComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartComponent)(i0.ɵɵdirectiveInject(EventStartStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(ReadCookieService), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
37281
+ static ɵfac = function EventStartComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartComponent)(i0.ɵɵdirectiveInject(EventStartStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(ReadCookieService)); };
37468
37282
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventStartComponent, selectors: [["ccd-event-start"]], standalone: false, decls: 0, vars: 0, template: function EventStartComponent_Template(rf, ctx) { }, encapsulation: 2 });
37469
37283
  }
37470
37284
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartComponent, [{
37471
37285
  type: Component,
37472
37286
  args: [{ selector: 'ccd-event-start', standalone: false, template: "" }]
37473
- }], () => [{ type: EventStartStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: ReadCookieService }, { type: AbstractAppConfig }], null); })();
37474
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventStartComponent, { className: "EventStartComponent", filePath: "lib/shared/components/event-start/event-start.component.ts", lineNumber: 16 }); })();
37287
+ }], () => [{ type: EventStartStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: ReadCookieService }], null); })();
37288
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventStartComponent, { className: "EventStartComponent", filePath: "lib/shared/components/event-start/event-start.component.ts", lineNumber: 15 }); })();
37475
37289
 
37476
37290
  class EventTasksResolverService {
37477
37291
  service;