vcomply-workflow-engine 2.3.24 → 2.4.1

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.
@@ -2733,6 +2733,9 @@ class WorkflowComplianceComponent {
2733
2733
  const notifyOverseers = this.assigneesList.filter((element) => this.responsibilityForm.program[0].default_overseers.failure_cc_email.includes(element.my_member_id));
2734
2734
  if (overseers.length) {
2735
2735
  this.responsibilityForm.overseers.list = overseers;
2736
+ this.moreOptions.OVERSEER = true;
2737
+ }
2738
+ if (notifyOverseers.length) {
2736
2739
  this.responsibilityForm.notifyList.list = notifyOverseers;
2737
2740
  this.moreOptions.OVERSEER = true;
2738
2741
  }
@@ -2969,7 +2972,7 @@ class WorkflowComplianceComponent {
2969
2972
  }
2970
2973
  }
2971
2974
  checkWhetherAllListsLoaded() {
2972
- var _a, _b, _c, _d;
2975
+ var _a, _b, _c, _d, _e, _f;
2973
2976
  if (this.rcListLoaded && this.assigneesListLoaded && this.assignorsListLoaded &&
2974
2977
  this.categoriesListLoaded && this.assuranceCategoryListLoaded && this.groupsListLoaded) {
2975
2978
  if (this.frameworkDetails.length > 0) {
@@ -2984,8 +2987,8 @@ class WorkflowComplianceComponent {
2984
2987
  if (this.selectedProgram) {
2985
2988
  this.responsibilityForm.program.push(this.selectedProgram);
2986
2989
  this.responsibilityForm.program_selected_ids.push(this.selectedProgram.category_id);
2987
- this.responsibilityForm.category_id = this.selectedProgram.category_id;
2988
- const programCustomTags = ((_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
2990
+ 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();
2991
+ const programCustomTags = ((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
2989
2992
  programCustomTags.forEach((tag) => {
2990
2993
  const tagData = JSON.parse(tag);
2991
2994
  const index = this.responsibilityForm.customTags.findIndex((tagElement) => tagElement.tag_name == tagData.tag_name);
@@ -2993,16 +2996,16 @@ class WorkflowComplianceComponent {
2993
2996
  this.responsibilityForm.customTags.push(tagData);
2994
2997
  }
2995
2998
  });
2996
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.evidence_upload_flag) ? true : false;
2999
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.evidence_upload_flag) ? true : false;
2997
3000
  const checkedMoreOptions = [];
2998
3001
  this.moreOptions.PROGRAM = true;
2999
3002
  checkedMoreOptions.push('PROGRAM');
3000
- if ((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.evidence_upload_flag) {
3003
+ if ((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.evidence_upload_flag) {
3001
3004
  checkedMoreOptions.push('FORMATE_EVIDENCE');
3002
3005
  this.moreOptions.FORMATE_EVIDENCE = true;
3003
3006
  }
3004
3007
  this.populateOption.emit(checkedMoreOptions);
3005
- this.filterListsAccordingToProgram((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d._id);
3008
+ this.filterListsAccordingToProgram((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f._id);
3006
3009
  }
3007
3010
  }
3008
3011
  }
@@ -22367,7 +22370,7 @@ class ProgramListingComponent {
22367
22370
  this.allCategories = [];
22368
22371
  }
22369
22372
  ngOnInit() {
22370
- var _a;
22373
+ var _a, _b;
22371
22374
  this.animation = true;
22372
22375
  setTimeout(() => {
22373
22376
  this.animation = false;
@@ -22393,7 +22396,7 @@ class ProgramListingComponent {
22393
22396
  }
22394
22397
  this.getSelectedProgramCount();
22395
22398
  }
22396
- if (this.selectedCategories) {
22399
+ if ((_b = this.selectedCategories) === null || _b === void 0 ? void 0 : _b.length) {
22397
22400
  this.populateCategories();
22398
22401
  }
22399
22402
  if (this.hideProgramsList) {
@@ -23563,7 +23566,23 @@ class WorkflowProgramComponent {
23563
23566
  const roleIds = (_b = (_a = this.controls.program_roles) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.map((ele) => ele === null || ele === void 0 ? void 0 : ele._id);
23564
23567
  this.programService.fetchAllRoleGroups(roleIds).subscribe({
23565
23568
  next: (res) => {
23569
+ var _a, _b;
23566
23570
  this.lists.OWNERS_GROUPS = res;
23571
+ const roleIds = (_a = this.controls.program_roles) === null || _a === void 0 ? void 0 : _a.value.map((ele) => ele._id);
23572
+ const groupDetails = (_b = this.controls.program_owners_group) === null || _b === void 0 ? void 0 : _b.value.filter((roleId) => {
23573
+ if (roleId.roles.length) {
23574
+ let isSameRole = false;
23575
+ roleId.roles.forEach((role) => {
23576
+ if (roleIds.includes(role.roleId)) {
23577
+ isSameRole = true;
23578
+ }
23579
+ });
23580
+ if (isSameRole) {
23581
+ return roleId;
23582
+ }
23583
+ }
23584
+ });
23585
+ this.setFormField('program_owners_group', groupDetails);
23567
23586
  }
23568
23587
  });
23569
23588
  }