@hmcts/ccd-case-ui-toolkit 7.0.23 → 7.0.24-disable-butttons-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-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 +12 -5
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +25 -16
- 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 +92 -35
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +91 -35
- 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 +2 -0
- package/lib/shared/components/palette/collection/write-collection-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
|
} }
|
|
@@ -12707,6 +12747,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12707
12747
|
}
|
|
12708
12748
|
this.collItems[index] = { caseField, item, prefix, index, container };
|
|
12709
12749
|
});
|
|
12750
|
+
this.allFieldsReadOnly = this.checkComplexFieldReadOnly();
|
|
12710
12751
|
}
|
|
12711
12752
|
ngOnDestroy() {
|
|
12712
12753
|
if (this.profileSubscription) {
|
|
@@ -12940,6 +12981,12 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12940
12981
|
const id = this.getControlIdAt(index);
|
|
12941
12982
|
return !!id && !this.getCollectionPermission(this.caseField, 'allowDelete');
|
|
12942
12983
|
}
|
|
12984
|
+
checkComplexFieldReadOnly() {
|
|
12985
|
+
return this.caseField?.field_type?.collection_field_type?.complex_fields?.every((complexField) => {
|
|
12986
|
+
const complexFieldContext = complexField.display_context;
|
|
12987
|
+
return complexFieldContext === 'READONLY';
|
|
12988
|
+
}) ?? false;
|
|
12989
|
+
}
|
|
12943
12990
|
openModal(i) {
|
|
12944
12991
|
const dialogConfig = new MatDialogConfig();
|
|
12945
12992
|
dialogConfig.disableClose = true;
|
|
@@ -12999,7 +13046,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
12999
13046
|
i0.ɵɵadvance(3);
|
|
13000
13047
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
|
|
13001
13048
|
i0.ɵɵadvance(2);
|
|
13002
|
-
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
|
|
13049
|
+
i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter() || ctx.allFieldsReadOnly);
|
|
13003
13050
|
i0.ɵɵadvance(1);
|
|
13004
13051
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 9, "Add new"));
|
|
13005
13052
|
i0.ɵɵadvance(2);
|
|
@@ -13011,7 +13058,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
13011
13058
|
} }, 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
13059
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
13013
13060
|
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"] }]
|
|
13061
|
+
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
13062
|
}], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
|
|
13016
13063
|
type: Input
|
|
13017
13064
|
}], formGroup: [{
|
|
@@ -13531,23 +13578,31 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13531
13578
|
this.uploadedDocument = this.registerControl(new FormGroup(documentFormGroup), true);
|
|
13532
13579
|
}
|
|
13533
13580
|
getErrorMessage(error) {
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13581
|
+
switch (error.status) {
|
|
13582
|
+
case 0:
|
|
13583
|
+
case 502:
|
|
13584
|
+
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
|
|
13585
|
+
case 422:
|
|
13586
|
+
{
|
|
13587
|
+
let errorMsg = WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
13588
|
+
if (error?.error) {
|
|
13589
|
+
const fullError = error.error;
|
|
13590
|
+
const start = fullError.indexOf('{');
|
|
13591
|
+
if (start >= 0) {
|
|
13592
|
+
const json = fullError.substring(start, fullError.length - 1).split('<EOL>').join('');
|
|
13593
|
+
const obj = JSON.parse(json);
|
|
13594
|
+
if (obj?.error) {
|
|
13595
|
+
errorMsg = obj.error;
|
|
13596
|
+
}
|
|
13597
|
+
}
|
|
13598
|
+
}
|
|
13599
|
+
return errorMsg;
|
|
13547
13600
|
}
|
|
13548
|
-
|
|
13601
|
+
case 429:
|
|
13602
|
+
return error?.error;
|
|
13603
|
+
default:
|
|
13604
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
13549
13605
|
}
|
|
13550
|
-
return errorMsg;
|
|
13551
13606
|
}
|
|
13552
13607
|
buildDocumentUploadData(selectedFile) {
|
|
13553
13608
|
const documentUpload = new FormData();
|
|
@@ -13603,6 +13658,7 @@ WriteDocumentFieldComponent.UPLOAD_TIMESTAMP = 'upload_timestamp';
|
|
|
13603
13658
|
WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
13604
13659
|
WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
13605
13660
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
13661
|
+
WriteDocumentFieldComponent.ERROR_UPLOADING_FILE = 'Error Uploading File';
|
|
13606
13662
|
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)); };
|
|
13607
13663
|
WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
13608
13664
|
i0.ɵɵviewQuery(_c0$Q, 5);
|
|
@@ -21559,7 +21615,7 @@ CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised docum
|
|
|
21559
21615
|
CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
|
|
21560
21616
|
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
|
|
21561
21617
|
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)); };
|
|
21562
|
-
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) {
|
|
21618
|
+
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) {
|
|
21563
21619
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
21564
21620
|
i0.ɵɵelement(2, "input", 2);
|
|
21565
21621
|
i0.ɵɵelementEnd()();
|
|
@@ -21580,7 +21636,7 @@ CaseFileViewFolderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
21580
21636
|
} }, 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}"] });
|
|
21581
21637
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
21582
21638
|
type: Component,
|
|
21583
|
-
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"] }]
|
|
21639
|
+
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"] }]
|
|
21584
21640
|
}], function () { return [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
|
|
21585
21641
|
type: Input
|
|
21586
21642
|
}], allowMoving: [{
|
|
@@ -30892,7 +30948,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_Tem
|
|
|
30892
30948
|
const tab_r20 = i0.ɵɵnextContext().$implicit;
|
|
30893
30949
|
const ctx_r22 = i0.ɵɵnextContext(2);
|
|
30894
30950
|
i0.ɵɵclassMap(tab_r20.id);
|
|
30895
|
-
i0.ɵɵattribute("aria-
|
|
30951
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(1, 4, "case viewer table"));
|
|
30896
30952
|
i0.ɵɵadvance(3);
|
|
30897
30953
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(4, 6, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(5, 12, tab_r20), ctx_r22.formGroup.controls["data"])));
|
|
30898
30954
|
} }
|
|
@@ -31357,7 +31413,7 @@ CaseFullAccessViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
31357
31413
|
} }, 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}"] });
|
|
31358
31414
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
31359
31415
|
type: Component,
|
|
31360
|
-
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-
|
|
31416
|
+
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"] }]
|
|
31361
31417
|
}], 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: [{
|
|
31362
31418
|
type: Input
|
|
31363
31419
|
}], hasEventSelector: [{
|