@hmcts/ccd-case-ui-toolkit 7.0.52-task-event-completion-info-2 → 7.0.53
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 +17 -51
- package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +3 -18
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +1 -15
- package/esm2022/lib/shared/components/search-result/search-result.component.mjs +11 -18
- package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +28 -98
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +1 -4
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.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/domain/work-allocation/Task.d.ts +1 -9
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9326,41 +9326,27 @@ class CaseEditComponent {
|
|
|
9326
9326
|
// We have to run the event completion checks if task in session storage
|
|
9327
9327
|
// and if the task is in session storage, then is it associated to the case
|
|
9328
9328
|
let taskInSessionStorage;
|
|
9329
|
-
let
|
|
9330
|
-
let userInfo;
|
|
9329
|
+
let taskEventInSessionStorage;
|
|
9331
9330
|
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
9332
|
-
const
|
|
9333
|
-
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9331
|
+
const taskEventStr = this.sessionStorageService.getItem('taskEvent');
|
|
9334
9332
|
if (taskStr) {
|
|
9335
9333
|
taskInSessionStorage = JSON.parse(taskStr);
|
|
9336
9334
|
}
|
|
9337
|
-
if (
|
|
9338
|
-
|
|
9339
|
-
}
|
|
9340
|
-
if (userInfoStr) {
|
|
9341
|
-
userInfo = JSON.parse(userInfoStr);
|
|
9335
|
+
if (taskEventStr) {
|
|
9336
|
+
taskEventInSessionStorage = JSON.parse(taskEventStr);
|
|
9342
9337
|
}
|
|
9343
9338
|
const eventId = this.getEventId(form);
|
|
9344
9339
|
const caseId = this.getCaseId(caseDetails);
|
|
9345
|
-
|
|
9346
|
-
const eventDetails = { eventId, caseId, userId };
|
|
9347
|
-
if (this.taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails)) {
|
|
9340
|
+
if (this.taskExistsForThisEventAndCase(taskInSessionStorage, taskEventInSessionStorage, eventId, caseId)) {
|
|
9348
9341
|
// Show event completion component to perform event completion checks
|
|
9349
9342
|
this.eventCompletionParams = ({
|
|
9350
9343
|
caseId,
|
|
9351
9344
|
eventId,
|
|
9352
9345
|
task: taskInSessionStorage
|
|
9353
9346
|
});
|
|
9354
|
-
// add
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
caseId,
|
|
9358
|
-
eventId,
|
|
9359
|
-
userId,
|
|
9360
|
-
taskId: taskInSessionStorage.id,
|
|
9361
|
-
createdTimestamp: Date.now()
|
|
9362
|
-
};
|
|
9363
|
-
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
9347
|
+
// add taskEvent to link current event with task id
|
|
9348
|
+
const taskEvent = { eventId, taskId: taskInSessionStorage.id };
|
|
9349
|
+
this.sessionStorageService.setItem('taskEvent', JSON.stringify(taskEvent));
|
|
9364
9350
|
this.isEventCompletionChecksRequired = true;
|
|
9365
9351
|
}
|
|
9366
9352
|
else {
|
|
@@ -9525,9 +9511,9 @@ class CaseEditComponent {
|
|
|
9525
9511
|
return this.postCompleteTaskIfRequired();
|
|
9526
9512
|
}), finalize(() => {
|
|
9527
9513
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9528
|
-
// on event completion ensure the previous event taskToComplete/
|
|
9514
|
+
// on event completion ensure the previous event taskToComplete/taskEvent removed
|
|
9529
9515
|
this.sessionStorageService.removeItem('taskToComplete');
|
|
9530
|
-
this.sessionStorageService.removeItem('
|
|
9516
|
+
this.sessionStorageService.removeItem('taskEvent');
|
|
9531
9517
|
this.isSubmitting = false;
|
|
9532
9518
|
}))
|
|
9533
9519
|
.subscribe(() => {
|
|
@@ -9587,24 +9573,19 @@ class CaseEditComponent {
|
|
|
9587
9573
|
}
|
|
9588
9574
|
}
|
|
9589
9575
|
// checks whether current taskToComplete relevant for the event
|
|
9590
|
-
|
|
9591
|
-
if (!taskInSessionStorage || taskInSessionStorage.case_id !==
|
|
9576
|
+
taskExistsForThisEventAndCase(taskInSessionStorage, taskEvent, eventId, caseId) {
|
|
9577
|
+
if (!taskInSessionStorage || taskInSessionStorage.case_id !== caseId) {
|
|
9592
9578
|
return false;
|
|
9593
9579
|
}
|
|
9594
|
-
if (!
|
|
9580
|
+
if (!taskEvent) {
|
|
9595
9581
|
// if no task event present then there is no task to complete from previous event present
|
|
9596
9582
|
return true;
|
|
9597
9583
|
}
|
|
9598
9584
|
else {
|
|
9599
|
-
if (
|
|
9600
|
-
return true;
|
|
9601
|
-
}
|
|
9602
|
-
else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
|
|
9603
|
-
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
9604
|
-
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
9585
|
+
if (taskEvent.taskId === taskInSessionStorage.id && taskEvent.eventId !== eventId) {
|
|
9605
9586
|
// if the session storage not related to event, ignore it and remove
|
|
9606
9587
|
this.sessionStorageService.removeItem('taskToComplete');
|
|
9607
|
-
this.sessionStorageService.removeItem('
|
|
9588
|
+
this.sessionStorageService.removeItem('taskEvent');
|
|
9608
9589
|
return false;
|
|
9609
9590
|
}
|
|
9610
9591
|
return true;
|
|
@@ -9627,21 +9608,6 @@ class CaseEditComponent {
|
|
|
9627
9608
|
hasCallbackFailed(response) {
|
|
9628
9609
|
return response['callback_response_status'] !== 'CALLBACK_COMPLETED';
|
|
9629
9610
|
}
|
|
9630
|
-
eventMoreThanDayAgo(timestamp) {
|
|
9631
|
-
let dayAgoDate = new Date().getTime() - (24 * 60 * 60 * 1000);
|
|
9632
|
-
if (dayAgoDate > timestamp) {
|
|
9633
|
-
return true;
|
|
9634
|
-
}
|
|
9635
|
-
return false;
|
|
9636
|
-
}
|
|
9637
|
-
eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails) {
|
|
9638
|
-
if (taskEventCompletionInfo.eventId !== eventDetails.eventId
|
|
9639
|
-
|| taskEventCompletionInfo.caseId !== eventDetails.caseId
|
|
9640
|
-
|| taskEventCompletionInfo.userId !== eventDetails.userId) {
|
|
9641
|
-
return true;
|
|
9642
|
-
}
|
|
9643
|
-
return false;
|
|
9644
|
-
}
|
|
9645
9611
|
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)); };
|
|
9646
9612
|
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) {
|
|
9647
9613
|
i0.ɵɵelement(0, "router-outlet");
|
|
@@ -9665,7 +9631,7 @@ class CaseEditComponent {
|
|
|
9665
9631
|
}], submitted: [{
|
|
9666
9632
|
type: Output
|
|
9667
9633
|
}] }); })();
|
|
9668
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber:
|
|
9634
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 33 }); })();
|
|
9669
9635
|
|
|
9670
9636
|
function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
9671
9637
|
i0.ɵɵelement(0, "div");
|
|
@@ -33588,18 +33554,12 @@ class EventStartGuard {
|
|
|
33588
33554
|
const caseId = route.params['cid'];
|
|
33589
33555
|
const eventId = route.params['eid'];
|
|
33590
33556
|
const taskId = route.queryParams['tid'];
|
|
33591
|
-
let userId;
|
|
33592
|
-
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
33593
|
-
if (userInfoStr) {
|
|
33594
|
-
const userInfo = JSON.parse(userInfoStr);
|
|
33595
|
-
userId = userInfo?.uid ? userInfo.uid : null;
|
|
33596
|
-
}
|
|
33597
33557
|
const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
33598
33558
|
if (caseInfoStr) {
|
|
33599
33559
|
const caseInfo = JSON.parse(caseInfoStr);
|
|
33600
33560
|
if (caseInfo && caseInfo.cid === caseId) {
|
|
33601
33561
|
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
|
|
33602
|
-
.pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId
|
|
33562
|
+
.pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId)));
|
|
33603
33563
|
}
|
|
33604
33564
|
}
|
|
33605
33565
|
return of(false);
|
|
@@ -33642,19 +33602,10 @@ class EventStartGuard {
|
|
|
33642
33602
|
removeTaskFromSessionStorage() {
|
|
33643
33603
|
this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
|
|
33644
33604
|
}
|
|
33645
|
-
checkForTasks(payload, caseId, eventId, taskId
|
|
33605
|
+
checkForTasks(payload, caseId, eventId, taskId) {
|
|
33646
33606
|
if (taskId && payload?.tasks?.length > 0) {
|
|
33647
33607
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
33648
33608
|
if (task) {
|
|
33649
|
-
// Store task to session
|
|
33650
|
-
const taskEventCompletionInfo = {
|
|
33651
|
-
caseId: caseId,
|
|
33652
|
-
eventId: eventId,
|
|
33653
|
-
userId: userId,
|
|
33654
|
-
taskId: task.id,
|
|
33655
|
-
createdTimestamp: Date.now()
|
|
33656
|
-
};
|
|
33657
|
-
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
33658
33609
|
this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
|
|
33659
33610
|
}
|
|
33660
33611
|
else {
|
|
@@ -33823,22 +33774,8 @@ class EventStartStateMachineService {
|
|
|
33823
33774
|
task = context.tasks[0];
|
|
33824
33775
|
}
|
|
33825
33776
|
const taskStr = JSON.stringify(task);
|
|
33826
|
-
let userInfo;
|
|
33827
|
-
const userInfoStr = context.sessionStorageService.getItem('userDetails');
|
|
33828
|
-
if (userInfoStr) {
|
|
33829
|
-
userInfo = JSON.parse(userInfoStr);
|
|
33830
|
-
}
|
|
33831
33777
|
console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
|
|
33832
33778
|
// Store task to session
|
|
33833
|
-
const taskEventCompletionInfo = {
|
|
33834
|
-
caseId: context.caseId,
|
|
33835
|
-
eventId: context.eventId,
|
|
33836
|
-
userId: userInfo.uid,
|
|
33837
|
-
taskId: task.id,
|
|
33838
|
-
createdTimestamp: Date.now()
|
|
33839
|
-
};
|
|
33840
|
-
context.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
33841
|
-
console.log('have added', taskEventCompletionInfo);
|
|
33842
33779
|
context.sessionStorageService.setItem('taskToComplete', taskStr);
|
|
33843
33780
|
// Allow user to perform the event
|
|
33844
33781
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
@@ -36239,9 +36176,8 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
36239
36176
|
i0.ɵɵelementStart(0, "th", 21)(1, "div", 22)(2, "input", 23);
|
|
36240
36177
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_th_10_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.selectAll()); });
|
|
36241
36178
|
i0.ɵɵelementEnd();
|
|
36242
|
-
i0.ɵɵ
|
|
36243
|
-
i0.ɵɵ
|
|
36244
|
-
i0.ɵɵelementEnd()()();
|
|
36179
|
+
i0.ɵɵelement(3, "label", 24);
|
|
36180
|
+
i0.ɵɵelementEnd()();
|
|
36245
36181
|
} if (rf & 2) {
|
|
36246
36182
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
36247
36183
|
i0.ɵɵadvance(2);
|
|
@@ -36286,9 +36222,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
|
|
|
36286
36222
|
i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 33);
|
|
36287
36223
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r7); const result_r8 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r8)); });
|
|
36288
36224
|
i0.ɵɵelementEnd();
|
|
36289
|
-
i0.ɵɵ
|
|
36290
|
-
i0.ɵɵ
|
|
36291
|
-
i0.ɵɵelementEnd()()();
|
|
36225
|
+
i0.ɵɵelement(3, "label", 34);
|
|
36226
|
+
i0.ɵɵelementEnd()();
|
|
36292
36227
|
} if (rf & 2) {
|
|
36293
36228
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
36294
36229
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -36298,8 +36233,6 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
|
|
|
36298
36233
|
i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
|
|
36299
36234
|
i0.ɵɵadvance();
|
|
36300
36235
|
i0.ɵɵpropertyInterpolate1("for", "select-", result_r8.case_id, "");
|
|
36301
|
-
i0.ɵɵadvance();
|
|
36302
|
-
i0.ɵɵtextInterpolate1(" Select case ", result_r8.case_id, " ");
|
|
36303
36236
|
} }
|
|
36304
36237
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
|
|
36305
36238
|
i0.ɵɵelement(0, "ccd-field-read", 42);
|
|
@@ -36378,7 +36311,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
|
|
|
36378
36311
|
} }
|
|
36379
36312
|
function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
36380
36313
|
i0.ɵɵelementStart(0, "tr");
|
|
36381
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template,
|
|
36314
|
+
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
|
|
36382
36315
|
i0.ɵɵelementEnd();
|
|
36383
36316
|
} if (rf & 2) {
|
|
36384
36317
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -36404,9 +36337,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
36404
36337
|
i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 44);
|
|
36405
36338
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r13)); })("keyup", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onKeyUp($event, result_r13)); });
|
|
36406
36339
|
i0.ɵɵelementEnd();
|
|
36407
|
-
i0.ɵɵ
|
|
36408
|
-
i0.ɵɵ
|
|
36409
|
-
i0.ɵɵelementEnd()()();
|
|
36340
|
+
i0.ɵɵelement(3, "label", 34);
|
|
36341
|
+
i0.ɵɵelementEnd()();
|
|
36410
36342
|
} if (rf & 2) {
|
|
36411
36343
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
36412
36344
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -36416,8 +36348,6 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
36416
36348
|
i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r13))("disabled", !ctx_r0.canBeShared(result_r13));
|
|
36417
36349
|
i0.ɵɵadvance();
|
|
36418
36350
|
i0.ɵɵpropertyInterpolate1("for", "select-", result_r13.case_id, "");
|
|
36419
|
-
i0.ɵɵadvance();
|
|
36420
|
-
i0.ɵɵtextInterpolate1(" Select case ", result_r13.case_id, " ");
|
|
36421
36351
|
} }
|
|
36422
36352
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
|
|
36423
36353
|
i0.ɵɵelement(0, "ccd-field-read", 42);
|
|
@@ -36496,7 +36426,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
|
|
|
36496
36426
|
} }
|
|
36497
36427
|
function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
36498
36428
|
i0.ɵɵelementStart(0, "tr");
|
|
36499
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template,
|
|
36429
|
+
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
|
|
36500
36430
|
i0.ɵɵelementEnd();
|
|
36501
36431
|
} if (rf & 2) {
|
|
36502
36432
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -36526,7 +36456,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
36526
36456
|
i0.ɵɵtemplate(5, SearchResultComponent_table_0_div_5_Template, 11, 12, "div", 5)(6, SearchResultComponent_table_0_div_6_Template, 18, 18, "div", 6)(7, SearchResultComponent_table_0_div_7_Template, 6, 6, "div", 7);
|
|
36527
36457
|
i0.ɵɵelementEnd();
|
|
36528
36458
|
i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
|
|
36529
|
-
i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template,
|
|
36459
|
+
i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template, 4, 2, "th", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
|
|
36530
36460
|
i0.ɵɵelementEnd()();
|
|
36531
36461
|
i0.ɵɵelementStart(13, "tbody");
|
|
36532
36462
|
i0.ɵɵtemplate(14, SearchResultComponent_table_0_ng_container_14_Template, 3, 8, "ng-container", 1)(15, SearchResultComponent_table_0_ng_container_15_Template, 4, 11, "ng-container", 1);
|
|
@@ -36925,7 +36855,7 @@ class SearchResultComponent {
|
|
|
36925
36855
|
}
|
|
36926
36856
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
36927
36857
|
type: Component,
|
|
36928
|
-
args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n
|
|
36858
|
+
args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\">​</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
|
|
36929
36859
|
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
36930
36860
|
type: Input
|
|
36931
36861
|
}], jurisdiction: [{
|