vcomply-workflow-engine 2.6.79 → 2.6.81

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.
@@ -3811,6 +3811,8 @@
3811
3811
  }
3812
3812
  _this.getEditMoreOptions(res);
3813
3813
  }
3814
+ }, function (err) {
3815
+ _this.uiKitService.isLoader = false;
3814
3816
  });
3815
3817
  };
3816
3818
  WorkflowComplianceComponent.prototype.setList = function (list, ids, key) {
@@ -4494,7 +4496,7 @@
4494
4496
  };
4495
4497
  WorkflowComplianceComponent.prototype.entrustResponsibility = function (entrustForm) {
4496
4498
  var _this = this;
4497
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
4499
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
4498
4500
  this.loader = true;
4499
4501
  this.uiKitService.isLoader = true;
4500
4502
  var startDate = moment__namespace(parseInt(entrustForm.startDate) * 1000).format("YYYY-MM-DD HH:mm:ss");
@@ -4544,7 +4546,7 @@
4544
4546
  var objective = (((_g = entrustForm.objective) === null || _g === void 0 ? void 0 : _g.replace(/\ /g, '').trim()) !== '') ? entrustForm.objective : '';
4545
4547
  var payload = {
4546
4548
  app_association: [],
4547
- assigned_to: this.returnIds(entrustForm.assignees.list, 'employee_id').toString(),
4549
+ assigned_to: (entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility_type) == '1' ? '0' : this.returnIds(entrustForm.assignees.list, 'employee_id').toString(),
4548
4550
  program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM) ? (((_h = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _h === void 0 ? void 0 : _h.length) ? [entrustForm.program[0].category_id] : []) : [],
4549
4551
  linked_program_ids: linkedProgramIds,
4550
4552
  linked_category_ids: this.getUniqueIds(__spreadArray(__spreadArray([], __read(categoryIdsExceptDefault)), __read(linkedCategoryIds))),
@@ -4591,7 +4593,7 @@
4591
4593
  reminder_before_days: entrustForm.reminder_before_days,
4592
4594
  report_format: (moreOptions.FORMATE_EVIDENCE) ? entrustForm.formatAndEvidence.formatFiles : [],
4593
4595
  report_format_link: '',
4594
- report_name: (entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility_type) == '0' ? (_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility) === null || _w === void 0 ? void 0 : _w.name : (_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.systemResponsibilities[0]) === null || _x === void 0 ? void 0 : _x.name,
4596
+ report_name: (entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility_type) == '1' ? (_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.systemResponsibilities[0]) === null || _w === void 0 ? void 0 : _w.name : (_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility) === null || _x === void 0 ? void 0 : _x.name,
4595
4597
  report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired ? 1 : 0,
4596
4598
  review_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewCompleteDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewCompleteDays) : 0,
4597
4599
  review_failed_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays) : 0,
@@ -4631,7 +4633,7 @@
4631
4633
  },
4632
4634
  assessment_checkpoint: moreOptions.CHECKPOINTS_NEW ? (Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints).length > 0 ? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints : {}) : {},
4633
4635
  questionnaire_type: moreOptions.CHECKPOINTS_NEW ? (Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints).length > 0 ? 'assessment_checkpoint' : (moreOptions.ASSESSMENT && ((_2 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _2 === void 0 ? void 0 : _2.category_id) ? 'assessment' : (JSON.stringify(this.responsibilityForm.checkpoints) != '' && moreOptions.CHECKPOINTS ? 'checkpoint' : ''))) : '',
4634
- linked_system_responsibility: (_3 = this.responsibilityForm) === null || _3 === void 0 ? void 0 : _3.systemResponsibilities.map(function (val) { return val === null || val === void 0 ? void 0 : val._id; }),
4636
+ linked_system_responsibility: (_4 = (_3 = this.responsibilityForm) === null || _3 === void 0 ? void 0 : _3.systemResponsibilities) === null || _4 === void 0 ? void 0 : _4.map(function (val) { return val === null || val === void 0 ? void 0 : val._id; }),
4635
4637
  };
4636
4638
  this.responsibilityPayload = payload;
4637
4639
  if (this.mode == 'CREATE' && !this.isDuplicateEntrust) {
@@ -4662,6 +4664,7 @@
4662
4664
  });
4663
4665
  }
4664
4666
  if (this.mode == 'EDIT' || this.isDuplicateEntrust) {
4667
+ console.log('update');
4665
4668
  this.smileyMessage = "The responsibility has been modified.";
4666
4669
  this.responsibilityService.updateEntrust(payload, this.responsibilityId, true).subscribe(function (res) {
4667
4670
  _this.responsibilityData = res;