@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.
Files changed (28) hide show
  1. package/esm2020/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +35 -7
  2. package/esm2020/lib/shared/components/case-editor/services/page-validation.service.mjs +10 -5
  3. package/esm2020/lib/shared/components/case-history/case-history.component.mjs +13 -13
  4. package/esm2020/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +3 -3
  5. package/esm2020/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +3 -3
  6. package/esm2020/lib/shared/components/palette/collection/write-collection-field.component.mjs +27 -5
  7. package/esm2020/lib/shared/components/palette/complex/read-complex-field.component.mjs +14 -12
  8. package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +25 -16
  9. package/esm2020/lib/shared/components/palette/dynamic-list/dynamic-list.pipe.mjs +2 -2
  10. package/esm2020/lib/shared/domain/http/http-error.model.mjs +7 -1
  11. package/esm2020/lib/shared/services/fields/fields.purger.mjs +4 -3
  12. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +135 -61
  13. package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  14. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +132 -59
  15. package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  16. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +2 -1
  17. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  18. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +1 -1
  19. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  20. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +4 -0
  21. package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
  22. package/lib/shared/components/palette/complex/read-complex-field.component.d.ts.map +1 -1
  23. package/lib/shared/components/palette/document/write-document-field.component.d.ts +1 -0
  24. package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
  25. package/lib/shared/domain/http/http-error.model.d.ts +1 -0
  26. package/lib/shared/domain/http/http-error.model.d.ts.map +1 -1
  27. package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
  28. package/package.json +1 -1
@@ -1333,6 +1333,11 @@ class HttpError {
1333
1333
  }
1334
1334
  static from(response) {
1335
1335
  const error = new HttpError();
1336
+ if ((response === null || response === void 0 ? void 0 : response.status) === 429) {
1337
+ error.error = HttpError.MESSAGE_ERROR_429;
1338
+ error.status = response.status;
1339
+ error.message = response.message;
1340
+ }
1336
1341
  // Check that the HttpErrorResponse contains an "error" object before mapping the error properties
1337
1342
  if (!!(response && response.error)) {
1338
1343
  Object.keys(error).forEach((key) => {
@@ -1352,6 +1357,7 @@ class HttpError {
1352
1357
  HttpError.DEFAULT_ERROR = 'Unknown error';
1353
1358
  HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
1354
1359
  HttpError.DEFAULT_STATUS = 500;
1360
+ HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
1355
1361
 
1356
1362
  class AbstractAppConfig {
1357
1363
  /**
@@ -5034,8 +5040,9 @@ class FieldsPurger {
5034
5040
  }
5035
5041
  }
5036
5042
  else {
5037
- // Delete the field value
5038
- this.deleteFieldValue(form.get('data'), field);
5043
+ // Delete the field from formGroup
5044
+ const dataGroup = form.get('data');
5045
+ dataGroup.removeControl(field.id);
5039
5046
  }
5040
5047
  }
5041
5048
  resetPage(form, wizardPage) {
@@ -8678,16 +8685,21 @@ class PageValidationService {
8678
8685
  constructor(caseFieldService) {
8679
8686
  this.caseFieldService = caseFieldService;
8680
8687
  }
8681
- isPageValid(page, editForm) {
8682
- return page.case_fields
8688
+ getInvalidFields(page, editForm) {
8689
+ const failingCaseFields = [];
8690
+ page.case_fields
8683
8691
  .filter(caseField => !this.caseFieldService.isReadOnly(caseField))
8684
8692
  .filter(caseField => !this.isHidden(caseField, editForm))
8685
- .every(caseField => {
8693
+ .map(caseField => {
8686
8694
  const theControl = FieldsUtils.isCaseFieldOfType(caseField, ['JudicialUser'])
8687
8695
  ? editForm.controls['data'].get(`${caseField.id}_judicialUserControl`)
8688
8696
  : editForm.controls['data'].get(caseField.id);
8689
- return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl);
8697
+ if (!(this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl))) {
8698
+ failingCaseFields.push(caseField);
8699
+ }
8700
+ ;
8690
8701
  });
8702
+ return failingCaseFields;
8691
8703
  }
8692
8704
  isHidden(caseField, editForm, path) {
8693
8705
  const formFields = editForm.getRawValue();
@@ -10112,7 +10124,8 @@ class CaseEditPageComponent {
10112
10124
  return this.caseEdit.first();
10113
10125
  }
10114
10126
  currentPageIsNotValid() {
10115
- return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
10127
+ this.failingCaseFields = this.pageValidationService.getInvalidFields(this.currentPage, this.editForm);
10128
+ return this.failingCaseFields.length > 0 ||
10116
10129
  (this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
10117
10130
  }
10118
10131
  isLinkedCasesJourney() {
@@ -10134,9 +10147,15 @@ class CaseEditPageComponent {
10134
10147
  // Adding validation message to show it as Error Summary
10135
10148
  generateErrorMessage(fields, container, path) {
10136
10149
  const group = container || this.editForm.controls['data'];
10137
- fields.filter(casefield => !this.caseFieldService.isReadOnly(casefield))
10138
- .filter(casefield => !this.pageValidationService.isHidden(casefield, this.editForm, path))
10150
+ let validErrorFieldFound = false;
10151
+ let validationErrorAmount = this.validationErrors.length;
10152
+ const failingFields = fields.filter(casefield => !this.caseFieldService.isReadOnly(casefield))
10153
+ .filter(casefield => !this.pageValidationService.isHidden(casefield, this.editForm, path));
10154
+ // note that thougn these checks are on getinvalidfields they are needed for sub field checks
10155
+ failingFields
10139
10156
  .forEach(casefield => {
10157
+ let errorPresent = true;
10158
+ validErrorFieldFound = true;
10140
10159
  const fieldElement = FieldsUtils.isCaseFieldOfType(casefield, ['JudicialUser'])
10141
10160
  ? group.get(`${casefield.id}_judicialUserControl`)
10142
10161
  : group.get(casefield.id);
@@ -10181,7 +10200,7 @@ class CaseEditPageComponent {
10181
10200
  }
10182
10201
  else if (fieldElement.invalid) {
10183
10202
  if (casefield.isComplex()) {
10184
- this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
10203
+ errorPresent = this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
10185
10204
  }
10186
10205
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
10187
10206
  const fieldArray = fieldElement;
@@ -10189,7 +10208,7 @@ class CaseEditPageComponent {
10189
10208
  id = `${fieldArray['component']['collItems'][0].prefix}`;
10190
10209
  }
10191
10210
  fieldArray.controls.forEach((c) => {
10192
- this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
10211
+ errorPresent = this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
10193
10212
  });
10194
10213
  }
10195
10214
  else if (FieldsUtils.isCaseFieldOfType(casefield, ['FlagLauncher'])) {
@@ -10204,8 +10223,29 @@ class CaseEditPageComponent {
10204
10223
  }
10205
10224
  }
10206
10225
  }
10226
+ else {
10227
+ validErrorFieldFound = false;
10228
+ }
10229
+ if (!errorPresent && this.validationErrors.length === validationErrorAmount) {
10230
+ // if no error messages have been added in internal field despite parent field failing
10231
+ 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` });
10232
+ }
10207
10233
  });
10234
+ if (!validErrorFieldFound) {
10235
+ 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` })
10236
+ : this.validationErrors.push({ id: null, message: `The field that is causing the error cannot be determined but there is an error present` });
10237
+ }
10238
+ else if (this.validationErrors.length === validationErrorAmount) {
10239
+ // if no error messages have been generated
10240
+ if (path) {
10241
+ return false;
10242
+ }
10243
+ else {
10244
+ 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` });
10245
+ }
10246
+ }
10208
10247
  CaseEditPageComponent.scrollToTop();
10248
+ return true;
10209
10249
  }
10210
10250
  navigateToErrorElement(elementId) {
10211
10251
  /* istanbul ignore else */
@@ -10230,7 +10270,7 @@ class CaseEditPageComponent {
10230
10270
  CaseEditPageComponent.scrollToTop();
10231
10271
  }
10232
10272
  else {
10233
- this.generateErrorMessage(this.currentPage.case_fields);
10273
+ this.generateErrorMessage(this.failingCaseFields);
10234
10274
  }
10235
10275
  }
10236
10276
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
@@ -13040,7 +13080,7 @@ function WriteCollectionFieldComponent_div_9_div_1_Template(rf, ctx) {
13040
13080
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 14, ctx_r5.itemLabel(i_r7)));
13041
13081
  i0.ɵɵadvance(3);
13042
13082
  i0.ɵɵattributeInterpolate1("aria-label", "Remove ", ctx_r5.itemLabel(i_r7), "");
13043
- i0.ɵɵproperty("disabled", ctx_r5.isNotAuthorisedToDelete(i_r7));
13083
+ i0.ɵɵproperty("disabled", ctx_r5.isNotAuthorisedToDelete(i_r7) || ctx_r5.allFieldsReadOnly);
13044
13084
  i0.ɵɵadvance(1);
13045
13085
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 16, "Remove"));
13046
13086
  i0.ɵɵadvance(2);
@@ -13071,7 +13111,7 @@ function WriteCollectionFieldComponent_button_10_Template(rf, ctx) {
13071
13111
  }
13072
13112
  if (rf & 2) {
13073
13113
  const ctx_r2 = i0.ɵɵnextContext();
13074
- i0.ɵɵproperty("disabled", ctx_r2.isNotAuthorisedToCreate() || ctx_r2.isSearchFilter());
13114
+ i0.ɵɵproperty("disabled", ctx_r2.isNotAuthorisedToCreate() || ctx_r2.isSearchFilter() || ctx_r2.allFieldsReadOnly);
13075
13115
  i0.ɵɵadvance(1);
13076
13116
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "Add new"));
13077
13117
  }
@@ -13085,6 +13125,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
13085
13125
  this.cdRef = cdRef;
13086
13126
  this.caseFields = [];
13087
13127
  this.collItems = [];
13128
+ this.allFieldsReadOnly = false;
13088
13129
  }
13089
13130
  ngOnInit() {
13090
13131
  if (!this.isExpanded) { // meaning I am not rendered on the search/workbasket input filter
@@ -13102,6 +13143,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
13102
13143
  }
13103
13144
  this.collItems[index] = { caseField, item, prefix, index, container };
13104
13145
  });
13146
+ this.allFieldsReadOnly = this.checkComplexFieldReadOnly();
13105
13147
  }
13106
13148
  ngOnDestroy() {
13107
13149
  if (this.profileSubscription) {
@@ -13337,6 +13379,27 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
13337
13379
  const id = this.getControlIdAt(index);
13338
13380
  return !!id && !this.getCollectionPermission(this.caseField, 'allowDelete');
13339
13381
  }
13382
+ checkComplexFieldReadOnly() {
13383
+ return this.checkComplexFieldsReadOnly(this.caseField);
13384
+ }
13385
+ checkFieldType(caseField) {
13386
+ var _a, _b, _c;
13387
+ return ((_a = caseField === null || caseField === void 0 ? void 0 : caseField.field_type) === null || _a === void 0 ? void 0 : _a.type) === 'Collection'
13388
+ ? ((_b = caseField.field_type.collection_field_type) === null || _b === void 0 ? void 0 : _b.complex_fields) || []
13389
+ : ((_c = caseField === null || caseField === void 0 ? void 0 : caseField.field_type) === null || _c === void 0 ? void 0 : _c.complex_fields) || [];
13390
+ }
13391
+ checkComplexFieldsReadOnly(caseField) {
13392
+ const children = this.checkFieldType(caseField);
13393
+ if (children.length === 0) {
13394
+ return caseField.display_context === 'READONLY';
13395
+ }
13396
+ return children.every((child) => {
13397
+ if (!['Collection', 'Complex'].includes(child.field_type.type)) {
13398
+ return child.display_context === 'READONLY';
13399
+ }
13400
+ return this.checkComplexFieldsReadOnly(child);
13401
+ });
13402
+ }
13340
13403
  openModal(i) {
13341
13404
  const dialogConfig = new MatDialogConfig();
13342
13405
  dialogConfig.disableClose = true;
@@ -13401,7 +13464,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13401
13464
  i0.ɵɵadvance(3);
13402
13465
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, ctx.caseField), " ");
13403
13466
  i0.ɵɵadvance(2);
13404
- i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter());
13467
+ i0.ɵɵproperty("disabled", ctx.isNotAuthorisedToCreate() || ctx.isSearchFilter() || ctx.allFieldsReadOnly);
13405
13468
  i0.ɵɵadvance(1);
13406
13469
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 9, "Add new"));
13407
13470
  i0.ɵɵadvance(2);
@@ -13415,7 +13478,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
13415
13478
  (function () {
13416
13479
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
13417
13480
  type: Component,
13418
- 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"] }]
13481
+ 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"] }]
13419
13482
  }], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
13420
13483
  type: Input
13421
13484
  }], formGroup: [{
@@ -13460,7 +13523,7 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
13460
13523
  this.paletteContext = PaletteContext;
13461
13524
  }
13462
13525
  ngOnInit() {
13463
- var _a, _b, _c;
13526
+ var _a, _b, _c, _d;
13464
13527
  super.ngOnInit();
13465
13528
  if (this.caseField.display_context_parameter) {
13466
13529
  this.context = PaletteContext.TABLE_VIEW;
@@ -13471,18 +13534,20 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
13471
13534
  this.context = PaletteContext.DEFAULT;
13472
13535
  }
13473
13536
  }
13474
- (_c = (_b = (_a = this.caseField) === null || _a === void 0 ? void 0 : _a.field_type) === null || _b === void 0 ? void 0 : _b.complex_fields) === null || _c === void 0 ? void 0 : _c.forEach((field) => {
13475
- var _a, _b, _c;
13476
- if (field === null || field === void 0 ? void 0 : field.isDynamic()) {
13477
- field.list_items = (_a = this.caseField.value[field.id]) === null || _a === void 0 ? void 0 : _a.list_items;
13478
- field.value = {
13479
- list_items: field.list_items,
13480
- value: ((_b = this.caseField.value[field.id]) === null || _b === void 0 ? void 0 : _b.value) && this.caseField.value[field.id].value.code ?
13481
- this.caseField.value[field.id].value.code :
13482
- (_c = this.caseField.value[field.id]) === null || _c === void 0 ? void 0 : _c.value
13483
- };
13484
- }
13485
- });
13537
+ if (((_a = this.caseField) === null || _a === void 0 ? void 0 : _a.field_type) && this.caseField.field_type.complex_fields) {
13538
+ (_d = (_c = (_b = this.caseField) === null || _b === void 0 ? void 0 : _b.field_type) === null || _c === void 0 ? void 0 : _c.complex_fields) === null || _d === void 0 ? void 0 : _d.forEach((field) => {
13539
+ var _a, _b, _c;
13540
+ if (field === null || field === void 0 ? void 0 : field.isDynamic()) {
13541
+ field.list_items = (_a = this.caseField.value[field.id]) === null || _a === void 0 ? void 0 : _a.list_items;
13542
+ field.value = {
13543
+ list_items: field.list_items,
13544
+ value: ((_b = this.caseField.value[field.id]) === null || _b === void 0 ? void 0 : _b.value) && this.caseField.value[field.id].value.code ?
13545
+ this.caseField.value[field.id].value.code :
13546
+ (_c = this.caseField.value[field.id]) === null || _c === void 0 ? void 0 : _c.value
13547
+ };
13548
+ }
13549
+ });
13550
+ }
13486
13551
  }
13487
13552
  }
13488
13553
  ReadComplexFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵReadComplexFieldComponent_BaseFactory; return function ReadComplexFieldComponent_Factory(t) { return (ɵReadComplexFieldComponent_BaseFactory || (ɵReadComplexFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadComplexFieldComponent)))(t || ReadComplexFieldComponent); }; }();
@@ -14253,23 +14318,31 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14253
14318
  this.uploadedDocument = this.registerControl(new FormGroup(documentFormGroup), true);
14254
14319
  }
14255
14320
  getErrorMessage(error) {
14256
- // Document Management unavailable
14257
- if (0 === error.status || 502 === error.status) {
14258
- return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
14259
- }
14260
- let errorMsg = 'Error uploading file';
14261
- if (error === null || error === void 0 ? void 0 : error.error) {
14262
- const fullError = error.error;
14263
- const start = fullError.indexOf('{');
14264
- if (start >= 0) {
14265
- const json = fullError.substring(start, fullError.length - 1).split('<EOL>').join('');
14266
- const obj = JSON.parse(json);
14267
- if (obj === null || obj === void 0 ? void 0 : obj.error) {
14268
- errorMsg = obj.error;
14321
+ switch (error.status) {
14322
+ case 0:
14323
+ case 502:
14324
+ return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
14325
+ case 422:
14326
+ {
14327
+ let errorMsg = WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
14328
+ if (error === null || error === void 0 ? void 0 : error.error) {
14329
+ const fullError = error.error;
14330
+ const start = fullError.indexOf('{');
14331
+ if (start >= 0) {
14332
+ const json = fullError.substring(start, fullError.length - 1).split('<EOL>').join('');
14333
+ const obj = JSON.parse(json);
14334
+ if (obj === null || obj === void 0 ? void 0 : obj.error) {
14335
+ errorMsg = obj.error;
14336
+ }
14337
+ }
14338
+ }
14339
+ return errorMsg;
14269
14340
  }
14270
- }
14341
+ case 429:
14342
+ return error === null || error === void 0 ? void 0 : error.error;
14343
+ default:
14344
+ return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
14271
14345
  }
14272
- return errorMsg;
14273
14346
  }
14274
14347
  buildDocumentUploadData(selectedFile) {
14275
14348
  const documentUpload = new FormData();
@@ -14325,6 +14398,7 @@ WriteDocumentFieldComponent.UPLOAD_TIMESTAMP = 'upload_timestamp';
14325
14398
  WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
14326
14399
  WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
14327
14400
  WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
14401
+ WriteDocumentFieldComponent.ERROR_UPLOADING_FILE = 'Error Uploading File';
14328
14402
  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)); };
14329
14403
  WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14330
14404
  if (rf & 1) {
@@ -14395,7 +14469,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
14395
14469
 
14396
14470
  class DynamicListPipe {
14397
14471
  transform(value, items) {
14398
- const item = items.find(i => i.code === value);
14472
+ const item = items === null || items === void 0 ? void 0 : items.find(i => i.code === value);
14399
14473
  return item ? item.label : DynamicListPipe.EMPTY;
14400
14474
  }
14401
14475
  }
@@ -23227,7 +23301,7 @@ CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised docum
23227
23301
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
23228
23302
  CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
23229
23303
  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)); };
23230
- 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) {
23304
+ 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) {
23231
23305
  if (rf & 1) {
23232
23306
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
23233
23307
  i0.ɵɵelement(2, "input", 2);
@@ -23252,7 +23326,7 @@ CaseFileViewFolderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
23252
23326
  (function () {
23253
23327
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
23254
23328
  type: Component,
23255
- 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"] }]
23329
+ 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"] }]
23256
23330
  }], function () { return [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
23257
23331
  type: Input
23258
23332
  }], allowMoving: [{
@@ -32226,29 +32300,29 @@ function CaseHistoryComponent_div_0_Template(rf, ctx) {
32226
32300
  i0.ɵɵadvance(6);
32227
32301
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 19, "Date"));
32228
32302
  i0.ɵɵadvance(3);
32229
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 21, ctx_r0.caseHistory.event.timestamp));
32303
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(18, 21, ctx_r0.caseHistory.event.timestamp, "local"));
32230
32304
  i0.ɵɵadvance(4);
32231
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 23, "Author"));
32305
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 24, "Author"));
32232
32306
  i0.ɵɵadvance(3);
32233
- i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25, 25, ctx_r0.caseHistory.event.user_first_name), " ", i0.ɵɵpipeBind1(26, 27, ctx_r0.caseHistory.event.user_last_name), "");
32307
+ i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25, 26, ctx_r0.caseHistory.event.user_first_name), " ", i0.ɵɵpipeBind1(26, 28, ctx_r0.caseHistory.event.user_last_name), "");
32234
32308
  i0.ɵɵadvance(5);
32235
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 29, "End state"));
32309
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 30, "End state"));
32236
32310
  i0.ɵɵadvance(3);
32237
32311
  i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.state_name);
32238
32312
  i0.ɵɵadvance(3);
32239
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 31, "Event"));
32313
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 32, "Event"));
32240
32314
  i0.ɵɵadvance(3);
32241
32315
  i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.event_name);
32242
32316
  i0.ɵɵadvance(3);
32243
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42, 33, "Summary"));
32317
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42, 34, "Summary"));
32244
32318
  i0.ɵɵadvance(3);
32245
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 35, ctx_r0.caseHistory.event.summary));
32319
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 36, ctx_r0.caseHistory.event.summary));
32246
32320
  i0.ɵɵadvance(4);
32247
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 37, "Comment"));
32321
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 38, "Comment"));
32248
32322
  i0.ɵɵadvance(3);
32249
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52, 39, ctx_r0.caseHistory.event.comment));
32323
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52, 40, ctx_r0.caseHistory.event.comment));
32250
32324
  i0.ɵɵadvance(4);
32251
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56, 41, "Case Details"));
32325
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56, 42, "Case Details"));
32252
32326
  i0.ɵɵadvance(2);
32253
32327
  i0.ɵɵproperty("ngForOf", ctx_r0.tabs);
32254
32328
  }
@@ -32304,7 +32378,7 @@ CaseHistoryComponent.ERROR_MESSAGE = 'No case history to show';
32304
32378
  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)); };
32305
32379
  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) {
32306
32380
  if (rf & 1) {
32307
- i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58, 43, "div", 0);
32381
+ i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58, 44, "div", 0);
32308
32382
  }
32309
32383
  if (rf & 2) {
32310
32384
  i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
@@ -32313,7 +32387,7 @@ CaseHistoryComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseHi
32313
32387
  (function () {
32314
32388
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryComponent, [{
32315
32389
  type: Component,
32316
- 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"] }]
32390
+ 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"] }]
32317
32391
  }], function () { return [{ type: i1$1.ActivatedRoute }, { type: AlertService }, { type: OrderService }, { type: CaseNotifier }, { type: CaseHistoryService }]; }, { event: [{
32318
32392
  type: Input
32319
32393
  }] });
@@ -33515,7 +33589,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_Tem
33515
33589
  const tab_r20 = i0.ɵɵnextContext().$implicit;
33516
33590
  const ctx_r22 = i0.ɵɵnextContext(2);
33517
33591
  i0.ɵɵclassMap(tab_r20.id);
33518
- i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(1, 4, "case viewer table"));
33592
+ i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(1, 4, "case viewer table"));
33519
33593
  i0.ɵɵadvance(3);
33520
33594
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(4, 6, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(5, 12, tab_r20), ctx_r22.formGroup.controls["data"])));
33521
33595
  }
@@ -33999,7 +34073,7 @@ CaseFullAccessViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
33999
34073
  (function () {
34000
34074
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
34001
34075
  type: Component,
34002
- 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-describedby]=\"'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"] }]
34076
+ 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"] }]
34003
34077
  }], 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: [{
34004
34078
  type: Input
34005
34079
  }], hasEventSelector: [{