@hmcts/ccd-case-ui-toolkit 7.0.24-upload-timestamp → 7.0.25-disable-buttons-readonly
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/esm2020/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +35 -7
- package/esm2020/lib/shared/components/case-editor/services/page-validation.service.mjs +10 -5
- package/esm2020/lib/shared/components/case-history/case-history.component.mjs +13 -13
- package/esm2020/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +3 -3
- package/esm2020/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +3 -3
- package/esm2020/lib/shared/components/palette/collection/write-collection-field.component.mjs +27 -5
- package/esm2020/lib/shared/components/palette/complex/read-complex-field.component.mjs +14 -12
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +25 -16
- package/esm2020/lib/shared/components/palette/dynamic-list/dynamic-list.pipe.mjs +2 -2
- package/esm2020/lib/shared/domain/http/http-error.model.mjs +7 -1
- package/esm2020/lib/shared/services/fields/fields.purger.mjs +4 -3
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +135 -61
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +132 -59
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +2 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/page-validation.service.d.ts +1 -1
- package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +4 -0
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts +1 -0
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/domain/http/http-error.model.d.ts +1 -0
- package/lib/shared/domain/http/http-error.model.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1241,6 +1241,11 @@ class HttpError {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
static from(response) {
|
|
1243
1243
|
const error = new HttpError();
|
|
1244
|
+
if (response?.status === 429) {
|
|
1245
|
+
error.error = HttpError.MESSAGE_ERROR_429;
|
|
1246
|
+
error.status = response.status;
|
|
1247
|
+
error.message = response.message;
|
|
1248
|
+
}
|
|
1244
1249
|
// Check that the HttpErrorResponse contains an "error" object before mapping the error properties
|
|
1245
1250
|
if (!!(response && response.error)) {
|
|
1246
1251
|
Object.keys(error).forEach((key) => {
|
|
@@ -1260,6 +1265,7 @@ class HttpError {
|
|
|
1260
1265
|
HttpError.DEFAULT_ERROR = 'Unknown error';
|
|
1261
1266
|
HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
|
|
1262
1267
|
HttpError.DEFAULT_STATUS = 500;
|
|
1268
|
+
HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
|
|
1263
1269
|
|
|
1264
1270
|
/**
|
|
1265
1271
|
* `Oauth2Service` and `AuthService` cannot be merged as it creates a cyclic dependency on `AuthService` through `HttpErrorService`.
|
|
@@ -5026,8 +5032,9 @@ class FieldsPurger {
|
|
|
5026
5032
|
}
|
|
5027
5033
|
}
|
|
5028
5034
|
else {
|
|
5029
|
-
// Delete the field
|
|
5030
|
-
|
|
5035
|
+
// Delete the field from formGroup
|
|
5036
|
+
const dataGroup = form.get('data');
|
|
5037
|
+
dataGroup.removeControl(field.id);
|
|
5031
5038
|
}
|
|
5032
5039
|
}
|
|
5033
5040
|
resetPage(form, wizardPage) {
|
|
@@ -8385,16 +8392,21 @@ class PageValidationService {
|
|
|
8385
8392
|
constructor(caseFieldService) {
|
|
8386
8393
|
this.caseFieldService = caseFieldService;
|
|
8387
8394
|
}
|
|
8388
|
-
|
|
8389
|
-
|
|
8395
|
+
getInvalidFields(page, editForm) {
|
|
8396
|
+
const failingCaseFields = [];
|
|
8397
|
+
page.case_fields
|
|
8390
8398
|
.filter(caseField => !this.caseFieldService.isReadOnly(caseField))
|
|
8391
8399
|
.filter(caseField => !this.isHidden(caseField, editForm))
|
|
8392
|
-
.
|
|
8400
|
+
.map(caseField => {
|
|
8393
8401
|
const theControl = FieldsUtils.isCaseFieldOfType(caseField, ['JudicialUser'])
|
|
8394
8402
|
? editForm.controls['data'].get(`${caseField.id}_judicialUserControl`)
|
|
8395
8403
|
: editForm.controls['data'].get(caseField.id);
|
|
8396
|
-
|
|
8404
|
+
if (!(this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl))) {
|
|
8405
|
+
failingCaseFields.push(caseField);
|
|
8406
|
+
}
|
|
8407
|
+
;
|
|
8397
8408
|
});
|
|
8409
|
+
return failingCaseFields;
|
|
8398
8410
|
}
|
|
8399
8411
|
isHidden(caseField, editForm, path) {
|
|
8400
8412
|
const formFields = editForm.getRawValue();
|
|
@@ -9719,7 +9731,8 @@ class CaseEditPageComponent {
|
|
|
9719
9731
|
return this.caseEdit.first();
|
|
9720
9732
|
}
|
|
9721
9733
|
currentPageIsNotValid() {
|
|
9722
|
-
|
|
9734
|
+
this.failingCaseFields = this.pageValidationService.getInvalidFields(this.currentPage, this.editForm);
|
|
9735
|
+
return this.failingCaseFields.length > 0 ||
|
|
9723
9736
|
(this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
|
|
9724
9737
|
}
|
|
9725
9738
|
isLinkedCasesJourney() {
|
|
@@ -9741,9 +9754,15 @@ class CaseEditPageComponent {
|
|
|
9741
9754
|
// Adding validation message to show it as Error Summary
|
|
9742
9755
|
generateErrorMessage(fields, container, path) {
|
|
9743
9756
|
const group = container || this.editForm.controls['data'];
|
|
9744
|
-
|
|
9745
|
-
|
|
9757
|
+
let validErrorFieldFound = false;
|
|
9758
|
+
let validationErrorAmount = this.validationErrors.length;
|
|
9759
|
+
const failingFields = fields.filter(casefield => !this.caseFieldService.isReadOnly(casefield))
|
|
9760
|
+
.filter(casefield => !this.pageValidationService.isHidden(casefield, this.editForm, path));
|
|
9761
|
+
// note that thougn these checks are on getinvalidfields they are needed for sub field checks
|
|
9762
|
+
failingFields
|
|
9746
9763
|
.forEach(casefield => {
|
|
9764
|
+
let errorPresent = true;
|
|
9765
|
+
validErrorFieldFound = true;
|
|
9747
9766
|
const fieldElement = FieldsUtils.isCaseFieldOfType(casefield, ['JudicialUser'])
|
|
9748
9767
|
? group.get(`${casefield.id}_judicialUserControl`)
|
|
9749
9768
|
: group.get(casefield.id);
|
|
@@ -9788,7 +9807,7 @@ class CaseEditPageComponent {
|
|
|
9788
9807
|
}
|
|
9789
9808
|
else if (fieldElement.invalid) {
|
|
9790
9809
|
if (casefield.isComplex()) {
|
|
9791
|
-
this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
|
|
9810
|
+
errorPresent = this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
|
|
9792
9811
|
}
|
|
9793
9812
|
else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
|
|
9794
9813
|
const fieldArray = fieldElement;
|
|
@@ -9796,7 +9815,7 @@ class CaseEditPageComponent {
|
|
|
9796
9815
|
id = `${fieldArray['component']['collItems'][0].prefix}`;
|
|
9797
9816
|
}
|
|
9798
9817
|
fieldArray.controls.forEach((c) => {
|
|
9799
|
-
this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
|
|
9818
|
+
errorPresent = this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
|
|
9800
9819
|
});
|
|
9801
9820
|
}
|
|
9802
9821
|
else if (FieldsUtils.isCaseFieldOfType(casefield, ['FlagLauncher'])) {
|
|
@@ -9811,8 +9830,29 @@ class CaseEditPageComponent {
|
|
|
9811
9830
|
}
|
|
9812
9831
|
}
|
|
9813
9832
|
}
|
|
9833
|
+
else {
|
|
9834
|
+
validErrorFieldFound = false;
|
|
9835
|
+
}
|
|
9836
|
+
if (!errorPresent && this.validationErrors.length === validationErrorAmount) {
|
|
9837
|
+
// if no error messages have been added in internal field despite parent field failing
|
|
9838
|
+
this.validationErrors.push({ id: casefield.id, message: `A field that is causing an error is ${casefield.id} but it is not producing a valid error message. Please ensure all details are correct` });
|
|
9839
|
+
}
|
|
9814
9840
|
});
|
|
9841
|
+
if (!validErrorFieldFound) {
|
|
9842
|
+
path ? this.validationErrors.push({ id: path, message: `There is an internal issue with ${path} fields. The field that is causing the error cannot be determined but there is an error present` })
|
|
9843
|
+
: this.validationErrors.push({ id: null, message: `The field that is causing the error cannot be determined but there is an error present` });
|
|
9844
|
+
}
|
|
9845
|
+
else if (this.validationErrors.length === validationErrorAmount) {
|
|
9846
|
+
// if no error messages have been generated
|
|
9847
|
+
if (path) {
|
|
9848
|
+
return false;
|
|
9849
|
+
}
|
|
9850
|
+
else {
|
|
9851
|
+
this.validationErrors.push({ id: null, message: `The field that is causing the error cannot be determined but there is an error present. Please fill in more of the form` });
|
|
9852
|
+
}
|
|
9853
|
+
}
|
|
9815
9854
|
CaseEditPageComponent.scrollToTop();
|
|
9855
|
+
return true;
|
|
9816
9856
|
}
|
|
9817
9857
|
navigateToErrorElement(elementId) {
|
|
9818
9858
|
/* istanbul ignore else */
|
|
@@ -9837,7 +9877,7 @@ class CaseEditPageComponent {
|
|
|
9837
9877
|
CaseEditPageComponent.scrollToTop();
|
|
9838
9878
|
}
|
|
9839
9879
|
else {
|
|
9840
|
-
this.generateErrorMessage(this.
|
|
9880
|
+
this.generateErrorMessage(this.failingCaseFields);
|
|
9841
9881
|
}
|
|
9842
9882
|
}
|
|
9843
9883
|
if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
|
|
@@ -12652,7 +12692,7 @@ function WriteCollectionFieldComponent_div_9_div_1_Template(rf, ctx) { if (rf &
|
|
|
12652
12692
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 14, ctx_r5.itemLabel(i_r7)));
|
|
12653
12693
|
i0.ɵɵadvance(3);
|
|
12654
12694
|
i0.ɵɵattributeInterpolate1("aria-label", "Remove ", ctx_r5.itemLabel(i_r7), "");
|
|
12655
|
-
i0.ɵɵproperty("disabled", ctx_r5.isNotAuthorisedToDelete(i_r7));
|
|
12695
|
+
i0.ɵɵproperty("disabled", ctx_r5.isNotAuthorisedToDelete(i_r7) || ctx_r5.allFieldsReadOnly);
|
|
12656
12696
|
i0.ɵɵadvance(1);
|
|
12657
12697
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 16, "Remove"));
|
|
12658
12698
|
i0.ɵɵadvance(2);
|
|
@@ -12677,7 +12717,7 @@ function WriteCollectionFieldComponent_button_10_Template(rf, ctx) { if (rf & 1)
|
|
|
12677
12717
|
i0.ɵɵelementEnd();
|
|
12678
12718
|
} if (rf & 2) {
|
|
12679
12719
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
12680
|
-
i0.ɵɵproperty("disabled", ctx_r2.isNotAuthorisedToCreate() || ctx_r2.isSearchFilter());
|
|
12720
|
+
i0.ɵɵproperty("disabled", ctx_r2.isNotAuthorisedToCreate() || ctx_r2.isSearchFilter() || ctx_r2.allFieldsReadOnly);
|
|
12681
12721
|
i0.ɵɵadvance(1);
|
|
12682
12722
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "Add new"));
|
|
12683
12723
|
} }
|
|
@@ -12690,6 +12730,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12690
12730
|
this.cdRef = cdRef;
|
|
12691
12731
|
this.caseFields = [];
|
|
12692
12732
|
this.collItems = [];
|
|
12733
|
+
this.allFieldsReadOnly = false;
|
|
12693
12734
|
}
|
|
12694
12735
|
ngOnInit() {
|
|
12695
12736
|
if (!this.isExpanded) { // meaning I am not rendered on the search/workbasket input filter
|
|
@@ -12707,6 +12748,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12707
12748
|
}
|
|
12708
12749
|
this.collItems[index] = { caseField, item, prefix, index, container };
|
|
12709
12750
|
});
|
|
12751
|
+
this.allFieldsReadOnly = this.checkComplexFieldReadOnly();
|
|
12710
12752
|
}
|
|
12711
12753
|
ngOnDestroy() {
|
|
12712
12754
|
if (this.profileSubscription) {
|
|
@@ -12940,6 +12982,26 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12940
12982
|
const id = this.getControlIdAt(index);
|
|
12941
12983
|
return !!id && !this.getCollectionPermission(this.caseField, 'allowDelete');
|
|
12942
12984
|
}
|
|
12985
|
+
checkComplexFieldReadOnly() {
|
|
12986
|
+
return this.checkComplexFieldsReadOnly(this.caseField);
|
|
12987
|
+
}
|
|
12988
|
+
checkFieldType(caseField) {
|
|
12989
|
+
return caseField?.field_type?.type === 'Collection'
|
|
12990
|
+
? caseField.field_type.collection_field_type?.complex_fields || []
|
|
12991
|
+
: caseField?.field_type?.complex_fields || [];
|
|
12992
|
+
}
|
|
12993
|
+
checkComplexFieldsReadOnly(caseField) {
|
|
12994
|
+
const children = this.checkFieldType(caseField);
|
|
12995
|
+
if (children.length === 0) {
|
|
12996
|
+
return caseField.display_context === 'READONLY';
|
|
12997
|
+
}
|
|
12998
|
+
return children.every((child) => {
|
|
12999
|
+
if (!['Collection', 'Complex'].includes(child.field_type.type)) {
|
|
13000
|
+
return child.display_context === 'READONLY';
|
|
13001
|
+
}
|
|
13002
|
+
return this.checkComplexFieldsReadOnly(child);
|
|
13003
|
+
});
|
|
13004
|
+
}
|
|
12943
13005
|
openModal(i) {
|
|
12944
13006
|
const dialogConfig = new MatDialogConfig();
|
|
12945
13007
|
dialogConfig.disableClose = true;
|
|
@@ -12999,7 +13061,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
12999
13061
|
i0.ɵɵadvance(3);
|
|
13000
13062
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
|
|
13001
13063
|
i0.ɵɵadvance(2);
|
|
13002
|
-
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
|
|
13064
|
+
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter() || ctx.allFieldsReadOnly);
|
|
13003
13065
|
i0.ɵɵadvance(1);
|
|
13004
13066
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 9, "Add new"));
|
|
13005
13067
|
i0.ɵɵadvance(2);
|
|
@@ -13011,7 +13073,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
13011
13073
|
} }, styles: [".collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.collection-indicator[_ngcontent-%COMP%]{border-left:solid 5px #b1b4b6}"] });
|
|
13012
13074
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
13013
13075
|
type: Component,
|
|
13014
|
-
args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text | rpxTranslate }}</span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
13076
|
+
args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter() || allFieldsReadOnly\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text | rpxTranslate }}</span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i) || allFieldsReadOnly\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter() || allFieldsReadOnly\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
13015
13077
|
}], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
|
|
13016
13078
|
type: Input
|
|
13017
13079
|
}], formGroup: [{
|
|
@@ -13056,17 +13118,19 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
|
|
|
13056
13118
|
this.context = PaletteContext.DEFAULT;
|
|
13057
13119
|
}
|
|
13058
13120
|
}
|
|
13059
|
-
this.caseField?.field_type
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
this.caseField.value[field.id].value.code
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13121
|
+
if (this.caseField?.field_type && this.caseField.field_type.complex_fields) {
|
|
13122
|
+
this.caseField?.field_type?.complex_fields?.forEach((field) => {
|
|
13123
|
+
if (field?.isDynamic()) {
|
|
13124
|
+
field.list_items = this.caseField.value[field.id]?.list_items;
|
|
13125
|
+
field.value = {
|
|
13126
|
+
list_items: field.list_items,
|
|
13127
|
+
value: this.caseField.value[field.id]?.value && this.caseField.value[field.id].value.code ?
|
|
13128
|
+
this.caseField.value[field.id].value.code :
|
|
13129
|
+
this.caseField.value[field.id]?.value
|
|
13130
|
+
};
|
|
13131
|
+
}
|
|
13132
|
+
});
|
|
13133
|
+
}
|
|
13070
13134
|
}
|
|
13071
13135
|
}
|
|
13072
13136
|
ReadComplexFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵReadComplexFieldComponent_BaseFactory; return function ReadComplexFieldComponent_Factory(t) { return (ɵReadComplexFieldComponent_BaseFactory || (ɵReadComplexFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadComplexFieldComponent)))(t || ReadComplexFieldComponent); }; }();
|
|
@@ -13529,23 +13593,31 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13529
13593
|
this.uploadedDocument = this.registerControl(new FormGroup(documentFormGroup), true);
|
|
13530
13594
|
}
|
|
13531
13595
|
getErrorMessage(error) {
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13596
|
+
switch (error.status) {
|
|
13597
|
+
case 0:
|
|
13598
|
+
case 502:
|
|
13599
|
+
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
|
|
13600
|
+
case 422:
|
|
13601
|
+
{
|
|
13602
|
+
let errorMsg = WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
13603
|
+
if (error?.error) {
|
|
13604
|
+
const fullError = error.error;
|
|
13605
|
+
const start = fullError.indexOf('{');
|
|
13606
|
+
if (start >= 0) {
|
|
13607
|
+
const json = fullError.substring(start, fullError.length - 1).split('<EOL>').join('');
|
|
13608
|
+
const obj = JSON.parse(json);
|
|
13609
|
+
if (obj?.error) {
|
|
13610
|
+
errorMsg = obj.error;
|
|
13611
|
+
}
|
|
13612
|
+
}
|
|
13613
|
+
}
|
|
13614
|
+
return errorMsg;
|
|
13545
13615
|
}
|
|
13546
|
-
|
|
13616
|
+
case 429:
|
|
13617
|
+
return error?.error;
|
|
13618
|
+
default:
|
|
13619
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
13547
13620
|
}
|
|
13548
|
-
return errorMsg;
|
|
13549
13621
|
}
|
|
13550
13622
|
buildDocumentUploadData(selectedFile) {
|
|
13551
13623
|
const documentUpload = new FormData();
|
|
@@ -13601,6 +13673,7 @@ WriteDocumentFieldComponent.UPLOAD_TIMESTAMP = 'upload_timestamp';
|
|
|
13601
13673
|
WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
13602
13674
|
WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
13603
13675
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
13676
|
+
WriteDocumentFieldComponent.ERROR_UPLOADING_FILE = 'Error Uploading File';
|
|
13604
13677
|
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(FileUploadStateService), i0.ɵɵdirectiveInject(JurisdictionService)); };
|
|
13605
13678
|
WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
13606
13679
|
i0.ɵɵviewQuery(_c0$Q, 5);
|
|
@@ -13663,7 +13736,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
13663
13736
|
|
|
13664
13737
|
class DynamicListPipe {
|
|
13665
13738
|
transform(value, items) {
|
|
13666
|
-
const item = items
|
|
13739
|
+
const item = items?.find(i => i.code === value);
|
|
13667
13740
|
return item ? item.label : DynamicListPipe.EMPTY;
|
|
13668
13741
|
}
|
|
13669
13742
|
}
|
|
@@ -21557,7 +21630,7 @@ CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised docum
|
|
|
21557
21630
|
CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
|
|
21558
21631
|
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
|
|
21559
21632
|
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
21560
|
-
CaseFileViewFolderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-upload-timestamp"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21633
|
+
CaseFileViewFolderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", "aria-label", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-upload-timestamp"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21561
21634
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
21562
21635
|
i0.ɵɵelement(2, "input", 2);
|
|
21563
21636
|
i0.ɵɵelementEnd()();
|
|
@@ -21578,7 +21651,7 @@ CaseFileViewFolderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
21578
21651
|
} }, dependencies: [i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.FormGroupDirective, i3.FormControlName, i7.CdkNestedTreeNode, i7.CdkTreeNodeDef, i7.CdkTreeNodeToggle, i7.CdkTree, i7.CdkTreeNodeOutlet, CaseFileViewFolderSortComponent, CaseFileViewFolderDocumentActionsComponent, i4.DatePipe], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #C9C9C9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat right #FFF;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#EEE}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#CCC}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
|
|
21579
21652
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
21580
21653
|
type: Component,
|
|
21581
|
-
args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | date:\"dd MMM YYYY\"}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #FFF;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#EEE}.document-tree-container::-webkit-scrollbar-thumb{background:#CCC}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
|
|
21654
|
+
args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\"\n aria-label=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | date:\"dd MMM YYYY\"}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #FFF;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#EEE}.document-tree-container::-webkit-scrollbar-thumb{background:#CCC}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
|
|
21582
21655
|
}], function () { return [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
|
|
21583
21656
|
type: Input
|
|
21584
21657
|
}], allowMoving: [{
|
|
@@ -29734,29 +29807,29 @@ function CaseHistoryComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
29734
29807
|
i0.ɵɵadvance(6);
|
|
29735
29808
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 19, "Date"));
|
|
29736
29809
|
i0.ɵɵadvance(3);
|
|
29737
|
-
i0.ɵɵtextInterpolate(i0.ɵɵ
|
|
29810
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(18, 21, ctx_r0.caseHistory.event.timestamp, "local"));
|
|
29738
29811
|
i0.ɵɵadvance(4);
|
|
29739
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22,
|
|
29812
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 24, "Author"));
|
|
29740
29813
|
i0.ɵɵadvance(3);
|
|
29741
|
-
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25,
|
|
29814
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25, 26, ctx_r0.caseHistory.event.user_first_name), " ", i0.ɵɵpipeBind1(26, 28, ctx_r0.caseHistory.event.user_last_name), "");
|
|
29742
29815
|
i0.ɵɵadvance(5);
|
|
29743
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30,
|
|
29816
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 30, "End state"));
|
|
29744
29817
|
i0.ɵɵadvance(3);
|
|
29745
29818
|
i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.state_name);
|
|
29746
29819
|
i0.ɵɵadvance(3);
|
|
29747
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36,
|
|
29820
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 32, "Event"));
|
|
29748
29821
|
i0.ɵɵadvance(3);
|
|
29749
29822
|
i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.event_name);
|
|
29750
29823
|
i0.ɵɵadvance(3);
|
|
29751
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42,
|
|
29824
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42, 34, "Summary"));
|
|
29752
29825
|
i0.ɵɵadvance(3);
|
|
29753
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45,
|
|
29826
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 36, ctx_r0.caseHistory.event.summary));
|
|
29754
29827
|
i0.ɵɵadvance(4);
|
|
29755
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49,
|
|
29828
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 38, "Comment"));
|
|
29756
29829
|
i0.ɵɵadvance(3);
|
|
29757
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52,
|
|
29830
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52, 40, ctx_r0.caseHistory.event.comment));
|
|
29758
29831
|
i0.ɵɵadvance(4);
|
|
29759
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56,
|
|
29832
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56, 42, "Case Details"));
|
|
29760
29833
|
i0.ɵɵadvance(2);
|
|
29761
29834
|
i0.ɵɵproperty("ngForOf", ctx_r0.tabs);
|
|
29762
29835
|
} }
|
|
@@ -29810,13 +29883,13 @@ CaseHistoryComponent.PARAM_EVENT_ID = 'eid';
|
|
|
29810
29883
|
CaseHistoryComponent.ERROR_MESSAGE = 'No case history to show';
|
|
29811
29884
|
CaseHistoryComponent.ɵfac = function CaseHistoryComponent_Factory(t) { return new (t || CaseHistoryComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(CaseHistoryService)); };
|
|
29812
29885
|
CaseHistoryComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseHistoryComponent, selectors: [["ccd-case-history"]], inputs: { event: "event" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "grid-row"], [1, "column-full"], [3, "caseDetails"], [1, "heading-h2"], ["aria-describedby", "event details table", 1, "EventDetails"], [4, "ngFor", "ngForOf"], [1, "caseHistorySection"], [1, "heading-h3"], [1, "CaseHistory", 3, "id"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-label-header"], [1, "case-viewer-label"], [3, "caseField", "caseReference"], [1, "compound-field"], ["colspan", "2"]], template: function CaseHistoryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
29813
|
-
i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58,
|
|
29886
|
+
i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58, 44, "div", 0);
|
|
29814
29887
|
} if (rf & 2) {
|
|
29815
29888
|
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
29816
29889
|
} }, styles: [".CaseHistory[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .CaseHistory[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:none}.caseHistorySection[_ngcontent-%COMP%]{margin-top:40px}.EventDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .EventDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:none}th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.case-viewer-controls[_ngcontent-%COMP%]{margin-top:47px;margin-bottom:20px}ccd-case-header[_ngcontent-%COMP%]{float:left;margin-right:10px}ccd-event-trigger[_ngcontent-%COMP%]{float:right}.case-viewer-label[_ngcontent-%COMP%]{min-width:300px;white-space:normal}"] });
|
|
29817
29890
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryComponent, [{
|
|
29818
29891
|
type: Component,
|
|
29819
|
-
args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n </th>\n <td>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td colspan=\"2\">\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}\n"] }]
|
|
29892
|
+
args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate : 'local'}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n </th>\n <td>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td colspan=\"2\">\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}\n"] }]
|
|
29820
29893
|
}], function () { return [{ type: i1$1.ActivatedRoute }, { type: AlertService }, { type: OrderService }, { type: CaseNotifier }, { type: CaseHistoryService }]; }, { event: [{
|
|
29821
29894
|
type: Input
|
|
29822
29895
|
}] }); })();
|
|
@@ -30890,7 +30963,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_Tem
|
|
|
30890
30963
|
const tab_r20 = i0.ɵɵnextContext().$implicit;
|
|
30891
30964
|
const ctx_r22 = i0.ɵɵnextContext(2);
|
|
30892
30965
|
i0.ɵɵclassMap(tab_r20.id);
|
|
30893
|
-
i0.ɵɵattribute("aria-
|
|
30966
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(1, 4, "case viewer table"));
|
|
30894
30967
|
i0.ɵɵadvance(3);
|
|
30895
30968
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(4, 6, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(5, 12, tab_r20), ctx_r22.formGroup.controls["data"])));
|
|
30896
30969
|
} }
|
|
@@ -31355,7 +31428,7 @@ CaseFullAccessViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
31355
31428
|
} }, styles: ["th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0}.case-viewer-controls[_ngcontent-%COMP%]{margin-top:47px;margin-bottom:20px}ccd-case-header[_ngcontent-%COMP%]{float:left;margin-right:10px}ccd-event-trigger[_ngcontent-%COMP%]{float:right}.case-viewer-label[_ngcontent-%COMP%]{min-width:300px;white-space:normal}.markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:0}"] });
|
|
31356
31429
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
31357
31430
|
type: Component,
|
|
31358
|
-
args: [{ selector: 'ccd-case-full-access-view', template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\" (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-
|
|
31431
|
+
args: [{ selector: 'ccd-case-full-access-view', template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\" (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-field-label\" *ngIf=\"!isFieldToHaveNoLabel(field)\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <th [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </th>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n </mat-tab-group>\n <router-outlet *ngIf=\"(prependedTabs && prependedTabs.length) || (appendedTabs && appendedTabs.length)\"></router-outlet>\n </ng-container>\n </div>\n</div>\n", styles: ["th{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}\n"] }]
|
|
31359
31432
|
}], function () { return [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatLegacyDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i4.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }]; }, { hasPrint: [{
|
|
31360
31433
|
type: Input
|
|
31361
31434
|
}], hasEventSelector: [{
|