vcomply-workflow-engine 5.0.14 → 5.0.16

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.
@@ -13641,15 +13641,18 @@ class WorkflowCaseComponent {
13641
13641
  this.disconnectRefresh = new EventEmitter();
13642
13642
  this.permissionLoader();
13643
13643
  }
13644
+ ngOnDestroy() {
13645
+ this.resetForm();
13646
+ }
13644
13647
  ngOnInit() {
13645
13648
  this.getUserList();
13646
13649
  this.getGroupList();
13647
- if (this.mode === 'EDIT') {
13648
- this.getCaseDetails();
13649
- }
13650
13650
  if (this.workflowType === 'ACTW') {
13651
13651
  this.additionalOptionStatus = { ...ADDITIONAL_OPTION_STATUS };
13652
13652
  }
13653
+ if (this.mode === 'EDIT') {
13654
+ this.getCaseDetails();
13655
+ }
13653
13656
  }
13654
13657
  permissionLoader() {
13655
13658
  this.reportACaseService.caseTypeLoader.subscribe((res) => {
@@ -13681,19 +13684,21 @@ class WorkflowCaseComponent {
13681
13684
  .getCaseDetails(this.caseId)
13682
13685
  .subscribe((res) => {
13683
13686
  this.caseReportedBy.emit(res?.data?.created_by);
13684
- if (res?.data?.added_to_workflow || this.workflowType === 'ACTW') {
13685
- this.caseTypeSelected = report.ADD_CASE_TO_WORKFLOW;
13686
- this.populateAddCasePayload(res?.data);
13687
- this.getWorkflowDetails(res?.data);
13688
- this.loader.caseLoader = false;
13689
- }
13690
- else {
13691
- this.caseTypeSelected = report.REPORT_CASE;
13692
- this.populateReportCasePayload(res?.data);
13693
- this.loader.caseLoader = false;
13694
- }
13687
+ this.setCaseDetails(res);
13695
13688
  });
13696
13689
  }
13690
+ setCaseDetails(res) {
13691
+ if (res?.data?.added_to_workflow || this.workflowType === 'ACTW') {
13692
+ this.caseTypeSelected = report.ADD_CASE_TO_WORKFLOW;
13693
+ this.populateAddCasePayload(res?.data);
13694
+ this.getWorkflowDetails(res?.data);
13695
+ }
13696
+ else {
13697
+ this.caseTypeSelected = report.REPORT_CASE;
13698
+ this.populateReportCasePayload(res?.data);
13699
+ }
13700
+ this.loader.caseLoader = false;
13701
+ }
13697
13702
  // edit case
13698
13703
  getWorkflowDetails(data) {
13699
13704
  this.params.case_type.id = data?.case_type?.id;
@@ -14301,7 +14306,7 @@ class WorkflowCaseComponent {
14301
14306
  this.loader.groupListLoader &&
14302
14307
  this.loader.userListLoader);
14303
14308
  }
14304
- return ((this.loader.typeLoader && this.loader.priorityLoader && this.loader.permissionLoader) ||
14309
+ return ((this.loader.typeLoader && this.loader.priorityLoader) || this.loader.permissionLoader ||
14305
14310
  this.loader.reportCaseLoader);
14306
14311
  }
14307
14312
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WorkflowCaseComponent, deps: [{ token: ReportACaseService }, { token: UiKitService }, { token: OrganizationUserService }, { token: ResponsibilityService }, { token: ReportCasePermissionService }], target: i0.ɵɵFactoryTarget.Component }); }