vcomply-workflow-engine 2.6.118 → 2.6.119

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.
@@ -3425,7 +3425,7 @@ class WorkflowComplianceComponent {
3425
3425
  }
3426
3426
  }
3427
3427
  checkWhetherAllListsLoaded() {
3428
- var _a, _b, _c, _d, _e, _f, _g, _h;
3428
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
3429
3429
  if (this.rcListLoaded && this.assigneesListLoaded && this.assignorsListLoaded &&
3430
3430
  this.categoriesListLoaded && this.assuranceCategoryListLoaded && this.groupsListLoaded) {
3431
3431
  if (this.frameworkDetails.length > 0) {
@@ -3441,9 +3441,12 @@ class WorkflowComplianceComponent {
3441
3441
  this.responsibilityForm.program.push(this.selectedProgram);
3442
3442
  this.responsibilityForm.program_selected_ids.push(this.selectedProgram.category_id);
3443
3443
  this.responsibilityForm.category_id = (_b = (_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.category_id) === null || _b === void 0 ? void 0 : _b.toString();
3444
- this.responsibilityForm.assignees.whoCanComplete = (((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.default_assignee_type) == 'ANYONE') ? 'ANY_ONE' : 'ALL';
3445
- this.responsibilityForm.reviewers.sequentialWorkflow = (((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.default_reviewers_type) == 'SEQUENTIAL') ? true : false;
3446
- const programCustomTags = ((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
3444
+ if ((_c = this.orgDetails) === null || _c === void 0 ? void 0 : _c.hasProgramFullPermission) {
3445
+ this.responsibilityForm.assignees.whoCanComplete = (((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.default_assignee_type) == 'ANYONE') ? 'ANY_ONE' : 'ALL';
3446
+ this.responsibilityForm.reviewers.sequentialWorkflow = (((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.default_reviewers_type) == 'SEQUENTIAL') ? true : false;
3447
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f.evidence_upload_flag) ? true : false;
3448
+ }
3449
+ const programCustomTags = ((_g = this.selectedProgram) === null || _g === void 0 ? void 0 : _g.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
3447
3450
  programCustomTags.forEach((tag) => {
3448
3451
  const tagData = JSON.parse(tag);
3449
3452
  const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
@@ -3451,16 +3454,15 @@ class WorkflowComplianceComponent {
3451
3454
  this.responsibilityForm.customTags.push(tagData);
3452
3455
  }
3453
3456
  });
3454
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f.evidence_upload_flag) ? true : false;
3455
3457
  const checkedMoreOptions = [];
3456
3458
  this.moreOptions.PROGRAM = true;
3457
3459
  checkedMoreOptions.push('PROGRAM');
3458
- if ((_g = this.selectedProgram) === null || _g === void 0 ? void 0 : _g.evidence_upload_flag) {
3460
+ if (((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h.evidence_upload_flag) && ((_j = this.orgDetails) === null || _j === void 0 ? void 0 : _j.hasProgramFullPermission)) {
3459
3461
  checkedMoreOptions.push('FORMATE_EVIDENCE');
3460
3462
  this.moreOptions.FORMATE_EVIDENCE = true;
3461
3463
  }
3462
3464
  this.populateOption.emit(checkedMoreOptions);
3463
- this.filterListsAccordingToProgram((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h._id);
3465
+ this.filterListsAccordingToProgram((_k = this.selectedProgram) === null || _k === void 0 ? void 0 : _k._id);
3464
3466
  }
3465
3467
  }
3466
3468
  }
@@ -3471,7 +3473,7 @@ class WorkflowComplianceComponent {
3471
3473
  }
3472
3474
  }
3473
3475
  saveSelectedList(type, selectedItems) {
3474
- 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;
3476
+ 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;
3475
3477
  switch (type) {
3476
3478
  case 'assignors':
3477
3479
  if (this.invalidType === 'whom') {
@@ -3572,13 +3574,14 @@ class WorkflowComplianceComponent {
3572
3574
  });
3573
3575
  if ((_w = this.orgDetails) === null || _w === void 0 ? void 0 : _w.hasProgramFullPermission) {
3574
3576
  this.responsibilityForm.assignees.whoCanComplete = (((_x = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _x === void 0 ? void 0 : _x.default_assignee_type) == 'ANYONE') ? 'ANY_ONE' : 'ALL';
3575
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_y = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _y === void 0 ? void 0 : _y.evidence_upload_flag) ? true : false;
3576
- if ((_z = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _z === void 0 ? void 0 : _z.evidence_upload_flag) {
3577
+ this.responsibilityForm.reviewers.sequentialWorkflow = (((_y = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _y === void 0 ? void 0 : _y.default_reviewers_type) == 'SEQUENTIAL') ? true : false;
3578
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_z = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _z === void 0 ? void 0 : _z.evidence_upload_flag) ? true : false;
3579
+ if ((_0 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _0 === void 0 ? void 0 : _0.evidence_upload_flag) {
3577
3580
  this.moreOptions.FORMATE_EVIDENCE = true;
3578
3581
  }
3579
3582
  }
3580
- if (!(((_0 = this.selectedProgram) === null || _0 === void 0 ? void 0 : _0.programType) === 0 && ((_2 = (_1 = this.selectedProgram) === null || _1 === void 0 ? void 0 : _1.name) === null || _2 === void 0 ? void 0 : _2.toLowerCase()) === 'uncategorized')) {
3581
- if ((_3 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _3 === void 0 ? void 0 : _3._id) {
3583
+ if (!(((_1 = this.selectedProgram) === null || _1 === void 0 ? void 0 : _1.programType) === 0 && ((_3 = (_2 = this.selectedProgram) === null || _2 === void 0 ? void 0 : _2.name) === null || _3 === void 0 ? void 0 : _3.toLowerCase()) === 'uncategorized')) {
3584
+ if ((_4 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _4 === void 0 ? void 0 : _4._id) {
3582
3585
  this.filterListsAccordingToProgram(selectedItems.program._id);
3583
3586
  }
3584
3587
  else {
@@ -3630,10 +3633,10 @@ class WorkflowComplianceComponent {
3630
3633
  this.responsibilityForm.riskMatrix = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskMatrix;
3631
3634
  break;
3632
3635
  case 'formate_evidence':
3633
- this.responsibilityForm.formatAndEvidence.formatRequired = (_4 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _4 !== void 0 ? _4 : false;
3634
- this.responsibilityForm.formatAndEvidence.formatFiles = (_5 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _5 !== void 0 ? _5 : [];
3635
- this.responsibilityForm.formatAndEvidence.formatLinks = (_6 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _6 !== void 0 ? _6 : [];
3636
- this.responsibilityForm.formatAndEvidence.evidenceRequired = (_7 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _7 !== void 0 ? _7 : false;
3636
+ this.responsibilityForm.formatAndEvidence.formatRequired = (_5 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _5 !== void 0 ? _5 : false;
3637
+ this.responsibilityForm.formatAndEvidence.formatFiles = (_6 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _6 !== void 0 ? _6 : [];
3638
+ this.responsibilityForm.formatAndEvidence.formatLinks = (_7 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _7 !== void 0 ? _7 : [];
3639
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = (_8 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _8 !== void 0 ? _8 : false;
3637
3640
  break;
3638
3641
  case 'reviewFrequency':
3639
3642
  this.responsibilityForm.reviewers.reviewFrequency = {