vcomply-workflow-engine 2.6.87 → 2.6.88

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.
@@ -29936,9 +29936,9 @@
29936
29936
  var _a, _b, _c, _d, _e, _f, _g;
29937
29937
  this.loader = true;
29938
29938
  var payload = [];
29939
- var frequencyTypeArray = ['1', '2', '3', '4', '7', '0'];
29940
- var defaultWindow = [0, 2, 7, 30, 7, 15];
29941
- var defaultFailedDay = [1, 2, 5, 5, 5, 5];
29939
+ var frequencyTypeArray = ['1', '2', '3', '4', '7', '0', '6'];
29940
+ var defaultWindow = [0, 2, 7, 30, 7, 15, 3];
29941
+ var defaultFailedDay = [1, 2, 5, 5, 5, 5, 5];
29942
29942
  // this.bulkUpload?.frequency
29943
29943
  var responsibilityBulkUpload = (_c = (_b = (_a = this.bulkUpload) === null || _a === void 0 ? void 0 : _a.frequency) === null || _b === void 0 ? void 0 : _b.reports) === null || _c === void 0 ? void 0 : _c.concat((_e = (_d = this.bulkUpload) === null || _d === void 0 ? void 0 : _d.ongoing) === null || _e === void 0 ? void 0 : _e.reports, (_g = (_f = this.bulkUpload) === null || _f === void 0 ? void 0 : _f.onCompletion) === null || _g === void 0 ? void 0 : _g.reports);
29944
29944
  // this.responsibilityBulkUpload.reports.forEach((report: any) => {
@@ -29968,14 +29968,14 @@
29968
29968
  var completeDays = void 0;
29969
29969
  var notCompleteDays = void 0;
29970
29970
  var frequencyType = frequencyValue === null || frequencyValue === void 0 ? void 0 : frequencyValue.split('~')[0];
29971
- if (report.responsibilityWindow !== '') {
29971
+ if (report.responsibilityWindow && report.responsibilityWindow !== '') {
29972
29972
  completeDays = report === null || report === void 0 ? void 0 : report.responsibilityWindow;
29973
29973
  }
29974
29974
  else if (frequencyTypeArray === null || frequencyTypeArray === void 0 ? void 0 : frequencyTypeArray.includes(frequencyType)) {
29975
29975
  var indexOfArray = frequencyTypeArray === null || frequencyTypeArray === void 0 ? void 0 : frequencyTypeArray.indexOf(frequencyType);
29976
29976
  completeDays = defaultWindow[indexOfArray];
29977
29977
  }
29978
- if ((report === null || report === void 0 ? void 0 : report.failedAfter) !== '') {
29978
+ if ((report === null || report === void 0 ? void 0 : report.failedAfter) && (report === null || report === void 0 ? void 0 : report.failedAfter) !== '') {
29979
29979
  notCompleteDays = report === null || report === void 0 ? void 0 : report.failedAfter;
29980
29980
  }
29981
29981
  else if (frequencyTypeArray.includes(frequencyType)) {
@@ -30007,15 +30007,15 @@
30007
30007
  frequency_handler: frequencyValue,
30008
30008
  compliance_type: frequencyValue === null || frequencyValue === void 0 ? void 0 : frequencyValue.split('~')[0],
30009
30009
  frequency_description: report === null || report === void 0 ? void 0 : report.frequency,
30010
- start_date: (report.day) ? startDate : currentDate + ' 00:00:00',
30011
- risk_class: (_t = report.reportClass) !== null && _t !== void 0 ? _t : '',
30012
- risk_classId: (report.reportClass) ? _this.returnIds(report.reportClass, 'risk_class') : ((_this.riskClassEnabled) ? 1 : 2),
30010
+ start_date: (report === null || report === void 0 ? void 0 : report.day) ? startDate : currentDate + ' 00:00:00',
30011
+ risk_class: (_t = report === null || report === void 0 ? void 0 : report.reportClass) !== null && _t !== void 0 ? _t : '',
30012
+ risk_classId: (report === null || report === void 0 ? void 0 : report.reportClass) ? _this.returnIds(report === null || report === void 0 ? void 0 : report.reportClass, 'risk_class') : ((_this.riskClassEnabled) ? 1 : 2),
30013
30013
  doc_utc: 0,
30014
- comment: (_u = report.notes) !== null && _u !== void 0 ? _u : '',
30014
+ comment: (_u = report === null || report === void 0 ? void 0 : report.notes) !== null && _u !== void 0 ? _u : '',
30015
30015
  cc_mail: ccDetails ? ccDetails === null || ccDetails === void 0 ? void 0 : ccDetails.email : '',
30016
30016
  cc_mail_id: ccDetails ? ccDetails === null || ccDetails === void 0 ? void 0 : ccDetails.employeeId : '',
30017
- cc_failed_mail: ccFailureDetails ? ccFailureDetails.email : '',
30018
- cc_failure_id: ccFailureDetails ? ccFailureDetails.employeeId : 0,
30017
+ cc_failed_mail: ccFailureDetails ? ccFailureDetails === null || ccFailureDetails === void 0 ? void 0 : ccFailureDetails.email : '',
30018
+ cc_failure_id: ccFailureDetails ? ccFailureDetails === null || ccFailureDetails === void 0 ? void 0 : ccFailureDetails.employeeId : 0,
30019
30019
  send_reminder: "",
30020
30020
  responsibilityWindow: (frequencyType === '1') ? 0 : completeDays,
30021
30021
  failed_after: notCompleteDays,
@@ -30036,10 +30036,10 @@
30036
30036
  type: "SEQUENTIAL"
30037
30037
  }
30038
30038
  } : {},
30039
- reviewerWindow: (report === null || report === void 0 ? void 0 : report.reviewToBeCompletedWithin) === '' ? 2 : report === null || report === void 0 ? void 0 : report.reviewToBeCompletedWithin,
30040
- reviewerFailure: report.reviewWillBeFailedAfter === '' ? 2 : report.reviewWillBeFailedAfter,
30041
- reviewer_email: reviewerDetails ? reviewerDetails.email : '',
30042
- formatForResponsibility: report.formatForResponsibility ? report.formatForResponsibility : '',
30039
+ reviewerWindow: ((report === null || report === void 0 ? void 0 : report.reviewToBeCompletedWithin) && (report === null || report === void 0 ? void 0 : report.reviewToBeCompletedWithin) !== '') ? report === null || report === void 0 ? void 0 : report.reviewToBeCompletedWithin : 2,
30040
+ reviewerFailure: ((report === null || report === void 0 ? void 0 : report.reviewWillBeFailedAfter) && (report === null || report === void 0 ? void 0 : report.reviewWillBeFailedAfter) !== '') ? report === null || report === void 0 ? void 0 : report.reviewWillBeFailedAfter : 2,
30041
+ reviewer_email: reviewerDetails ? reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.email : '',
30042
+ formatForResponsibility: (report === null || report === void 0 ? void 0 : report.formatForResponsibility) ? report.formatForResponsibility : '',
30043
30043
  documentaryEvidence: (_w = report === null || report === void 0 ? void 0 : report.evidenceNotes) !== null && _w !== void 0 ? _w : '',
30044
30044
  isdocumentaryEvidence: (report.documentEvidenceRequired === 'Yes') ? 1 : 0,
30045
30045
  objective: (_x = report.objective) !== null && _x !== void 0 ? _x : '',
@@ -30053,7 +30053,7 @@
30053
30053
  payload.push(obj);
30054
30054
  }
30055
30055
  });
30056
- console.log("payloadpayload", payload);
30056
+ // console.log("payloadpayload",payload, "responsibilityBulkUpload ==>", responsibilityBulkUpload )
30057
30057
  this.responsibilityService.addBulkResponsibility(payload).subscribe(function (res) {
30058
30058
  _this.loader = false;
30059
30059
  _this.showExcel = false;
@@ -30393,7 +30393,7 @@
30393
30393
  }
30394
30394
  });
30395
30395
  }
30396
- console.log('this.uploadedFiles this.templateInfo', this.templateInfo, this.bulkUpload);
30396
+ // console.log('this.uploadedFiles this.templateInfo',this.templateInfo, this.bulkUpload)
30397
30397
  };
30398
30398
  /**
30399
30399
  * It takes an event, which is a string, and then it sets the responsibilityBulkUpload variable to