vcomply-workflow-engine 6.1.1 → 6.1.2

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.
@@ -2308,6 +2308,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2308
2308
  }]
2309
2309
  }] });
2310
2310
 
2311
+ const CONSTANTS$1 = {
2312
+ categoryType: [
2313
+ { label: 'REGULATIONS', value: 1 },
2314
+ { label: 'STANDARDS', value: 2 },
2315
+ { label: 'INTERNAL CONTROLS', value: 3 },
2316
+ { label: 'OTHERS', value: 0 },
2317
+ ],
2318
+ performanceCalculation: [
2319
+ { label: 'PAST EVENTS ONLY', value: 'PAST_EVENT' },
2320
+ { label: 'PAST & UPCOMING EVENTS', value: 'UPCOMING_EVENT' },
2321
+ ],
2322
+ dateConfig: {
2323
+ disableKeypress: true,
2324
+ format: 'DD MMM YYYY',
2325
+ unSelectOnClick: true,
2326
+ openOnClick: false,
2327
+ openOnFocus: false,
2328
+ min: new Date().getDate().toString(),
2329
+ },
2330
+ description: {
2331
+ mode: 'prime',
2332
+ colorPalette: true,
2333
+ link: true,
2334
+ file: true,
2335
+ id: 'description',
2336
+ placeholder: 'Add a description for this Program',
2337
+ },
2338
+ objective: {
2339
+ mode: 'prime',
2340
+ colorPalette: true,
2341
+ link: true,
2342
+ file: false,
2343
+ id: 'objective',
2344
+ placeholder: 'What is the objective of this program?',
2345
+ },
2346
+ additionalOption: {
2347
+ REVIEWER: false,
2348
+ OVERSEER: false,
2349
+ ASSESSMENT: false,
2350
+ FORMATE_EVIDENCE: false,
2351
+ CUSTOM_FIELDS: false,
2352
+ PROGRAM_FREQUENCY: false,
2353
+ SCOPE_CHANGES: false,
2354
+ RC: false,
2355
+ ROLES: false,
2356
+ OWNERS: false,
2357
+ APPROVER: false,
2358
+ ASSIGNEES: false,
2359
+ },
2360
+ };
2361
+ const COLLABORATOR_TOOLTIP = `<strong>Collaborators</strong> can only access responsibilities in this program where they are directly involved, such as creator, reviewer, assignor, oversight user, or collaborator.<br>
2362
+ <br>
2363
+ This role is ideal for users who need to work on specific tasks but shouldn't see the entire program’s contents.
2364
+ <br>
2365
+ <br>
2366
+ <em>Example:</em> In an AML (Anti-Money Laundering) program, the Finance lead added as a collaborator will only see responsibilities related to financial reporting or audits they are linked to, not those owned by Legal or Compliance.`;
2367
+ const COLLABORATOR_PLACEHODLER = `Select users that can collaborate in this Program`;
2368
+ const COLLABORATOR_TOOLTIP_TEXT = `This user has already been selected as a Program Owner.`;
2369
+
2311
2370
  class TooltipMessagePipe {
2312
2371
  transform(value, ...args) {
2313
2372
  let responsibilityType = args[0];
@@ -2360,7 +2419,10 @@ class TooltipMessagePipe {
2360
2419
  }
2361
2420
  return currentUser?.member_email ?? currentUser?.employee_email;
2362
2421
  case "collaborator":
2363
- return "This user has already been selected as a Program Owner.";
2422
+ if (isDisabled) {
2423
+ return COLLABORATOR_TOOLTIP_TEXT;
2424
+ }
2425
+ return currentUser?.member_email ?? currentUser?.employee_email;
2364
2426
  default:
2365
2427
  return isDisabled ? "" : currentUser?.member_email ?? currentUser?.employee_email;
2366
2428
  }
@@ -15447,7 +15509,7 @@ class UserGroupListComponent {
15447
15509
  const isChecked = evt?.target?.checked === true;
15448
15510
  const sourceUsers = this.fromResponsibility ? this.disableUsers() : this.usersList;
15449
15511
  if (isChecked) {
15450
- this.selectedUsers = sourceUsers.filter((user) => !this.disabledIds.includes(user?.member_id));
15512
+ this.selectedUsers = sourceUsers;
15451
15513
  this.selectedUserIds = this.selectedUsers.map((user) => user?.member_id);
15452
15514
  }
15453
15515
  else {
@@ -15642,6 +15704,9 @@ class UserGroupListComponent {
15642
15704
  this.reviewerIds?.includes(user?.member_id) ||
15643
15705
  this.assigneeIds?.includes(user?.member_id)));
15644
15706
  break;
15707
+ case 'collaborator':
15708
+ this.nonDisabledUsers = this.usersList.filter((user) => !(this.disabledIds?.includes(user?.member_id)));
15709
+ break;
15645
15710
  default:
15646
15711
  }
15647
15712
  return this.nonDisabledUsers;
@@ -34548,7 +34613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
34548
34613
  args: ['what']
34549
34614
  }] } });
34550
34615
 
34551
- const CONSTANTS$1 = {
34616
+ const CONSTANTS = {
34552
34617
  DEFAULT_PAGE_NUMBER: 1,
34553
34618
  PAGE_IN_SINGLE_VIEW: 5,
34554
34619
  NO_DATA_IMAGE_TEXT: 'No data to display.',
@@ -36905,7 +36970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
36905
36970
  class LinkRelatedPoliciesComponent {
36906
36971
  constructor(policyService) {
36907
36972
  this.policyService = policyService;
36908
- this.CONSTANTS = CONSTANTS$1;
36973
+ this.CONSTANTS = CONSTANTS;
36909
36974
  this.LINKS = LINKS;
36910
36975
  this.animation = false;
36911
36976
  this.unsubscribe = new Subject();
@@ -36917,7 +36982,7 @@ class LinkRelatedPoliciesComponent {
36917
36982
  policy: '',
36918
36983
  };
36919
36984
  this.loader = false;
36920
- this.recentPage = CONSTANTS$1.DEFAULT_PAGE_NUMBER;
36985
+ this.recentPage = CONSTANTS.DEFAULT_PAGE_NUMBER;
36921
36986
  this.policiesList = {
36922
36987
  from: 1,
36923
36988
  to: 0,
@@ -36931,7 +36996,7 @@ class LinkRelatedPoliciesComponent {
36931
36996
  this.policyId = '';
36932
36997
  this.closeLinkPolicyList = new EventEmitter();
36933
36998
  this.selectedList = new EventEmitter();
36934
- this.recentPage = CONSTANTS$1.DEFAULT_PAGE_NUMBER;
36999
+ this.recentPage = CONSTANTS.DEFAULT_PAGE_NUMBER;
36935
37000
  }
36936
37001
  ngOnInit() {
36937
37002
  this.selectedPolicyList = [...new Set(this.selectedPolicies)];
@@ -36956,7 +37021,7 @@ class LinkRelatedPoliciesComponent {
36956
37021
  this.getPolicies({ search: true });
36957
37022
  }
36958
37023
  if (!event) {
36959
- this.recentPage = CONSTANTS$1.DEFAULT_PAGE_NUMBER;
37024
+ this.recentPage = CONSTANTS.DEFAULT_PAGE_NUMBER;
36960
37025
  this.getPolicies({ search: false });
36961
37026
  }
36962
37027
  }
@@ -36980,7 +37045,7 @@ class LinkRelatedPoliciesComponent {
36980
37045
  params = params.append('sortBy', this.policySortBy);
36981
37046
  }
36982
37047
  if (this.mode === 'EDIT') {
36983
- params = params.append(CONSTANTS$1.POLICY_ID, this.policyId);
37048
+ params = params.append(CONSTANTS.POLICY_ID, this.policyId);
36984
37049
  }
36985
37050
  return params;
36986
37051
  }
@@ -37083,7 +37148,7 @@ class WorkflowPolicyComponent {
37083
37148
  this.complianceCommonService = complianceCommonService;
37084
37149
  this.iframeService = iframeService;
37085
37150
  this.ASSETS = ASSETS;
37086
- this.CONSTANTS = CONSTANTS$1;
37151
+ this.CONSTANTS = CONSTANTS;
37087
37152
  this.LINKS = LINKS;
37088
37153
  this.pickerChanged = new EventEmitter();
37089
37154
  this.mode = 'CREATE';
@@ -39026,64 +39091,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
39026
39091
  args: ['document:click', ['$event']]
39027
39092
  }] } });
39028
39093
 
39029
- const CONSTANTS = {
39030
- categoryType: [
39031
- { label: 'REGULATIONS', value: 1 },
39032
- { label: 'STANDARDS', value: 2 },
39033
- { label: 'INTERNAL CONTROLS', value: 3 },
39034
- { label: 'OTHERS', value: 0 },
39035
- ],
39036
- performanceCalculation: [
39037
- { label: 'PAST EVENTS ONLY', value: 'PAST_EVENT' },
39038
- { label: 'PAST & UPCOMING EVENTS', value: 'UPCOMING_EVENT' },
39039
- ],
39040
- dateConfig: {
39041
- disableKeypress: true,
39042
- format: 'DD MMM YYYY',
39043
- unSelectOnClick: true,
39044
- openOnClick: false,
39045
- openOnFocus: false,
39046
- min: new Date().getDate().toString(),
39047
- },
39048
- description: {
39049
- mode: 'prime',
39050
- colorPalette: true,
39051
- link: true,
39052
- file: true,
39053
- id: 'description',
39054
- placeholder: 'Add a description for this Program',
39055
- },
39056
- objective: {
39057
- mode: 'prime',
39058
- colorPalette: true,
39059
- link: true,
39060
- file: false,
39061
- id: 'objective',
39062
- placeholder: 'What is the objective of this program?',
39063
- },
39064
- additionalOption: {
39065
- REVIEWER: false,
39066
- OVERSEER: false,
39067
- ASSESSMENT: false,
39068
- FORMATE_EVIDENCE: false,
39069
- CUSTOM_FIELDS: false,
39070
- PROGRAM_FREQUENCY: false,
39071
- SCOPE_CHANGES: false,
39072
- RC: false,
39073
- ROLES: false,
39074
- OWNERS: false,
39075
- APPROVER: false,
39076
- ASSIGNEES: false,
39077
- },
39078
- };
39079
- const COLLABORATOR_TOOLTIP = `<strong>Collaborators</strong> can only access responsibilities in this program where they are directly involved, such as creator, reviewer, assignor, oversight user, or collaborator.<br>
39080
- <br>
39081
- This role is ideal for users who need to work on specific tasks but shouldn't see the entire program’s contents.
39082
- <br>
39083
- <br>
39084
- <em>Example:</em> In an AML (Anti-Money Laundering) program, the Finance lead added as a collaborator will only see responsibilities related to financial reporting or audits they are linked to, not those owned by Legal or Compliance.`;
39085
- const COLLABORATOR_PLACEHODLER = `Select users that can collaborate in this Program`;
39086
-
39087
39094
  class PopoverHoverService {
39088
39095
  constructor() { }
39089
39096
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PopoverHoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -45122,7 +45129,7 @@ class WorkflowProgramComponent {
45122
45129
  this.iframeService = iframeService;
45123
45130
  this.changeRef = changeRef;
45124
45131
  this.ASSETS = ASSETS;
45125
- this.constants = CONSTANTS;
45132
+ this.constants = CONSTANTS$1;
45126
45133
  this.isAscentAllowed = false;
45127
45134
  this.ff_rc_listing = false;
45128
45135
  this.datePickerOverlay = false;
@@ -45315,7 +45322,7 @@ class WorkflowProgramComponent {
45315
45322
  'DEFAULT_OVERSEER',
45316
45323
  'OVERSEER',
45317
45324
  ];
45318
- this.additionalOption = { ...CONSTANTS.additionalOption };
45325
+ this.additionalOption = { ...CONSTANTS$1.additionalOption };
45319
45326
  this.activeList = '';
45320
45327
  this.fileUploadTracker = {
45321
45328
  description: [],
@@ -45507,8 +45514,9 @@ class WorkflowProgramComponent {
45507
45514
  }
45508
45515
  refreshList() {
45509
45516
  let selectedOwner = this.controls?.program_owners?.value?.map((ele) => ele.member_id);
45510
- let disableCollaborator = this.lists?.COLLABORATORS?.data?.filter((user) => selectedOwner?.includes(user?.member_id));
45511
- this.disableCollaboratorIds = this.returnIds(disableCollaborator, 'member_id');
45517
+ this.disableCollaboratorIds = this.lists?.COLLABORATORS?.data?.filter((user) => selectedOwner?.includes(user?.member_id)).map((ele) => ele?.member_id);
45518
+ const selectedCollaborator = this.controls?.program_collaborator?.value?.filter((ele) => !selectedOwner.includes(ele.member_id));
45519
+ this.listAction({ users: selectedCollaborator }, 'COLLABORATOR');
45512
45520
  }
45513
45521
  removeRole(evt) {
45514
45522
  this.onRemovingRole.emit(evt);
@@ -45655,8 +45663,8 @@ class WorkflowProgramComponent {
45655
45663
  this.setFormField('program_roles', defaultVal);
45656
45664
  this.fetchUsersAssociatedWithRoles();
45657
45665
  this.fetchGroupsAssociatedWithRoles();
45658
- this.fetchUserWithManageProgramsRole();
45659
45666
  }
45667
+ this.fetchUserWithManageProgramsRole();
45660
45668
  },
45661
45669
  error: (err) => { },
45662
45670
  });
@@ -45702,8 +45710,12 @@ class WorkflowProgramComponent {
45702
45710
  });
45703
45711
  }
45704
45712
  fetchUserWithManageProgramsRole() {
45713
+ if (this.lists.COLLABORATORS.length) {
45714
+ return;
45715
+ }
45705
45716
  this.programService.fetchAllRoleUsers(this.manageProgramsRoleId).subscribe({
45706
45717
  next: (res) => {
45718
+ res.data = res?.data?.filter((ele) => ele?.user_role === 'MANAGER');
45707
45719
  this.lists.COLLABORATORS = res;
45708
45720
  },
45709
45721
  });
@@ -45997,6 +46009,7 @@ class WorkflowProgramComponent {
45997
46009
  this.scrollToBottom = false;
45998
46010
  this.showSmiley = false;
45999
46011
  this.loader = true;
46012
+ this.disableCollaboratorIds = [];
46000
46013
  const DEFAULT_VALUES = {
46001
46014
  program_type: 1,
46002
46015
  program_name: '',
@@ -46187,6 +46200,7 @@ class WorkflowProgramComponent {
46187
46200
  this.additionalOption.COLLABORATOR = true;
46188
46201
  }
46189
46202
  this.populateOptionalFields();
46203
+ this.refreshList();
46190
46204
  }
46191
46205
  }
46192
46206
  },