@hmcts/ccd-case-ui-toolkit 7.0.61-exui-2086-rc1 → 7.0.61-task-changed-on-completion

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 (35) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-editor.module.mjs +1 -1
  2. package/esm2022/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.mjs +40 -28
  3. 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
  4. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +26 -38
  5. package/esm2022/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.mjs +1 -1
  6. package/esm2022/lib/shared/components/case-editor/domain/event-completion-task-states.model.mjs +6 -0
  7. package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +10 -4
  8. package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +1 -1
  9. package/esm2022/lib/shared/components/palette/case-file-view/case-file-view-field.component.mjs +7 -8
  10. package/esm2022/lib/shared/components/palette/palette.module.mjs +5 -1
  11. package/esm2022/lib/shared/domain/work-allocation/task-response.model.mjs +1 -1
  12. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +151 -129
  13. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  14. package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
  15. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts +5 -3
  16. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  17. 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
  18. 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
  19. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +6 -11
  20. 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
  21. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts +1 -1
  22. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts.map +1 -1
  23. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts +5 -0
  24. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts.map +1 -0
  25. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  26. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts +2 -2
  27. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  28. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +0 -1
  29. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
  30. package/lib/shared/domain/work-allocation/task-response.model.d.ts +1 -1
  31. package/lib/shared/domain/work-allocation/task-response.model.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/esm2022/lib/shared/components/case-editor/domain/event-completion-portal-types.model.mjs +0 -6
  34. package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts +0 -5
  35. 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';
@@ -52,6 +51,7 @@ import * as i15 from '@angular/material/legacy-input';
52
51
  import { MatLegacyInputModule } from '@angular/material/legacy-input';
53
52
  import * as i14 from '@hmcts/media-viewer';
54
53
  import { MediaViewerModule } from '@hmcts/media-viewer';
54
+ import { PortalModule } from '@angular/cdk/portal';
55
55
  import * as i2$3 from 'ngx-pagination';
56
56
  import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
57
57
  import * as i10 from '@angular/material/legacy-tabs';
@@ -8676,11 +8676,11 @@ var TaskState;
8676
8676
  TaskState["PendingReConfiguration"] = "PENDING_RECONFIGURATION";
8677
8677
  })(TaskState || (TaskState = {}));
8678
8678
 
8679
- var EventCompletionPortalTypes;
8680
- (function (EventCompletionPortalTypes) {
8681
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskCancelled"] = 0] = "TaskCancelled";
8682
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskReassigned"] = 1] = "TaskReassigned";
8683
- })(EventCompletionPortalTypes || (EventCompletionPortalTypes = {}));
8679
+ var EventCompletionTaskStates;
8680
+ (function (EventCompletionTaskStates) {
8681
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskCancelled"] = 0] = "TaskCancelled";
8682
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskReassigned"] = 1] = "TaskReassigned";
8683
+ })(EventCompletionTaskStates || (EventCompletionTaskStates = {}));
8684
8684
 
8685
8685
  const EVENT_COMPLETION_STATE_MACHINE = 'EVENT COMPLETION STATE MACHINE';
8686
8686
  class EventCompletionStateMachineService {
@@ -8719,6 +8719,7 @@ class EventCompletionStateMachineService {
8719
8719
  this.addTransitionsForStateTaskUnassigned();
8720
8720
  }
8721
8721
  entryActionForStateCheckTasksCanBeCompleted(state, context) {
8722
+ const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8722
8723
  context.workAllocationService.getTask(context.task.id).subscribe(taskResponse => {
8723
8724
  if (taskResponse && taskResponse.task && taskResponse.task.task_state) {
8724
8725
  switch (taskResponse.task.task_state.toUpperCase()) {
@@ -8738,6 +8739,11 @@ class EventCompletionStateMachineService {
8738
8739
  // Task still assigned to current user, complete event and task
8739
8740
  state.trigger(EventCompletionStates.CompleteEventAndTask);
8740
8741
  }
8742
+ else if (assignNeeded === 'true - override') {
8743
+ // this will treat task as unassigned instead of reassigned to complete after user confirmation
8744
+ // assignNeeded will also be immediately overwritten to true
8745
+ state.trigger(EventCompletionStates.TaskUnassigned);
8746
+ }
8741
8747
  else {
8742
8748
  // Task has been reassigned to another user, display error message
8743
8749
  context.reassignedTask = taskResponse.task;
@@ -8759,7 +8765,7 @@ class EventCompletionStateMachineService {
8759
8765
  // Trigger final state to complete processing of state machine
8760
8766
  state.trigger(EventCompletionStates.Final);
8761
8767
  // Load case event completion task cancelled component
8762
- context.component.showPortal(EventCompletionPortalTypes.TaskCancelled);
8768
+ context.component.setTaskState(EventCompletionTaskStates.TaskCancelled);
8763
8769
  }
8764
8770
  entryActionForStateCompleteEventAndTask(state, context) {
8765
8771
  // Trigger final state to complete processing of state machine
@@ -8779,7 +8785,7 @@ class EventCompletionStateMachineService {
8779
8785
  // Trigger final state to complete processing of state machine
8780
8786
  state.trigger(EventCompletionStates.Final);
8781
8787
  // Load case event completion task reassigned component
8782
- context.component.showPortal(EventCompletionPortalTypes.TaskReassigned);
8788
+ context.component.setTaskState(EventCompletionTaskStates.TaskReassigned);
8783
8789
  }
8784
8790
  entryActionForStateTaskUnassigned(state, context) {
8785
8791
  // Trigger final state to complete processing of state machine
@@ -10958,20 +10964,118 @@ class CallbackErrorsComponent {
10958
10964
  }] }); })();
10959
10965
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CallbackErrorsComponent, { className: "CallbackErrorsComponent", filePath: "lib/shared/components/error/callback-errors.component.ts", lineNumber: 10 }); })();
10960
10966
 
10967
+ function CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template(rf, ctx) { if (rf & 1) {
10968
+ const _r1 = i0.ɵɵgetCurrentView();
10969
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-cancelled", 2);
10970
+ 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)); });
10971
+ i0.ɵɵelementEnd();
10972
+ } if (rf & 2) {
10973
+ const ctx_r1 = i0.ɵɵnextContext();
10974
+ i0.ɵɵproperty("context", ctx_r1.context);
10975
+ } }
10976
+ function CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template(rf, ctx) { if (rf & 1) {
10977
+ const _r3 = i0.ɵɵgetCurrentView();
10978
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-reassigned", 3);
10979
+ 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)); });
10980
+ i0.ɵɵelementEnd();
10981
+ } if (rf & 2) {
10982
+ const ctx_r1 = i0.ɵɵnextContext();
10983
+ i0.ɵɵproperty("context", ctx_r1.context);
10984
+ } }
10985
+ const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
10986
+ class CaseEventCompletionComponent {
10987
+ service;
10988
+ router;
10989
+ route;
10990
+ sessionStorageService;
10991
+ workAllocationService;
10992
+ alertService;
10993
+ eventCompletionParams;
10994
+ eventCanBeCompleted = new EventEmitter();
10995
+ eventCompletionTaskStates = EventCompletionTaskStates;
10996
+ stateMachine;
10997
+ context;
10998
+ taskState;
10999
+ constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11000
+ this.service = service;
11001
+ this.router = router;
11002
+ this.route = route;
11003
+ this.sessionStorageService = sessionStorageService;
11004
+ this.workAllocationService = workAllocationService;
11005
+ this.alertService = alertService;
11006
+ }
11007
+ ngOnChanges(changes) {
11008
+ if (changes.eventCompletionParams?.currentValue) {
11009
+ // Setup the context
11010
+ this.context = {
11011
+ task: this.eventCompletionParams.task,
11012
+ caseId: this.eventCompletionParams.caseId,
11013
+ eventId: this.eventCompletionParams.eventId,
11014
+ reassignedTask: null,
11015
+ router: this.router,
11016
+ route: this.route,
11017
+ sessionStorageService: this.sessionStorageService,
11018
+ workAllocationService: this.workAllocationService,
11019
+ alertService: this.alertService,
11020
+ canBeCompleted: false,
11021
+ component: this
11022
+ };
11023
+ // Initialise state machine
11024
+ this.stateMachine = this.service.initialiseStateMachine(this.context);
11025
+ // Create states
11026
+ this.service.createStates(this.stateMachine);
11027
+ // Add transitions for the states
11028
+ this.service.addTransitions();
11029
+ // Start state machine
11030
+ this.service.startStateMachine(this.stateMachine);
11031
+ }
11032
+ }
11033
+ setTaskState(taskState) {
11034
+ this.taskState = taskState;
11035
+ }
11036
+ setEventCanBeCompleted(completable) {
11037
+ // note: event not completed from here as will then skip task completion
11038
+ if (!completable) {
11039
+ // if event cannot be completed ensure that this is communicated
11040
+ // otherwise this will be handled via onchanges
11041
+ this.eventCanBeCompleted.emit(completable);
11042
+ }
11043
+ }
11044
+ 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)); };
11045
+ 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) {
11046
+ 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);
11047
+ } if (rf & 2) {
11048
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskCancelled);
11049
+ i0.ɵɵadvance();
11050
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskReassigned);
11051
+ } }, encapsulation: 2 });
11052
+ }
11053
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11054
+ type: Component,
11055
+ 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>" }]
11056
+ }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11057
+ type: Input
11058
+ }], eventCanBeCompleted: [{
11059
+ type: Output
11060
+ }] }); })();
11061
+ (() => { (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 }); })();
11062
+
10961
11063
  const _c0$X = a0 => ["/", "cases", "case-details", a0, "tasks"];
10962
11064
  class CaseEventCompletionTaskCancelledComponent {
10963
- parentComponent;
11065
+ context;
11066
+ notifyEventCompletionCancelled = new EventEmitter();
10964
11067
  caseId;
10965
- constructor(parentComponent) {
10966
- this.parentComponent = parentComponent;
10967
- this.caseId = this.parentComponent.context.caseId;
11068
+ ngOnInit() {
11069
+ this.caseId = this.context.caseId;
10968
11070
  }
10969
11071
  onContinue() {
10970
- // Emit event can be completed event
10971
- this.parentComponent.eventCanBeCompleted.emit(true);
11072
+ // Removes task to complete so event completes without task
11073
+ this.context.sessionStorageService.removeItem('taskToComplete');
11074
+ // may be able to remove this call below since it is now unneccesary
11075
+ this.notifyEventCompletionCancelled.emit(true);
10972
11076
  }
10973
- static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(i0.ɵɵdirectiveInject(COMPONENT_PORTAL_INJECTION_TOKEN)); };
10974
- 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) {
11077
+ static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(); };
11078
+ 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) {
10975
11079
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
10976
11080
  i0.ɵɵtext(3);
10977
11081
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -11029,11 +11133,12 @@ class CaseEventCompletionTaskCancelledComponent {
11029
11133
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskCancelledComponent, [{
11030
11134
  type: Component,
11031
11135
  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" }]
11032
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11033
- type: Inject,
11034
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11035
- }] }], null); })();
11036
- (() => { (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 }); })();
11136
+ }], null, { context: [{
11137
+ type: Input
11138
+ }], notifyEventCompletionCancelled: [{
11139
+ type: Output
11140
+ }] }); })();
11141
+ (() => { (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 }); })();
11037
11142
 
11038
11143
  const _c0$W = a0 => ["/", "cases", "case-details", a0, "tasks"];
11039
11144
  function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if (rf & 1) {
@@ -11093,32 +11198,26 @@ function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if
11093
11198
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 24, "Cancel"), " ");
11094
11199
  } }
11095
11200
  class CaseEventCompletionTaskReassignedComponent {
11096
- parentComponent;
11097
- route;
11098
- workAllocationService;
11099
11201
  sessionStorageService;
11100
11202
  judicialworkerService;
11101
11203
  caseworkerService;
11102
- alertService;
11204
+ context;
11205
+ notifyEventCompletionReassigned = new EventEmitter();
11103
11206
  caseId;
11104
11207
  assignedUserId;
11105
11208
  assignedUserName;
11106
11209
  subscription;
11107
11210
  caseworkerSubscription;
11108
11211
  judicialworkerSubscription;
11109
- constructor(parentComponent, route, workAllocationService, sessionStorageService, judicialworkerService, caseworkerService, alertService) {
11110
- this.parentComponent = parentComponent;
11111
- this.route = route;
11112
- this.workAllocationService = workAllocationService;
11212
+ constructor(sessionStorageService, judicialworkerService, caseworkerService) {
11113
11213
  this.sessionStorageService = sessionStorageService;
11114
11214
  this.judicialworkerService = judicialworkerService;
11115
11215
  this.caseworkerService = caseworkerService;
11116
- this.alertService = alertService;
11117
11216
  }
11118
11217
  ngOnInit() {
11119
11218
  // Get case id and task from the parent component
11120
- this.caseId = this.parentComponent.context.caseId;
11121
- const task = this.parentComponent.context.reassignedTask;
11219
+ this.caseId = this.context.caseId;
11220
+ const task = this.context.reassignedTask;
11122
11221
  // Current user is a caseworker?
11123
11222
  this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
11124
11223
  if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
@@ -11159,17 +11258,17 @@ class CaseEventCompletionTaskReassignedComponent {
11159
11258
  // Get task details
11160
11259
  const taskStr = this.sessionStorageService.getItem('taskToComplete');
11161
11260
  if (taskStr) {
11162
- this.sessionStorageService.setItem('assignNeeded', 'true');
11163
- // set event can be completed to true
11164
- this.parentComponent.eventCanBeCompleted.emit(true);
11261
+ // Set session to override reassignment settings so code flow does not return to this component
11262
+ this.sessionStorageService.setItem('assignNeeded', 'true - override');
11263
+ this.notifyEventCompletionReassigned.emit(true);
11165
11264
  }
11166
11265
  else {
11167
11266
  // Emit event cannot be completed event
11168
- this.parentComponent.eventCanBeCompleted.emit(false);
11267
+ this.notifyEventCompletionReassigned.emit(false);
11169
11268
  }
11170
11269
  }
11171
- 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)); };
11172
- 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) {
11270
+ static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(JudicialworkerService), i0.ɵɵdirectiveInject(CaseworkerService)); };
11271
+ 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) {
11173
11272
  i0.ɵɵtemplate(0, CaseEventCompletionTaskReassignedComponent_div_0_Template, 31, 28, "div", 0);
11174
11273
  } if (rf & 2) {
11175
11274
  i0.ɵɵproperty("ngIf", ctx.assignedUserName);
@@ -11178,92 +11277,12 @@ class CaseEventCompletionTaskReassignedComponent {
11178
11277
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskReassignedComponent, [{
11179
11278
  type: Component,
11180
11279
  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" }]
11181
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11182
- type: Inject,
11183
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11184
- }] }, { type: i1$1.ActivatedRoute }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }, { type: AlertService }], null); })();
11185
- (() => { (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: 16 }); })();
11186
-
11187
- function CaseEventCompletionComponent_ng_template_0_Template(rf, ctx) { }
11188
- const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
11189
- class CaseEventCompletionComponent {
11190
- service;
11191
- router;
11192
- route;
11193
- sessionStorageService;
11194
- workAllocationService;
11195
- alertService;
11196
- eventCompletionParams;
11197
- eventCanBeCompleted = new EventEmitter();
11198
- stateMachine;
11199
- context;
11200
- selectedComponentPortal;
11201
- constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11202
- this.service = service;
11203
- this.router = router;
11204
- this.route = route;
11205
- this.sessionStorageService = sessionStorageService;
11206
- this.workAllocationService = workAllocationService;
11207
- this.alertService = alertService;
11208
- }
11209
- ngOnChanges(changes) {
11210
- if (changes.eventCompletionParams && changes.eventCompletionParams.currentValue) {
11211
- // Setup the context
11212
- this.context = {
11213
- task: this.eventCompletionParams.task,
11214
- caseId: this.eventCompletionParams.caseId,
11215
- eventId: this.eventCompletionParams.eventId,
11216
- reassignedTask: null,
11217
- router: this.router,
11218
- route: this.route,
11219
- sessionStorageService: this.sessionStorageService,
11220
- workAllocationService: this.workAllocationService,
11221
- alertService: this.alertService,
11222
- canBeCompleted: false,
11223
- component: this
11224
- };
11225
- // Initialise state machine
11226
- this.stateMachine = this.service.initialiseStateMachine(this.context);
11227
- // Create states
11228
- this.service.createStates(this.stateMachine);
11229
- // Add transitions for the states
11230
- this.service.addTransitions();
11231
- // Start state machine
11232
- this.service.startStateMachine(this.stateMachine);
11233
- }
11234
- }
11235
- showPortal(portalType) {
11236
- const injector = Injector.create({
11237
- providers: [
11238
- { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
11239
- ]
11240
- });
11241
- // tslint:disable-next-line:switch-default
11242
- switch (portalType) {
11243
- case EventCompletionPortalTypes.TaskCancelled:
11244
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
11245
- break;
11246
- case EventCompletionPortalTypes.TaskReassigned:
11247
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskReassignedComponent, null, injector);
11248
- break;
11249
- }
11250
- }
11251
- 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)); };
11252
- 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) {
11253
- i0.ɵɵtemplate(0, CaseEventCompletionComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
11254
- } if (rf & 2) {
11255
- i0.ɵɵproperty("cdkPortalOutlet", ctx.selectedComponentPortal);
11256
- } }, encapsulation: 2 });
11257
- }
11258
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11259
- type: Component,
11260
- args: [{ selector: 'ccd-case-event-completion', template: "<ng-template [cdkPortalOutlet]=\"selectedComponentPortal\"></ng-template>\n" }]
11261
- }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11280
+ }], () => [{ type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }], { context: [{
11262
11281
  type: Input
11263
- }], eventCanBeCompleted: [{
11282
+ }], notifyEventCompletionReassigned: [{
11264
11283
  type: Output
11265
11284
  }] }); })();
11266
- (() => { (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 }); })();
11285
+ (() => { (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: 17 }); })();
11267
11286
 
11268
11287
  class AddressOption {
11269
11288
  description;
@@ -11917,7 +11936,7 @@ function CaseFileViewFieldComponent_div_2_ng_container_8_Template(rf, ctx) { if
11917
11936
  } if (rf & 2) {
11918
11937
  const ctx_r1 = i0.ɵɵnextContext(2);
11919
11938
  i0.ɵɵadvance();
11920
- i0.ɵɵproperty("url", ctx_r1.currentDocument.document_binary_url)("downloadFileName", ctx_r1.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r1.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh")("caseId", ctx_r1.caseId)("enableICP", ctx_r1.isIcpEnabled());
11939
+ i0.ɵɵproperty("url", ctx_r1.currentDocument.document_binary_url)("downloadFileName", ctx_r1.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r1.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh")("enableICP", ctx_r1.isIcpEnabled());
11921
11940
  } }
11922
11941
  function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11923
11942
  const _r3 = i0.ɵɵgetCurrentView();
@@ -11929,7 +11948,7 @@ function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11929
11948
  i0.ɵɵelementEnd()();
11930
11949
  i0.ɵɵelement(6, "div", 16);
11931
11950
  i0.ɵɵelementStart(7, "div", 17);
11932
- i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 9, "ng-container", 0);
11951
+ i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 8, "ng-container", 0);
11933
11952
  i0.ɵɵelementEnd()()();
11934
11953
  } if (rf & 2) {
11935
11954
  const ctx_r1 = i0.ɵɵnextContext();
@@ -11958,7 +11977,6 @@ class CaseFileViewFieldComponent {
11958
11977
  caseField;
11959
11978
  icp_jurisdictions = [];
11960
11979
  icpEnabled = false;
11961
- caseId;
11962
11980
  constructor(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService, caseNotifier, abstractConfig) {
11963
11981
  this.elementRef = elementRef;
11964
11982
  this.route = route;
@@ -11970,8 +11988,8 @@ class CaseFileViewFieldComponent {
11970
11988
  this.abstractConfig = abstractConfig;
11971
11989
  }
11972
11990
  ngOnInit() {
11973
- this.caseId = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
11974
- this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(this.caseId);
11991
+ const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
11992
+ this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(cid);
11975
11993
  this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments$.subscribe({
11976
11994
  next: data => {
11977
11995
  this.caseVersion = data.case_version;
@@ -12048,7 +12066,7 @@ class CaseFileViewFieldComponent {
12048
12066
  return this.icpEnabled && ((this.icp_jurisdictions?.length < 1) || this.icp_jurisdictions.includes(this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id));
12049
12067
  }
12050
12068
  static ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
12051
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [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, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "clickedDocument", "moveDocument", "categoriesAndDocuments", "allowMoving"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height", "caseId", "enableICP"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
12069
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [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, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "clickedDocument", "moveDocument", "categoriesAndDocuments", "allowMoving"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height", "enableICP"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
12052
12070
  i0.ɵɵtemplate(0, CaseFileViewFieldComponent_ng_container_0_Template, 8, 1, "ng-container", 0)(1, CaseFileViewFieldComponent_div_1_Template, 5, 0, "div", 1)(2, CaseFileViewFieldComponent_div_2_Template, 9, 3, "div", 0);
12053
12071
  } if (rf & 2) {
12054
12072
  i0.ɵɵproperty("ngIf", ctx.errorMessages == null ? null : ctx.errorMessages.length);
@@ -12060,7 +12078,7 @@ class CaseFileViewFieldComponent {
12060
12078
  }
12061
12079
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
12062
12080
  type: Component,
12063
- args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\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 href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\"\n [caseId]=\"caseId\"\n [enableICP]=\"isIcpEnabled()\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
12081
+ args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\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 href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\"\n [enableICP]=\"isIcpEnabled()\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
12064
12082
  }], () => [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
12065
12083
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFileViewFieldComponent, { className: "CaseFileViewFieldComponent", filePath: "lib/shared/components/palette/case-file-view/case-file-view-field.component.ts", lineNumber: 17 }); })();
12066
12084
 
@@ -28491,6 +28509,10 @@ i0.ɵɵsetComponentScope(QueryAttachmentsReadComponent, function () { return [i5
28491
28509
  i0.ɵɵsetComponentScope(QueryEventCompletionComponent, function () { return [
28492
28510
  // Case event completion
28493
28511
  CaseEventCompletionComponent]; }, []);
28512
+ i0.ɵɵsetComponentScope(
28513
+ // Case event completion
28514
+ CaseEventCompletionComponent, function () { return [i5.NgIf, CaseEventCompletionTaskCancelledComponent,
28515
+ CaseEventCompletionTaskReassignedComponent]; }, []);
28494
28516
 
28495
28517
  var CaseEditSubmitTitles;
28496
28518
  (function (CaseEditSubmitTitles) {