@hmcts/ccd-case-ui-toolkit 5.0.24-case-file-view-document-count → 5.0.24-case-file-view-folder-document-icons-v2
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +2170 -2227
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +6 -6
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +14 -18
- package/esm2015/lib/shared/components/palette/palette.module.js +7 -7
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node.model.js +2 -0
- package/esm2015/lib/shared/domain/case-file-view/index.js +2 -2
- package/esm2015/public-api.js +1 -3
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +1480 -1521
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts +3 -3
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +3 -3
- package/lib/shared/domain/case-file-view/document-tree-node.model.d.ts +7 -0
- package/lib/shared/domain/case-file-view/document-tree-node.model.d.ts.map +1 -0
- package/lib/shared/domain/case-file-view/index.d.ts +1 -1
- package/lib/shared/domain/case-file-view/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
- package/public-api.d.ts.map +1 -1
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +0 -28
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts +0 -7
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +0 -1
|
@@ -7,18 +7,16 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
|
7
7
|
import * as i1$3 from '@angular/forms';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import polling from 'rx-polling';
|
|
10
|
-
import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of,
|
|
10
|
+
import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of, fromEvent, timer } from 'rxjs';
|
|
11
11
|
import * as i1$2 from '@angular/common/http';
|
|
12
12
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
13
|
-
import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap,
|
|
13
|
+
import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap, switchMap, takeUntil, delay, publishReplay, take, filter, first } from 'rxjs/operators';
|
|
14
14
|
import { Type, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
15
15
|
import * as _ from 'underscore';
|
|
16
16
|
import * as moment from 'moment';
|
|
17
17
|
import { __decorate, __metadata } from 'tslib';
|
|
18
18
|
import * as i1$4 from 'ngx-md';
|
|
19
19
|
import { NgxMdModule } from 'ngx-md';
|
|
20
|
-
import { Subject as Subject$1 } from 'rxjs/Subject';
|
|
21
|
-
import { isUndefined } from 'util';
|
|
22
20
|
import * as i1$5 from '@angular/cdk/tree';
|
|
23
21
|
import { NestedTreeControl, CdkTreeModule } from '@angular/cdk/tree';
|
|
24
22
|
import * as i1$6 from '@angular/material/dialog';
|
|
@@ -32,6 +30,8 @@ import * as i5 from '@angular/material/datepicker';
|
|
|
32
30
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
33
31
|
import * as i6 from '@angular/material/form-field';
|
|
34
32
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
33
|
+
import { Subject as Subject$1 } from 'rxjs/Subject';
|
|
34
|
+
import { isUndefined } from 'util';
|
|
35
35
|
import * as i5$1 from '@angular/material/autocomplete';
|
|
36
36
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
37
37
|
import * as i6$1 from '@angular/material/core';
|
|
@@ -6658,38 +6658,6 @@ WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFi
|
|
|
6658
6658
|
type: Input
|
|
6659
6659
|
}] }); })();
|
|
6660
6660
|
|
|
6661
|
-
class CaseFieldService {
|
|
6662
|
-
isOptional(field) {
|
|
6663
|
-
if (!field || !field.display_context) {
|
|
6664
|
-
return false;
|
|
6665
|
-
}
|
|
6666
|
-
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
6667
|
-
}
|
|
6668
|
-
isReadOnly(field) {
|
|
6669
|
-
if (!field || !field.display_context) {
|
|
6670
|
-
return false;
|
|
6671
|
-
}
|
|
6672
|
-
return field.display_context.toUpperCase() === 'READONLY';
|
|
6673
|
-
}
|
|
6674
|
-
isMandatory(field) {
|
|
6675
|
-
if (!field || !field.display_context) {
|
|
6676
|
-
return false;
|
|
6677
|
-
}
|
|
6678
|
-
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
6679
|
-
}
|
|
6680
|
-
isLabel(field) {
|
|
6681
|
-
if (!field || !field.field_type) {
|
|
6682
|
-
return false;
|
|
6683
|
-
}
|
|
6684
|
-
return field.field_type.type === 'Label';
|
|
6685
|
-
}
|
|
6686
|
-
}
|
|
6687
|
-
CaseFieldService.ɵfac = function CaseFieldService_Factory(t) { return new (t || CaseFieldService)(); };
|
|
6688
|
-
CaseFieldService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
6689
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
6690
|
-
type: Injectable
|
|
6691
|
-
}], null, null); })();
|
|
6692
|
-
|
|
6693
6661
|
class CaseFileViewService {
|
|
6694
6662
|
constructor(http, appConfig, errorService) {
|
|
6695
6663
|
this.http = http;
|
|
@@ -6730,879 +6698,98 @@ CaseFileViewService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFileViewServic
|
|
|
6730
6698
|
type: Injectable
|
|
6731
6699
|
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }]; }, null); })();
|
|
6732
6700
|
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6701
|
+
function CaseFileViewFolderComponent_cdk_nested_tree_node_6_Template(rf, ctx) { if (rf & 1) {
|
|
6702
|
+
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
6703
|
+
i0.ɵɵelementStart(1, "div", 8);
|
|
6704
|
+
i0.ɵɵelement(2, "button", 9);
|
|
6705
|
+
i0.ɵɵelementStart(3, "span", 10);
|
|
6706
|
+
i0.ɵɵtext(4);
|
|
6707
|
+
i0.ɵɵelementEnd();
|
|
6708
|
+
i0.ɵɵelementEnd();
|
|
6709
|
+
i0.ɵɵelementEnd();
|
|
6710
|
+
} if (rf & 2) {
|
|
6711
|
+
const node_r2 = ctx.$implicit;
|
|
6712
|
+
i0.ɵɵadvance(4);
|
|
6713
|
+
i0.ɵɵtextInterpolate(node_r2.name);
|
|
6714
|
+
} }
|
|
6715
|
+
function CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template(rf, ctx) { if (rf & 1) {
|
|
6716
|
+
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
6717
|
+
i0.ɵɵelementStart(1, "div", 8);
|
|
6718
|
+
i0.ɵɵelementStart(2, "button", 11);
|
|
6719
|
+
i0.ɵɵelementStart(3, "span", 12);
|
|
6720
|
+
i0.ɵɵtext(4);
|
|
6721
|
+
i0.ɵɵelementEnd();
|
|
6722
|
+
i0.ɵɵelementEnd();
|
|
6723
|
+
i0.ɵɵelementStart(5, "span", 13);
|
|
6724
|
+
i0.ɵɵtext(6);
|
|
6725
|
+
i0.ɵɵelementEnd();
|
|
6726
|
+
i0.ɵɵelementEnd();
|
|
6727
|
+
i0.ɵɵelementStart(7, "div");
|
|
6728
|
+
i0.ɵɵelementContainer(8, 14);
|
|
6729
|
+
i0.ɵɵelementEnd();
|
|
6730
|
+
i0.ɵɵelementEnd();
|
|
6731
|
+
} if (rf & 2) {
|
|
6732
|
+
const node_r3 = ctx.$implicit;
|
|
6733
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
6734
|
+
i0.ɵɵadvance(2);
|
|
6735
|
+
i0.ɵɵattribute("aria-label", "toggle " + node_r3.name);
|
|
6736
|
+
i0.ɵɵadvance(2);
|
|
6737
|
+
i0.ɵɵtextInterpolate(node_r3.count);
|
|
6738
|
+
i0.ɵɵadvance(2);
|
|
6739
|
+
i0.ɵɵtextInterpolate(node_r3.name);
|
|
6740
|
+
i0.ɵɵadvance(1);
|
|
6741
|
+
i0.ɵɵclassProp("document-tree-invisible", !ctx_r1.nestedTreeControl.isExpanded(node_r3));
|
|
6742
|
+
} }
|
|
6743
|
+
class CaseFileViewFolderComponent {
|
|
6744
|
+
constructor() {
|
|
6745
|
+
this.categories = [];
|
|
6746
|
+
this.getChildren = (node) => of(node.children);
|
|
6747
|
+
this.nestedChildren = (_, nodeData) => nodeData.children;
|
|
6748
|
+
this.nestedTreeControl = new NestedTreeControl(this.getChildren);
|
|
6758
6749
|
}
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
const
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6750
|
+
ngOnInit() {
|
|
6751
|
+
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments.subscribe(categoriesAndDocuments => {
|
|
6752
|
+
// Using the mock data for now as we have to display the documents as well for demo purpose
|
|
6753
|
+
const categories = this.loadCategories(); // categoriesAndDocuments.categories;
|
|
6754
|
+
// Generate document tree data from categories
|
|
6755
|
+
const treeData = this.generateTreeData(categories);
|
|
6756
|
+
// Append uncategorised documents
|
|
6757
|
+
if (categoriesAndDocuments.uncategorised_documents && categoriesAndDocuments.uncategorised_documents.length > 0) {
|
|
6758
|
+
const uncategorisedDocuments = this.getUncategorisedDocuments(categoriesAndDocuments.uncategorised_documents);
|
|
6759
|
+
treeData.push(uncategorisedDocuments);
|
|
6768
6760
|
}
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
}
|
|
6773
|
-
else if (this.isWord(fileExtension)) {
|
|
6774
|
-
return DocumentManagementService.WORD;
|
|
6775
|
-
}
|
|
6776
|
-
else if (this.isExcel(fileExtension)) {
|
|
6777
|
-
return DocumentManagementService.EXCEL;
|
|
6778
|
-
}
|
|
6779
|
-
else if (this.isPowerpoint(fileExtension)) {
|
|
6780
|
-
return DocumentManagementService.POWERPOINT;
|
|
6781
|
-
}
|
|
6782
|
-
else if (fileExtension.toLowerCase() === 'txt') {
|
|
6783
|
-
return DocumentManagementService.TXT;
|
|
6784
|
-
}
|
|
6785
|
-
else if (fileExtension.toLowerCase() === 'rtf') {
|
|
6786
|
-
return DocumentManagementService.RTF;
|
|
6787
|
-
}
|
|
6788
|
-
else if (fileExtension.toLowerCase() === 'pdf') {
|
|
6789
|
-
return DocumentManagementService.PDF;
|
|
6790
|
-
}
|
|
6791
|
-
else {
|
|
6792
|
-
return fileExtension;
|
|
6793
|
-
}
|
|
6794
|
-
}
|
|
6795
|
-
isImage(imageType) {
|
|
6796
|
-
return DocumentManagementService.imagesList.find(e => e === imageType) !== undefined;
|
|
6797
|
-
}
|
|
6798
|
-
isWord(wordType) {
|
|
6799
|
-
return DocumentManagementService.wordList.find(e => e === wordType) !== undefined;
|
|
6800
|
-
}
|
|
6801
|
-
isExcel(excelType) {
|
|
6802
|
-
return DocumentManagementService.excelList.find(e => e === excelType) !== undefined;
|
|
6803
|
-
}
|
|
6804
|
-
isPowerpoint(powerpointType) {
|
|
6805
|
-
return DocumentManagementService.powerpointList.find(e => e === powerpointType) !== undefined;
|
|
6806
|
-
}
|
|
6807
|
-
transformDocumentUrl(documentBinaryUrl) {
|
|
6808
|
-
const remoteHrsPattern = new RegExp(this.appConfig.getRemoteHrsUrl());
|
|
6809
|
-
documentBinaryUrl = documentBinaryUrl.replace(remoteHrsPattern, this.appConfig.getHrsUrl());
|
|
6810
|
-
const remoteDocumentManagementPattern = new RegExp(this.appConfig.getRemoteDocumentManagementUrl());
|
|
6811
|
-
return documentBinaryUrl.replace(remoteDocumentManagementPattern, this.getDocStoreUrl());
|
|
6761
|
+
// Initialise cdk tree with generated data
|
|
6762
|
+
this.nestedDataSource = treeData;
|
|
6763
|
+
});
|
|
6812
6764
|
}
|
|
6813
|
-
|
|
6814
|
-
return
|
|
6765
|
+
generateTreeData(categories) {
|
|
6766
|
+
return categories.reduce((tree, node) => [
|
|
6767
|
+
...tree,
|
|
6768
|
+
...[
|
|
6769
|
+
{
|
|
6770
|
+
name: node.category_name,
|
|
6771
|
+
children: [...this.generateTreeData(node.sub_categories), ...this.getDocuments(node.documents)]
|
|
6772
|
+
},
|
|
6773
|
+
],
|
|
6774
|
+
], []);
|
|
6815
6775
|
}
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
DocumentManagementService.TXT = 'txt';
|
|
6823
|
-
DocumentManagementService.RTF = 'rtf';
|
|
6824
|
-
// This delay has been added to give enough time to the user on the UI to see the info messages on the document upload
|
|
6825
|
-
// field for cases when uploads are very fast.
|
|
6826
|
-
DocumentManagementService.RESPONSE_DELAY = 1000;
|
|
6827
|
-
DocumentManagementService.imagesList = ['GIF', 'JPG', 'JPEG', 'PNG', 'gif', 'jpg', 'jpeg', 'png'];
|
|
6828
|
-
DocumentManagementService.wordList = ['DOC', 'DOCX', 'doc', 'docx'];
|
|
6829
|
-
DocumentManagementService.excelList = ['XLS', 'XLSX', 'xls', 'xlsx'];
|
|
6830
|
-
DocumentManagementService.powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
|
|
6831
|
-
DocumentManagementService.ɵfac = function DocumentManagementService_Factory(t) { return new (t || DocumentManagementService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
6832
|
-
DocumentManagementService.ɵprov = i0.ɵɵdefineInjectable({ token: DocumentManagementService, factory: DocumentManagementService.ɵfac });
|
|
6833
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DocumentManagementService, [{
|
|
6834
|
-
type: Injectable
|
|
6835
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
6836
|
-
|
|
6837
|
-
class ErrorNotifierService {
|
|
6838
|
-
constructor() {
|
|
6839
|
-
this.errorSource = new Subject();
|
|
6840
|
-
this.error = this.errorSource.asObservable();
|
|
6776
|
+
getDocuments(documents) {
|
|
6777
|
+
const documentsToReturn = [];
|
|
6778
|
+
documents.forEach(document => {
|
|
6779
|
+
documentsToReturn.push({ name: document.document_filename });
|
|
6780
|
+
});
|
|
6781
|
+
return documentsToReturn;
|
|
6841
6782
|
}
|
|
6842
|
-
|
|
6843
|
-
|
|
6783
|
+
getUncategorisedDocuments(uncategorisedDocuments) {
|
|
6784
|
+
const documents = [];
|
|
6785
|
+
uncategorisedDocuments.forEach(document => {
|
|
6786
|
+
documents.push({ name: document.document_filename });
|
|
6787
|
+
});
|
|
6788
|
+
return { name: CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE, children: documents };
|
|
6844
6789
|
}
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorNotifierService, [{
|
|
6849
|
-
type: Injectable
|
|
6850
|
-
}], null, null); })();
|
|
6851
|
-
|
|
6852
|
-
class EventStatusService {
|
|
6853
|
-
static isIncomplete(eventStatus) {
|
|
6854
|
-
if (!eventStatus) {
|
|
6855
|
-
return false;
|
|
6856
|
-
}
|
|
6857
|
-
return EventStatusService.CALLBACK_STATUS_INCOMPLETE === eventStatus
|
|
6858
|
-
|| EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE === eventStatus;
|
|
6859
|
-
}
|
|
6860
|
-
}
|
|
6861
|
-
EventStatusService.CALLBACK_STATUS_INCOMPLETE = 'INCOMPLETE_CALLBACK';
|
|
6862
|
-
EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE = 'INCOMPLETE_DELETE_DRAFT';
|
|
6863
|
-
EventStatusService.CALLBACK_STATUS_COMPLETE = 'CALLBACK_COMPLETED';
|
|
6864
|
-
EventStatusService.DELETE_DRAFT_STATUS_COMPLETE = 'DELETE_DRAFT_COMPLETED';
|
|
6865
|
-
EventStatusService.ɵfac = function EventStatusService_Factory(t) { return new (t || EventStatusService)(); };
|
|
6866
|
-
EventStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: EventStatusService, factory: EventStatusService.ɵfac });
|
|
6867
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStatusService, [{
|
|
6868
|
-
type: Injectable
|
|
6869
|
-
}], null, null); })();
|
|
6870
|
-
|
|
6871
|
-
class FormErrorService {
|
|
6872
|
-
mapFieldErrors(errors, form, errorKey) {
|
|
6873
|
-
errors.forEach(error => {
|
|
6874
|
-
const formControl = this.getFormControl(form, error.id);
|
|
6875
|
-
if (formControl) {
|
|
6876
|
-
formControl.setErrors({
|
|
6877
|
-
[errorKey]: error.message
|
|
6878
|
-
});
|
|
6879
|
-
}
|
|
6880
|
-
});
|
|
6881
|
-
}
|
|
6882
|
-
getFormControl(form, fieldId) {
|
|
6883
|
-
const fields = fieldId.split('.');
|
|
6884
|
-
let group = form;
|
|
6885
|
-
let inArray = false;
|
|
6886
|
-
let control;
|
|
6887
|
-
fields.every((field, index) => {
|
|
6888
|
-
if (index === fields.length - 1) {
|
|
6889
|
-
control = group.controls[field];
|
|
6890
|
-
}
|
|
6891
|
-
else {
|
|
6892
|
-
group = group.controls[field];
|
|
6893
|
-
if (inArray && group.controls['value']) {
|
|
6894
|
-
group = group.controls['value'];
|
|
6895
|
-
}
|
|
6896
|
-
if (group && group.constructor && FormArray.name === group.constructor.name) {
|
|
6897
|
-
inArray = true;
|
|
6898
|
-
}
|
|
6899
|
-
else {
|
|
6900
|
-
inArray = false;
|
|
6901
|
-
}
|
|
6902
|
-
}
|
|
6903
|
-
return !!group;
|
|
6904
|
-
});
|
|
6905
|
-
return control;
|
|
6906
|
-
}
|
|
6907
|
-
}
|
|
6908
|
-
FormErrorService.ɵfac = function FormErrorService_Factory(t) { return new (t || FormErrorService)(); };
|
|
6909
|
-
FormErrorService.ɵprov = i0.ɵɵdefineInjectable({ token: FormErrorService, factory: FormErrorService.ɵfac });
|
|
6910
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormErrorService, [{
|
|
6911
|
-
type: Injectable
|
|
6912
|
-
}], null, null); })();
|
|
6913
|
-
|
|
6914
|
-
class JurisdictionService {
|
|
6915
|
-
constructor(httpService) {
|
|
6916
|
-
this.httpService = httpService;
|
|
6917
|
-
this.selectedJurisdictionSource = new Subject$1();
|
|
6918
|
-
this.selectedJurisdiction = this.selectedJurisdictionSource.asObservable();
|
|
6919
|
-
}
|
|
6920
|
-
announceSelectedJurisdiction(jurisdiction) {
|
|
6921
|
-
this.selectedJurisdictionSource.next(jurisdiction);
|
|
6922
|
-
}
|
|
6923
|
-
searchJudicialUsers(searchTerm, serviceId) {
|
|
6924
|
-
return this.httpService.post('api/prd/judicial/getJudicialUsersSearch', { searchString: searchTerm, serviceCode: serviceId });
|
|
6925
|
-
}
|
|
6926
|
-
searchJudicialUsersByPersonalCodes(personalCodes) {
|
|
6927
|
-
return this.httpService.post('api/prd/judicial/searchJudicialUserByPersonalCodes', { personal_code: personalCodes });
|
|
6928
|
-
}
|
|
6929
|
-
}
|
|
6930
|
-
JurisdictionService.ɵfac = function JurisdictionService_Factory(t) { return new (t || JurisdictionService)(i0.ɵɵinject(HttpService)); };
|
|
6931
|
-
JurisdictionService.ɵprov = i0.ɵɵdefineInjectable({ token: JurisdictionService, factory: JurisdictionService.ɵfac });
|
|
6932
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JurisdictionService, [{
|
|
6933
|
-
type: Injectable
|
|
6934
|
-
}], function () { return [{ type: HttpService }]; }, null); })();
|
|
6935
|
-
|
|
6936
|
-
class BannersService {
|
|
6937
|
-
constructor(httpService, appConfig) {
|
|
6938
|
-
this.httpService = httpService;
|
|
6939
|
-
this.appConfig = appConfig;
|
|
6940
|
-
}
|
|
6941
|
-
getBanners(jurisdictionReferences) {
|
|
6942
|
-
const url = this.appConfig.getBannersUrl();
|
|
6943
|
-
const headers = new HttpHeaders()
|
|
6944
|
-
.set('experimental', 'true')
|
|
6945
|
-
.set('Accept', BannersService.V2_MEDIATYPE_BANNERS)
|
|
6946
|
-
.set('Content-Type', 'application/json');
|
|
6947
|
-
let params = new HttpParams();
|
|
6948
|
-
jurisdictionReferences.forEach(reference => params = params.append('ids', reference));
|
|
6949
|
-
return this.httpService
|
|
6950
|
-
.get(url, { params, headers, observe: 'body' })
|
|
6951
|
-
.pipe(map(body => body.banners));
|
|
6952
|
-
}
|
|
6953
|
-
}
|
|
6954
|
-
BannersService.V2_MEDIATYPE_BANNERS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-banners.v2+json;charset=UTF-8';
|
|
6955
|
-
BannersService.ɵfac = function BannersService_Factory(t) { return new (t || BannersService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
6956
|
-
BannersService.ɵprov = i0.ɵɵdefineInjectable({ token: BannersService, factory: BannersService.ɵfac });
|
|
6957
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BannersService, [{
|
|
6958
|
-
type: Injectable
|
|
6959
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
6960
|
-
|
|
6961
|
-
var NavigationOrigin;
|
|
6962
|
-
(function (NavigationOrigin) {
|
|
6963
|
-
NavigationOrigin[NavigationOrigin["DRAFT_DELETED"] = 0] = "DRAFT_DELETED";
|
|
6964
|
-
NavigationOrigin[NavigationOrigin["ERROR_DELETING_DRAFT"] = 1] = "ERROR_DELETING_DRAFT";
|
|
6965
|
-
NavigationOrigin[NavigationOrigin["DRAFT_RESUMED"] = 2] = "DRAFT_RESUMED";
|
|
6966
|
-
NavigationOrigin[NavigationOrigin["EVENT_TRIGGERED"] = 3] = "EVENT_TRIGGERED";
|
|
6967
|
-
NavigationOrigin[NavigationOrigin["NO_READ_ACCESS_REDIRECTION"] = 4] = "NO_READ_ACCESS_REDIRECTION";
|
|
6968
|
-
})(NavigationOrigin || (NavigationOrigin = {}));
|
|
6969
|
-
|
|
6970
|
-
class NavigationNotifierService {
|
|
6971
|
-
constructor() {
|
|
6972
|
-
this.navigationSource = new BehaviorSubject({});
|
|
6973
|
-
this.navigation = this.navigationSource.asObservable();
|
|
6974
|
-
}
|
|
6975
|
-
announceNavigation(origin) {
|
|
6976
|
-
this.navigationSource.next(origin);
|
|
6977
|
-
}
|
|
6978
|
-
}
|
|
6979
|
-
NavigationNotifierService.ɵfac = function NavigationNotifierService_Factory(t) { return new (t || NavigationNotifierService)(); };
|
|
6980
|
-
NavigationNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: NavigationNotifierService, factory: NavigationNotifierService.ɵfac });
|
|
6981
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationNotifierService, [{
|
|
6982
|
-
type: Injectable
|
|
6983
|
-
}], null, null); })();
|
|
6984
|
-
|
|
6985
|
-
function hasRoles(profile) {
|
|
6986
|
-
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
6987
|
-
return profile.user.idam.roles.length > 0;
|
|
6988
|
-
}
|
|
6989
|
-
return false;
|
|
6990
|
-
}
|
|
6991
|
-
// @dynamic
|
|
6992
|
-
class Profile {
|
|
6993
|
-
isSolicitor() {
|
|
6994
|
-
if (hasRoles(this)) {
|
|
6995
|
-
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
6996
|
-
}
|
|
6997
|
-
return false;
|
|
6998
|
-
}
|
|
6999
|
-
isCourtAdmin() {
|
|
7000
|
-
if (hasRoles(this)) {
|
|
7001
|
-
return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
|
|
7002
|
-
}
|
|
7003
|
-
return false;
|
|
7004
|
-
}
|
|
7005
|
-
}
|
|
7006
|
-
__decorate([
|
|
7007
|
-
Type(() => Jurisdiction),
|
|
7008
|
-
__metadata("design:type", Array)
|
|
7009
|
-
], Profile.prototype, "jurisdictions", void 0);
|
|
7010
|
-
|
|
7011
|
-
class ProfileService {
|
|
7012
|
-
constructor(httpService, appConfig) {
|
|
7013
|
-
this.httpService = httpService;
|
|
7014
|
-
this.appConfig = appConfig;
|
|
7015
|
-
}
|
|
7016
|
-
get() {
|
|
7017
|
-
const url = this.appConfig.getCaseDataUrl() + ProfileService.URL;
|
|
7018
|
-
const headers = new HttpHeaders()
|
|
7019
|
-
.set('experimental', 'true')
|
|
7020
|
-
.set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
|
|
7021
|
-
.set('Content-Type', 'application/json');
|
|
7022
|
-
return this.httpService
|
|
7023
|
-
.get(url, { headers, observe: 'body' })
|
|
7024
|
-
.pipe(map((p) => plainToClass(Profile, p)));
|
|
7025
|
-
}
|
|
7026
|
-
}
|
|
7027
|
-
ProfileService.V2_MEDIATYPE_USER_PROFILE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-user-profile.v2+json;charset=UTF-8';
|
|
7028
|
-
ProfileService.URL = '/internal/profile';
|
|
7029
|
-
ProfileService.ɵfac = function ProfileService_Factory(t) { return new (t || ProfileService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7030
|
-
ProfileService.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileService, factory: ProfileService.ɵfac });
|
|
7031
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileService, [{
|
|
7032
|
-
type: Injectable
|
|
7033
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
7034
|
-
|
|
7035
|
-
class ProfileNotifier {
|
|
7036
|
-
constructor() {
|
|
7037
|
-
this.profileSource = new BehaviorSubject(new Profile());
|
|
7038
|
-
this.profile = this.profileSource.asObservable();
|
|
7039
|
-
}
|
|
7040
|
-
announceProfile(profile) {
|
|
7041
|
-
this.profileSource.next(profile);
|
|
7042
|
-
}
|
|
7043
|
-
}
|
|
7044
|
-
ProfileNotifier.ɵfac = function ProfileNotifier_Factory(t) { return new (t || ProfileNotifier)(); };
|
|
7045
|
-
ProfileNotifier.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileNotifier, factory: ProfileNotifier.ɵfac });
|
|
7046
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileNotifier, [{
|
|
7047
|
-
type: Injectable
|
|
7048
|
-
}], null, null); })();
|
|
7049
|
-
|
|
7050
|
-
class RequestOptionsBuilder {
|
|
7051
|
-
/**
|
|
7052
|
-
* Assess the value to see if it should be included in the request options.
|
|
7053
|
-
* If it's null or an "empty" string, it shouldn't be.
|
|
7054
|
-
*
|
|
7055
|
-
* @param value The value to be assessed.
|
|
7056
|
-
*/
|
|
7057
|
-
static includeParam(value) {
|
|
7058
|
-
if (value) {
|
|
7059
|
-
if (typeof (value) === 'string') {
|
|
7060
|
-
return value.trim().length > 0;
|
|
7061
|
-
}
|
|
7062
|
-
return true;
|
|
7063
|
-
}
|
|
7064
|
-
return false;
|
|
7065
|
-
}
|
|
7066
|
-
buildOptions(metaCriteria, caseCriteria, view) {
|
|
7067
|
-
// TODO: This should probably be the now built-in URLSearchParams but it
|
|
7068
|
-
// requires a bigger refactor and there are bigger fish to fry right now.
|
|
7069
|
-
let params = new HttpParams();
|
|
7070
|
-
if (view) {
|
|
7071
|
-
params = params.set('view', view);
|
|
7072
|
-
}
|
|
7073
|
-
if (metaCriteria) {
|
|
7074
|
-
for (const criterion of Object.keys(metaCriteria)) {
|
|
7075
|
-
// EUI-3490. Make sure the parameter should be included for adding it.
|
|
7076
|
-
// This was already handled by the old URLSearchParams mechanism.
|
|
7077
|
-
if (RequestOptionsBuilder.includeParam(metaCriteria[criterion])) {
|
|
7078
|
-
params = params.set(criterion, metaCriteria[criterion]);
|
|
7079
|
-
}
|
|
7080
|
-
}
|
|
7081
|
-
}
|
|
7082
|
-
if (caseCriteria) {
|
|
7083
|
-
for (const criterion of Object.keys(caseCriteria)) {
|
|
7084
|
-
if (RequestOptionsBuilder.includeParam(caseCriteria[criterion])) {
|
|
7085
|
-
const key = RequestOptionsBuilder.FIELD_PREFIX + criterion;
|
|
7086
|
-
const value = caseCriteria[criterion].trim ? caseCriteria[criterion].trim() : caseCriteria[criterion];
|
|
7087
|
-
params = params.set(key, value.replace(/’/i, `'`));
|
|
7088
|
-
}
|
|
7089
|
-
}
|
|
7090
|
-
}
|
|
7091
|
-
const options = { params, observe: 'body' };
|
|
7092
|
-
return options;
|
|
7093
|
-
}
|
|
7094
|
-
}
|
|
7095
|
-
RequestOptionsBuilder.FIELD_PREFIX = 'case.';
|
|
7096
|
-
RequestOptionsBuilder.ɵfac = function RequestOptionsBuilder_Factory(t) { return new (t || RequestOptionsBuilder)(); };
|
|
7097
|
-
RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBuilder, factory: RequestOptionsBuilder.ɵfac });
|
|
7098
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RequestOptionsBuilder, [{
|
|
7099
|
-
type: Injectable
|
|
7100
|
-
}], null, null); })();
|
|
7101
|
-
|
|
7102
|
-
class SearchService {
|
|
7103
|
-
constructor(appConfig, httpService, requestOptionsBuilder, loadingService) {
|
|
7104
|
-
this.appConfig = appConfig;
|
|
7105
|
-
this.httpService = httpService;
|
|
7106
|
-
this.requestOptionsBuilder = requestOptionsBuilder;
|
|
7107
|
-
this.loadingService = loadingService;
|
|
7108
|
-
}
|
|
7109
|
-
search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7110
|
-
const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
|
|
7111
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
7112
|
-
+ `/case-types/${caseTypeId}`
|
|
7113
|
-
+ `/cases`;
|
|
7114
|
-
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7115
|
-
const loadingToken = this.loadingService.register();
|
|
7116
|
-
return this.httpService
|
|
7117
|
-
.get(url, options)
|
|
7118
|
-
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
7119
|
-
}
|
|
7120
|
-
searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7121
|
-
const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
7122
|
-
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7123
|
-
const body = {
|
|
7124
|
-
sort,
|
|
7125
|
-
size: this.appConfig.getPaginationPageSize()
|
|
7126
|
-
};
|
|
7127
|
-
const loadingToken = this.loadingService.register();
|
|
7128
|
-
return this.httpService
|
|
7129
|
-
.post(url, body, options)
|
|
7130
|
-
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
7131
|
-
}
|
|
7132
|
-
getSearchInputUrl(caseTypeId) {
|
|
7133
|
-
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/search-inputs`;
|
|
7134
|
-
}
|
|
7135
|
-
getSearchInputs(jurisdictionId, caseTypeId) {
|
|
7136
|
-
const url = this.getSearchInputUrl(caseTypeId);
|
|
7137
|
-
const headers = new HttpHeaders()
|
|
7138
|
-
.set('experimental', 'true')
|
|
7139
|
-
.set('Accept', SearchService.V2_MEDIATYPE_SEARCH_INPUTS)
|
|
7140
|
-
.set('Content-Type', 'application/json');
|
|
7141
|
-
this.currentJurisdiction = jurisdictionId;
|
|
7142
|
-
this.currentCaseType = caseTypeId;
|
|
7143
|
-
return this.httpService
|
|
7144
|
-
.get(url, { headers, observe: 'body' })
|
|
7145
|
-
.pipe(map(body => {
|
|
7146
|
-
const searchInputs = body.searchInputs;
|
|
7147
|
-
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
7148
|
-
searchInputs.forEach(item => {
|
|
7149
|
-
item.field.label = item.label;
|
|
7150
|
-
item.field.display_context_parameter = item.display_context_parameter;
|
|
7151
|
-
});
|
|
7152
|
-
}
|
|
7153
|
-
else {
|
|
7154
|
-
throw new Error('Response expired');
|
|
7155
|
-
}
|
|
7156
|
-
return searchInputs;
|
|
7157
|
-
}));
|
|
7158
|
-
}
|
|
7159
|
-
isDataValid(jurisdictionId, caseTypeId) {
|
|
7160
|
-
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
7161
|
-
}
|
|
7162
|
-
}
|
|
7163
|
-
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7164
|
-
SearchService.VIEW_SEARCH = 'SEARCH';
|
|
7165
|
-
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7166
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7167
|
-
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
|
|
7168
|
-
SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7169
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
|
|
7170
|
-
type: Injectable
|
|
7171
|
-
}], function () { return [{ type: AbstractAppConfig }, { type: HttpService }, { type: RequestOptionsBuilder }, { type: LoadingService }]; }, null); })();
|
|
7172
|
-
|
|
7173
|
-
class RouterHelperService {
|
|
7174
|
-
getUrlSegmentsFromRoot(route) {
|
|
7175
|
-
return route.pathFromRoot
|
|
7176
|
-
.filter(r => r.url && r.url.length)
|
|
7177
|
-
.reduce((acc, r) => {
|
|
7178
|
-
r.url.forEach(url => {
|
|
7179
|
-
acc.push(url.path);
|
|
7180
|
-
});
|
|
7181
|
-
return acc;
|
|
7182
|
-
}, []);
|
|
7183
|
-
}
|
|
7184
|
-
}
|
|
7185
|
-
RouterHelperService.ɵfac = function RouterHelperService_Factory(t) { return new (t || RouterHelperService)(); };
|
|
7186
|
-
RouterHelperService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterHelperService, factory: RouterHelperService.ɵfac });
|
|
7187
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterHelperService, [{
|
|
7188
|
-
type: Injectable
|
|
7189
|
-
}], null, null); })();
|
|
7190
|
-
|
|
7191
|
-
class WindowService {
|
|
7192
|
-
locationAssign(url) {
|
|
7193
|
-
window.location.assign(url);
|
|
7194
|
-
}
|
|
7195
|
-
setLocalStorage(key, value) {
|
|
7196
|
-
window.localStorage.setItem(key, value);
|
|
7197
|
-
}
|
|
7198
|
-
getLocalStorage(key) {
|
|
7199
|
-
return window.localStorage.getItem(key);
|
|
7200
|
-
}
|
|
7201
|
-
clearLocalStorage() {
|
|
7202
|
-
window.localStorage.clear();
|
|
7203
|
-
}
|
|
7204
|
-
removeLocalStorage(key) {
|
|
7205
|
-
window.localStorage.removeItem(key);
|
|
7206
|
-
}
|
|
7207
|
-
setSessionStorage(key, value) {
|
|
7208
|
-
window.sessionStorage.setItem(key, value);
|
|
7209
|
-
}
|
|
7210
|
-
getSessionStorage(key) {
|
|
7211
|
-
return window.sessionStorage.getItem(key);
|
|
7212
|
-
}
|
|
7213
|
-
openOnNewTab(url) {
|
|
7214
|
-
window.open(url, '_blank');
|
|
7215
|
-
}
|
|
7216
|
-
confirm(message) {
|
|
7217
|
-
return window.confirm(message);
|
|
7218
|
-
}
|
|
7219
|
-
}
|
|
7220
|
-
WindowService.ɵfac = function WindowService_Factory(t) { return new (t || WindowService)(); };
|
|
7221
|
-
WindowService.ɵprov = i0.ɵɵdefineInjectable({ token: WindowService, factory: WindowService.ɵfac });
|
|
7222
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WindowService, [{
|
|
7223
|
-
type: Injectable
|
|
7224
|
-
}], null, null); })();
|
|
7225
|
-
|
|
7226
|
-
class WorkbasketInputFilterService {
|
|
7227
|
-
constructor(httpService, appConfig) {
|
|
7228
|
-
this.httpService = httpService;
|
|
7229
|
-
this.appConfig = appConfig;
|
|
7230
|
-
}
|
|
7231
|
-
getWorkbasketInputUrl(caseTypeId) {
|
|
7232
|
-
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/work-basket-inputs`;
|
|
7233
|
-
}
|
|
7234
|
-
getWorkbasketInputs(jurisdictionId, caseTypeId) {
|
|
7235
|
-
const url = this.getWorkbasketInputUrl(caseTypeId);
|
|
7236
|
-
const headers = new HttpHeaders()
|
|
7237
|
-
.set('experimental', 'true')
|
|
7238
|
-
.set('Accept', WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS)
|
|
7239
|
-
.set('Content-Type', 'application/json');
|
|
7240
|
-
this.currentJurisdiction = jurisdictionId;
|
|
7241
|
-
this.currentCaseType = caseTypeId;
|
|
7242
|
-
return this.httpService
|
|
7243
|
-
.get(url, { headers, observe: 'body' })
|
|
7244
|
-
.pipe(map(body => {
|
|
7245
|
-
const workbasketInputs = body.workbasketInputs;
|
|
7246
|
-
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
7247
|
-
workbasketInputs.forEach(item => {
|
|
7248
|
-
item.field.label = item.label;
|
|
7249
|
-
if (item.display_context_parameter) {
|
|
7250
|
-
item.field.display_context_parameter = item.display_context_parameter;
|
|
7251
|
-
}
|
|
7252
|
-
});
|
|
7253
|
-
}
|
|
7254
|
-
else {
|
|
7255
|
-
throw new Error('Response expired');
|
|
7256
|
-
}
|
|
7257
|
-
return workbasketInputs;
|
|
7258
|
-
}));
|
|
7259
|
-
}
|
|
7260
|
-
isDataValid(jurisdictionId, caseTypeId) {
|
|
7261
|
-
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
7262
|
-
}
|
|
7263
|
-
}
|
|
7264
|
-
WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-workbasket-input-details.v2+json;charset=UTF-8';
|
|
7265
|
-
WorkbasketInputFilterService.ɵfac = function WorkbasketInputFilterService_Factory(t) { return new (t || WorkbasketInputFilterService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7266
|
-
WorkbasketInputFilterService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkbasketInputFilterService, factory: WorkbasketInputFilterService.ɵfac });
|
|
7267
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkbasketInputFilterService, [{
|
|
7268
|
-
type: Injectable
|
|
7269
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
7270
|
-
|
|
7271
|
-
class DefinitionsService {
|
|
7272
|
-
constructor(http, appConfig) {
|
|
7273
|
-
this.http = http;
|
|
7274
|
-
this.appConfig = appConfig;
|
|
7275
|
-
}
|
|
7276
|
-
getCaseTypes(jurisdictionId, access) {
|
|
7277
|
-
const url = this.appConfig.getApiUrl()
|
|
7278
|
-
+ `/caseworkers/:uid`
|
|
7279
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
7280
|
-
+ `/case-types?access=${access}`;
|
|
7281
|
-
return this.http
|
|
7282
|
-
.get(url).pipe(map(response => response));
|
|
7283
|
-
}
|
|
7284
|
-
getJurisdictions(access) {
|
|
7285
|
-
const url = this.appConfig.getApiUrl()
|
|
7286
|
-
+ `/caseworkers/:uid`
|
|
7287
|
-
+ `/jurisdictions?access=${access}`;
|
|
7288
|
-
return this.http
|
|
7289
|
-
.get(url)
|
|
7290
|
-
.pipe(map(response => response));
|
|
7291
|
-
}
|
|
7292
|
-
}
|
|
7293
|
-
DefinitionsService.ɵfac = function DefinitionsService_Factory(t) { return new (t || DefinitionsService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7294
|
-
DefinitionsService.ɵprov = i0.ɵɵdefineInjectable({ token: DefinitionsService, factory: DefinitionsService.ɵfac });
|
|
7295
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsService, [{
|
|
7296
|
-
type: Injectable
|
|
7297
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
7298
|
-
|
|
7299
|
-
class DefinitionsModule {
|
|
7300
|
-
}
|
|
7301
|
-
DefinitionsModule.ɵfac = function DefinitionsModule_Factory(t) { return new (t || DefinitionsModule)(); };
|
|
7302
|
-
DefinitionsModule.ɵmod = i0.ɵɵdefineNgModule({ type: DefinitionsModule });
|
|
7303
|
-
DefinitionsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
7304
|
-
DefinitionsService
|
|
7305
|
-
] });
|
|
7306
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsModule, [{
|
|
7307
|
-
type: NgModule,
|
|
7308
|
-
args: [{
|
|
7309
|
-
providers: [
|
|
7310
|
-
DefinitionsService
|
|
7311
|
-
]
|
|
7312
|
-
}]
|
|
7313
|
-
}], null, null); })();
|
|
7314
|
-
|
|
7315
|
-
class SearchResultViewItemComparatorFactory {
|
|
7316
|
-
createSearchResultViewItemComparator(column) {
|
|
7317
|
-
const fieldId = column.case_field_id;
|
|
7318
|
-
switch (column.case_field_type.type) {
|
|
7319
|
-
case ('MultiSelectList'): {
|
|
7320
|
-
return this.textArrayComparator(fieldId);
|
|
7321
|
-
}
|
|
7322
|
-
case ('Number'):
|
|
7323
|
-
case ('MoneyGBP'): {
|
|
7324
|
-
return this.numberComparator(fieldId);
|
|
7325
|
-
}
|
|
7326
|
-
case ('Text'):
|
|
7327
|
-
case ('TextArea'):
|
|
7328
|
-
case ('Email'):
|
|
7329
|
-
case ('Date'):
|
|
7330
|
-
case ('DateTime'):
|
|
7331
|
-
case ('Label'):
|
|
7332
|
-
case ('Postcode'):
|
|
7333
|
-
case ('YesOrNo'):
|
|
7334
|
-
case ('PhoneUK'):
|
|
7335
|
-
case ('FixedList'): {
|
|
7336
|
-
return this.stringComparator(fieldId);
|
|
7337
|
-
}
|
|
7338
|
-
default: {
|
|
7339
|
-
return undefined;
|
|
7340
|
-
}
|
|
7341
|
-
}
|
|
7342
|
-
}
|
|
7343
|
-
numberComparator(fieldId) {
|
|
7344
|
-
return {
|
|
7345
|
-
compare(a, b) {
|
|
7346
|
-
let fieldA = a.case_fields[fieldId];
|
|
7347
|
-
let fieldB = b.case_fields[fieldId];
|
|
7348
|
-
fieldA = isUndefined(fieldA) || fieldA === null ? 0 : fieldA;
|
|
7349
|
-
fieldB = isUndefined(fieldB) || fieldB === null ? 0 : fieldB;
|
|
7350
|
-
return fieldA - fieldB;
|
|
7351
|
-
}
|
|
7352
|
-
};
|
|
7353
|
-
}
|
|
7354
|
-
stringComparator(fieldId) {
|
|
7355
|
-
return {
|
|
7356
|
-
compare(a, b) {
|
|
7357
|
-
let fieldA = a.case_fields[fieldId];
|
|
7358
|
-
let fieldB = b.case_fields[fieldId];
|
|
7359
|
-
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
|
|
7360
|
-
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
|
|
7361
|
-
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
7362
|
-
}
|
|
7363
|
-
};
|
|
7364
|
-
}
|
|
7365
|
-
textArrayComparator(fieldId) {
|
|
7366
|
-
return {
|
|
7367
|
-
compare(a, b) {
|
|
7368
|
-
let fieldA = a.case_fields[fieldId];
|
|
7369
|
-
let fieldB = b.case_fields[fieldId];
|
|
7370
|
-
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
|
|
7371
|
-
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
|
|
7372
|
-
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
7373
|
-
}
|
|
7374
|
-
};
|
|
7375
|
-
}
|
|
7376
|
-
}
|
|
7377
|
-
SearchResultViewItemComparatorFactory.ɵfac = function SearchResultViewItemComparatorFactory_Factory(t) { return new (t || SearchResultViewItemComparatorFactory)(); };
|
|
7378
|
-
SearchResultViewItemComparatorFactory.ɵprov = i0.ɵɵdefineInjectable({ token: SearchResultViewItemComparatorFactory, factory: SearchResultViewItemComparatorFactory.ɵfac });
|
|
7379
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultViewItemComparatorFactory, [{
|
|
7380
|
-
type: Injectable
|
|
7381
|
-
}], null, null); })();
|
|
7382
|
-
|
|
7383
|
-
class OrganisationService {
|
|
7384
|
-
constructor(http, appconfig) {
|
|
7385
|
-
this.http = http;
|
|
7386
|
-
this.appconfig = appconfig;
|
|
7387
|
-
}
|
|
7388
|
-
static mapOrganisation(organisations) {
|
|
7389
|
-
const organisationsVm = new Array();
|
|
7390
|
-
organisations.forEach(org => {
|
|
7391
|
-
let contactInformation = null;
|
|
7392
|
-
if (org.contactInformation && org.contactInformation[0]) {
|
|
7393
|
-
contactInformation = org.contactInformation[0];
|
|
7394
|
-
}
|
|
7395
|
-
organisationsVm.push({
|
|
7396
|
-
organisationIdentifier: org.organisationIdentifier,
|
|
7397
|
-
name: org.name,
|
|
7398
|
-
addressLine1: contactInformation !== null ? contactInformation.addressLine1 : null,
|
|
7399
|
-
addressLine2: contactInformation !== null ? contactInformation.addressLine2 : null,
|
|
7400
|
-
addressLine3: contactInformation !== null ? contactInformation.addressLine3 : null,
|
|
7401
|
-
townCity: contactInformation !== null ? contactInformation.townCity : null,
|
|
7402
|
-
county: contactInformation !== null ? contactInformation.county : null,
|
|
7403
|
-
country: contactInformation !== null ? contactInformation.country : null,
|
|
7404
|
-
postCode: contactInformation !== null ? contactInformation.postCode : null,
|
|
7405
|
-
});
|
|
7406
|
-
});
|
|
7407
|
-
return organisationsVm;
|
|
7408
|
-
}
|
|
7409
|
-
getActiveOrganisations() {
|
|
7410
|
-
if (!this.organisations$) {
|
|
7411
|
-
const url = this.appconfig.getPrdUrl();
|
|
7412
|
-
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
7413
|
-
this.organisations$ = this.http.get(url)
|
|
7414
|
-
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
7415
|
-
console.log(e);
|
|
7416
|
-
// Handle error and return blank Observable array
|
|
7417
|
-
return of([]);
|
|
7418
|
-
}));
|
|
7419
|
-
timer(cacheTimeOut).subscribe(() => {
|
|
7420
|
-
this.organisations$ = null;
|
|
7421
|
-
});
|
|
7422
|
-
}
|
|
7423
|
-
return this.organisations$;
|
|
7424
|
-
}
|
|
7425
|
-
}
|
|
7426
|
-
OrganisationService.ɵfac = function OrganisationService_Factory(t) { return new (t || OrganisationService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7427
|
-
OrganisationService.ɵprov = i0.ɵɵdefineInjectable({ token: OrganisationService, factory: OrganisationService.ɵfac });
|
|
7428
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationService, [{
|
|
7429
|
-
type: Injectable
|
|
7430
|
-
}], function () { return [{ type: i1$2.HttpClient }, { type: AbstractAppConfig }]; }, null); })();
|
|
7431
|
-
|
|
7432
|
-
class BrowserService {
|
|
7433
|
-
isFirefox() {
|
|
7434
|
-
return window.navigator.userAgent.indexOf('Firefox') > -1;
|
|
7435
|
-
}
|
|
7436
|
-
isSafari() {
|
|
7437
|
-
const isSafariAgent = window.navigator.userAgent.indexOf('Safari') > -1;
|
|
7438
|
-
const isChromeAgent = window.navigator.userAgent.indexOf('Chrome') > -1;
|
|
7439
|
-
if ((isChromeAgent) && (isSafariAgent)) {
|
|
7440
|
-
return false;
|
|
7441
|
-
}
|
|
7442
|
-
return isSafariAgent;
|
|
7443
|
-
}
|
|
7444
|
-
isIEOrEdge() {
|
|
7445
|
-
return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
7446
|
-
}
|
|
7447
|
-
}
|
|
7448
|
-
BrowserService.ɵfac = function BrowserService_Factory(t) { return new (t || BrowserService)(); };
|
|
7449
|
-
BrowserService.ɵprov = i0.ɵɵdefineInjectable({ token: BrowserService, factory: BrowserService.ɵfac });
|
|
7450
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BrowserService, [{
|
|
7451
|
-
type: Injectable
|
|
7452
|
-
}], null, null); })();
|
|
7453
|
-
|
|
7454
|
-
class LoadingModule {
|
|
7455
|
-
}
|
|
7456
|
-
LoadingModule.ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
7457
|
-
LoadingModule.ɵmod = i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
7458
|
-
LoadingModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
7459
|
-
LoadingService
|
|
7460
|
-
], imports: [[]] });
|
|
7461
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
7462
|
-
type: NgModule,
|
|
7463
|
-
args: [{
|
|
7464
|
-
imports: [],
|
|
7465
|
-
declarations: [],
|
|
7466
|
-
exports: [],
|
|
7467
|
-
providers: [
|
|
7468
|
-
LoadingService
|
|
7469
|
-
]
|
|
7470
|
-
}]
|
|
7471
|
-
}], null, null); })();
|
|
7472
|
-
|
|
7473
|
-
class CaseFileViewCategory {
|
|
7474
|
-
}
|
|
7475
|
-
|
|
7476
|
-
class CaseFileViewDocument {
|
|
7477
|
-
}
|
|
7478
|
-
|
|
7479
|
-
/**
|
|
7480
|
-
* DTO to provide typing of the response from the CCD Data Store API for Categories and Documents data.
|
|
7481
|
-
* @see {@link https://tools.hmcts.net/confluence/x/0KSDX#CaseFileViewDocumentDataendpointLLD-SuccessResponsePayload} for full details
|
|
7482
|
-
*/
|
|
7483
|
-
class CategoriesAndDocuments {
|
|
7484
|
-
}
|
|
7485
|
-
|
|
7486
|
-
class DocumentTreeNode {
|
|
7487
|
-
get childDocumentCount() {
|
|
7488
|
-
const countChildren = (childNodes) => {
|
|
7489
|
-
let count = 0;
|
|
7490
|
-
if (childNodes === null || childNodes === void 0 ? void 0 : childNodes.length) {
|
|
7491
|
-
const documents = childNodes.filter(item => item.type === 'document');
|
|
7492
|
-
count += documents.length;
|
|
7493
|
-
childNodes.forEach((children) => {
|
|
7494
|
-
count += countChildren(children.children);
|
|
7495
|
-
});
|
|
7496
|
-
}
|
|
7497
|
-
return count;
|
|
7498
|
-
};
|
|
7499
|
-
return countChildren(this.children);
|
|
7500
|
-
}
|
|
7501
|
-
}
|
|
7502
|
-
__decorate([
|
|
7503
|
-
Type(() => DocumentTreeNode),
|
|
7504
|
-
__metadata("design:type", Array)
|
|
7505
|
-
], DocumentTreeNode.prototype, "children", void 0);
|
|
7506
|
-
__decorate([
|
|
7507
|
-
Expose(),
|
|
7508
|
-
__metadata("design:type", Object),
|
|
7509
|
-
__metadata("design:paramtypes", [])
|
|
7510
|
-
], DocumentTreeNode.prototype, "childDocumentCount", null);
|
|
7511
|
-
|
|
7512
|
-
function CaseFileViewFolderComponent_cdk_nested_tree_node_6_Template(rf, ctx) { if (rf & 1) {
|
|
7513
|
-
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
7514
|
-
i0.ɵɵelementStart(1, "div", 8);
|
|
7515
|
-
i0.ɵɵelement(2, "button", 9);
|
|
7516
|
-
i0.ɵɵelementStart(3, "span", 10);
|
|
7517
|
-
i0.ɵɵtext(4);
|
|
7518
|
-
i0.ɵɵelementEnd();
|
|
7519
|
-
i0.ɵɵelementEnd();
|
|
7520
|
-
i0.ɵɵelementEnd();
|
|
7521
|
-
} if (rf & 2) {
|
|
7522
|
-
const node_r2 = ctx.$implicit;
|
|
7523
|
-
i0.ɵɵadvance(4);
|
|
7524
|
-
i0.ɵɵtextInterpolate(node_r2.name);
|
|
7525
|
-
} }
|
|
7526
|
-
function CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template(rf, ctx) { if (rf & 1) {
|
|
7527
|
-
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
7528
|
-
i0.ɵɵelementStart(1, "div", 8);
|
|
7529
|
-
i0.ɵɵelementStart(2, "button", 11);
|
|
7530
|
-
i0.ɵɵelementStart(3, "span", 12);
|
|
7531
|
-
i0.ɵɵtext(4);
|
|
7532
|
-
i0.ɵɵelementEnd();
|
|
7533
|
-
i0.ɵɵelementEnd();
|
|
7534
|
-
i0.ɵɵelementStart(5, "span", 13);
|
|
7535
|
-
i0.ɵɵtext(6);
|
|
7536
|
-
i0.ɵɵelementEnd();
|
|
7537
|
-
i0.ɵɵelementEnd();
|
|
7538
|
-
i0.ɵɵelementStart(7, "div");
|
|
7539
|
-
i0.ɵɵelementContainer(8, 14);
|
|
7540
|
-
i0.ɵɵelementEnd();
|
|
7541
|
-
i0.ɵɵelementEnd();
|
|
7542
|
-
} if (rf & 2) {
|
|
7543
|
-
const node_r3 = ctx.$implicit;
|
|
7544
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
7545
|
-
i0.ɵɵadvance(2);
|
|
7546
|
-
i0.ɵɵattribute("aria-label", "toggle " + node_r3.name);
|
|
7547
|
-
i0.ɵɵadvance(2);
|
|
7548
|
-
i0.ɵɵtextInterpolate(node_r3.childDocumentCount);
|
|
7549
|
-
i0.ɵɵadvance(2);
|
|
7550
|
-
i0.ɵɵtextInterpolate(node_r3.name);
|
|
7551
|
-
i0.ɵɵadvance(1);
|
|
7552
|
-
i0.ɵɵclassProp("document-tree-invisible", !ctx_r1.nestedTreeControl.isExpanded(node_r3));
|
|
7553
|
-
} }
|
|
7554
|
-
class CaseFileViewFolderComponent {
|
|
7555
|
-
constructor() {
|
|
7556
|
-
this.categories = [];
|
|
7557
|
-
this.getChildren = (node) => of(node.children);
|
|
7558
|
-
this.hasNestedChild = (_, nodeData) => nodeData.children;
|
|
7559
|
-
this.nestedTreeControl = new NestedTreeControl(this.getChildren);
|
|
7560
|
-
}
|
|
7561
|
-
ngOnInit() {
|
|
7562
|
-
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments$
|
|
7563
|
-
.subscribe(categoriesAndDocuments => {
|
|
7564
|
-
// Using the mock data for now as we have to display the documents as well for demo purpose
|
|
7565
|
-
const categories = this.loadCategories(); // categoriesAndDocuments.categories;
|
|
7566
|
-
// Generate document tree data from categories
|
|
7567
|
-
const treeData = this.generateTreeData(categories);
|
|
7568
|
-
// Append uncategorised documents
|
|
7569
|
-
if (categoriesAndDocuments.uncategorised_documents && categoriesAndDocuments.uncategorised_documents.length > 0) {
|
|
7570
|
-
const uncategorisedDocuments = this.getUncategorisedDocuments(categoriesAndDocuments.uncategorised_documents);
|
|
7571
|
-
treeData.push(uncategorisedDocuments);
|
|
7572
|
-
}
|
|
7573
|
-
// Initialise cdk tree with generated data
|
|
7574
|
-
this.nestedDataSource = treeData;
|
|
7575
|
-
});
|
|
7576
|
-
}
|
|
7577
|
-
generateTreeData(categories) {
|
|
7578
|
-
return categories.reduce((tree, node) => [
|
|
7579
|
-
...tree,
|
|
7580
|
-
...[
|
|
7581
|
-
plainToClass(DocumentTreeNode, {
|
|
7582
|
-
name: node.category_name,
|
|
7583
|
-
type: 'category',
|
|
7584
|
-
children: [...this.generateTreeData(node.sub_categories), ...this.getDocuments(node.documents)],
|
|
7585
|
-
})
|
|
7586
|
-
],
|
|
7587
|
-
], []);
|
|
7588
|
-
}
|
|
7589
|
-
getDocuments(documents) {
|
|
7590
|
-
const documentsToReturn = [];
|
|
7591
|
-
documents.forEach(document => {
|
|
7592
|
-
documentsToReturn.push(plainToClass(DocumentTreeNode, { name: document.document_filename, type: 'document' }));
|
|
7593
|
-
});
|
|
7594
|
-
return documentsToReturn;
|
|
7595
|
-
}
|
|
7596
|
-
getUncategorisedDocuments(uncategorisedDocuments) {
|
|
7597
|
-
const documents = [];
|
|
7598
|
-
uncategorisedDocuments.forEach(document => {
|
|
7599
|
-
documents.push(plainToClass(DocumentTreeNode, { name: document.document_filename, type: 'document' }));
|
|
7600
|
-
});
|
|
7601
|
-
return plainToClass(DocumentTreeNode, { name: CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE, type: 'category', children: documents });
|
|
7602
|
-
}
|
|
7603
|
-
ngOnDestroy() {
|
|
7604
|
-
if (this.categoriesAndDocumentsSubscription) {
|
|
7605
|
-
this.categoriesAndDocumentsSubscription.unsubscribe();
|
|
6790
|
+
ngOnDestroy() {
|
|
6791
|
+
if (this.categoriesAndDocumentsSubscription) {
|
|
6792
|
+
this.categoriesAndDocumentsSubscription.unsubscribe();
|
|
7606
6793
|
}
|
|
7607
6794
|
}
|
|
7608
6795
|
loadCategories() {
|
|
@@ -7768,7 +6955,7 @@ class CaseFileViewFolderComponent {
|
|
|
7768
6955
|
}
|
|
7769
6956
|
CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
|
|
7770
6957
|
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(); };
|
|
7771
|
-
CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments
|
|
6958
|
+
CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 8, vars: 3, consts: [[1, "document-filter-container"], [1, "document-filter"], [1, "documents-title"], [1, "document-tree-container"], [3, "dataSource", "treeControl"], ["class", "document-tree-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], [1, "node"], ["mat-icon-button", "", "disabled", "", 1, "icon", "icon-document"], [1, "node-name", "node-name-document"], ["mat-icon-button", "", "cdkTreeNodeToggle", "", 1, "icon", "icon-folder"], [1, "document-count"], [1, "node-name", "node-name-folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7772
6959
|
i0.ɵɵelementStart(0, "div", 0);
|
|
7773
6960
|
i0.ɵɵelement(1, "div", 1);
|
|
7774
6961
|
i0.ɵɵelementStart(2, "div", 2);
|
|
@@ -7785,8 +6972,8 @@ CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewF
|
|
|
7785
6972
|
i0.ɵɵadvance(5);
|
|
7786
6973
|
i0.ɵɵproperty("dataSource", ctx.nestedDataSource)("treeControl", ctx.nestedTreeControl);
|
|
7787
6974
|
i0.ɵɵadvance(2);
|
|
7788
|
-
i0.ɵɵproperty("cdkTreeNodeDefWhen", ctx.
|
|
7789
|
-
} }, directives: [i1$5.CdkTree, i1$5.CdkTreeNodeDef, i1$5.CdkNestedTreeNode, i1$5.CdkTreeNodeToggle, i1$5.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{height:60px;border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{margin:4px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .node[_ngcontent-%COMP%]{display:flex;padding:4px}.document-tree-container[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:36px;height:36px;background-size:100%;border:0;background-color:#fff}.document-tree-container[_ngcontent-%COMP%] .icon-folder[_ngcontent-%COMP%]{background-image:url(/assets/images/folder.png)}.document-tree-container[_ngcontent-%COMP%] .icon-document[_ngcontent-%COMP%]{background-image:url(/assets/images/document.png)}.document-tree-container[_ngcontent-%COMP%] .node-name[_ngcontent-%COMP%]{margin-left:6px}.document-tree-container[_ngcontent-%COMP%] .node-name-document[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .node-name-folder[_ngcontent-%COMP%]{margin-top:4px}"] });
|
|
6975
|
+
i0.ɵɵproperty("cdkTreeNodeDefWhen", ctx.nestedChildren);
|
|
6976
|
+
} }, directives: [i1$5.CdkTree, i1$5.CdkTreeNodeDef, i1$5.CdkNestedTreeNode, i1$5.CdkTreeNodeToggle, i1$5.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{height:60px;border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{margin:4px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .node[_ngcontent-%COMP%]{display:flex;padding:4px}.document-tree-container[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:36px;height:36px;background-size:100%;border:0;background-color:#fff}.document-tree-container[_ngcontent-%COMP%] .icon-folder[_ngcontent-%COMP%]{background-image:url(/assets/images/folder.png)}.document-tree-container[_ngcontent-%COMP%] .icon-document[_ngcontent-%COMP%]{background-image:url(/assets/images/document.png)}.document-tree-container[_ngcontent-%COMP%] .node-name[_ngcontent-%COMP%]{margin-left:6px}.document-tree-container[_ngcontent-%COMP%] .node-name-document[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .node-name-folder[_ngcontent-%COMP%]{margin-top:4px}.document-tree-container[_ngcontent-%COMP%] .document-count[_ngcontent-%COMP%]{color:#fff}"] });
|
|
7790
6977
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
7791
6978
|
type: Component,
|
|
7792
6979
|
args: [{
|
|
@@ -7794,7 +6981,7 @@ CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewF
|
|
|
7794
6981
|
styleUrls: ['./case-file-view-folder.component.scss'],
|
|
7795
6982
|
templateUrl: './case-file-view-folder.component.html'
|
|
7796
6983
|
}]
|
|
7797
|
-
}], function () { return []; }, { categoriesAndDocuments
|
|
6984
|
+
}], function () { return []; }, { categoriesAndDocuments: [{
|
|
7798
6985
|
type: Input
|
|
7799
6986
|
}] }); })();
|
|
7800
6987
|
|
|
@@ -7833,7 +7020,7 @@ class CaseFileViewFieldComponent {
|
|
|
7833
7020
|
}
|
|
7834
7021
|
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
7835
7022
|
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService)); };
|
|
7836
|
-
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 8, vars: 1, consts: [[1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [3, "categoriesAndDocuments
|
|
7023
|
+
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 8, vars: 1, consts: [[1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [3, "categoriesAndDocuments"], [1, "slider"], [1, "media-viewer-container"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7837
7024
|
i0.ɵɵelementStart(0, "h2", 0);
|
|
7838
7025
|
i0.ɵɵtext(1, "Case file");
|
|
7839
7026
|
i0.ɵɵelementEnd();
|
|
@@ -7848,14 +7035,14 @@ CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFi
|
|
|
7848
7035
|
i0.ɵɵelementEnd();
|
|
7849
7036
|
} if (rf & 2) {
|
|
7850
7037
|
i0.ɵɵadvance(4);
|
|
7851
|
-
i0.ɵɵproperty("categoriesAndDocuments
|
|
7038
|
+
i0.ɵɵproperty("categoriesAndDocuments", ctx.categoriesAndDocuments$);
|
|
7852
7039
|
} }, directives: [CaseFileViewFolderComponent], styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{flex:1 1 0%}"] });
|
|
7853
7040
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
|
|
7854
7041
|
type: Component,
|
|
7855
7042
|
args: [{
|
|
7856
7043
|
selector: 'ccd-case-file-view-field',
|
|
7857
7044
|
templateUrl: './case-file-view-field.component.html',
|
|
7858
|
-
styleUrls: ['./case-file-view-field.component.scss']
|
|
7045
|
+
styleUrls: ['./case-file-view-field.component.scss']
|
|
7859
7046
|
}]
|
|
7860
7047
|
}], function () { return [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }]; }, null); })();
|
|
7861
7048
|
|
|
@@ -8169,6 +7356,47 @@ const ɵReadCollectionFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInher
|
|
|
8169
7356
|
}]
|
|
8170
7357
|
}], null, null); })();
|
|
8171
7358
|
|
|
7359
|
+
function hasRoles(profile) {
|
|
7360
|
+
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
7361
|
+
return profile.user.idam.roles.length > 0;
|
|
7362
|
+
}
|
|
7363
|
+
return false;
|
|
7364
|
+
}
|
|
7365
|
+
// @dynamic
|
|
7366
|
+
class Profile {
|
|
7367
|
+
isSolicitor() {
|
|
7368
|
+
if (hasRoles(this)) {
|
|
7369
|
+
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
7370
|
+
}
|
|
7371
|
+
return false;
|
|
7372
|
+
}
|
|
7373
|
+
isCourtAdmin() {
|
|
7374
|
+
if (hasRoles(this)) {
|
|
7375
|
+
return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
|
|
7376
|
+
}
|
|
7377
|
+
return false;
|
|
7378
|
+
}
|
|
7379
|
+
}
|
|
7380
|
+
__decorate([
|
|
7381
|
+
Type(() => Jurisdiction),
|
|
7382
|
+
__metadata("design:type", Array)
|
|
7383
|
+
], Profile.prototype, "jurisdictions", void 0);
|
|
7384
|
+
|
|
7385
|
+
class ProfileNotifier {
|
|
7386
|
+
constructor() {
|
|
7387
|
+
this.profileSource = new BehaviorSubject(new Profile());
|
|
7388
|
+
this.profile = this.profileSource.asObservable();
|
|
7389
|
+
}
|
|
7390
|
+
announceProfile(profile) {
|
|
7391
|
+
this.profileSource.next(profile);
|
|
7392
|
+
}
|
|
7393
|
+
}
|
|
7394
|
+
ProfileNotifier.ɵfac = function ProfileNotifier_Factory(t) { return new (t || ProfileNotifier)(); };
|
|
7395
|
+
ProfileNotifier.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileNotifier, factory: ProfileNotifier.ɵfac });
|
|
7396
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileNotifier, [{
|
|
7397
|
+
type: Injectable
|
|
7398
|
+
}], null, null); })();
|
|
7399
|
+
|
|
8172
7400
|
class RemoveDialogComponent {
|
|
8173
7401
|
constructor(matDialogRef) {
|
|
8174
7402
|
this.matDialogRef = matDialogRef;
|
|
@@ -9607,6 +8835,38 @@ DatetimePickerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DatetimePickerCom
|
|
|
9607
8835
|
type: Input
|
|
9608
8836
|
}] }); })();
|
|
9609
8837
|
|
|
8838
|
+
class CaseFieldService {
|
|
8839
|
+
isOptional(field) {
|
|
8840
|
+
if (!field || !field.display_context) {
|
|
8841
|
+
return false;
|
|
8842
|
+
}
|
|
8843
|
+
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
8844
|
+
}
|
|
8845
|
+
isReadOnly(field) {
|
|
8846
|
+
if (!field || !field.display_context) {
|
|
8847
|
+
return false;
|
|
8848
|
+
}
|
|
8849
|
+
return field.display_context.toUpperCase() === 'READONLY';
|
|
8850
|
+
}
|
|
8851
|
+
isMandatory(field) {
|
|
8852
|
+
if (!field || !field.display_context) {
|
|
8853
|
+
return false;
|
|
8854
|
+
}
|
|
8855
|
+
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
8856
|
+
}
|
|
8857
|
+
isLabel(field) {
|
|
8858
|
+
if (!field || !field.field_type) {
|
|
8859
|
+
return false;
|
|
8860
|
+
}
|
|
8861
|
+
return field.field_type.type === 'Label';
|
|
8862
|
+
}
|
|
8863
|
+
}
|
|
8864
|
+
CaseFieldService.ɵfac = function CaseFieldService_Factory(t) { return new (t || CaseFieldService)(); };
|
|
8865
|
+
CaseFieldService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
8866
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
8867
|
+
type: Injectable
|
|
8868
|
+
}], null, null); })();
|
|
8869
|
+
|
|
9610
8870
|
class IsMandatoryPipe {
|
|
9611
8871
|
constructor(caseFieldService) {
|
|
9612
8872
|
this.caseFieldService = caseFieldService;
|
|
@@ -9712,21 +8972,160 @@ function WriteDateContainerFieldComponent_ng_template_1_Template(rf, ctx) { if (
|
|
|
9712
8972
|
} }
|
|
9713
8973
|
class WriteDateContainerFieldComponent extends AbstractFormFieldComponent {
|
|
9714
8974
|
}
|
|
9715
|
-
WriteDateContainerFieldComponent.ɵfac = function WriteDateContainerFieldComponent_Factory(t) { return ɵWriteDateContainerFieldComponent_BaseFactory(t || WriteDateContainerFieldComponent); };
|
|
9716
|
-
WriteDateContainerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDateContainerFieldComponent, selectors: [["ccd-write-date-container-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["nativeDatepicker", ""], [3, "caseField", "formGroup", "parent"]], template: function WriteDateContainerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9717
|
-
i0.ɵɵtemplate(0, WriteDateContainerFieldComponent_ng_container_0_Template, 2, 3, "ng-container", 0);
|
|
9718
|
-
i0.ɵɵtemplate(1, WriteDateContainerFieldComponent_ng_template_1_Template, 1, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
9719
|
-
} if (rf & 2) {
|
|
9720
|
-
const _r1 = i0.ɵɵreference(2);
|
|
9721
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.dateTimeEntryFormat)("ngIfElse", _r1);
|
|
9722
|
-
} }, directives: [i1.NgIf, DatetimePickerComponent, i1$3.NgControlStatusGroup, i1$3.FormGroupDirective, WriteDateFieldComponent], encapsulation: 2 });
|
|
9723
|
-
const ɵWriteDateContainerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDateContainerFieldComponent);
|
|
9724
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDateContainerFieldComponent, [{
|
|
9725
|
-
type: Component,
|
|
9726
|
-
args: [{
|
|
9727
|
-
selector: 'ccd-write-date-container-field',
|
|
9728
|
-
templateUrl: './write-date-container-field.html'
|
|
9729
|
-
}]
|
|
8975
|
+
WriteDateContainerFieldComponent.ɵfac = function WriteDateContainerFieldComponent_Factory(t) { return ɵWriteDateContainerFieldComponent_BaseFactory(t || WriteDateContainerFieldComponent); };
|
|
8976
|
+
WriteDateContainerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDateContainerFieldComponent, selectors: [["ccd-write-date-container-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["nativeDatepicker", ""], [3, "caseField", "formGroup", "parent"]], template: function WriteDateContainerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8977
|
+
i0.ɵɵtemplate(0, WriteDateContainerFieldComponent_ng_container_0_Template, 2, 3, "ng-container", 0);
|
|
8978
|
+
i0.ɵɵtemplate(1, WriteDateContainerFieldComponent_ng_template_1_Template, 1, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
8979
|
+
} if (rf & 2) {
|
|
8980
|
+
const _r1 = i0.ɵɵreference(2);
|
|
8981
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.dateTimeEntryFormat)("ngIfElse", _r1);
|
|
8982
|
+
} }, directives: [i1.NgIf, DatetimePickerComponent, i1$3.NgControlStatusGroup, i1$3.FormGroupDirective, WriteDateFieldComponent], encapsulation: 2 });
|
|
8983
|
+
const ɵWriteDateContainerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDateContainerFieldComponent);
|
|
8984
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDateContainerFieldComponent, [{
|
|
8985
|
+
type: Component,
|
|
8986
|
+
args: [{
|
|
8987
|
+
selector: 'ccd-write-date-container-field',
|
|
8988
|
+
templateUrl: './write-date-container-field.html'
|
|
8989
|
+
}]
|
|
8990
|
+
}], null, null); })();
|
|
8991
|
+
|
|
8992
|
+
class DocumentManagementService {
|
|
8993
|
+
constructor(http, appConfig) {
|
|
8994
|
+
this.http = http;
|
|
8995
|
+
this.appConfig = appConfig;
|
|
8996
|
+
}
|
|
8997
|
+
uploadFile(formData) {
|
|
8998
|
+
const url = this.getDocStoreUrl();
|
|
8999
|
+
// Do not set any headers, such as "Accept" or "Content-Type", with null values; this is not permitted with the
|
|
9000
|
+
// Angular HttpClient in @angular/common/http. Just create and pass a new HttpHeaders object. Angular will add the
|
|
9001
|
+
// correct headers and values automatically
|
|
9002
|
+
const headers = new HttpHeaders();
|
|
9003
|
+
return this.http
|
|
9004
|
+
.post(url, formData, { headers, observe: 'body' })
|
|
9005
|
+
.pipe(delay(DocumentManagementService.RESPONSE_DELAY));
|
|
9006
|
+
}
|
|
9007
|
+
getMediaViewerInfo(documentFieldValue) {
|
|
9008
|
+
const mediaViewerInfo = {
|
|
9009
|
+
document_binary_url: this.transformDocumentUrl(documentFieldValue.document_binary_url),
|
|
9010
|
+
document_filename: documentFieldValue.document_filename,
|
|
9011
|
+
content_type: this.getContentType(documentFieldValue),
|
|
9012
|
+
annotation_api_url: this.appConfig.getAnnotationApiUrl(),
|
|
9013
|
+
case_id: documentFieldValue.id,
|
|
9014
|
+
case_jurisdiction: documentFieldValue.jurisdiction
|
|
9015
|
+
};
|
|
9016
|
+
return JSON.stringify(mediaViewerInfo);
|
|
9017
|
+
}
|
|
9018
|
+
getContentType(documentFieldValue) {
|
|
9019
|
+
let fileExtension = '<unknown>';
|
|
9020
|
+
if (documentFieldValue.document_filename) {
|
|
9021
|
+
const position = documentFieldValue.document_filename.lastIndexOf('.');
|
|
9022
|
+
if (position === documentFieldValue.document_filename.length) {
|
|
9023
|
+
fileExtension = '';
|
|
9024
|
+
}
|
|
9025
|
+
else if (position >= 0) {
|
|
9026
|
+
fileExtension = documentFieldValue.document_filename.slice(position + 1);
|
|
9027
|
+
}
|
|
9028
|
+
}
|
|
9029
|
+
if (this.isImage(fileExtension)) {
|
|
9030
|
+
return DocumentManagementService.IMAGE;
|
|
9031
|
+
}
|
|
9032
|
+
else if (this.isWord(fileExtension)) {
|
|
9033
|
+
return DocumentManagementService.WORD;
|
|
9034
|
+
}
|
|
9035
|
+
else if (this.isExcel(fileExtension)) {
|
|
9036
|
+
return DocumentManagementService.EXCEL;
|
|
9037
|
+
}
|
|
9038
|
+
else if (this.isPowerpoint(fileExtension)) {
|
|
9039
|
+
return DocumentManagementService.POWERPOINT;
|
|
9040
|
+
}
|
|
9041
|
+
else if (fileExtension.toLowerCase() === 'txt') {
|
|
9042
|
+
return DocumentManagementService.TXT;
|
|
9043
|
+
}
|
|
9044
|
+
else if (fileExtension.toLowerCase() === 'rtf') {
|
|
9045
|
+
return DocumentManagementService.RTF;
|
|
9046
|
+
}
|
|
9047
|
+
else if (fileExtension.toLowerCase() === 'pdf') {
|
|
9048
|
+
return DocumentManagementService.PDF;
|
|
9049
|
+
}
|
|
9050
|
+
else {
|
|
9051
|
+
return fileExtension;
|
|
9052
|
+
}
|
|
9053
|
+
}
|
|
9054
|
+
isImage(imageType) {
|
|
9055
|
+
return DocumentManagementService.imagesList.find(e => e === imageType) !== undefined;
|
|
9056
|
+
}
|
|
9057
|
+
isWord(wordType) {
|
|
9058
|
+
return DocumentManagementService.wordList.find(e => e === wordType) !== undefined;
|
|
9059
|
+
}
|
|
9060
|
+
isExcel(excelType) {
|
|
9061
|
+
return DocumentManagementService.excelList.find(e => e === excelType) !== undefined;
|
|
9062
|
+
}
|
|
9063
|
+
isPowerpoint(powerpointType) {
|
|
9064
|
+
return DocumentManagementService.powerpointList.find(e => e === powerpointType) !== undefined;
|
|
9065
|
+
}
|
|
9066
|
+
transformDocumentUrl(documentBinaryUrl) {
|
|
9067
|
+
const remoteHrsPattern = new RegExp(this.appConfig.getRemoteHrsUrl());
|
|
9068
|
+
documentBinaryUrl = documentBinaryUrl.replace(remoteHrsPattern, this.appConfig.getHrsUrl());
|
|
9069
|
+
const remoteDocumentManagementPattern = new RegExp(this.appConfig.getRemoteDocumentManagementUrl());
|
|
9070
|
+
return documentBinaryUrl.replace(remoteDocumentManagementPattern, this.getDocStoreUrl());
|
|
9071
|
+
}
|
|
9072
|
+
getDocStoreUrl() {
|
|
9073
|
+
return this.appConfig.getDocumentSecureMode() ? this.appConfig.getDocumentManagementUrlV2() : this.appConfig.getDocumentManagementUrl();
|
|
9074
|
+
}
|
|
9075
|
+
}
|
|
9076
|
+
DocumentManagementService.PDF = 'pdf';
|
|
9077
|
+
DocumentManagementService.IMAGE = 'image';
|
|
9078
|
+
DocumentManagementService.WORD = 'word';
|
|
9079
|
+
DocumentManagementService.EXCEL = 'excel';
|
|
9080
|
+
DocumentManagementService.POWERPOINT = 'powerpoint';
|
|
9081
|
+
DocumentManagementService.TXT = 'txt';
|
|
9082
|
+
DocumentManagementService.RTF = 'rtf';
|
|
9083
|
+
// This delay has been added to give enough time to the user on the UI to see the info messages on the document upload
|
|
9084
|
+
// field for cases when uploads are very fast.
|
|
9085
|
+
DocumentManagementService.RESPONSE_DELAY = 1000;
|
|
9086
|
+
DocumentManagementService.imagesList = ['GIF', 'JPG', 'JPEG', 'PNG', 'gif', 'jpg', 'jpeg', 'png'];
|
|
9087
|
+
DocumentManagementService.wordList = ['DOC', 'DOCX', 'doc', 'docx'];
|
|
9088
|
+
DocumentManagementService.excelList = ['XLS', 'XLSX', 'xls', 'xlsx'];
|
|
9089
|
+
DocumentManagementService.powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
|
|
9090
|
+
DocumentManagementService.ɵfac = function DocumentManagementService_Factory(t) { return new (t || DocumentManagementService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
9091
|
+
DocumentManagementService.ɵprov = i0.ɵɵdefineInjectable({ token: DocumentManagementService, factory: DocumentManagementService.ɵfac });
|
|
9092
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DocumentManagementService, [{
|
|
9093
|
+
type: Injectable
|
|
9094
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
9095
|
+
|
|
9096
|
+
class WindowService {
|
|
9097
|
+
locationAssign(url) {
|
|
9098
|
+
window.location.assign(url);
|
|
9099
|
+
}
|
|
9100
|
+
setLocalStorage(key, value) {
|
|
9101
|
+
window.localStorage.setItem(key, value);
|
|
9102
|
+
}
|
|
9103
|
+
getLocalStorage(key) {
|
|
9104
|
+
return window.localStorage.getItem(key);
|
|
9105
|
+
}
|
|
9106
|
+
clearLocalStorage() {
|
|
9107
|
+
window.localStorage.clear();
|
|
9108
|
+
}
|
|
9109
|
+
removeLocalStorage(key) {
|
|
9110
|
+
window.localStorage.removeItem(key);
|
|
9111
|
+
}
|
|
9112
|
+
setSessionStorage(key, value) {
|
|
9113
|
+
window.sessionStorage.setItem(key, value);
|
|
9114
|
+
}
|
|
9115
|
+
getSessionStorage(key) {
|
|
9116
|
+
return window.sessionStorage.getItem(key);
|
|
9117
|
+
}
|
|
9118
|
+
openOnNewTab(url) {
|
|
9119
|
+
window.open(url, '_blank');
|
|
9120
|
+
}
|
|
9121
|
+
confirm(message) {
|
|
9122
|
+
return window.confirm(message);
|
|
9123
|
+
}
|
|
9124
|
+
}
|
|
9125
|
+
WindowService.ɵfac = function WindowService_Factory(t) { return new (t || WindowService)(); };
|
|
9126
|
+
WindowService.ɵprov = i0.ɵɵdefineInjectable({ token: WindowService, factory: WindowService.ɵfac });
|
|
9127
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WindowService, [{
|
|
9128
|
+
type: Injectable
|
|
9730
9129
|
}], null, null); })();
|
|
9731
9130
|
|
|
9732
9131
|
function ReadDocumentFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -10846,705 +10245,1265 @@ FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedList
|
|
|
10846
10245
|
|
|
10847
10246
|
class ReadFixedListFieldComponent extends AbstractFieldReadComponent {
|
|
10848
10247
|
}
|
|
10849
|
-
ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
|
|
10850
|
-
ReadFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedListFieldComponent, selectors: [["ccd-read-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10851
|
-
i0.ɵɵelementStart(0, "span", 0);
|
|
10852
|
-
i0.ɵɵtext(1);
|
|
10853
|
-
i0.ɵɵpipe(2, "ccdFixedList");
|
|
10248
|
+
ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
|
|
10249
|
+
ReadFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedListFieldComponent, selectors: [["ccd-read-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10250
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
10251
|
+
i0.ɵɵtext(1);
|
|
10252
|
+
i0.ɵɵpipe(2, "ccdFixedList");
|
|
10253
|
+
i0.ɵɵelementEnd();
|
|
10254
|
+
} if (rf & 2) {
|
|
10255
|
+
i0.ɵɵadvance(1);
|
|
10256
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.list_items));
|
|
10257
|
+
} }, pipes: [FixedListPipe], encapsulation: 2 });
|
|
10258
|
+
const ɵReadFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadFixedListFieldComponent);
|
|
10259
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadFixedListFieldComponent, [{
|
|
10260
|
+
type: Component,
|
|
10261
|
+
args: [{
|
|
10262
|
+
selector: 'ccd-read-fixed-list-field',
|
|
10263
|
+
template: '<span class="text-16">{{caseField.value | ccdFixedList:caseField.list_items}}</span>',
|
|
10264
|
+
}]
|
|
10265
|
+
}], null, null); })();
|
|
10266
|
+
|
|
10267
|
+
function WriteFixedListFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
10268
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
10269
|
+
i0.ɵɵtext(1);
|
|
10270
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10271
|
+
i0.ɵɵelementEnd();
|
|
10272
|
+
} if (rf & 2) {
|
|
10273
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10274
|
+
i0.ɵɵadvance(1);
|
|
10275
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10276
|
+
} }
|
|
10277
|
+
function WriteFixedListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
10278
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
10279
|
+
i0.ɵɵtext(1);
|
|
10280
|
+
i0.ɵɵelementEnd();
|
|
10281
|
+
} if (rf & 2) {
|
|
10282
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
10283
|
+
i0.ɵɵadvance(1);
|
|
10284
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10285
|
+
} }
|
|
10286
|
+
function WriteFixedListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
10287
|
+
i0.ɵɵelementStart(0, "span", 10);
|
|
10288
|
+
i0.ɵɵtext(1);
|
|
10289
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10290
|
+
i0.ɵɵelementEnd();
|
|
10291
|
+
} if (rf & 2) {
|
|
10292
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
10293
|
+
i0.ɵɵadvance(1);
|
|
10294
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedListFormControl.errors, ctx_r2.caseField.label));
|
|
10295
|
+
} }
|
|
10296
|
+
function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
|
|
10297
|
+
i0.ɵɵelementStart(0, "option", 6);
|
|
10298
|
+
i0.ɵɵtext(1);
|
|
10299
|
+
i0.ɵɵelementEnd();
|
|
10300
|
+
} if (rf & 2) {
|
|
10301
|
+
const type_r4 = ctx.$implicit;
|
|
10302
|
+
i0.ɵɵproperty("ngValue", type_r4.code);
|
|
10303
|
+
i0.ɵɵadvance(1);
|
|
10304
|
+
i0.ɵɵtextInterpolate(type_r4.label);
|
|
10305
|
+
} }
|
|
10306
|
+
const _c0$v = function (a0) { return { "form-group-error": a0 }; };
|
|
10307
|
+
class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
|
|
10308
|
+
get listItems() {
|
|
10309
|
+
if (this.caseField) {
|
|
10310
|
+
if (this.caseField.list_items) {
|
|
10311
|
+
return this.caseField.list_items;
|
|
10312
|
+
}
|
|
10313
|
+
if (this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
10314
|
+
return this.caseField.formatted_value.list_items;
|
|
10315
|
+
}
|
|
10316
|
+
}
|
|
10317
|
+
return [];
|
|
10318
|
+
}
|
|
10319
|
+
ngOnInit() {
|
|
10320
|
+
const isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
10321
|
+
if (isNull) {
|
|
10322
|
+
this.caseField.value = null;
|
|
10323
|
+
}
|
|
10324
|
+
this.fixedListFormControl = this.registerControl(new FormControl(this.caseField.value));
|
|
10325
|
+
this.fixedListFormControl.setValue(this.caseField.value);
|
|
10326
|
+
}
|
|
10327
|
+
}
|
|
10328
|
+
WriteFixedListFieldComponent.ɵfac = function WriteFixedListFieldComponent_Factory(t) { return ɵWriteFixedListFieldComponent_BaseFactory(t || WriteFixedListFieldComponent); };
|
|
10329
|
+
WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedListFieldComponent, selectors: [["ccd-write-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 11, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-control", "ccd-dropdown", "bottom-30", 3, "id", "formControl"], [3, "ngValue"], [3, "ngValue", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10330
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
10331
|
+
i0.ɵɵelementStart(1, "label", 1);
|
|
10332
|
+
i0.ɵɵtemplate(2, WriteFixedListFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
10333
|
+
i0.ɵɵelementEnd();
|
|
10334
|
+
i0.ɵɵtemplate(3, WriteFixedListFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
10335
|
+
i0.ɵɵtemplate(4, WriteFixedListFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
10336
|
+
i0.ɵɵelementStart(5, "select", 5);
|
|
10337
|
+
i0.ɵɵelementStart(6, "option", 6);
|
|
10338
|
+
i0.ɵɵtext(7, "--Select a value--");
|
|
10339
|
+
i0.ɵɵelementEnd();
|
|
10340
|
+
i0.ɵɵtemplate(8, WriteFixedListFieldComponent_option_8_Template, 2, 2, "option", 7);
|
|
10341
|
+
i0.ɵɵelementEnd();
|
|
10342
|
+
i0.ɵɵelementEnd();
|
|
10343
|
+
} if (rf & 2) {
|
|
10344
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$v, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
10345
|
+
i0.ɵɵadvance(1);
|
|
10346
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
10347
|
+
i0.ɵɵadvance(1);
|
|
10348
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10349
|
+
i0.ɵɵadvance(1);
|
|
10350
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10351
|
+
i0.ɵɵadvance(1);
|
|
10352
|
+
i0.ɵɵproperty("ngIf", ctx.fixedListFormControl.errors && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched));
|
|
10353
|
+
i0.ɵɵadvance(1);
|
|
10354
|
+
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.fixedListFormControl);
|
|
10355
|
+
i0.ɵɵadvance(1);
|
|
10356
|
+
i0.ɵɵproperty("ngValue", null);
|
|
10357
|
+
i0.ɵɵadvance(2);
|
|
10358
|
+
i0.ɵɵproperty("ngForOf", ctx.listItems);
|
|
10359
|
+
} }, directives: [i1.NgClass, i1.NgIf, i1$3.SelectControlValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective, i1$3.NgSelectOption, i1$3.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10360
|
+
const ɵWriteFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedListFieldComponent);
|
|
10361
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedListFieldComponent, [{
|
|
10362
|
+
type: Component,
|
|
10363
|
+
args: [{
|
|
10364
|
+
selector: 'ccd-write-fixed-list-field',
|
|
10365
|
+
templateUrl: './write-fixed-list-field.html'
|
|
10366
|
+
}]
|
|
10367
|
+
}], null, null); })();
|
|
10368
|
+
|
|
10369
|
+
class FixedRadioListPipe {
|
|
10370
|
+
transform(value, items) {
|
|
10371
|
+
const item = items.find(i => i.code === value);
|
|
10372
|
+
return item ? item.label : FixedRadioListPipe.EMPTY;
|
|
10373
|
+
}
|
|
10374
|
+
}
|
|
10375
|
+
FixedRadioListPipe.EMPTY = '';
|
|
10376
|
+
FixedRadioListPipe.ɵfac = function FixedRadioListPipe_Factory(t) { return new (t || FixedRadioListPipe)(); };
|
|
10377
|
+
FixedRadioListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedRadioList", type: FixedRadioListPipe, pure: true });
|
|
10378
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedRadioListPipe, [{
|
|
10379
|
+
type: Pipe,
|
|
10380
|
+
args: [{
|
|
10381
|
+
name: 'ccdFixedRadioList'
|
|
10382
|
+
}]
|
|
10383
|
+
}], null, null); })();
|
|
10384
|
+
|
|
10385
|
+
class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
10386
|
+
}
|
|
10387
|
+
ReadFixedRadioListFieldComponent.ɵfac = function ReadFixedRadioListFieldComponent_Factory(t) { return ɵReadFixedRadioListFieldComponent_BaseFactory(t || ReadFixedRadioListFieldComponent); };
|
|
10388
|
+
ReadFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedRadioListFieldComponent, selectors: [["ccd-read-fixed-radio-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10389
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
10390
|
+
i0.ɵɵtext(1);
|
|
10391
|
+
i0.ɵɵpipe(2, "ccdFixedRadioList");
|
|
10392
|
+
i0.ɵɵelementEnd();
|
|
10393
|
+
} if (rf & 2) {
|
|
10394
|
+
i0.ɵɵadvance(1);
|
|
10395
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.field_type.fixed_list_items));
|
|
10396
|
+
} }, pipes: [FixedRadioListPipe], encapsulation: 2 });
|
|
10397
|
+
const ɵReadFixedRadioListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadFixedRadioListFieldComponent);
|
|
10398
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadFixedRadioListFieldComponent, [{
|
|
10399
|
+
type: Component,
|
|
10400
|
+
args: [{
|
|
10401
|
+
selector: 'ccd-read-fixed-radio-list-field',
|
|
10402
|
+
template: '<span class="text-16">{{caseField.value | ccdFixedRadioList:caseField.field_type.fixed_list_items}}</span>',
|
|
10403
|
+
}]
|
|
10404
|
+
}], null, null); })();
|
|
10405
|
+
|
|
10406
|
+
function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
10407
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
10408
|
+
i0.ɵɵtext(1);
|
|
10409
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10410
|
+
i0.ɵɵelementEnd();
|
|
10411
|
+
} if (rf & 2) {
|
|
10412
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10413
|
+
i0.ɵɵadvance(1);
|
|
10414
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10415
|
+
} }
|
|
10416
|
+
function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
10417
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
10418
|
+
i0.ɵɵtext(1);
|
|
10419
|
+
i0.ɵɵelementEnd();
|
|
10420
|
+
} if (rf & 2) {
|
|
10421
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
10422
|
+
i0.ɵɵadvance(1);
|
|
10423
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10424
|
+
} }
|
|
10425
|
+
function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
10426
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
10427
|
+
i0.ɵɵtext(1);
|
|
10428
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10429
|
+
i0.ɵɵelementEnd();
|
|
10430
|
+
} if (rf & 2) {
|
|
10431
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
10432
|
+
i0.ɵɵadvance(1);
|
|
10433
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
10434
|
+
} }
|
|
10435
|
+
const _c0$u = function (a0) { return { selected: a0 }; };
|
|
10436
|
+
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
10437
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
10438
|
+
i0.ɵɵelement(1, "input", 10);
|
|
10439
|
+
i0.ɵɵelementStart(2, "label", 11);
|
|
10440
|
+
i0.ɵɵtext(3);
|
|
10441
|
+
i0.ɵɵelementEnd();
|
|
10442
|
+
i0.ɵɵelementEnd();
|
|
10443
|
+
} if (rf & 2) {
|
|
10444
|
+
const radioButton_r4 = ctx.$implicit;
|
|
10445
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
10446
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$u, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
10447
|
+
i0.ɵɵadvance(1);
|
|
10448
|
+
i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
10449
|
+
i0.ɵɵadvance(1);
|
|
10450
|
+
i0.ɵɵproperty("for", ctx_r3.id() + "-" + radioButton_r4.code);
|
|
10451
|
+
i0.ɵɵadvance(1);
|
|
10452
|
+
i0.ɵɵtextInterpolate(radioButton_r4.label);
|
|
10453
|
+
} }
|
|
10454
|
+
const _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
10455
|
+
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
10456
|
+
ngOnInit() {
|
|
10457
|
+
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
10458
|
+
this.fixedRadioListControl = this.registerControl(new FormControl(notEmpty ? this.caseField.value : null));
|
|
10459
|
+
}
|
|
10460
|
+
}
|
|
10461
|
+
WriteFixedRadioListFieldComponent.ɵfac = function WriteFixedRadioListFieldComponent_Factory(t) { return ɵWriteFixedRadioListFieldComponent_BaseFactory(t || WriteFixedRadioListFieldComponent); };
|
|
10462
|
+
WriteFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10463
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
10464
|
+
i0.ɵɵelementStart(1, "fieldset");
|
|
10465
|
+
i0.ɵɵelementStart(2, "legend");
|
|
10466
|
+
i0.ɵɵelementStart(3, "label", 1);
|
|
10467
|
+
i0.ɵɵtemplate(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2);
|
|
10468
|
+
i0.ɵɵelementEnd();
|
|
10469
|
+
i0.ɵɵtemplate(5, WriteFixedRadioListFieldComponent_span_5_Template, 2, 1, "span", 3);
|
|
10470
|
+
i0.ɵɵtemplate(6, WriteFixedRadioListFieldComponent_span_6_Template, 3, 4, "span", 4);
|
|
10471
|
+
i0.ɵɵelementEnd();
|
|
10472
|
+
i0.ɵɵelementContainerStart(7);
|
|
10473
|
+
i0.ɵɵtemplate(8, WriteFixedRadioListFieldComponent_div_8_Template, 4, 9, "div", 5);
|
|
10474
|
+
i0.ɵɵelementContainerEnd();
|
|
10475
|
+
i0.ɵɵelementEnd();
|
|
10854
10476
|
i0.ɵɵelementEnd();
|
|
10855
10477
|
} if (rf & 2) {
|
|
10478
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
10479
|
+
i0.ɵɵadvance(3);
|
|
10480
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
10856
10481
|
i0.ɵɵadvance(1);
|
|
10857
|
-
i0.ɵɵ
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
(
|
|
10482
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10483
|
+
i0.ɵɵadvance(1);
|
|
10484
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10485
|
+
i0.ɵɵadvance(1);
|
|
10486
|
+
i0.ɵɵproperty("ngIf", ctx.fixedRadioListControl.errors && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched));
|
|
10487
|
+
i0.ɵɵadvance(2);
|
|
10488
|
+
i0.ɵɵproperty("ngForOf", ctx.caseField.field_type.fixed_list_items);
|
|
10489
|
+
} }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf, i1$3.RadioControlValueAccessor, i1$3.DefaultValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10490
|
+
const ɵWriteFixedRadioListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedRadioListFieldComponent);
|
|
10491
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
10861
10492
|
type: Component,
|
|
10862
10493
|
args: [{
|
|
10863
|
-
selector: 'ccd-
|
|
10864
|
-
|
|
10494
|
+
selector: 'ccd-write-fixed-radio-list-field',
|
|
10495
|
+
templateUrl: './write-fixed-radio-list-field.html'
|
|
10865
10496
|
}]
|
|
10866
10497
|
}], null, null); })();
|
|
10867
10498
|
|
|
10868
|
-
function
|
|
10869
|
-
i0.ɵɵ
|
|
10499
|
+
function EventLogTableComponent_tr_16_div_3_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
10500
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
10501
|
+
i0.ɵɵelementStart(0, "a", 16);
|
|
10502
|
+
i0.ɵɵlistener("click", function EventLogTableComponent_tr_16_div_3_a_1_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r9); const event_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.caseHistoryClicked(event_r1.id); });
|
|
10870
10503
|
i0.ɵɵtext(1);
|
|
10871
|
-
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10872
10504
|
i0.ɵɵelementEnd();
|
|
10873
10505
|
} if (rf & 2) {
|
|
10874
|
-
const
|
|
10506
|
+
const event_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
10507
|
+
const ctx_r6 = i0.ɵɵnextContext();
|
|
10508
|
+
i0.ɵɵattribute("aria-label", ctx_r6.getAriaLabelforLink(event_r1));
|
|
10875
10509
|
i0.ɵɵadvance(1);
|
|
10876
|
-
i0.ɵɵtextInterpolate(
|
|
10510
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10877
10511
|
} }
|
|
10878
|
-
function
|
|
10879
|
-
i0.ɵɵelementStart(0, "
|
|
10880
|
-
i0.ɵɵ
|
|
10512
|
+
function EventLogTableComponent_tr_16_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
10513
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
10514
|
+
i0.ɵɵtemplate(1, EventLogTableComponent_tr_16_div_3_a_1_Template, 2, 2, "a", 15);
|
|
10881
10515
|
i0.ɵɵelementEnd();
|
|
10882
10516
|
} if (rf & 2) {
|
|
10883
|
-
const
|
|
10517
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10884
10518
|
i0.ɵɵadvance(1);
|
|
10885
|
-
i0.ɵɵ
|
|
10519
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id !== "Draft");
|
|
10886
10520
|
} }
|
|
10887
|
-
function
|
|
10888
|
-
|
|
10521
|
+
const _c0$t = function (a2) { return ["./", "event", a2, "history"]; };
|
|
10522
|
+
function EventLogTableComponent_tr_16_div_4_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
10523
|
+
i0.ɵɵelementStart(0, "a", 18);
|
|
10889
10524
|
i0.ɵɵtext(1);
|
|
10890
|
-
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10891
10525
|
i0.ɵɵelementEnd();
|
|
10892
10526
|
} if (rf & 2) {
|
|
10893
|
-
const
|
|
10527
|
+
const event_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
10528
|
+
const ctx_r12 = i0.ɵɵnextContext();
|
|
10529
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(4, _c0$t, event_r1.id))("target", "_blank");
|
|
10530
|
+
i0.ɵɵattribute("aria-label", ctx_r12.getAriaLabelforLink(event_r1));
|
|
10894
10531
|
i0.ɵɵadvance(1);
|
|
10895
|
-
i0.ɵɵtextInterpolate(
|
|
10532
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10896
10533
|
} }
|
|
10897
|
-
function
|
|
10898
|
-
i0.ɵɵelementStart(0, "
|
|
10534
|
+
function EventLogTableComponent_tr_16_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
10535
|
+
i0.ɵɵelementStart(0, "div");
|
|
10536
|
+
i0.ɵɵtemplate(1, EventLogTableComponent_tr_16_div_4_a_1_Template, 2, 6, "a", 17);
|
|
10537
|
+
i0.ɵɵelementEnd();
|
|
10538
|
+
} if (rf & 2) {
|
|
10539
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10540
|
+
i0.ɵɵadvance(1);
|
|
10541
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id !== "Draft");
|
|
10542
|
+
} }
|
|
10543
|
+
function EventLogTableComponent_tr_16_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
10544
|
+
i0.ɵɵelementStart(0, "span");
|
|
10899
10545
|
i0.ɵɵtext(1);
|
|
10900
10546
|
i0.ɵɵelementEnd();
|
|
10901
10547
|
} if (rf & 2) {
|
|
10902
|
-
const
|
|
10903
|
-
i0.ɵɵproperty("ngValue", type_r4.code);
|
|
10548
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10904
10549
|
i0.ɵɵadvance(1);
|
|
10905
|
-
i0.ɵɵtextInterpolate(
|
|
10550
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10906
10551
|
} }
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10552
|
+
function EventLogTableComponent_tr_16_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
10553
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
10554
|
+
i0.ɵɵelementStart(1, "a", 20);
|
|
10555
|
+
i0.ɵɵelement(2, "img", 21);
|
|
10556
|
+
i0.ɵɵelementEnd();
|
|
10557
|
+
i0.ɵɵelementStart(3, "span", 22);
|
|
10558
|
+
i0.ɵɵtext(4);
|
|
10559
|
+
i0.ɵɵelementEnd();
|
|
10560
|
+
i0.ɵɵelementEnd();
|
|
10561
|
+
} if (rf & 2) {
|
|
10562
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10563
|
+
const ctx_r5 = i0.ɵɵnextContext();
|
|
10564
|
+
i0.ɵɵadvance(1);
|
|
10565
|
+
i0.ɵɵpropertyInterpolate("href", ctx_r5.getSignificantItemUrl(event_r1), i0.ɵɵsanitizeUrl);
|
|
10566
|
+
i0.ɵɵattribute("aria-label", ctx_r5.getAriaLabelforLink(event_r1));
|
|
10567
|
+
i0.ɵɵadvance(3);
|
|
10568
|
+
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
10569
|
+
} }
|
|
10570
|
+
const _c1$9 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
10571
|
+
function EventLogTableComponent_tr_16_Template(rf, ctx) { if (rf & 1) {
|
|
10572
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
10573
|
+
i0.ɵɵelementStart(0, "tr", 4);
|
|
10574
|
+
i0.ɵɵlistener("click", function EventLogTableComponent_tr_16_Template_tr_click_0_listener() { i0.ɵɵrestoreView(_r18); const event_r1 = ctx.$implicit; const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.select(event_r1); });
|
|
10575
|
+
i0.ɵɵelementStart(1, "td");
|
|
10576
|
+
i0.ɵɵelementContainerStart(2, 5);
|
|
10577
|
+
i0.ɵɵtemplate(3, EventLogTableComponent_tr_16_div_3_Template, 2, 1, "div", 6);
|
|
10578
|
+
i0.ɵɵtemplate(4, EventLogTableComponent_tr_16_div_4_Template, 2, 1, "div", 7);
|
|
10579
|
+
i0.ɵɵelementContainerEnd();
|
|
10580
|
+
i0.ɵɵtemplate(5, EventLogTableComponent_tr_16_span_5_Template, 2, 1, "span", 8);
|
|
10581
|
+
i0.ɵɵtemplate(6, EventLogTableComponent_tr_16_div_6_Template, 5, 3, "div", 9);
|
|
10582
|
+
i0.ɵɵelementEnd();
|
|
10583
|
+
i0.ɵɵelementStart(7, "td", 10);
|
|
10584
|
+
i0.ɵɵlistener("keydown.enter", function EventLogTableComponent_tr_16_Template_td_keydown_enter_7_listener() { i0.ɵɵrestoreView(_r18); const event_r1 = ctx.$implicit; const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.select(event_r1); });
|
|
10585
|
+
i0.ɵɵelementStart(8, "div", 11);
|
|
10586
|
+
i0.ɵɵtext(9);
|
|
10587
|
+
i0.ɵɵpipe(10, "ccdDate");
|
|
10588
|
+
i0.ɵɵelementStart(11, "span", 12);
|
|
10589
|
+
i0.ɵɵtext(12);
|
|
10590
|
+
i0.ɵɵpipe(13, "ccdDate");
|
|
10591
|
+
i0.ɵɵelementEnd();
|
|
10592
|
+
i0.ɵɵelementEnd();
|
|
10593
|
+
i0.ɵɵelementEnd();
|
|
10594
|
+
i0.ɵɵelementStart(14, "td", 13);
|
|
10595
|
+
i0.ɵɵelementStart(15, "span", 2);
|
|
10596
|
+
i0.ɵɵtext(16);
|
|
10597
|
+
i0.ɵɵpipe(17, "titlecase");
|
|
10598
|
+
i0.ɵɵpipe(18, "uppercase");
|
|
10599
|
+
i0.ɵɵelementEnd();
|
|
10600
|
+
i0.ɵɵelementEnd();
|
|
10601
|
+
i0.ɵɵelementEnd();
|
|
10602
|
+
} if (rf & 2) {
|
|
10603
|
+
const event_r1 = ctx.$implicit;
|
|
10604
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10605
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(22, _c1$9, ctx_r0.selected === event_r1));
|
|
10606
|
+
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
10607
|
+
i0.ɵɵadvance(2);
|
|
10608
|
+
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
10609
|
+
i0.ɵɵadvance(1);
|
|
10610
|
+
i0.ɵɵproperty("ngSwitchCase", true);
|
|
10611
|
+
i0.ɵɵadvance(1);
|
|
10612
|
+
i0.ɵɵproperty("ngSwitchCase", false);
|
|
10613
|
+
i0.ɵɵadvance(1);
|
|
10614
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id === "Draft");
|
|
10615
|
+
i0.ɵɵadvance(1);
|
|
10616
|
+
i0.ɵɵproperty("ngIf", ctx_r0.significantItemExist(event_r1));
|
|
10617
|
+
i0.ɵɵadvance(1);
|
|
10618
|
+
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforColumn(event_r1));
|
|
10619
|
+
i0.ɵɵadvance(2);
|
|
10620
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(10, 12, event_r1.timestamp, "local"), " ");
|
|
10621
|
+
i0.ɵɵadvance(3);
|
|
10622
|
+
i0.ɵɵtextInterpolate1("Local: ", i0.ɵɵpipeBind2(13, 15, event_r1.timestamp, "local"), "");
|
|
10623
|
+
i0.ɵɵadvance(4);
|
|
10624
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(17, 18, event_r1.user_first_name), " ", i0.ɵɵpipeBind1(18, 20, event_r1.user_last_name), "");
|
|
10625
|
+
} }
|
|
10626
|
+
class EventLogTableComponent {
|
|
10627
|
+
constructor() {
|
|
10628
|
+
this.onSelect = new EventEmitter();
|
|
10629
|
+
this.onCaseHistory = new EventEmitter();
|
|
10630
|
+
this.isPartOfCaseTimeline = false;
|
|
10919
10631
|
}
|
|
10920
10632
|
ngOnInit() {
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10633
|
+
this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
|
|
10634
|
+
}
|
|
10635
|
+
select(event) {
|
|
10636
|
+
this.selected = event;
|
|
10637
|
+
this.onSelect.emit(event);
|
|
10638
|
+
}
|
|
10639
|
+
significantItemExist(event) {
|
|
10640
|
+
return (event.significant_item &&
|
|
10641
|
+
event.significant_item.type === 'DOCUMENT' &&
|
|
10642
|
+
event.significant_item.url !== undefined &&
|
|
10643
|
+
event.significant_item.description !== undefined);
|
|
10644
|
+
}
|
|
10645
|
+
getSignificantItemUrl(event) {
|
|
10646
|
+
if (event.significant_item) {
|
|
10647
|
+
return event.significant_item.url;
|
|
10924
10648
|
}
|
|
10925
|
-
|
|
10926
|
-
|
|
10649
|
+
}
|
|
10650
|
+
getSignificantItemDesc(event) {
|
|
10651
|
+
if (event.significant_item) {
|
|
10652
|
+
return event.significant_item.description;
|
|
10653
|
+
}
|
|
10654
|
+
}
|
|
10655
|
+
caseHistoryClicked(eventId) {
|
|
10656
|
+
this.onCaseHistory.emit(eventId);
|
|
10657
|
+
}
|
|
10658
|
+
getAriaLabelforColumn(event) {
|
|
10659
|
+
if (this.selected !== event) {
|
|
10660
|
+
return `date ${formatDate(event.timestamp, 'dd MMM yyyy hh:mm:ss a', 'en-GB')},
|
|
10661
|
+
press enter key for event ${event.event_name} details`;
|
|
10662
|
+
}
|
|
10663
|
+
else {
|
|
10664
|
+
return '';
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
getAriaLabelforRow(event) {
|
|
10668
|
+
return `you are on event ${event.event_name} row, press tab key to navigate to columns`;
|
|
10669
|
+
}
|
|
10670
|
+
getAriaLabelforLink(event) {
|
|
10671
|
+
return `press enter key to open event ${event.event_name} link in separate window`;
|
|
10927
10672
|
}
|
|
10928
10673
|
}
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
i0.ɵɵelementStart(0, "
|
|
10932
|
-
i0.ɵɵelementStart(1, "
|
|
10933
|
-
i0.ɵɵ
|
|
10674
|
+
EventLogTableComponent.ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(); };
|
|
10675
|
+
EventLogTableComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 17, vars: 1, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "ngClass", "click"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], [1, "text-16", "event-link", 3, "routerLink", "target"], [1, "tooltip"], ["target", "_blank", "rel", "noopener", 3, "href"], ["alt", "document image", "src", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABoCAYAAABmOHdtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAkoSURBVHhe7d33c5RFHAZw/wCKiF0s2LAwiigq9l5G/UV/UUeFkEAoQqiWoKKI1Dg6YxQQbGmkXQoJIQQiaSShhiQMkgIphCSXkN4buPtcnnDG9fXCa+FN9mY+M5Lce7f3ZPb2u/vu+3rRsKn+Z4ey4e7BIB4XnQ8doA7QHB2gSTpAk3SAJlk+wOG9VL/7L+gATbrgAxzlHgAM6skVcTDhw2i4daENXvbZCXd9EAU8fqRbADi/5j9JB2jSBRvg2Hmh8MAnMbAl/Ths+jUPqhvboLapHXJKTkPU/mKI2FcEdyyJhOvmhoLqvczQAZp0wQU4YVEAuPnGw5GTtdDd0wOdXd3Q1uGQXVID/HlXdw+0tHVCWU0zvLMhFSZ5R4Dqvc+HDtCkCybAW8RAIHn6xkJpuR3aOrqgqqEVPDanwZu+u8HLLwPY1aduTAF7fSvwuLqmNliweRfc6x0JqrYMxN8FONwj9Cz0Pq8/HWBvEP2Do389wFHugTDROxqOldcDu2hmfiXcucQGN8wLgxHiWOnc6zjKncs9t8DVs4Ih+kAxFFY2QK0IUXr1q11wvRhYJOc2DQSD6B8cDXMLPAuKYyUd4P8d4Eg3B7+UfOgRA4V0XHxYafx7kcCCePT0IHhudTyEZZ6Al9YlAAO+bEbQH8RlnYT6lg4oqW6CG+eHw7Apfg6KNhrRAVo9wAeXxcKu3DJgOTLn53S4cmYwMLiA1AI4VdsCja0dwC5feroZOKXjcWO9woDHtbSLMkfYmHgMVG1zhQ7Q6gHyg/IDnbA3AssRLiLM/SUDyutagc8vrmoEDj4suAsqGuCa2SFwuWcQLAzIhJ6eMxCYVgi3LY4AVRuN6ACtHuALaxKgobUT8kUI0uRlMcAy5+fkfOjsktO5nr4pHrvmG75JUFzdDE1iGie9/s1uuHiaP7y4NgH4B8gtrYFJH8eAqo1GdIBWD5BTs6KqJmCZMW5RBLAgfmd9MvDxeeRhYNe7QhTPUqWYvkFdC2xK/A34fl9EHYZ80b2lmqZ2GPNuKDi3zRU6QKsHyC7F4PjB7vsoBi6eFgCBaQXQ0dkN2cWn4VJRJEvsgtuzSqFdPEd6ZlU8cKr31BfxwN/zDzdZlFKSqo1GdIBWD3D8+1HAQvhQUTWc+/J3BLj1QDHwyz+zwA4MhoH/euQUsJzhFO8SjwC4X4QscZks6Wg5vOKzE1RtNKIDtHqAb36bBOVieiXVN7cDB4crZ24Bt+9TgQXwmpgc4GDDQrm6oRUqxAAi+cTmwAg3f+Agwikfnz9mdjCo2mhEB2j1AN/6Lgn4gVhWjFtkg9EegbA8MgvYNW37ioFTNRbUHIRYmE8XJZLE5TD+u0EMWNLpxjbg8ao2GtEBWj3AmxeEAx9ZYgCR5vllAAeR2EMl0NDSDnweBxGWKzyxztObj6/YDix3uHzGQcS2twg42KjaaEQHaPUAH/9cfEChTgwcUm1zBzz82TZgF14hvvglLiYE7SkEdmEuzXM5jIW55w9pwFMHM8R/S/0Ld8t2YR2g4ocD4bYxBfYXVgG/3Lm5iEv67ptSgY8vt+UCt7dd+24osBzilo5l4QeBC7OrtmYDyxwue42ZEwKqNhrRAVo9QBbMreILXWIXfHtDCnAQCU4/DpzK7cmrgNHTRRcXuBiwJ68S+HrPrNoBl4ivAenplduBiwmJuWXAKZ6qjUZ0gIMlwOa2DiiqaoS31ydDX4BiwJAYYNqxCmB5wkEnI98OXJx4emU8jHKX2z/8UepIDHBXThnoAIdqgAyKm4h4ovxGr1DoG0S+TwE+1okBRLpFFOHSdXPDgEv6nBouDT0AfL/V0Yfhz4NIKDi3zRU6QKsH+NCnscBFBBbULLA5SKyMzgYu6funFsBVs4Lh5gU2KBGhSXy9KRuSgYsJM3/cAyyX8srrYaxXOKjaaEQHaPUAOYXqFhN/iSfMFwdmAhcLth8uBXbxgyeqgL/nhTbx4jkSNylxcOAmo4dEqSNxEAkRpZH0wtoEULXRiA7Q6gG+9nUiFFY2Aif549+LAJYpq7bmABdUt4iSRrp6dghwaZ8bJ9mFueWDS/qzf0qHxtZOsNe3ADdmqtpoRAdo9QB5OrFYfGiJZcWED6OAWzs8f0wHnlRaHpEFXJBlucM/AKeEH4UdAC4mrI3NBS46cAsIl8VUbTSiA7R6gFyOYnBHy+pgmiiaJW5L25F9ErhIkHy0HPj7J1bEAZfFuPD66PI44GDz8Kdiyie0d3ZBgpjGSc+K6Z2kaqMRHaDVA3xMfDiJW3W5NfeRz7YBP3h45nHoEKWJtK/QDiy0n1udAPx5S3sX3Lt0KzDo59fsAAbIQnri0mhQtdGIDtDqAbJ8mLIhBbi5nFs6eKE0p2B8LAnaCzfNDwdukOQF2OzK3MrB91sXmwMn7A3ARQXLDiI6QMUPzwfLDE76+XMW0ryEn4PDT0l5wNOeDJqDREh6IfAPwdOaz68WXVjglJCD1kTRzSXnNrlCBzhYAvwrnIIliBJG4pI+bzLBJX8+n4MO/yA8ngFy0OKUMPVYBXDp3/m9XaEDHOwBcirHDZWcyn0spmcSp3CqY50xUF4yxsHjVE0z8JYDqmON6AAHe4C8gIYX1jBAn225wPJFdawzBsibVHARgUFyEFIda0QHONgDpK/jcoHlB28e4WoBfKmY7kncUtzVLW/S091XHvHiRtWxRnSAgz7A3ptBcNmLS/a8+VjU/iLg7U5YtvB4bioatzAceHkrb27Bk0osf/7w3i7QAQ76AHtxAyVPlPNWTly6z8ivhDd8d8NLPjvBY1Mq8CZlvClZQXkd8OJDHaAO0DWTvG3gtTkRePqSgwJPmPMSLm5zO3PmDBRW1IPHehGucNuicFC9lyt0gEMtQLr7gyjg1g0uCrCrcoq2t8AOyb9VABcTbl9sA9VrD4QOUPHaA2HZAIk3Fxsx1Q/u8Y4GBsugeVKJ2+FUr3U+dIAmWT7A/5sO0CQdoEk6QJN0gCbpAE0yHSBfYKgaMcMG/YMjHeDfMB2g6iDtHB2gSTpAk3SAJukATdIBmvSvBcj/UUnfGwxWitCcKcNxhQ7QQRmOK1iIql50KFGG4wodoIMyHFfoAB2U4bhCB+igDMcVOkAHZTiu0AFK/md/Bw8XevIIyEqZAAAAAElFTkSuQmCC", 1, "doc-img"], [1, "tooltiptext", "doc-tooltip"]], template: function EventLogTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10676
|
+
i0.ɵɵelementStart(0, "table", 0);
|
|
10677
|
+
i0.ɵɵelementStart(1, "caption");
|
|
10678
|
+
i0.ɵɵelementStart(2, "h2", 1);
|
|
10679
|
+
i0.ɵɵtext(3, "History");
|
|
10680
|
+
i0.ɵɵelementEnd();
|
|
10681
|
+
i0.ɵɵelementEnd();
|
|
10682
|
+
i0.ɵɵelementStart(4, "thead");
|
|
10683
|
+
i0.ɵɵelementStart(5, "tr");
|
|
10684
|
+
i0.ɵɵelementStart(6, "th");
|
|
10685
|
+
i0.ɵɵelementStart(7, "span", 2);
|
|
10686
|
+
i0.ɵɵtext(8, "Event");
|
|
10934
10687
|
i0.ɵɵelementEnd();
|
|
10935
|
-
i0.ɵɵtemplate(3, WriteFixedListFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
10936
|
-
i0.ɵɵtemplate(4, WriteFixedListFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
10937
|
-
i0.ɵɵelementStart(5, "select", 5);
|
|
10938
|
-
i0.ɵɵelementStart(6, "option", 6);
|
|
10939
|
-
i0.ɵɵtext(7, "--Select a value--");
|
|
10940
10688
|
i0.ɵɵelementEnd();
|
|
10941
|
-
i0.ɵɵ
|
|
10689
|
+
i0.ɵɵelementStart(9, "th");
|
|
10690
|
+
i0.ɵɵelementStart(10, "span", 2);
|
|
10691
|
+
i0.ɵɵtext(11, "Date");
|
|
10692
|
+
i0.ɵɵelementEnd();
|
|
10693
|
+
i0.ɵɵelementEnd();
|
|
10694
|
+
i0.ɵɵelementStart(12, "th");
|
|
10695
|
+
i0.ɵɵelementStart(13, "span", 2);
|
|
10696
|
+
i0.ɵɵtext(14, "Author");
|
|
10697
|
+
i0.ɵɵelementEnd();
|
|
10698
|
+
i0.ɵɵelementEnd();
|
|
10699
|
+
i0.ɵɵelementEnd();
|
|
10700
|
+
i0.ɵɵelementEnd();
|
|
10701
|
+
i0.ɵɵelementStart(15, "tbody");
|
|
10702
|
+
i0.ɵɵtemplate(16, EventLogTableComponent_tr_16_Template, 19, 24, "tr", 3);
|
|
10942
10703
|
i0.ɵɵelementEnd();
|
|
10943
10704
|
i0.ɵɵelementEnd();
|
|
10944
10705
|
} if (rf & 2) {
|
|
10945
|
-
i0.ɵɵ
|
|
10946
|
-
i0.ɵɵ
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10950
|
-
i0.ɵɵadvance(1);
|
|
10951
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10952
|
-
i0.ɵɵadvance(1);
|
|
10953
|
-
i0.ɵɵproperty("ngIf", ctx.fixedListFormControl.errors && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched));
|
|
10954
|
-
i0.ɵɵadvance(1);
|
|
10955
|
-
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.fixedListFormControl);
|
|
10956
|
-
i0.ɵɵadvance(1);
|
|
10957
|
-
i0.ɵɵproperty("ngValue", null);
|
|
10958
|
-
i0.ɵɵadvance(2);
|
|
10959
|
-
i0.ɵɵproperty("ngForOf", ctx.listItems);
|
|
10960
|
-
} }, directives: [i1.NgClass, i1.NgIf, i1$3.SelectControlValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective, i1$3.NgSelectOption, i1$3.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10961
|
-
const ɵWriteFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedListFieldComponent);
|
|
10962
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedListFieldComponent, [{
|
|
10706
|
+
i0.ɵɵadvance(16);
|
|
10707
|
+
i0.ɵɵproperty("ngForOf", ctx.events);
|
|
10708
|
+
} }, directives: [i1.NgForOf, i1.NgClass, i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, i1$1.RouterLinkWithHref], pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe], styles: ["#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#2b8cc4}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{color:#4c2c92}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:10px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%]{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]{float:left;padding-right:8px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-img[_ngcontent-%COMP%]{width:16px;float:left}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]{left:35%;bottom:7px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]:after{border-color:transparent}"] });
|
|
10709
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
10963
10710
|
type: Component,
|
|
10964
10711
|
args: [{
|
|
10965
|
-
selector: 'ccd-
|
|
10966
|
-
templateUrl: './
|
|
10712
|
+
selector: 'ccd-event-log-table',
|
|
10713
|
+
templateUrl: './event-log-table.component.html',
|
|
10714
|
+
styleUrls: ['./event-log-table.scss']
|
|
10967
10715
|
}]
|
|
10968
|
-
}], null,
|
|
10716
|
+
}], null, { events: [{
|
|
10717
|
+
type: Input
|
|
10718
|
+
}], selected: [{
|
|
10719
|
+
type: Input
|
|
10720
|
+
}], onSelect: [{
|
|
10721
|
+
type: Output
|
|
10722
|
+
}], onCaseHistory: [{
|
|
10723
|
+
type: Output
|
|
10724
|
+
}] }); })();
|
|
10969
10725
|
|
|
10970
|
-
class
|
|
10971
|
-
transform(value
|
|
10972
|
-
|
|
10973
|
-
return item ? item.label : FixedRadioListPipe.EMPTY;
|
|
10726
|
+
class DashPipe {
|
|
10727
|
+
transform(value) {
|
|
10728
|
+
return value ? value : '-';
|
|
10974
10729
|
}
|
|
10975
10730
|
}
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedRadioListPipe, [{
|
|
10731
|
+
DashPipe.ɵfac = function DashPipe_Factory(t) { return new (t || DashPipe)(); };
|
|
10732
|
+
DashPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdDash", type: DashPipe, pure: true });
|
|
10733
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashPipe, [{
|
|
10980
10734
|
type: Pipe,
|
|
10981
10735
|
args: [{
|
|
10982
|
-
name: '
|
|
10736
|
+
name: 'ccdDash'
|
|
10983
10737
|
}]
|
|
10984
10738
|
}], null, null); })();
|
|
10985
10739
|
|
|
10986
|
-
class
|
|
10740
|
+
class EventLogDetailsComponent {
|
|
10987
10741
|
}
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
i0.ɵɵelementStart(0, "
|
|
10991
|
-
i0.ɵɵ
|
|
10992
|
-
i0.ɵɵ
|
|
10742
|
+
EventLogDetailsComponent.ɵfac = function EventLogDetailsComponent_Factory(t) { return new (t || EventLogDetailsComponent)(); };
|
|
10743
|
+
EventLogDetailsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogDetailsComponent, selectors: [["ccd-event-log-details"]], inputs: { event: "event" }, decls: 52, vars: 18, consts: [["tabindex", "0", 1, "EventLogDetails"], [1, "heading-h2"], ["tabindex", "0", "aria-live", "polite"], [1, "text-16"], [1, "tooltip", "text-16"]], template: function EventLogDetailsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10744
|
+
i0.ɵɵelementStart(0, "table", 0);
|
|
10745
|
+
i0.ɵɵelementStart(1, "caption");
|
|
10746
|
+
i0.ɵɵelementStart(2, "h2", 1);
|
|
10747
|
+
i0.ɵɵtext(3, "Details");
|
|
10748
|
+
i0.ɵɵelementEnd();
|
|
10749
|
+
i0.ɵɵelementEnd();
|
|
10750
|
+
i0.ɵɵelementStart(4, "tbody", 2);
|
|
10751
|
+
i0.ɵɵelementStart(5, "tr");
|
|
10752
|
+
i0.ɵɵelementStart(6, "th");
|
|
10753
|
+
i0.ɵɵelementStart(7, "span", 3);
|
|
10754
|
+
i0.ɵɵtext(8, "Date");
|
|
10755
|
+
i0.ɵɵelementEnd();
|
|
10756
|
+
i0.ɵɵelementEnd();
|
|
10757
|
+
i0.ɵɵelementStart(9, "td");
|
|
10758
|
+
i0.ɵɵelementStart(10, "div", 4);
|
|
10759
|
+
i0.ɵɵtext(11);
|
|
10760
|
+
i0.ɵɵpipe(12, "ccdDate");
|
|
10761
|
+
i0.ɵɵelementEnd();
|
|
10762
|
+
i0.ɵɵelementEnd();
|
|
10763
|
+
i0.ɵɵelementEnd();
|
|
10764
|
+
i0.ɵɵelementStart(13, "tr");
|
|
10765
|
+
i0.ɵɵelementStart(14, "th");
|
|
10766
|
+
i0.ɵɵelementStart(15, "span", 3);
|
|
10767
|
+
i0.ɵɵtext(16, "Author");
|
|
10768
|
+
i0.ɵɵelementEnd();
|
|
10769
|
+
i0.ɵɵelementEnd();
|
|
10770
|
+
i0.ɵɵelementStart(17, "td");
|
|
10771
|
+
i0.ɵɵelementStart(18, "span", 3);
|
|
10772
|
+
i0.ɵɵtext(19);
|
|
10773
|
+
i0.ɵɵpipe(20, "titlecase");
|
|
10774
|
+
i0.ɵɵpipe(21, "uppercase");
|
|
10775
|
+
i0.ɵɵelementEnd();
|
|
10776
|
+
i0.ɵɵelementEnd();
|
|
10777
|
+
i0.ɵɵelementEnd();
|
|
10778
|
+
i0.ɵɵelementStart(22, "tr");
|
|
10779
|
+
i0.ɵɵelementStart(23, "th");
|
|
10780
|
+
i0.ɵɵelementStart(24, "span", 3);
|
|
10781
|
+
i0.ɵɵtext(25, "End state");
|
|
10782
|
+
i0.ɵɵelementEnd();
|
|
10783
|
+
i0.ɵɵelementEnd();
|
|
10784
|
+
i0.ɵɵelementStart(26, "td");
|
|
10785
|
+
i0.ɵɵelementStart(27, "span", 3);
|
|
10786
|
+
i0.ɵɵtext(28);
|
|
10787
|
+
i0.ɵɵelementEnd();
|
|
10788
|
+
i0.ɵɵelementEnd();
|
|
10789
|
+
i0.ɵɵelementEnd();
|
|
10790
|
+
i0.ɵɵelementStart(29, "tr");
|
|
10791
|
+
i0.ɵɵelementStart(30, "th");
|
|
10792
|
+
i0.ɵɵelementStart(31, "span", 3);
|
|
10793
|
+
i0.ɵɵtext(32, "Event");
|
|
10794
|
+
i0.ɵɵelementEnd();
|
|
10795
|
+
i0.ɵɵelementEnd();
|
|
10796
|
+
i0.ɵɵelementStart(33, "td");
|
|
10797
|
+
i0.ɵɵelementStart(34, "span", 3);
|
|
10798
|
+
i0.ɵɵtext(35);
|
|
10799
|
+
i0.ɵɵelementEnd();
|
|
10800
|
+
i0.ɵɵelementEnd();
|
|
10801
|
+
i0.ɵɵelementEnd();
|
|
10802
|
+
i0.ɵɵelementStart(36, "tr");
|
|
10803
|
+
i0.ɵɵelementStart(37, "th");
|
|
10804
|
+
i0.ɵɵelementStart(38, "span", 3);
|
|
10805
|
+
i0.ɵɵtext(39, "Summary");
|
|
10806
|
+
i0.ɵɵelementEnd();
|
|
10807
|
+
i0.ɵɵelementEnd();
|
|
10808
|
+
i0.ɵɵelementStart(40, "td");
|
|
10809
|
+
i0.ɵɵelementStart(41, "span", 3);
|
|
10810
|
+
i0.ɵɵtext(42);
|
|
10811
|
+
i0.ɵɵpipe(43, "ccdDash");
|
|
10812
|
+
i0.ɵɵelementEnd();
|
|
10813
|
+
i0.ɵɵelementEnd();
|
|
10814
|
+
i0.ɵɵelementEnd();
|
|
10815
|
+
i0.ɵɵelementStart(44, "tr");
|
|
10816
|
+
i0.ɵɵelementStart(45, "th");
|
|
10817
|
+
i0.ɵɵelementStart(46, "span", 3);
|
|
10818
|
+
i0.ɵɵtext(47, "Comment");
|
|
10819
|
+
i0.ɵɵelementEnd();
|
|
10820
|
+
i0.ɵɵelementEnd();
|
|
10821
|
+
i0.ɵɵelementStart(48, "td");
|
|
10822
|
+
i0.ɵɵelementStart(49, "span", 3);
|
|
10823
|
+
i0.ɵɵtext(50);
|
|
10824
|
+
i0.ɵɵpipe(51, "ccdDash");
|
|
10825
|
+
i0.ɵɵelementEnd();
|
|
10826
|
+
i0.ɵɵelementEnd();
|
|
10827
|
+
i0.ɵɵelementEnd();
|
|
10828
|
+
i0.ɵɵelementEnd();
|
|
10993
10829
|
i0.ɵɵelementEnd();
|
|
10994
10830
|
} if (rf & 2) {
|
|
10995
|
-
i0.ɵɵadvance(
|
|
10996
|
-
i0.ɵɵ
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
(
|
|
10831
|
+
i0.ɵɵadvance(11);
|
|
10832
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(12, 7, ctx.event.timestamp, "local"), " ");
|
|
10833
|
+
i0.ɵɵadvance(8);
|
|
10834
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(20, 10, ctx.event.user_first_name), " ", i0.ɵɵpipeBind1(21, 12, ctx.event.user_last_name), "");
|
|
10835
|
+
i0.ɵɵadvance(9);
|
|
10836
|
+
i0.ɵɵtextInterpolate(ctx.event.state_name);
|
|
10837
|
+
i0.ɵɵadvance(7);
|
|
10838
|
+
i0.ɵɵtextInterpolate(ctx.event.event_name);
|
|
10839
|
+
i0.ɵɵadvance(7);
|
|
10840
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 14, ctx.event.summary));
|
|
10841
|
+
i0.ɵɵadvance(8);
|
|
10842
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(51, 16, ctx.event.comment));
|
|
10843
|
+
} }, pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe, DashPipe], styles: [".EventLogDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .EventLogDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:none}"] });
|
|
10844
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogDetailsComponent, [{
|
|
11000
10845
|
type: Component,
|
|
11001
10846
|
args: [{
|
|
11002
|
-
selector: 'ccd-
|
|
11003
|
-
|
|
10847
|
+
selector: 'ccd-event-log-details',
|
|
10848
|
+
templateUrl: './event-log-details.component.html',
|
|
10849
|
+
styleUrls: ['./event-log-details.scss']
|
|
11004
10850
|
}]
|
|
11005
|
-
}], null,
|
|
10851
|
+
}], null, { event: [{
|
|
10852
|
+
type: Input
|
|
10853
|
+
}] }); })();
|
|
11006
10854
|
|
|
11007
|
-
function
|
|
11008
|
-
i0.ɵɵ
|
|
11009
|
-
i0.ɵɵ
|
|
11010
|
-
i0.ɵɵ
|
|
10855
|
+
function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
10856
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
10857
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 7);
|
|
10858
|
+
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.select($event); })("onCaseHistory", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onCaseHistory_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.caseHistoryClicked($event); });
|
|
11011
10859
|
i0.ɵɵelementEnd();
|
|
11012
10860
|
} if (rf & 2) {
|
|
11013
10861
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
11014
|
-
i0.ɵɵ
|
|
11015
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10862
|
+
i0.ɵɵproperty("events", ctx_r0.events)("selected", ctx_r0.selected);
|
|
11016
10863
|
} }
|
|
11017
|
-
function
|
|
11018
|
-
i0.ɵɵ
|
|
11019
|
-
i0.ɵɵ
|
|
10864
|
+
function EventLogComponent_ccd_event_log_table_4_Template(rf, ctx) { if (rf & 1) {
|
|
10865
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
10866
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 8);
|
|
10867
|
+
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_4_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.select($event); });
|
|
11020
10868
|
i0.ɵɵelementEnd();
|
|
11021
10869
|
} if (rf & 2) {
|
|
11022
10870
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
11023
|
-
i0.ɵɵ
|
|
11024
|
-
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10871
|
+
i0.ɵɵproperty("events", ctx_r1.events)("selected", ctx_r1.selected);
|
|
11025
10872
|
} }
|
|
11026
|
-
function
|
|
11027
|
-
i0.ɵɵ
|
|
11028
|
-
i0.ɵɵtext(1);
|
|
11029
|
-
i0.ɵɵpipe(2, "ccdFirstError");
|
|
11030
|
-
i0.ɵɵelementEnd();
|
|
10873
|
+
function EventLogComponent_ccd_event_log_details_7_Template(rf, ctx) { if (rf & 1) {
|
|
10874
|
+
i0.ɵɵelement(0, "ccd-event-log-details", 9);
|
|
11031
10875
|
} if (rf & 2) {
|
|
11032
10876
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11033
|
-
i0.ɵɵ
|
|
11034
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
11035
|
-
} }
|
|
11036
|
-
const _c0$u = function (a0) { return { selected: a0 }; };
|
|
11037
|
-
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
11038
|
-
i0.ɵɵelementStart(0, "div", 9);
|
|
11039
|
-
i0.ɵɵelement(1, "input", 10);
|
|
11040
|
-
i0.ɵɵelementStart(2, "label", 11);
|
|
11041
|
-
i0.ɵɵtext(3);
|
|
11042
|
-
i0.ɵɵelementEnd();
|
|
11043
|
-
i0.ɵɵelementEnd();
|
|
11044
|
-
} if (rf & 2) {
|
|
11045
|
-
const radioButton_r4 = ctx.$implicit;
|
|
11046
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
11047
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$u, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
11048
|
-
i0.ɵɵadvance(1);
|
|
11049
|
-
i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
11050
|
-
i0.ɵɵadvance(1);
|
|
11051
|
-
i0.ɵɵproperty("for", ctx_r3.id() + "-" + radioButton_r4.code);
|
|
11052
|
-
i0.ɵɵadvance(1);
|
|
11053
|
-
i0.ɵɵtextInterpolate(radioButton_r4.label);
|
|
10877
|
+
i0.ɵɵproperty("event", ctx_r2.selected);
|
|
11054
10878
|
} }
|
|
11055
|
-
|
|
11056
|
-
|
|
10879
|
+
class EventLogComponent {
|
|
10880
|
+
constructor() {
|
|
10881
|
+
this.onCaseHistory = new EventEmitter();
|
|
10882
|
+
this.isPartOfCaseTimeline = false;
|
|
10883
|
+
}
|
|
11057
10884
|
ngOnInit() {
|
|
11058
|
-
|
|
11059
|
-
this.
|
|
10885
|
+
this.selected = this.events[0];
|
|
10886
|
+
this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
|
|
10887
|
+
}
|
|
10888
|
+
select(event) {
|
|
10889
|
+
this.selected = event;
|
|
10890
|
+
}
|
|
10891
|
+
caseHistoryClicked(eventId) {
|
|
10892
|
+
this.onCaseHistory.emit(eventId);
|
|
11060
10893
|
}
|
|
11061
10894
|
}
|
|
11062
|
-
|
|
11063
|
-
|
|
10895
|
+
EventLogComponent.ɵfac = function EventLogComponent_Factory(t) { return new (t || EventLogComponent)(); };
|
|
10896
|
+
EventLogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogComponent, selectors: [["ccd-event-log"]], inputs: { events: "events" }, outputs: { onCaseHistory: "onCaseHistory" }, decls: 8, vars: 4, consts: [[1, "grid-row"], [1, "column-one-half"], [3, "ngSwitch"], [3, "events", "selected", "onSelect", "onCaseHistory", 4, "ngSwitchCase"], [3, "events", "selected", "onSelect", 4, "ngSwitchCase"], [1, "EventLog-DetailsPanel"], [3, "event", 4, "ngIf"], [3, "events", "selected", "onSelect", "onCaseHistory"], [3, "events", "selected", "onSelect"], [3, "event"]], template: function EventLogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11064
10897
|
i0.ɵɵelementStart(0, "div", 0);
|
|
11065
|
-
i0.ɵɵelementStart(1, "
|
|
11066
|
-
i0.ɵɵ
|
|
11067
|
-
i0.ɵɵ
|
|
11068
|
-
i0.ɵɵtemplate(4,
|
|
10898
|
+
i0.ɵɵelementStart(1, "div", 1);
|
|
10899
|
+
i0.ɵɵelementContainerStart(2, 2);
|
|
10900
|
+
i0.ɵɵtemplate(3, EventLogComponent_ccd_event_log_table_3_Template, 1, 2, "ccd-event-log-table", 3);
|
|
10901
|
+
i0.ɵɵtemplate(4, EventLogComponent_ccd_event_log_table_4_Template, 1, 2, "ccd-event-log-table", 4);
|
|
10902
|
+
i0.ɵɵelementContainerEnd();
|
|
11069
10903
|
i0.ɵɵelementEnd();
|
|
11070
|
-
i0.ɵɵ
|
|
11071
|
-
i0.ɵɵ
|
|
10904
|
+
i0.ɵɵelementStart(5, "div", 1);
|
|
10905
|
+
i0.ɵɵelementStart(6, "div", 5);
|
|
10906
|
+
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details", 6);
|
|
11072
10907
|
i0.ɵɵelementEnd();
|
|
11073
|
-
i0.ɵɵelementContainerStart(7);
|
|
11074
|
-
i0.ɵɵtemplate(8, WriteFixedRadioListFieldComponent_div_8_Template, 4, 9, "div", 5);
|
|
11075
|
-
i0.ɵɵelementContainerEnd();
|
|
11076
10908
|
i0.ɵɵelementEnd();
|
|
11077
10909
|
i0.ɵɵelementEnd();
|
|
11078
10910
|
} if (rf & 2) {
|
|
11079
|
-
i0.ɵɵ
|
|
11080
|
-
i0.ɵɵ
|
|
11081
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
11082
|
-
i0.ɵɵadvance(1);
|
|
11083
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10911
|
+
i0.ɵɵadvance(2);
|
|
10912
|
+
i0.ɵɵproperty("ngSwitch", ctx.isPartOfCaseTimeline);
|
|
11084
10913
|
i0.ɵɵadvance(1);
|
|
11085
|
-
i0.ɵɵproperty("
|
|
10914
|
+
i0.ɵɵproperty("ngSwitchCase", true);
|
|
11086
10915
|
i0.ɵɵadvance(1);
|
|
11087
|
-
i0.ɵɵproperty("
|
|
11088
|
-
i0.ɵɵadvance(
|
|
11089
|
-
i0.ɵɵproperty("
|
|
11090
|
-
} }, directives: [i1.
|
|
11091
|
-
|
|
11092
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
10916
|
+
i0.ɵɵproperty("ngSwitchCase", false);
|
|
10917
|
+
i0.ɵɵadvance(3);
|
|
10918
|
+
i0.ɵɵproperty("ngIf", ctx.selected);
|
|
10919
|
+
} }, directives: [i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, EventLogTableComponent, EventLogDetailsComponent], styles: ["@media (max-width:991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
10920
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogComponent, [{
|
|
11093
10921
|
type: Component,
|
|
11094
10922
|
args: [{
|
|
11095
|
-
selector: 'ccd-
|
|
11096
|
-
templateUrl: './
|
|
10923
|
+
selector: 'ccd-event-log',
|
|
10924
|
+
templateUrl: './event-log.component.html',
|
|
10925
|
+
styleUrls: ['./event-log.scss']
|
|
10926
|
+
}]
|
|
10927
|
+
}], null, { events: [{
|
|
10928
|
+
type: Input
|
|
10929
|
+
}], onCaseHistory: [{
|
|
10930
|
+
type: Output
|
|
10931
|
+
}] }); })();
|
|
10932
|
+
|
|
10933
|
+
class CaseHistoryViewerFieldComponent extends AbstractFieldReadComponent {
|
|
10934
|
+
}
|
|
10935
|
+
CaseHistoryViewerFieldComponent.ɵfac = function CaseHistoryViewerFieldComponent_Factory(t) { return ɵCaseHistoryViewerFieldComponent_BaseFactory(t || CaseHistoryViewerFieldComponent); };
|
|
10936
|
+
CaseHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseHistoryViewerFieldComponent, selectors: [["ccd-case-history-viewer-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "events"]], template: function CaseHistoryViewerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10937
|
+
i0.ɵɵelement(0, "ccd-event-log", 0);
|
|
10938
|
+
} if (rf & 2) {
|
|
10939
|
+
i0.ɵɵproperty("events", ctx.caseField.value);
|
|
10940
|
+
} }, directives: [EventLogComponent], encapsulation: 2 });
|
|
10941
|
+
const ɵCaseHistoryViewerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(CaseHistoryViewerFieldComponent);
|
|
10942
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryViewerFieldComponent, [{
|
|
10943
|
+
type: Component,
|
|
10944
|
+
args: [{
|
|
10945
|
+
selector: 'ccd-case-history-viewer-field',
|
|
10946
|
+
templateUrl: 'case-history-viewer-field.component.html',
|
|
11097
10947
|
}]
|
|
11098
10948
|
}], null, null); })();
|
|
11099
10949
|
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
}
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
}
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
}
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
10950
|
+
class ErrorNotifierService {
|
|
10951
|
+
constructor() {
|
|
10952
|
+
this.errorSource = new Subject();
|
|
10953
|
+
this.error = this.errorSource.asObservable();
|
|
10954
|
+
}
|
|
10955
|
+
announceError(error) {
|
|
10956
|
+
this.errorSource.next(error);
|
|
10957
|
+
}
|
|
10958
|
+
}
|
|
10959
|
+
ErrorNotifierService.ɵfac = function ErrorNotifierService_Factory(t) { return new (t || ErrorNotifierService)(); };
|
|
10960
|
+
ErrorNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorNotifierService, factory: ErrorNotifierService.ɵfac });
|
|
10961
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorNotifierService, [{
|
|
10962
|
+
type: Injectable
|
|
10963
|
+
}], null, null); })();
|
|
10964
|
+
|
|
10965
|
+
class EventStatusService {
|
|
10966
|
+
static isIncomplete(eventStatus) {
|
|
10967
|
+
if (!eventStatus) {
|
|
10968
|
+
return false;
|
|
10969
|
+
}
|
|
10970
|
+
return EventStatusService.CALLBACK_STATUS_INCOMPLETE === eventStatus
|
|
10971
|
+
|| EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE === eventStatus;
|
|
10972
|
+
}
|
|
10973
|
+
}
|
|
10974
|
+
EventStatusService.CALLBACK_STATUS_INCOMPLETE = 'INCOMPLETE_CALLBACK';
|
|
10975
|
+
EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE = 'INCOMPLETE_DELETE_DRAFT';
|
|
10976
|
+
EventStatusService.CALLBACK_STATUS_COMPLETE = 'CALLBACK_COMPLETED';
|
|
10977
|
+
EventStatusService.DELETE_DRAFT_STATUS_COMPLETE = 'DELETE_DRAFT_COMPLETED';
|
|
10978
|
+
EventStatusService.ɵfac = function EventStatusService_Factory(t) { return new (t || EventStatusService)(); };
|
|
10979
|
+
EventStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: EventStatusService, factory: EventStatusService.ɵfac });
|
|
10980
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStatusService, [{
|
|
10981
|
+
type: Injectable
|
|
10982
|
+
}], null, null); })();
|
|
10983
|
+
|
|
10984
|
+
class FormErrorService {
|
|
10985
|
+
mapFieldErrors(errors, form, errorKey) {
|
|
10986
|
+
errors.forEach(error => {
|
|
10987
|
+
const formControl = this.getFormControl(form, error.id);
|
|
10988
|
+
if (formControl) {
|
|
10989
|
+
formControl.setErrors({
|
|
10990
|
+
[errorKey]: error.message
|
|
10991
|
+
});
|
|
10992
|
+
}
|
|
10993
|
+
});
|
|
10994
|
+
}
|
|
10995
|
+
getFormControl(form, fieldId) {
|
|
10996
|
+
const fields = fieldId.split('.');
|
|
10997
|
+
let group = form;
|
|
10998
|
+
let inArray = false;
|
|
10999
|
+
let control;
|
|
11000
|
+
fields.every((field, index) => {
|
|
11001
|
+
if (index === fields.length - 1) {
|
|
11002
|
+
control = group.controls[field];
|
|
11003
|
+
}
|
|
11004
|
+
else {
|
|
11005
|
+
group = group.controls[field];
|
|
11006
|
+
if (inArray && group.controls['value']) {
|
|
11007
|
+
group = group.controls['value'];
|
|
11008
|
+
}
|
|
11009
|
+
if (group && group.constructor && FormArray.name === group.constructor.name) {
|
|
11010
|
+
inArray = true;
|
|
11011
|
+
}
|
|
11012
|
+
else {
|
|
11013
|
+
inArray = false;
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
return !!group;
|
|
11017
|
+
});
|
|
11018
|
+
return control;
|
|
11019
|
+
}
|
|
11020
|
+
}
|
|
11021
|
+
FormErrorService.ɵfac = function FormErrorService_Factory(t) { return new (t || FormErrorService)(); };
|
|
11022
|
+
FormErrorService.ɵprov = i0.ɵɵdefineInjectable({ token: FormErrorService, factory: FormErrorService.ɵfac });
|
|
11023
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormErrorService, [{
|
|
11024
|
+
type: Injectable
|
|
11025
|
+
}], null, null); })();
|
|
11026
|
+
|
|
11027
|
+
class JurisdictionService {
|
|
11028
|
+
constructor(httpService) {
|
|
11029
|
+
this.httpService = httpService;
|
|
11030
|
+
this.selectedJurisdictionSource = new Subject$1();
|
|
11031
|
+
this.selectedJurisdiction = this.selectedJurisdictionSource.asObservable();
|
|
11032
|
+
}
|
|
11033
|
+
announceSelectedJurisdiction(jurisdiction) {
|
|
11034
|
+
this.selectedJurisdictionSource.next(jurisdiction);
|
|
11035
|
+
}
|
|
11036
|
+
searchJudicialUsers(searchTerm, serviceId) {
|
|
11037
|
+
return this.httpService.post('api/prd/judicial/getJudicialUsersSearch', { searchString: searchTerm, serviceCode: serviceId });
|
|
11038
|
+
}
|
|
11039
|
+
searchJudicialUsersByPersonalCodes(personalCodes) {
|
|
11040
|
+
return this.httpService.post('api/prd/judicial/searchJudicialUserByPersonalCodes', { personal_code: personalCodes });
|
|
11041
|
+
}
|
|
11042
|
+
}
|
|
11043
|
+
JurisdictionService.ɵfac = function JurisdictionService_Factory(t) { return new (t || JurisdictionService)(i0.ɵɵinject(HttpService)); };
|
|
11044
|
+
JurisdictionService.ɵprov = i0.ɵɵdefineInjectable({ token: JurisdictionService, factory: JurisdictionService.ɵfac });
|
|
11045
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JurisdictionService, [{
|
|
11046
|
+
type: Injectable
|
|
11047
|
+
}], function () { return [{ type: HttpService }]; }, null); })();
|
|
11048
|
+
|
|
11049
|
+
class BannersService {
|
|
11050
|
+
constructor(httpService, appConfig) {
|
|
11051
|
+
this.httpService = httpService;
|
|
11052
|
+
this.appConfig = appConfig;
|
|
11053
|
+
}
|
|
11054
|
+
getBanners(jurisdictionReferences) {
|
|
11055
|
+
const url = this.appConfig.getBannersUrl();
|
|
11056
|
+
const headers = new HttpHeaders()
|
|
11057
|
+
.set('experimental', 'true')
|
|
11058
|
+
.set('Accept', BannersService.V2_MEDIATYPE_BANNERS)
|
|
11059
|
+
.set('Content-Type', 'application/json');
|
|
11060
|
+
let params = new HttpParams();
|
|
11061
|
+
jurisdictionReferences.forEach(reference => params = params.append('ids', reference));
|
|
11062
|
+
return this.httpService
|
|
11063
|
+
.get(url, { params, headers, observe: 'body' })
|
|
11064
|
+
.pipe(map(body => body.banners));
|
|
11065
|
+
}
|
|
11066
|
+
}
|
|
11067
|
+
BannersService.V2_MEDIATYPE_BANNERS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-banners.v2+json;charset=UTF-8';
|
|
11068
|
+
BannersService.ɵfac = function BannersService_Factory(t) { return new (t || BannersService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11069
|
+
BannersService.ɵprov = i0.ɵɵdefineInjectable({ token: BannersService, factory: BannersService.ɵfac });
|
|
11070
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BannersService, [{
|
|
11071
|
+
type: Injectable
|
|
11072
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11073
|
+
|
|
11074
|
+
var NavigationOrigin;
|
|
11075
|
+
(function (NavigationOrigin) {
|
|
11076
|
+
NavigationOrigin[NavigationOrigin["DRAFT_DELETED"] = 0] = "DRAFT_DELETED";
|
|
11077
|
+
NavigationOrigin[NavigationOrigin["ERROR_DELETING_DRAFT"] = 1] = "ERROR_DELETING_DRAFT";
|
|
11078
|
+
NavigationOrigin[NavigationOrigin["DRAFT_RESUMED"] = 2] = "DRAFT_RESUMED";
|
|
11079
|
+
NavigationOrigin[NavigationOrigin["EVENT_TRIGGERED"] = 3] = "EVENT_TRIGGERED";
|
|
11080
|
+
NavigationOrigin[NavigationOrigin["NO_READ_ACCESS_REDIRECTION"] = 4] = "NO_READ_ACCESS_REDIRECTION";
|
|
11081
|
+
})(NavigationOrigin || (NavigationOrigin = {}));
|
|
11082
|
+
|
|
11083
|
+
class NavigationNotifierService {
|
|
11228
11084
|
constructor() {
|
|
11229
|
-
this.
|
|
11230
|
-
this.
|
|
11231
|
-
this.isPartOfCaseTimeline = false;
|
|
11085
|
+
this.navigationSource = new BehaviorSubject({});
|
|
11086
|
+
this.navigation = this.navigationSource.asObservable();
|
|
11232
11087
|
}
|
|
11233
|
-
|
|
11234
|
-
this.
|
|
11088
|
+
announceNavigation(origin) {
|
|
11089
|
+
this.navigationSource.next(origin);
|
|
11235
11090
|
}
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11091
|
+
}
|
|
11092
|
+
NavigationNotifierService.ɵfac = function NavigationNotifierService_Factory(t) { return new (t || NavigationNotifierService)(); };
|
|
11093
|
+
NavigationNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: NavigationNotifierService, factory: NavigationNotifierService.ɵfac });
|
|
11094
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationNotifierService, [{
|
|
11095
|
+
type: Injectable
|
|
11096
|
+
}], null, null); })();
|
|
11097
|
+
|
|
11098
|
+
class ProfileService {
|
|
11099
|
+
constructor(httpService, appConfig) {
|
|
11100
|
+
this.httpService = httpService;
|
|
11101
|
+
this.appConfig = appConfig;
|
|
11239
11102
|
}
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11103
|
+
get() {
|
|
11104
|
+
const url = this.appConfig.getCaseDataUrl() + ProfileService.URL;
|
|
11105
|
+
const headers = new HttpHeaders()
|
|
11106
|
+
.set('experimental', 'true')
|
|
11107
|
+
.set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
|
|
11108
|
+
.set('Content-Type', 'application/json');
|
|
11109
|
+
return this.httpService
|
|
11110
|
+
.get(url, { headers, observe: 'body' })
|
|
11111
|
+
.pipe(map((p) => plainToClass(Profile, p)));
|
|
11245
11112
|
}
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11113
|
+
}
|
|
11114
|
+
ProfileService.V2_MEDIATYPE_USER_PROFILE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-user-profile.v2+json;charset=UTF-8';
|
|
11115
|
+
ProfileService.URL = '/internal/profile';
|
|
11116
|
+
ProfileService.ɵfac = function ProfileService_Factory(t) { return new (t || ProfileService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11117
|
+
ProfileService.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileService, factory: ProfileService.ɵfac });
|
|
11118
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileService, [{
|
|
11119
|
+
type: Injectable
|
|
11120
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11121
|
+
|
|
11122
|
+
class RequestOptionsBuilder {
|
|
11123
|
+
/**
|
|
11124
|
+
* Assess the value to see if it should be included in the request options.
|
|
11125
|
+
* If it's null or an "empty" string, it shouldn't be.
|
|
11126
|
+
*
|
|
11127
|
+
* @param value The value to be assessed.
|
|
11128
|
+
*/
|
|
11129
|
+
static includeParam(value) {
|
|
11130
|
+
if (value) {
|
|
11131
|
+
if (typeof (value) === 'string') {
|
|
11132
|
+
return value.trim().length > 0;
|
|
11133
|
+
}
|
|
11134
|
+
return true;
|
|
11249
11135
|
}
|
|
11136
|
+
return false;
|
|
11250
11137
|
}
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11138
|
+
buildOptions(metaCriteria, caseCriteria, view) {
|
|
11139
|
+
// TODO: This should probably be the now built-in URLSearchParams but it
|
|
11140
|
+
// requires a bigger refactor and there are bigger fish to fry right now.
|
|
11141
|
+
let params = new HttpParams();
|
|
11142
|
+
if (view) {
|
|
11143
|
+
params = params.set('view', view);
|
|
11144
|
+
}
|
|
11145
|
+
if (metaCriteria) {
|
|
11146
|
+
for (const criterion of Object.keys(metaCriteria)) {
|
|
11147
|
+
// EUI-3490. Make sure the parameter should be included for adding it.
|
|
11148
|
+
// This was already handled by the old URLSearchParams mechanism.
|
|
11149
|
+
if (RequestOptionsBuilder.includeParam(metaCriteria[criterion])) {
|
|
11150
|
+
params = params.set(criterion, metaCriteria[criterion]);
|
|
11151
|
+
}
|
|
11152
|
+
}
|
|
11153
|
+
}
|
|
11154
|
+
if (caseCriteria) {
|
|
11155
|
+
for (const criterion of Object.keys(caseCriteria)) {
|
|
11156
|
+
if (RequestOptionsBuilder.includeParam(caseCriteria[criterion])) {
|
|
11157
|
+
const key = RequestOptionsBuilder.FIELD_PREFIX + criterion;
|
|
11158
|
+
const value = caseCriteria[criterion].trim ? caseCriteria[criterion].trim() : caseCriteria[criterion];
|
|
11159
|
+
params = params.set(key, value.replace(/’/i, `'`));
|
|
11160
|
+
}
|
|
11161
|
+
}
|
|
11254
11162
|
}
|
|
11163
|
+
const options = { params, observe: 'body' };
|
|
11164
|
+
return options;
|
|
11165
|
+
}
|
|
11166
|
+
}
|
|
11167
|
+
RequestOptionsBuilder.FIELD_PREFIX = 'case.';
|
|
11168
|
+
RequestOptionsBuilder.ɵfac = function RequestOptionsBuilder_Factory(t) { return new (t || RequestOptionsBuilder)(); };
|
|
11169
|
+
RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBuilder, factory: RequestOptionsBuilder.ɵfac });
|
|
11170
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RequestOptionsBuilder, [{
|
|
11171
|
+
type: Injectable
|
|
11172
|
+
}], null, null); })();
|
|
11173
|
+
|
|
11174
|
+
class SearchService {
|
|
11175
|
+
constructor(appConfig, httpService, requestOptionsBuilder, loadingService) {
|
|
11176
|
+
this.appConfig = appConfig;
|
|
11177
|
+
this.httpService = httpService;
|
|
11178
|
+
this.requestOptionsBuilder = requestOptionsBuilder;
|
|
11179
|
+
this.loadingService = loadingService;
|
|
11180
|
+
}
|
|
11181
|
+
search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
11182
|
+
const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
|
|
11183
|
+
+ `/jurisdictions/${jurisdictionId}`
|
|
11184
|
+
+ `/case-types/${caseTypeId}`
|
|
11185
|
+
+ `/cases`;
|
|
11186
|
+
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
11187
|
+
const loadingToken = this.loadingService.register();
|
|
11188
|
+
return this.httpService
|
|
11189
|
+
.get(url, options)
|
|
11190
|
+
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
11191
|
+
}
|
|
11192
|
+
searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
11193
|
+
const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
11194
|
+
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
11195
|
+
const body = {
|
|
11196
|
+
sort,
|
|
11197
|
+
size: this.appConfig.getPaginationPageSize()
|
|
11198
|
+
};
|
|
11199
|
+
const loadingToken = this.loadingService.register();
|
|
11200
|
+
return this.httpService
|
|
11201
|
+
.post(url, body, options)
|
|
11202
|
+
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
11203
|
+
}
|
|
11204
|
+
getSearchInputUrl(caseTypeId) {
|
|
11205
|
+
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/search-inputs`;
|
|
11206
|
+
}
|
|
11207
|
+
getSearchInputs(jurisdictionId, caseTypeId) {
|
|
11208
|
+
const url = this.getSearchInputUrl(caseTypeId);
|
|
11209
|
+
const headers = new HttpHeaders()
|
|
11210
|
+
.set('experimental', 'true')
|
|
11211
|
+
.set('Accept', SearchService.V2_MEDIATYPE_SEARCH_INPUTS)
|
|
11212
|
+
.set('Content-Type', 'application/json');
|
|
11213
|
+
this.currentJurisdiction = jurisdictionId;
|
|
11214
|
+
this.currentCaseType = caseTypeId;
|
|
11215
|
+
return this.httpService
|
|
11216
|
+
.get(url, { headers, observe: 'body' })
|
|
11217
|
+
.pipe(map(body => {
|
|
11218
|
+
const searchInputs = body.searchInputs;
|
|
11219
|
+
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
11220
|
+
searchInputs.forEach(item => {
|
|
11221
|
+
item.field.label = item.label;
|
|
11222
|
+
item.field.display_context_parameter = item.display_context_parameter;
|
|
11223
|
+
});
|
|
11224
|
+
}
|
|
11225
|
+
else {
|
|
11226
|
+
throw new Error('Response expired');
|
|
11227
|
+
}
|
|
11228
|
+
return searchInputs;
|
|
11229
|
+
}));
|
|
11230
|
+
}
|
|
11231
|
+
isDataValid(jurisdictionId, caseTypeId) {
|
|
11232
|
+
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
11233
|
+
}
|
|
11234
|
+
}
|
|
11235
|
+
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
11236
|
+
SearchService.VIEW_SEARCH = 'SEARCH';
|
|
11237
|
+
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
11238
|
+
SearchService.FIELD_PREFIX = 'case.';
|
|
11239
|
+
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
|
|
11240
|
+
SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
11241
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
|
|
11242
|
+
type: Injectable
|
|
11243
|
+
}], function () { return [{ type: AbstractAppConfig }, { type: HttpService }, { type: RequestOptionsBuilder }, { type: LoadingService }]; }, null); })();
|
|
11244
|
+
|
|
11245
|
+
class RouterHelperService {
|
|
11246
|
+
getUrlSegmentsFromRoot(route) {
|
|
11247
|
+
return route.pathFromRoot
|
|
11248
|
+
.filter(r => r.url && r.url.length)
|
|
11249
|
+
.reduce((acc, r) => {
|
|
11250
|
+
r.url.forEach(url => {
|
|
11251
|
+
acc.push(url.path);
|
|
11252
|
+
});
|
|
11253
|
+
return acc;
|
|
11254
|
+
}, []);
|
|
11255
11255
|
}
|
|
11256
|
-
|
|
11257
|
-
|
|
11256
|
+
}
|
|
11257
|
+
RouterHelperService.ɵfac = function RouterHelperService_Factory(t) { return new (t || RouterHelperService)(); };
|
|
11258
|
+
RouterHelperService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterHelperService, factory: RouterHelperService.ɵfac });
|
|
11259
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterHelperService, [{
|
|
11260
|
+
type: Injectable
|
|
11261
|
+
}], null, null); })();
|
|
11262
|
+
|
|
11263
|
+
class WorkbasketInputFilterService {
|
|
11264
|
+
constructor(httpService, appConfig) {
|
|
11265
|
+
this.httpService = httpService;
|
|
11266
|
+
this.appConfig = appConfig;
|
|
11258
11267
|
}
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
return `date ${formatDate(event.timestamp, 'dd MMM yyyy hh:mm:ss a', 'en-GB')},
|
|
11262
|
-
press enter key for event ${event.event_name} details`;
|
|
11263
|
-
}
|
|
11264
|
-
else {
|
|
11265
|
-
return '';
|
|
11266
|
-
}
|
|
11268
|
+
getWorkbasketInputUrl(caseTypeId) {
|
|
11269
|
+
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/work-basket-inputs`;
|
|
11267
11270
|
}
|
|
11268
|
-
|
|
11269
|
-
|
|
11271
|
+
getWorkbasketInputs(jurisdictionId, caseTypeId) {
|
|
11272
|
+
const url = this.getWorkbasketInputUrl(caseTypeId);
|
|
11273
|
+
const headers = new HttpHeaders()
|
|
11274
|
+
.set('experimental', 'true')
|
|
11275
|
+
.set('Accept', WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS)
|
|
11276
|
+
.set('Content-Type', 'application/json');
|
|
11277
|
+
this.currentJurisdiction = jurisdictionId;
|
|
11278
|
+
this.currentCaseType = caseTypeId;
|
|
11279
|
+
return this.httpService
|
|
11280
|
+
.get(url, { headers, observe: 'body' })
|
|
11281
|
+
.pipe(map(body => {
|
|
11282
|
+
const workbasketInputs = body.workbasketInputs;
|
|
11283
|
+
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
11284
|
+
workbasketInputs.forEach(item => {
|
|
11285
|
+
item.field.label = item.label;
|
|
11286
|
+
if (item.display_context_parameter) {
|
|
11287
|
+
item.field.display_context_parameter = item.display_context_parameter;
|
|
11288
|
+
}
|
|
11289
|
+
});
|
|
11290
|
+
}
|
|
11291
|
+
else {
|
|
11292
|
+
throw new Error('Response expired');
|
|
11293
|
+
}
|
|
11294
|
+
return workbasketInputs;
|
|
11295
|
+
}));
|
|
11270
11296
|
}
|
|
11271
|
-
|
|
11272
|
-
return
|
|
11297
|
+
isDataValid(jurisdictionId, caseTypeId) {
|
|
11298
|
+
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
11273
11299
|
}
|
|
11274
11300
|
}
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
i0.ɵɵelementEnd();
|
|
11282
|
-
i0.ɵɵelementEnd();
|
|
11283
|
-
i0.ɵɵelementStart(4, "thead");
|
|
11284
|
-
i0.ɵɵelementStart(5, "tr");
|
|
11285
|
-
i0.ɵɵelementStart(6, "th");
|
|
11286
|
-
i0.ɵɵelementStart(7, "span", 2);
|
|
11287
|
-
i0.ɵɵtext(8, "Event");
|
|
11288
|
-
i0.ɵɵelementEnd();
|
|
11289
|
-
i0.ɵɵelementEnd();
|
|
11290
|
-
i0.ɵɵelementStart(9, "th");
|
|
11291
|
-
i0.ɵɵelementStart(10, "span", 2);
|
|
11292
|
-
i0.ɵɵtext(11, "Date");
|
|
11293
|
-
i0.ɵɵelementEnd();
|
|
11294
|
-
i0.ɵɵelementEnd();
|
|
11295
|
-
i0.ɵɵelementStart(12, "th");
|
|
11296
|
-
i0.ɵɵelementStart(13, "span", 2);
|
|
11297
|
-
i0.ɵɵtext(14, "Author");
|
|
11298
|
-
i0.ɵɵelementEnd();
|
|
11299
|
-
i0.ɵɵelementEnd();
|
|
11300
|
-
i0.ɵɵelementEnd();
|
|
11301
|
-
i0.ɵɵelementEnd();
|
|
11302
|
-
i0.ɵɵelementStart(15, "tbody");
|
|
11303
|
-
i0.ɵɵtemplate(16, EventLogTableComponent_tr_16_Template, 19, 24, "tr", 3);
|
|
11304
|
-
i0.ɵɵelementEnd();
|
|
11305
|
-
i0.ɵɵelementEnd();
|
|
11306
|
-
} if (rf & 2) {
|
|
11307
|
-
i0.ɵɵadvance(16);
|
|
11308
|
-
i0.ɵɵproperty("ngForOf", ctx.events);
|
|
11309
|
-
} }, directives: [i1.NgForOf, i1.NgClass, i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, i1$1.RouterLinkWithHref], pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe], styles: ["#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#2b8cc4}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{color:#4c2c92}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:10px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%]{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]{float:left;padding-right:8px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-img[_ngcontent-%COMP%]{width:16px;float:left}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]{left:35%;bottom:7px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]:after{border-color:transparent}"] });
|
|
11310
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
11311
|
-
type: Component,
|
|
11312
|
-
args: [{
|
|
11313
|
-
selector: 'ccd-event-log-table',
|
|
11314
|
-
templateUrl: './event-log-table.component.html',
|
|
11315
|
-
styleUrls: ['./event-log-table.scss']
|
|
11316
|
-
}]
|
|
11317
|
-
}], null, { events: [{
|
|
11318
|
-
type: Input
|
|
11319
|
-
}], selected: [{
|
|
11320
|
-
type: Input
|
|
11321
|
-
}], onSelect: [{
|
|
11322
|
-
type: Output
|
|
11323
|
-
}], onCaseHistory: [{
|
|
11324
|
-
type: Output
|
|
11325
|
-
}] }); })();
|
|
11301
|
+
WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-workbasket-input-details.v2+json;charset=UTF-8';
|
|
11302
|
+
WorkbasketInputFilterService.ɵfac = function WorkbasketInputFilterService_Factory(t) { return new (t || WorkbasketInputFilterService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11303
|
+
WorkbasketInputFilterService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkbasketInputFilterService, factory: WorkbasketInputFilterService.ɵfac });
|
|
11304
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkbasketInputFilterService, [{
|
|
11305
|
+
type: Injectable
|
|
11306
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11326
11307
|
|
|
11327
|
-
class
|
|
11328
|
-
|
|
11329
|
-
|
|
11308
|
+
class DefinitionsService {
|
|
11309
|
+
constructor(http, appConfig) {
|
|
11310
|
+
this.http = http;
|
|
11311
|
+
this.appConfig = appConfig;
|
|
11312
|
+
}
|
|
11313
|
+
getCaseTypes(jurisdictionId, access) {
|
|
11314
|
+
const url = this.appConfig.getApiUrl()
|
|
11315
|
+
+ `/caseworkers/:uid`
|
|
11316
|
+
+ `/jurisdictions/${jurisdictionId}`
|
|
11317
|
+
+ `/case-types?access=${access}`;
|
|
11318
|
+
return this.http
|
|
11319
|
+
.get(url).pipe(map(response => response));
|
|
11320
|
+
}
|
|
11321
|
+
getJurisdictions(access) {
|
|
11322
|
+
const url = this.appConfig.getApiUrl()
|
|
11323
|
+
+ `/caseworkers/:uid`
|
|
11324
|
+
+ `/jurisdictions?access=${access}`;
|
|
11325
|
+
return this.http
|
|
11326
|
+
.get(url)
|
|
11327
|
+
.pipe(map(response => response));
|
|
11330
11328
|
}
|
|
11331
11329
|
}
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
11335
|
-
type:
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
i0.ɵɵelementStart(2, "h2", 1);
|
|
11348
|
-
i0.ɵɵtext(3, "Details");
|
|
11349
|
-
i0.ɵɵelementEnd();
|
|
11350
|
-
i0.ɵɵelementEnd();
|
|
11351
|
-
i0.ɵɵelementStart(4, "tbody", 2);
|
|
11352
|
-
i0.ɵɵelementStart(5, "tr");
|
|
11353
|
-
i0.ɵɵelementStart(6, "th");
|
|
11354
|
-
i0.ɵɵelementStart(7, "span", 3);
|
|
11355
|
-
i0.ɵɵtext(8, "Date");
|
|
11356
|
-
i0.ɵɵelementEnd();
|
|
11357
|
-
i0.ɵɵelementEnd();
|
|
11358
|
-
i0.ɵɵelementStart(9, "td");
|
|
11359
|
-
i0.ɵɵelementStart(10, "div", 4);
|
|
11360
|
-
i0.ɵɵtext(11);
|
|
11361
|
-
i0.ɵɵpipe(12, "ccdDate");
|
|
11362
|
-
i0.ɵɵelementEnd();
|
|
11363
|
-
i0.ɵɵelementEnd();
|
|
11364
|
-
i0.ɵɵelementEnd();
|
|
11365
|
-
i0.ɵɵelementStart(13, "tr");
|
|
11366
|
-
i0.ɵɵelementStart(14, "th");
|
|
11367
|
-
i0.ɵɵelementStart(15, "span", 3);
|
|
11368
|
-
i0.ɵɵtext(16, "Author");
|
|
11369
|
-
i0.ɵɵelementEnd();
|
|
11370
|
-
i0.ɵɵelementEnd();
|
|
11371
|
-
i0.ɵɵelementStart(17, "td");
|
|
11372
|
-
i0.ɵɵelementStart(18, "span", 3);
|
|
11373
|
-
i0.ɵɵtext(19);
|
|
11374
|
-
i0.ɵɵpipe(20, "titlecase");
|
|
11375
|
-
i0.ɵɵpipe(21, "uppercase");
|
|
11376
|
-
i0.ɵɵelementEnd();
|
|
11377
|
-
i0.ɵɵelementEnd();
|
|
11378
|
-
i0.ɵɵelementEnd();
|
|
11379
|
-
i0.ɵɵelementStart(22, "tr");
|
|
11380
|
-
i0.ɵɵelementStart(23, "th");
|
|
11381
|
-
i0.ɵɵelementStart(24, "span", 3);
|
|
11382
|
-
i0.ɵɵtext(25, "End state");
|
|
11383
|
-
i0.ɵɵelementEnd();
|
|
11384
|
-
i0.ɵɵelementEnd();
|
|
11385
|
-
i0.ɵɵelementStart(26, "td");
|
|
11386
|
-
i0.ɵɵelementStart(27, "span", 3);
|
|
11387
|
-
i0.ɵɵtext(28);
|
|
11388
|
-
i0.ɵɵelementEnd();
|
|
11389
|
-
i0.ɵɵelementEnd();
|
|
11390
|
-
i0.ɵɵelementEnd();
|
|
11391
|
-
i0.ɵɵelementStart(29, "tr");
|
|
11392
|
-
i0.ɵɵelementStart(30, "th");
|
|
11393
|
-
i0.ɵɵelementStart(31, "span", 3);
|
|
11394
|
-
i0.ɵɵtext(32, "Event");
|
|
11395
|
-
i0.ɵɵelementEnd();
|
|
11396
|
-
i0.ɵɵelementEnd();
|
|
11397
|
-
i0.ɵɵelementStart(33, "td");
|
|
11398
|
-
i0.ɵɵelementStart(34, "span", 3);
|
|
11399
|
-
i0.ɵɵtext(35);
|
|
11400
|
-
i0.ɵɵelementEnd();
|
|
11401
|
-
i0.ɵɵelementEnd();
|
|
11402
|
-
i0.ɵɵelementEnd();
|
|
11403
|
-
i0.ɵɵelementStart(36, "tr");
|
|
11404
|
-
i0.ɵɵelementStart(37, "th");
|
|
11405
|
-
i0.ɵɵelementStart(38, "span", 3);
|
|
11406
|
-
i0.ɵɵtext(39, "Summary");
|
|
11407
|
-
i0.ɵɵelementEnd();
|
|
11408
|
-
i0.ɵɵelementEnd();
|
|
11409
|
-
i0.ɵɵelementStart(40, "td");
|
|
11410
|
-
i0.ɵɵelementStart(41, "span", 3);
|
|
11411
|
-
i0.ɵɵtext(42);
|
|
11412
|
-
i0.ɵɵpipe(43, "ccdDash");
|
|
11413
|
-
i0.ɵɵelementEnd();
|
|
11414
|
-
i0.ɵɵelementEnd();
|
|
11415
|
-
i0.ɵɵelementEnd();
|
|
11416
|
-
i0.ɵɵelementStart(44, "tr");
|
|
11417
|
-
i0.ɵɵelementStart(45, "th");
|
|
11418
|
-
i0.ɵɵelementStart(46, "span", 3);
|
|
11419
|
-
i0.ɵɵtext(47, "Comment");
|
|
11420
|
-
i0.ɵɵelementEnd();
|
|
11421
|
-
i0.ɵɵelementEnd();
|
|
11422
|
-
i0.ɵɵelementStart(48, "td");
|
|
11423
|
-
i0.ɵɵelementStart(49, "span", 3);
|
|
11424
|
-
i0.ɵɵtext(50);
|
|
11425
|
-
i0.ɵɵpipe(51, "ccdDash");
|
|
11426
|
-
i0.ɵɵelementEnd();
|
|
11427
|
-
i0.ɵɵelementEnd();
|
|
11428
|
-
i0.ɵɵelementEnd();
|
|
11429
|
-
i0.ɵɵelementEnd();
|
|
11430
|
-
i0.ɵɵelementEnd();
|
|
11431
|
-
} if (rf & 2) {
|
|
11432
|
-
i0.ɵɵadvance(11);
|
|
11433
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(12, 7, ctx.event.timestamp, "local"), " ");
|
|
11434
|
-
i0.ɵɵadvance(8);
|
|
11435
|
-
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(20, 10, ctx.event.user_first_name), " ", i0.ɵɵpipeBind1(21, 12, ctx.event.user_last_name), "");
|
|
11436
|
-
i0.ɵɵadvance(9);
|
|
11437
|
-
i0.ɵɵtextInterpolate(ctx.event.state_name);
|
|
11438
|
-
i0.ɵɵadvance(7);
|
|
11439
|
-
i0.ɵɵtextInterpolate(ctx.event.event_name);
|
|
11440
|
-
i0.ɵɵadvance(7);
|
|
11441
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 14, ctx.event.summary));
|
|
11442
|
-
i0.ɵɵadvance(8);
|
|
11443
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(51, 16, ctx.event.comment));
|
|
11444
|
-
} }, pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe, DashPipe], styles: [".EventLogDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .EventLogDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:none}"] });
|
|
11445
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogDetailsComponent, [{
|
|
11446
|
-
type: Component,
|
|
11330
|
+
DefinitionsService.ɵfac = function DefinitionsService_Factory(t) { return new (t || DefinitionsService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11331
|
+
DefinitionsService.ɵprov = i0.ɵɵdefineInjectable({ token: DefinitionsService, factory: DefinitionsService.ɵfac });
|
|
11332
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsService, [{
|
|
11333
|
+
type: Injectable
|
|
11334
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11335
|
+
|
|
11336
|
+
class DefinitionsModule {
|
|
11337
|
+
}
|
|
11338
|
+
DefinitionsModule.ɵfac = function DefinitionsModule_Factory(t) { return new (t || DefinitionsModule)(); };
|
|
11339
|
+
DefinitionsModule.ɵmod = i0.ɵɵdefineNgModule({ type: DefinitionsModule });
|
|
11340
|
+
DefinitionsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
11341
|
+
DefinitionsService
|
|
11342
|
+
] });
|
|
11343
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsModule, [{
|
|
11344
|
+
type: NgModule,
|
|
11447
11345
|
args: [{
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11346
|
+
providers: [
|
|
11347
|
+
DefinitionsService
|
|
11348
|
+
]
|
|
11451
11349
|
}]
|
|
11452
|
-
}], null,
|
|
11453
|
-
type: Input
|
|
11454
|
-
}] }); })();
|
|
11350
|
+
}], null, null); })();
|
|
11455
11351
|
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
this.isPartOfCaseTimeline = false;
|
|
11352
|
+
class SearchResultViewItemComparatorFactory {
|
|
11353
|
+
createSearchResultViewItemComparator(column) {
|
|
11354
|
+
const fieldId = column.case_field_id;
|
|
11355
|
+
switch (column.case_field_type.type) {
|
|
11356
|
+
case ('MultiSelectList'): {
|
|
11357
|
+
return this.textArrayComparator(fieldId);
|
|
11358
|
+
}
|
|
11359
|
+
case ('Number'):
|
|
11360
|
+
case ('MoneyGBP'): {
|
|
11361
|
+
return this.numberComparator(fieldId);
|
|
11362
|
+
}
|
|
11363
|
+
case ('Text'):
|
|
11364
|
+
case ('TextArea'):
|
|
11365
|
+
case ('Email'):
|
|
11366
|
+
case ('Date'):
|
|
11367
|
+
case ('DateTime'):
|
|
11368
|
+
case ('Label'):
|
|
11369
|
+
case ('Postcode'):
|
|
11370
|
+
case ('YesOrNo'):
|
|
11371
|
+
case ('PhoneUK'):
|
|
11372
|
+
case ('FixedList'): {
|
|
11373
|
+
return this.stringComparator(fieldId);
|
|
11374
|
+
}
|
|
11375
|
+
default: {
|
|
11376
|
+
return undefined;
|
|
11377
|
+
}
|
|
11378
|
+
}
|
|
11484
11379
|
}
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11380
|
+
numberComparator(fieldId) {
|
|
11381
|
+
return {
|
|
11382
|
+
compare(a, b) {
|
|
11383
|
+
let fieldA = a.case_fields[fieldId];
|
|
11384
|
+
let fieldB = b.case_fields[fieldId];
|
|
11385
|
+
fieldA = isUndefined(fieldA) || fieldA === null ? 0 : fieldA;
|
|
11386
|
+
fieldB = isUndefined(fieldB) || fieldB === null ? 0 : fieldB;
|
|
11387
|
+
return fieldA - fieldB;
|
|
11388
|
+
}
|
|
11389
|
+
};
|
|
11488
11390
|
}
|
|
11489
|
-
|
|
11490
|
-
|
|
11391
|
+
stringComparator(fieldId) {
|
|
11392
|
+
return {
|
|
11393
|
+
compare(a, b) {
|
|
11394
|
+
let fieldA = a.case_fields[fieldId];
|
|
11395
|
+
let fieldB = b.case_fields[fieldId];
|
|
11396
|
+
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
|
|
11397
|
+
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
|
|
11398
|
+
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
11399
|
+
}
|
|
11400
|
+
};
|
|
11491
11401
|
}
|
|
11492
|
-
|
|
11493
|
-
|
|
11402
|
+
textArrayComparator(fieldId) {
|
|
11403
|
+
return {
|
|
11404
|
+
compare(a, b) {
|
|
11405
|
+
let fieldA = a.case_fields[fieldId];
|
|
11406
|
+
let fieldB = b.case_fields[fieldId];
|
|
11407
|
+
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
|
|
11408
|
+
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
|
|
11409
|
+
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
11410
|
+
}
|
|
11411
|
+
};
|
|
11494
11412
|
}
|
|
11495
11413
|
}
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
i0.ɵɵtemplate(3, EventLogComponent_ccd_event_log_table_3_Template, 1, 2, "ccd-event-log-table", 3);
|
|
11502
|
-
i0.ɵɵtemplate(4, EventLogComponent_ccd_event_log_table_4_Template, 1, 2, "ccd-event-log-table", 4);
|
|
11503
|
-
i0.ɵɵelementContainerEnd();
|
|
11504
|
-
i0.ɵɵelementEnd();
|
|
11505
|
-
i0.ɵɵelementStart(5, "div", 1);
|
|
11506
|
-
i0.ɵɵelementStart(6, "div", 5);
|
|
11507
|
-
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details", 6);
|
|
11508
|
-
i0.ɵɵelementEnd();
|
|
11509
|
-
i0.ɵɵelementEnd();
|
|
11510
|
-
i0.ɵɵelementEnd();
|
|
11511
|
-
} if (rf & 2) {
|
|
11512
|
-
i0.ɵɵadvance(2);
|
|
11513
|
-
i0.ɵɵproperty("ngSwitch", ctx.isPartOfCaseTimeline);
|
|
11514
|
-
i0.ɵɵadvance(1);
|
|
11515
|
-
i0.ɵɵproperty("ngSwitchCase", true);
|
|
11516
|
-
i0.ɵɵadvance(1);
|
|
11517
|
-
i0.ɵɵproperty("ngSwitchCase", false);
|
|
11518
|
-
i0.ɵɵadvance(3);
|
|
11519
|
-
i0.ɵɵproperty("ngIf", ctx.selected);
|
|
11520
|
-
} }, directives: [i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, EventLogTableComponent, EventLogDetailsComponent], styles: ["@media (max-width:991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
11521
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogComponent, [{
|
|
11522
|
-
type: Component,
|
|
11523
|
-
args: [{
|
|
11524
|
-
selector: 'ccd-event-log',
|
|
11525
|
-
templateUrl: './event-log.component.html',
|
|
11526
|
-
styleUrls: ['./event-log.scss']
|
|
11527
|
-
}]
|
|
11528
|
-
}], null, { events: [{
|
|
11529
|
-
type: Input
|
|
11530
|
-
}], onCaseHistory: [{
|
|
11531
|
-
type: Output
|
|
11532
|
-
}] }); })();
|
|
11414
|
+
SearchResultViewItemComparatorFactory.ɵfac = function SearchResultViewItemComparatorFactory_Factory(t) { return new (t || SearchResultViewItemComparatorFactory)(); };
|
|
11415
|
+
SearchResultViewItemComparatorFactory.ɵprov = i0.ɵɵdefineInjectable({ token: SearchResultViewItemComparatorFactory, factory: SearchResultViewItemComparatorFactory.ɵfac });
|
|
11416
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultViewItemComparatorFactory, [{
|
|
11417
|
+
type: Injectable
|
|
11418
|
+
}], null, null); })();
|
|
11533
11419
|
|
|
11534
|
-
class
|
|
11420
|
+
class OrganisationService {
|
|
11421
|
+
constructor(http, appconfig) {
|
|
11422
|
+
this.http = http;
|
|
11423
|
+
this.appconfig = appconfig;
|
|
11424
|
+
}
|
|
11425
|
+
static mapOrganisation(organisations) {
|
|
11426
|
+
const organisationsVm = new Array();
|
|
11427
|
+
organisations.forEach(org => {
|
|
11428
|
+
let contactInformation = null;
|
|
11429
|
+
if (org.contactInformation && org.contactInformation[0]) {
|
|
11430
|
+
contactInformation = org.contactInformation[0];
|
|
11431
|
+
}
|
|
11432
|
+
organisationsVm.push({
|
|
11433
|
+
organisationIdentifier: org.organisationIdentifier,
|
|
11434
|
+
name: org.name,
|
|
11435
|
+
addressLine1: contactInformation !== null ? contactInformation.addressLine1 : null,
|
|
11436
|
+
addressLine2: contactInformation !== null ? contactInformation.addressLine2 : null,
|
|
11437
|
+
addressLine3: contactInformation !== null ? contactInformation.addressLine3 : null,
|
|
11438
|
+
townCity: contactInformation !== null ? contactInformation.townCity : null,
|
|
11439
|
+
county: contactInformation !== null ? contactInformation.county : null,
|
|
11440
|
+
country: contactInformation !== null ? contactInformation.country : null,
|
|
11441
|
+
postCode: contactInformation !== null ? contactInformation.postCode : null,
|
|
11442
|
+
});
|
|
11443
|
+
});
|
|
11444
|
+
return organisationsVm;
|
|
11445
|
+
}
|
|
11446
|
+
getActiveOrganisations() {
|
|
11447
|
+
if (!this.organisations$) {
|
|
11448
|
+
const url = this.appconfig.getPrdUrl();
|
|
11449
|
+
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
11450
|
+
this.organisations$ = this.http.get(url)
|
|
11451
|
+
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
11452
|
+
console.log(e);
|
|
11453
|
+
// Handle error and return blank Observable array
|
|
11454
|
+
return of([]);
|
|
11455
|
+
}));
|
|
11456
|
+
timer(cacheTimeOut).subscribe(() => {
|
|
11457
|
+
this.organisations$ = null;
|
|
11458
|
+
});
|
|
11459
|
+
}
|
|
11460
|
+
return this.organisations$;
|
|
11461
|
+
}
|
|
11535
11462
|
}
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
(
|
|
11544
|
-
|
|
11463
|
+
OrganisationService.ɵfac = function OrganisationService_Factory(t) { return new (t || OrganisationService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11464
|
+
OrganisationService.ɵprov = i0.ɵɵdefineInjectable({ token: OrganisationService, factory: OrganisationService.ɵfac });
|
|
11465
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationService, [{
|
|
11466
|
+
type: Injectable
|
|
11467
|
+
}], function () { return [{ type: i1$2.HttpClient }, { type: AbstractAppConfig }]; }, null); })();
|
|
11468
|
+
|
|
11469
|
+
class BrowserService {
|
|
11470
|
+
isFirefox() {
|
|
11471
|
+
return window.navigator.userAgent.indexOf('Firefox') > -1;
|
|
11472
|
+
}
|
|
11473
|
+
isSafari() {
|
|
11474
|
+
const isSafariAgent = window.navigator.userAgent.indexOf('Safari') > -1;
|
|
11475
|
+
const isChromeAgent = window.navigator.userAgent.indexOf('Chrome') > -1;
|
|
11476
|
+
if ((isChromeAgent) && (isSafariAgent)) {
|
|
11477
|
+
return false;
|
|
11478
|
+
}
|
|
11479
|
+
return isSafariAgent;
|
|
11480
|
+
}
|
|
11481
|
+
isIEOrEdge() {
|
|
11482
|
+
return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
11483
|
+
}
|
|
11484
|
+
}
|
|
11485
|
+
BrowserService.ɵfac = function BrowserService_Factory(t) { return new (t || BrowserService)(); };
|
|
11486
|
+
BrowserService.ɵprov = i0.ɵɵdefineInjectable({ token: BrowserService, factory: BrowserService.ɵfac });
|
|
11487
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BrowserService, [{
|
|
11488
|
+
type: Injectable
|
|
11489
|
+
}], null, null); })();
|
|
11490
|
+
|
|
11491
|
+
class LoadingModule {
|
|
11492
|
+
}
|
|
11493
|
+
LoadingModule.ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
11494
|
+
LoadingModule.ɵmod = i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
11495
|
+
LoadingModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
11496
|
+
LoadingService
|
|
11497
|
+
], imports: [[]] });
|
|
11498
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
11499
|
+
type: NgModule,
|
|
11545
11500
|
args: [{
|
|
11546
|
-
|
|
11547
|
-
|
|
11501
|
+
imports: [],
|
|
11502
|
+
declarations: [],
|
|
11503
|
+
exports: [],
|
|
11504
|
+
providers: [
|
|
11505
|
+
LoadingService
|
|
11506
|
+
]
|
|
11548
11507
|
}]
|
|
11549
11508
|
}], null, null); })();
|
|
11550
11509
|
|
|
@@ -16811,8 +16770,8 @@ const PALETTE_COMPONENTS = [
|
|
|
16811
16770
|
WriteCaseLinkFieldComponent,
|
|
16812
16771
|
WriteCollectionFieldComponent,
|
|
16813
16772
|
// ComponentLauncher web components
|
|
16814
|
-
|
|
16815
|
-
|
|
16773
|
+
CaseFileViewFieldComponent,
|
|
16774
|
+
CaseFileViewFolderComponent
|
|
16816
16775
|
];
|
|
16817
16776
|
class PaletteModule {
|
|
16818
16777
|
}
|
|
@@ -16932,8 +16891,8 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
16932
16891
|
WriteCaseLinkFieldComponent,
|
|
16933
16892
|
WriteCollectionFieldComponent,
|
|
16934
16893
|
// ComponentLauncher web components
|
|
16935
|
-
|
|
16936
|
-
|
|
16894
|
+
CaseFileViewFieldComponent,
|
|
16895
|
+
CaseFileViewFolderComponent], imports: [CommonModule,
|
|
16937
16896
|
RouterModule,
|
|
16938
16897
|
FormsModule,
|
|
16939
16898
|
ReactiveFormsModule,
|
|
@@ -17030,8 +16989,8 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
17030
16989
|
WriteCaseLinkFieldComponent,
|
|
17031
16990
|
WriteCollectionFieldComponent,
|
|
17032
16991
|
// ComponentLauncher web components
|
|
17033
|
-
|
|
17034
|
-
|
|
16992
|
+
CaseFileViewFieldComponent,
|
|
16993
|
+
CaseFileViewFolderComponent] }); })();
|
|
17035
16994
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteModule, [{
|
|
17036
16995
|
type: NgModule,
|
|
17037
16996
|
args: [{
|
|
@@ -20113,7 +20072,7 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_
|
|
|
20113
20072
|
function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) { if (rf & 1) {
|
|
20114
20073
|
i0.ɵɵelementStart(0, "tr");
|
|
20115
20074
|
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_th_1_Template, 3, 1, "th", 31);
|
|
20116
|
-
i0.ɵɵelementStart(2, "
|
|
20075
|
+
i0.ɵɵelementStart(2, "th");
|
|
20117
20076
|
i0.ɵɵelementStart(3, "span", 32);
|
|
20118
20077
|
i0.ɵɵelement(4, "ccd-field-read", 33);
|
|
20119
20078
|
i0.ɵɵelementEnd();
|