vcomply-workflow-engine 6.0.96 → 6.0.97

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.
@@ -15447,7 +15447,7 @@ class UserGroupListComponent {
15447
15447
  const isChecked = evt?.target?.checked === true;
15448
15448
  const sourceUsers = this.fromResponsibility ? this.disableUsers() : this.usersList;
15449
15449
  if (isChecked) {
15450
- this.selectedUsers = sourceUsers.filter((user) => !this.disabledIds.includes(user?.member_id));
15450
+ this.selectedUsers = sourceUsers;
15451
15451
  this.selectedUserIds = this.selectedUsers.map((user) => user?.member_id);
15452
15452
  }
15453
15453
  else {
@@ -15642,6 +15642,9 @@ class UserGroupListComponent {
15642
15642
  this.reviewerIds?.includes(user?.member_id) ||
15643
15643
  this.assigneeIds?.includes(user?.member_id)));
15644
15644
  break;
15645
+ case 'collaborator':
15646
+ this.nonDisabledUsers = this.usersList.filter((user) => !(this.disabledIds?.includes(user?.member_id)));
15647
+ break;
15645
15648
  default:
15646
15649
  }
15647
15650
  return this.nonDisabledUsers;
@@ -39421,17 +39424,6 @@ class MoreOptionComponent {
39421
39424
  checked: false,
39422
39425
  hidden: false,
39423
39426
  },
39424
- // {
39425
- // imageUrl: 'https://cdn.v-comply.com/libraries/workflow-engine/assets/workflow/category.svg',
39426
- // name: 'Program',
39427
- // code: 'CATEGORY',
39428
- // tooltipTitle: 'Program',
39429
- // tooltipMessage: `Programs enable you to group similar responsibilities together.
39430
- // Allocating a responsibility to a Program allows you to view a group or similar responsibilities at once.
39431
- // It also allows you to view the performance of those collective responsibilities.`,
39432
- // checked: false,
39433
- // hidden: false,
39434
- // },
39435
39427
  {
39436
39428
  imageUrl: ASSETS.responsibility_center,
39437
39429
  name: 'Responsibility Center',
@@ -39663,7 +39655,7 @@ class MoreOptionComponent {
39663
39655
  code: 'OWNERS',
39664
39656
  },
39665
39657
  {
39666
- imageUrl: 'https://cdn.v-comply.com/libraries/workflow-engine/assets/workflow/collaborator.svg',
39658
+ imageUrl: ASSETS.collaborator,
39667
39659
  name: 'Collaborators',
39668
39660
  tooltipTitle: 'Collaborators',
39669
39661
  tooltipMessage: COLLABORATOR_TOOLTIP,
@@ -45519,7 +45511,10 @@ class WorkflowProgramComponent {
45519
45511
  refreshList() {
45520
45512
  let selectedOwner = this.controls?.program_owners?.value?.map((ele) => ele.member_id);
45521
45513
  let disableCollaborator = this.lists?.COLLABORATORS?.data?.filter((user) => selectedOwner?.includes(user?.member_id));
45522
- this.disableCollaboratorIds = this.returnIds(disableCollaborator, 'member_id');
45514
+ const selectedCollaborator = this.controls?.program_collaborator?.value?.filter((ele) => !selectedOwner.includes(ele.member_id));
45515
+ console.log("selectedCollaborator", selectedCollaborator);
45516
+ this.disableCollaboratorIds = this.returnIds(disableCollaborator, 'member_id') ?? [];
45517
+ this.setFormField('program_collaborator', selectedCollaborator);
45523
45518
  }
45524
45519
  removeRole(evt) {
45525
45520
  this.onRemovingRole.emit(evt);
@@ -45713,8 +45708,12 @@ class WorkflowProgramComponent {
45713
45708
  });
45714
45709
  }
45715
45710
  fetchUserWithManageProgramsRole() {
45711
+ if (this.lists.COLLABORATORS.length) {
45712
+ return;
45713
+ }
45716
45714
  this.programService.fetchAllRoleUsers(this.manageProgramsRoleId).subscribe({
45717
45715
  next: (res) => {
45716
+ res.data = res?.data?.filter((ele) => ele?.user_role === 'MANAGER');
45718
45717
  this.lists.COLLABORATORS = res;
45719
45718
  },
45720
45719
  });