@hmcts/ccd-case-ui-toolkit 7.3.2-exui-3824-rc1 → 7.3.2-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
  }
@@ -6288,60 +6218,6 @@ class FormValueService {
6288
6218
  }
6289
6219
  }
6290
6220
  }
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
6221
  /**
6346
6222
  * Remove any empty collection fields where a value of greater than zero is specified in the field's {@link FieldType}
6347
6223
  * `min` attribute.
@@ -8822,7 +8698,6 @@ var EventCompletionTaskStates;
8822
8698
 
8823
8699
  const EVENT_COMPLETION_STATE_MACHINE = 'EVENT COMPLETION STATE MACHINE';
8824
8700
  class EventCompletionStateMachineService {
8825
- abstractConfig;
8826
8701
  stateCheckTasksCanBeCompleted;
8827
8702
  stateCompleteEventAndTask;
8828
8703
  stateCancelEvent;
@@ -8833,9 +8708,6 @@ class EventCompletionStateMachineService {
8833
8708
  stateTaskAssignToUser;
8834
8709
  stateTaskUnassigned;
8835
8710
  stateFinal;
8836
- constructor(abstractConfig) {
8837
- this.abstractConfig = abstractConfig;
8838
- }
8839
8711
  initialiseStateMachine(context) {
8840
8712
  return new StateMachine(EVENT_COMPLETION_STATE_MACHINE, context);
8841
8713
  }
@@ -8860,10 +8732,9 @@ class EventCompletionStateMachineService {
8860
8732
  this.addTransitionsForStateTaskAssignedToAnotherUser();
8861
8733
  this.addTransitionsForStateTaskUnassigned();
8862
8734
  }
8863
- entryActionForStateCheckTasksCanBeCompleted = (state, context) => {
8735
+ entryActionForStateCheckTasksCanBeCompleted(state, context) {
8864
8736
  const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8865
8737
  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
8738
  if (taskResponse?.task?.task_state) {
8868
8739
  switch (taskResponse.task.task_state.toUpperCase()) {
8869
8740
  case TaskState.Unassigned:
@@ -8902,30 +8773,27 @@ class EventCompletionStateMachineService {
8902
8773
  else if (!taskResponse?.task) {
8903
8774
  context.alertService.setPreserveAlerts(true);
8904
8775
  context.alertService.warning({ phrase: 'Task statecheck : no task available for completion', replacements: {} });
8905
- this.abstractConfig?.logMessage?.(`Task statecheck : no task available for completion`);
8906
8776
  }
8907
8777
  else {
8908
8778
  context.alertService.setPreserveAlerts(true);
8909
8779
  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
8780
  }
8912
8781
  }, error => {
8913
8782
  context.alertService.error(error.message);
8914
8783
  return throwError(error);
8915
8784
  });
8916
- };
8785
+ }
8917
8786
  entryActionForStateTaskCompletedOrCancelled(state, context) {
8918
8787
  // Trigger final state to complete processing of state machine
8919
8788
  state.trigger(EventCompletionStates.Final);
8920
8789
  // Load case event completion task cancelled component
8921
8790
  context.component.setTaskState(EventCompletionTaskStates.TaskCancelled);
8922
8791
  }
8923
- entryActionForStateCompleteEventAndTask = (state, context) => {
8792
+ entryActionForStateCompleteEventAndTask(state, context) {
8924
8793
  // Trigger final state to complete processing of state machine
8925
8794
  state.trigger(EventCompletionStates.Final);
8926
8795
  const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
8927
8796
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8928
- this.abstractConfig?.logMessage?.(`entryActionForStateCompleteEventAndTask: userTask task_data ${JSON.stringify(userTask?.task_data?.id)}`);
8929
8797
  if (userTask?.task_data) {
8930
8798
  context.sessionStorageService.setItem('assignNeeded', 'false');
8931
8799
  // just set event can be completed
@@ -8937,7 +8805,7 @@ class EventCompletionStateMachineService {
8937
8805
  // Emit event cannot be completed event
8938
8806
  context.component.eventCanBeCompleted.emit(false);
8939
8807
  }
8940
- };
8808
+ }
8941
8809
  entryActionForStateTaskAssignedToAnotherUser(state, context) {
8942
8810
  // Trigger final state to complete processing of state machine
8943
8811
  state.trigger(EventCompletionStates.Final);
@@ -8991,12 +8859,12 @@ class EventCompletionStateMachineService {
8991
8859
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8992
8860
  return !!userTask.task_data;
8993
8861
  }
8994
- static ɵfac = function EventCompletionStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventCompletionStateMachineService)(i0.ɵɵinject(AbstractAppConfig)); };
8862
+ static ɵfac = function EventCompletionStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventCompletionStateMachineService)(); };
8995
8863
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
8996
8864
  }
8997
8865
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventCompletionStateMachineService, [{
8998
8866
  type: Injectable
8999
- }], () => [{ type: AbstractAppConfig }], null); })();
8867
+ }], null, null); })();
9000
8868
 
9001
8869
  class JudicialworkerService {
9002
8870
  http;
@@ -9327,27 +9195,6 @@ class ValidPageListCaseFieldsService {
9327
9195
  type: Injectable
9328
9196
  }], () => [{ type: FieldsUtils }], null); })();
9329
9197
 
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
9198
  class CaseEditComponent {
9352
9199
  fb;
9353
9200
  caseNotifier;
@@ -9394,7 +9241,6 @@ class CaseEditComponent {
9394
9241
  error;
9395
9242
  callbackErrorsSubject = new Subject();
9396
9243
  validPageList = [];
9397
- isRefreshModalVisible = false;
9398
9244
  constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig, cookieService) {
9399
9245
  this.fb = fb;
9400
9246
  this.caseNotifier = caseNotifier;
@@ -9441,25 +9287,12 @@ class CaseEditComponent {
9441
9287
  checkPageRefresh() {
9442
9288
  if (this.isPageRefreshed && this.initialUrl) {
9443
9289
  this.sessionStorageService.removeItem('eventUrl');
9444
- this.isRefreshModalVisible = true;
9290
+ this.windowsService.alert(CaseEditComponent.ALERT_MESSAGE);
9445
9291
  this.router.navigate([this.initialUrl], { relativeTo: this.route });
9446
9292
  return true;
9447
9293
  }
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
9294
  return false;
9459
9295
  }
9460
- onRefreshModalOk() {
9461
- this.isRefreshModalVisible = false;
9462
- }
9463
9296
  getPage(pageId) {
9464
9297
  return this.wizard.getPage(pageId, this.fieldsUtils.buildCanShowPredicate(this.eventTrigger, this.form));
9465
9298
  }
@@ -9552,7 +9385,7 @@ class CaseEditComponent {
9552
9385
  const userId = userInfo.id ? userInfo.id : userInfo.uid;
9553
9386
  const eventDetails = { eventId, caseId, userId, assignNeeded };
9554
9387
  if (this.taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails)) {
9555
- this.abstractConfig.logMessage(`task ${taskInSessionStorage?.id} exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9388
+ this.abstractConfig.logMessage(`task exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9556
9389
  // Show event completion component to perform event completion checks
9557
9390
  this.eventCompletionParams = ({
9558
9391
  caseId,
@@ -9572,7 +9405,6 @@ class CaseEditComponent {
9572
9405
  this.isEventCompletionChecksRequired = true;
9573
9406
  }
9574
9407
  else {
9575
- this.abstractConfig.logMessage(`task does not exist for caseId and eventId as ${caseId} ${eventId}`);
9576
9408
  // Task not in session storage, proceed to submit
9577
9409
  const caseEventData = this.generateCaseEventData({
9578
9410
  eventTrigger,
@@ -9615,11 +9447,6 @@ class CaseEditComponent {
9615
9447
  if (!this.isCaseFlagSubmission) {
9616
9448
  this.formValueService.removeUnnecessaryFields(caseEventData.data, pageListCaseFields, true, true);
9617
9449
  }
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
9450
  caseEventData.event_token = eventTrigger.event_token;
9624
9451
  caseEventData.ignore_warning = this.ignoreWarning;
9625
9452
  if (this.confirmation) {
@@ -9742,13 +9569,11 @@ class CaseEditComponent {
9742
9569
  this.sessionStorageService.setItem('taskCompletionError', 'false');
9743
9570
  submit(caseEventData).pipe(switchMap((response) => {
9744
9571
  eventResponse = response;
9745
- this.abstractConfig.logMessage(`Event ${this.eventCompletionParams?.eventId} of case Id ${this.eventCompletionParams?.caseId} and taskId ${this.eventCompletionParams?.task?.id}`);
9746
9572
  return this.postCompleteTaskIfRequired();
9747
9573
  }), finalize(() => {
9748
9574
  this.loadingService.unregister(loadingSpinnerToken);
9749
9575
  // on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
9750
9576
  // 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
9577
  this.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
9753
9578
  this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
9754
9579
  this.isSubmitting = false;
@@ -9756,7 +9581,6 @@ class CaseEditComponent {
9756
9581
  .subscribe(() => {
9757
9582
  this.finishEventCompletionLogic(eventResponse);
9758
9583
  }, 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
9584
  if (!eventResponse) {
9761
9585
  // event submission error
9762
9586
  this.error = error;
@@ -9784,14 +9608,13 @@ class CaseEditComponent {
9784
9608
  const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9785
9609
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9786
9610
  if (task && assignNeeded && taskToBeCompleted) {
9787
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired with assignNeeded: taskId ${task.id} and event name ${this.eventTrigger?.name}`);
9611
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired with assignNeeded: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9788
9612
  return this.workAllocationService.assignAndCompleteTask(task.id, this.eventTrigger.name);
9789
9613
  }
9790
9614
  else if (task && taskToBeCompleted) {
9791
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger?.name}`);
9615
+ this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger.name}`);
9792
9616
  return this.workAllocationService.completeTask(task.id, this.eventTrigger.name);
9793
9617
  }
9794
- this.abstractConfig.logMessage(`postCompleteTaskIfRequired: no task to complete for event name ${this.eventTrigger?.name} and caseId ${this.caseDetails?.case_id}`);
9795
9618
  return of(true);
9796
9619
  }
9797
9620
  finishEventCompletionLogic(eventResponse) {
@@ -9890,17 +9713,13 @@ class CaseEditComponent {
9890
9713
  return task.case_id === eventDetails.caseId && (task.description?.includes(eventDetails.eventId));
9891
9714
  }
9892
9715
  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) {
9716
+ 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
9717
  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}"] });
9718
+ } }, 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
9719
  }
9901
9720
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
9902
9721
  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"] }]
9722
+ 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
9723
  }], () => [{ 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
9724
  type: Input
9906
9725
  }], submit: [{
@@ -10478,11 +10297,11 @@ class CaseEditConfirmComponent {
10478
10297
  i0.ɵɵproperty("ngIf", ctx.confirmation.getBody());
10479
10298
  i0.ɵɵadvance(2);
10480
10299
  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}"] });
10300
+ } }, 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
10301
  }
10483
10302
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditConfirmComponent, [{
10484
10303
  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"] }]
10304
+ 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
10305
  }], () => [{ type: CaseEditComponent }, { type: i1$1.Router }], null); })();
10487
10306
  (() => { (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
10307
 
@@ -11764,11 +11583,6 @@ class CaseEditPageComponent {
11764
11583
  this.validPageListCaseFieldsService.deleteNonValidatedFields(this.caseEdit.validPageList, caseEventData.data, this.eventTrigger.case_fields, fromPreviousPage, this.editForm.controls['data'].value);
11765
11584
  // Tidy it up before we return it.
11766
11585
  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
11586
  return caseEventData;
11773
11587
  }
11774
11588
  syncCaseEditDataService() {
@@ -30322,7 +30136,7 @@ class ReadFieldsFilterPipe {
30322
30136
  else if (field.show_condition) {
30323
30137
  let cond;
30324
30138
  if (fieldId && field.show_condition.indexOf(`${fieldId}.`) > -1 && !formGroupAvailable && !!Object.keys(formValue).length) {
30325
- const search = `/.*${fieldId}./`;
30139
+ const search = `${fieldId}.`;
30326
30140
  const searchRegExp = new RegExp(search, 'g');
30327
30141
  const replaceWith = '';
30328
30142
  cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));
@@ -32378,11 +32192,11 @@ class CaseEditSubmitComponent {
32378
32192
  i0.ɵɵclassProp("disabled", ctx.caseEdit.isSubmitting);
32379
32193
  i0.ɵɵadvance();
32380
32194
  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}"] });
32195
+ } }, 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
32196
  }
32383
32197
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
32384
32198
  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"] }]
32199
+ 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
32200
  }], () => [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: MultipageComponentStateService }, { type: FormValidatorsService }, { type: CaseFlagStateService }, { type: LinkedCasesService }], null); })();
32387
32201
  (() => { (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
32202
 
@@ -32564,11 +32378,11 @@ class CaseEditGenericErrorsComponent {
32564
32378
  i0.ɵɵproperty("ngIf", ctx.error && (!(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details) && !ctx.error.message));
32565
32379
  i0.ɵɵadvance();
32566
32380
  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}"] });
32381
+ } }, 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
32382
  }
32569
32383
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditGenericErrorsComponent, [{
32570
32384
  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"] }]
32385
+ 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
32386
  }], null, { error: [{
32573
32387
  type: Input
32574
32388
  }] }); })();
@@ -34922,10 +34736,8 @@ class EventTriggerResolver {
34922
34736
  this.alertService.setPreserveAlerts(true);
34923
34737
  this.alertService.error(error.message);
34924
34738
  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
- }
34739
+ caseTypeId = route.parent.paramMap.get('caseType');
34740
+ this.router.navigate([`/cases/case-details/${jurisdiction}/${caseType}/${cid}/tasks`]);
34929
34741
  return throwError(error);
34930
34742
  })).toPromise();
34931
34743
  }
@@ -37139,7 +36951,6 @@ class EventStartGuard {
37139
36951
  }
37140
36952
  }
37141
36953
  checkForTasks(payload, caseId, eventId, taskId, userId) {
37142
- this.abstractConfig.logMessage(`checkForTasks: for caseId ${caseId} and eventId ${eventId} and taskId ${taskId} and userId ${userId}`);
37143
36954
  if (taskId && payload?.tasks?.length > 0) {
37144
36955
  const task = payload.tasks.find((t) => t.id == taskId);
37145
36956
  if (task) {
@@ -37188,7 +36999,6 @@ class EventStartGuard {
37188
36999
  };
37189
37000
  this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
37190
37001
  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
37002
  }
37193
37003
  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
37004
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
@@ -37215,7 +37025,6 @@ var EventStartStates;
37215
37025
 
37216
37026
  const EVENT_STATE_MACHINE = 'EVENT STATE MACHINE';
37217
37027
  class EventStartStateMachineService {
37218
- abstractConfig;
37219
37028
  stateCheckForMatchingTasks;
37220
37029
  stateNoTask;
37221
37030
  stateOneTask;
@@ -37225,9 +37034,6 @@ class EventStartStateMachineService {
37225
37034
  stateMultipleTasksAssignedToUser;
37226
37035
  stateTaskUnassigned;
37227
37036
  stateFinal;
37228
- constructor(abstractConfig) {
37229
- this.abstractConfig = abstractConfig;
37230
- }
37231
37037
  initialiseStateMachine(context) {
37232
37038
  return new StateMachine(EVENT_STATE_MACHINE, context);
37233
37039
  }
@@ -37332,7 +37138,7 @@ class EventStartStateMachineService {
37332
37138
  // Navigate
37333
37139
  context.router.navigate([`${navigationURL}`], { queryParams: theQueryParams, relativeTo: context.route });
37334
37140
  }
37335
- entryActionForStateOneTaskAssignedToUser = (state, context) => {
37141
+ entryActionForStateOneTaskAssignedToUser(state, context) {
37336
37142
  // Trigger final state to complete processing of state machine
37337
37143
  state.trigger(EventStartStates.FINAL);
37338
37144
  // Get task assigned to user
@@ -37341,7 +37147,6 @@ class EventStartStateMachineService {
37341
37147
  task = context.tasks[0];
37342
37148
  }
37343
37149
  const taskStr = JSON.stringify(task);
37344
- this.abstractConfig?.logMessage?.(`entryActionForStateOneTaskAssignedToUser: task_state ${task?.task_state} for task id ${task?.id}`);
37345
37150
  console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
37346
37151
  // Store task to session
37347
37152
  const currentLanguage = context.cookieService.getCookie('exui-preferred-language');
@@ -37374,7 +37179,7 @@ class EventStartStateMachineService {
37374
37179
  context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
37375
37180
  // Allow user to perform the event
37376
37181
  context.router.navigate([`/cases/case-details/${task.jurisdiction}/${task.case_type_id}/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
37377
- };
37182
+ }
37378
37183
  entryActionForStateMultipleTasksAssignedToUser(state, context) {
37379
37184
  // Trigger final state to complete processing of state machine
37380
37185
  state.trigger(EventStartStates.FINAL);
@@ -37413,12 +37218,12 @@ class EventStartStateMachineService {
37413
37218
  addTransitionsForStateMultipleTasksAssignedToUser() {
37414
37219
  this.stateMultipleTasksAssignedToUser.addTransition(EventStartStates.FINAL, this.stateFinal);
37415
37220
  }
37416
- static ɵfac = function EventStartStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartStateMachineService)(i0.ɵɵinject(AbstractAppConfig)); };
37221
+ static ɵfac = function EventStartStateMachineService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || EventStartStateMachineService)(); };
37417
37222
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartStateMachineService, factory: EventStartStateMachineService.ɵfac });
37418
37223
  }
37419
37224
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartStateMachineService, [{
37420
37225
  type: Injectable
37421
- }], () => [{ type: AbstractAppConfig }], null); })();
37226
+ }], null, null); })();
37422
37227
 
37423
37228
  class EventStartComponent {
37424
37229
  service;
@@ -37426,16 +37231,14 @@ class EventStartComponent {
37426
37231
  route;
37427
37232
  sessionStorageService;
37428
37233
  cookieService;
37429
- abstractConfig;
37430
37234
  stateMachine;
37431
37235
  context;
37432
- constructor(service, router, route, sessionStorageService, cookieService, abstractConfig) {
37236
+ constructor(service, router, route, sessionStorageService, cookieService) {
37433
37237
  this.service = service;
37434
37238
  this.router = router;
37435
37239
  this.route = route;
37436
37240
  this.sessionStorageService = sessionStorageService;
37437
37241
  this.cookieService = cookieService;
37438
- this.abstractConfig = abstractConfig;
37439
37242
  }
37440
37243
  ngOnInit() {
37441
37244
  // Get task and case id payload from route data
@@ -37455,7 +37258,7 @@ class EventStartComponent {
37455
37258
  cookieService: this.cookieService
37456
37259
  };
37457
37260
  // Initialise state machine
37458
- this.service = new EventStartStateMachineService(this.abstractConfig);
37261
+ this.service = new EventStartStateMachineService();
37459
37262
  this.stateMachine = this.service.initialiseStateMachine(this.context);
37460
37263
  // Create states
37461
37264
  this.service.createStates(this.stateMachine);
@@ -37464,14 +37267,14 @@ class EventStartComponent {
37464
37267
  // Start state machine
37465
37268
  this.service.startStateMachine(this.stateMachine);
37466
37269
  }
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)); };
37270
+ 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
37271
  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
37272
  }
37470
37273
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartComponent, [{
37471
37274
  type: Component,
37472
37275
  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 }); })();
37276
+ }], () => [{ type: EventStartStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: ReadCookieService }], null); })();
37277
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventStartComponent, { className: "EventStartComponent", filePath: "lib/shared/components/event-start/event-start.component.ts", lineNumber: 15 }); })();
37475
37278
 
37476
37279
  class EventTasksResolverService {
37477
37280
  service;