@hmcts/ccd-case-ui-toolkit 7.1.3-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.
- package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +60 -22
- package/esm2022/lib/shared/components/case-editor/case-editor.module.mjs +1 -1
- package/esm2022/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.mjs +40 -28
- 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
- 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
- package/esm2022/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.mjs +1 -1
- package/esm2022/lib/shared/components/case-editor/domain/event-completion-task-states.model.mjs +6 -0
- package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +12 -6
- package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +1 -1
- package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +40 -7
- package/esm2022/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.mjs +11 -4
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +15 -1
- package/esm2022/lib/shared/components/palette/case-file-view/case-file-view-field.component.mjs +8 -7
- package/esm2022/lib/shared/components/palette/palette.module.mjs +6 -2
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +169 -145
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +2 -2
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +2 -2
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +6 -6
- package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +7 -10
- package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/esm2022/lib/shared/domain/work-allocation/task-response.model.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +449 -317
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +5 -2
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts +5 -3
- package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
- 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
- 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
- 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
- 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
- package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts +1 -1
- package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts +5 -0
- package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts.map +1 -0
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts +2 -2
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +3 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts +3 -1
- package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts.map +1 -1
- package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +1 -0
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +10 -8
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +10 -1
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/task-response.model.d.ts +1 -1
- package/lib/shared/domain/work-allocation/task-response.model.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2022/lib/shared/components/case-editor/domain/event-completion-portal-types.model.mjs +0 -6
- package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts +0 -5
- 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,
|
|
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
|
|
8716
|
-
(function (
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
})(
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
9385
|
-
|
|
9386
|
-
const
|
|
9387
|
-
|
|
9388
|
-
|
|
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
|
-
|
|
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
|
|
9401
|
-
|
|
9402
|
-
|
|
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
|
|
9568
|
-
this.sessionStorageService.removeItem('
|
|
9569
|
-
this.sessionStorageService.removeItem('
|
|
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
|
|
9631
|
-
|
|
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 (!
|
|
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 (
|
|
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('
|
|
9643
|
-
this.sessionStorageService.removeItem('
|
|
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:
|
|
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
|
-
|
|
11151
|
+
context;
|
|
11152
|
+
notifyEventCompletionCancelled = new EventEmitter();
|
|
11011
11153
|
caseId;
|
|
11012
|
-
|
|
11013
|
-
this.
|
|
11014
|
-
this.caseId = this.parentComponent.context.caseId;
|
|
11154
|
+
ngOnInit() {
|
|
11155
|
+
this.caseId = this.context.caseId;
|
|
11015
11156
|
}
|
|
11016
11157
|
onContinue() {
|
|
11017
|
-
//
|
|
11018
|
-
this.
|
|
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)(
|
|
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
|
-
}],
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
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
|
-
|
|
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(
|
|
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.
|
|
11168
|
-
const task = this.
|
|
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
|
|
11214
|
-
|
|
11215
|
-
this.
|
|
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.
|
|
11357
|
+
this.notifyEventCompletionReassigned.emit(false);
|
|
11220
11358
|
}
|
|
11221
11359
|
}
|
|
11222
|
-
static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(
|
|
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:
|
|
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
|
-
}],
|
|
11372
|
+
}], notifyEventCompletionReassigned: [{
|
|
11315
11373
|
type: Output
|
|
11316
11374
|
}] }); })();
|
|
11317
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(
|
|
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;
|
|
@@ -11968,7 +12026,7 @@ function CaseFileViewFieldComponent_div_2_ng_container_8_Template(rf, ctx) { if
|
|
|
11968
12026
|
} if (rf & 2) {
|
|
11969
12027
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
11970
12028
|
i0.ɵɵadvance();
|
|
11971
|
-
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());
|
|
12029
|
+
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());
|
|
11972
12030
|
} }
|
|
11973
12031
|
function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
11974
12032
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
@@ -11980,7 +12038,7 @@ function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11980
12038
|
i0.ɵɵelementEnd()();
|
|
11981
12039
|
i0.ɵɵelement(6, "div", 16);
|
|
11982
12040
|
i0.ɵɵelementStart(7, "div", 17);
|
|
11983
|
-
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2,
|
|
12041
|
+
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 9, "ng-container", 0);
|
|
11984
12042
|
i0.ɵɵelementEnd()()();
|
|
11985
12043
|
} if (rf & 2) {
|
|
11986
12044
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -12009,6 +12067,7 @@ class CaseFileViewFieldComponent {
|
|
|
12009
12067
|
caseField;
|
|
12010
12068
|
icp_jurisdictions = [];
|
|
12011
12069
|
icpEnabled = false;
|
|
12070
|
+
caseId;
|
|
12012
12071
|
constructor(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService, caseNotifier, abstractConfig) {
|
|
12013
12072
|
this.elementRef = elementRef;
|
|
12014
12073
|
this.route = route;
|
|
@@ -12020,8 +12079,8 @@ class CaseFileViewFieldComponent {
|
|
|
12020
12079
|
this.abstractConfig = abstractConfig;
|
|
12021
12080
|
}
|
|
12022
12081
|
ngOnInit() {
|
|
12023
|
-
|
|
12024
|
-
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(
|
|
12082
|
+
this.caseId = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
12083
|
+
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(this.caseId);
|
|
12025
12084
|
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments$.subscribe({
|
|
12026
12085
|
next: data => {
|
|
12027
12086
|
this.caseVersion = data.case_version;
|
|
@@ -12098,7 +12157,7 @@ class CaseFileViewFieldComponent {
|
|
|
12098
12157
|
return this.icpEnabled && ((this.icp_jurisdictions?.length < 1) || this.icp_jurisdictions.includes(this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id));
|
|
12099
12158
|
}
|
|
12100
12159
|
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)); };
|
|
12101
|
-
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) {
|
|
12160
|
+
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) {
|
|
12102
12161
|
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);
|
|
12103
12162
|
} if (rf & 2) {
|
|
12104
12163
|
i0.ɵɵproperty("ngIf", ctx.errorMessages == null ? null : ctx.errorMessages.length);
|
|
@@ -12110,7 +12169,7 @@ class CaseFileViewFieldComponent {
|
|
|
12110
12169
|
}
|
|
12111
12170
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
|
|
12112
12171
|
type: Component,
|
|
12113
|
-
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"] }]
|
|
12172
|
+
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"] }]
|
|
12114
12173
|
}], () => [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
12115
12174
|
(() => { (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 }); })();
|
|
12116
12175
|
|
|
@@ -19595,19 +19654,15 @@ class QueryManagementUtils {
|
|
|
19595
19654
|
static caseLevelCaseFieldId = 'CaseQueriesCollection';
|
|
19596
19655
|
static FIELD_TYPE_COLLECTION = 'Collection';
|
|
19597
19656
|
static FIELD_TYPE_COMPLEX = 'Complex';
|
|
19598
|
-
static extractCaseQueriesFromCaseField(caseField
|
|
19657
|
+
static extractCaseQueriesFromCaseField(caseField) {
|
|
19599
19658
|
const { field_type, value } = caseField;
|
|
19600
19659
|
// Handle Complex type fields
|
|
19601
19660
|
if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
|
|
19602
|
-
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId
|
|
19661
|
+
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId && QueryManagementUtils.isNonEmptyObject(value)) {
|
|
19603
19662
|
return value;
|
|
19604
19663
|
}
|
|
19605
|
-
return
|
|
19664
|
+
return null;
|
|
19606
19665
|
}
|
|
19607
|
-
// Handle Collection type fields
|
|
19608
|
-
// if (field_type.type === QueryManagementUtils.FIELD_TYPE_COLLECTION) {
|
|
19609
|
-
// return [];
|
|
19610
|
-
// }
|
|
19611
19666
|
}
|
|
19612
19667
|
static documentToCollectionFormDocument(document) {
|
|
19613
19668
|
return {
|
|
@@ -19630,7 +19685,7 @@ class QueryManagementUtils {
|
|
|
19630
19685
|
: null;
|
|
19631
19686
|
const attachments = formGroup.get('attachments').value;
|
|
19632
19687
|
return {
|
|
19633
|
-
id:
|
|
19688
|
+
id: v4(),
|
|
19634
19689
|
subject,
|
|
19635
19690
|
name: currentUserName,
|
|
19636
19691
|
body,
|
|
@@ -19648,7 +19703,7 @@ class QueryManagementUtils {
|
|
|
19648
19703
|
const attachments = formGroup.get('attachments').value;
|
|
19649
19704
|
queryItem.isHearingRelated = queryItem.isHearingRelated ? 'Yes' : 'No';
|
|
19650
19705
|
return {
|
|
19651
|
-
id:
|
|
19706
|
+
id: v4(),
|
|
19652
19707
|
subject: queryItem.subject,
|
|
19653
19708
|
name: currentUserName,
|
|
19654
19709
|
body,
|
|
@@ -19865,9 +19920,36 @@ class QueryListData {
|
|
|
19865
19920
|
}
|
|
19866
19921
|
}
|
|
19867
19922
|
|
|
19868
|
-
function
|
|
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) {
|
|
19869
19951
|
i0.ɵɵelementContainerStart(0);
|
|
19870
|
-
i0.ɵɵelementStart(1, "div",
|
|
19952
|
+
i0.ɵɵelementStart(1, "div", 27);
|
|
19871
19953
|
i0.ɵɵtext(2);
|
|
19872
19954
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
19873
19955
|
i0.ɵɵelementEnd();
|
|
@@ -19876,7 +19958,7 @@ function QueryCheckYourAnswersComponent_ng_container_2_Template(rf, ctx) { if (r
|
|
|
19876
19958
|
i0.ɵɵadvance(2);
|
|
19877
19959
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Raise a query"));
|
|
19878
19960
|
} }
|
|
19879
|
-
function
|
|
19961
|
+
function QueryCheckYourAnswersComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
19880
19962
|
i0.ɵɵelementContainerStart(0);
|
|
19881
19963
|
i0.ɵɵtext(1);
|
|
19882
19964
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -19885,16 +19967,16 @@ function QueryCheckYourAnswersComponent_ng_container_4_Template(rf, ctx) { if (r
|
|
|
19885
19967
|
i0.ɵɵadvance();
|
|
19886
19968
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Review query response details"), " ");
|
|
19887
19969
|
} }
|
|
19888
|
-
function
|
|
19970
|
+
function QueryCheckYourAnswersComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
|
|
19889
19971
|
i0.ɵɵtext(0);
|
|
19890
19972
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
19891
19973
|
} if (rf & 2) {
|
|
19892
19974
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, "Review query details"), " ");
|
|
19893
19975
|
} }
|
|
19894
|
-
function
|
|
19895
|
-
const
|
|
19896
|
-
i0.ɵɵelementStart(0, "a",
|
|
19897
|
-
i0.ɵɵlistener("click", function
|
|
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()); });
|
|
19898
19980
|
i0.ɵɵtext(1);
|
|
19899
19981
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
19900
19982
|
i0.ɵɵelementEnd();
|
|
@@ -19902,16 +19984,16 @@ function QueryCheckYourAnswersComponent_dl_9_a_8_Template(rf, ctx) { if (rf & 1)
|
|
|
19902
19984
|
i0.ɵɵadvance();
|
|
19903
19985
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Change"), " ");
|
|
19904
19986
|
} }
|
|
19905
|
-
function
|
|
19906
|
-
i0.ɵɵelementStart(0, "dl",
|
|
19987
|
+
function QueryCheckYourAnswersComponent_dl_10_Template(rf, ctx) { if (rf & 1) {
|
|
19988
|
+
i0.ɵɵelementStart(0, "dl", 10)(1, "div", 11)(2, "dt", 12);
|
|
19907
19989
|
i0.ɵɵtext(3);
|
|
19908
19990
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
19909
19991
|
i0.ɵɵelementEnd();
|
|
19910
|
-
i0.ɵɵelementStart(5, "dd",
|
|
19992
|
+
i0.ɵɵelementStart(5, "dd", 13);
|
|
19911
19993
|
i0.ɵɵtext(6);
|
|
19912
19994
|
i0.ɵɵelementEnd();
|
|
19913
|
-
i0.ɵɵelementStart(7, "dd",
|
|
19914
|
-
i0.ɵɵtemplate(8,
|
|
19995
|
+
i0.ɵɵelementStart(7, "dd", 14);
|
|
19996
|
+
i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_dl_10_a_8_Template, 3, 3, "a", 28);
|
|
19915
19997
|
i0.ɵɵelementEnd()()();
|
|
19916
19998
|
} if (rf & 2) {
|
|
19917
19999
|
let tmp_3_0;
|
|
@@ -19923,7 +20005,7 @@ function QueryCheckYourAnswersComponent_dl_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
19923
20005
|
i0.ɵɵadvance(2);
|
|
19924
20006
|
i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
|
|
19925
20007
|
} }
|
|
19926
|
-
function
|
|
20008
|
+
function QueryCheckYourAnswersComponent_dl_22_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
19927
20009
|
i0.ɵɵelementContainerStart(0);
|
|
19928
20010
|
i0.ɵɵtext(1);
|
|
19929
20011
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -19932,24 +20014,24 @@ function QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template(rf, ctx) {
|
|
|
19932
20014
|
i0.ɵɵadvance();
|
|
19933
20015
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(2, 1, "Is the query hearing related?", null, "Yes"), " ");
|
|
19934
20016
|
} }
|
|
19935
|
-
function
|
|
20017
|
+
function QueryCheckYourAnswersComponent_dl_22_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
19936
20018
|
i0.ɵɵtext(0);
|
|
19937
20019
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
19938
20020
|
} if (rf & 2) {
|
|
19939
20021
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(1, 1, "Is the query hearing related?", null, "No"), " ");
|
|
19940
20022
|
} }
|
|
19941
|
-
function
|
|
19942
|
-
const
|
|
19943
|
-
i0.ɵɵelementStart(0, "div",
|
|
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);
|
|
19944
20026
|
i0.ɵɵtext(2);
|
|
19945
20027
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
19946
20028
|
i0.ɵɵelementEnd();
|
|
19947
|
-
i0.ɵɵelementStart(4, "dd",
|
|
20029
|
+
i0.ɵɵelementStart(4, "dd", 13);
|
|
19948
20030
|
i0.ɵɵtext(5);
|
|
19949
20031
|
i0.ɵɵpipe(6, "date");
|
|
19950
20032
|
i0.ɵɵelementEnd();
|
|
19951
|
-
i0.ɵɵelementStart(7, "dd",
|
|
19952
|
-
i0.ɵɵlistener("click", function
|
|
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()); });
|
|
19953
20035
|
i0.ɵɵtext(9);
|
|
19954
20036
|
i0.ɵɵpipe(10, "rpxTranslate");
|
|
19955
20037
|
i0.ɵɵelementEnd()()();
|
|
@@ -19963,38 +20045,38 @@ function QueryCheckYourAnswersComponent_dl_21_div_13_Template(rf, ctx) { if (rf
|
|
|
19963
20045
|
i0.ɵɵadvance(4);
|
|
19964
20046
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, "Change"), " ");
|
|
19965
20047
|
} }
|
|
19966
|
-
function
|
|
19967
|
-
const
|
|
19968
|
-
i0.ɵɵelementStart(0, "dl",
|
|
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);
|
|
19969
20051
|
i0.ɵɵtext(3);
|
|
19970
20052
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
19971
20053
|
i0.ɵɵelementEnd();
|
|
19972
|
-
i0.ɵɵelementStart(5, "dd",
|
|
19973
|
-
i0.ɵɵtemplate(6,
|
|
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);
|
|
19974
20056
|
i0.ɵɵelementEnd();
|
|
19975
|
-
i0.ɵɵelementStart(9, "dd",
|
|
19976
|
-
i0.ɵɵlistener("click", function
|
|
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()); });
|
|
19977
20059
|
i0.ɵɵtext(11);
|
|
19978
20060
|
i0.ɵɵpipe(12, "rpxTranslate");
|
|
19979
20061
|
i0.ɵɵelementEnd()()();
|
|
19980
|
-
i0.ɵɵtemplate(13,
|
|
20062
|
+
i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_dl_22_div_13_Template, 11, 10, "div", 29);
|
|
19981
20063
|
i0.ɵɵelementEnd();
|
|
19982
20064
|
} if (rf & 2) {
|
|
19983
20065
|
let tmp_4_0;
|
|
19984
20066
|
let tmp_7_0;
|
|
19985
|
-
const
|
|
20067
|
+
const isHearingRelatedFalse_r7 = i0.ɵɵreference(8);
|
|
19986
20068
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
19987
20069
|
i0.ɵɵadvance(3);
|
|
19988
20070
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, "Is the query hearing related?"), " ");
|
|
19989
20071
|
i0.ɵɵadvance(3);
|
|
19990
|
-
i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse",
|
|
20072
|
+
i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse", isHearingRelatedFalse_r7);
|
|
19991
20073
|
i0.ɵɵadvance(5);
|
|
19992
20074
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 7, "Change"), " ");
|
|
19993
20075
|
i0.ɵɵadvance(2);
|
|
19994
20076
|
i0.ɵɵproperty("ngIf", (tmp_7_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_7_0.value);
|
|
19995
20077
|
} }
|
|
19996
|
-
function
|
|
19997
|
-
i0.ɵɵelement(0, "ccd-query-attachments-read",
|
|
20078
|
+
function QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template(rf, ctx) { if (rf & 1) {
|
|
20079
|
+
i0.ɵɵelement(0, "ccd-query-attachments-read", 30);
|
|
19998
20080
|
} if (rf & 2) {
|
|
19999
20081
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
20000
20082
|
i0.ɵɵproperty("attachments", ctx_r2.formGroup.get("attachments").value);
|
|
@@ -20006,6 +20088,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20006
20088
|
caseNotifier;
|
|
20007
20089
|
workAllocationService;
|
|
20008
20090
|
sessionStorageService;
|
|
20091
|
+
eventTriggerService;
|
|
20009
20092
|
RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
|
|
20010
20093
|
RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
|
|
20011
20094
|
CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
@@ -20013,75 +20096,72 @@ class QueryCheckYourAnswersComponent {
|
|
|
20013
20096
|
formGroup;
|
|
20014
20097
|
queryItem;
|
|
20015
20098
|
queryCreateContext;
|
|
20099
|
+
eventData = null;
|
|
20016
20100
|
backClicked = new EventEmitter();
|
|
20017
20101
|
querySubmitted = new EventEmitter();
|
|
20018
20102
|
caseViewTrigger;
|
|
20019
20103
|
caseDetails;
|
|
20020
20104
|
queryId;
|
|
20021
|
-
getEventTrigger$;
|
|
20022
20105
|
createEventSubscription;
|
|
20023
|
-
|
|
20106
|
+
searchTasksSubscription;
|
|
20024
20107
|
queryCreateContextEnum = QueryCreateContext;
|
|
20025
20108
|
eventCompletionParams;
|
|
20026
|
-
caseId;
|
|
20027
20109
|
caseQueriesCollections;
|
|
20028
20110
|
fieldId;
|
|
20029
|
-
|
|
20111
|
+
errorMessages = [];
|
|
20112
|
+
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, eventTriggerService) {
|
|
20030
20113
|
this.route = route;
|
|
20031
20114
|
this.router = router;
|
|
20032
20115
|
this.casesService = casesService;
|
|
20033
20116
|
this.caseNotifier = caseNotifier;
|
|
20034
20117
|
this.workAllocationService = workAllocationService;
|
|
20035
20118
|
this.sessionStorageService = sessionStorageService;
|
|
20119
|
+
this.eventTriggerService = eventTriggerService;
|
|
20036
20120
|
}
|
|
20037
20121
|
ngOnInit() {
|
|
20038
20122
|
this.queryId = this.route.snapshot.params.qid;
|
|
20039
20123
|
this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
|
|
20040
20124
|
this.caseDetails = caseDetails;
|
|
20041
|
-
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
20046
|
-
|
|
20047
|
-
else {
|
|
20048
|
-
// Raise a query and Follow-up query uses the same event trigger id
|
|
20049
|
-
// Find raise a query event trigger from the list, will be used when submitting the query
|
|
20050
|
-
this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => trigger.id === this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID);
|
|
20051
|
-
// Initialise getEventTrigger observable, will be used when submitting the query
|
|
20052
|
-
this.getEventTrigger$ = this.casesService.getEventTrigger(undefined, this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id);
|
|
20053
|
-
}
|
|
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);
|
|
20054
20131
|
});
|
|
20055
|
-
this.
|
|
20132
|
+
this.setCaseQueriesCollectionData();
|
|
20056
20133
|
}
|
|
20057
20134
|
ngOnDestroy() {
|
|
20058
20135
|
this.createEventSubscription?.unsubscribe();
|
|
20059
|
-
this.
|
|
20136
|
+
this.searchTasksSubscription?.unsubscribe();
|
|
20060
20137
|
}
|
|
20061
20138
|
goBack() {
|
|
20062
20139
|
this.backClicked.emit(true);
|
|
20063
20140
|
}
|
|
20064
20141
|
submit() {
|
|
20065
|
-
//
|
|
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
|
+
}
|
|
20066
20154
|
const data = this.generateCaseQueriesCollectionData();
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
event_token: caseEventTrigger.event_token,
|
|
20078
|
-
ignore_warning: false
|
|
20079
|
-
};
|
|
20080
|
-
// Complete event
|
|
20081
|
-
return this.casesService.createEvent(this.caseDetails, caseEventData);
|
|
20082
|
-
})).subscribe(
|
|
20083
|
-
// Successful response
|
|
20084
|
-
() => {
|
|
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(() => {
|
|
20085
20165
|
// Search and complete task
|
|
20086
20166
|
this.searchAndCompleteTask();
|
|
20087
20167
|
// Emit query submitted event
|
|
@@ -20093,22 +20173,19 @@ class QueryCheckYourAnswersComponent {
|
|
|
20093
20173
|
searchAndCompleteTask() {
|
|
20094
20174
|
// Search Task
|
|
20095
20175
|
const searchParameter = { ccdId: this.caseDetails.case_id };
|
|
20096
|
-
this.
|
|
20176
|
+
this.searchTasksSubscription = this.workAllocationService.searchTasks(searchParameter)
|
|
20097
20177
|
.subscribe((response) => {
|
|
20098
20178
|
// Filter task by query id
|
|
20099
|
-
const
|
|
20100
|
-
return Object.values(task.additional_properties).some((value) => {
|
|
20101
|
-
if (value === this.queryId) {
|
|
20102
|
-
return task;
|
|
20103
|
-
}
|
|
20104
|
-
});
|
|
20105
|
-
});
|
|
20179
|
+
const filteredTask = response.tasks?.find((task) => Object.values(task.additional_properties).some((value) => value === this.queryId));
|
|
20106
20180
|
// Trigger event completion
|
|
20107
20181
|
this.eventCompletionParams = {
|
|
20108
20182
|
caseId: this.caseDetails.case_id,
|
|
20109
20183
|
eventId: this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID,
|
|
20110
|
-
task:
|
|
20184
|
+
task: filteredTask
|
|
20111
20185
|
};
|
|
20186
|
+
}, (error) => {
|
|
20187
|
+
console.error('Error in searchTasksSubscription:', error);
|
|
20188
|
+
// Handle error appropriately
|
|
20112
20189
|
});
|
|
20113
20190
|
}
|
|
20114
20191
|
generateCaseQueriesCollectionData() {
|
|
@@ -20121,11 +20198,9 @@ class QueryCheckYourAnswersComponent {
|
|
|
20121
20198
|
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
20122
20199
|
this.router.navigate(['/', 'service-down']);
|
|
20123
20200
|
}
|
|
20124
|
-
// Dynamically determine the field ID
|
|
20125
|
-
const dynamicFieldId = this.fieldId;
|
|
20126
20201
|
// Base data structure for the query with dynamic property name
|
|
20127
20202
|
const newQueryData = {
|
|
20128
|
-
[
|
|
20203
|
+
[this.fieldId]: {
|
|
20129
20204
|
partyName: '', // Not returned by CCD
|
|
20130
20205
|
roleOnCase: '', // Not returned by CCD
|
|
20131
20206
|
caseMessages: [
|
|
@@ -20137,18 +20212,17 @@ class QueryCheckYourAnswersComponent {
|
|
|
20137
20212
|
}
|
|
20138
20213
|
};
|
|
20139
20214
|
// If caseQueriesCollections is not empty, append its data
|
|
20140
|
-
if (this.caseQueriesCollections
|
|
20141
|
-
newQueryData[
|
|
20215
|
+
if (this.caseQueriesCollections?.length) {
|
|
20216
|
+
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
20142
20217
|
}
|
|
20143
20218
|
return newQueryData;
|
|
20144
20219
|
}
|
|
20145
|
-
|
|
20146
|
-
if (this.
|
|
20147
|
-
this.caseQueriesCollections = this.
|
|
20148
|
-
.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) => {
|
|
20149
20223
|
// Extract the ID based on conditions, updating this.fieldId dynamically
|
|
20150
|
-
this.
|
|
20151
|
-
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField
|
|
20224
|
+
this.extractCaseQueryId(caseField);
|
|
20225
|
+
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
|
|
20152
20226
|
if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
|
|
20153
20227
|
acc.push(extractedCaseQueriesFromCaseField);
|
|
20154
20228
|
}
|
|
@@ -20156,7 +20230,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20156
20230
|
}, []);
|
|
20157
20231
|
}
|
|
20158
20232
|
}
|
|
20159
|
-
|
|
20233
|
+
extractCaseQueryId(data) {
|
|
20160
20234
|
// Check if field_type.id is 'CaseQueriesCollection' and field_type.type is 'Complex'
|
|
20161
20235
|
if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
20162
20236
|
data.field_type.type === this.FIELD_TYPE_COMPLEX) {
|
|
@@ -20164,102 +20238,106 @@ class QueryCheckYourAnswersComponent {
|
|
|
20164
20238
|
this.fieldId = data.id; // Store the ID for use in generating newQueryData
|
|
20165
20239
|
}
|
|
20166
20240
|
}
|
|
20167
|
-
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)); };
|
|
20168
|
-
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:
|
|
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) {
|
|
20169
20243
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
20170
20244
|
i0.ɵɵelementStart(0, "div", 2)(1, "div", 3);
|
|
20171
|
-
i0.ɵɵtemplate(2,
|
|
20172
|
-
i0.ɵɵelementStart(
|
|
20173
|
-
i0.ɵɵtemplate(
|
|
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);
|
|
20174
20248
|
i0.ɵɵelementEnd();
|
|
20175
|
-
i0.ɵɵelementStart(
|
|
20176
|
-
i0.ɵɵelement(
|
|
20249
|
+
i0.ɵɵelementStart(8, "div", 8);
|
|
20250
|
+
i0.ɵɵelement(9, "ccd-query-case-details-header");
|
|
20177
20251
|
i0.ɵɵelementEnd();
|
|
20178
|
-
i0.ɵɵtemplate(
|
|
20179
|
-
i0.ɵɵelementStart(
|
|
20180
|
-
i0.ɵɵtext(
|
|
20181
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20182
20256
|
i0.ɵɵelementEnd();
|
|
20183
|
-
i0.ɵɵelementStart(
|
|
20184
|
-
i0.ɵɵtext(
|
|
20257
|
+
i0.ɵɵelementStart(16, "dd", 13);
|
|
20258
|
+
i0.ɵɵtext(17);
|
|
20185
20259
|
i0.ɵɵelementEnd();
|
|
20186
|
-
i0.ɵɵelementStart(
|
|
20187
|
-
i0.ɵɵlistener("click", function
|
|
20188
|
-
i0.ɵɵtext(
|
|
20189
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20190
20264
|
i0.ɵɵelementEnd()()()();
|
|
20191
|
-
i0.ɵɵtemplate(
|
|
20192
|
-
i0.ɵɵelementStart(
|
|
20193
|
-
i0.ɵɵtext(
|
|
20194
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20195
20269
|
i0.ɵɵelementEnd();
|
|
20196
|
-
i0.ɵɵelementStart(
|
|
20197
|
-
i0.ɵɵtemplate(
|
|
20270
|
+
i0.ɵɵelementStart(28, "dd", 16);
|
|
20271
|
+
i0.ɵɵtemplate(29, QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template, 1, 1, "ccd-query-attachments-read", 17);
|
|
20198
20272
|
i0.ɵɵelementEnd();
|
|
20199
|
-
i0.ɵɵelementStart(
|
|
20200
|
-
i0.ɵɵlistener("click", function
|
|
20201
|
-
i0.ɵɵtext(
|
|
20202
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20203
20277
|
i0.ɵɵelementEnd()()()();
|
|
20204
|
-
i0.ɵɵelement(
|
|
20205
|
-
i0.ɵɵelementStart(
|
|
20206
|
-
i0.ɵɵlistener("click", function
|
|
20207
|
-
i0.ɵɵtext(
|
|
20208
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20209
20283
|
i0.ɵɵelementEnd();
|
|
20210
|
-
i0.ɵɵelementStart(
|
|
20211
|
-
i0.ɵɵlistener("click", function
|
|
20212
|
-
i0.ɵɵtext(
|
|
20213
|
-
i0.ɵɵpipe(
|
|
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");
|
|
20214
20288
|
i0.ɵɵelementEnd()()();
|
|
20215
|
-
i0.ɵɵelement(
|
|
20289
|
+
i0.ɵɵelement(42, "ccd-query-event-completion", 20);
|
|
20216
20290
|
i0.ɵɵelementEnd();
|
|
20217
20291
|
} if (rf & 2) {
|
|
20218
|
-
let
|
|
20219
|
-
const
|
|
20292
|
+
let tmp_7_0;
|
|
20293
|
+
const defaultCheckYourAnswersTitle_r8 = i0.ɵɵreference(7);
|
|
20220
20294
|
i0.ɵɵadvance(2);
|
|
20295
|
+
i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
20296
|
+
i0.ɵɵadvance();
|
|
20221
20297
|
i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
|
|
20222
20298
|
i0.ɵɵadvance(2);
|
|
20223
|
-
i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse",
|
|
20299
|
+
i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r8);
|
|
20224
20300
|
i0.ɵɵadvance(5);
|
|
20225
20301
|
i0.ɵɵproperty("ngIf", ctx.queryCreateContext !== ctx.queryCreateContextEnum.FOLLOWUP);
|
|
20226
20302
|
i0.ɵɵadvance(4);
|
|
20227
|
-
i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(
|
|
20303
|
+
i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(15, 15, "Query detail"), " ");
|
|
20228
20304
|
i0.ɵɵadvance(3);
|
|
20229
|
-
i0.ɵɵtextInterpolate1(" ", (
|
|
20305
|
+
i0.ɵɵtextInterpolate1(" ", (tmp_7_0 = ctx.formGroup.get("body")) == null ? null : tmp_7_0.value, " ");
|
|
20230
20306
|
i0.ɵɵadvance(3);
|
|
20231
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
20307
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 17, "Change"), " ");
|
|
20232
20308
|
i0.ɵɵadvance(2);
|
|
20233
20309
|
i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
|
|
20234
20310
|
i0.ɵɵadvance(4);
|
|
20235
|
-
i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(
|
|
20311
|
+
i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(27, 19, "Document attached"), " ");
|
|
20236
20312
|
i0.ɵɵadvance(3);
|
|
20237
20313
|
i0.ɵɵproperty("ngIf", ctx.formGroup.get("attachments").value);
|
|
20238
20314
|
i0.ɵɵadvance(3);
|
|
20239
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
20315
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(33, 21, "Change"), " ");
|
|
20240
20316
|
i0.ɵɵadvance(5);
|
|
20241
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
20317
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(38, 23, "Previous"), " ");
|
|
20242
20318
|
i0.ɵɵadvance(3);
|
|
20243
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
20319
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(41, 25, "Submit"), " ");
|
|
20244
20320
|
i0.ɵɵadvance(2);
|
|
20245
20321
|
i0.ɵɵproperty("eventCompletionParams", ctx.eventCompletionParams);
|
|
20246
20322
|
} }, styles: [".govuk-summary-list__value--documentAttached[_ngcontent-%COMP%]{vertical-align:middle}"] });
|
|
20247
20323
|
}
|
|
20248
20324
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
|
|
20249
20325
|
type: Component,
|
|
20250
|
-
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"] }]
|
|
20251
|
-
}], () => [{ 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: [{
|
|
20252
20328
|
type: Input
|
|
20253
20329
|
}], queryItem: [{
|
|
20254
20330
|
type: Input
|
|
20255
20331
|
}], queryCreateContext: [{
|
|
20256
20332
|
type: Input
|
|
20333
|
+
}], eventData: [{
|
|
20334
|
+
type: Input
|
|
20257
20335
|
}], backClicked: [{
|
|
20258
20336
|
type: Output
|
|
20259
20337
|
}], querySubmitted: [{
|
|
20260
20338
|
type: Output
|
|
20261
20339
|
}] }); })();
|
|
20262
|
-
(() => { (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:
|
|
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 }); })();
|
|
20263
20341
|
|
|
20264
20342
|
function QueryDetailsComponent_ng_container_0_tr_45_Template(rf, ctx) { if (rf & 1) {
|
|
20265
20343
|
i0.ɵɵelementStart(0, "tr", 11)(1, "th", 7);
|
|
@@ -20576,7 +20654,7 @@ class QueryDetailsComponent {
|
|
|
20576
20654
|
}
|
|
20577
20655
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
20578
20656
|
type: Component,
|
|
20579
|
-
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
|
|
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"] }]
|
|
20580
20658
|
}], () => [{ type: SessionStorageService }], { query: [{
|
|
20581
20659
|
type: Input
|
|
20582
20660
|
}], backClicked: [{
|
|
@@ -21158,7 +21236,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
21158
21236
|
}], submitted: [{
|
|
21159
21237
|
type: Input
|
|
21160
21238
|
}] }); })();
|
|
21161
|
-
(() => { (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:
|
|
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 }); })();
|
|
21162
21240
|
|
|
21163
21241
|
function QueryWriteRespondToQueryComponent_p_23_Template(rf, ctx) { if (rf & 1) {
|
|
21164
21242
|
i0.ɵɵelementStart(0, "p", 13)(1, "span", 14);
|
|
@@ -21385,7 +21463,7 @@ class QueryConfirmationComponent {
|
|
|
21385
21463
|
}] }); })();
|
|
21386
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 }); })();
|
|
21387
21465
|
|
|
21388
|
-
const _c0$B = a0 => ["/query-management", "query", a0, "4"];
|
|
21466
|
+
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
21389
21467
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
21390
21468
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
21391
21469
|
i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
|
|
@@ -21424,7 +21502,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template
|
|
|
21424
21502
|
} if (rf & 2) {
|
|
21425
21503
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
21426
21504
|
i0.ɵɵadvance();
|
|
21427
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵ
|
|
21505
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
21428
21506
|
i0.ɵɵadvance();
|
|
21429
21507
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
21430
21508
|
} }
|
|
@@ -21454,7 +21532,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if
|
|
|
21454
21532
|
i0.ɵɵelementStart(5, "ccd-query-details", 8);
|
|
21455
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); });
|
|
21456
21534
|
i0.ɵɵelementEnd();
|
|
21457
|
-
i0.ɵɵtemplate(6, ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template, 4,
|
|
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);
|
|
21458
21536
|
} if (rf & 2) {
|
|
21459
21537
|
const queryIsInReview_r5 = i0.ɵɵreference(8);
|
|
21460
21538
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -21486,7 +21564,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
21486
21564
|
if (this.route.snapshot.data.case?.tabs) {
|
|
21487
21565
|
this.caseQueriesCollections = this.route.snapshot.data.case.tabs
|
|
21488
21566
|
.filter((tab) => tab.fields?.some((caseField) => caseField.field_type.type === 'ComponentLauncher' && caseField.id === this.caseField.id))[0].fields?.reduce((acc, caseField) => {
|
|
21489
|
-
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField
|
|
21567
|
+
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
|
|
21490
21568
|
if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
|
|
21491
21569
|
acc.push(extractedCaseQueriesFromCaseField);
|
|
21492
21570
|
}
|
|
@@ -21515,7 +21593,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
21515
21593
|
}
|
|
21516
21594
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
21517
21595
|
type: Component,
|
|
21518
|
-
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
|
|
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" }]
|
|
21519
21597
|
}], () => [{ type: i1$1.ActivatedRoute }], null); })();
|
|
21520
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 }); })();
|
|
21521
21599
|
|
|
@@ -28871,7 +28949,7 @@ i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return
|
|
|
28871
28949
|
QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
28872
28950
|
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
|
|
28873
28951
|
QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
28874
|
-
i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgIf, QueryCaseDetailsHeaderComponent,
|
|
28952
|
+
i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
|
|
28875
28953
|
QueryAttachmentsReadComponent,
|
|
28876
28954
|
QueryEventCompletionComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
|
|
28877
28955
|
i0.ɵɵsetComponentScope(QueryWriteAddDocumentsComponent, function () { return [i4.NgControlStatusGroup, i4.FormGroupDirective, WriteCollectionFieldComponent]; }, []);
|
|
@@ -28879,6 +28957,10 @@ i0.ɵɵsetComponentScope(QueryAttachmentsReadComponent, function () { return [i5
|
|
|
28879
28957
|
i0.ɵɵsetComponentScope(QueryEventCompletionComponent, function () { return [
|
|
28880
28958
|
// Case event completion
|
|
28881
28959
|
CaseEventCompletionComponent]; }, []);
|
|
28960
|
+
i0.ɵɵsetComponentScope(
|
|
28961
|
+
// Case event completion
|
|
28962
|
+
CaseEventCompletionComponent, function () { return [i5.NgIf, CaseEventCompletionTaskCancelledComponent,
|
|
28963
|
+
CaseEventCompletionTaskReassignedComponent]; }, []);
|
|
28882
28964
|
|
|
28883
28965
|
var CaseEditSubmitTitles;
|
|
28884
28966
|
(function (CaseEditSubmitTitles) {
|
|
@@ -33941,24 +34023,38 @@ class EventStartGuard {
|
|
|
33941
34023
|
workAllocationService;
|
|
33942
34024
|
router;
|
|
33943
34025
|
sessionStorageService;
|
|
34026
|
+
abstractConfig;
|
|
33944
34027
|
static CLIENT_CONTEXT = 'clientContext';
|
|
33945
|
-
constructor(workAllocationService, router, sessionStorageService) {
|
|
34028
|
+
constructor(workAllocationService, router, sessionStorageService, abstractConfig) {
|
|
33946
34029
|
this.workAllocationService = workAllocationService;
|
|
33947
34030
|
this.router = router;
|
|
33948
34031
|
this.sessionStorageService = sessionStorageService;
|
|
34032
|
+
this.abstractConfig = abstractConfig;
|
|
33949
34033
|
}
|
|
33950
34034
|
canActivate(route) {
|
|
33951
34035
|
const caseId = route.params['cid'];
|
|
33952
34036
|
const eventId = route.params['eid'];
|
|
33953
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
|
+
}
|
|
33954
34044
|
const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
33955
34045
|
if (caseInfoStr) {
|
|
33956
34046
|
const caseInfo = JSON.parse(caseInfoStr);
|
|
33957
34047
|
if (caseInfo && caseInfo.cid === caseId) {
|
|
33958
34048
|
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
|
|
33959
|
-
.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}`);
|
|
33960
34053
|
}
|
|
33961
34054
|
}
|
|
34055
|
+
else {
|
|
34056
|
+
this.abstractConfig.logMessage(`EventStartGuard: caseInfo details not available in session storage for ${caseId}`);
|
|
34057
|
+
}
|
|
33962
34058
|
return of(false);
|
|
33963
34059
|
}
|
|
33964
34060
|
checkTaskInEventNotRequired(payload, caseId, taskId) {
|
|
@@ -34007,11 +34103,28 @@ class EventStartGuard {
|
|
|
34007
34103
|
removeTaskFromSessionStorage() {
|
|
34008
34104
|
this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
|
|
34009
34105
|
}
|
|
34010
|
-
checkForTasks(payload, caseId, eventId, taskId) {
|
|
34106
|
+
checkForTasks(payload, caseId, eventId, taskId, userId) {
|
|
34011
34107
|
if (taskId && payload?.tasks?.length > 0) {
|
|
34012
34108
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
34013
34109
|
if (task) {
|
|
34014
|
-
|
|
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));
|
|
34015
34128
|
}
|
|
34016
34129
|
else {
|
|
34017
34130
|
this.removeTaskFromSessionStorage();
|
|
@@ -34032,12 +34145,12 @@ class EventStartGuard {
|
|
|
34032
34145
|
return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
|
|
34033
34146
|
}
|
|
34034
34147
|
}
|
|
34035
|
-
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)); };
|
|
34036
34149
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
34037
34150
|
}
|
|
34038
34151
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
|
|
34039
34152
|
type: Injectable
|
|
34040
|
-
}], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }], null); })();
|
|
34153
|
+
}], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
|
|
34041
34154
|
|
|
34042
34155
|
var EventStartStates;
|
|
34043
34156
|
(function (EventStartStates) {
|
|
@@ -34190,6 +34303,20 @@ class EventStartStateMachineService {
|
|
|
34190
34303
|
}
|
|
34191
34304
|
};
|
|
34192
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));
|
|
34193
34320
|
// Allow user to perform the event
|
|
34194
34321
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
34195
34322
|
}
|
|
@@ -34289,9 +34416,11 @@ class EventStartComponent {
|
|
|
34289
34416
|
class EventTasksResolverService {
|
|
34290
34417
|
service;
|
|
34291
34418
|
sessionStorageService;
|
|
34292
|
-
|
|
34419
|
+
abstractConfig;
|
|
34420
|
+
constructor(service, sessionStorageService, abstractConfig) {
|
|
34293
34421
|
this.service = service;
|
|
34294
34422
|
this.sessionStorageService = sessionStorageService;
|
|
34423
|
+
this.abstractConfig = abstractConfig;
|
|
34295
34424
|
}
|
|
34296
34425
|
resolve(route) {
|
|
34297
34426
|
const eventId = route.queryParamMap.get('eventId');
|
|
@@ -34302,13 +34431,16 @@ class EventTasksResolverService {
|
|
|
34302
34431
|
return this.service.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
|
|
34303
34432
|
.pipe(map((payload) => payload.tasks));
|
|
34304
34433
|
}
|
|
34434
|
+
else {
|
|
34435
|
+
this.abstractConfig.logMessage(`EventTasksResolverService: caseInfo details not available in session storage for ${caseId}`);
|
|
34436
|
+
}
|
|
34305
34437
|
}
|
|
34306
|
-
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)); };
|
|
34307
34439
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTasksResolverService, factory: EventTasksResolverService.ɵfac });
|
|
34308
34440
|
}
|
|
34309
34441
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTasksResolverService, [{
|
|
34310
34442
|
type: Injectable
|
|
34311
|
-
}], () => [{ type: WorkAllocationService }, { type: SessionStorageService }], null); })();
|
|
34443
|
+
}], () => [{ type: WorkAllocationService }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
|
|
34312
34444
|
|
|
34313
34445
|
class EventStartModule {
|
|
34314
34446
|
static ɵfac = function EventStartModule_Factory(t) { return new (t || EventStartModule)(); };
|