@hmcts/ccd-case-ui-toolkit 7.1.4-query-management → 7.1.5-query-management

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.
Files changed (56) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +60 -22
  2. package/esm2022/lib/shared/components/case-editor/case-editor.module.mjs +1 -1
  3. package/esm2022/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.mjs +40 -28
  4. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.mjs +18 -17
  5. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +27 -37
  6. package/esm2022/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.mjs +1 -1
  7. package/esm2022/lib/shared/components/case-editor/domain/event-completion-task-states.model.mjs +6 -0
  8. package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +12 -6
  9. package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +1 -1
  10. package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +40 -7
  11. package/esm2022/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.mjs +11 -4
  12. package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +15 -1
  13. package/esm2022/lib/shared/components/palette/palette.module.mjs +6 -2
  14. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +169 -145
  15. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +2 -2
  16. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +2 -2
  17. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +6 -6
  18. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +5 -8
  19. package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
  20. package/esm2022/lib/shared/domain/work-allocation/task-response.model.mjs +1 -1
  21. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +440 -309
  22. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  23. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +5 -2
  24. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  25. package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
  26. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts +5 -3
  27. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  28. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts +7 -5
  29. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts.map +1 -1
  30. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +7 -11
  31. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  32. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts +1 -1
  33. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts.map +1 -1
  34. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts +5 -0
  35. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts.map +1 -0
  36. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  37. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts +2 -2
  38. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  39. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +3 -1
  40. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  41. package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts +3 -1
  42. package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts.map +1 -1
  43. package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
  44. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +10 -8
  45. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  46. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
  47. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
  48. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
  49. package/lib/shared/domain/work-allocation/Task.d.ts +10 -1
  50. package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
  51. package/lib/shared/domain/work-allocation/task-response.model.d.ts +1 -1
  52. package/lib/shared/domain/work-allocation/task-response.model.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/esm2022/lib/shared/components/case-editor/domain/event-completion-portal-types.model.mjs +0 -6
  55. package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts +0 -5
  56. package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, HostListener, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, ViewChild, HostListener, Injector, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
3
  import * as i5 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, AsyncPipe, CurrencyPipe, formatDate } from '@angular/common';
5
5
  import * as i1 from 'rpx-xui-translation';
@@ -24,7 +24,6 @@ import { StateMachine } from '@edium/fsm';
24
24
  import * as i1$3 from '@angular/material/legacy-dialog';
25
25
  import { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule } from '@angular/material/legacy-dialog';
26
26
  import { MatDialogConfig } from '@angular/material/dialog';
27
- import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
28
27
  import * as i2 from '@nicky-lenaers/ngx-scroll-to';
29
28
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
30
29
  import * as marked from 'marked';
@@ -36,6 +35,7 @@ import * as i6 from '@angular/material/legacy-core';
36
35
  import { MAT_LEGACY_DATE_LOCALE } from '@angular/material/legacy-core';
37
36
  import * as i3 from '@hmcts/ccpay-web-component';
38
37
  import { PaymentLibModule } from '@hmcts/ccpay-web-component';
38
+ import { v4 } from 'uuid';
39
39
  import * as i2$2 from '@angular/cdk/overlay';
40
40
  import { OverlayModule } from '@angular/cdk/overlay';
41
41
  import * as i7 from '@angular/cdk/tree';
@@ -52,6 +52,7 @@ import * as i15 from '@angular/material/legacy-input';
52
52
  import { MatLegacyInputModule } from '@angular/material/legacy-input';
53
53
  import * as i14 from '@hmcts/media-viewer';
54
54
  import { MediaViewerModule } from '@hmcts/media-viewer';
55
+ import { PortalModule } from '@angular/cdk/portal';
55
56
  import * as i2$3 from 'ngx-pagination';
56
57
  import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
57
58
  import * as i10 from '@angular/material/legacy-tabs';
@@ -8712,11 +8713,11 @@ var TaskState;
8712
8713
  TaskState["PendingReConfiguration"] = "PENDING_RECONFIGURATION";
8713
8714
  })(TaskState || (TaskState = {}));
8714
8715
 
8715
- var EventCompletionPortalTypes;
8716
- (function (EventCompletionPortalTypes) {
8717
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskCancelled"] = 0] = "TaskCancelled";
8718
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskReassigned"] = 1] = "TaskReassigned";
8719
- })(EventCompletionPortalTypes || (EventCompletionPortalTypes = {}));
8716
+ var EventCompletionTaskStates;
8717
+ (function (EventCompletionTaskStates) {
8718
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskCancelled"] = 0] = "TaskCancelled";
8719
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskReassigned"] = 1] = "TaskReassigned";
8720
+ })(EventCompletionTaskStates || (EventCompletionTaskStates = {}));
8720
8721
 
8721
8722
  const EVENT_COMPLETION_STATE_MACHINE = 'EVENT COMPLETION STATE MACHINE';
8722
8723
  class EventCompletionStateMachineService {
@@ -8755,7 +8756,8 @@ class EventCompletionStateMachineService {
8755
8756
  this.addTransitionsForStateTaskUnassigned();
8756
8757
  }
8757
8758
  entryActionForStateCheckTasksCanBeCompleted(state, context) {
8758
- context.workAllocationService.getTask(context?.task?.id).subscribe(taskResponse => {
8759
+ const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8760
+ context.workAllocationService.getTask(context.task.id).subscribe(taskResponse => {
8759
8761
  if (taskResponse && taskResponse.task && taskResponse.task.task_state) {
8760
8762
  switch (taskResponse.task.task_state.toUpperCase()) {
8761
8763
  case TaskState.Unassigned:
@@ -8774,6 +8776,11 @@ class EventCompletionStateMachineService {
8774
8776
  // Task still assigned to current user, complete event and task
8775
8777
  state.trigger(EventCompletionStates.CompleteEventAndTask);
8776
8778
  }
8779
+ else if (assignNeeded === 'true - override') {
8780
+ // this will treat task as unassigned instead of reassigned to complete after user confirmation
8781
+ // assignNeeded will also be immediately overwritten to true
8782
+ state.trigger(EventCompletionStates.TaskUnassigned);
8783
+ }
8777
8784
  else {
8778
8785
  // Task has been reassigned to another user, display error message
8779
8786
  context.reassignedTask = taskResponse.task;
@@ -8795,7 +8802,7 @@ class EventCompletionStateMachineService {
8795
8802
  // Trigger final state to complete processing of state machine
8796
8803
  state.trigger(EventCompletionStates.Final);
8797
8804
  // Load case event completion task cancelled component
8798
- context.component.showPortal(EventCompletionPortalTypes.TaskCancelled);
8805
+ context.component.setTaskState(EventCompletionTaskStates.TaskCancelled);
8799
8806
  }
8800
8807
  entryActionForStateCompleteEventAndTask(state, context) {
8801
8808
  // Trigger final state to complete processing of state machine
@@ -8816,7 +8823,7 @@ class EventCompletionStateMachineService {
8816
8823
  // Trigger final state to complete processing of state machine
8817
8824
  state.trigger(EventCompletionStates.Final);
8818
8825
  // Load case event completion task reassigned component
8819
- context.component.showPortal(EventCompletionPortalTypes.TaskReassigned);
8826
+ context.component.setTaskState(EventCompletionTaskStates.TaskReassigned);
8820
8827
  }
8821
8828
  entryActionForStateTaskUnassigned(state, context) {
8822
8829
  // Trigger final state to complete processing of state machine
@@ -9381,15 +9388,22 @@ class CaseEditComponent {
9381
9388
  const clientContextStr = this.sessionStorageService.getItem('clientContext');
9382
9389
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9383
9390
  const taskInSessionStorage = userTask ? userTask.task_data : null;
9384
- let taskEventInSessionStorage;
9385
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9386
- const taskEventStr = this.sessionStorageService.getItem('taskEvent');
9387
- if (taskEventStr) {
9388
- taskEventInSessionStorage = JSON.parse(taskEventStr);
9391
+ let taskEventCompletionInfo;
9392
+ let userInfo;
9393
+ const taskEventCompletionStr = this.sessionStorageService.getItem('taskEventCompletionInfo');
9394
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
9395
+ const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
9396
+ if (taskEventCompletionStr) {
9397
+ taskEventCompletionInfo = JSON.parse(taskEventCompletionStr);
9398
+ }
9399
+ if (userInfoStr) {
9400
+ userInfo = JSON.parse(userInfoStr);
9389
9401
  }
9390
9402
  const eventId = this.getEventId(form);
9391
9403
  const caseId = this.getCaseId(caseDetails);
9392
- if (this.taskExistsForThisEventAndCase(taskInSessionStorage, taskEventInSessionStorage, eventId, caseId)) {
9404
+ const userId = userInfo.id ? userInfo.id : userInfo.uid;
9405
+ const eventDetails = { eventId, caseId, userId, assignNeeded };
9406
+ if (this.taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails)) {
9393
9407
  this.abstractConfig.logMessage(`task exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9394
9408
  // Show event completion component to perform event completion checks
9395
9409
  this.eventCompletionParams = ({
@@ -9397,9 +9411,16 @@ class CaseEditComponent {
9397
9411
  eventId,
9398
9412
  task: taskInSessionStorage
9399
9413
  });
9400
- // add taskEvent to link current event with task id
9401
- const taskEvent = { eventId, taskId: taskInSessionStorage.id };
9402
- this.sessionStorageService.setItem('taskEvent', JSON.stringify(taskEvent));
9414
+ // add taskEventCompletionInfo again to ensure link current event with task id
9415
+ // note: previous usage was created here so this is to ensure correct functionality continues
9416
+ const taskEventCompletionInfo = {
9417
+ caseId,
9418
+ eventId,
9419
+ userId,
9420
+ taskId: taskInSessionStorage.id,
9421
+ createdTimestamp: Date.now()
9422
+ };
9423
+ this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
9403
9424
  this.isEventCompletionChecksRequired = true;
9404
9425
  }
9405
9426
  else {
@@ -9564,9 +9585,9 @@ class CaseEditComponent {
9564
9585
  return this.postCompleteTaskIfRequired();
9565
9586
  }), finalize(() => {
9566
9587
  this.loadingService.unregister(loadingSpinnerToken);
9567
- // on event completion ensure the previous event taskToComplete/taskEvent removed
9568
- this.sessionStorageService.removeItem('taskToComplete');
9569
- this.sessionStorageService.removeItem('taskEvent');
9588
+ // on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
9589
+ this.sessionStorageService.removeItem('clientContext');
9590
+ this.sessionStorageService.removeItem('taskEventCompletionInfo');
9570
9591
  this.isSubmitting = false;
9571
9592
  }))
9572
9593
  .subscribe(() => {
@@ -9627,22 +9648,32 @@ class CaseEditComponent {
9627
9648
  return null;
9628
9649
  }
9629
9650
  }
9630
- // checks whether current taskToComplete relevant for the event
9631
- taskExistsForThisEventAndCase(taskInSessionStorage, taskEvent, eventId, caseId) {
9632
- if (!taskInSessionStorage || taskInSessionStorage.case_id !== caseId) {
9651
+ // checks whether current clientContext relevant for the event
9652
+ taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails) {
9653
+ if (!taskInSessionStorage || taskInSessionStorage.case_id !== eventDetails.caseId) {
9633
9654
  return false;
9634
9655
  }
9635
- if (!taskEvent) {
9656
+ if (!taskEventCompletionInfo) {
9636
9657
  // if no task event present then there is no task to complete from previous event present
9637
9658
  return true;
9638
9659
  }
9639
9660
  else {
9640
- if (taskEvent.taskId === taskInSessionStorage.id && taskEvent.eventId !== eventId) {
9661
+ if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
9662
+ return true;
9663
+ }
9664
+ else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
9665
+ this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
9666
+ || this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
9641
9667
  // if the session storage not related to event, ignore it and remove
9642
- this.sessionStorageService.removeItem('taskToComplete');
9643
- this.sessionStorageService.removeItem('taskEvent');
9668
+ this.sessionStorageService.removeItem('clientContext');
9669
+ this.sessionStorageService.removeItem('taskEventCompletionInfo');
9644
9670
  return false;
9645
9671
  }
9672
+ if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
9673
+ // if the user does not match task assignee, assign is now needed
9674
+ // data cannot be deleted and ignored as it matches understanding
9675
+ this.sessionStorageService.setItem('assignNeeded', 'true');
9676
+ }
9646
9677
  return true;
9647
9678
  }
9648
9679
  }
@@ -9663,6 +9694,20 @@ class CaseEditComponent {
9663
9694
  hasCallbackFailed(response) {
9664
9695
  return response['callback_response_status'] !== 'CALLBACK_COMPLETED';
9665
9696
  }
9697
+ eventMoreThanDayAgo(timestamp) {
9698
+ if ((new Date().getTime() - timestamp) > (24 * 60 * 60 * 1000)) {
9699
+ return true;
9700
+ }
9701
+ return false;
9702
+ }
9703
+ eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails) {
9704
+ if (taskEventCompletionInfo.eventId !== eventDetails.eventId
9705
+ || taskEventCompletionInfo.caseId !== eventDetails.caseId
9706
+ || taskEventCompletionInfo.userId !== eventDetails.userId) {
9707
+ return true;
9708
+ }
9709
+ return false;
9710
+ }
9666
9711
  static ɵfac = function CaseEditComponent_Factory(t) { return new (t || 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)); };
9667
9712
  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" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9668
9713
  i0.ɵɵelement(0, "router-outlet");
@@ -9686,7 +9731,7 @@ class CaseEditComponent {
9686
9731
  }], submitted: [{
9687
9732
  type: Output
9688
9733
  }] }); })();
9689
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 34 }); })();
9734
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 35 }); })();
9690
9735
 
9691
9736
  function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
9692
9737
  i0.ɵɵelement(0, "div");
@@ -11005,20 +11050,118 @@ class CallbackErrorsComponent {
11005
11050
  }] }); })();
11006
11051
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CallbackErrorsComponent, { className: "CallbackErrorsComponent", filePath: "lib/shared/components/error/callback-errors.component.ts", lineNumber: 10 }); })();
11007
11052
 
11053
+ function CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template(rf, ctx) { if (rf & 1) {
11054
+ const _r1 = i0.ɵɵgetCurrentView();
11055
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-cancelled", 2);
11056
+ i0.ɵɵlistener("notifyEventCompletionCancelled", function CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template_app_case_event_completion_task_cancelled_notifyEventCompletionCancelled_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setEventCanBeCompleted($event)); });
11057
+ i0.ɵɵelementEnd();
11058
+ } if (rf & 2) {
11059
+ const ctx_r1 = i0.ɵɵnextContext();
11060
+ i0.ɵɵproperty("context", ctx_r1.context);
11061
+ } }
11062
+ function CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template(rf, ctx) { if (rf & 1) {
11063
+ const _r3 = i0.ɵɵgetCurrentView();
11064
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-reassigned", 3);
11065
+ i0.ɵɵlistener("notifyEventCompletionReassigned", function CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template_app_case_event_completion_task_reassigned_notifyEventCompletionReassigned_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setEventCanBeCompleted($event)); });
11066
+ i0.ɵɵelementEnd();
11067
+ } if (rf & 2) {
11068
+ const ctx_r1 = i0.ɵɵnextContext();
11069
+ i0.ɵɵproperty("context", ctx_r1.context);
11070
+ } }
11071
+ const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
11072
+ class CaseEventCompletionComponent {
11073
+ service;
11074
+ router;
11075
+ route;
11076
+ sessionStorageService;
11077
+ workAllocationService;
11078
+ alertService;
11079
+ eventCompletionParams;
11080
+ eventCanBeCompleted = new EventEmitter();
11081
+ eventCompletionTaskStates = EventCompletionTaskStates;
11082
+ stateMachine;
11083
+ context;
11084
+ taskState;
11085
+ constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11086
+ this.service = service;
11087
+ this.router = router;
11088
+ this.route = route;
11089
+ this.sessionStorageService = sessionStorageService;
11090
+ this.workAllocationService = workAllocationService;
11091
+ this.alertService = alertService;
11092
+ }
11093
+ ngOnChanges(changes) {
11094
+ if (changes.eventCompletionParams?.currentValue) {
11095
+ // Setup the context
11096
+ this.context = {
11097
+ task: this.eventCompletionParams.task,
11098
+ caseId: this.eventCompletionParams.caseId,
11099
+ eventId: this.eventCompletionParams.eventId,
11100
+ reassignedTask: null,
11101
+ router: this.router,
11102
+ route: this.route,
11103
+ sessionStorageService: this.sessionStorageService,
11104
+ workAllocationService: this.workAllocationService,
11105
+ alertService: this.alertService,
11106
+ canBeCompleted: false,
11107
+ component: this
11108
+ };
11109
+ // Initialise state machine
11110
+ this.stateMachine = this.service.initialiseStateMachine(this.context);
11111
+ // Create states
11112
+ this.service.createStates(this.stateMachine);
11113
+ // Add transitions for the states
11114
+ this.service.addTransitions();
11115
+ // Start state machine
11116
+ this.service.startStateMachine(this.stateMachine);
11117
+ }
11118
+ }
11119
+ setTaskState(taskState) {
11120
+ this.taskState = taskState;
11121
+ }
11122
+ setEventCanBeCompleted(completable) {
11123
+ // note: event not completed from here as will then skip task completion
11124
+ if (!completable) {
11125
+ // if event cannot be completed ensure that this is communicated
11126
+ // otherwise this will be handled via onchanges
11127
+ this.eventCanBeCompleted.emit(completable);
11128
+ }
11129
+ }
11130
+ static ɵfac = function CaseEventCompletionComponent_Factory(t) { return new (t || CaseEventCompletionComponent)(i0.ɵɵdirectiveInject(EventCompletionStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
11131
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionComponent, selectors: [["ccd-case-event-completion"]], inputs: { eventCompletionParams: "eventCompletionParams" }, outputs: { eventCanBeCompleted: "eventCanBeCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [[3, "context", "notifyEventCompletionCancelled", 4, "ngIf"], [3, "context", "notifyEventCompletionReassigned", 4, "ngIf"], [3, "notifyEventCompletionCancelled", "context"], [3, "notifyEventCompletionReassigned", "context"]], template: function CaseEventCompletionComponent_Template(rf, ctx) { if (rf & 1) {
11132
+ i0.ɵɵtemplate(0, CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template, 1, 1, "app-case-event-completion-task-cancelled", 0)(1, CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template, 1, 1, "app-case-event-completion-task-reassigned", 1);
11133
+ } if (rf & 2) {
11134
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskCancelled);
11135
+ i0.ɵɵadvance();
11136
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskReassigned);
11137
+ } }, encapsulation: 2 });
11138
+ }
11139
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11140
+ type: Component,
11141
+ args: [{ selector: 'ccd-case-event-completion', template: "<app-case-event-completion-task-cancelled\n *ngIf=\"taskState === eventCompletionTaskStates.TaskCancelled\"\n [context]=\"context\"\n (notifyEventCompletionCancelled)=\"setEventCanBeCompleted($event)\">\n</app-case-event-completion-task-cancelled>\n<app-case-event-completion-task-reassigned\n *ngIf=\"taskState === eventCompletionTaskStates.TaskReassigned\"\n [context]=\"context\"\n (notifyEventCompletionReassigned)=\"setEventCanBeCompleted($event)\">\n</app-case-event-completion-task-reassigned>" }]
11142
+ }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11143
+ type: Input
11144
+ }], eventCanBeCompleted: [{
11145
+ type: Output
11146
+ }] }); })();
11147
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionComponent, { className: "CaseEventCompletionComponent", filePath: "lib/shared/components/case-editor/case-event-completion/case-event-completion.component.ts", lineNumber: 20 }); })();
11148
+
11008
11149
  const _c0$X = a0 => ["/", "cases", "case-details", a0, "tasks"];
11009
11150
  class CaseEventCompletionTaskCancelledComponent {
11010
- parentComponent;
11151
+ context;
11152
+ notifyEventCompletionCancelled = new EventEmitter();
11011
11153
  caseId;
11012
- constructor(parentComponent) {
11013
- this.parentComponent = parentComponent;
11014
- this.caseId = this.parentComponent.context.caseId;
11154
+ ngOnInit() {
11155
+ this.caseId = this.context.caseId;
11015
11156
  }
11016
11157
  onContinue() {
11017
- // Emit event can be completed event
11018
- this.parentComponent.eventCanBeCompleted.emit(true);
11158
+ // Removes task to complete so event completes without task
11159
+ this.context.sessionStorageService.removeItem('clientContext');
11160
+ // may be able to remove this call below since it is now unneccesary
11161
+ this.notifyEventCompletionCancelled.emit(true);
11019
11162
  }
11020
- static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(i0.ɵɵdirectiveInject(COMPONENT_PORTAL_INJECTION_TOKEN)); };
11021
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskCancelledComponent, selectors: [["app-case-event-completion-task-cancelled"]], decls: 31, vars: 27, consts: [[1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskCancelledComponent_Template(rf, ctx) { if (rf & 1) {
11163
+ static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(); };
11164
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskCancelledComponent, selectors: [["app-case-event-completion-task-cancelled"]], inputs: { context: "context" }, outputs: { notifyEventCompletionCancelled: "notifyEventCompletionCancelled" }, decls: 31, vars: 27, consts: [[1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskCancelledComponent_Template(rf, ctx) { if (rf & 1) {
11022
11165
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
11023
11166
  i0.ɵɵtext(3);
11024
11167
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -11076,11 +11219,12 @@ class CaseEventCompletionTaskCancelledComponent {
11076
11219
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskCancelledComponent, [{
11077
11220
  type: Component,
11078
11221
  args: [{ selector: 'app-case-event-completion-task-cancelled', template: "<div class=\"govuk-!-margin-9\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">{{'Task cancelled/marked as done' | rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">{{'Task cancelled/marked as done' | rpxTranslate}}</h2>\n <p>{{'This task has been cancelled or marked as done.' | rpxTranslate}}</p>\n <p>{{'Click Continue to complete the event and save your progress.' | rpxTranslate}}</p>\n\n <p>{{'Alternatively, click Cancel to return to the tasks tab without saving your progress.' | rpxTranslate}}</p>\n\n <div class=\"form-group form-group-related\">\n <button class=\"govuk-button govuk-!-margin-right-2\" data-module=\"govuk-button\" (click)=\"onContinue()\">\n {{'Continue' | rpxTranslate}}\n </button>\n <a [routerLink]=\"['/', 'cases', 'case-details', caseId, 'tasks']\"\n class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </div>\n </div>\n</div>\n" }]
11079
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11080
- type: Inject,
11081
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11082
- }] }], null); })();
11083
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskCancelledComponent, { className: "CaseEventCompletionTaskCancelledComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.ts", lineNumber: 8 }); })();
11222
+ }], null, { context: [{
11223
+ type: Input
11224
+ }], notifyEventCompletionCancelled: [{
11225
+ type: Output
11226
+ }] }); })();
11227
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskCancelledComponent, { className: "CaseEventCompletionTaskCancelledComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.ts", lineNumber: 9 }); })();
11084
11228
 
11085
11229
  const _c0$W = a0 => ["/", "cases", "case-details", a0, "tasks"];
11086
11230
  function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if (rf & 1) {
@@ -11140,32 +11284,26 @@ function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if
11140
11284
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 24, "Cancel"), " ");
11141
11285
  } }
11142
11286
  class CaseEventCompletionTaskReassignedComponent {
11143
- parentComponent;
11144
- route;
11145
- workAllocationService;
11146
11287
  sessionStorageService;
11147
11288
  judicialworkerService;
11148
11289
  caseworkerService;
11149
- alertService;
11290
+ context;
11291
+ notifyEventCompletionReassigned = new EventEmitter();
11150
11292
  caseId;
11151
11293
  assignedUserId;
11152
11294
  assignedUserName;
11153
11295
  subscription;
11154
11296
  caseworkerSubscription;
11155
11297
  judicialworkerSubscription;
11156
- constructor(parentComponent, route, workAllocationService, sessionStorageService, judicialworkerService, caseworkerService, alertService) {
11157
- this.parentComponent = parentComponent;
11158
- this.route = route;
11159
- this.workAllocationService = workAllocationService;
11298
+ constructor(sessionStorageService, judicialworkerService, caseworkerService) {
11160
11299
  this.sessionStorageService = sessionStorageService;
11161
11300
  this.judicialworkerService = judicialworkerService;
11162
11301
  this.caseworkerService = caseworkerService;
11163
- this.alertService = alertService;
11164
11302
  }
11165
11303
  ngOnInit() {
11166
11304
  // Get case id and task from the parent component
11167
- this.caseId = this.parentComponent.context.caseId;
11168
- const task = this.parentComponent.context.reassignedTask;
11305
+ this.caseId = this.context.caseId;
11306
+ const task = this.context.reassignedTask;
11169
11307
  // Current user is a caseworker?
11170
11308
  this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
11171
11309
  if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
@@ -11210,17 +11348,17 @@ class CaseEventCompletionTaskReassignedComponent {
11210
11348
  // not complete_task not utilised here as related to event completion
11211
11349
  // service wanting task associated with event to not be completed not directly relevant
11212
11350
  if (task) {
11213
- this.sessionStorageService.setItem('assignNeeded', 'true');
11214
- // set event can be completed to true
11215
- this.parentComponent.eventCanBeCompleted.emit(true);
11351
+ // Set session to override reassignment settings so code flow does not return to this component
11352
+ this.sessionStorageService.setItem('assignNeeded', 'true - override');
11353
+ this.notifyEventCompletionReassigned.emit(true);
11216
11354
  }
11217
11355
  else {
11218
11356
  // Emit event cannot be completed event
11219
- this.parentComponent.eventCanBeCompleted.emit(false);
11357
+ this.notifyEventCompletionReassigned.emit(false);
11220
11358
  }
11221
11359
  }
11222
- static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(COMPONENT_PORTAL_INJECTION_TOKEN), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(JudicialworkerService), i0.ɵɵdirectiveInject(CaseworkerService), i0.ɵɵdirectiveInject(AlertService)); };
11223
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskReassignedComponent, selectors: [["app-case-event-completion-task-reassigned"]], decls: 1, vars: 1, consts: [["class", "govuk-!-margin-9", 4, "ngIf"], [1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskReassignedComponent_Template(rf, ctx) { if (rf & 1) {
11360
+ static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(JudicialworkerService), i0.ɵɵdirectiveInject(CaseworkerService)); };
11361
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskReassignedComponent, selectors: [["app-case-event-completion-task-reassigned"]], inputs: { context: "context" }, outputs: { notifyEventCompletionReassigned: "notifyEventCompletionReassigned" }, decls: 1, vars: 1, consts: [["class", "govuk-!-margin-9", 4, "ngIf"], [1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskReassignedComponent_Template(rf, ctx) { if (rf & 1) {
11224
11362
  i0.ɵɵtemplate(0, CaseEventCompletionTaskReassignedComponent_div_0_Template, 31, 28, "div", 0);
11225
11363
  } if (rf & 2) {
11226
11364
  i0.ɵɵproperty("ngIf", ctx.assignedUserName);
@@ -11229,92 +11367,12 @@ class CaseEventCompletionTaskReassignedComponent {
11229
11367
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskReassignedComponent, [{
11230
11368
  type: Component,
11231
11369
  args: [{ selector: 'app-case-event-completion-task-reassigned', template: "<div class=\"govuk-!-margin-9\" *ngIf=\"assignedUserName\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">{{'Task reassigned' | rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">{{'Task reassigned' | rpxTranslate}}</h2>\n <p>{{'This task has been reassigned to' | rpxTranslate}} {{assignedUserName}}.</p>\n <p>{{'Click Continue to reassign the task to you and save your progress.' | rpxTranslate}}</p>\n <p>{{'Alternatively, click Cancel to return to the tasks tab without saving your progress.' | rpxTranslate}}</p>\n <div class=\"form-group form-group-related\">\n <button class=\"govuk-button govuk-!-margin-right-2\" data-module=\"govuk-button\" (click)=\"onContinue()\">\n {{'Continue' | rpxTranslate}}\n </button>\n <a [routerLink]=\"['/', 'cases', 'case-details', caseId, 'tasks']\"\n class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </div>\n </div>\n</div>\n" }]
11232
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11233
- type: Inject,
11234
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11235
- }] }, { type: i1$1.ActivatedRoute }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }, { type: AlertService }], null); })();
11236
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 19 }); })();
11237
-
11238
- function CaseEventCompletionComponent_ng_template_0_Template(rf, ctx) { }
11239
- const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
11240
- class CaseEventCompletionComponent {
11241
- service;
11242
- router;
11243
- route;
11244
- sessionStorageService;
11245
- workAllocationService;
11246
- alertService;
11247
- eventCompletionParams;
11248
- eventCanBeCompleted = new EventEmitter();
11249
- stateMachine;
11250
- context;
11251
- selectedComponentPortal;
11252
- constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11253
- this.service = service;
11254
- this.router = router;
11255
- this.route = route;
11256
- this.sessionStorageService = sessionStorageService;
11257
- this.workAllocationService = workAllocationService;
11258
- this.alertService = alertService;
11259
- }
11260
- ngOnChanges(changes) {
11261
- if (changes.eventCompletionParams && changes.eventCompletionParams.currentValue) {
11262
- // Setup the context
11263
- this.context = {
11264
- task: this.eventCompletionParams.task,
11265
- caseId: this.eventCompletionParams.caseId,
11266
- eventId: this.eventCompletionParams.eventId,
11267
- reassignedTask: null,
11268
- router: this.router,
11269
- route: this.route,
11270
- sessionStorageService: this.sessionStorageService,
11271
- workAllocationService: this.workAllocationService,
11272
- alertService: this.alertService,
11273
- canBeCompleted: false,
11274
- component: this
11275
- };
11276
- // Initialise state machine
11277
- this.stateMachine = this.service.initialiseStateMachine(this.context);
11278
- // Create states
11279
- this.service.createStates(this.stateMachine);
11280
- // Add transitions for the states
11281
- this.service.addTransitions();
11282
- // Start state machine
11283
- this.service.startStateMachine(this.stateMachine);
11284
- }
11285
- }
11286
- showPortal(portalType) {
11287
- const injector = Injector.create({
11288
- providers: [
11289
- { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
11290
- ]
11291
- });
11292
- // tslint:disable-next-line:switch-default
11293
- switch (portalType) {
11294
- case EventCompletionPortalTypes.TaskCancelled:
11295
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
11296
- break;
11297
- case EventCompletionPortalTypes.TaskReassigned:
11298
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskReassignedComponent, null, injector);
11299
- break;
11300
- }
11301
- }
11302
- static ɵfac = function CaseEventCompletionComponent_Factory(t) { return new (t || CaseEventCompletionComponent)(i0.ɵɵdirectiveInject(EventCompletionStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
11303
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionComponent, selectors: [["ccd-case-event-completion"]], inputs: { eventCompletionParams: "eventCompletionParams" }, outputs: { eventCanBeCompleted: "eventCanBeCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "cdkPortalOutlet"]], template: function CaseEventCompletionComponent_Template(rf, ctx) { if (rf & 1) {
11304
- i0.ɵɵtemplate(0, CaseEventCompletionComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
11305
- } if (rf & 2) {
11306
- i0.ɵɵproperty("cdkPortalOutlet", ctx.selectedComponentPortal);
11307
- } }, encapsulation: 2 });
11308
- }
11309
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11310
- type: Component,
11311
- args: [{ selector: 'ccd-case-event-completion', template: "<ng-template [cdkPortalOutlet]=\"selectedComponentPortal\"></ng-template>\n" }]
11312
- }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11370
+ }], () => [{ type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }], { context: [{
11313
11371
  type: Input
11314
- }], eventCanBeCompleted: [{
11372
+ }], notifyEventCompletionReassigned: [{
11315
11373
  type: Output
11316
11374
  }] }); })();
11317
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionComponent, { className: "CaseEventCompletionComponent", filePath: "lib/shared/components/case-editor/case-event-completion/case-event-completion.component.ts", lineNumber: 21 }); })();
11375
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 15 }); })();
11318
11376
 
11319
11377
  class AddressOption {
11320
11378
  description;
@@ -19596,7 +19654,7 @@ class QueryManagementUtils {
19596
19654
  static caseLevelCaseFieldId = 'CaseQueriesCollection';
19597
19655
  static FIELD_TYPE_COLLECTION = 'Collection';
19598
19656
  static FIELD_TYPE_COMPLEX = 'Complex';
19599
- static extractCaseQueriesFromCaseField(caseField, caseFieldId) {
19657
+ static extractCaseQueriesFromCaseField(caseField) {
19600
19658
  const { field_type, value } = caseField;
19601
19659
  // Handle Complex type fields
19602
19660
  if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
@@ -19605,10 +19663,6 @@ class QueryManagementUtils {
19605
19663
  }
19606
19664
  return null;
19607
19665
  }
19608
- // Handle Collection type fields
19609
- // if (field_type.type === QueryManagementUtils.FIELD_TYPE_COLLECTION) {
19610
- // return [];
19611
- // }
19612
19666
  }
19613
19667
  static documentToCollectionFormDocument(document) {
19614
19668
  return {
@@ -19631,7 +19685,7 @@ class QueryManagementUtils {
19631
19685
  : null;
19632
19686
  const attachments = formGroup.get('attachments').value;
19633
19687
  return {
19634
- id: null,
19688
+ id: v4(),
19635
19689
  subject,
19636
19690
  name: currentUserName,
19637
19691
  body,
@@ -19649,7 +19703,7 @@ class QueryManagementUtils {
19649
19703
  const attachments = formGroup.get('attachments').value;
19650
19704
  queryItem.isHearingRelated = queryItem.isHearingRelated ? 'Yes' : 'No';
19651
19705
  return {
19652
- id: null,
19706
+ id: v4(),
19653
19707
  subject: queryItem.subject,
19654
19708
  name: currentUserName,
19655
19709
  body,
@@ -19866,9 +19920,36 @@ class QueryListData {
19866
19920
  }
19867
19921
  }
19868
19922
 
19869
- function QueryCheckYourAnswersComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
19923
+ function QueryCheckYourAnswersComponent_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
19924
+ i0.ɵɵelementStart(0, "li")(1, "a", 26);
19925
+ i0.ɵɵtext(2);
19926
+ i0.ɵɵpipe(3, "rpxTranslate");
19927
+ i0.ɵɵelementEnd()();
19928
+ } if (rf & 2) {
19929
+ const errorMessage_r2 = ctx.$implicit;
19930
+ i0.ɵɵadvance();
19931
+ i0.ɵɵproperty("id", "error-" + errorMessage_r2.fieldId);
19932
+ i0.ɵɵadvance();
19933
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, errorMessage_r2.description));
19934
+ } }
19935
+ function QueryCheckYourAnswersComponent_div_2_Template(rf, ctx) { if (rf & 1) {
19936
+ i0.ɵɵelementStart(0, "div", 21)(1, "h2", 22);
19937
+ i0.ɵɵtext(2);
19938
+ i0.ɵɵpipe(3, "rpxTranslate");
19939
+ i0.ɵɵelementEnd();
19940
+ i0.ɵɵelementStart(4, "div", 23)(5, "ul", 24);
19941
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_2_li_6_Template, 4, 4, "li", 25);
19942
+ i0.ɵɵelementEnd()()();
19943
+ } if (rf & 2) {
19944
+ const ctx_r2 = i0.ɵɵnextContext();
19945
+ i0.ɵɵadvance(2);
19946
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "There is a problem"), " ");
19947
+ i0.ɵɵadvance(4);
19948
+ i0.ɵɵproperty("ngForOf", ctx_r2.errorMessages);
19949
+ } }
19950
+ function QueryCheckYourAnswersComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
19870
19951
  i0.ɵɵelementContainerStart(0);
19871
- i0.ɵɵelementStart(1, "div", 20);
19952
+ i0.ɵɵelementStart(1, "div", 27);
19872
19953
  i0.ɵɵtext(2);
19873
19954
  i0.ɵɵpipe(3, "rpxTranslate");
19874
19955
  i0.ɵɵelementEnd();
@@ -19877,7 +19958,7 @@ function QueryCheckYourAnswersComponent_ng_container_2_Template(rf, ctx) { if (r
19877
19958
  i0.ɵɵadvance(2);
19878
19959
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Raise a query"));
19879
19960
  } }
19880
- function QueryCheckYourAnswersComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
19961
+ function QueryCheckYourAnswersComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
19881
19962
  i0.ɵɵelementContainerStart(0);
19882
19963
  i0.ɵɵtext(1);
19883
19964
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -19886,16 +19967,16 @@ function QueryCheckYourAnswersComponent_ng_container_4_Template(rf, ctx) { if (r
19886
19967
  i0.ɵɵadvance();
19887
19968
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Review query response details"), " ");
19888
19969
  } }
19889
- function QueryCheckYourAnswersComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
19970
+ function QueryCheckYourAnswersComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
19890
19971
  i0.ɵɵtext(0);
19891
19972
  i0.ɵɵpipe(1, "rpxTranslate");
19892
19973
  } if (rf & 2) {
19893
19974
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, "Review query details"), " ");
19894
19975
  } }
19895
- function QueryCheckYourAnswersComponent_dl_9_a_8_Template(rf, ctx) { if (rf & 1) {
19896
- const _r2 = i0.ɵɵgetCurrentView();
19897
- i0.ɵɵelementStart(0, "a", 14);
19898
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_9_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19976
+ function QueryCheckYourAnswersComponent_dl_10_a_8_Template(rf, ctx) { if (rf & 1) {
19977
+ const _r4 = i0.ɵɵgetCurrentView();
19978
+ i0.ɵɵelementStart(0, "a", 15);
19979
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_10_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19899
19980
  i0.ɵɵtext(1);
19900
19981
  i0.ɵɵpipe(2, "rpxTranslate");
19901
19982
  i0.ɵɵelementEnd();
@@ -19903,16 +19984,16 @@ function QueryCheckYourAnswersComponent_dl_9_a_8_Template(rf, ctx) { if (rf & 1)
19903
19984
  i0.ɵɵadvance();
19904
19985
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Change"), " ");
19905
19986
  } }
19906
- function QueryCheckYourAnswersComponent_dl_9_Template(rf, ctx) { if (rf & 1) {
19907
- i0.ɵɵelementStart(0, "dl", 9)(1, "div", 10)(2, "dt", 11);
19987
+ function QueryCheckYourAnswersComponent_dl_10_Template(rf, ctx) { if (rf & 1) {
19988
+ i0.ɵɵelementStart(0, "dl", 10)(1, "div", 11)(2, "dt", 12);
19908
19989
  i0.ɵɵtext(3);
19909
19990
  i0.ɵɵpipe(4, "rpxTranslate");
19910
19991
  i0.ɵɵelementEnd();
19911
- i0.ɵɵelementStart(5, "dd", 12);
19992
+ i0.ɵɵelementStart(5, "dd", 13);
19912
19993
  i0.ɵɵtext(6);
19913
19994
  i0.ɵɵelementEnd();
19914
- i0.ɵɵelementStart(7, "dd", 13);
19915
- i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_dl_9_a_8_Template, 3, 3, "a", 21);
19995
+ i0.ɵɵelementStart(7, "dd", 14);
19996
+ i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_dl_10_a_8_Template, 3, 3, "a", 28);
19916
19997
  i0.ɵɵelementEnd()()();
19917
19998
  } if (rf & 2) {
19918
19999
  let tmp_3_0;
@@ -19924,7 +20005,7 @@ function QueryCheckYourAnswersComponent_dl_9_Template(rf, ctx) { if (rf & 1) {
19924
20005
  i0.ɵɵadvance(2);
19925
20006
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
19926
20007
  } }
19927
- function QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template(rf, ctx) { if (rf & 1) {
20008
+ function QueryCheckYourAnswersComponent_dl_22_ng_container_6_Template(rf, ctx) { if (rf & 1) {
19928
20009
  i0.ɵɵelementContainerStart(0);
19929
20010
  i0.ɵɵtext(1);
19930
20011
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -19933,24 +20014,24 @@ function QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template(rf, ctx) {
19933
20014
  i0.ɵɵadvance();
19934
20015
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(2, 1, "Is the query hearing related?", null, "Yes"), " ");
19935
20016
  } }
19936
- function QueryCheckYourAnswersComponent_dl_21_ng_template_7_Template(rf, ctx) { if (rf & 1) {
20017
+ function QueryCheckYourAnswersComponent_dl_22_ng_template_7_Template(rf, ctx) { if (rf & 1) {
19937
20018
  i0.ɵɵtext(0);
19938
20019
  i0.ɵɵpipe(1, "rpxTranslate");
19939
20020
  } if (rf & 2) {
19940
20021
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(1, 1, "Is the query hearing related?", null, "No"), " ");
19941
20022
  } }
19942
- function QueryCheckYourAnswersComponent_dl_21_div_13_Template(rf, ctx) { if (rf & 1) {
19943
- const _r5 = i0.ɵɵgetCurrentView();
19944
- i0.ɵɵelementStart(0, "div", 10)(1, "dt", 11);
20023
+ function QueryCheckYourAnswersComponent_dl_22_div_13_Template(rf, ctx) { if (rf & 1) {
20024
+ const _r6 = i0.ɵɵgetCurrentView();
20025
+ i0.ɵɵelementStart(0, "div", 11)(1, "dt", 12);
19945
20026
  i0.ɵɵtext(2);
19946
20027
  i0.ɵɵpipe(3, "rpxTranslate");
19947
20028
  i0.ɵɵelementEnd();
19948
- i0.ɵɵelementStart(4, "dd", 12);
20029
+ i0.ɵɵelementStart(4, "dd", 13);
19949
20030
  i0.ɵɵtext(5);
19950
20031
  i0.ɵɵpipe(6, "date");
19951
20032
  i0.ɵɵelementEnd();
19952
- i0.ɵɵelementStart(7, "dd", 13)(8, "a", 14);
19953
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_21_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
20033
+ i0.ɵɵelementStart(7, "dd", 14)(8, "a", 15);
20034
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_22_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19954
20035
  i0.ɵɵtext(9);
19955
20036
  i0.ɵɵpipe(10, "rpxTranslate");
19956
20037
  i0.ɵɵelementEnd()()();
@@ -19964,38 +20045,38 @@ function QueryCheckYourAnswersComponent_dl_21_div_13_Template(rf, ctx) { if (rf
19964
20045
  i0.ɵɵadvance(4);
19965
20046
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, "Change"), " ");
19966
20047
  } }
19967
- function QueryCheckYourAnswersComponent_dl_21_Template(rf, ctx) { if (rf & 1) {
19968
- const _r4 = i0.ɵɵgetCurrentView();
19969
- i0.ɵɵelementStart(0, "dl", 9)(1, "div", 10)(2, "dt", 11);
20048
+ function QueryCheckYourAnswersComponent_dl_22_Template(rf, ctx) { if (rf & 1) {
20049
+ const _r5 = i0.ɵɵgetCurrentView();
20050
+ i0.ɵɵelementStart(0, "dl", 10)(1, "div", 11)(2, "dt", 12);
19970
20051
  i0.ɵɵtext(3);
19971
20052
  i0.ɵɵpipe(4, "rpxTranslate");
19972
20053
  i0.ɵɵelementEnd();
19973
- i0.ɵɵelementStart(5, "dd", 12);
19974
- i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template, 3, 5, "ng-container", 6)(7, QueryCheckYourAnswersComponent_dl_21_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
20054
+ i0.ɵɵelementStart(5, "dd", 13);
20055
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_dl_22_ng_container_6_Template, 3, 5, "ng-container", 7)(7, QueryCheckYourAnswersComponent_dl_22_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
19975
20056
  i0.ɵɵelementEnd();
19976
- i0.ɵɵelementStart(9, "dd", 13)(10, "a", 14);
19977
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_21_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
20057
+ i0.ɵɵelementStart(9, "dd", 14)(10, "a", 15);
20058
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_22_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
19978
20059
  i0.ɵɵtext(11);
19979
20060
  i0.ɵɵpipe(12, "rpxTranslate");
19980
20061
  i0.ɵɵelementEnd()()();
19981
- i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_dl_21_div_13_Template, 11, 10, "div", 22);
20062
+ i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_dl_22_div_13_Template, 11, 10, "div", 29);
19982
20063
  i0.ɵɵelementEnd();
19983
20064
  } if (rf & 2) {
19984
20065
  let tmp_4_0;
19985
20066
  let tmp_7_0;
19986
- const isHearingRelatedFalse_r6 = i0.ɵɵreference(8);
20067
+ const isHearingRelatedFalse_r7 = i0.ɵɵreference(8);
19987
20068
  const ctx_r2 = i0.ɵɵnextContext();
19988
20069
  i0.ɵɵadvance(3);
19989
20070
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, "Is the query hearing related?"), " ");
19990
20071
  i0.ɵɵadvance(3);
19991
- i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse", isHearingRelatedFalse_r6);
20072
+ i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse", isHearingRelatedFalse_r7);
19992
20073
  i0.ɵɵadvance(5);
19993
20074
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 7, "Change"), " ");
19994
20075
  i0.ɵɵadvance(2);
19995
20076
  i0.ɵɵproperty("ngIf", (tmp_7_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_7_0.value);
19996
20077
  } }
19997
- function QueryCheckYourAnswersComponent_ccd_query_attachments_read_28_Template(rf, ctx) { if (rf & 1) {
19998
- i0.ɵɵelement(0, "ccd-query-attachments-read", 23);
20078
+ function QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template(rf, ctx) { if (rf & 1) {
20079
+ i0.ɵɵelement(0, "ccd-query-attachments-read", 30);
19999
20080
  } if (rf & 2) {
20000
20081
  const ctx_r2 = i0.ɵɵnextContext();
20001
20082
  i0.ɵɵproperty("attachments", ctx_r2.formGroup.get("attachments").value);
@@ -20007,6 +20088,7 @@ class QueryCheckYourAnswersComponent {
20007
20088
  caseNotifier;
20008
20089
  workAllocationService;
20009
20090
  sessionStorageService;
20091
+ eventTriggerService;
20010
20092
  RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
20011
20093
  RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
20012
20094
  CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
@@ -20014,75 +20096,72 @@ class QueryCheckYourAnswersComponent {
20014
20096
  formGroup;
20015
20097
  queryItem;
20016
20098
  queryCreateContext;
20099
+ eventData = null;
20017
20100
  backClicked = new EventEmitter();
20018
20101
  querySubmitted = new EventEmitter();
20019
20102
  caseViewTrigger;
20020
20103
  caseDetails;
20021
20104
  queryId;
20022
- getEventTrigger$;
20023
20105
  createEventSubscription;
20024
- searchTasksSubsciption;
20106
+ searchTasksSubscription;
20025
20107
  queryCreateContextEnum = QueryCreateContext;
20026
20108
  eventCompletionParams;
20027
- caseId;
20028
20109
  caseQueriesCollections;
20029
20110
  fieldId;
20030
- constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService) {
20111
+ errorMessages = [];
20112
+ constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, eventTriggerService) {
20031
20113
  this.route = route;
20032
20114
  this.router = router;
20033
20115
  this.casesService = casesService;
20034
20116
  this.caseNotifier = caseNotifier;
20035
20117
  this.workAllocationService = workAllocationService;
20036
20118
  this.sessionStorageService = sessionStorageService;
20119
+ this.eventTriggerService = eventTriggerService;
20037
20120
  }
20038
20121
  ngOnInit() {
20039
20122
  this.queryId = this.route.snapshot.params.qid;
20040
20123
  this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
20041
20124
  this.caseDetails = caseDetails;
20042
- if (this.queryCreateContext !== QueryCreateContext.RESPOND) {
20043
- // Find raise a query event trigger from the list, will be used when submitting the query
20044
- this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => trigger.id === this.RAISE_A_QUERY_EVENT_TRIGGER_ID);
20045
- // Initialise getEventTrigger observable, will be used when submitting the query
20046
- this.getEventTrigger$ = this.casesService.getEventTrigger(undefined, this.RAISE_A_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id);
20047
- }
20048
- else {
20049
- // Raise a query and Follow-up query uses the same event trigger id
20050
- // Find raise a query event trigger from the list, will be used when submitting the query
20051
- this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => trigger.id === this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID);
20052
- // Initialise getEventTrigger observable, will be used when submitting the query
20053
- this.getEventTrigger$ = this.casesService.getEventTrigger(undefined, this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id);
20054
- }
20125
+ // Find the appropriate event trigger based on the queryCreateContext
20126
+ this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => this.queryCreateContext !== QueryCreateContext.RESPOND
20127
+ // If the context is not 'RESPOND', find the trigger with the ID for raising a query
20128
+ ? trigger.id === this.RAISE_A_QUERY_EVENT_TRIGGER_ID
20129
+ // If the context is 'RESPOND', find the trigger with the ID for responding to a query
20130
+ : trigger.id === this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID);
20055
20131
  });
20056
- this.isCaseQueriesClollectionDataPresent();
20132
+ this.setCaseQueriesCollectionData();
20057
20133
  }
20058
20134
  ngOnDestroy() {
20059
20135
  this.createEventSubscription?.unsubscribe();
20060
- this.searchTasksSubsciption?.unsubscribe();
20136
+ this.searchTasksSubscription?.unsubscribe();
20061
20137
  }
20062
20138
  goBack() {
20063
20139
  this.backClicked.emit(true);
20064
20140
  }
20065
20141
  submit() {
20066
- // Generate case queries collection data for submission
20142
+ // Check if fieldId is null or undefined
20143
+ if (!this.fieldId) {
20144
+ console.error('Error: Field ID is missing. Cannot proceed with submission.');
20145
+ this.errorMessages = [
20146
+ {
20147
+ title: 'Error',
20148
+ description: 'Something unexpected happened. please try again later.',
20149
+ fieldId: 'field-id'
20150
+ }
20151
+ ];
20152
+ return;
20153
+ }
20067
20154
  const data = this.generateCaseQueriesCollectionData();
20068
- // Actual submission of query
20069
- this.createEventSubscription = this.getEventTrigger$.pipe(switchMap((caseEventTrigger) => {
20070
- // Setup CaseEventData
20071
- const caseEventData = {
20072
- data,
20073
- event: {
20074
- id: this.caseViewTrigger.id,
20075
- summary: '',
20076
- description: this.caseViewTrigger.description
20077
- },
20078
- event_token: caseEventTrigger.event_token,
20079
- ignore_warning: false
20080
- };
20081
- // Complete event
20082
- return this.casesService.createEvent(this.caseDetails, caseEventData);
20083
- })).subscribe(
20084
- // Successful response
20085
- () => {
20155
+ this.createEventSubscription = this.casesService.createEvent(this.caseDetails, {
20156
+ data,
20157
+ event: {
20158
+ id: this.caseViewTrigger?.id,
20159
+ summary: '',
20160
+ description: this.caseViewTrigger?.description
20161
+ },
20162
+ event_token: this.eventData?.event_token,
20163
+ ignore_warning: false
20164
+ }).subscribe(() => {
20086
20165
  // Search and complete task
20087
20166
  this.searchAndCompleteTask();
20088
20167
  // Emit query submitted event
@@ -20094,22 +20173,19 @@ class QueryCheckYourAnswersComponent {
20094
20173
  searchAndCompleteTask() {
20095
20174
  // Search Task
20096
20175
  const searchParameter = { ccdId: this.caseDetails.case_id };
20097
- this.searchTasksSubsciption = this.workAllocationService.searchTasks(searchParameter)
20176
+ this.searchTasksSubscription = this.workAllocationService.searchTasks(searchParameter)
20098
20177
  .subscribe((response) => {
20099
20178
  // Filter task by query id
20100
- const filteredtask = response.tasks?.find((task) => {
20101
- return Object.values(task.additional_properties).some((value) => {
20102
- if (value === this.queryId) {
20103
- return task;
20104
- }
20105
- });
20106
- });
20179
+ const filteredTask = response.tasks?.find((task) => Object.values(task.additional_properties).some((value) => value === this.queryId));
20107
20180
  // Trigger event completion
20108
20181
  this.eventCompletionParams = {
20109
20182
  caseId: this.caseDetails.case_id,
20110
20183
  eventId: this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID,
20111
- task: filteredtask
20184
+ task: filteredTask
20112
20185
  };
20186
+ }, (error) => {
20187
+ console.error('Error in searchTasksSubscription:', error);
20188
+ // Handle error appropriately
20113
20189
  });
20114
20190
  }
20115
20191
  generateCaseQueriesCollectionData() {
@@ -20122,11 +20198,9 @@ class QueryCheckYourAnswersComponent {
20122
20198
  console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
20123
20199
  this.router.navigate(['/', 'service-down']);
20124
20200
  }
20125
- // Dynamically determine the field ID
20126
- const dynamicFieldId = this.fieldId;
20127
20201
  // Base data structure for the query with dynamic property name
20128
20202
  const newQueryData = {
20129
- [dynamicFieldId]: {
20203
+ [this.fieldId]: {
20130
20204
  partyName: '', // Not returned by CCD
20131
20205
  roleOnCase: '', // Not returned by CCD
20132
20206
  caseMessages: [
@@ -20138,18 +20212,17 @@ class QueryCheckYourAnswersComponent {
20138
20212
  }
20139
20213
  };
20140
20214
  // If caseQueriesCollections is not empty, append its data
20141
- if (this.caseQueriesCollections && this.caseQueriesCollections.length > 0) {
20142
- newQueryData[dynamicFieldId].caseMessages.push(...this.caseQueriesCollections.map((collection) => collection.caseMessages).flat());
20215
+ if (this.caseQueriesCollections?.length) {
20216
+ newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
20143
20217
  }
20144
20218
  return newQueryData;
20145
20219
  }
20146
- isCaseQueriesClollectionDataPresent() {
20147
- if (this.route.snapshot?.data?.case?.tabs) {
20148
- this.caseQueriesCollections = this.route.snapshot.data.case.tabs
20149
- .filter((tab) => tab?.fields?.some((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID && caseField.field_type.type === this.FIELD_TYPE_COMPLEX))[0]?.fields?.reduce((acc, caseField) => {
20220
+ setCaseQueriesCollectionData() {
20221
+ if (this.eventData?.case_fields?.length) {
20222
+ this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
20150
20223
  // Extract the ID based on conditions, updating this.fieldId dynamically
20151
- this.extractIdBasedOnConditions(caseField);
20152
- const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField, caseField.id);
20224
+ this.extractCaseQueryId(caseField);
20225
+ const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
20153
20226
  if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
20154
20227
  acc.push(extractedCaseQueriesFromCaseField);
20155
20228
  }
@@ -20157,7 +20230,7 @@ class QueryCheckYourAnswersComponent {
20157
20230
  }, []);
20158
20231
  }
20159
20232
  }
20160
- extractIdBasedOnConditions(data) {
20233
+ extractCaseQueryId(data) {
20161
20234
  // Check if field_type.id is 'CaseQueriesCollection' and field_type.type is 'Complex'
20162
20235
  if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
20163
20236
  data.field_type.type === this.FIELD_TYPE_COMPLEX) {
@@ -20165,102 +20238,106 @@ class QueryCheckYourAnswersComponent {
20165
20238
  this.fieldId = data.id; // Store the ID for use in generating newQueryData
20166
20239
  }
20167
20240
  }
20168
- static ɵfac = function QueryCheckYourAnswersComponent_Factory(t) { return new (t || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService)); };
20169
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted" }, decls: 42, vars: 26, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
20241
+ static ɵfac = function QueryCheckYourAnswersComponent_Factory(t) { return new (t || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(EventTriggerService)); };
20242
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted" }, decls: 43, vars: 27, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
20170
20243
  const _r1 = i0.ɵɵgetCurrentView();
20171
20244
  i0.ɵɵelementStart(0, "div", 2)(1, "div", 3);
20172
- i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_ng_container_2_Template, 4, 3, "ng-container", 4);
20173
- i0.ɵɵelementStart(3, "h1", 5);
20174
- i0.ɵɵtemplate(4, QueryCheckYourAnswersComponent_ng_container_4_Template, 3, 3, "ng-container", 6)(5, QueryCheckYourAnswersComponent_ng_template_5_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20245
+ i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_div_2_Template, 7, 4, "div", 4)(3, QueryCheckYourAnswersComponent_ng_container_3_Template, 4, 3, "ng-container", 5);
20246
+ i0.ɵɵelementStart(4, "h1", 6);
20247
+ i0.ɵɵtemplate(5, QueryCheckYourAnswersComponent_ng_container_5_Template, 3, 3, "ng-container", 7)(6, QueryCheckYourAnswersComponent_ng_template_6_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20175
20248
  i0.ɵɵelementEnd();
20176
- i0.ɵɵelementStart(7, "div", 7);
20177
- i0.ɵɵelement(8, "ccd-query-case-details-header");
20249
+ i0.ɵɵelementStart(8, "div", 8);
20250
+ i0.ɵɵelement(9, "ccd-query-case-details-header");
20178
20251
  i0.ɵɵelementEnd();
20179
- i0.ɵɵtemplate(9, QueryCheckYourAnswersComponent_dl_9_Template, 9, 5, "dl", 8);
20180
- i0.ɵɵelementStart(10, "dl", 9)(11, "div", 10)(12, "dt", 11);
20181
- i0.ɵɵtext(13);
20182
- i0.ɵɵpipe(14, "rpxTranslate");
20252
+ i0.ɵɵtemplate(10, QueryCheckYourAnswersComponent_dl_10_Template, 9, 5, "dl", 9);
20253
+ i0.ɵɵelementStart(11, "dl", 10)(12, "div", 11)(13, "dt", 12);
20254
+ i0.ɵɵtext(14);
20255
+ i0.ɵɵpipe(15, "rpxTranslate");
20183
20256
  i0.ɵɵelementEnd();
20184
- i0.ɵɵelementStart(15, "dd", 12);
20185
- i0.ɵɵtext(16);
20257
+ i0.ɵɵelementStart(16, "dd", 13);
20258
+ i0.ɵɵtext(17);
20186
20259
  i0.ɵɵelementEnd();
20187
- i0.ɵɵelementStart(17, "dd", 13)(18, "a", 14);
20188
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_18_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20189
- i0.ɵɵtext(19);
20190
- i0.ɵɵpipe(20, "rpxTranslate");
20260
+ i0.ɵɵelementStart(18, "dd", 14)(19, "a", 15);
20261
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_19_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20262
+ i0.ɵɵtext(20);
20263
+ i0.ɵɵpipe(21, "rpxTranslate");
20191
20264
  i0.ɵɵelementEnd()()()();
20192
- i0.ɵɵtemplate(21, QueryCheckYourAnswersComponent_dl_21_Template, 14, 9, "dl", 8);
20193
- i0.ɵɵelementStart(22, "dl", 9)(23, "div", 10)(24, "dt", 11);
20194
- i0.ɵɵtext(25);
20195
- i0.ɵɵpipe(26, "rpxTranslate");
20265
+ i0.ɵɵtemplate(22, QueryCheckYourAnswersComponent_dl_22_Template, 14, 9, "dl", 9);
20266
+ i0.ɵɵelementStart(23, "dl", 10)(24, "div", 11)(25, "dt", 12);
20267
+ i0.ɵɵtext(26);
20268
+ i0.ɵɵpipe(27, "rpxTranslate");
20196
20269
  i0.ɵɵelementEnd();
20197
- i0.ɵɵelementStart(27, "dd", 15);
20198
- i0.ɵɵtemplate(28, QueryCheckYourAnswersComponent_ccd_query_attachments_read_28_Template, 1, 1, "ccd-query-attachments-read", 16);
20270
+ i0.ɵɵelementStart(28, "dd", 16);
20271
+ i0.ɵɵtemplate(29, QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template, 1, 1, "ccd-query-attachments-read", 17);
20199
20272
  i0.ɵɵelementEnd();
20200
- i0.ɵɵelementStart(29, "dd", 13)(30, "a", 14);
20201
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_30_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20202
- i0.ɵɵtext(31);
20203
- i0.ɵɵpipe(32, "rpxTranslate");
20273
+ i0.ɵɵelementStart(30, "dd", 14)(31, "a", 15);
20274
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_31_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20275
+ i0.ɵɵtext(32);
20276
+ i0.ɵɵpipe(33, "rpxTranslate");
20204
20277
  i0.ɵɵelementEnd()()()();
20205
- i0.ɵɵelement(33, "br");
20206
- i0.ɵɵelementStart(34, "div")(35, "button", 17);
20207
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_35_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20208
- i0.ɵɵtext(36);
20209
- i0.ɵɵpipe(37, "rpxTranslate");
20278
+ i0.ɵɵelement(34, "br");
20279
+ i0.ɵɵelementStart(35, "div")(36, "button", 18);
20280
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_36_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20281
+ i0.ɵɵtext(37);
20282
+ i0.ɵɵpipe(38, "rpxTranslate");
20210
20283
  i0.ɵɵelementEnd();
20211
- i0.ɵɵelementStart(38, "button", 18);
20212
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_38_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.submit()); });
20213
- i0.ɵɵtext(39);
20214
- i0.ɵɵpipe(40, "rpxTranslate");
20284
+ i0.ɵɵelementStart(39, "button", 19);
20285
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_39_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.submit()); });
20286
+ i0.ɵɵtext(40);
20287
+ i0.ɵɵpipe(41, "rpxTranslate");
20215
20288
  i0.ɵɵelementEnd()()();
20216
- i0.ɵɵelement(41, "ccd-query-event-completion", 19);
20289
+ i0.ɵɵelement(42, "ccd-query-event-completion", 20);
20217
20290
  i0.ɵɵelementEnd();
20218
20291
  } if (rf & 2) {
20219
- let tmp_6_0;
20220
- const defaultCheckYourAnswersTitle_r7 = i0.ɵɵreference(6);
20292
+ let tmp_7_0;
20293
+ const defaultCheckYourAnswersTitle_r8 = i0.ɵɵreference(7);
20221
20294
  i0.ɵɵadvance(2);
20295
+ i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
20296
+ i0.ɵɵadvance();
20222
20297
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
20223
20298
  i0.ɵɵadvance(2);
20224
- i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r7);
20299
+ i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r8);
20225
20300
  i0.ɵɵadvance(5);
20226
20301
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext !== ctx.queryCreateContextEnum.FOLLOWUP);
20227
20302
  i0.ɵɵadvance(4);
20228
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(14, 14, "Query detail"), " ");
20303
+ i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(15, 15, "Query detail"), " ");
20229
20304
  i0.ɵɵadvance(3);
20230
- i0.ɵɵtextInterpolate1(" ", (tmp_6_0 = ctx.formGroup.get("body")) == null ? null : tmp_6_0.value, " ");
20305
+ i0.ɵɵtextInterpolate1(" ", (tmp_7_0 = ctx.formGroup.get("body")) == null ? null : tmp_7_0.value, " ");
20231
20306
  i0.ɵɵadvance(3);
20232
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 16, "Change"), " ");
20307
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 17, "Change"), " ");
20233
20308
  i0.ɵɵadvance(2);
20234
20309
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
20235
20310
  i0.ɵɵadvance(4);
20236
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(26, 18, "Document attached"), " ");
20311
+ i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(27, 19, "Document attached"), " ");
20237
20312
  i0.ɵɵadvance(3);
20238
20313
  i0.ɵɵproperty("ngIf", ctx.formGroup.get("attachments").value);
20239
20314
  i0.ɵɵadvance(3);
20240
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(32, 20, "Change"), " ");
20315
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(33, 21, "Change"), " ");
20241
20316
  i0.ɵɵadvance(5);
20242
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(37, 22, "Previous"), " ");
20317
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(38, 23, "Previous"), " ");
20243
20318
  i0.ɵɵadvance(3);
20244
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(40, 24, "Submit"), " ");
20319
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(41, 25, "Submit"), " ");
20245
20320
  i0.ɵɵadvance(2);
20246
20321
  i0.ɵɵproperty("eventCompletionParams", ctx.eventCompletionParams);
20247
20322
  } }, styles: [".govuk-summary-list__value--documentAttached[_ngcontent-%COMP%]{vertical-align:middle}"] });
20248
20323
  }
20249
20324
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
20250
20325
  type: Component,
20251
- args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"this.formGroup.get('attachments').value\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
20252
- }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }], { formGroup: [{
20326
+ args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <!-- Error message summary -->\n <div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\"\n aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{ 'There is a problem' | rpxTranslate }}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a [id]=\"'error-' + errorMessage.fieldId\" href=\"javascript:void(0)\"\n class=\"validation-error\">{{ errorMessage.description | rpxTranslate }}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"this.formGroup.get('attachments').value\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
20327
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: EventTriggerService }], { formGroup: [{
20253
20328
  type: Input
20254
20329
  }], queryItem: [{
20255
20330
  type: Input
20256
20331
  }], queryCreateContext: [{
20257
20332
  type: Input
20333
+ }], eventData: [{
20334
+ type: Input
20258
20335
  }], backClicked: [{
20259
20336
  type: Output
20260
20337
  }], querySubmitted: [{
20261
20338
  type: Output
20262
20339
  }] }); })();
20263
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 24 }); })();
20340
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 23 }); })();
20264
20341
 
20265
20342
  function QueryDetailsComponent_ng_container_0_tr_45_Template(rf, ctx) { if (rf & 1) {
20266
20343
  i0.ɵɵelementStart(0, "tr", 11)(1, "th", 7);
@@ -20577,7 +20654,7 @@ class QueryDetailsComponent {
20577
20654
  }
20578
20655
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
20579
20656
  type: Component,
20580
- args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated ? 'Yes' : 'No') }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div>\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
20657
+ args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated ? 'Yes' : 'No') }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div>\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
20581
20658
  }], () => [{ type: SessionStorageService }], { query: [{
20582
20659
  type: Input
20583
20660
  }], backClicked: [{
@@ -21159,7 +21236,7 @@ class QueryWriteRaiseQueryComponent {
21159
21236
  }], submitted: [{
21160
21237
  type: Input
21161
21238
  }] }); })();
21162
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 9 }); })();
21239
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
21163
21240
 
21164
21241
  function QueryWriteRespondToQueryComponent_p_23_Template(rf, ctx) { if (rf & 1) {
21165
21242
  i0.ɵɵelementStart(0, "p", 13)(1, "span", 14);
@@ -21386,7 +21463,7 @@ class QueryConfirmationComponent {
21386
21463
  }] }); })();
21387
21464
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryConfirmationComponent, { className: "QueryConfirmationComponent", filePath: "lib/shared/components/palette/query-management/components/query-confirmation/query-confirmation.component.ts", lineNumber: 9 }); })();
21388
21465
 
21389
- const _c0$B = a0 => ["/query-management", "query", a0, "4"];
21466
+ const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
21390
21467
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
21391
21468
  const _r1 = i0.ɵɵgetCurrentView();
21392
21469
  i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
@@ -21425,7 +21502,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template
21425
21502
  } if (rf & 2) {
21426
21503
  const ctx_r1 = i0.ɵɵnextContext(2);
21427
21504
  i0.ɵɵadvance();
21428
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(4, _c0$B, ctx_r1.caseId));
21505
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
21429
21506
  i0.ɵɵadvance();
21430
21507
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
21431
21508
  } }
@@ -21455,7 +21532,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if
21455
21532
  i0.ɵɵelementStart(5, "ccd-query-details", 8);
21456
21533
  i0.ɵɵlistener("backClicked", function ReadQueryManagementFieldComponent_ng_template_1_Template_ccd_query_details_backClicked_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showQueryList = true); });
21457
21534
  i0.ɵɵelementEnd();
21458
- i0.ɵɵtemplate(6, ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template, 4, 6, "ng-container", 2)(7, ReadQueryManagementFieldComponent_ng_template_1_ng_template_7_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21535
+ i0.ɵɵtemplate(6, ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template, 4, 7, "ng-container", 2)(7, ReadQueryManagementFieldComponent_ng_template_1_ng_template_7_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21459
21536
  } if (rf & 2) {
21460
21537
  const queryIsInReview_r5 = i0.ɵɵreference(8);
21461
21538
  const ctx_r1 = i0.ɵɵnextContext();
@@ -21487,7 +21564,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21487
21564
  if (this.route.snapshot.data.case?.tabs) {
21488
21565
  this.caseQueriesCollections = this.route.snapshot.data.case.tabs
21489
21566
  .filter((tab) => tab.fields?.some((caseField) => caseField.field_type.type === 'ComponentLauncher' && caseField.id === this.caseField.id))[0].fields?.reduce((acc, caseField) => {
21490
- const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField, caseField.id);
21567
+ const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
21491
21568
  if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
21492
21569
  acc.push(extractedCaseQueriesFromCaseField);
21493
21570
  }
@@ -21516,7 +21593,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21516
21593
  }
21517
21594
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
21518
21595
  type: Component,
21519
- args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <br>\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"backToQueryListPage()\">{{ 'Back to queries' | rpxTranslate }}</a>\n </p>\n\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"query?.children?.length > 0; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4']\"\n >\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n</ng-template>\n" }]
21596
+ args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <br>\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"backToQueryListPage()\">{{ 'Back to queries' | rpxTranslate }}</a>\n </p>\n\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n <ng-container *ngIf=\"query?.children?.length > 0; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\"\n >\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n</ng-template>\n" }]
21520
21597
  }], () => [{ type: i1$1.ActivatedRoute }], null); })();
21521
21598
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 12 }); })();
21522
21599
 
@@ -28872,7 +28949,7 @@ i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return
28872
28949
  QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
28873
28950
  i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
28874
28951
  QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
28875
- i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgIf, QueryCaseDetailsHeaderComponent,
28952
+ i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
28876
28953
  QueryAttachmentsReadComponent,
28877
28954
  QueryEventCompletionComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
28878
28955
  i0.ɵɵsetComponentScope(QueryWriteAddDocumentsComponent, function () { return [i4.NgControlStatusGroup, i4.FormGroupDirective, WriteCollectionFieldComponent]; }, []);
@@ -28880,6 +28957,10 @@ i0.ɵɵsetComponentScope(QueryAttachmentsReadComponent, function () { return [i5
28880
28957
  i0.ɵɵsetComponentScope(QueryEventCompletionComponent, function () { return [
28881
28958
  // Case event completion
28882
28959
  CaseEventCompletionComponent]; }, []);
28960
+ i0.ɵɵsetComponentScope(
28961
+ // Case event completion
28962
+ CaseEventCompletionComponent, function () { return [i5.NgIf, CaseEventCompletionTaskCancelledComponent,
28963
+ CaseEventCompletionTaskReassignedComponent]; }, []);
28883
28964
 
28884
28965
  var CaseEditSubmitTitles;
28885
28966
  (function (CaseEditSubmitTitles) {
@@ -33942,24 +34023,38 @@ class EventStartGuard {
33942
34023
  workAllocationService;
33943
34024
  router;
33944
34025
  sessionStorageService;
34026
+ abstractConfig;
33945
34027
  static CLIENT_CONTEXT = 'clientContext';
33946
- constructor(workAllocationService, router, sessionStorageService) {
34028
+ constructor(workAllocationService, router, sessionStorageService, abstractConfig) {
33947
34029
  this.workAllocationService = workAllocationService;
33948
34030
  this.router = router;
33949
34031
  this.sessionStorageService = sessionStorageService;
34032
+ this.abstractConfig = abstractConfig;
33950
34033
  }
33951
34034
  canActivate(route) {
33952
34035
  const caseId = route.params['cid'];
33953
34036
  const eventId = route.params['eid'];
33954
34037
  const taskId = route.queryParams['tid'];
34038
+ let userId;
34039
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
34040
+ if (userInfoStr) {
34041
+ const userInfo = JSON.parse(userInfoStr);
34042
+ userId = userInfo.id ? userInfo.id : userInfo.uid;
34043
+ }
33955
34044
  const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
33956
34045
  if (caseInfoStr) {
33957
34046
  const caseInfo = JSON.parse(caseInfoStr);
33958
34047
  if (caseInfo && caseInfo.cid === caseId) {
33959
34048
  return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
33960
- .pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId)));
34049
+ .pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId, userId)));
34050
+ }
34051
+ else {
34052
+ this.abstractConfig.logMessage(`EventStartGuard: caseId ${caseInfo.cid} in caseInfo not matched with the route parameter caseId ${caseId}`);
33961
34053
  }
33962
34054
  }
34055
+ else {
34056
+ this.abstractConfig.logMessage(`EventStartGuard: caseInfo details not available in session storage for ${caseId}`);
34057
+ }
33963
34058
  return of(false);
33964
34059
  }
33965
34060
  checkTaskInEventNotRequired(payload, caseId, taskId) {
@@ -34008,11 +34103,28 @@ class EventStartGuard {
34008
34103
  removeTaskFromSessionStorage() {
34009
34104
  this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
34010
34105
  }
34011
- checkForTasks(payload, caseId, eventId, taskId) {
34106
+ checkForTasks(payload, caseId, eventId, taskId, userId) {
34012
34107
  if (taskId && payload?.tasks?.length > 0) {
34013
34108
  const task = payload.tasks.find((t) => t.id == taskId);
34014
34109
  if (task) {
34015
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
34110
+ // Store task to session
34111
+ const taskEventCompletionInfo = {
34112
+ caseId: caseId,
34113
+ eventId: eventId,
34114
+ userId: userId,
34115
+ taskId: task.id,
34116
+ createdTimestamp: Date.now()
34117
+ };
34118
+ const storeClientContext = {
34119
+ client_context: {
34120
+ user_task: {
34121
+ task_data: task,
34122
+ complete_task: true
34123
+ }
34124
+ }
34125
+ };
34126
+ this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34127
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34016
34128
  }
34017
34129
  else {
34018
34130
  this.removeTaskFromSessionStorage();
@@ -34033,12 +34145,12 @@ class EventStartGuard {
34033
34145
  return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
34034
34146
  }
34035
34147
  }
34036
- static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
34148
+ static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig)); };
34037
34149
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
34038
34150
  }
34039
34151
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
34040
34152
  type: Injectable
34041
- }], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }], null); })();
34153
+ }], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
34042
34154
 
34043
34155
  var EventStartStates;
34044
34156
  (function (EventStartStates) {
@@ -34191,6 +34303,20 @@ class EventStartStateMachineService {
34191
34303
  }
34192
34304
  };
34193
34305
  context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
34306
+ let userInfo;
34307
+ const userInfoStr = context.sessionStorageService.getItem('userDetails');
34308
+ if (userInfoStr) {
34309
+ userInfo = JSON.parse(userInfoStr);
34310
+ }
34311
+ // Store task to session
34312
+ const taskEventCompletionInfo = {
34313
+ caseId: context.caseId,
34314
+ eventId: context.eventId,
34315
+ userId: userInfo.id ? userInfo.id : userInfo.uid,
34316
+ taskId: task.id,
34317
+ createdTimestamp: Date.now()
34318
+ };
34319
+ context.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34194
34320
  // Allow user to perform the event
34195
34321
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
34196
34322
  }
@@ -34290,9 +34416,11 @@ class EventStartComponent {
34290
34416
  class EventTasksResolverService {
34291
34417
  service;
34292
34418
  sessionStorageService;
34293
- constructor(service, sessionStorageService) {
34419
+ abstractConfig;
34420
+ constructor(service, sessionStorageService, abstractConfig) {
34294
34421
  this.service = service;
34295
34422
  this.sessionStorageService = sessionStorageService;
34423
+ this.abstractConfig = abstractConfig;
34296
34424
  }
34297
34425
  resolve(route) {
34298
34426
  const eventId = route.queryParamMap.get('eventId');
@@ -34303,13 +34431,16 @@ class EventTasksResolverService {
34303
34431
  return this.service.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
34304
34432
  .pipe(map((payload) => payload.tasks));
34305
34433
  }
34434
+ else {
34435
+ this.abstractConfig.logMessage(`EventTasksResolverService: caseInfo details not available in session storage for ${caseId}`);
34436
+ }
34306
34437
  }
34307
- static ɵfac = function EventTasksResolverService_Factory(t) { return new (t || EventTasksResolverService)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(SessionStorageService)); };
34438
+ static ɵfac = function EventTasksResolverService_Factory(t) { return new (t || EventTasksResolverService)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig)); };
34308
34439
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTasksResolverService, factory: EventTasksResolverService.ɵfac });
34309
34440
  }
34310
34441
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTasksResolverService, [{
34311
34442
  type: Injectable
34312
- }], () => [{ type: WorkAllocationService }, { type: SessionStorageService }], null); })();
34443
+ }], () => [{ type: WorkAllocationService }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
34313
34444
 
34314
34445
  class EventStartModule {
34315
34446
  static ɵfac = function EventStartModule_Factory(t) { return new (t || EventStartModule)(); };