vcomply-workflow-engine 2.9.50 → 2.9.51

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.
@@ -5106,7 +5106,7 @@ class WorkflowComplianceComponent {
5106
5106
  }
5107
5107
  }
5108
5108
  entrustResponsibility(entrustForm) {
5109
- 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, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
5109
+ 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, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
5110
5110
  this.loader = true;
5111
5111
  this.uiKitService.isLoader = true;
5112
5112
  let startDate = moment(parseInt(entrustForm.startDate) * 1000).format("YYYY-MM-DD HH:mm:ss");
@@ -5163,11 +5163,11 @@ class WorkflowComplianceComponent {
5163
5163
  let payload = {
5164
5164
  app_association: [],
5165
5165
  assigned_to: this.returnIds(this.assigneeUserList, 'employee_id').toString(),
5166
- program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM) ? (((_k = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _k === void 0 ? void 0 : _k.length) ? [entrustForm.program[0].category_id] : []) : [],
5166
+ program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM) ? (((_k = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _k === void 0 ? void 0 : _k.length) ? [(_l = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _l === void 0 ? void 0 : _l.category_id] : []) : [],
5167
5167
  linked_program_ids: linkedProgramIds,
5168
5168
  linked_category_ids: this.getUniqueIds([...categoryIdsExceptDefault, ...linkedCategoryIds]),
5169
5169
  // category_id: (this.responsibilityForm?.program_selected_ids?.length > 0) ? this.responsibilityForm?.category_id : '',
5170
- category_id: (((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.program_selected_ids) === null || _m === void 0 ? void 0 : _m.length) > 0) ? (_p = this.getUniqueIds([...(_o = this.responsibilityForm) === null || _o === void 0 ? void 0 : _o.category, ...linkedCategoryIds, ...[entrustForm.program[0].category_id]])) === null || _p === void 0 ? void 0 : _p.toString() : '',
5170
+ category_id: (((_o = (_m = this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.program_selected_ids) === null || _o === void 0 ? void 0 : _o.length) > 0) ? (_r = this.getUniqueIds([...(_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.category, ...linkedCategoryIds, ...[(_q = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _q === void 0 ? void 0 : _q.category_id]])) === null || _r === void 0 ? void 0 : _r.toString() : '',
5171
5171
  cc_email: (moreOptions.OVERSEER) ? this.returnIds(this.overseerUserList, 'employee_id').toString() : '',
5172
5172
  checkpoint_description: (moreOptions.CHECKPOINTS) ? entrustForm.checkpointInstruction : '',
5173
5173
  checkpoint_details: (moreOptions.CHECKPOINTS) ? JSON.stringify(this.responsibilityForm.checkpoints) : '',
@@ -5176,7 +5176,7 @@ class WorkflowComplianceComponent {
5176
5176
  comment: '',
5177
5177
  continuous_failed_days: checkContinuousFailedValue(entrustForm.frequency) ? entrustForm.continuous_failed_days : 0,
5178
5178
  cost_of_compliance: '',
5179
- created_by: ((_q = entrustForm.assignors.list) === null || _q === void 0 ? void 0 : _q.length) < 1 ? 0 : this.memberId,
5179
+ created_by: ((_s = entrustForm.assignors.list) === null || _s === void 0 ? void 0 : _s.length) < 1 ? 0 : this.memberId,
5180
5180
  creation_window: 0,
5181
5181
  custom_tags: JSON.stringify(entrustForm.customTags),
5182
5182
  entity_tree: (moreOptions.RC) ? ((this.isResponsibilityRcLinkEnabled && this.responsibilityCenterType == 1) ? [] : rcDetails) : [],
@@ -5185,7 +5185,7 @@ class WorkflowComplianceComponent {
5185
5185
  failed_time_utc: entrustForm.failed_time_utc,
5186
5186
  failure_cc_email: (moreOptions.OVERSEER) ? this.returnIds(this.overseerUserNotifyList, 'employee_id').toString() : '',
5187
5187
  frequency_details: entrustForm.frequency,
5188
- frequency_time: (_r = entrustForm.timeIn24Hr) !== null && _r !== void 0 ? _r : "23:59:00",
5188
+ frequency_time: (_t = entrustForm.timeIn24Hr) !== null && _t !== void 0 ? _t : "23:59:00",
5189
5189
  grc_object_id: 0,
5190
5190
  grc_relationship: '',
5191
5191
  if_testplan_failed: 0,
@@ -5193,10 +5193,10 @@ class WorkflowComplianceComponent {
5193
5193
  isGroupAssignTo: (entrustForm.assignees.whoCanComplete == 'ANY_ONE') ? 1 : 0,
5194
5194
  is_key_compliance: entrustForm.responsibility.keyResponsibility ? 1 : 0,
5195
5195
  library_report_id: 0,
5196
- lifecycle_details: (_s = entrustForm.lifecycleDetails) !== null && _s !== void 0 ? _s : '0000-00-00~~0',
5196
+ lifecycle_details: (_u = entrustForm.lifecycleDetails) !== null && _u !== void 0 ? _u : '0000-00-00~~0',
5197
5197
  link_for_details: (moreOptions.FORMATE_EVIDENCE) ? entrustForm.formatAndEvidence.formatLinks : [],
5198
5198
  linkages: { compliance: [] },
5199
- member_id: ((_t = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _t === void 0 ? void 0 : _t.length) > 0 ? this.returnIds(entrustForm.assignors.list, 'member_id')[0] : this.memberId,
5199
+ member_id: ((_v = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _v === void 0 ? void 0 : _v.length) > 0 ? this.returnIds(entrustForm.assignors.list, 'member_id')[0] : this.memberId,
5200
5200
  objective: (moreOptions.OBJECTIVE) ? objective : '',
5201
5201
  on_completion_of: entrustForm.reportId ? [entrustForm.reportId] : [],
5202
5202
  on_completion_of_type: 1,
@@ -5220,18 +5220,18 @@ class WorkflowComplianceComponent {
5220
5220
  },
5221
5221
  } : {},
5222
5222
  userGroupIds: {
5223
- assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_u = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _u === void 0 ? void 0 : _u.list, 'group_id') : [],
5224
- assigneeAnyoneGroupIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_v = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _v === void 0 ? void 0 : _v.list, 'group_id') : [],
5225
- ccEmailGroupIds: (_y = this.returnIds((_x = (_w = this.responsibilityForm) === null || _w === void 0 ? void 0 : _w.overseersGroups) === null || _x === void 0 ? void 0 : _x.list, 'group_id')) !== null && _y !== void 0 ? _y : [],
5226
- failureCCEmailGroupIds: (_1 = this.returnIds((_0 = (_z = this.responsibilityForm) === null || _z === void 0 ? void 0 : _z.overseersGroups) === null || _0 === void 0 ? void 0 : _0.notifyList, 'group_id')) !== null && _1 !== void 0 ? _1 : [],
5227
- reviewerGroupIds: (_4 = this.returnIds((_3 = (_2 = this.responsibilityForm) === null || _2 === void 0 ? void 0 : _2.groupReviewers) === null || _3 === void 0 ? void 0 : _3.list, 'group_id')) !== null && _4 !== void 0 ? _4 : []
5223
+ assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _w === void 0 ? void 0 : _w.list, 'group_id') : [],
5224
+ assigneeAnyoneGroupIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _x === void 0 ? void 0 : _x.list, 'group_id') : [],
5225
+ ccEmailGroupIds: (_0 = this.returnIds((_z = (_y = this.responsibilityForm) === null || _y === void 0 ? void 0 : _y.overseersGroups) === null || _z === void 0 ? void 0 : _z.list, 'group_id')) !== null && _0 !== void 0 ? _0 : [],
5226
+ failureCCEmailGroupIds: (_3 = this.returnIds((_2 = (_1 = this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.overseersGroups) === null || _2 === void 0 ? void 0 : _2.notifyList, 'group_id')) !== null && _3 !== void 0 ? _3 : [],
5227
+ reviewerGroupIds: (_6 = this.returnIds((_5 = (_4 = this.responsibilityForm) === null || _4 === void 0 ? void 0 : _4.groupReviewers) === null || _5 === void 0 ? void 0 : _5.list, 'group_id')) !== null && _6 !== void 0 ? _6 : []
5228
5228
  },
5229
5229
  existingUserIds: {
5230
- assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_5 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _5 === void 0 ? void 0 : _5.list, 'my_member_id') : [],
5231
- assigneeAnyoneIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_6 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _6 === void 0 ? void 0 : _6.list, 'my_member_id') : [],
5232
- ccEmailEmpIds: (_8 = this.returnIds((_7 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _7 === void 0 ? void 0 : _7.list, 'employee_id')) !== null && _8 !== void 0 ? _8 : [],
5233
- failureCCEmailEmpIds: (_10 = this.returnIds((_9 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _9 === void 0 ? void 0 : _9.notifyList, 'employee_id')) !== null && _10 !== void 0 ? _10 : [],
5234
- reviewerIds: (_13 = this.returnIds((_12 = (_11 = this.responsibilityForm) === null || _11 === void 0 ? void 0 : _11.reviewers) === null || _12 === void 0 ? void 0 : _12.list, 'member_id')) !== null && _13 !== void 0 ? _13 : []
5230
+ assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_7 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _7 === void 0 ? void 0 : _7.list, 'my_member_id') : [],
5231
+ assigneeAnyoneIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_8 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _8 === void 0 ? void 0 : _8.list, 'my_member_id') : [],
5232
+ ccEmailEmpIds: (_10 = this.returnIds((_9 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _9 === void 0 ? void 0 : _9.list, 'employee_id')) !== null && _10 !== void 0 ? _10 : [],
5233
+ failureCCEmailEmpIds: (_12 = this.returnIds((_11 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _11 === void 0 ? void 0 : _11.notifyList, 'employee_id')) !== null && _12 !== void 0 ? _12 : [],
5234
+ reviewerIds: (_15 = this.returnIds((_14 = (_13 = this.responsibilityForm) === null || _13 === void 0 ? void 0 : _13.reviewers) === null || _14 === void 0 ? void 0 : _14.list, 'member_id')) !== null && _15 !== void 0 ? _15 : []
5235
5235
  },
5236
5236
  reviewer_checkpoints: [{ checkpoints: [], instruction: '' }],
5237
5237
  reviewer_id: 0,
@@ -5241,10 +5241,10 @@ class WorkflowComplianceComponent {
5241
5241
  sample_size: 0,
5242
5242
  start_date_utc: startDate,
5243
5243
  statutory_day: 0,
5244
- test_required_flag: (moreOptions.ASSURANCE) ? (((_14 = entrustForm.assuranceList) === null || _14 === void 0 ? void 0 : _14.length) > 0 ? 1 : 0) : 0,
5244
+ test_required_flag: (moreOptions.ASSURANCE) ? (((_16 = entrustForm.assuranceList) === null || _16 === void 0 ? void 0 : _16.length) > 0 ? 1 : 0) : 0,
5245
5245
  testplan_category_id: (moreOptions.ASSURANCE) ? this.returnIds(entrustForm.assuranceList, 'category_id') : [],
5246
5246
  testplan_category_manager: '',
5247
- audit_category_details: moreOptions.REQUIRES_AUDIT && ((_16 = (_15 = this.responsibilityForm) === null || _15 === void 0 ? void 0 : _15.audit_category_details) === null || _16 === void 0 ? void 0 : _16.category_id) ? {
5247
+ audit_category_details: moreOptions.REQUIRES_AUDIT && ((_18 = (_17 = this.responsibilityForm) === null || _17 === void 0 ? void 0 : _17.audit_category_details) === null || _18 === void 0 ? void 0 : _18.category_id) ? {
5248
5248
  category_id: this.responsibilityForm.audit_category_details.category_id,
5249
5249
  sample: this.selectedSample === 0 ? this.sampleValue : 0,
5250
5250
  percentage: this.selectedSample === 1 ? this.samplePercentage : 0,
@@ -5258,11 +5258,11 @@ class WorkflowComplianceComponent {
5258
5258
  frequency_time: ''
5259
5259
  },
5260
5260
  assessment: {
5261
- category_id: moreOptions.ASSESSMENT ? (_17 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _17 === void 0 ? void 0 : _17.category_id : '',
5262
- assessment_id: moreOptions.ASSESSMENT ? (_18 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _18 === void 0 ? void 0 : _18.assessment_id : ''
5261
+ category_id: moreOptions.ASSESSMENT ? (_19 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _19 === void 0 ? void 0 : _19.category_id : '',
5262
+ assessment_id: moreOptions.ASSESSMENT ? (_20 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _20 === void 0 ? void 0 : _20.assessment_id : ''
5263
5263
  },
5264
- assessment_checkpoint: moreOptions.CHECKPOINTS_NEW ? (((_19 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _19 === void 0 ? void 0 : _19.length) > 0 ? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints : {}) : {},
5265
- questionnaire_type: moreOptions.CHECKPOINTS_NEW ? (((_20 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _20 === void 0 ? void 0 : _20.length) > 0 ? 'assessment_checkpoint' : (moreOptions.ASSESSMENT && ((_21 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _21 === void 0 ? void 0 : _21.category_id) ? 'assessment' : (JSON.stringify(this.responsibilityForm.checkpoints) != '' && moreOptions.CHECKPOINTS ? 'checkpoint' : ''))) : ''
5264
+ assessment_checkpoint: moreOptions.CHECKPOINTS_NEW ? (((_21 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _21 === void 0 ? void 0 : _21.length) > 0 ? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints : {}) : {},
5265
+ questionnaire_type: moreOptions.CHECKPOINTS_NEW ? (((_22 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _22 === void 0 ? void 0 : _22.length) > 0 ? 'assessment_checkpoint' : (moreOptions.ASSESSMENT && ((_23 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _23 === void 0 ? void 0 : _23.category_id) ? 'assessment' : (JSON.stringify(this.responsibilityForm.checkpoints) != '' && moreOptions.CHECKPOINTS ? 'checkpoint' : ''))) : ''
5266
5266
  };
5267
5267
  if (this.isResponsibilityRcLinkEnabled) {
5268
5268
  payload['responsibilityCenterType'] = (this.isResponsibilityRcLinkEnabled && moreOptions.RC) ? this.responsibilityCenterType : 0;