@hmcts/ccd-case-ui-toolkit 7.0.44-task-event-completion-fix → 7.0.46-exui-2086-rc1

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.
@@ -9514,6 +9514,7 @@ class CaseEditComponent {
9514
9514
  // on event completion ensure the previous event taskToComplete/taskEvent removed
9515
9515
  this.sessionStorageService.removeItem('taskToComplete');
9516
9516
  this.sessionStorageService.removeItem('taskEvent');
9517
+ this.isSubmitting = false;
9517
9518
  }))
9518
9519
  .subscribe(() => {
9519
9520
  this.finishEventCompletionLogic(eventResponse);
@@ -9527,7 +9528,6 @@ class CaseEditComponent {
9527
9528
  this.formErrorService
9528
9529
  .mapFieldErrors(this.error.details.field_errors, form.controls['data'], 'validation');
9529
9530
  }
9530
- this.isSubmitting = false;
9531
9531
  }
9532
9532
  else {
9533
9533
  this.sessionStorageService.setItem('taskCompletionError', 'true');
@@ -10457,7 +10457,6 @@ class CaseEditPageComponent {
10457
10457
  }
10458
10458
  submit() {
10459
10459
  this.caseEditDataService.clearFormValidationErrors();
10460
- console.log('Page submit event fired!');
10461
10460
  if (this.currentPageIsNotValid()) {
10462
10461
  // The generateErrorMessage method filters out the hidden fields.
10463
10462
  // The error message for LinkedCases journey will never get displayed because the
@@ -10483,6 +10482,7 @@ class CaseEditPageComponent {
10483
10482
  this.validateSub = this.caseEdit.validate(caseEventData, this.currentPage.id)
10484
10483
  .pipe(finalize(() => {
10485
10484
  this.loadingService.unregister(loadingSpinnerToken);
10485
+ this.caseEdit.isSubmitting = false;
10486
10486
  }))
10487
10487
  .subscribe((jsonData) => {
10488
10488
  /* istanbul ignore else */
@@ -11907,7 +11907,7 @@ function CaseFileViewFieldComponent_div_2_ng_container_8_Template(rf, ctx) { if
11907
11907
  } if (rf & 2) {
11908
11908
  const ctx_r1 = i0.ɵɵnextContext(2);
11909
11909
  i0.ɵɵadvance();
11910
- i0.ɵɵproperty("url", ctx_r1.currentDocument.document_binary_url)("downloadFileName", ctx_r1.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r1.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh")("enableICP", ctx_r1.isIcpEnabled());
11910
+ i0.ɵɵproperty("url", ctx_r1.currentDocument.document_binary_url)("downloadFileName", ctx_r1.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r1.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh")("caseId", ctx_r1.caseId)("enableICP", ctx_r1.isIcpEnabled());
11911
11911
  } }
11912
11912
  function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11913
11913
  const _r3 = i0.ɵɵgetCurrentView();
@@ -11919,7 +11919,7 @@ function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11919
11919
  i0.ɵɵelementEnd()();
11920
11920
  i0.ɵɵelement(6, "div", 16);
11921
11921
  i0.ɵɵelementStart(7, "div", 17);
11922
- i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 8, "ng-container", 0);
11922
+ i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 9, "ng-container", 0);
11923
11923
  i0.ɵɵelementEnd()()();
11924
11924
  } if (rf & 2) {
11925
11925
  const ctx_r1 = i0.ɵɵnextContext();
@@ -11948,6 +11948,7 @@ class CaseFileViewFieldComponent {
11948
11948
  caseField;
11949
11949
  icp_jurisdictions = [];
11950
11950
  icpEnabled = false;
11951
+ caseId;
11951
11952
  constructor(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService, caseNotifier, abstractConfig) {
11952
11953
  this.elementRef = elementRef;
11953
11954
  this.route = route;
@@ -11959,8 +11960,8 @@ class CaseFileViewFieldComponent {
11959
11960
  this.abstractConfig = abstractConfig;
11960
11961
  }
11961
11962
  ngOnInit() {
11962
- const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
11963
- this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(cid);
11963
+ this.caseId = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
11964
+ this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(this.caseId);
11964
11965
  this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments$.subscribe({
11965
11966
  next: data => {
11966
11967
  this.caseVersion = data.case_version;
@@ -12037,7 +12038,7 @@ class CaseFileViewFieldComponent {
12037
12038
  return this.icpEnabled && ((this.icp_jurisdictions?.length < 1) || this.icp_jurisdictions.includes(this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id));
12038
12039
  }
12039
12040
  static ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
12040
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0);"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "clickedDocument", "moveDocument", "categoriesAndDocuments", "allowMoving"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height", "enableICP"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
12041
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0);"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "clickedDocument", "moveDocument", "categoriesAndDocuments", "allowMoving"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height", "caseId", "enableICP"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
12041
12042
  i0.ɵɵtemplate(0, CaseFileViewFieldComponent_ng_container_0_Template, 8, 1, "ng-container", 0)(1, CaseFileViewFieldComponent_div_1_Template, 5, 0, "div", 1)(2, CaseFileViewFieldComponent_div_2_Template, 9, 3, "div", 0);
12042
12043
  } if (rf & 2) {
12043
12044
  i0.ɵɵproperty("ngIf", ctx.errorMessages == null ? null : ctx.errorMessages.length);
@@ -12049,7 +12050,7 @@ class CaseFileViewFieldComponent {
12049
12050
  }
12050
12051
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
12051
12052
  type: Component,
12052
- args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\"\n [enableICP]=\"isIcpEnabled()\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
12053
+ args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\"\n [caseId]=\"caseId\"\n [enableICP]=\"isIcpEnabled()\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
12053
12054
  }], () => [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
12054
12055
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFileViewFieldComponent, { className: "CaseFileViewFieldComponent", filePath: "lib/shared/components/palette/case-file-view/case-file-view-field.component.ts", lineNumber: 17 }); })();
12055
12056