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.
@@ -3101,6 +3101,9 @@
3101
3101
  var notifyOverseers = _this.assigneesList.filter(function (element) { return _this.responsibilityForm.program[0].default_overseers.failure_cc_email.includes(element.my_member_id); });
3102
3102
  if (overseers.length) {
3103
3103
  _this.responsibilityForm.overseers.list = overseers;
3104
+ _this.moreOptions.OVERSEER = true;
3105
+ }
3106
+ if (notifyOverseers.length) {
3104
3107
  _this.responsibilityForm.notifyList.list = notifyOverseers;
3105
3108
  _this.moreOptions.OVERSEER = true;
3106
3109
  }
@@ -3342,7 +3345,7 @@
3342
3345
  };
3343
3346
  WorkflowComplianceComponent.prototype.checkWhetherAllListsLoaded = function () {
3344
3347
  var _this = this;
3345
- var _a, _b, _c, _d;
3348
+ var _a, _b, _c, _d, _e, _f;
3346
3349
  if (this.rcListLoaded && this.assigneesListLoaded && this.assignorsListLoaded &&
3347
3350
  this.categoriesListLoaded && this.assuranceCategoryListLoaded && this.groupsListLoaded) {
3348
3351
  if (this.frameworkDetails.length > 0) {
@@ -3357,8 +3360,8 @@
3357
3360
  if (this.selectedProgram) {
3358
3361
  this.responsibilityForm.program.push(this.selectedProgram);
3359
3362
  this.responsibilityForm.program_selected_ids.push(this.selectedProgram.category_id);
3360
- this.responsibilityForm.category_id = this.selectedProgram.category_id;
3361
- var programCustomTags = ((_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
3363
+ 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();
3364
+ var programCustomTags = ((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
3362
3365
  programCustomTags.forEach(function (tag) {
3363
3366
  var tagData = JSON.parse(tag);
3364
3367
  var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
@@ -3366,16 +3369,16 @@
3366
3369
  _this.responsibilityForm.customTags.push(tagData);
3367
3370
  }
3368
3371
  });
3369
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.evidence_upload_flag) ? true : false;
3372
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.evidence_upload_flag) ? true : false;
3370
3373
  var checkedMoreOptions = [];
3371
3374
  this.moreOptions.PROGRAM = true;
3372
3375
  checkedMoreOptions.push('PROGRAM');
3373
- if ((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.evidence_upload_flag) {
3376
+ if ((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.evidence_upload_flag) {
3374
3377
  checkedMoreOptions.push('FORMATE_EVIDENCE');
3375
3378
  this.moreOptions.FORMATE_EVIDENCE = true;
3376
3379
  }
3377
3380
  this.populateOption.emit(checkedMoreOptions);
3378
- this.filterListsAccordingToProgram((_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d._id);
3381
+ this.filterListsAccordingToProgram((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f._id);
3379
3382
  }
3380
3383
  }
3381
3384
  }
@@ -23623,7 +23626,7 @@
23623
23626
  }
23624
23627
  ProgramListingComponent.prototype.ngOnInit = function () {
23625
23628
  var _this = this;
23626
- var _a;
23629
+ var _a, _b;
23627
23630
  this.animation = true;
23628
23631
  setTimeout(function () {
23629
23632
  _this.animation = false;
@@ -23649,7 +23652,7 @@
23649
23652
  }
23650
23653
  this.getSelectedProgramCount();
23651
23654
  }
23652
- if (this.selectedCategories) {
23655
+ if ((_b = this.selectedCategories) === null || _b === void 0 ? void 0 : _b.length) {
23653
23656
  this.populateCategories();
23654
23657
  }
23655
23658
  if (this.hideProgramsList) {
@@ -24850,7 +24853,23 @@
24850
24853
  var roleIds = (_b = (_a = this.controls.program_roles) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.map(function (ele) { return ele === null || ele === void 0 ? void 0 : ele._id; });
24851
24854
  this.programService.fetchAllRoleGroups(roleIds).subscribe({
24852
24855
  next: function (res) {
24856
+ var _a, _b;
24853
24857
  _this.lists.OWNERS_GROUPS = res;
24858
+ var roleIds = (_a = _this.controls.program_roles) === null || _a === void 0 ? void 0 : _a.value.map(function (ele) { return ele._id; });
24859
+ var groupDetails = (_b = _this.controls.program_owners_group) === null || _b === void 0 ? void 0 : _b.value.filter(function (roleId) {
24860
+ if (roleId.roles.length) {
24861
+ var isSameRole_1 = false;
24862
+ roleId.roles.forEach(function (role) {
24863
+ if (roleIds.includes(role.roleId)) {
24864
+ isSameRole_1 = true;
24865
+ }
24866
+ });
24867
+ if (isSameRole_1) {
24868
+ return roleId;
24869
+ }
24870
+ }
24871
+ });
24872
+ _this.setFormField('program_owners_group', groupDetails);
24854
24873
  }
24855
24874
  });
24856
24875
  };