vcomply-workflow-engine 0.1.2 → 0.1.3

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.
@@ -2640,7 +2640,9 @@ class WorkflowComplianceComponent {
2640
2640
  if ((res === null || res === void 0 ? void 0 : res.rc_id) > 0) {
2641
2641
  this.rcSelected.emit(true);
2642
2642
  }
2643
- this.populateAssuranceList(res === null || res === void 0 ? void 0 : res.audit_category_details);
2643
+ if (res === null || res === void 0 ? void 0 : res.audit_category_details) {
2644
+ this.populateAssuranceList(res === null || res === void 0 ? void 0 : res.audit_category_details);
2645
+ }
2644
2646
  if ((_q = res.assessment) === null || _q === void 0 ? void 0 : _q.assessment_id) {
2645
2647
  this.getAssessmentDetails(res.assessment);
2646
2648
  }
@@ -3061,7 +3063,7 @@ class WorkflowComplianceComponent {
3061
3063
  }
3062
3064
  }
3063
3065
  entrustResponsibility(entrustForm) {
3064
- var _a, _b, _c, _d, _e;
3066
+ var _a, _b, _c, _d, _e, _f, _g;
3065
3067
  console.log("entrustForm ==>", entrustForm);
3066
3068
  this.loader = true;
3067
3069
  this.uiKitService.isLoader = true;
@@ -3154,16 +3156,22 @@ class WorkflowComplianceComponent {
3154
3156
  test_required_flag: (moreOptions.ASSURANCE) ? (entrustForm.assuranceList.length > 0 ? 1 : 0) : 0,
3155
3157
  testplan_category_id: (moreOptions.ASSURANCE) ? this.returnIds(entrustForm.assuranceList, 'category_id') : [],
3156
3158
  testplan_category_manager: '',
3157
- audit_category_details: {
3159
+ audit_category_details: ((_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.audit_category_details) === null || _e === void 0 ? void 0 : _e.category_id) ? {
3158
3160
  category_id: this.responsibilityForm.audit_category_details.category_id,
3159
3161
  sample: this.selectedSample === 0 ? this.sampleValue : 0,
3160
3162
  percentage: this.selectedSample === 1 ? this.samplePercentage : 0,
3161
3163
  frequency_pattern: `1~0~${this.sendAuditRemindersValue}~1`,
3162
3164
  frequency_time: moment(this.auditTime, 'HH:mm a').format('HH:mm:ss')
3165
+ } : {
3166
+ category_id: 0,
3167
+ sample: 0,
3168
+ percentage: 0,
3169
+ frequency_pattern: ``,
3170
+ frequency_time: ''
3163
3171
  },
3164
3172
  assessment: {
3165
- category_id: moreOptions.ASSESSMENT ? (_d = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _d === void 0 ? void 0 : _d.category_id : '',
3166
- assessment_id: moreOptions.ASSESSMENT ? (_e = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _e === void 0 ? void 0 : _e.assessment_id : ''
3173
+ category_id: moreOptions.ASSESSMENT ? (_f = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _f === void 0 ? void 0 : _f.category_id : '',
3174
+ assessment_id: moreOptions.ASSESSMENT ? (_g = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _g === void 0 ? void 0 : _g.assessment_id : ''
3167
3175
  }
3168
3176
  };
3169
3177
  this.responsibilityPayload = payload;
@@ -3776,7 +3784,7 @@ class WorkflowComplianceComponent {
3776
3784
  this.isAssessment = false;
3777
3785
  this.responsibilityForm.assessment = event;
3778
3786
  }
3779
- // TODO: Populate assessment data from already selected data
3787
+ // TODO: Populate assessment data from already selected data
3780
3788
  /**
3781
3789
  *
3782
3790
  * @param assessmentDetails : selected assessment details like it's object id and category_id
@@ -12328,10 +12336,10 @@ class LogAnIssueComponent {
12328
12336
  url = 'https://' + window.location.host;
12329
12337
  }
12330
12338
  if (window.location.host.startsWith('localhost')) {
12331
- url += '/issue-workroom/' + ((_a = this.issueData) === null || _a === void 0 ? void 0 : _a._id);
12339
+ url += '/issue/issue-workroom/' + ((_a = this.issueData) === null || _a === void 0 ? void 0 : _a._id);
12332
12340
  }
12333
12341
  else {
12334
- url += '/audit/issue-workroom/' + ((_b = this.issueData) === null || _b === void 0 ? void 0 : _b._id);
12342
+ url += '/issue/audit/issue-workroom/' + ((_b = this.issueData) === null || _b === void 0 ? void 0 : _b._id);
12335
12343
  }
12336
12344
  window.location.href = url;
12337
12345
  }