vcomply-workflow-engine 2.6.80 → 2.6.82

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.
@@ -4109,7 +4109,7 @@ class WorkflowComplianceComponent {
4109
4109
  }
4110
4110
  }
4111
4111
  entrustResponsibility(entrustForm) {
4112
- 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;
4112
+ 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;
4113
4113
  this.loader = true;
4114
4114
  this.uiKitService.isLoader = true;
4115
4115
  let startDate = moment(parseInt(entrustForm.startDate) * 1000).format("YYYY-MM-DD HH:mm:ss");
@@ -4159,7 +4159,7 @@ class WorkflowComplianceComponent {
4159
4159
  const objective = (((_g = entrustForm.objective) === null || _g === void 0 ? void 0 : _g.replace(/\ /g, '').trim()) !== '') ? entrustForm.objective : '';
4160
4160
  let payload = {
4161
4161
  app_association: [],
4162
- assigned_to: this.returnIds(entrustForm.assignees.list, 'employee_id').toString(),
4162
+ assigned_to: (entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.responsibility_type) == '0' ? this.returnIds(entrustForm.assignees.list, 'employee_id').toString() : '0',
4163
4163
  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] : []) : [],
4164
4164
  linked_program_ids: linkedProgramIds,
4165
4165
  linked_category_ids: this.getUniqueIds([...categoryIdsExceptDefault, ...linkedCategoryIds]),
@@ -4206,7 +4206,7 @@ class WorkflowComplianceComponent {
4206
4206
  reminder_before_days: entrustForm.reminder_before_days,
4207
4207
  report_format: (moreOptions.FORMATE_EVIDENCE) ? entrustForm.formatAndEvidence.formatFiles : [],
4208
4208
  report_format_link: '',
4209
- 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,
4209
+ 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,
4210
4210
  report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired ? 1 : 0,
4211
4211
  review_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewCompleteDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewCompleteDays) : 0,
4212
4212
  review_failed_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays) : 0,
@@ -4246,7 +4246,7 @@ class WorkflowComplianceComponent {
4246
4246
  },
4247
4247
  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 : {}) : {},
4248
4248
  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' : ''))) : '',
4249
- linked_system_responsibility: (_3 = this.responsibilityForm) === null || _3 === void 0 ? void 0 : _3.systemResponsibilities.map((val) => val === null || val === void 0 ? void 0 : val._id),
4249
+ linked_system_responsibility: (_4 = (_3 = this.responsibilityForm) === null || _3 === void 0 ? void 0 : _3.systemResponsibilities) === null || _4 === void 0 ? void 0 : _4.map((val) => val === null || val === void 0 ? void 0 : val._id),
4250
4250
  };
4251
4251
  this.responsibilityPayload = payload;
4252
4252
  if (this.mode == 'CREATE' && !this.isDuplicateEntrust) {
@@ -4277,6 +4277,7 @@ class WorkflowComplianceComponent {
4277
4277
  });
4278
4278
  }
4279
4279
  if (this.mode == 'EDIT' || this.isDuplicateEntrust) {
4280
+ console.log('update');
4280
4281
  this.smileyMessage = `The responsibility has been modified.`;
4281
4282
  this.responsibilityService.updateEntrust(payload, this.responsibilityId, true).subscribe((res) => {
4282
4283
  this.responsibilityData = res;