vcomply-workflow-engine 3.0.18 → 3.0.19

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.
@@ -3616,7 +3616,19 @@
3616
3616
  this.disableRadioAssignee = [];
3617
3617
  this.isResponsibilitySimplified = false;
3618
3618
  this.queryParam = '';
3619
- this.recentResponsibilityUrl = { "byResponsibilities": { "type": ["recent_responsibilities"], "subType": ["CC"] }, "byStatus": { "type": [], "subType": [] }, "filterObject": { "responsibilityCenter": [], "entrustedBy": [], "entrustedTo": [], "riskIds": [], "responsibilityCategory": [] }, "timePeriodDetails": { "type": "", "selectedPeriod": "", "selectedYear": "" }, "status": "" };
3619
+ this.recentResponsibilityUrl = {
3620
+ byResponsibilities: { type: ['recent_responsibilities'], subType: ['CC'] },
3621
+ byStatus: { type: [], subType: [] },
3622
+ filterObject: {
3623
+ responsibilityCenter: [],
3624
+ entrustedBy: [],
3625
+ entrustedTo: [],
3626
+ riskIds: [],
3627
+ responsibilityCategory: [],
3628
+ },
3629
+ timePeriodDetails: { type: '', selectedPeriod: '', selectedYear: '' },
3630
+ status: '',
3631
+ };
3620
3632
  this.isResponsibilityRcLinkEnabled = false;
3621
3633
  this.url = 'q={"byResponsibilities":{"type":["responsibilities_in_queue"],"subType":["CC"]},"byStatus":{"type":["responsibilities_in_queue"],"subType":[]},"filterObject":{"responsibilityCenter":[],"entrustedBy":[],"entrustedTo":[],"riskIds":[],"responsibilityCategory":[]},"timePeriodDetails":{"type":"","selectedPeriod":"","selectedYear":""},"status":""}';
3622
3634
  this.pickerChanged = new i0.EventEmitter();
@@ -3653,7 +3665,11 @@
3653
3665
  this.submitted = false;
3654
3666
  this.smileyMessage = "Done!";
3655
3667
  this.actionButtons = [
3656
- { buttonText: 'Entrust More Responsibilities', class: 'white-btn', id: 'addMore' },
3668
+ {
3669
+ buttonText: 'Entrust More Responsibilities',
3670
+ class: 'white-btn',
3671
+ id: 'addMore',
3672
+ },
3657
3673
  { buttonText: 'View Responsibilities', class: 'blue-btn', id: 'view' },
3658
3674
  ];
3659
3675
  this.showSmiley = false;
@@ -3697,7 +3713,7 @@
3697
3713
  this.responsibilityForm = {
3698
3714
  assignors: {
3699
3715
  enable: false,
3700
- list: []
3716
+ list: [],
3701
3717
  },
3702
3718
  responsibility: {
3703
3719
  name: '',
@@ -3705,11 +3721,11 @@
3705
3721
  },
3706
3722
  assigneeGroups: {
3707
3723
  whoCanComplete: 'ANYONE',
3708
- list: []
3724
+ list: [],
3709
3725
  },
3710
3726
  assignees: {
3711
3727
  whoCanComplete: 'ALL',
3712
- list: []
3728
+ list: [],
3713
3729
  },
3714
3730
  frequency: '',
3715
3731
  description: '',
@@ -3726,25 +3742,25 @@
3726
3742
  sequentialWorkflow: true,
3727
3743
  reviewFrequency: {
3728
3744
  reviewCompleteDays: 2,
3729
- reviewNOtCompletedDays: 2
3745
+ reviewNOtCompletedDays: 2,
3730
3746
  },
3731
- list: []
3747
+ list: [],
3732
3748
  },
3733
3749
  groupReviewers: {
3734
3750
  sequentialWorkflow: true,
3735
3751
  reviewFrequency: {
3736
3752
  reviewCompleteDays: 2,
3737
- reviewNOtCompletedDays: 2
3753
+ reviewNOtCompletedDays: 2,
3738
3754
  },
3739
- list: []
3755
+ list: [],
3740
3756
  },
3741
3757
  overseers: {
3742
3758
  notifyList: [],
3743
- list: []
3759
+ list: [],
3744
3760
  },
3745
3761
  overseersGroups: {
3746
3762
  notifyList: [],
3747
- list: []
3763
+ list: [],
3748
3764
  },
3749
3765
  formatAndEvidence: {
3750
3766
  formatRequired: false,
@@ -3761,10 +3777,11 @@
3761
3777
  sample: 5,
3762
3778
  percentage: 30,
3763
3779
  frequency_pattern: '1~0~3~1',
3764
- frequency_time: '23:59:00'
3780
+ frequency_time: '23:59:00',
3765
3781
  },
3766
3782
  assessment: {
3767
- category_id: '', assessment_id: ''
3783
+ category_id: '',
3784
+ assessment_id: '',
3768
3785
  },
3769
3786
  new_checkpoints: {},
3770
3787
  linkedProgram: [],
@@ -3783,10 +3800,28 @@
3783
3800
  ASSURANCE: false,
3784
3801
  APPS: false,
3785
3802
  REQUIRES_AUDIT: false,
3786
- CHECKPOINTS_NEW: false
3803
+ CHECKPOINTS_NEW: false,
3787
3804
  };
3788
3805
  this.activeSelector = '';
3789
- this.sideSelectorElements = ['assurance', 'framework', 'assignors', 'assignees', 'category', 'program', 'rc', 'checkpoints', 'frequency', 'reviewer', 'reviewerFrequency', 'overseer', 'overseerNotify', 'riskCalculator', 'isAssessment', 'requires_audit', 'checkpoints-new'];
3806
+ this.sideSelectorElements = [
3807
+ 'assurance',
3808
+ 'framework',
3809
+ 'assignors',
3810
+ 'assignees',
3811
+ 'category',
3812
+ 'program',
3813
+ 'rc',
3814
+ 'checkpoints',
3815
+ 'frequency',
3816
+ 'reviewer',
3817
+ 'reviewerFrequency',
3818
+ 'overseer',
3819
+ 'overseerNotify',
3820
+ 'riskCalculator',
3821
+ 'isAssessment',
3822
+ 'requires_audit',
3823
+ 'checkpoints-new',
3824
+ ];
3790
3825
  this.focus = {
3791
3826
  responsibilityName: false,
3792
3827
  description: false,
@@ -3795,27 +3830,27 @@
3795
3830
  this.categories = {
3796
3831
  regulations: {
3797
3832
  list: [],
3798
- selectedList: []
3833
+ selectedList: [],
3799
3834
  },
3800
3835
  standards: {
3801
3836
  list: [],
3802
- selectedList: []
3837
+ selectedList: [],
3803
3838
  },
3804
3839
  internalControls: {
3805
3840
  list: [],
3806
- selectedList: []
3841
+ selectedList: [],
3807
3842
  },
3808
3843
  others: {
3809
3844
  list: [],
3810
- selectedList: []
3811
- }
3845
+ selectedList: [],
3846
+ },
3812
3847
  };
3813
3848
  this.allPrograms = [];
3814
3849
  this.riskClassification = [
3815
3850
  { name: 'Low', value: 1, class: 'low' },
3816
3851
  { name: 'Low-Medium', value: 2, class: 'low-med' },
3817
3852
  { name: 'Medium-High', value: 3, class: 'med-high' },
3818
- { name: 'High', value: 4, class: 'high' }
3853
+ { name: 'High', value: 4, class: 'high' },
3819
3854
  ];
3820
3855
  this.assignorMode = 'checkbox';
3821
3856
  this.rcMode = 'checkbox';
@@ -3837,7 +3872,7 @@
3837
3872
  time: '11:59 pm',
3838
3873
  failedTime: '',
3839
3874
  continuous_failed_days: 0,
3840
- onCompletionReportDetails: {}
3875
+ onCompletionReportDetails: {},
3841
3876
  };
3842
3877
  this.frequencyPlaceholder = 'How often does the responsibility occur?';
3843
3878
  this.shortMonth = [];
@@ -3861,7 +3896,9 @@
3861
3896
  this.authService.getUserInfo().subscribe(function (res) {
3862
3897
  var complianceSubmodule = res.roleActions[res.roleActions.findIndex(function (ele) { return ele.moduleName == 'compliance'; })].subModule;
3863
3898
  var permissions = complianceSubmodule[complianceSubmodule.findIndex(function (ele) { return ele.subModuleName == 'Programs'; })].permissions;
3864
- _this.managePermission = (permissions[permissions.findIndex(function (ele) { return ele.name == 'manage programs'; })].enable) ? true : false;
3899
+ _this.managePermission = permissions[permissions.findIndex(function (ele) { return ele.name == 'manage programs'; })].enable
3900
+ ? true
3901
+ : false;
3865
3902
  if (_this.managePermission) {
3866
3903
  _this.hiddenList.push('CATEGORY');
3867
3904
  _this.categoriesListLoaded = true;
@@ -3965,7 +4002,9 @@
3965
4002
  };
3966
4003
  WorkflowComplianceComponent.prototype.addMoreInfo = function (event) {
3967
4004
  this.scrollToBottom = true;
3968
- if (event.code === 'CHECKPOINTS_NEW' && event.checkpoint_new && this.checkpointCount) {
4005
+ if (event.code === 'CHECKPOINTS_NEW' &&
4006
+ event.checkpoint_new &&
4007
+ this.checkpointCount) {
3969
4008
  }
3970
4009
  else {
3971
4010
  this.moreOptions[event.code] = event.checked;
@@ -3996,7 +4035,11 @@
3996
4035
  _this.responsibilityForm.rc = _this.setList(_this.responsibilityCentersList, [_this.selectedRC], 'item_id');
3997
4036
  _this.moreOptions.RC = true;
3998
4037
  _this.actionButtons = [
3999
- { buttonText: 'Go to risk treatment', class: 'blue-btn', id: 'view' },
4038
+ {
4039
+ buttonText: 'Go to risk treatment',
4040
+ class: 'blue-btn',
4041
+ id: 'view',
4042
+ },
4000
4043
  ];
4001
4044
  // Previously there was only RC was emitting which made the checked options to de check now checking the condition and sending all the selected options
4002
4045
  var checkedMoreOptions = [];
@@ -4016,7 +4059,9 @@
4016
4059
  var _this = this;
4017
4060
  this.authService.getUserInfo().subscribe(function (res) {
4018
4061
  _this.isNotificationPending = res.notification_pending_flag;
4019
- _this.actionButtons[1].buttonText = _this.isNotificationPending ? 'View Responsibilities in Queue' : 'View Responsibilities';
4062
+ _this.actionButtons[1].buttonText = _this.isNotificationPending
4063
+ ? 'View Responsibilities in Queue'
4064
+ : 'View Responsibilities';
4020
4065
  });
4021
4066
  };
4022
4067
  WorkflowComplianceComponent.prototype.getAssurance = function () {
@@ -4025,7 +4070,9 @@
4025
4070
  this.responsibilityService.getAssurance().subscribe(function (res) {
4026
4071
  var _a;
4027
4072
  _this.assuranceCategoriesList = res;
4028
- if ((_this.subscriptionDetails && !_this.subscriptionDetails[0].assurance_flag) || ((_a = _this.assuranceCategoriesList) === null || _a === void 0 ? void 0 : _a.length) == 0) {
4073
+ if ((_this.subscriptionDetails &&
4074
+ !_this.subscriptionDetails[0].assurance_flag) ||
4075
+ ((_a = _this.assuranceCategoriesList) === null || _a === void 0 ? void 0 : _a.length) == 0) {
4029
4076
  _this.hiddenList.push('ASSURANCE');
4030
4077
  }
4031
4078
  _this.hideElementsFromMoreOptions.emit(_this.hiddenList);
@@ -4041,7 +4088,9 @@
4041
4088
  this.responsibilityService.getAssuranceForRequiresAudit().subscribe(function (res) {
4042
4089
  var _a;
4043
4090
  _this.assuranceRequiresAuditList = res;
4044
- if ((_this.subscriptionDetails && !_this.subscriptionDetails[0].audit_flag) || ((_a = _this.assuranceRequiresAuditList) === null || _a === void 0 ? void 0 : _a.length) == 0) {
4091
+ if ((_this.subscriptionDetails &&
4092
+ !_this.subscriptionDetails[0].audit_flag) ||
4093
+ ((_a = _this.assuranceRequiresAuditList) === null || _a === void 0 ? void 0 : _a.length) == 0) {
4045
4094
  _this.hiddenList.push('REQUIRES_AUDIT');
4046
4095
  }
4047
4096
  _this.hideElementsFromMoreOptions.emit(_this.hiddenList);
@@ -4106,16 +4155,29 @@
4106
4155
  this.loader = true;
4107
4156
  this.programService.getProgram(programId).subscribe(function (res) {
4108
4157
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4109
- if ((res === null || res === void 0 ? void 0 : res.assessment) && ((_a = res === null || res === void 0 ? void 0 : res.assessment) === null || _a === void 0 ? void 0 : _a.length) && ((_c = Object.keys((_b = _this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assessment)) === null || _c === void 0 ? void 0 : _c.length)) {
4110
- var categoryAssessment = res === null || res === void 0 ? void 0 : res.assessment.filter(function (assessment) { var _a, _b; return ((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.assessment) === null || _b === void 0 ? void 0 : _b.category_id) === (assessment === null || assessment === void 0 ? void 0 : assessment.category_id); });
4111
- if ((categoryAssessment === null || categoryAssessment === void 0 ? void 0 : categoryAssessment.length) && ((_e = (_d = categoryAssessment[0]) === null || _d === void 0 ? void 0 : _d.assessmentIds) === null || _e === void 0 ? void 0 : _e.length)) {
4158
+ if ((res === null || res === void 0 ? void 0 : res.assessment) &&
4159
+ ((_a = res === null || res === void 0 ? void 0 : res.assessment) === null || _a === void 0 ? void 0 : _a.length) &&
4160
+ ((_c = Object.keys((_b = _this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assessment)) === null || _c === void 0 ? void 0 : _c.length)) {
4161
+ var categoryAssessment = res === null || res === void 0 ? void 0 : res.assessment.filter(function (assessment) {
4162
+ var _a, _b;
4163
+ return ((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.assessment) === null || _b === void 0 ? void 0 : _b.category_id) ===
4164
+ (assessment === null || assessment === void 0 ? void 0 : assessment.category_id);
4165
+ });
4166
+ if ((categoryAssessment === null || categoryAssessment === void 0 ? void 0 : categoryAssessment.length) &&
4167
+ ((_e = (_d = categoryAssessment[0]) === null || _d === void 0 ? void 0 : _d.assessmentIds) === null || _e === void 0 ? void 0 : _e.length)) {
4112
4168
  var isExist = (_g = (_f = categoryAssessment[0]) === null || _f === void 0 ? void 0 : _f.assessmentIds) === null || _g === void 0 ? void 0 : _g.includes((_j = (_h = _this.responsibilityForm) === null || _h === void 0 ? void 0 : _h.assessment) === null || _j === void 0 ? void 0 : _j.assessment_id);
4113
4169
  if (!isExist) {
4114
- _this.responsibilityForm.assessment = { assessment_id: "", category_id: "" };
4170
+ _this.responsibilityForm.assessment = {
4171
+ assessment_id: '',
4172
+ category_id: '',
4173
+ };
4115
4174
  }
4116
4175
  }
4117
4176
  else {
4118
- _this.responsibilityForm.assessment = { assessment_id: "", category_id: "" };
4177
+ _this.responsibilityForm.assessment = {
4178
+ assessment_id: '',
4179
+ category_id: '',
4180
+ };
4119
4181
  }
4120
4182
  }
4121
4183
  _this.loader = false;
@@ -4216,7 +4278,8 @@
4216
4278
  reviewersList: __spreadArray([], __read(new Set(_this.reviewersList))),
4217
4279
  overseersList: __spreadArray([], __read(new Set(_this.overseersList))),
4218
4280
  };
4219
- if (((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_ids) || ((_c = _this.responsibilityForm.assignees.list) === null || _c === void 0 ? void 0 : _c.length)) {
4281
+ if (((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_ids) ||
4282
+ ((_c = _this.responsibilityForm.assignees.list) === null || _c === void 0 ? void 0 : _c.length)) {
4220
4283
  if ((_d = _this.responsibilityForm.assignees.list) === null || _d === void 0 ? void 0 : _d.length) {
4221
4284
  var ids = _this.returnIds(_this.responsibilityForm.assignees.list, 'my_member_id');
4222
4285
  var allIds_1 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set((_f = (_e = _this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.program[0]) === null || _f === void 0 ? void 0 : _f.default_assignee_ids)));
@@ -4229,7 +4292,10 @@
4229
4292
  }
4230
4293
  }
4231
4294
  else {
4232
- var assignors = _this.assigneesList.filter(function (element) { var _a, _b, _c; return (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_ids) === null || _c === void 0 ? void 0 : _c.includes(element === null || element === void 0 ? void 0 : element.my_member_id); });
4295
+ var assignors = _this.assigneesList.filter(function (element) {
4296
+ var _a, _b, _c;
4297
+ return (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_ids) === null || _c === void 0 ? void 0 : _c.includes(element === null || element === void 0 ? void 0 : element.my_member_id);
4298
+ });
4233
4299
  if (assignors === null || assignors === void 0 ? void 0 : assignors.length) {
4234
4300
  _this.responsibilityForm.assignees.list = assignors;
4235
4301
  }
@@ -4242,12 +4308,16 @@
4242
4308
  _this.populateProgramAssigneeGroup();
4243
4309
  }
4244
4310
  var checkedMoreOptions = [];
4245
- if (((_h = (_g = _this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.program[0]) === null || _h === void 0 ? void 0 : _h.default_reviewers) || ((_l = (_k = (_j = _this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.reviewers) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) || ((_p = (_o = (_m = _this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.groupReviewers) === null || _o === void 0 ? void 0 : _o.list) === null || _p === void 0 ? void 0 : _p.length)) {
4311
+ if (((_h = (_g = _this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.program[0]) === null || _h === void 0 ? void 0 : _h.default_reviewers) ||
4312
+ ((_l = (_k = (_j = _this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.reviewers) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) ||
4313
+ ((_p = (_o = (_m = _this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.groupReviewers) === null || _o === void 0 ? void 0 : _o.list) === null || _p === void 0 ? void 0 : _p.length)) {
4246
4314
  var ids = _this.returnIds(_this.responsibilityForm.reviewers.list, 'my_member_id');
4247
4315
  var allIds_2 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set(_this.responsibilityForm.program[0].default_reviewers)));
4248
4316
  var reviewers = _this.reviewersList.filter(function (element) { return allIds_2 === null || allIds_2 === void 0 ? void 0 : allIds_2.includes(element === null || element === void 0 ? void 0 : element.my_member_id); });
4249
4317
  // const reviewers = this.reviewersList.filter((element: any) => this.responsibilityForm.program[0].default_reviewers?.includes(element?.my_member_id));
4250
- if (((reviewers === null || reviewers === void 0 ? void 0 : reviewers.length) || (_this.featureFlag_groups && ((_s = (_r = (_q = _this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.groupReviewers) === null || _r === void 0 ? void 0 : _r.list) === null || _s === void 0 ? void 0 : _s.length) > 0))) {
4318
+ if ((reviewers === null || reviewers === void 0 ? void 0 : reviewers.length) ||
4319
+ (_this.featureFlag_groups &&
4320
+ ((_s = (_r = (_q = _this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.groupReviewers) === null || _r === void 0 ? void 0 : _r.list) === null || _s === void 0 ? void 0 : _s.length) > 0)) {
4251
4321
  _this.responsibilityForm.reviewers.list = reviewers;
4252
4322
  _this.responsibilityForm.reviewers.list = reviewers;
4253
4323
  if (_this.featureFlag_groups) {
@@ -4265,7 +4335,9 @@
4265
4335
  if (_this.featureFlag_groups) {
4266
4336
  _this.populateProgramReviewerGroup();
4267
4337
  }
4268
- if (_this.responsibilityForm.program[0].default_overseers || ((_v = (_u = (_t = _this.responsibilityForm) === null || _t === void 0 ? void 0 : _t.overseers) === null || _u === void 0 ? void 0 : _u.list) === null || _v === void 0 ? void 0 : _v.length) || ((_y = (_x = (_w = _this.responsibilityForm) === null || _w === void 0 ? void 0 : _w.overseers) === null || _x === void 0 ? void 0 : _x.notifyList) === null || _y === void 0 ? void 0 : _y.length)) {
4338
+ if (_this.responsibilityForm.program[0].default_overseers ||
4339
+ ((_v = (_u = (_t = _this.responsibilityForm) === null || _t === void 0 ? void 0 : _t.overseers) === null || _u === void 0 ? void 0 : _u.list) === null || _v === void 0 ? void 0 : _v.length) ||
4340
+ ((_y = (_x = (_w = _this.responsibilityForm) === null || _w === void 0 ? void 0 : _w.overseers) === null || _x === void 0 ? void 0 : _x.notifyList) === null || _y === void 0 ? void 0 : _y.length)) {
4269
4341
  var ids = _this.returnIds((_0 = (_z = _this.responsibilityForm) === null || _z === void 0 ? void 0 : _z.overseers) === null || _0 === void 0 ? void 0 : _0.list, 'my_member_id');
4270
4342
  var allDefaultCCIds_1 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set((_3 = (_2 = (_1 = _this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.program[0]) === null || _2 === void 0 ? void 0 : _2.default_overseers) === null || _3 === void 0 ? void 0 : _3.cc_email)));
4271
4343
  var overseersCC = (_4 = _this.overseersList) === null || _4 === void 0 ? void 0 : _4.filter(function (element) { return allDefaultCCIds_1 === null || allDefaultCCIds_1 === void 0 ? void 0 : allDefaultCCIds_1.includes(element === null || element === void 0 ? void 0 : element.my_member_id); });
@@ -4295,7 +4367,8 @@
4295
4367
  if (overseersCCFailure === null || overseersCCFailure === void 0 ? void 0 : overseersCCFailure.length) {
4296
4368
  _this.responsibilityForm.overseers.notifyList = overseersCCFailure;
4297
4369
  if (_this.featureFlag_groups) {
4298
- _this.responsibilityForm.overseers.notifyList = _this.assignUserMemberId(_this.responsibilityForm.overseers.notifyList);
4370
+ _this.responsibilityForm.overseers.notifyList =
4371
+ _this.assignUserMemberId(_this.responsibilityForm.overseers.notifyList);
4299
4372
  }
4300
4373
  _this.moreOptions.OVERSEER = true;
4301
4374
  }
@@ -4330,7 +4403,10 @@
4330
4403
  if (program_id) {
4331
4404
  params = params.append('program_ids', program_id);
4332
4405
  }
4333
- this.responsibilityService.getOrganizationGroups(params).pipe(rxjs.takeUntil(this.unSubscribeProgram)).subscribe(function (res) {
4406
+ this.responsibilityService
4407
+ .getOrganizationGroups(params)
4408
+ .pipe(rxjs.takeUntil(this.unSubscribeProgram))
4409
+ .subscribe(function (res) {
4334
4410
  var _a, _b, _c, _d, _e;
4335
4411
  var data = res !== null && res !== void 0 ? res : [];
4336
4412
  if (!program_id) {
@@ -4348,14 +4424,21 @@
4348
4424
  }
4349
4425
  _this.groupsList = groups;
4350
4426
  _this.groupsListLoaded = true;
4351
- if (_this.featureFlag_groups && ((_a = _this.OrgGroup) === null || _a === void 0 ? void 0 : _a.length) && ((_b = _this.responsibilityForm.program) === null || _b === void 0 ? void 0 : _b.length) && program_id) {
4427
+ if (_this.featureFlag_groups &&
4428
+ ((_a = _this.OrgGroup) === null || _a === void 0 ? void 0 : _a.length) &&
4429
+ ((_b = _this.responsibilityForm.program) === null || _b === void 0 ? void 0 : _b.length) &&
4430
+ program_id) {
4352
4431
  _this.refreshListsWhileProgramSelected();
4353
4432
  }
4354
4433
  else {
4355
4434
  _this.refreshAllLists();
4356
4435
  }
4357
- if (((_d = (_c = _this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.program[0]) === null || _d === void 0 ? void 0 : _d.default_assignee_group_ids) && program_id) {
4358
- var selectedGroups = data.filter(function (element) { var _a; return (_a = _this.responsibilityForm.program[0].default_assignee_group_ids) === null || _a === void 0 ? void 0 : _a.includes(element.group_id); });
4436
+ if (((_d = (_c = _this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.program[0]) === null || _d === void 0 ? void 0 : _d.default_assignee_group_ids) &&
4437
+ program_id) {
4438
+ var selectedGroups = data.filter(function (element) {
4439
+ var _a;
4440
+ return (_a = _this.responsibilityForm.program[0].default_assignee_group_ids) === null || _a === void 0 ? void 0 : _a.includes(element.group_id);
4441
+ });
4359
4442
  if (groups === null || groups === void 0 ? void 0 : groups.length) {
4360
4443
  var memberIds_1 = [];
4361
4444
  selectedGroups.forEach(function (eachGroup) {
@@ -4400,58 +4483,85 @@
4400
4483
  member_id: currentUser.id,
4401
4484
  member_name: currentUser.name,
4402
4485
  organisation_id: currentUser.organisation_id,
4403
- _id: _this.authService.getUserDetails()._id
4486
+ _id: _this.authService.getUserDetails()._id,
4404
4487
  };
4405
- var testPlanCategory = typeof (res === null || res === void 0 ? void 0 : res.testplan_category_id) === 'string' ? [] : res === null || res === void 0 ? void 0 : res.testplan_category_id;
4406
- var requiredAuditCategoryId = ((_b = res === null || res === void 0 ? void 0 : res.audit_category_details) === null || _b === void 0 ? void 0 : _b.category_id) ? [(_c = res === null || res === void 0 ? void 0 : res.audit_category_details) === null || _c === void 0 ? void 0 : _c.category_id] : [];
4488
+ var testPlanCategory = typeof (res === null || res === void 0 ? void 0 : res.testplan_category_id) === 'string'
4489
+ ? []
4490
+ : res === null || res === void 0 ? void 0 : res.testplan_category_id;
4491
+ var requiredAuditCategoryId = ((_b = res === null || res === void 0 ? void 0 : res.audit_category_details) === null || _b === void 0 ? void 0 : _b.category_id)
4492
+ ? [(_c = res === null || res === void 0 ? void 0 : res.audit_category_details) === null || _c === void 0 ? void 0 : _c.category_id]
4493
+ : [];
4407
4494
  var reviewerDetails = Object.keys(res === null || res === void 0 ? void 0 : res.reviewer_arr);
4408
4495
  _this.hasReviewer = (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0;
4409
- _this.assigneeRadioSelect = (((_d = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _d === void 0 ? void 0 : _d.length) == 0) ? true : false;
4496
+ _this.assigneeRadioSelect =
4497
+ ((_d = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _d === void 0 ? void 0 : _d.length) == 0 ? true : false;
4410
4498
  _this.isEntrust = res.isGroupAssignTo ? true : false;
4411
4499
  var linkage = res === null || res === void 0 ? void 0 : res.linkedProgramDetails;
4412
4500
  linkage.push(res === null || res === void 0 ? void 0 : res.programDetails);
4413
4501
  _this.responsibilityForm = {
4414
4502
  assignors: {
4415
4503
  enable: false,
4416
- list: ((_e = _this.setList(_this.assignorsList, [res.member_id], 'member_id')) === null || _e === void 0 ? void 0 : _e.length) > 0 ? _this.setList(_this.assignorsList, [res.member_id], 'member_id') : [currentsUerInfo],
4504
+ list: ((_e = _this.setList(_this.assignorsList, [res.member_id], 'member_id')) === null || _e === void 0 ? void 0 : _e.length) > 0
4505
+ ? _this.setList(_this.assignorsList, [res.member_id], 'member_id')
4506
+ : [currentsUerInfo],
4417
4507
  },
4418
4508
  responsibility: {
4419
4509
  name: res === null || res === void 0 ? void 0 : res.report_name,
4420
4510
  keyResponsibility: res === null || res === void 0 ? void 0 : res.key_compliance,
4421
4511
  },
4422
4512
  assignees: {
4423
- whoCanComplete: (res.isGroupAssignTo) ? 'ANY_ONE' : 'ALL',
4424
- list: (((_f = res.assigned_to_member_id) === null || _f === void 0 ? void 0 : _f.length) == 0) ? _this.setList(_this.assigneesList, [Number(res.assigned_to)], 'employee_id') :
4425
- _this.setList(_this.assigneesList, res.assigned_to_member_id, 'my_member_id'),
4513
+ whoCanComplete: res.isGroupAssignTo ? 'ANY_ONE' : 'ALL',
4514
+ list: ((_f = res.assigned_to_member_id) === null || _f === void 0 ? void 0 : _f.length) == 0
4515
+ ? _this.setList(_this.assigneesList, [Number(res.assigned_to)], 'employee_id')
4516
+ : _this.setList(_this.assigneesList, res.assigned_to_member_id, 'my_member_id'),
4426
4517
  },
4427
4518
  frequency: res === null || res === void 0 ? void 0 : res.frequency_details,
4428
4519
  description: res === null || res === void 0 ? void 0 : res.remarks,
4429
4520
  objective: res === null || res === void 0 ? void 0 : res.objective,
4430
4521
  rc: _this.setList(_this.responsibilityCentersList, [Number(res === null || res === void 0 ? void 0 : res.rc_id)], 'rc_id'),
4431
- responsibilityCenterType: (_this.isResponsibilityRcLinkEnabled && (res === null || res === void 0 ? void 0 : res.responsibilityCenterType)) ? parseInt(res === null || res === void 0 ? void 0 : res.responsibilityCenterType) : 0,
4432
- category: ((_g = res === null || res === void 0 ? void 0 : res.program_cat_ids) === null || _g === void 0 ? void 0 : _g.length) ? res === null || res === void 0 ? void 0 : res.category_ids_array.filter(function (ele) { var _a; return !((_a = res.program_cat_ids) === null || _a === void 0 ? void 0 : _a.includes(ele)); }) : res === null || res === void 0 ? void 0 : res.category_ids_array,
4522
+ responsibilityCenterType: _this.isResponsibilityRcLinkEnabled && (res === null || res === void 0 ? void 0 : res.responsibilityCenterType)
4523
+ ? parseInt(res === null || res === void 0 ? void 0 : res.responsibilityCenterType)
4524
+ : 0,
4525
+ category: ((_g = res === null || res === void 0 ? void 0 : res.program_cat_ids) === null || _g === void 0 ? void 0 : _g.length)
4526
+ ? res === null || res === void 0 ? void 0 : res.category_ids_array.filter(function (ele) { var _a; return !((_a = res.program_cat_ids) === null || _a === void 0 ? void 0 : _a.includes(ele)); })
4527
+ : res === null || res === void 0 ? void 0 : res.category_ids_array,
4433
4528
  program_selected_ids: (_h = res === null || res === void 0 ? void 0 : res.category_id.split(',')) !== null && _h !== void 0 ? _h : [],
4434
4529
  category_id: (_j = res === null || res === void 0 ? void 0 : res.category_id) !== null && _j !== void 0 ? _j : '',
4435
4530
  linkedProgram: linkage !== null && linkage !== void 0 ? linkage : res === null || res === void 0 ? void 0 : res.linkedProgramDetails,
4436
- program: ((_k = res === null || res === void 0 ? void 0 : res.programDetails) === null || _k === void 0 ? void 0 : _k.category_id) ? [res === null || res === void 0 ? void 0 : res.programDetails] : [],
4531
+ program: ((_k = res === null || res === void 0 ? void 0 : res.programDetails) === null || _k === void 0 ? void 0 : _k.category_id)
4532
+ ? [res === null || res === void 0 ? void 0 : res.programDetails]
4533
+ : [],
4437
4534
  checkpointInstruction: res === null || res === void 0 ? void 0 : res.checkpoint_description,
4438
4535
  customTags: (res === null || res === void 0 ? void 0 : res.custom_tags) ? JSON.parse(res === null || res === void 0 ? void 0 : res.custom_tags) : '',
4439
- checkpoints: (res === null || res === void 0 ? void 0 : res.checkpoint_details) ? JSON.parse(res === null || res === void 0 ? void 0 : res.checkpoint_details) : '',
4536
+ checkpoints: (res === null || res === void 0 ? void 0 : res.checkpoint_details)
4537
+ ? JSON.parse(res === null || res === void 0 ? void 0 : res.checkpoint_details)
4538
+ : '',
4440
4539
  reviewers: {
4441
- sequentialWorkflow: (((_m = (_l = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _l === void 0 ? void 0 : _l.level1) === null || _m === void 0 ? void 0 : _m.type) == 'SEQUENTIAL') ? true : false,
4540
+ sequentialWorkflow: ((_m = (_l = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _l === void 0 ? void 0 : _l.level1) === null || _m === void 0 ? void 0 : _m.type) == 'SEQUENTIAL' ? true : false,
4442
4541
  reviewFrequency: {
4443
- reviewCompleteDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4444
- reviewNOtCompletedDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2
4542
+ reviewCompleteDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4543
+ reviewNOtCompletedDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2,
4445
4544
  },
4446
- acceptedData: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? (_p = (_o = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _o === void 0 ? void 0 : _o.level1) === null || _p === void 0 ? void 0 : _p.reviewers : [],
4447
- list: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? _this.setReviewerPayload((_r = (_q = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _q === void 0 ? void 0 : _q.level1) === null || _r === void 0 ? void 0 : _r.reviewers, 'object', (_t = (_s = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _s === void 0 ? void 0 : _s.level1) === null || _t === void 0 ? void 0 : _t.type) : []
4545
+ acceptedData: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0
4546
+ ? (_p = (_o = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _o === void 0 ? void 0 : _o.level1) === null || _p === void 0 ? void 0 : _p.reviewers
4547
+ : [],
4548
+ list: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0
4549
+ ? _this.setReviewerPayload((_r = (_q = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _q === void 0 ? void 0 : _q.level1) === null || _r === void 0 ? void 0 : _r.reviewers, 'object', (_t = (_s = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _s === void 0 ? void 0 : _s.level1) === null || _t === void 0 ? void 0 : _t.type)
4550
+ : [],
4448
4551
  },
4449
4552
  overseers: {
4450
- list: (res === null || res === void 0 ? void 0 : res.cc_email) ? _this.setList(_this.overseersList, Object.keys(res === null || res === void 0 ? void 0 : res.cc_email).map(Number), 'employee_id') : [],
4451
- notifyList: (res === null || res === void 0 ? void 0 : res.failure_cc_email) ? _this.setList(_this.overseersList, Object.keys(res === null || res === void 0 ? void 0 : res.failure_cc_email).map(Number), 'employee_id') : [],
4553
+ list: (res === null || res === void 0 ? void 0 : res.cc_email)
4554
+ ? _this.setList(_this.overseersList, Object.keys(res === null || res === void 0 ? void 0 : res.cc_email).map(Number), 'employee_id')
4555
+ : [],
4556
+ notifyList: (res === null || res === void 0 ? void 0 : res.failure_cc_email)
4557
+ ? _this.setList(_this.overseersList, Object.keys(res === null || res === void 0 ? void 0 : res.failure_cc_email).map(Number), 'employee_id')
4558
+ : [],
4452
4559
  },
4453
4560
  formatAndEvidence: {
4454
- formatRequired: (((_u = res === null || res === void 0 ? void 0 : res.report_format) === null || _u === void 0 ? void 0 : _u.length) > 0 || ((_v = res === null || res === void 0 ? void 0 : res.link_for_details) === null || _v === void 0 ? void 0 : _v.length) > 0) ? true : false,
4561
+ formatRequired: ((_u = res === null || res === void 0 ? void 0 : res.report_format) === null || _u === void 0 ? void 0 : _u.length) > 0 ||
4562
+ ((_v = res === null || res === void 0 ? void 0 : res.link_for_details) === null || _v === void 0 ? void 0 : _v.length) > 0
4563
+ ? true
4564
+ : false,
4455
4565
  formatFiles: res === null || res === void 0 ? void 0 : res.report_format,
4456
4566
  formatLinks: res === null || res === void 0 ? void 0 : res.link_for_details,
4457
4567
  evidenceRequired: (res === null || res === void 0 ? void 0 : res.report_upload_flag) ? true : false,
@@ -4459,16 +4569,22 @@
4459
4569
  assuranceList: _this.setList(_this.assuranceCategoriesList, testPlanCategory, 'category_id'),
4460
4570
  requiresAuditList: _this.setList(_this.assuranceRequiresAuditList, requiredAuditCategoryId, 'category_id'),
4461
4571
  riskClass: res === null || res === void 0 ? void 0 : res.risk_class,
4462
- riskMatrix: res === null || res === void 0 ? void 0 : res.risk_matrix_data
4572
+ riskMatrix: res === null || res === void 0 ? void 0 : res.risk_matrix_data,
4463
4573
  };
4464
4574
  if (_this.featureFlag_groups) {
4465
4575
  _this.populateAssigneeData(res);
4466
4576
  _this.populateOverseerData(res);
4467
4577
  _this.populateReviewerData(res);
4468
4578
  }
4469
- _this.responsibilityCenterType = (_this.isResponsibilityRcLinkEnabled && (res === null || res === void 0 ? void 0 : res.responsibilityCenterType)) ? parseInt(res === null || res === void 0 ? void 0 : res.responsibilityCenterType) : 0;
4470
- _this.selectedProgram = ((_w = res === null || res === void 0 ? void 0 : res.programDetails) === null || _w === void 0 ? void 0 : _w.category_id) ? res.programDetails : undefined;
4471
- if (((_x = _this.selectedProgram) === null || _x === void 0 ? void 0 : _x._id) && ((_y = _this.orgDetails) === null || _y === void 0 ? void 0 : _y.hasProgramFullPermission)) {
4579
+ _this.responsibilityCenterType =
4580
+ _this.isResponsibilityRcLinkEnabled && (res === null || res === void 0 ? void 0 : res.responsibilityCenterType)
4581
+ ? parseInt(res === null || res === void 0 ? void 0 : res.responsibilityCenterType)
4582
+ : 0;
4583
+ _this.selectedProgram = ((_w = res === null || res === void 0 ? void 0 : res.programDetails) === null || _w === void 0 ? void 0 : _w.category_id)
4584
+ ? res.programDetails
4585
+ : undefined;
4586
+ if (((_x = _this.selectedProgram) === null || _x === void 0 ? void 0 : _x._id) &&
4587
+ ((_y = _this.orgDetails) === null || _y === void 0 ? void 0 : _y.hasProgramFullPermission)) {
4472
4588
  _this.getListsAccordingToProgram((_z = _this.selectedProgram) === null || _z === void 0 ? void 0 : _z._id);
4473
4589
  }
4474
4590
  _this.isNotificationPending = res.notification_pending;
@@ -4479,7 +4595,8 @@
4479
4595
  _this.actionButtons[1].buttonText = 'View Responsibilities';
4480
4596
  }
4481
4597
  // 5~0~0~0 this is for other frequency
4482
- if (res.frequency_details !== '' && res.frequency_details !== '5~0~0~0') {
4598
+ if (res.frequency_details !== '' &&
4599
+ res.frequency_details !== '5~0~0~0') {
4483
4600
  _this.frequencyDataPopulation(res);
4484
4601
  _this.getFrequencyPlaceholder(res);
4485
4602
  res.placeholder = _this.frequencyPlaceholder;
@@ -4493,7 +4610,10 @@
4493
4610
  _this.organizationId = _this.authService.getOrganizationId();
4494
4611
  _this.memberId = _this.authService.getMemberId();
4495
4612
  }
4496
- if ((((_0 = _this.responsibilityForm.assignees.list) === null || _0 === void 0 ? void 0 : _0.length) === 0 && (!_this.featureFlag_groups || (((_2 = (_1 = _this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.assigneeGroups.list) === null || _2 === void 0 ? void 0 : _2.length) === 0 && _this.featureFlag_groups)))) {
4613
+ if (((_0 = _this.responsibilityForm.assignees.list) === null || _0 === void 0 ? void 0 : _0.length) === 0 &&
4614
+ (!_this.featureFlag_groups ||
4615
+ (((_2 = (_1 = _this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.assigneeGroups.list) === null || _2 === void 0 ? void 0 : _2.length) === 0 &&
4616
+ _this.featureFlag_groups))) {
4497
4617
  _this.isEntrust = true;
4498
4618
  _this.mode = 'CREATE';
4499
4619
  _this.assigneeRadioSelect = false;
@@ -4510,7 +4630,9 @@
4510
4630
  if ((res === null || res === void 0 ? void 0 : res.rc_id) > 0) {
4511
4631
  _this.rcSelected.emit(true);
4512
4632
  }
4513
- if (_this.isResponsibilityRcLinkEnabled && ((_3 = res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) === null || _3 === void 0 ? void 0 : _3.length) && (res === null || res === void 0 ? void 0 : res.responsibilityCenterType) === 1) {
4633
+ if (_this.isResponsibilityRcLinkEnabled &&
4634
+ ((_3 = res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) === null || _3 === void 0 ? void 0 : _3.length) &&
4635
+ (res === null || res === void 0 ? void 0 : res.responsibilityCenterType) === 1) {
4514
4636
  _this.responsibilityForm.rc = _this.setList(_this.responsibilityCentersList, res.responsibilityCenterArr, 'rc_id');
4515
4637
  _this.rcSelected.emit(true);
4516
4638
  }
@@ -4523,7 +4645,7 @@
4523
4645
  sample: 0,
4524
4646
  percentage: 0,
4525
4647
  frequency_pattern: '',
4526
- frequency_time: ''
4648
+ frequency_time: '',
4527
4649
  };
4528
4650
  }
4529
4651
  if ((_4 = res.assessment) === null || _4 === void 0 ? void 0 : _4.assessment_id) {
@@ -4561,7 +4683,8 @@
4561
4683
  WorkflowComplianceComponent.prototype.populateProgramAssigneeGroup = function () {
4562
4684
  var _this = this;
4563
4685
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
4564
- if (((_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_group_ids) || ((_e = (_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assigneeGroups) === null || _d === void 0 ? void 0 : _d.list) === null || _e === void 0 ? void 0 : _e.length)) {
4686
+ if (((_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_group_ids) ||
4687
+ ((_e = (_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assigneeGroups) === null || _d === void 0 ? void 0 : _d.list) === null || _e === void 0 ? void 0 : _e.length)) {
4565
4688
  if ((_h = (_g = (_f = this.responsibilityForm) === null || _f === void 0 ? void 0 : _f.assigneeGroups) === null || _g === void 0 ? void 0 : _g.list) === null || _h === void 0 ? void 0 : _h.length) {
4566
4689
  var ids = this.returnIds((_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.assigneeGroups) === null || _k === void 0 ? void 0 : _k.list, 'group_id');
4567
4690
  var allIds_4 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.program[0]) === null || _m === void 0 ? void 0 : _m.default_assignee_group_ids)));
@@ -4574,7 +4697,10 @@
4574
4697
  }
4575
4698
  }
4576
4699
  else {
4577
- var assigneeGroups = (_p = this.groupAssigneeList) === null || _p === void 0 ? void 0 : _p.filter(function (element) { var _a, _b, _c; return (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_group_ids) === null || _c === void 0 ? void 0 : _c.includes(element === null || element === void 0 ? void 0 : element.group_id); });
4700
+ var assigneeGroups = (_p = this.groupAssigneeList) === null || _p === void 0 ? void 0 : _p.filter(function (element) {
4701
+ var _a, _b, _c;
4702
+ return (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_assignee_group_ids) === null || _c === void 0 ? void 0 : _c.includes(element === null || element === void 0 ? void 0 : element.group_id);
4703
+ });
4578
4704
  if (assigneeGroups === null || assigneeGroups === void 0 ? void 0 : assigneeGroups.length) {
4579
4705
  this.responsibilityForm.assigneeGroups.list = assigneeGroups;
4580
4706
  }
@@ -4587,7 +4713,10 @@
4587
4713
  WorkflowComplianceComponent.prototype.populateProgramOverseerGroup = function () {
4588
4714
  var _this = this;
4589
4715
  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;
4590
- if (((_c = (_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.cc_email_groups) || ((_f = (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.overseersGroups) === null || _e === void 0 ? void 0 : _e.notifyList) === null || _f === void 0 ? void 0 : _f.length) || ((_j = (_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.overseersGroups) === null || _h === void 0 ? void 0 : _h.list) === null || _j === void 0 ? void 0 : _j.length) || ((_m = (_l = (_k = this.responsibilityForm) === null || _k === void 0 ? void 0 : _k.program[0]) === null || _l === void 0 ? void 0 : _l.default_overseers) === null || _m === void 0 ? void 0 : _m.failure_cc_email_groups)) {
4716
+ if (((_c = (_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.cc_email_groups) ||
4717
+ ((_f = (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.overseersGroups) === null || _e === void 0 ? void 0 : _e.notifyList) === null || _f === void 0 ? void 0 : _f.length) ||
4718
+ ((_j = (_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.overseersGroups) === null || _h === void 0 ? void 0 : _h.list) === null || _j === void 0 ? void 0 : _j.length) ||
4719
+ ((_m = (_l = (_k = this.responsibilityForm) === null || _k === void 0 ? void 0 : _k.program[0]) === null || _l === void 0 ? void 0 : _l.default_overseers) === null || _m === void 0 ? void 0 : _m.failure_cc_email_groups)) {
4591
4720
  if ((_q = (_p = (_o = this.responsibilityForm) === null || _o === void 0 ? void 0 : _o.overseersGroups) === null || _p === void 0 ? void 0 : _p.list) === null || _q === void 0 ? void 0 : _q.length) {
4592
4721
  var ids = this.returnIds((_s = (_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.overseersGroups) === null || _s === void 0 ? void 0 : _s.list, 'group_id');
4593
4722
  var allDefaultCCGroupIds_1 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set((_v = (_u = (_t = this.responsibilityForm) === null || _t === void 0 ? void 0 : _t.program[0]) === null || _u === void 0 ? void 0 : _u.default_overseers) === null || _v === void 0 ? void 0 : _v.cc_email_groups)));
@@ -4603,7 +4732,8 @@
4603
4732
  this.responsibilityForm.overseersGroups.list = [];
4604
4733
  }
4605
4734
  if (overseersCCFailureGroup === null || overseersCCFailureGroup === void 0 ? void 0 : overseersCCFailureGroup.length) {
4606
- this.responsibilityForm.overseersGroups.notifyList = overseersCCFailureGroup;
4735
+ this.responsibilityForm.overseersGroups.notifyList =
4736
+ overseersCCFailureGroup;
4607
4737
  this.moreOptions.OVERSEER = true;
4608
4738
  }
4609
4739
  else {
@@ -4611,14 +4741,21 @@
4611
4741
  }
4612
4742
  }
4613
4743
  else {
4614
- var overseersCCGroup = (_1 = this.groupOverseerList) === null || _1 === void 0 ? void 0 : _1.filter(function (element) { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.cc_email_groups) === null || _d === void 0 ? void 0 : _d.includes(element === null || element === void 0 ? void 0 : element.group_id); });
4615
- var overseersCCFailureGroup = (_2 = this.groupOverseerList) === null || _2 === void 0 ? void 0 : _2.filter(function (element) { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.failure_cc_email_groups) === null || _d === void 0 ? void 0 : _d.includes(element === null || element === void 0 ? void 0 : element.group_id); });
4744
+ var overseersCCGroup = (_1 = this.groupOverseerList) === null || _1 === void 0 ? void 0 : _1.filter(function (element) {
4745
+ var _a, _b, _c, _d;
4746
+ return (_d = (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.cc_email_groups) === null || _d === void 0 ? void 0 : _d.includes(element === null || element === void 0 ? void 0 : element.group_id);
4747
+ });
4748
+ var overseersCCFailureGroup = (_2 = this.groupOverseerList) === null || _2 === void 0 ? void 0 : _2.filter(function (element) {
4749
+ var _a, _b, _c, _d;
4750
+ return (_d = (_c = (_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_overseers) === null || _c === void 0 ? void 0 : _c.failure_cc_email_groups) === null || _d === void 0 ? void 0 : _d.includes(element === null || element === void 0 ? void 0 : element.group_id);
4751
+ });
4616
4752
  if (overseersCCGroup === null || overseersCCGroup === void 0 ? void 0 : overseersCCGroup.length) {
4617
4753
  this.responsibilityForm.overseersGroups.list = overseersCCGroup;
4618
4754
  this.moreOptions.OVERSEER = true;
4619
4755
  }
4620
4756
  if (overseersCCFailureGroup.length) {
4621
- this.responsibilityForm.overseersGroups.notifyList = overseersCCFailureGroup;
4757
+ this.responsibilityForm.overseersGroups.notifyList =
4758
+ overseersCCFailureGroup;
4622
4759
  this.moreOptions.OVERSEER = true;
4623
4760
  }
4624
4761
  }
@@ -4630,11 +4767,14 @@
4630
4767
  };
4631
4768
  WorkflowComplianceComponent.prototype.populateProgramReviewerGroup = function () {
4632
4769
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4633
- if (((_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_reviewer_group_ids) || ((_e = (_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.groupReviewers) === null || _d === void 0 ? void 0 : _d.list) === null || _e === void 0 ? void 0 : _e.length)) {
4770
+ if (((_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.default_reviewer_group_ids) ||
4771
+ ((_e = (_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.groupReviewers) === null || _d === void 0 ? void 0 : _d.list) === null || _e === void 0 ? void 0 : _e.length)) {
4634
4772
  var ids = this.returnIds((_g = (_f = this.responsibilityForm) === null || _f === void 0 ? void 0 : _f.groupReviewers) === null || _g === void 0 ? void 0 : _g.list, 'group_id');
4635
4773
  var allIds_5 = __spreadArray(__spreadArray([], __read(new Set(ids))), __read(new Set((_h = this.responsibilityForm.program[0]) === null || _h === void 0 ? void 0 : _h.default_reviewer_group_ids)));
4636
4774
  var reviewersGroup = this.groupReviewerList.filter(function (element) { return allIds_5 === null || allIds_5 === void 0 ? void 0 : allIds_5.includes(element === null || element === void 0 ? void 0 : element.group_id); });
4637
- if (((reviewersGroup === null || reviewersGroup === void 0 ? void 0 : reviewersGroup.length) || (this.featureFlag_groups && ((_l = (_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.groupReviewers) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) > 0))) {
4775
+ if ((reviewersGroup === null || reviewersGroup === void 0 ? void 0 : reviewersGroup.length) ||
4776
+ (this.featureFlag_groups &&
4777
+ ((_l = (_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.groupReviewers) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) > 0)) {
4638
4778
  this.responsibilityForm.groupReviewers.list = reviewersGroup;
4639
4779
  this.moreOptions.REVIEWER = true;
4640
4780
  }
@@ -4650,80 +4790,123 @@
4650
4790
  var _a, _b, _c, _d, _e, _f, _g, _h;
4651
4791
  var overseerUserList = [];
4652
4792
  var overseerUserNotifyList = [];
4653
- var overseerEmployeesList = (res === null || res === void 0 ? void 0 : res.cc_email) ? Object.keys(res === null || res === void 0 ? void 0 : res.cc_email).map(Number) : [];
4654
- overseerUserList = ((overseerEmployeesList === null || overseerEmployeesList === void 0 ? void 0 : overseerEmployeesList.length) > 0 && ((_b = (_a = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _a === void 0 ? void 0 : _a.ccEmailGroupIds) === null || _b === void 0 ? void 0 : _b.length) > 0) ? overseerEmployeesList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.ccEmailEmpIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); }) : __spreadArray([], __read(overseerEmployeesList));
4655
- var overseerEmployeeNotifyList = (res === null || res === void 0 ? void 0 : res.failure_cc_email) ? Object.keys(res === null || res === void 0 ? void 0 : res.failure_cc_email).map(Number) : [];
4656
- overseerUserNotifyList = ((overseerEmployeeNotifyList === null || overseerEmployeeNotifyList === void 0 ? void 0 : overseerEmployeeNotifyList.length) > 0 && ((_d = (_c = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _c === void 0 ? void 0 : _c.failureCCEmailGroupIds) === null || _d === void 0 ? void 0 : _d.length) > 0) ? overseerEmployeeNotifyList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.failureCCEmailEmpIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); }) : __spreadArray([], __read(overseerEmployeeNotifyList));
4657
- this.responsibilityForm["overseers"] = {
4658
- list: (res === null || res === void 0 ? void 0 : res.cc_email) ? this.setList(this.overseersList, overseerUserList, 'employee_id') : [],
4659
- notifyList: (res === null || res === void 0 ? void 0 : res.failure_cc_email) ? this.setList(this.overseersList, overseerUserNotifyList, 'employee_id') : [],
4793
+ var overseerEmployeesList = (res === null || res === void 0 ? void 0 : res.cc_email)
4794
+ ? Object.keys(res === null || res === void 0 ? void 0 : res.cc_email).map(Number)
4795
+ : [];
4796
+ overseerUserList =
4797
+ (overseerEmployeesList === null || overseerEmployeesList === void 0 ? void 0 : overseerEmployeesList.length) > 0 &&
4798
+ ((_b = (_a = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _a === void 0 ? void 0 : _a.ccEmailGroupIds) === null || _b === void 0 ? void 0 : _b.length) > 0
4799
+ ? overseerEmployeesList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.ccEmailEmpIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); })
4800
+ : __spreadArray([], __read(overseerEmployeesList));
4801
+ var overseerEmployeeNotifyList = (res === null || res === void 0 ? void 0 : res.failure_cc_email)
4802
+ ? Object.keys(res === null || res === void 0 ? void 0 : res.failure_cc_email).map(Number)
4803
+ : [];
4804
+ overseerUserNotifyList =
4805
+ (overseerEmployeeNotifyList === null || overseerEmployeeNotifyList === void 0 ? void 0 : overseerEmployeeNotifyList.length) > 0 &&
4806
+ ((_d = (_c = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _c === void 0 ? void 0 : _c.failureCCEmailGroupIds) === null || _d === void 0 ? void 0 : _d.length) > 0
4807
+ ? overseerEmployeeNotifyList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.failureCCEmailEmpIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); })
4808
+ : __spreadArray([], __read(overseerEmployeeNotifyList));
4809
+ this.responsibilityForm['overseers'] = {
4810
+ list: (res === null || res === void 0 ? void 0 : res.cc_email)
4811
+ ? this.setList(this.overseersList, overseerUserList, 'employee_id')
4812
+ : [],
4813
+ notifyList: (res === null || res === void 0 ? void 0 : res.failure_cc_email)
4814
+ ? this.setList(this.overseersList, overseerUserNotifyList, 'employee_id')
4815
+ : [],
4660
4816
  };
4661
- this.responsibilityForm["overseersGroups"] = {
4662
- list: ((_e = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _e === void 0 ? void 0 : _e.ccEmailGroupIds) ? this.setList(this.OrgGroup, (_f = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _f === void 0 ? void 0 : _f.ccEmailGroupIds, 'group_id') : [],
4663
- notifyList: ((_g = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _g === void 0 ? void 0 : _g.failureCCEmailGroupIds) ? this.setList(this.OrgGroup, (_h = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _h === void 0 ? void 0 : _h.failureCCEmailGroupIds, 'group_id') : []
4817
+ this.responsibilityForm['overseersGroups'] = {
4818
+ list: ((_e = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _e === void 0 ? void 0 : _e.ccEmailGroupIds)
4819
+ ? this.setList(this.OrgGroup, (_f = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _f === void 0 ? void 0 : _f.ccEmailGroupIds, 'group_id')
4820
+ : [],
4821
+ notifyList: ((_g = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _g === void 0 ? void 0 : _g.failureCCEmailGroupIds)
4822
+ ? this.setList(this.OrgGroup, (_h = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _h === void 0 ? void 0 : _h.failureCCEmailGroupIds, 'group_id')
4823
+ : [],
4664
4824
  };
4665
4825
  };
4666
4826
  WorkflowComplianceComponent.prototype.populateReviewerData = function (res) {
4667
4827
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
4668
4828
  var reviewerDetails = Object.keys(res === null || res === void 0 ? void 0 : res.reviewer_arr);
4669
4829
  this.hasReviewer = (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0;
4670
- var groupReviewerDetails = ((_b = (_a = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _a === void 0 ? void 0 : _a.reviewerGroupIds) === null || _b === void 0 ? void 0 : _b.length) ? Object.assign((_c = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _c === void 0 ? void 0 : _c.reviewerGroupIds) : [];
4830
+ var groupReviewerDetails = ((_b = (_a = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _a === void 0 ? void 0 : _a.reviewerGroupIds) === null || _b === void 0 ? void 0 : _b.length)
4831
+ ? Object.assign((_c = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _c === void 0 ? void 0 : _c.reviewerGroupIds)
4832
+ : [];
4671
4833
  var reviewer_users = [];
4672
- reviewer_users = (((_f = (_e = (_d = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _d === void 0 ? void 0 : _d.level1) === null || _e === void 0 ? void 0 : _e.reviewers) === null || _f === void 0 ? void 0 : _f.length) > 0 && ((_h = (_g = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _g === void 0 ? void 0 : _g.reviewerGroupIds) === null || _h === void 0 ? void 0 : _h.length) > 0) ? (_k = (_j = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _j === void 0 ? void 0 : _j.level1) === null || _k === void 0 ? void 0 : _k.reviewers.filter(function (memberId) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.reviewerIds) === null || _b === void 0 ? void 0 : _b.includes(memberId === null || memberId === void 0 ? void 0 : memberId.member_id); }) : (_m = (_l = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _l === void 0 ? void 0 : _l.level1) === null || _m === void 0 ? void 0 : _m.reviewers;
4673
- this.responsibilityForm["reviewers"] = {
4674
- sequentialWorkflow: (((_p = (_o = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _o === void 0 ? void 0 : _o.level1) === null || _p === void 0 ? void 0 : _p.type) == 'SEQUENTIAL') ? true : false,
4834
+ reviewer_users =
4835
+ ((_f = (_e = (_d = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _d === void 0 ? void 0 : _d.level1) === null || _e === void 0 ? void 0 : _e.reviewers) === null || _f === void 0 ? void 0 : _f.length) > 0 &&
4836
+ ((_h = (_g = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _g === void 0 ? void 0 : _g.reviewerGroupIds) === null || _h === void 0 ? void 0 : _h.length) > 0
4837
+ ? (_k = (_j = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _j === void 0 ? void 0 : _j.level1) === null || _k === void 0 ? void 0 : _k.reviewers.filter(function (memberId) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.reviewerIds) === null || _b === void 0 ? void 0 : _b.includes(memberId === null || memberId === void 0 ? void 0 : memberId.member_id); })
4838
+ : (_m = (_l = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _l === void 0 ? void 0 : _l.level1) === null || _m === void 0 ? void 0 : _m.reviewers;
4839
+ this.responsibilityForm['reviewers'] = {
4840
+ sequentialWorkflow: ((_p = (_o = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _o === void 0 ? void 0 : _o.level1) === null || _p === void 0 ? void 0 : _p.type) == 'SEQUENTIAL' ? true : false,
4675
4841
  reviewFrequency: {
4676
- reviewCompleteDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4677
- reviewNOtCompletedDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2
4842
+ reviewCompleteDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4843
+ reviewNOtCompletedDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2,
4678
4844
  },
4679
4845
  acceptedData: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? reviewer_users : [],
4680
- list: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? this.setReviewerPayload(reviewer_users, 'object', (_r = (_q = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _q === void 0 ? void 0 : _q.level1) === null || _r === void 0 ? void 0 : _r.type) : []
4846
+ list: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0
4847
+ ? this.setReviewerPayload(reviewer_users, 'object', (_r = (_q = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _q === void 0 ? void 0 : _q.level1) === null || _r === void 0 ? void 0 : _r.type)
4848
+ : [],
4681
4849
  };
4682
- this.responsibilityForm["groupReviewers"] = {
4683
- sequentialWorkflow: (((_t = (_s = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _s === void 0 ? void 0 : _s.level1) === null || _t === void 0 ? void 0 : _t.type) == 'SEQUENTIAL') ? true : false,
4850
+ this.responsibilityForm['groupReviewers'] = {
4851
+ sequentialWorkflow: ((_t = (_s = res === null || res === void 0 ? void 0 : res.reviewer_arr) === null || _s === void 0 ? void 0 : _s.level1) === null || _t === void 0 ? void 0 : _t.type) == 'SEQUENTIAL' ? true : false,
4684
4852
  reviewFrequency: {
4685
- reviewCompleteDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4686
- reviewNOtCompletedDays: ((reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0) ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2
4853
+ reviewCompleteDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_after_days : 2,
4854
+ reviewNOtCompletedDays: (reviewerDetails === null || reviewerDetails === void 0 ? void 0 : reviewerDetails.length) > 0 ? res === null || res === void 0 ? void 0 : res.review_failed_after_days : 2,
4687
4855
  },
4688
- list: (groupReviewerDetails === null || groupReviewerDetails === void 0 ? void 0 : groupReviewerDetails.length) > 0 ? this.setList(this.OrgGroup, groupReviewerDetails, 'group_id') : []
4856
+ list: (groupReviewerDetails === null || groupReviewerDetails === void 0 ? void 0 : groupReviewerDetails.length) > 0
4857
+ ? this.setList(this.OrgGroup, groupReviewerDetails, 'group_id')
4858
+ : [],
4689
4859
  };
4690
4860
  };
4691
4861
  WorkflowComplianceComponent.prototype.populateAssigneeData = function (res) {
4692
4862
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
4693
4863
  var AssigneeAnyUserList = [];
4694
4864
  var AssigneeAllUserList = [];
4695
- var assigneeAnyOneList = ((res === null || res === void 0 ? void 0 : res.assigned_to_member_id) && this.isEntrust) ? res === null || res === void 0 ? void 0 : res.assigned_to_member_id : [];
4696
- AssigneeAnyUserList = (((_a = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_c = (_b = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _b === void 0 ? void 0 : _b.assigneeAnyoneGroupIds) === null || _c === void 0 ? void 0 : _c.length) > 0) ? assigneeAnyOneList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.assigneeAnyoneIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); }) : __spreadArray([], __read(assigneeAnyOneList));
4697
- AssigneeAllUserList = ((res === null || res === void 0 ? void 0 : res.assigned_to) && !this.isEntrust) ? res === null || res === void 0 ? void 0 : res.assigned_to : [];
4865
+ var assigneeAnyOneList = (res === null || res === void 0 ? void 0 : res.assigned_to_member_id) && this.isEntrust
4866
+ ? res === null || res === void 0 ? void 0 : res.assigned_to_member_id
4867
+ : [];
4868
+ AssigneeAnyUserList =
4869
+ ((_a = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
4870
+ ((_c = (_b = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _b === void 0 ? void 0 : _b.assigneeAnyoneGroupIds) === null || _c === void 0 ? void 0 : _c.length) > 0
4871
+ ? assigneeAnyOneList.filter(function (employeeIds) { var _a, _b; return (_b = (_a = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _a === void 0 ? void 0 : _a.assigneeAnyoneIds) === null || _b === void 0 ? void 0 : _b.includes(employeeIds); })
4872
+ : __spreadArray([], __read(assigneeAnyOneList));
4873
+ AssigneeAllUserList =
4874
+ (res === null || res === void 0 ? void 0 : res.assigned_to) && !this.isEntrust ? res === null || res === void 0 ? void 0 : res.assigned_to : [];
4698
4875
  var assignedToUserDetails = this.setList(this.assigneesList, [Number(res === null || res === void 0 ? void 0 : res.assigned_to)], 'employee_id');
4699
4876
  if (assignedToUserDetails === null || assignedToUserDetails === void 0 ? void 0 : assignedToUserDetails.length) {
4700
4877
  var member_id = (_d = assignedToUserDetails[0]) === null || _d === void 0 ? void 0 : _d.my_member_id;
4701
4878
  if ((_f = (_e = res === null || res === void 0 ? void 0 : res.existingUserIds) === null || _e === void 0 ? void 0 : _e.assigneeAllIds) === null || _f === void 0 ? void 0 : _f.includes(member_id)) {
4702
4879
  AssigneeAllUserList = res === null || res === void 0 ? void 0 : res.assigned_to;
4703
- res.userGroupIds["assigneeAllGroupIds"] = [];
4880
+ res.userGroupIds['assigneeAllGroupIds'] = [];
4704
4881
  }
4705
4882
  else if (((_h = (_g = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _g === void 0 ? void 0 : _g.assigneeAllGroupIds) === null || _h === void 0 ? void 0 : _h.length) > 0) {
4706
4883
  AssigneeAllUserList = [];
4707
4884
  }
4708
4885
  }
4709
- this.responsibilityForm["assignees"] = {
4710
- whoCanComplete: (res.isGroupAssignTo) ? 'ANY_ONE' : 'ALL',
4711
- list: (((_j = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _j === void 0 ? void 0 : _j.length) == 0) ? this.setList(this.assigneesList, [Number(AssigneeAllUserList)], 'employee_id') :
4712
- this.setList(this.assigneesList, AssigneeAnyUserList, 'my_member_id'),
4886
+ this.responsibilityForm['assignees'] = {
4887
+ whoCanComplete: res.isGroupAssignTo ? 'ANY_ONE' : 'ALL',
4888
+ list: ((_j = res === null || res === void 0 ? void 0 : res.assigned_to_member_id) === null || _j === void 0 ? void 0 : _j.length) == 0
4889
+ ? this.setList(this.assigneesList, [Number(AssigneeAllUserList)], 'employee_id')
4890
+ : this.setList(this.assigneesList, AssigneeAnyUserList, 'my_member_id'),
4713
4891
  };
4714
- this.responsibilityForm["assigneeGroups"] = {
4892
+ this.responsibilityForm['assigneeGroups'] = {
4715
4893
  whoCanComplete: (res === null || res === void 0 ? void 0 : res.isGroupAssignTo) ? 'ANY_ONE' : 'ALL',
4716
- list: (((_l = (_k = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _k === void 0 ? void 0 : _k.assigneeAnyoneGroupIds) === null || _l === void 0 ? void 0 : _l.length) == 0) ? ((_o = (_m = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _m === void 0 ? void 0 : _m.assigneeAllGroupIds) === null || _o === void 0 ? void 0 : _o.length) > 0 ? this.setList(this.OrgGroup, (_p = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _p === void 0 ? void 0 : _p.assigneeAllGroupIds, 'group_id') : [] :
4717
- this.setList(this.OrgGroup, (_q = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _q === void 0 ? void 0 : _q.assigneeAnyoneGroupIds, 'group_id'),
4894
+ list: ((_l = (_k = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _k === void 0 ? void 0 : _k.assigneeAnyoneGroupIds) === null || _l === void 0 ? void 0 : _l.length) == 0
4895
+ ? ((_o = (_m = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _m === void 0 ? void 0 : _m.assigneeAllGroupIds) === null || _o === void 0 ? void 0 : _o.length) > 0
4896
+ ? this.setList(this.OrgGroup, (_p = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _p === void 0 ? void 0 : _p.assigneeAllGroupIds, 'group_id')
4897
+ : []
4898
+ : this.setList(this.OrgGroup, (_q = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _q === void 0 ? void 0 : _q.assigneeAnyoneGroupIds, 'group_id'),
4718
4899
  };
4719
- this.allGroupAssignee = (((_t = (_s = (_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.assigneeGroups) === null || _s === void 0 ? void 0 : _s.list) === null || _t === void 0 ? void 0 : _t.length) > 0 && !this.isEntrust);
4900
+ this.allGroupAssignee =
4901
+ ((_t = (_s = (_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.assigneeGroups) === null || _s === void 0 ? void 0 : _s.list) === null || _t === void 0 ? void 0 : _t.length) > 0 &&
4902
+ !this.isEntrust;
4720
4903
  };
4721
4904
  /**
4722
- * this function is for getting the users data based on member_id of users of selected User Group
4723
- * @param userlist contains users data
4724
- * @param selectedgroups contains selected User Group data
4725
- * @returns user data of Selected user group.
4726
- */
4905
+ * this function is for getting the users data based on member_id of users of selected User Group
4906
+ * @param userlist contains users data
4907
+ * @param selectedgroups contains selected User Group data
4908
+ * @returns user data of Selected user group.
4909
+ */
4727
4910
  WorkflowComplianceComponent.prototype.getGroupsUserEmployeesId = function (userList, selectedGroups) {
4728
4911
  var groupMemberIds = [];
4729
4912
  var groupUserEmployee = [];
@@ -4749,9 +4932,10 @@
4749
4932
  var _a, _b;
4750
4933
  var index = -1;
4751
4934
  if (((_a = (acceptedData !== null && acceptedData !== void 0 ? acceptedData : [])) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4752
- index = (_b = acceptedData === null || acceptedData === void 0 ? void 0 : acceptedData.findIndex(function (ele) { return ele.member_id === element; })) !== null && _b !== void 0 ? _b : -1;
4935
+ index =
4936
+ (_b = acceptedData === null || acceptedData === void 0 ? void 0 : acceptedData.findIndex(function (ele) { return ele.member_id === element; })) !== null && _b !== void 0 ? _b : -1;
4753
4937
  }
4754
- var acceptStatus = (index > -1 && acceptedData) ? acceptedData[index].reviewer_accept : 0;
4938
+ var acceptStatus = index > -1 && acceptedData ? acceptedData[index].reviewer_accept : 0;
4755
4939
  if (acceptStatus === 0 && reviewerType === 'ANYONE') {
4756
4940
  acceptStatus = 1;
4757
4941
  }
@@ -4763,10 +4947,14 @@
4763
4947
  WorkflowComplianceComponent.prototype.checkWhetherAllListsLoaded = function () {
4764
4948
  var _this = this;
4765
4949
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4766
- if (this.rcListLoaded && this.assigneesListLoaded && this.assignorsListLoaded &&
4767
- this.categoriesListLoaded && this.assuranceCategoryListLoaded && this.groupsListLoaded) {
4950
+ if (this.rcListLoaded &&
4951
+ this.assigneesListLoaded &&
4952
+ this.assignorsListLoaded &&
4953
+ this.categoriesListLoaded &&
4954
+ this.assuranceCategoryListLoaded &&
4955
+ this.groupsListLoaded) {
4768
4956
  if (((_a = this.frameworkDetails) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4769
- this.entrustFramework(this.frameworkDetails[0]);
4957
+ this.assignFromFramework(this.frameworkDetails[0]);
4770
4958
  }
4771
4959
  if (this.mode === 'EDIT') {
4772
4960
  this.getEditResponsibilityDetails(this.responsibilityId);
@@ -4777,13 +4965,25 @@
4777
4965
  if (this.selectedProgram) {
4778
4966
  this.responsibilityForm.program.push(this.selectedProgram);
4779
4967
  this.responsibilityForm.program_selected_ids.push(this.selectedProgram.category_id);
4780
- this.responsibilityForm.category_id = (_c = (_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.category_id) === null || _c === void 0 ? void 0 : _c.toString();
4968
+ this.responsibilityForm.category_id =
4969
+ (_c = (_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.category_id) === null || _c === void 0 ? void 0 : _c.toString();
4781
4970
  if ((_d = this.orgDetails) === null || _d === void 0 ? void 0 : _d.hasProgramFullPermission) {
4782
- this.responsibilityForm.assignees.whoCanComplete = (((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.default_assignee_type) == 'ANYONE') ? 'ANY_ONE' : 'ALL';
4783
- this.responsibilityForm.reviewers.sequentialWorkflow = (((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f.default_reviewers_type) == 'SEQUENTIAL') ? true : false;
4784
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_g = this.selectedProgram) === null || _g === void 0 ? void 0 : _g.evidence_upload_flag) ? true : false;
4971
+ this.responsibilityForm.assignees.whoCanComplete =
4972
+ ((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.default_assignee_type) == 'ANYONE'
4973
+ ? 'ANY_ONE'
4974
+ : 'ALL';
4975
+ this.responsibilityForm.reviewers.sequentialWorkflow =
4976
+ ((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f.default_reviewers_type) == 'SEQUENTIAL'
4977
+ ? true
4978
+ : false;
4979
+ this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_g = this
4980
+ .selectedProgram) === null || _g === void 0 ? void 0 : _g.evidence_upload_flag)
4981
+ ? true
4982
+ : false;
4785
4983
  }
4786
- var programCustomTags = ((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h.custom_tags) ? JSON.parse(this.selectedProgram.custom_tags) : [];
4984
+ var programCustomTags = ((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h.custom_tags)
4985
+ ? JSON.parse(this.selectedProgram.custom_tags)
4986
+ : [];
4787
4987
  programCustomTags.forEach(function (tag) {
4788
4988
  var tagData = JSON.parse(tag);
4789
4989
  var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
@@ -4794,7 +4994,8 @@
4794
4994
  var checkedMoreOptions = [];
4795
4995
  this.moreOptions.PROGRAM = true;
4796
4996
  checkedMoreOptions.push('PROGRAM');
4797
- if (((_j = this.selectedProgram) === null || _j === void 0 ? void 0 : _j.evidence_upload_flag) && ((_k = this.orgDetails) === null || _k === void 0 ? void 0 : _k.hasProgramFullPermission)) {
4997
+ if (((_j = this.selectedProgram) === null || _j === void 0 ? void 0 : _j.evidence_upload_flag) &&
4998
+ ((_k = this.orgDetails) === null || _k === void 0 ? void 0 : _k.hasProgramFullPermission)) {
4798
4999
  checkedMoreOptions.push('FORMATE_EVIDENCE');
4799
5000
  this.moreOptions.FORMATE_EVIDENCE = true;
4800
5001
  }
@@ -4824,7 +5025,8 @@
4824
5025
  if (this.invalidType === 'who') {
4825
5026
  this.invalidType = '';
4826
5027
  }
4827
- if (!this.isEntrust && this.responsibilityForm.assignees.whoCanComplete !== 'ANY_ONE') {
5028
+ if (!this.isEntrust &&
5029
+ this.responsibilityForm.assignees.whoCanComplete !== 'ANY_ONE') {
4828
5030
  this.responsibilityForm.assignees.list = this.setList(this.assigneesList, [selectedItems.employee_id], 'employee_id');
4829
5031
  this.callRefreshList();
4830
5032
  }
@@ -4849,7 +5051,11 @@
4849
5051
  case 'category':
4850
5052
  this.responsibilityForm.category = selectedItems;
4851
5053
  selectedItems.forEach(function (element) {
4852
- var tag = element.custom_tags !== '' && element.custom_tags !== "null" && element.custom_tags != "[]" ? JSON.parse(element.custom_tags) : [];
5054
+ var tag = element.custom_tags !== '' &&
5055
+ element.custom_tags !== 'null' &&
5056
+ element.custom_tags != '[]'
5057
+ ? JSON.parse(element.custom_tags)
5058
+ : [];
4853
5059
  if ((tag === null || tag === void 0 ? void 0 : tag.length) > 0) {
4854
5060
  tag.forEach(function (tagData) {
4855
5061
  var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
@@ -4862,19 +5068,29 @@
4862
5068
  break;
4863
5069
  case 'program':
4864
5070
  this.responsibilityForm.linkedProgram = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.linkedProgram;
4865
- if ((this.selectedProgram && !(((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.programType) === 0 && ((_e = (_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'uncategorized' || !((_f = this.orgDetails) === null || _f === void 0 ? void 0 : _f.hasProgramFullPermission))) && !this.feature.isFeatureEnabled('ff_deprecate_primary_program_flag')) {
4866
- this.responsibilityForm.category = (selectedItems.categories) ? selectedItems.categories : [];
5071
+ if (this.selectedProgram &&
5072
+ !((((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.programType) === 0 &&
5073
+ ((_e = (_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'uncategorized') ||
5074
+ !((_f = this.orgDetails) === null || _f === void 0 ? void 0 : _f.hasProgramFullPermission)) &&
5075
+ !this.feature.isFeatureEnabled('ff_deprecate_primary_program_flag')) {
5076
+ this.responsibilityForm.category = selectedItems.categories
5077
+ ? selectedItems.categories
5078
+ : [];
4867
5079
  var categoryId = (_g = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _g === void 0 ? void 0 : _g.toString();
4868
5080
  if ((_h = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _h === void 0 ? void 0 : _h.length) {
4869
- this.responsibilityForm.category_id = ((_j = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _j === void 0 ? void 0 : _j.category_id) + ',' + categoryId;
5081
+ this.responsibilityForm.category_id =
5082
+ ((_j = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _j === void 0 ? void 0 : _j.category_id) + ',' + categoryId;
4870
5083
  }
4871
5084
  else {
4872
- this.responsibilityForm.category_id = (_l = (_k = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _k === void 0 ? void 0 : _k.category_id) === null || _l === void 0 ? void 0 : _l.toString();
5085
+ this.responsibilityForm.category_id =
5086
+ (_l = (_k = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _k === void 0 ? void 0 : _k.category_id) === null || _l === void 0 ? void 0 : _l.toString();
4873
5087
  }
4874
5088
  this.responsibilityForm.program_selected_ids = __spreadArray(__spreadArray([], __read(new Set(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories))), __read(new Set([(_m = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _m === void 0 ? void 0 : _m.category_id])));
4875
- var programCustomTags = ((_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _o === void 0 ? void 0 : _o.custom_tags) ? JSON.parse((_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _p === void 0 ? void 0 : _p.custom_tags) : [];
5089
+ var programCustomTags = ((_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _o === void 0 ? void 0 : _o.custom_tags)
5090
+ ? JSON.parse((_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _p === void 0 ? void 0 : _p.custom_tags)
5091
+ : [];
4876
5092
  programCustomTags === null || programCustomTags === void 0 ? void 0 : programCustomTags.forEach(function (tag) {
4877
- var tagData = typeof tag === "string" ? JSON.parse(tag) : tag;
5093
+ var tagData = typeof tag === 'string' ? JSON.parse(tag) : tag;
4878
5094
  var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
4879
5095
  if (index == -1) {
4880
5096
  _this.responsibilityForm.customTags.push(tagData);
@@ -4883,40 +5099,59 @@
4883
5099
  }
4884
5100
  else {
4885
5101
  if ((_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.assessment) {
4886
- ((_s = Object.keys((_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.assessment)) === null || _s === void 0 ? void 0 : _s.length) ? this.getProgramDetails(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program._id) : null;
5102
+ ((_s = Object.keys((_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.assessment)) === null || _s === void 0 ? void 0 : _s.length)
5103
+ ? this.getProgramDetails(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program._id)
5104
+ : null;
4887
5105
  }
4888
- this.responsibilityForm.category = (selectedItems.categories) ? selectedItems.categories : [];
5106
+ this.responsibilityForm.category = selectedItems.categories
5107
+ ? selectedItems.categories
5108
+ : [];
4889
5109
  this.responsibilityForm.program = [];
4890
5110
  this.responsibilityForm.category_id = '';
4891
5111
  this.responsibilityForm.program_selected_ids = [];
4892
5112
  this.responsibilityForm.customTags = [];
4893
- this.responsibilityForm.program = (selectedItems.program) ? [selectedItems.program] : [];
5113
+ this.responsibilityForm.program = selectedItems.program
5114
+ ? [selectedItems.program]
5115
+ : [];
4894
5116
  var categoryId = (_t = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _t === void 0 ? void 0 : _t.toString();
4895
5117
  if ((_u = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _u === void 0 ? void 0 : _u.length) {
4896
- this.responsibilityForm.category_id = ((_v = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _v === void 0 ? void 0 : _v.category_id) + ',' + categoryId;
5118
+ this.responsibilityForm.category_id =
5119
+ ((_v = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _v === void 0 ? void 0 : _v.category_id) + ',' + categoryId;
4897
5120
  }
4898
5121
  else {
4899
- this.responsibilityForm.category_id = (_x = (_w = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _w === void 0 ? void 0 : _w.category_id) === null || _x === void 0 ? void 0 : _x.toString();
5122
+ this.responsibilityForm.category_id =
5123
+ (_x = (_w = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _w === void 0 ? void 0 : _w.category_id) === null || _x === void 0 ? void 0 : _x.toString();
4900
5124
  }
4901
5125
  this.responsibilityForm.program_selected_ids = __spreadArray(__spreadArray([], __read(new Set(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories))), __read(new Set([(_y = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _y === void 0 ? void 0 : _y.category_id])));
4902
- var programCustomTags = ((_z = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _z === void 0 ? void 0 : _z.custom_tags) ? JSON.parse((_0 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _0 === void 0 ? void 0 : _0.custom_tags) : [];
5126
+ var programCustomTags = ((_z = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _z === void 0 ? void 0 : _z.custom_tags)
5127
+ ? JSON.parse((_0 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _0 === void 0 ? void 0 : _0.custom_tags)
5128
+ : [];
4903
5129
  programCustomTags === null || programCustomTags === void 0 ? void 0 : programCustomTags.forEach(function (tag) {
4904
- var tagData = typeof tag === "string" ? JSON.parse(tag) : tag;
5130
+ var tagData = typeof tag === 'string' ? JSON.parse(tag) : tag;
4905
5131
  var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
4906
5132
  if (index == -1) {
4907
5133
  _this.responsibilityForm.customTags.push(tagData);
4908
5134
  }
4909
5135
  });
4910
5136
  if ((_1 = this.orgDetails) === null || _1 === void 0 ? void 0 : _1.hasProgramFullPermission) {
4911
- this.responsibilityForm.assignees.whoCanComplete = (((_2 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _2 === void 0 ? void 0 : _2.default_assignee_type) == 'ANYONE') ? 'ANY_ONE' : 'ALL';
4912
- this.responsibilityForm.reviewers.sequentialWorkflow = (((_3 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _3 === void 0 ? void 0 : _3.default_reviewers_type) == 'SEQUENTIAL') ? true : false;
4913
- this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_4 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _4 === void 0 ? void 0 : _4.evidence_upload_flag) ? true : false;
5137
+ this.responsibilityForm.assignees.whoCanComplete =
5138
+ ((_2 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _2 === void 0 ? void 0 : _2.default_assignee_type) == 'ANYONE'
5139
+ ? 'ANY_ONE'
5140
+ : 'ALL';
5141
+ this.responsibilityForm.reviewers.sequentialWorkflow =
5142
+ ((_3 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _3 === void 0 ? void 0 : _3.default_reviewers_type) == 'SEQUENTIAL'
5143
+ ? true
5144
+ : false;
5145
+ this.responsibilityForm.formatAndEvidence.evidenceRequired =
5146
+ ((_4 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _4 === void 0 ? void 0 : _4.evidence_upload_flag) ? true : false;
4914
5147
  if ((_5 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _5 === void 0 ? void 0 : _5.evidence_upload_flag) {
4915
5148
  this.moreOptions.FORMATE_EVIDENCE = true;
4916
5149
  }
4917
5150
  }
4918
- if (!(((_6 = this.selectedProgram) === null || _6 === void 0 ? void 0 : _6.programType) === 0 && ((_8 = (_7 = this.selectedProgram) === null || _7 === void 0 ? void 0 : _7.name) === null || _8 === void 0 ? void 0 : _8.toLowerCase()) === 'uncategorized')) {
4919
- if (((_9 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _9 === void 0 ? void 0 : _9._id) && ((_10 = this.orgDetails) === null || _10 === void 0 ? void 0 : _10.hasProgramFullPermission)) {
5151
+ if (!(((_6 = this.selectedProgram) === null || _6 === void 0 ? void 0 : _6.programType) === 0 &&
5152
+ ((_8 = (_7 = this.selectedProgram) === null || _7 === void 0 ? void 0 : _7.name) === null || _8 === void 0 ? void 0 : _8.toLowerCase()) === 'uncategorized')) {
5153
+ if (((_9 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _9 === void 0 ? void 0 : _9._id) &&
5154
+ ((_10 = this.orgDetails) === null || _10 === void 0 ? void 0 : _10.hasProgramFullPermission)) {
4920
5155
  this.filterListsAccordingToProgram(selectedItems.program._id);
4921
5156
  }
4922
5157
  else {
@@ -4957,21 +5192,27 @@
4957
5192
  break;
4958
5193
  case 'requires_audit':
4959
5194
  this.responsibilityForm.requiresAuditList = this.setList(this.assuranceRequiresAuditList, [selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.category_id], 'category_id');
4960
- this.responsibilityForm['audit_category_details']['category_id'] = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.category_id;
5195
+ this.responsibilityForm['audit_category_details']['category_id'] =
5196
+ selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.category_id;
4961
5197
  break;
4962
5198
  case 'checkpoints':
4963
5199
  this.responsibilityForm.checkpoints = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.checkpointDetails;
4964
- this.responsibilityForm.checkpointInstruction = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.checkpointInstruction;
5200
+ this.responsibilityForm.checkpointInstruction =
5201
+ selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.checkpointInstruction;
4965
5202
  break;
4966
5203
  case 'calculatedrisk':
4967
5204
  this.responsibilityForm.riskClass = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskClass;
4968
5205
  this.responsibilityForm.riskMatrix = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskMatrix;
4969
5206
  break;
4970
5207
  case 'formate_evidence':
4971
- this.responsibilityForm.formatAndEvidence.formatRequired = (_11 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _11 !== void 0 ? _11 : false;
4972
- this.responsibilityForm.formatAndEvidence.formatFiles = (_12 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _12 !== void 0 ? _12 : [];
4973
- this.responsibilityForm.formatAndEvidence.formatLinks = (_13 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _13 !== void 0 ? _13 : [];
4974
- this.responsibilityForm.formatAndEvidence.evidenceRequired = (_14 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _14 !== void 0 ? _14 : false;
5208
+ this.responsibilityForm.formatAndEvidence.formatRequired =
5209
+ (_11 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _11 !== void 0 ? _11 : false;
5210
+ this.responsibilityForm.formatAndEvidence.formatFiles =
5211
+ (_12 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _12 !== void 0 ? _12 : [];
5212
+ this.responsibilityForm.formatAndEvidence.formatLinks =
5213
+ (_13 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _13 !== void 0 ? _13 : [];
5214
+ this.responsibilityForm.formatAndEvidence.evidenceRequired =
5215
+ (_14 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _14 !== void 0 ? _14 : false;
4975
5216
  break;
4976
5217
  case 'reviewFrequency':
4977
5218
  this.responsibilityForm.reviewers.reviewFrequency = {
@@ -4988,7 +5229,8 @@
4988
5229
  */
4989
5230
  WorkflowComplianceComponent.prototype.callRefreshList = function () {
4990
5231
  var _a, _b;
4991
- if (((_a = this.responsibilityForm.program) === null || _a === void 0 ? void 0 : _a.length) && ((_b = this.orgDetails) === null || _b === void 0 ? void 0 : _b.hasProgramFullPermission)) {
5232
+ if (((_a = this.responsibilityForm.program) === null || _a === void 0 ? void 0 : _a.length) &&
5233
+ ((_b = this.orgDetails) === null || _b === void 0 ? void 0 : _b.hasProgramFullPermission)) {
4992
5234
  this.refreshListsWhileProgramSelected();
4993
5235
  }
4994
5236
  else {
@@ -5091,7 +5333,7 @@
5091
5333
  sample: 0,
5092
5334
  percentage: 0,
5093
5335
  frequency_pattern: '',
5094
- frequency_time: ''
5336
+ frequency_time: '',
5095
5337
  };
5096
5338
  break;
5097
5339
  case 'assurance':
@@ -5103,8 +5345,8 @@
5103
5345
  break;
5104
5346
  case 'assessment':
5105
5347
  this.responsibilityForm.assessment = {
5106
- category_id: "",
5107
- assessment_id: "",
5348
+ category_id: '',
5349
+ assessment_id: '',
5108
5350
  };
5109
5351
  break;
5110
5352
  case 'new-checkpoints':
@@ -5127,8 +5369,13 @@
5127
5369
  userObj.push(ele.employee_id);
5128
5370
  });
5129
5371
  this.responsibilityForm.reviewers.list = this.setList(this.reviewersList, userObj, 'employee_id');
5130
- this.responsibilityForm.groupReviewers = { list: (((_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _a === void 0 ? void 0 : _a.length) > 0) ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [] };
5131
- this.responsibilityForm.reviewers.sequentialWorkflow = ((_d = (_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.groupReviewers) === null || _c === void 0 ? void 0 : _c.list) === null || _d === void 0 ? void 0 : _d.length) > 0 ? false : this.responsibilityForm.reviewers.sequentialWorkflow;
5372
+ this.responsibilityForm.groupReviewers = {
5373
+ list: ((_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _a === void 0 ? void 0 : _a.length) > 0 ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [],
5374
+ };
5375
+ this.responsibilityForm.reviewers.sequentialWorkflow =
5376
+ ((_d = (_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.groupReviewers) === null || _c === void 0 ? void 0 : _c.list) === null || _d === void 0 ? void 0 : _d.length) > 0
5377
+ ? false
5378
+ : this.responsibilityForm.reviewers.sequentialWorkflow;
5132
5379
  };
5133
5380
  WorkflowComplianceComponent.prototype.saveOverseerData = function (selectedItems, type) {
5134
5381
  var _a, _b;
@@ -5136,12 +5383,14 @@
5136
5383
  case 'overseerList':
5137
5384
  var overseerselectedlist = this.returnIds(selectedItems.users, 'employee_id');
5138
5385
  this.responsibilityForm.overseers.list = this.setList(this.overseersList, overseerselectedlist, 'employee_id');
5139
- this.responsibilityForm.overseersGroups['list'] = (((_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _a === void 0 ? void 0 : _a.length) > 0) ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [];
5386
+ this.responsibilityForm.overseersGroups['list'] =
5387
+ ((_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _a === void 0 ? void 0 : _a.length) > 0 ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [];
5140
5388
  break;
5141
5389
  case 'overseerNotifyList':
5142
5390
  var overseerselectedNotifylist = this.returnIds(selectedItems.users, 'employee_id');
5143
5391
  this.responsibilityForm.overseers.notifyList = this.setList(this.overseersList, overseerselectedNotifylist, 'employee_id');
5144
- this.responsibilityForm.overseersGroups['notifyList'] = (((_b = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _b === void 0 ? void 0 : _b.length) > 0) ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [];
5392
+ this.responsibilityForm.overseersGroups['notifyList'] =
5393
+ ((_b = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups) === null || _b === void 0 ? void 0 : _b.length) > 0 ? selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.groups : [];
5145
5394
  break;
5146
5395
  }
5147
5396
  };
@@ -5151,59 +5400,95 @@
5151
5400
  this.activeDeselector();
5152
5401
  this.responsibilityForm.responsibility = {
5153
5402
  name: event.report_name,
5154
- keyResponsibility: (event.key_compliance) ? true : false,
5403
+ keyResponsibility: event.key_compliance ? true : false,
5155
5404
  };
5156
- var newStartDate = event.start_date || event.start_date != null || event.start_date !== '' ? new Date(event.start_date * 1000) : new Date();
5157
- var pvtTemplate = event.frequency_template && event.frequency_template !== '' ? event.frequency_template : event.frequency;
5405
+ var newStartDate = event.start_date || event.start_date != null || event.start_date !== ''
5406
+ ? new Date(event.start_date * 1000)
5407
+ : new Date();
5408
+ var pvtTemplate = event.frequency_template && event.frequency_template !== ''
5409
+ ? event.frequency_template
5410
+ : event.frequency;
5158
5411
  var frequencyDetailsObject = this.frequencyService.shortHand_freqCal(pvtTemplate, newStartDate.getDate(), newStartDate.getMonth(), newStartDate.getFullYear());
5159
5412
  this.responsibilityForm.frequency_details = frequencyDetailsObject === null || frequencyDetailsObject === void 0 ? void 0 : frequencyDetailsObject.pattern;
5160
5413
  event.frequency_details = this.responsibilityForm.frequency_details;
5161
5414
  event.frequency_time = '23:59:00';
5162
- event.reminder_before_days = event.remind_days_before_due_date ? event.remind_days_before_due_date : 2;
5163
- ;
5164
- event.failed_after_days = event.mark_failed_after ? event.mark_failed_after : 2;
5415
+ event.reminder_before_days = event.remind_days_before_due_date
5416
+ ? event.remind_days_before_due_date
5417
+ : 2;
5418
+ event.failed_after_days = event.mark_failed_after
5419
+ ? event.mark_failed_after
5420
+ : 2;
5165
5421
  event.lifecycle_details = '0000-00-00~~0';
5166
5422
  event.start_of_day_utc = this.frequencyService.frameworkStartDate(event);
5167
5423
  event.on_completion_of = [];
5168
5424
  event.dom_utc = new Date().getTime();
5169
- event.continuous_failed_days = frequencyDetailsObject.continuous_failed_days;
5170
- this.responsibilityForm.frequency = this.responsibilityForm.frequency_details;
5425
+ event.continuous_failed_days =
5426
+ frequencyDetailsObject.continuous_failed_days;
5427
+ this.responsibilityForm.frequency =
5428
+ this.responsibilityForm.frequency_details;
5171
5429
  this.responsibilityForm.frequency_time = '23:59:00';
5172
- this.responsibilityForm.reminder_before_days = event.remind_days_before_due_date ? event.remind_days_before_due_date : 2;
5173
- ;
5174
- this.responsibilityForm.failed_after_days = event.mark_failed_after ? event.mark_failed_after : 2;
5430
+ this.responsibilityForm.reminder_before_days =
5431
+ event.remind_days_before_due_date ? event.remind_days_before_due_date : 2;
5432
+ this.responsibilityForm.failed_after_days = event.mark_failed_after
5433
+ ? event.mark_failed_after
5434
+ : 2;
5175
5435
  this.responsibilityForm.lifecycleDetails = '0000-00-00~~0';
5176
- this.responsibilityForm.start_of_day_utc = this.frequencyService.frameworkStartDate(event).toFixed().toString();
5436
+ this.responsibilityForm.start_of_day_utc = this.frequencyService
5437
+ .frameworkStartDate(event)
5438
+ .toFixed()
5439
+ .toString();
5177
5440
  this.responsibilityForm.on_completion_of = [];
5178
5441
  this.responsibilityForm.dom_utc = new Date().getTime();
5179
- this.responsibilityForm.description = event.remarks.trim() != '' ? event.remarks : '';
5180
- this.responsibilityForm.customTags = event.custom_tags && event.custom_tags !== null && event.custom_tags !== 'null' && event.custom_tags !== '' ? JSON.parse(event.custom_tags) : [];
5181
- this.responsibilityForm.objective = event.control_objective ? event.control_objective : '';
5442
+ this.responsibilityForm.description =
5443
+ event.remarks.trim() != '' ? event.remarks : '';
5444
+ this.responsibilityForm.customTags =
5445
+ event.custom_tags &&
5446
+ event.custom_tags !== null &&
5447
+ event.custom_tags !== 'null' &&
5448
+ event.custom_tags !== ''
5449
+ ? JSON.parse(event.custom_tags)
5450
+ : [];
5451
+ this.responsibilityForm.objective = event.control_objective
5452
+ ? event.control_objective
5453
+ : '';
5182
5454
  this.responsibilityForm.category = this.setList(this.allCategories, [event.category_id], 'category_id'); //
5183
5455
  this.responsibilityForm.reviewers.reviewFrequency.reviewCompleteDays = 2;
5184
5456
  this.responsibilityForm.reviewers.reviewFrequency.reviewNOtCompletedDays = 2;
5185
- this.responsibilityForm.rc = this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; }) ? [this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; })] : [];
5457
+ this.responsibilityForm.rc = this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; })
5458
+ ? [
5459
+ this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; }),
5460
+ ]
5461
+ : [];
5186
5462
  this.responsibilityForm.riskClass = this.isRiskEnable ? 1 : 2;
5187
5463
  this.responsibilityForm.private_library_id = event.report_id;
5188
- this.responsibilityForm.frequency = this.responsibilityForm.frequency_details;
5464
+ this.responsibilityForm.frequency =
5465
+ this.responsibilityForm.frequency_details;
5189
5466
  this.responsibilityForm.classification = this.isRiskEnable ? 1 : 2;
5190
- this.responsibilityForm.continuous_failed_days = frequencyDetailsObject.continuous_failed_days;
5191
- this.responsibilityForm.startDate = this.frequencyService.frameworkStartDate(event);
5467
+ this.responsibilityForm.continuous_failed_days =
5468
+ frequencyDetailsObject.continuous_failed_days;
5469
+ this.responsibilityForm.startDate =
5470
+ this.frequencyService.frameworkStartDate(event);
5192
5471
  this.responsibilityForm.formatAndEvidence = {
5193
5472
  evidenceRequired: event.report_upload_flag ? true : false,
5194
5473
  formatFiles: event.report_format,
5195
- formatLinks: !(event.report_format_link) || event.report_format_link == '' ? [] : [event.report_format_link],
5196
- formatRequired: (((_a = event.report_format) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((event.report_format_link) && event.report_format_link != '')) ? true : false
5474
+ formatLinks: !event.report_format_link || event.report_format_link == ''
5475
+ ? []
5476
+ : [event.report_format_link],
5477
+ formatRequired: ((_a = event.report_format) === null || _a === void 0 ? void 0 : _a.length) > 0 ||
5478
+ (event.report_format_link && event.report_format_link != '')
5479
+ ? true
5480
+ : false,
5197
5481
  };
5198
5482
  this.responsibilityForm.audit_category_details = {
5199
5483
  category_id: 0,
5200
5484
  sample: 5,
5201
5485
  percentage: 30,
5202
5486
  frequency_pattern: '1~0~3~1',
5203
- frequency_time: '23:59:00'
5487
+ frequency_time: '23:59:00',
5204
5488
  };
5205
5489
  event.frequency_time = '11:59 pm';
5206
- if (event.frequency_details !== '' && event.frequency_details !== '5~0~0~0') {
5490
+ if (event.frequency_details !== '' &&
5491
+ event.frequency_details !== '5~0~0~0') {
5207
5492
  this.frequencyPopulation(event);
5208
5493
  }
5209
5494
  else {
@@ -5222,7 +5507,8 @@
5222
5507
  checkedMoreOptions.push('CATEGORY');
5223
5508
  this.moreOptions.CATEGORY = true;
5224
5509
  }
5225
- if (((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.formatAndEvidence) === null || _d === void 0 ? void 0 : _d.evidenceRequired) || ((_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.formatAndEvidence) === null || _f === void 0 ? void 0 : _f.formatRequired)) {
5510
+ if (((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.formatAndEvidence) === null || _d === void 0 ? void 0 : _d.evidenceRequired) ||
5511
+ ((_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.formatAndEvidence) === null || _f === void 0 ? void 0 : _f.formatRequired)) {
5226
5512
  checkedMoreOptions.push('FORMATE_EVIDENCE');
5227
5513
  this.moreOptions.FORMATE_EVIDENCE = true;
5228
5514
  }
@@ -5230,11 +5516,13 @@
5230
5516
  checkedMoreOptions.push('RC');
5231
5517
  this.moreOptions.RC = true;
5232
5518
  }
5519
+ console.log('dwcewdec ewfwe ===>', event, this.responsibilityForm);
5233
5520
  this.populateOption.emit(checkedMoreOptions);
5234
5521
  // event.placeholder
5235
5522
  };
5236
5523
  WorkflowComplianceComponent.prototype.assignFromFramework = function (freqObj) {
5237
5524
  var _a, _b, _c, _d, _e, _f, _g, _h;
5525
+ console.log('objec ===>', freqObj);
5238
5526
  if (freqObj.data) {
5239
5527
  // this.reset();
5240
5528
  this.activeDeselector();
@@ -5249,7 +5537,8 @@
5249
5537
  event.start_of_day_utc = Date.now() / 1000;
5250
5538
  event.on_completion_of = [];
5251
5539
  event.dom_utc = new Date().getTime();
5252
- event.continuous_failed_days = frequencyDetailsObject.continuous_failed_days;
5540
+ event.continuous_failed_days =
5541
+ frequencyDetailsObject.continuous_failed_days;
5253
5542
  this.getFrequencyPlaceholder(event);
5254
5543
  event.placeholder = this.frequencyPlaceholder;
5255
5544
  event.frequency_time = '11:59 pm';
@@ -5259,7 +5548,8 @@
5259
5548
  this.responsibilityForm.frequency = (_c = frequencyDetailsObject === null || frequencyDetailsObject === void 0 ? void 0 : frequencyDetailsObject.pattern) !== null && _c !== void 0 ? _c : '';
5260
5549
  this.responsibilityForm.startDate = event.start_of_day_utc;
5261
5550
  this.responsibilityForm.reminder_before_days = event.reminder_before_days;
5262
- this.responsibilityForm.continuous_failed_days = event.continuous_failed_days;
5551
+ this.responsibilityForm.continuous_failed_days =
5552
+ event.continuous_failed_days;
5263
5553
  this.responsibilityForm.failed_after_days = event.failed_after_days;
5264
5554
  this.selectedFrameworkValues = (_d = freqObj.selectedFrameworkData) !== null && _d !== void 0 ? _d : undefined;
5265
5555
  if ((_e = freqObj === null || freqObj === void 0 ? void 0 : freqObj.data) === null || _e === void 0 ? void 0 : _e.description) {
@@ -5313,11 +5603,17 @@
5313
5603
  var assignees = lodash.cloneDeep((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assignees) === null || _d === void 0 ? void 0 : _d.list);
5314
5604
  var assigneeGroupList = lodash.cloneDeep((_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.assigneeGroups) === null || _f === void 0 ? void 0 : _f.list);
5315
5605
  var reviewers = lodash.cloneDeep(this.responsibilityForm.reviewers.list);
5316
- var groupReviewersList = this.featureFlag_groups ? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list) : [];
5606
+ var groupReviewersList = this.featureFlag_groups
5607
+ ? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list)
5608
+ : [];
5317
5609
  var overseerList = lodash.cloneDeep((_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.overseers) === null || _k === void 0 ? void 0 : _k.list);
5318
- var groupOverseerList = this.featureFlag_groups ? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list) : [];
5610
+ var groupOverseerList = this.featureFlag_groups
5611
+ ? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list)
5612
+ : [];
5319
5613
  var notifyOverseers = lodash.cloneDeep((_p = (_o = this.responsibilityForm) === null || _o === void 0 ? void 0 : _o.overseers) === null || _p === void 0 ? void 0 : _p.notifyList);
5320
- var groupNotifyOverseers = this.featureFlag_groups ? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList) : [];
5614
+ var groupNotifyOverseers = this.featureFlag_groups
5615
+ ? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList)
5616
+ : [];
5321
5617
  assignors === null || assignors === void 0 ? void 0 : assignors.forEach(function (user) {
5322
5618
  assignorAndAssigneesIds.push(user.member_id);
5323
5619
  _this.assignorId.push(user.member_id);
@@ -5332,7 +5628,7 @@
5332
5628
  this.assignorId.push(this.memberId);
5333
5629
  }
5334
5630
  allUsers === null || allUsers === void 0 ? void 0 : allUsers.forEach(function (user) {
5335
- allUsersIds.push((user === null || user === void 0 ? void 0 : user.my_member_id));
5631
+ allUsersIds.push(user === null || user === void 0 ? void 0 : user.my_member_id);
5336
5632
  });
5337
5633
  assigneeGroupList === null || assigneeGroupList === void 0 ? void 0 : assigneeGroupList.forEach(function (group) {
5338
5634
  assigneeGroupIds.push(group === null || group === void 0 ? void 0 : group.group_id);
@@ -5372,29 +5668,39 @@
5372
5668
  groupOverseerIds = __spreadArray([], __read(new Set(groupOverseerIds)));
5373
5669
  this.assignorsList = behalfUsers.filter(function (user) { return !(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user.member_id)); });
5374
5670
  this.assigneesList = allUsers;
5375
- this.reviewersList = allUsers.filter(function (user) { return !((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5376
- this.overseersList = allUsers.filter(function (user) { return !((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5671
+ this.reviewersList = allUsers.filter(function (user) { return !((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5672
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5673
+ this.overseersList = allUsers.filter(function (user) { return !((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5674
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5377
5675
  this.disableList(allUsers, assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds);
5378
5676
  if (this.featureFlag_groups) {
5379
- this.groupAssigneeList = allGroups.filter(function (group) { return !((groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5677
+ this.groupAssigneeList = allGroups.filter(function (group) { return !((groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5678
+ (groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5380
5679
  this.reviewerMemberIdsList = this.assignUserMemberId(this.allUsersList);
5381
5680
  this.overseersList = this.assignUserMemberId(this.allUsersList);
5382
- this.groupReviewerList = allGroups.filter(function (group) { return !((groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5383
- this.groupOverseerList = allGroups.filter(function (group) { return !((assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5681
+ this.groupReviewerList = allGroups.filter(function (group) { return !((groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5682
+ (assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5683
+ this.groupOverseerList = allGroups.filter(function (group) { return !((assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5684
+ (groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5384
5685
  }
5385
5686
  };
5386
5687
  WorkflowComplianceComponent.prototype.disableList = function (allUsers, assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds) {
5387
- var disableAssigneeList = allUsers.filter(function (user) { return ((reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5688
+ var disableAssigneeList = allUsers.filter(function (user) { return (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5689
+ (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5388
5690
  this.disableAssigneeIds = this.returnIds(disableAssigneeList, 'my_member_id');
5389
5691
  this.disableRadioAssignee = this.returnIds(disableAssigneeList, 'employee_id');
5390
- var disableReviewerList = allUsers.filter(function (user) { return ((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5692
+ var disableReviewerList = allUsers.filter(function (user) { return (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5693
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5391
5694
  this.disableReviewerIds = this.returnIds(disableReviewerList, 'employee_id');
5392
- var disableOverseerList = allUsers.filter(function (user) { return ((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5695
+ var disableOverseerList = allUsers.filter(function (user) { return (assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5696
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5393
5697
  this.disableOverseerIds = this.returnIds(disableOverseerList, 'employee_id');
5394
5698
  if (this.featureFlag_groups) {
5395
- var disableReviewerList_1 = allUsers.filter(function (user) { return ((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5699
+ var disableReviewerList_1 = allUsers.filter(function (user) { return (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5700
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5396
5701
  this.disableReviewerIds = this.returnIds(disableReviewerList_1, 'member_id');
5397
- var disableOverseersList = allUsers.filter(function (user) { return ((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5702
+ var disableOverseersList = allUsers.filter(function (user) { return (assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5703
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5398
5704
  this.disableOverseerIds = this.returnIds(disableOverseersList, 'member_id');
5399
5705
  }
5400
5706
  };
@@ -5416,13 +5722,21 @@
5416
5722
  var allGroups = lodash.cloneDeep(this.OrgGroup);
5417
5723
  var assignors = lodash.cloneDeep(this.responsibilityForm.assignors.list);
5418
5724
  var assignees = lodash.cloneDeep((_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.assignees) === null || _b === void 0 ? void 0 : _b.list);
5419
- var assigneeGroupList = this.featureFlag_groups ? lodash.cloneDeep((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assigneeGroups) === null || _d === void 0 ? void 0 : _d.list) : [];
5725
+ var assigneeGroupList = this.featureFlag_groups
5726
+ ? lodash.cloneDeep((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assigneeGroups) === null || _d === void 0 ? void 0 : _d.list)
5727
+ : [];
5420
5728
  var reviewers = lodash.cloneDeep((_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.reviewers) === null || _f === void 0 ? void 0 : _f.list);
5421
- var groupReviewersList = this.featureFlag_groups ? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list) : [];
5729
+ var groupReviewersList = this.featureFlag_groups
5730
+ ? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list)
5731
+ : [];
5422
5732
  var overseerList = lodash.cloneDeep((_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.overseers) === null || _k === void 0 ? void 0 : _k.list);
5423
- var groupOverseerList = this.featureFlag_groups ? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list) : [];
5733
+ var groupOverseerList = this.featureFlag_groups
5734
+ ? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list)
5735
+ : [];
5424
5736
  var notifyOverseers = lodash.cloneDeep((_p = (_o = this.responsibilityForm) === null || _o === void 0 ? void 0 : _o.overseers) === null || _p === void 0 ? void 0 : _p.notifyList);
5425
- var groupNotifyOverseers = this.featureFlag_groups ? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList) : [];
5737
+ var groupNotifyOverseers = this.featureFlag_groups
5738
+ ? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList)
5739
+ : [];
5426
5740
  assignors === null || assignors === void 0 ? void 0 : assignors.forEach(function (user) {
5427
5741
  _this.assignorId.push(user === null || user === void 0 ? void 0 : user.member_id);
5428
5742
  assignorAndAssigneesIds.push(user === null || user === void 0 ? void 0 : user.member_id);
@@ -5473,14 +5787,31 @@
5473
5787
  this.overseerIds = __spreadArray([], __read(new Set(this.overseerIds)));
5474
5788
  this.assignorsList = behalfUsers.filter(function (user) { return !(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user.member_id)); });
5475
5789
  this.assigneesList = (_v = this.programPeopleList) === null || _v === void 0 ? void 0 : _v.assigneesList;
5476
- this.reviewersList = (_w = this.programPeopleList) === null || _w === void 0 ? void 0 : _w.reviewersList.filter(function (user) { return !((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5477
- this.overseersList = (_x = this.programPeopleList) === null || _x === void 0 ? void 0 : _x.overseersList.filter(function (user) { return !((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5790
+ this.reviewersList = (_w = this.programPeopleList) === null || _w === void 0 ? void 0 : _w.reviewersList.filter(function (user) { return !((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5791
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5792
+ this.overseersList = (_x = this.programPeopleList) === null || _x === void 0 ? void 0 : _x.overseersList.filter(function (user) { return !((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5793
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5478
5794
  if (this.featureFlag_groups) {
5479
- this.groupAssigneeList = this.selectedProgram && ((_z = (_y = this.selectedProgram) === null || _y === void 0 ? void 0 : _y.assignee_group_ids) === null || _z === void 0 ? void 0 : _z.length) > 0 ? this.programGroupList(allGroups, (_0 = this.selectedProgram) === null || _0 === void 0 ? void 0 : _0.assignee_group_ids) : allGroups.filter(function (group) { return !((groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5795
+ this.groupAssigneeList =
5796
+ this.selectedProgram &&
5797
+ ((_z = (_y = this.selectedProgram) === null || _y === void 0 ? void 0 : _y.assignee_group_ids) === null || _z === void 0 ? void 0 : _z.length) > 0
5798
+ ? this.programGroupList(allGroups, (_0 = this.selectedProgram) === null || _0 === void 0 ? void 0 : _0.assignee_group_ids)
5799
+ : allGroups.filter(function (group) { return !((groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5800
+ (groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5480
5801
  this.reviewerMemberIdsList = this.assignUserMemberId(this.programPeopleList.reviewersList);
5481
- this.groupReviewerList = this.selectedProgram && ((_2 = (_1 = this.selectedProgram) === null || _1 === void 0 ? void 0 : _1.reviewer_group_ids) === null || _2 === void 0 ? void 0 : _2.length) > 0 ? this.programGroupList(allGroups, (_3 = this.selectedProgram) === null || _3 === void 0 ? void 0 : _3.reviewer_group_ids) : allGroups.filter(function (group) { return !((groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5802
+ this.groupReviewerList =
5803
+ this.selectedProgram &&
5804
+ ((_2 = (_1 = this.selectedProgram) === null || _1 === void 0 ? void 0 : _1.reviewer_group_ids) === null || _2 === void 0 ? void 0 : _2.length) > 0
5805
+ ? this.programGroupList(allGroups, (_3 = this.selectedProgram) === null || _3 === void 0 ? void 0 : _3.reviewer_group_ids)
5806
+ : allGroups.filter(function (group) { return !((groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5807
+ (assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5482
5808
  this.overseersList = this.assignUserMemberId(this.programPeopleList.overseersList);
5483
- this.groupOverseerList = this.selectedProgram && ((_6 = (_5 = (_4 = this.selectedProgram) === null || _4 === void 0 ? void 0 : _4.overseers) === null || _5 === void 0 ? void 0 : _5.cc_email_groups) === null || _6 === void 0 ? void 0 : _6.length) > 0 ? this.programGroupList(allGroups, (_8 = (_7 = this.selectedProgram) === null || _7 === void 0 ? void 0 : _7.overseers) === null || _8 === void 0 ? void 0 : _8.cc_email_groups) : allGroups.filter(function (group) { return !((assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) || (groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5809
+ this.groupOverseerList =
5810
+ this.selectedProgram &&
5811
+ ((_6 = (_5 = (_4 = this.selectedProgram) === null || _4 === void 0 ? void 0 : _4.overseers) === null || _5 === void 0 ? void 0 : _5.cc_email_groups) === null || _6 === void 0 ? void 0 : _6.length) > 0
5812
+ ? this.programGroupList(allGroups, (_8 = (_7 = this.selectedProgram) === null || _7 === void 0 ? void 0 : _7.overseers) === null || _8 === void 0 ? void 0 : _8.cc_email_groups)
5813
+ : allGroups.filter(function (group) { return !((assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
5814
+ (groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
5484
5815
  }
5485
5816
  this.disableProgramList(assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds);
5486
5817
  };
@@ -5494,23 +5825,28 @@
5494
5825
  var assigneeProgram = [];
5495
5826
  var groupIds = args[0];
5496
5827
  if (this.selectedProgram && ((_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.assignee_group_ids)) {
5497
- assigneeProgram = allGroups.filter(function (group) { return (groupIds.includes(group.group_id)); });
5828
+ assigneeProgram = allGroups.filter(function (group) { return groupIds.includes(group.group_id); });
5498
5829
  }
5499
5830
  return assigneeProgram;
5500
5831
  };
5501
5832
  WorkflowComplianceComponent.prototype.disableProgramList = function (assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds) {
5502
5833
  var _a, _b, _c;
5503
- var disableAssigneeList = (_a = this.programPeopleList) === null || _a === void 0 ? void 0 : _a.assigneesList.filter(function (user) { return ((reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5834
+ var disableAssigneeList = (_a = this.programPeopleList) === null || _a === void 0 ? void 0 : _a.assigneesList.filter(function (user) { return (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5835
+ (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5504
5836
  this.disableAssigneeIds = this.returnIds(disableAssigneeList, 'my_member_id');
5505
5837
  this.disableRadioAssignee = this.returnIds(disableAssigneeList, 'employee_id');
5506
- var disableReviewerList = (_b = this.programPeopleList) === null || _b === void 0 ? void 0 : _b.reviewersList.filter(function (user) { return ((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5838
+ var disableReviewerList = (_b = this.programPeopleList) === null || _b === void 0 ? void 0 : _b.reviewersList.filter(function (user) { return (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5839
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5507
5840
  this.disableReviewerIds = this.returnIds(disableReviewerList, 'employee_id');
5508
- var disableOverseerList = (_c = this.programPeopleList) === null || _c === void 0 ? void 0 : _c.overseersList.filter(function (user) { return ((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5841
+ var disableOverseerList = (_c = this.programPeopleList) === null || _c === void 0 ? void 0 : _c.overseersList.filter(function (user) { return (assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5842
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5509
5843
  this.disableOverseerIds = this.returnIds(disableOverseerList, 'employee_id');
5510
5844
  if (this.featureFlag_groups) {
5511
- var disableReviewerList_2 = this.reviewerMemberIdsList.filter(function (user) { return ((overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5845
+ var disableReviewerList_2 = this.reviewerMemberIdsList.filter(function (user) { return (overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5846
+ (assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5512
5847
  this.disableReviewerIds = this.returnIds(disableReviewerList_2, 'member_id');
5513
- var disableOverseerList_1 = this.overseersList.filter(function (user) { return ((assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) || (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
5848
+ var disableOverseerList_1 = this.overseersList.filter(function (user) { return (assignorAndAssigneesIds === null || assignorAndAssigneesIds === void 0 ? void 0 : assignorAndAssigneesIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)) ||
5849
+ (reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
5514
5850
  this.disableOverseerIds = this.returnIds(disableOverseerList_1, 'member_id');
5515
5851
  }
5516
5852
  };
@@ -5545,24 +5881,42 @@
5545
5881
  WorkflowComplianceComponent.prototype.validateResponsibility = function () {
5546
5882
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
5547
5883
  this.submitted = true;
5548
- if (this.responsibilityForm.assignors.enable && ((_a = this.responsibilityForm.assignors.list) === null || _a === void 0 ? void 0 : _a.length) === 0) {
5549
- this.invalidType = "whom";
5884
+ if (this.responsibilityForm.assignors.enable &&
5885
+ ((_a = this.responsibilityForm.assignors.list) === null || _a === void 0 ? void 0 : _a.length) === 0) {
5886
+ this.invalidType = 'whom';
5550
5887
  return;
5551
5888
  }
5552
- if (!this.responsibilityForm.responsibility.name || this.responsibilityForm.responsibility.name.trim() == '') {
5889
+ if (!this.responsibilityForm.responsibility.name ||
5890
+ this.responsibilityForm.responsibility.name.trim() == '') {
5553
5891
  this.invalidType = 'what';
5554
5892
  }
5555
- else if (!((_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assignees) === null || _c === void 0 ? void 0 : _c.list) || ((_f = (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.assignees) === null || _e === void 0 ? void 0 : _e.list) === null || _f === void 0 ? void 0 : _f.length) == 0 && (!this.featureFlag_groups || ((!((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.assigneeGroups) === null || _h === void 0 ? void 0 : _h.list) || ((_l = (_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.assigneeGroups) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) == 0) && this.featureFlag_groups))) {
5893
+ else if (!((_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assignees) === null || _c === void 0 ? void 0 : _c.list) ||
5894
+ (((_f = (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.assignees) === null || _e === void 0 ? void 0 : _e.list) === null || _f === void 0 ? void 0 : _f.length) == 0 &&
5895
+ (!this.featureFlag_groups ||
5896
+ ((!((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.assigneeGroups) === null || _h === void 0 ? void 0 : _h.list) ||
5897
+ ((_l = (_k = (_j = this.responsibilityForm) === null || _j === void 0 ? void 0 : _j.assigneeGroups) === null || _k === void 0 ? void 0 : _k.list) === null || _l === void 0 ? void 0 : _l.length) == 0) &&
5898
+ this.featureFlag_groups)))) {
5556
5899
  this.invalidType = 'who';
5557
5900
  }
5558
- else if (!this.responsibilityForm.frequency || this.responsibilityForm.frequency == '' || this.responsibilityForm.frequency === '' || this.responsibilityForm.frequency === '5~0~0~0') {
5901
+ else if (!this.responsibilityForm.frequency ||
5902
+ this.responsibilityForm.frequency == '' ||
5903
+ this.responsibilityForm.frequency === '' ||
5904
+ this.responsibilityForm.frequency === '5~0~0~0') {
5559
5905
  this.invalidType = 'when';
5560
5906
  }
5561
5907
  else {
5562
5908
  this.invalidType = '';
5563
5909
  }
5564
- if (!this.responsibilityForm.responsibility.name || this.responsibilityForm.responsibility.name.trim() == ''
5565
- || (!this.responsibilityForm.frequency || this.responsibilityForm.frequency === '' || this.responsibilityForm.frequency === '5~0~0~0') || (((_m = this.responsibilityForm.assignees.list) === null || _m === void 0 ? void 0 : _m.length) == 0 && (!this.featureFlag_groups || ((!this.responsibilityForm.assigneeGroups.list || ((_o = this.responsibilityForm.assigneeGroups.list) === null || _o === void 0 ? void 0 : _o.length) == 0) && this.featureFlag_groups)))) {
5910
+ if (!this.responsibilityForm.responsibility.name ||
5911
+ this.responsibilityForm.responsibility.name.trim() == '' ||
5912
+ !this.responsibilityForm.frequency ||
5913
+ this.responsibilityForm.frequency === '' ||
5914
+ this.responsibilityForm.frequency === '5~0~0~0' ||
5915
+ (((_m = this.responsibilityForm.assignees.list) === null || _m === void 0 ? void 0 : _m.length) == 0 &&
5916
+ (!this.featureFlag_groups ||
5917
+ ((!this.responsibilityForm.assigneeGroups.list ||
5918
+ ((_o = this.responsibilityForm.assigneeGroups.list) === null || _o === void 0 ? void 0 : _o.length) == 0) &&
5919
+ this.featureFlag_groups)))) {
5566
5920
  return false;
5567
5921
  }
5568
5922
  else {
@@ -5574,22 +5928,26 @@
5574
5928
  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, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
5575
5929
  this.loader = true;
5576
5930
  this.uiKitService.isLoader = true;
5577
- var startDate = moment__namespace(parseInt(entrustForm.startDate) * 1000).format("YYYY-MM-DD HH:mm:ss");
5578
- startDate = moment__namespace(startDate.split(' ')[0] + " 00:00:00").format("YYYY-MM-DD HH:mm:ss");
5579
- var rcDetails = ((_a = entrustForm.rc) === null || _a === void 0 ? void 0 : _a.length) > 0 ? entrustForm.rc.map(function (rc) {
5580
- if (rc) {
5581
- var rcDetailsArr = {
5582
- parent_rc_ids: rc.parent_rc_ids,
5583
- rc_id: rc.rc_id
5584
- };
5585
- return rcDetailsArr;
5586
- }
5587
- }) : [];
5588
- var rcDetailsIdArr = ((_b = entrustForm.rc) === null || _b === void 0 ? void 0 : _b.length) > 0 ? entrustForm.rc.map(function (rc) {
5589
- if (rc) {
5590
- return rc.rc_id;
5591
- }
5592
- }) : [];
5931
+ var startDate = moment__namespace(parseInt(entrustForm.startDate) * 1000).format('YYYY-MM-DD HH:mm:ss');
5932
+ startDate = moment__namespace(startDate.split(' ')[0] + ' 00:00:00').format('YYYY-MM-DD HH:mm:ss');
5933
+ var rcDetails = ((_a = entrustForm.rc) === null || _a === void 0 ? void 0 : _a.length) > 0
5934
+ ? entrustForm.rc.map(function (rc) {
5935
+ if (rc) {
5936
+ var rcDetailsArr = {
5937
+ parent_rc_ids: rc.parent_rc_ids,
5938
+ rc_id: rc.rc_id,
5939
+ };
5940
+ return rcDetailsArr;
5941
+ }
5942
+ })
5943
+ : [];
5944
+ var rcDetailsIdArr = ((_b = entrustForm.rc) === null || _b === void 0 ? void 0 : _b.length) > 0
5945
+ ? entrustForm.rc.map(function (rc) {
5946
+ if (rc) {
5947
+ return rc.rc_id;
5948
+ }
5949
+ })
5950
+ : [];
5593
5951
  var moreOptions = this.moreOptions;
5594
5952
  var checkContinuousFailedValue = function (details) {
5595
5953
  var frequencyType = parseInt(details.split('~')[0]);
@@ -5611,7 +5969,7 @@
5611
5969
  subProgramIds: (_c = ele === null || ele === void 0 ? void 0 : ele.child_id) === null || _c === void 0 ? void 0 : _c.filter(function (el) {
5612
5970
  var _a;
5613
5971
  return (_a = _this.responsibilityForm.category) === null || _a === void 0 ? void 0 : _a.includes(el);
5614
- })
5972
+ }),
5615
5973
  };
5616
5974
  linkedProgramIds === null || linkedProgramIds === void 0 ? void 0 : linkedProgramIds.push(program);
5617
5975
  linkedCategoryIds === null || linkedCategoryIds === void 0 ? void 0 : linkedCategoryIds.push(ele === null || ele === void 0 ? void 0 : ele.category_id);
@@ -5620,49 +5978,81 @@
5620
5978
  var categoryIdsExceptDefault = [];
5621
5979
  categoryIdsExceptDefault = (_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.category) === null || _f === void 0 ? void 0 : _f.filter(function (el) {
5622
5980
  var _a, _b, _c, _d, _e;
5623
- return (el !== ((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.category_id) && !((_e = (_d = (_c = _this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.program[0]) === null || _d === void 0 ? void 0 : _d.child_id) === null || _e === void 0 ? void 0 : _e.includes(el)));
5981
+ return (el !== ((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.category_id) &&
5982
+ !((_e = (_d = (_c = _this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.program[0]) === null || _d === void 0 ? void 0 : _d.child_id) === null || _e === void 0 ? void 0 : _e.includes(el)));
5624
5983
  });
5625
- this.combineUserAndUserGroupMembers((this.mode === 'EDIT' && this.responsibilityForm.assignees.whoCanComplete === 'ALL' && ((_j = (_h = (_g = this.rawResponsibility) === null || _g === void 0 ? void 0 : _g.userGroupIds) === null || _h === void 0 ? void 0 : _h.assigneeAllGroupIds) === null || _j === void 0 ? void 0 : _j.length)));
5626
- var remarks = (entrustForm.description.replace(/\ /g, '').trim() !== '') ? entrustForm.description : '';
5627
- var objective = (entrustForm.objective.replace(/\ /g, '').trim() !== '') ? entrustForm.objective : '';
5984
+ this.combineUserAndUserGroupMembers(this.mode === 'EDIT' &&
5985
+ this.responsibilityForm.assignees.whoCanComplete === 'ALL' &&
5986
+ ((_j = (_h = (_g = this.rawResponsibility) === null || _g === void 0 ? void 0 : _g.userGroupIds) === null || _h === void 0 ? void 0 : _h.assigneeAllGroupIds) === null || _j === void 0 ? void 0 : _j.length));
5987
+ var remarks = entrustForm.description.replace(/\ /g, '').trim() !== ''
5988
+ ? entrustForm.description
5989
+ : '';
5990
+ var objective = entrustForm.objective.replace(/\ /g, '').trim() !== ''
5991
+ ? entrustForm.objective
5992
+ : '';
5628
5993
  var payload = {
5629
5994
  app_association: [],
5630
5995
  assigned_to: this.returnIds(this.assigneeUserList, 'employee_id').toString(),
5631
- program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM) ? (((_k = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _k === void 0 ? void 0 : _k.length) ? [(_l = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _l === void 0 ? void 0 : _l.category_id] : []) : [],
5996
+ program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM)
5997
+ ? ((_k = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _k === void 0 ? void 0 : _k.length)
5998
+ ? [(_l = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _l === void 0 ? void 0 : _l.category_id]
5999
+ : []
6000
+ : [],
5632
6001
  linked_program_ids: linkedProgramIds,
5633
6002
  linked_category_ids: this.getUniqueIds(__spreadArray(__spreadArray([], __read(categoryIdsExceptDefault)), __read(linkedCategoryIds))),
5634
6003
  // category_id: (this.responsibilityForm?.program_selected_ids?.length > 0) ? this.responsibilityForm?.category_id : '',
5635
- category_id: (((_o = (_m = this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.program_selected_ids) === null || _o === void 0 ? void 0 : _o.length) > 0) ? (_r = this.getUniqueIds(__spreadArray(__spreadArray(__spreadArray([], __read((_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.category)), __read(linkedCategoryIds)), [(_q = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _q === void 0 ? void 0 : _q.category_id]))) === null || _r === void 0 ? void 0 : _r.toString() : '',
5636
- cc_email: (moreOptions.OVERSEER) ? this.returnIds(this.overseerUserList, 'employee_id').toString() : '',
5637
- checkpoint_description: (moreOptions.CHECKPOINTS) ? entrustForm.checkpointInstruction : '',
5638
- checkpoint_details: (moreOptions.CHECKPOINTS) ? JSON.stringify(this.responsibilityForm.checkpoints) : '',
6004
+ category_id: ((_o = (_m = this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.program_selected_ids) === null || _o === void 0 ? void 0 : _o.length) > 0
6005
+ ? (_r = this.getUniqueIds(__spreadArray(__spreadArray(__spreadArray([], __read((_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.category)), __read(linkedCategoryIds)), [(_q = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _q === void 0 ? void 0 : _q.category_id]))) === null || _r === void 0 ? void 0 : _r.toString()
6006
+ : '',
6007
+ cc_email: moreOptions.OVERSEER
6008
+ ? this.returnIds(this.overseerUserList, 'employee_id').toString()
6009
+ : '',
6010
+ checkpoint_description: moreOptions.CHECKPOINTS
6011
+ ? entrustForm.checkpointInstruction
6012
+ : '',
6013
+ checkpoint_details: moreOptions.CHECKPOINTS
6014
+ ? JSON.stringify(this.responsibilityForm.checkpoints)
6015
+ : '',
5639
6016
  checkpoint_flag: 0,
5640
6017
  collaborator_mark_done: 0,
5641
6018
  comment: '',
5642
- continuous_failed_days: checkContinuousFailedValue(entrustForm.frequency) ? entrustForm.continuous_failed_days : 0,
6019
+ continuous_failed_days: checkContinuousFailedValue(entrustForm.frequency)
6020
+ ? entrustForm.continuous_failed_days
6021
+ : 0,
5643
6022
  cost_of_compliance: '',
5644
6023
  created_by: ((_s = entrustForm.assignors.list) === null || _s === void 0 ? void 0 : _s.length) < 1 ? 0 : this.memberId,
5645
6024
  creation_window: 0,
5646
6025
  custom_tags: JSON.stringify(entrustForm.customTags),
5647
- entity_tree: (moreOptions.RC) ? ((this.isResponsibilityRcLinkEnabled && this.responsibilityCenterType == 1) ? [] : rcDetails) : [],
6026
+ entity_tree: moreOptions.RC
6027
+ ? this.isResponsibilityRcLinkEnabled &&
6028
+ this.responsibilityCenterType == 1
6029
+ ? []
6030
+ : rcDetails
6031
+ : [],
5648
6032
  entrust_from_risk: this.openedFrom === 'RISK_TREATMENT' ? true : false,
5649
6033
  failed_after_days: entrustForm.failed_after_days,
5650
6034
  failed_time_utc: entrustForm.failed_time_utc,
5651
- failure_cc_email: (moreOptions.OVERSEER) ? this.returnIds(this.overseerUserNotifyList, 'employee_id').toString() : '',
6035
+ failure_cc_email: moreOptions.OVERSEER
6036
+ ? this.returnIds(this.overseerUserNotifyList, 'employee_id').toString()
6037
+ : '',
5652
6038
  frequency_details: entrustForm.frequency,
5653
- frequency_time: (_t = entrustForm.timeIn24Hr) !== null && _t !== void 0 ? _t : "23:59:00",
6039
+ frequency_time: (_t = entrustForm.timeIn24Hr) !== null && _t !== void 0 ? _t : '23:59:00',
5654
6040
  grc_object_id: 0,
5655
6041
  grc_relationship: '',
5656
6042
  if_testplan_failed: 0,
5657
6043
  impact: '',
5658
- isGroupAssignTo: (entrustForm.assignees.whoCanComplete == 'ANY_ONE') ? 1 : 0,
6044
+ isGroupAssignTo: entrustForm.assignees.whoCanComplete == 'ANY_ONE' ? 1 : 0,
5659
6045
  is_key_compliance: entrustForm.responsibility.keyResponsibility ? 1 : 0,
5660
6046
  library_report_id: 0,
5661
6047
  lifecycle_details: (_u = entrustForm.lifecycleDetails) !== null && _u !== void 0 ? _u : '0000-00-00~~0',
5662
- link_for_details: (moreOptions.FORMATE_EVIDENCE) ? entrustForm.formatAndEvidence.formatLinks : [],
6048
+ link_for_details: moreOptions.FORMATE_EVIDENCE
6049
+ ? entrustForm.formatAndEvidence.formatLinks
6050
+ : [],
5663
6051
  linkages: { compliance: [] },
5664
- member_id: ((_v = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _v === void 0 ? void 0 : _v.length) > 0 ? this.returnIds(entrustForm.assignors.list, 'member_id')[0] : this.memberId,
5665
- objective: (moreOptions.OBJECTIVE) ? objective : '',
6052
+ member_id: ((_v = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _v === void 0 ? void 0 : _v.length) > 0
6053
+ ? this.returnIds(entrustForm.assignors.list, 'member_id')[0]
6054
+ : this.memberId,
6055
+ objective: moreOptions.OBJECTIVE ? objective : '',
5666
6056
  on_completion_of: entrustForm.reportId ? [entrustForm.reportId] : [],
5667
6057
  on_completion_of_type: 1,
5668
6058
  organisation_id: this.organizationId,
@@ -5672,66 +6062,126 @@
5672
6062
  private_library_id: 0,
5673
6063
  remarks: remarks,
5674
6064
  reminder_before_days: entrustForm.reminder_before_days,
5675
- report_format: (moreOptions.FORMATE_EVIDENCE) ? entrustForm.formatAndEvidence.formatFiles : [],
6065
+ report_format: moreOptions.FORMATE_EVIDENCE
6066
+ ? entrustForm.formatAndEvidence.formatFiles
6067
+ : [],
5676
6068
  report_format_link: '',
5677
6069
  report_name: entrustForm.responsibility.name,
5678
- report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired ? 1 : 0,
5679
- review_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewCompleteDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewCompleteDays) : 0,
5680
- review_failed_after_days: (moreOptions.REVIEWER) ? entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays === '' ? 0 : Number(entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays) : 0,
5681
- reviewer_arr: (moreOptions.REVIEWER) ? {
5682
- level1: {
5683
- reviewers: this.setReviewerPayload(this.reviewerUserList, 'list', entrustForm.reviewers.acceptedData, (entrustForm.reviewers.sequentialWorkflow) ? 'SEQUENTIAL' : 'ANYONE'),
5684
- type: (entrustForm.reviewers.sequentialWorkflow) ? 'SEQUENTIAL' : 'ANYONE'
5685
- },
5686
- } : {},
6070
+ report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired
6071
+ ? 1
6072
+ : 0,
6073
+ review_after_days: moreOptions.REVIEWER
6074
+ ? entrustForm.reviewers.reviewFrequency.reviewCompleteDays === ''
6075
+ ? 0
6076
+ : Number(entrustForm.reviewers.reviewFrequency.reviewCompleteDays)
6077
+ : 0,
6078
+ review_failed_after_days: moreOptions.REVIEWER
6079
+ ? entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays === ''
6080
+ ? 0
6081
+ : Number(entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays)
6082
+ : 0,
6083
+ reviewer_arr: moreOptions.REVIEWER
6084
+ ? {
6085
+ level1: {
6086
+ reviewers: this.setReviewerPayload(this.reviewerUserList, 'list', entrustForm.reviewers.acceptedData, entrustForm.reviewers.sequentialWorkflow
6087
+ ? 'SEQUENTIAL'
6088
+ : 'ANYONE'),
6089
+ type: entrustForm.reviewers.sequentialWorkflow
6090
+ ? 'SEQUENTIAL'
6091
+ : 'ANYONE',
6092
+ },
6093
+ }
6094
+ : {},
5687
6095
  userGroupIds: {
5688
- assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _w === void 0 ? void 0 : _w.list, 'group_id') : [],
5689
- assigneeAnyoneGroupIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _x === void 0 ? void 0 : _x.list, 'group_id') : [],
6096
+ assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
6097
+ ? this.returnIds((_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _w === void 0 ? void 0 : _w.list, 'group_id')
6098
+ : [],
6099
+ assigneeAnyoneGroupIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE'
6100
+ ? this.returnIds((_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _x === void 0 ? void 0 : _x.list, 'group_id')
6101
+ : [],
5690
6102
  ccEmailGroupIds: (_0 = this.returnIds((_z = (_y = this.responsibilityForm) === null || _y === void 0 ? void 0 : _y.overseersGroups) === null || _z === void 0 ? void 0 : _z.list, 'group_id')) !== null && _0 !== void 0 ? _0 : [],
5691
6103
  failureCCEmailGroupIds: (_3 = this.returnIds((_2 = (_1 = this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.overseersGroups) === null || _2 === void 0 ? void 0 : _2.notifyList, 'group_id')) !== null && _3 !== void 0 ? _3 : [],
5692
- reviewerGroupIds: (_6 = this.returnIds((_5 = (_4 = this.responsibilityForm) === null || _4 === void 0 ? void 0 : _4.groupReviewers) === null || _5 === void 0 ? void 0 : _5.list, 'group_id')) !== null && _6 !== void 0 ? _6 : []
6104
+ reviewerGroupIds: (_6 = this.returnIds((_5 = (_4 = this.responsibilityForm) === null || _4 === void 0 ? void 0 : _4.groupReviewers) === null || _5 === void 0 ? void 0 : _5.list, 'group_id')) !== null && _6 !== void 0 ? _6 : [],
5693
6105
  },
5694
6106
  existingUserIds: {
5695
- assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE' ? this.returnIds((_7 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _7 === void 0 ? void 0 : _7.list, 'my_member_id') : [],
5696
- assigneeAnyoneIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE' ? this.returnIds((_8 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _8 === void 0 ? void 0 : _8.list, 'my_member_id') : [],
6107
+ assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
6108
+ ? this.returnIds((_7 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _7 === void 0 ? void 0 : _7.list, 'my_member_id')
6109
+ : [],
6110
+ assigneeAnyoneIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE'
6111
+ ? this.returnIds((_8 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _8 === void 0 ? void 0 : _8.list, 'my_member_id')
6112
+ : [],
5697
6113
  ccEmailEmpIds: (_10 = this.returnIds((_9 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _9 === void 0 ? void 0 : _9.list, 'employee_id')) !== null && _10 !== void 0 ? _10 : [],
5698
6114
  failureCCEmailEmpIds: (_12 = this.returnIds((_11 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.overseers) === null || _11 === void 0 ? void 0 : _11.notifyList, 'employee_id')) !== null && _12 !== void 0 ? _12 : [],
5699
- reviewerIds: (_15 = this.returnIds((_14 = (_13 = this.responsibilityForm) === null || _13 === void 0 ? void 0 : _13.reviewers) === null || _14 === void 0 ? void 0 : _14.list, 'member_id')) !== null && _15 !== void 0 ? _15 : []
6115
+ reviewerIds: (_15 = this.returnIds((_14 = (_13 = this.responsibilityForm) === null || _13 === void 0 ? void 0 : _13.reviewers) === null || _14 === void 0 ? void 0 : _14.list, 'member_id')) !== null && _15 !== void 0 ? _15 : [],
5700
6116
  },
5701
6117
  reviewer_checkpoints: [{ checkpoints: [], instruction: '' }],
5702
6118
  reviewer_id: 0,
5703
6119
  risk_class: this.isRiskEnable ? entrustForm.riskClass : 2,
5704
6120
  risk_ids: '',
5705
- risk_matrix_data: (moreOptions.RISK_CLASSIFICATION) ? entrustForm.riskMatrix : '0,0,0,0,0,0',
6121
+ risk_matrix_data: moreOptions.RISK_CLASSIFICATION
6122
+ ? entrustForm.riskMatrix
6123
+ : '0,0,0,0,0,0',
5706
6124
  sample_size: 0,
5707
6125
  start_date_utc: startDate,
5708
6126
  statutory_day: 0,
5709
- test_required_flag: (moreOptions.ASSURANCE) ? (((_16 = entrustForm.assuranceList) === null || _16 === void 0 ? void 0 : _16.length) > 0 ? 1 : 0) : 0,
5710
- testplan_category_id: (moreOptions.ASSURANCE) ? this.returnIds(entrustForm.assuranceList, 'category_id') : [],
6127
+ test_required_flag: moreOptions.ASSURANCE
6128
+ ? ((_16 = entrustForm.assuranceList) === null || _16 === void 0 ? void 0 : _16.length) > 0
6129
+ ? 1
6130
+ : 0
6131
+ : 0,
6132
+ testplan_category_id: moreOptions.ASSURANCE
6133
+ ? this.returnIds(entrustForm.assuranceList, 'category_id')
6134
+ : [],
5711
6135
  testplan_category_manager: '',
5712
- audit_category_details: moreOptions.REQUIRES_AUDIT && ((_18 = (_17 = this.responsibilityForm) === null || _17 === void 0 ? void 0 : _17.audit_category_details) === null || _18 === void 0 ? void 0 : _18.category_id) ? {
5713
- category_id: this.responsibilityForm.audit_category_details.category_id,
5714
- sample: this.selectedSample === 0 ? this.sampleValue : 0,
5715
- percentage: this.selectedSample === 1 ? this.samplePercentage : 0,
5716
- frequency_pattern: "1~0~" + this.sendAuditRemindersValue + "~1",
5717
- frequency_time: moment__namespace(this.auditTime, 'HH:mm a').format('HH:mm:ss')
5718
- } : {
5719
- category_id: 0,
5720
- sample: 0,
5721
- percentage: 0,
5722
- frequency_pattern: "",
5723
- frequency_time: ''
5724
- },
6136
+ audit_category_details: moreOptions.REQUIRES_AUDIT &&
6137
+ ((_18 = (_17 = this.responsibilityForm) === null || _17 === void 0 ? void 0 : _17.audit_category_details) === null || _18 === void 0 ? void 0 : _18.category_id)
6138
+ ? {
6139
+ category_id: this.responsibilityForm.audit_category_details.category_id,
6140
+ sample: this.selectedSample === 0 ? this.sampleValue : 0,
6141
+ percentage: this.selectedSample === 1 ? this.samplePercentage : 0,
6142
+ frequency_pattern: "1~0~" + this.sendAuditRemindersValue + "~1",
6143
+ frequency_time: moment__namespace(this.auditTime, 'HH:mm a').format('HH:mm:ss'),
6144
+ }
6145
+ : {
6146
+ category_id: 0,
6147
+ sample: 0,
6148
+ percentage: 0,
6149
+ frequency_pattern: "",
6150
+ frequency_time: '',
6151
+ },
5725
6152
  assessment: {
5726
- category_id: moreOptions.ASSESSMENT ? (_19 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _19 === void 0 ? void 0 : _19.category_id : '',
5727
- assessment_id: moreOptions.ASSESSMENT ? (_20 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _20 === void 0 ? void 0 : _20.assessment_id : ''
6153
+ category_id: moreOptions.ASSESSMENT
6154
+ ? (_19 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _19 === void 0 ? void 0 : _19.category_id
6155
+ : '',
6156
+ assessment_id: moreOptions.ASSESSMENT
6157
+ ? (_20 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _20 === void 0 ? void 0 : _20.assessment_id
6158
+ : '',
5728
6159
  },
5729
- assessment_checkpoint: moreOptions.CHECKPOINTS_NEW ? (((_21 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _21 === void 0 ? void 0 : _21.length) > 0 ? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints : {}) : {},
5730
- questionnaire_type: moreOptions.CHECKPOINTS_NEW ? (((_22 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _22 === void 0 ? void 0 : _22.length) > 0 ? 'assessment_checkpoint' : (moreOptions.ASSESSMENT && ((_23 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _23 === void 0 ? void 0 : _23.category_id) ? 'assessment' : (JSON.stringify(this.responsibilityForm.checkpoints) != '' && moreOptions.CHECKPOINTS ? 'checkpoint' : ''))) : ''
6160
+ assessment_checkpoint: moreOptions.CHECKPOINTS_NEW
6161
+ ? ((_21 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _21 === void 0 ? void 0 : _21.length) > 0
6162
+ ? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints
6163
+ : {}
6164
+ : {},
6165
+ questionnaire_type: moreOptions.CHECKPOINTS_NEW
6166
+ ? ((_22 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _22 === void 0 ? void 0 : _22.length) > 0
6167
+ ? 'assessment_checkpoint'
6168
+ : moreOptions.ASSESSMENT && ((_23 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _23 === void 0 ? void 0 : _23.category_id)
6169
+ ? 'assessment'
6170
+ : JSON.stringify(this.responsibilityForm.checkpoints) != '' &&
6171
+ moreOptions.CHECKPOINTS
6172
+ ? 'checkpoint'
6173
+ : ''
6174
+ : '',
5731
6175
  };
5732
6176
  if (this.isResponsibilityRcLinkEnabled) {
5733
- payload['responsibilityCenterType'] = (this.isResponsibilityRcLinkEnabled && moreOptions.RC) ? this.responsibilityCenterType : 0;
5734
- payload["responsibilityCenterArr"] = (this.isResponsibilityRcLinkEnabled && moreOptions.RC) ? rcDetailsIdArr : [];
6177
+ payload['responsibilityCenterType'] =
6178
+ this.isResponsibilityRcLinkEnabled && moreOptions.RC
6179
+ ? this.responsibilityCenterType
6180
+ : 0;
6181
+ payload['responsibilityCenterArr'] =
6182
+ this.isResponsibilityRcLinkEnabled && moreOptions.RC
6183
+ ? rcDetailsIdArr
6184
+ : [];
5735
6185
  }
5736
6186
  this.responsibilityPayload = payload;
5737
6187
  if (this.mode == 'CREATE' && !this.isDuplicateEntrust) {
@@ -5745,11 +6195,12 @@
5745
6195
  _this.smileyMessage = "You have entrusted " + res.calculate_no_of_responsibiities + " responsibilities. These would be reflected within your account in sometime.";
5746
6196
  }
5747
6197
  if (_this.isNotificationPending && payload.created_by == 0) {
5748
- _this.smileyMessage = 'This responsibility has been added to the notification queue.';
6198
+ _this.smileyMessage =
6199
+ 'This responsibility has been added to the notification queue.';
5749
6200
  }
5750
6201
  else {
5751
6202
  if (payload.created_by > 0) {
5752
- _this.actionButtons[1].buttonText = "View Responsibilities";
6203
+ _this.actionButtons[1].buttonText = 'View Responsibilities';
5753
6204
  _this.smileyMessage = "You just created a responsibility on behalf " + entrustForm.assignors.list.find(function (member) { return member.member_id === payload.member_id; }).member_name;
5754
6205
  }
5755
6206
  }
@@ -5763,7 +6214,9 @@
5763
6214
  }
5764
6215
  if (this.mode == 'EDIT' || this.isDuplicateEntrust) {
5765
6216
  this.smileyMessage = "The responsibility has been modified.";
5766
- this.responsibilityService.updateEntrust(payload, this.responsibilityId, true).subscribe(function (res) {
6217
+ this.responsibilityService
6218
+ .updateEntrust(payload, this.responsibilityId, true)
6219
+ .subscribe(function (res) {
5767
6220
  _this.responsibilityData = res;
5768
6221
  _this.loader = false;
5769
6222
  _this.uiKitService.isLoader = false;
@@ -5788,8 +6241,10 @@
5788
6241
  WorkflowComplianceComponent.prototype.combineUserAndUserGroupMembers = function (isGroup) {
5789
6242
  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;
5790
6243
  if (this.featureFlag_groups) {
5791
- console.log("this.responsibilityForm?.assigneeGroups?.list ==>", this.allUsersList, (_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.assigneeGroups) === null || _b === void 0 ? void 0 : _b.list);
5792
- this.assigneeUserList = isGroup ? [{ employee_id: (_c = this.rawResponsibility) === null || _c === void 0 ? void 0 : _c.assigned_to }] : this.uniqueIdUserGroups(this.allUsersList, (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.assigneeGroups) === null || _e === void 0 ? void 0 : _e.list, (_g = (_f = this.responsibilityForm) === null || _f === void 0 ? void 0 : _f.assignees) === null || _g === void 0 ? void 0 : _g.list);
6244
+ console.log('this.responsibilityForm?.assigneeGroups?.list ==>', this.allUsersList, (_b = (_a = this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.assigneeGroups) === null || _b === void 0 ? void 0 : _b.list);
6245
+ this.assigneeUserList = isGroup
6246
+ ? [{ employee_id: (_c = this.rawResponsibility) === null || _c === void 0 ? void 0 : _c.assigned_to }]
6247
+ : this.uniqueIdUserGroups(this.allUsersList, (_e = (_d = this.responsibilityForm) === null || _d === void 0 ? void 0 : _d.assigneeGroups) === null || _e === void 0 ? void 0 : _e.list, (_g = (_f = this.responsibilityForm) === null || _f === void 0 ? void 0 : _f.assignees) === null || _g === void 0 ? void 0 : _g.list);
5793
6248
  this.reviewerUserList = this.uniqueIdUserGroups(this.allUsersList, (_j = (_h = this.responsibilityForm) === null || _h === void 0 ? void 0 : _h.groupReviewers) === null || _j === void 0 ? void 0 : _j.list, (_l = (_k = this.responsibilityForm) === null || _k === void 0 ? void 0 : _k.reviewers) === null || _l === void 0 ? void 0 : _l.list);
5794
6249
  this.overseerUserList = this.uniqueIdUserGroups(this.allUsersList, (_o = (_m = this.responsibilityForm) === null || _m === void 0 ? void 0 : _m.overseersGroups) === null || _o === void 0 ? void 0 : _o.list, (_q = (_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.overseers) === null || _q === void 0 ? void 0 : _q.list);
5795
6250
  this.overseerUserNotifyList = this.uniqueIdUserGroups(this.allUsersList, (_s = (_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.overseersGroups) === null || _s === void 0 ? void 0 : _s.notifyList, (_u = (_t = this.responsibilityForm) === null || _t === void 0 ? void 0 : _t.overseers) === null || _u === void 0 ? void 0 : _u.notifyList);
@@ -5798,7 +6253,8 @@
5798
6253
  this.assigneeUserList = (_w = (_v = this.responsibilityForm) === null || _v === void 0 ? void 0 : _v.assignees) === null || _w === void 0 ? void 0 : _w.list;
5799
6254
  this.reviewerUserList = (_y = (_x = this.responsibilityForm) === null || _x === void 0 ? void 0 : _x.reviewers) === null || _y === void 0 ? void 0 : _y.list;
5800
6255
  this.overseerUserList = (_0 = (_z = this.responsibilityForm) === null || _z === void 0 ? void 0 : _z.overseers) === null || _0 === void 0 ? void 0 : _0.list;
5801
- this.overseerUserNotifyList = (_2 = (_1 = this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.overseers) === null || _2 === void 0 ? void 0 : _2.notifyList;
6256
+ this.overseerUserNotifyList =
6257
+ (_2 = (_1 = this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.overseers) === null || _2 === void 0 ? void 0 : _2.notifyList;
5802
6258
  }
5803
6259
  };
5804
6260
  /**
@@ -5811,7 +6267,7 @@
5811
6267
  this.responsibilityForm = {
5812
6268
  assignors: {
5813
6269
  enable: false,
5814
- list: []
6270
+ list: [],
5815
6271
  },
5816
6272
  responsibility: {
5817
6273
  name: '',
@@ -5819,11 +6275,11 @@
5819
6275
  },
5820
6276
  assigneeGroups: {
5821
6277
  whoCanComplete: 'ALL',
5822
- list: []
6278
+ list: [],
5823
6279
  },
5824
6280
  assignees: {
5825
6281
  whoCanComplete: 'ALL',
5826
- list: []
6282
+ list: [],
5827
6283
  },
5828
6284
  frequency: '',
5829
6285
  description: '',
@@ -5837,25 +6293,25 @@
5837
6293
  sequentialWorkflow: true,
5838
6294
  reviewFrequency: {
5839
6295
  reviewCompleteDays: 2,
5840
- reviewNOtCompletedDays: 2
6296
+ reviewNOtCompletedDays: 2,
5841
6297
  },
5842
- list: []
6298
+ list: [],
5843
6299
  },
5844
6300
  groupReviewers: {
5845
6301
  sequentialWorkflow: true,
5846
6302
  reviewFrequency: {
5847
6303
  reviewCompleteDays: 2,
5848
- reviewNOtCompletedDays: 2
6304
+ reviewNOtCompletedDays: 2,
5849
6305
  },
5850
- list: []
6306
+ list: [],
5851
6307
  },
5852
6308
  overseers: {
5853
6309
  notifyList: [],
5854
- list: []
6310
+ list: [],
5855
6311
  },
5856
6312
  overseersGroups: {
5857
6313
  notifyList: [],
5858
- list: []
6314
+ list: [],
5859
6315
  },
5860
6316
  formatAndEvidence: {
5861
6317
  formatRequired: false,
@@ -5868,7 +6324,7 @@
5868
6324
  riskClass: 1,
5869
6325
  riskMatrix: '0,0,0,0,0,0',
5870
6326
  program: [],
5871
- program_selected_ids: []
6327
+ program_selected_ids: [],
5872
6328
  };
5873
6329
  this.moreOptions = {
5874
6330
  OBJECTIVE: false,
@@ -5897,7 +6353,7 @@
5897
6353
  time: '11:59 pm',
5898
6354
  failedTime: '',
5899
6355
  continuous_failed_days: 0,
5900
- onCompletionReportDetails: {}
6356
+ onCompletionReportDetails: {},
5901
6357
  };
5902
6358
  this.sampleValue = undefined;
5903
6359
  this.samplePercentage = undefined;
@@ -5926,12 +6382,14 @@
5926
6382
  var url;
5927
6383
  var urlSubstring = '';
5928
6384
  this.disconnectRefresh.emit(false);
5929
- if (this.isNotificationPending && this.responsibilityPayload.created_by == 0) {
6385
+ if (this.isNotificationPending &&
6386
+ this.responsibilityPayload.created_by == 0) {
5930
6387
  if (this.isResponsibilitySimplified) {
5931
6388
  urlSubstring = 'compliance/manage-responsibility?' + this.url;
5932
6389
  }
5933
6390
  else {
5934
- urlSubstring = 'compliance/manage-responsibilities/responsibilities-queue';
6391
+ urlSubstring =
6392
+ 'compliance/manage-responsibilities/responsibilities-queue';
5935
6393
  }
5936
6394
  }
5937
6395
  else {
@@ -5983,7 +6441,7 @@
5983
6441
  continuous_failed_days: event.continuous_failed_days,
5984
6442
  startDate: Number(event === null || event === void 0 ? void 0 : event.start_of_day_utc),
5985
6443
  reportId: (_a = event === null || event === void 0 ? void 0 : event.on_completion_of[0]) !== null && _a !== void 0 ? _a : 0,
5986
- timeIn12hr: this.frequencyService.timeIn12(event.frequency_time != '' ? event.frequency_time : '23:59:00')
6444
+ timeIn12hr: this.frequencyService.timeIn12(event.frequency_time != '' ? event.frequency_time : '23:59:00'),
5987
6445
  };
5988
6446
  var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
5989
6447
  if (onCompletionReportDetails != null) {
@@ -6001,11 +6459,13 @@
6001
6459
  this.frequencyDetails.startDate = event === null || event === void 0 ? void 0 : event.start_of_day_utc;
6002
6460
  this.frequencyDetails.selectedReport = (_a = event === null || event === void 0 ? void 0 : event.on_completion_of[0]) !== null && _a !== void 0 ? _a : 0;
6003
6461
  this.frequencyDetails.dateOfModified = event === null || event === void 0 ? void 0 : event.dom_utc;
6004
- this.frequencyDetails.continuous_failed_days = event === null || event === void 0 ? void 0 : event.continuous_failed_days;
6462
+ this.frequencyDetails.continuous_failed_days =
6463
+ event === null || event === void 0 ? void 0 : event.continuous_failed_days;
6005
6464
  this.frequencyPlaceholder = event === null || event === void 0 ? void 0 : event.placeholder;
6006
6465
  var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
6007
6466
  if (onCompletionReportDetails != null) {
6008
- this.frequencyDetails.onCompletionReportDetails = onCompletionReportDetails;
6467
+ this.frequencyDetails.onCompletionReportDetails =
6468
+ onCompletionReportDetails;
6009
6469
  }
6010
6470
  };
6011
6471
  WorkflowComplianceComponent.prototype.frequencyData = function (event) {
@@ -6014,7 +6474,8 @@
6014
6474
  this.invalidType = '';
6015
6475
  }
6016
6476
  this.responsibilityForm.frequency = event.pattern;
6017
- this.responsibilityForm.reminder_before_days = (event.case === "daily") ? 0 : event.window;
6477
+ this.responsibilityForm.reminder_before_days =
6478
+ event.case === 'daily' ? 0 : event.window;
6018
6479
  //this.responsibilityForm.reminder_before_days = event.window;
6019
6480
  this.responsibilityForm.failed_after_days = event.failedAfter;
6020
6481
  this.responsibilityForm.failed_time_utc = event.failed_time_utc;
@@ -6022,7 +6483,8 @@
6022
6483
  this.responsibilityForm.reportId = (_a = event.reportId) !== null && _a !== void 0 ? _a : 0;
6023
6484
  this.responsibilityForm.startDate = event.startFrom;
6024
6485
  this.responsibilityForm.timeIn24Hr = event.timeIn24Hr;
6025
- this.responsibilityForm.continuous_failed_days = event.continuous_failed_days;
6486
+ this.responsibilityForm.continuous_failed_days =
6487
+ event.continuous_failed_days;
6026
6488
  this.activateSelector('frequency', false);
6027
6489
  var payload = {
6028
6490
  frequency_details: event.pattern,
@@ -6034,7 +6496,7 @@
6034
6496
  on_completion_of: [event.reportId],
6035
6497
  dom_utc: Math.floor(Date.now() / 1000),
6036
6498
  continuous_failed_days: event.continuous_failed_days,
6037
- placeholder: event.placeholder
6499
+ placeholder: event.placeholder,
6038
6500
  };
6039
6501
  event.frequency_details = event.pattern;
6040
6502
  var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
@@ -6060,7 +6522,9 @@
6060
6522
  try {
6061
6523
  if (res.frequency_details) {
6062
6524
  var frequencyDetails = res === null || res === void 0 ? void 0 : res.frequency_details.split('~');
6063
- var frequencyTime = (res === null || res === void 0 ? void 0 : res.frequency_time) === '00:00:00' ? '12:00 am' : this.frequencyService.timeIn12(res === null || res === void 0 ? void 0 : res.frequency_time);
6525
+ var frequencyTime = (res === null || res === void 0 ? void 0 : res.frequency_time) === '00:00:00'
6526
+ ? '12:00 am'
6527
+ : this.frequencyService.timeIn12(res === null || res === void 0 ? void 0 : res.frequency_time);
6064
6528
  switch (parseInt(frequencyDetails[0])) {
6065
6529
  case 1:
6066
6530
  this.getDailyPlaceholder(frequencyDetails, frequencyTime);
@@ -6082,10 +6546,22 @@
6082
6546
  break;
6083
6547
  case 0:
6084
6548
  {
6085
- var dateObject = new Date(moment__namespace(frequencyDetails[1] + '-' + frequencyDetails[2] + '-' + frequencyDetails[3] + ' 00:00:00', 'YYYY-MM-DD HH:mm:ss').unix() * 1000);
6549
+ var dateObject = new Date(moment__namespace(frequencyDetails[1] +
6550
+ '-' +
6551
+ frequencyDetails[2] +
6552
+ '-' +
6553
+ frequencyDetails[3] +
6554
+ ' 00:00:00', 'YYYY-MM-DD HH:mm:ss').unix() * 1000);
6086
6555
  // tslint:disable-next-line: max-line-length
6087
6556
  this.frequencyPlaceholder =
6088
- 'One Time ' + dateObject.getDate() + ' ' + this.shortMonth[dateObject.getMonth()] + ' ' + dateObject.getFullYear() + ' by ' + frequencyTime;
6557
+ 'One Time ' +
6558
+ dateObject.getDate() +
6559
+ ' ' +
6560
+ this.shortMonth[dateObject.getMonth()] +
6561
+ ' ' +
6562
+ dateObject.getFullYear() +
6563
+ ' by ' +
6564
+ frequencyTime;
6089
6565
  }
6090
6566
  break;
6091
6567
  case 8:
@@ -6094,7 +6570,8 @@
6094
6570
  break;
6095
6571
  case 10:
6096
6572
  {
6097
- this.frequencyPlaceholder = 'You have selected an ongoing frequency.';
6573
+ this.frequencyPlaceholder =
6574
+ 'You have selected an ongoing frequency.';
6098
6575
  }
6099
6576
  break;
6100
6577
  case 6:
@@ -6115,10 +6592,21 @@
6115
6592
  * @param {number} reportId - number
6116
6593
  */
6117
6594
  WorkflowComplianceComponent.prototype.getOnCompletionOf = function (frequencyDetails, reportId, onCompletionReportDetails) {
6118
- this.frequencyPlaceholder = frequencyDetails[3] + ' ' + (parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') + ' after completion of ';
6595
+ this.frequencyPlaceholder =
6596
+ frequencyDetails[3] +
6597
+ ' ' +
6598
+ (parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') +
6599
+ ' after completion of ';
6119
6600
  if (onCompletionReportDetails) {
6120
6601
  if (reportId === onCompletionReportDetails.ReportId) {
6121
- this.frequencyPlaceholder = frequencyDetails[3] + ' ' + (parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') + ' after completion of ' + (onCompletionReportDetails ? onCompletionReportDetails.report_name : '');
6602
+ this.frequencyPlaceholder =
6603
+ frequencyDetails[3] +
6604
+ ' ' +
6605
+ (parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') +
6606
+ ' after completion of ' +
6607
+ (onCompletionReportDetails
6608
+ ? onCompletionReportDetails.report_name
6609
+ : '');
6122
6610
  }
6123
6611
  }
6124
6612
  this.loader = false;
@@ -6138,7 +6626,11 @@
6138
6626
  this.frequencyPlaceholder = 'Daily by ' + frequencyTime;
6139
6627
  }
6140
6628
  else if (parseInt(frequencyDetails[3]) > 1) {
6141
- this.frequencyPlaceholder = 'Every ' + parseInt(frequencyDetails[3]) + ' days by ' + frequencyTime;
6629
+ this.frequencyPlaceholder =
6630
+ 'Every ' +
6631
+ parseInt(frequencyDetails[3]) +
6632
+ ' days by ' +
6633
+ frequencyTime;
6142
6634
  }
6143
6635
  }
6144
6636
  };
@@ -6162,16 +6654,25 @@
6162
6654
  return _this.frequencyService.dayName[parseInt(ele) - 1];
6163
6655
  });
6164
6656
  if (parseInt(frequencyDetails[3]) === 1) {
6165
- this.frequencyPlaceholder = 'Every ' + selectedDay.join() + ' by ' + frequencyTime;
6657
+ this.frequencyPlaceholder =
6658
+ 'Every ' + selectedDay.join() + ' by ' + frequencyTime;
6166
6659
  }
6167
6660
  if (parseInt(frequencyDetails[3]) === 2) {
6168
- this.frequencyPlaceholder = 'Every alternate ' + selectedDay.join() + ' by ' + frequencyTime;
6661
+ this.frequencyPlaceholder =
6662
+ 'Every alternate ' + selectedDay.join() + ' by ' + frequencyTime;
6169
6663
  }
6170
6664
  if (parseInt(frequencyDetails[3]) === 3) {
6171
- this.frequencyPlaceholder = 'Every 3rd ' + selectedDay.join() + ' by ' + frequencyTime;
6665
+ this.frequencyPlaceholder =
6666
+ 'Every 3rd ' + selectedDay.join() + ' by ' + frequencyTime;
6172
6667
  }
6173
6668
  if (parseInt(frequencyDetails[3]) > 3) {
6174
- this.frequencyPlaceholder = 'Every ' + parseInt(frequencyDetails[1]) + 'th ' + selectedDay.join() + ' by ' + frequencyTime;
6669
+ this.frequencyPlaceholder =
6670
+ 'Every ' +
6671
+ parseInt(frequencyDetails[1]) +
6672
+ 'th ' +
6673
+ selectedDay.join() +
6674
+ ' by ' +
6675
+ frequencyTime;
6175
6676
  }
6176
6677
  }
6177
6678
  };
@@ -6188,25 +6689,49 @@
6188
6689
  return _this.shortMonth[parseInt(ele) - 1];
6189
6690
  });
6190
6691
  if (parseInt(frequencyDetails[1]) === 1) {
6191
- this.frequencyPlaceholder = '1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6692
+ this.frequencyPlaceholder =
6693
+ '1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6192
6694
  }
6193
6695
  else if (parseInt(frequencyDetails[1]) === 2) {
6194
- this.frequencyPlaceholder = '2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6696
+ this.frequencyPlaceholder =
6697
+ '2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6195
6698
  }
6196
6699
  else if (parseInt(frequencyDetails[1]) === 3) {
6197
- this.frequencyPlaceholder = '3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6198
- }
6199
- else if (parseInt(frequencyDetails[1]) === 21 || parseInt(frequencyDetails[1]) === 31) {
6200
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6700
+ this.frequencyPlaceholder =
6701
+ '3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6702
+ }
6703
+ else if (parseInt(frequencyDetails[1]) === 21 ||
6704
+ parseInt(frequencyDetails[1]) === 31) {
6705
+ this.frequencyPlaceholder =
6706
+ parseInt(frequencyDetails[1]) +
6707
+ 'st of every ' +
6708
+ selectedMonth.join(', ') +
6709
+ ' by ' +
6710
+ frequencyTime;
6201
6711
  }
6202
6712
  else if (parseInt(frequencyDetails[1]) === 22) {
6203
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6713
+ this.frequencyPlaceholder =
6714
+ parseInt(frequencyDetails[1]) +
6715
+ 'nd of every ' +
6716
+ selectedMonth.join(', ') +
6717
+ ' by ' +
6718
+ frequencyTime;
6204
6719
  }
6205
6720
  else if (parseInt(frequencyDetails[1]) === 23) {
6206
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6721
+ this.frequencyPlaceholder =
6722
+ parseInt(frequencyDetails[1]) +
6723
+ 'rd of every ' +
6724
+ selectedMonth.join(', ') +
6725
+ ' by ' +
6726
+ frequencyTime;
6207
6727
  }
6208
6728
  else if (parseInt(frequencyDetails[1]) > 3) {
6209
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'th of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6729
+ this.frequencyPlaceholder =
6730
+ parseInt(frequencyDetails[1]) +
6731
+ 'th of every ' +
6732
+ selectedMonth.join(', ') +
6733
+ ' by ' +
6734
+ frequencyTime;
6210
6735
  }
6211
6736
  }
6212
6737
  };
@@ -6219,27 +6744,64 @@
6219
6744
  */
6220
6745
  WorkflowComplianceComponent.prototype.getQuarterlyPlaceholder = function (frequencyDetails, frequencyTime) {
6221
6746
  {
6222
- var quarterly = ['January, April, July, October', 'February, May, August, November', ' March, June, September, December'];
6747
+ var quarterly = [
6748
+ 'January, April, July, October',
6749
+ 'February, May, August, November',
6750
+ ' March, June, September, December',
6751
+ ];
6223
6752
  if (parseInt(frequencyDetails[1]) === 1) {
6224
- this.frequencyPlaceholder = '1st of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6753
+ this.frequencyPlaceholder =
6754
+ '1st of every ' +
6755
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6756
+ ' by ' +
6757
+ frequencyTime;
6225
6758
  }
6226
6759
  else if (parseInt(frequencyDetails[1]) === 2) {
6227
- this.frequencyPlaceholder = '2nd of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6760
+ this.frequencyPlaceholder =
6761
+ '2nd of every ' +
6762
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6763
+ ' by ' +
6764
+ frequencyTime;
6228
6765
  }
6229
6766
  else if (parseInt(frequencyDetails[1]) === 3) {
6230
- this.frequencyPlaceholder = '3rd of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6231
- }
6232
- else if (parseInt(frequencyDetails[1]) === 21 || parseInt(frequencyDetails[1]) === 31) {
6233
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'st of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6767
+ this.frequencyPlaceholder =
6768
+ '3rd of every ' +
6769
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6770
+ ' by ' +
6771
+ frequencyTime;
6772
+ }
6773
+ else if (parseInt(frequencyDetails[1]) === 21 ||
6774
+ parseInt(frequencyDetails[1]) === 31) {
6775
+ this.frequencyPlaceholder =
6776
+ parseInt(frequencyDetails[1]) +
6777
+ 'st of every ' +
6778
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6779
+ ' by ' +
6780
+ frequencyTime;
6234
6781
  }
6235
6782
  else if (parseInt(frequencyDetails[1]) === 22) {
6236
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'nd of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6783
+ this.frequencyPlaceholder =
6784
+ parseInt(frequencyDetails[1]) +
6785
+ 'nd of every ' +
6786
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6787
+ ' by ' +
6788
+ frequencyTime;
6237
6789
  }
6238
6790
  else if (parseInt(frequencyDetails[1]) === 23) {
6239
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'rd of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6791
+ this.frequencyPlaceholder =
6792
+ parseInt(frequencyDetails[1]) +
6793
+ 'rd of every ' +
6794
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6795
+ ' by ' +
6796
+ frequencyTime;
6240
6797
  }
6241
6798
  else if (parseInt(frequencyDetails[1]) > 3) {
6242
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'th of every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' by ' + frequencyTime;
6799
+ this.frequencyPlaceholder =
6800
+ parseInt(frequencyDetails[1]) +
6801
+ 'th of every ' +
6802
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
6803
+ ' by ' +
6804
+ frequencyTime;
6243
6805
  }
6244
6806
  }
6245
6807
  };
@@ -6255,25 +6817,49 @@
6255
6817
  return _this.shortMonth[parseInt(ele) - 1];
6256
6818
  });
6257
6819
  if (parseInt(frequencyDetails[1]) === 1) {
6258
- this.frequencyPlaceholder = '1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6820
+ this.frequencyPlaceholder =
6821
+ '1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6259
6822
  }
6260
6823
  else if (parseInt(frequencyDetails[1]) === 2) {
6261
- this.frequencyPlaceholder = '2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6824
+ this.frequencyPlaceholder =
6825
+ '2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6262
6826
  }
6263
6827
  else if (parseInt(frequencyDetails[1]) === 3) {
6264
- this.frequencyPlaceholder = '3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6265
- }
6266
- else if (parseInt(frequencyDetails[1]) === 21 || parseInt(frequencyDetails[1]) === 31) {
6267
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6828
+ this.frequencyPlaceholder =
6829
+ '3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6830
+ }
6831
+ else if (parseInt(frequencyDetails[1]) === 21 ||
6832
+ parseInt(frequencyDetails[1]) === 31) {
6833
+ this.frequencyPlaceholder =
6834
+ parseInt(frequencyDetails[1]) +
6835
+ 'st of every ' +
6836
+ selectedMonth.join(', ') +
6837
+ ' by ' +
6838
+ frequencyTime;
6268
6839
  }
6269
6840
  else if (parseInt(frequencyDetails[1]) === 22) {
6270
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6841
+ this.frequencyPlaceholder =
6842
+ parseInt(frequencyDetails[1]) +
6843
+ 'nd of every ' +
6844
+ selectedMonth.join(', ') +
6845
+ ' by ' +
6846
+ frequencyTime;
6271
6847
  }
6272
6848
  else if (parseInt(frequencyDetails[1]) === 23) {
6273
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6849
+ this.frequencyPlaceholder =
6850
+ parseInt(frequencyDetails[1]) +
6851
+ 'rd of every ' +
6852
+ selectedMonth.join(', ') +
6853
+ ' by ' +
6854
+ frequencyTime;
6274
6855
  }
6275
6856
  else if (parseInt(frequencyDetails[1]) > 3) {
6276
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'th of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
6857
+ this.frequencyPlaceholder =
6858
+ parseInt(frequencyDetails[1]) +
6859
+ 'th of every ' +
6860
+ selectedMonth.join(', ') +
6861
+ ' by ' +
6862
+ frequencyTime;
6277
6863
  }
6278
6864
  }
6279
6865
  };
@@ -6291,53 +6877,126 @@
6291
6877
  var yearSequence = parseInt(frequencyDetails[3]) > 0 ? parseInt(frequencyDetails[3]) : 1;
6292
6878
  if (parseInt(frequencyDetails[1]) < 2) {
6293
6879
  if (parseInt(frequencyDetails[1]) === 1) {
6294
- this.frequencyPlaceholder = '1st of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6880
+ this.frequencyPlaceholder =
6881
+ '1st of every ' +
6882
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6883
+ ' by ' +
6884
+ frequencyTime;
6295
6885
  }
6296
6886
  if (parseInt(frequencyDetails[1]) === 2) {
6297
- this.frequencyPlaceholder = '2nd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6887
+ this.frequencyPlaceholder =
6888
+ '2nd of every ' +
6889
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6890
+ ' by ' +
6891
+ frequencyTime;
6298
6892
  }
6299
6893
  if (parseInt(frequencyDetails[1]) === 3) {
6300
- this.frequencyPlaceholder = '3rd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6894
+ this.frequencyPlaceholder =
6895
+ '3rd of every ' +
6896
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6897
+ ' by ' +
6898
+ frequencyTime;
6301
6899
  }
6302
6900
  if (parseInt(frequencyDetails[1]) > 3) {
6303
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'th of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6304
- }
6305
- if (parseInt(frequencyDetails[1]) === 31 || parseInt(frequencyDetails[1]) === 21) {
6306
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'st of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6901
+ this.frequencyPlaceholder =
6902
+ parseInt(frequencyDetails[1]) +
6903
+ 'th of every ' +
6904
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6905
+ ' by ' +
6906
+ frequencyTime;
6907
+ }
6908
+ if (parseInt(frequencyDetails[1]) === 31 ||
6909
+ parseInt(frequencyDetails[1]) === 21) {
6910
+ this.frequencyPlaceholder =
6911
+ parseInt(frequencyDetails[1]) +
6912
+ 'st of every ' +
6913
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6914
+ ' by ' +
6915
+ frequencyTime;
6307
6916
  }
6308
6917
  if (parseInt(frequencyDetails[1]) === 22) {
6309
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'nd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6918
+ this.frequencyPlaceholder =
6919
+ parseInt(frequencyDetails[1]) +
6920
+ 'nd of every ' +
6921
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6922
+ ' by ' +
6923
+ frequencyTime;
6310
6924
  }
6311
6925
  if (parseInt(frequencyDetails[1]) === 23) {
6312
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'rd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6926
+ this.frequencyPlaceholder =
6927
+ parseInt(frequencyDetails[1]) +
6928
+ 'rd of every ' +
6929
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6930
+ ' by ' +
6931
+ frequencyTime;
6313
6932
  }
6314
6933
  }
6315
6934
  if (parseInt(frequencyDetails[1]) > 1) {
6316
6935
  if (parseInt(frequencyDetails[1]) === 1) {
6317
6936
  // tslint:disable-next-line: max-line-length
6318
- this.frequencyPlaceholder = '1st ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ', Interval: every ' + yearSequence + ' years by ' + frequencyTime;
6937
+ this.frequencyPlaceholder =
6938
+ '1st ' +
6939
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6940
+ ', Interval: every ' +
6941
+ yearSequence +
6942
+ ' years by ' +
6943
+ frequencyTime;
6319
6944
  }
6320
6945
  if (parseInt(frequencyDetails[1]) === 2) {
6321
6946
  // tslint:disable-next-line: max-line-length
6322
- this.frequencyPlaceholder = '2nd ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ', Interval: every ' + yearSequence + ' years by ' + frequencyTime;
6947
+ this.frequencyPlaceholder =
6948
+ '2nd ' +
6949
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6950
+ ', Interval: every ' +
6951
+ yearSequence +
6952
+ ' years by ' +
6953
+ frequencyTime;
6323
6954
  }
6324
6955
  if (parseInt(frequencyDetails[1]) === 3) {
6325
6956
  // tslint:disable-next-line: max-line-length
6326
- this.frequencyPlaceholder = '3rd ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ', Interval: every ' + yearSequence + ' years by ' + frequencyTime;
6957
+ this.frequencyPlaceholder =
6958
+ '3rd ' +
6959
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6960
+ ', Interval: every ' +
6961
+ yearSequence +
6962
+ ' years by ' +
6963
+ frequencyTime;
6327
6964
  }
6328
6965
  if (parseInt(frequencyDetails[1]) > 3) {
6329
6966
  // tslint:disable-next-line: max-line-length
6330
6967
  this.frequencyPlaceholder =
6331
- parseInt(frequencyDetails[1]) + 'th of ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ', Interval: every ' + yearSequence + ' years by ' + frequencyTime;
6332
- }
6333
- if (parseInt(frequencyDetails[1]) === 31 || parseInt(frequencyDetails[1]) === 21) {
6334
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'st of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6968
+ parseInt(frequencyDetails[1]) +
6969
+ 'th of ' +
6970
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6971
+ ', Interval: every ' +
6972
+ yearSequence +
6973
+ ' years by ' +
6974
+ frequencyTime;
6975
+ }
6976
+ if (parseInt(frequencyDetails[1]) === 31 ||
6977
+ parseInt(frequencyDetails[1]) === 21) {
6978
+ this.frequencyPlaceholder =
6979
+ parseInt(frequencyDetails[1]) +
6980
+ 'st of every ' +
6981
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6982
+ ' by ' +
6983
+ frequencyTime;
6335
6984
  }
6336
6985
  if (parseInt(frequencyDetails[1]) === 22) {
6337
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'nd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6986
+ this.frequencyPlaceholder =
6987
+ parseInt(frequencyDetails[1]) +
6988
+ 'nd of every ' +
6989
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6990
+ ' by ' +
6991
+ frequencyTime;
6338
6992
  }
6339
6993
  if (parseInt(frequencyDetails[1]) === 23) {
6340
- this.frequencyPlaceholder = parseInt(frequencyDetails[1]) + 'rd of every ' + this.shortMonth[parseInt(frequencyDetails[2]) - 1] + ' by ' + frequencyTime;
6994
+ this.frequencyPlaceholder =
6995
+ parseInt(frequencyDetails[1]) +
6996
+ 'rd of every ' +
6997
+ this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
6998
+ ' by ' +
6999
+ frequencyTime;
6341
7000
  }
6342
7001
  }
6343
7002
  }
@@ -6348,11 +7007,16 @@
6348
7007
  */
6349
7008
  WorkflowComplianceComponent.prototype.getRandomPlaceholder = function (frequencyDetails, frequencyTime) {
6350
7009
  var _this = this;
6351
- var quarterly = ['January, April, July, October', 'February, May, August, November', ' March, June, September, December'];
7010
+ var quarterly = [
7011
+ 'January, April, July, October',
7012
+ 'February, May, August, November',
7013
+ ' March, June, September, December',
7014
+ ];
6352
7015
  {
6353
7016
  switch (parseInt(frequencyDetails[1])) {
6354
7017
  case 1:
6355
- this.frequencyPlaceholder = 'Every week for ' + frequencyDetails[3] + ' random instances';
7018
+ this.frequencyPlaceholder =
7019
+ 'Every week for ' + frequencyDetails[3] + ' random instances';
6356
7020
  break;
6357
7021
  case 2:
6358
7022
  this.frequencyPlaceholder =
@@ -6366,10 +7030,16 @@
6366
7030
  ' random instances';
6367
7031
  break;
6368
7032
  case 3:
6369
- this.frequencyPlaceholder = 'Every ' + quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] + ' for ' + frequencyDetails[3] + ' random instances';
7033
+ this.frequencyPlaceholder =
7034
+ 'Every ' +
7035
+ quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
7036
+ ' for ' +
7037
+ frequencyDetails[3] +
7038
+ ' random instances';
6370
7039
  break;
6371
7040
  case 4:
6372
- this.frequencyPlaceholder = 'Every year for ' + frequencyDetails[3] + ' random instances';
7041
+ this.frequencyPlaceholder =
7042
+ 'Every year for ' + frequencyDetails[3] + ' random instances';
6373
7043
  }
6374
7044
  }
6375
7045
  };
@@ -6382,6 +7052,7 @@
6382
7052
  var _this = this;
6383
7053
  setTimeout(function () {
6384
7054
  var _a, _b;
7055
+ // this will make the execution after the above boolean has changed
6385
7056
  _this.isEditWhat = false;
6386
7057
  (_b = (_a = _this.whatInput) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
6387
7058
  }, 0);
@@ -6404,7 +7075,8 @@
6404
7075
  checkedMoreOptions.push('PROGRAM');
6405
7076
  this.moreOptions.PROGRAM = true;
6406
7077
  }
6407
- if (this.responsibilityForm.formatAndEvidence.evidenceRequired || this.responsibilityForm.formatAndEvidence.formatRequired) {
7078
+ if (this.responsibilityForm.formatAndEvidence.evidenceRequired ||
7079
+ this.responsibilityForm.formatAndEvidence.formatRequired) {
6408
7080
  checkedMoreOptions.push('FORMATE_EVIDENCE');
6409
7081
  this.moreOptions.FORMATE_EVIDENCE = true;
6410
7082
  }
@@ -6412,7 +7084,9 @@
6412
7084
  checkedMoreOptions.push('RC');
6413
7085
  this.moreOptions.RC = true;
6414
7086
  }
6415
- if (this.isResponsibilityRcLinkEnabled && (res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) && ((_c = res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) === null || _c === void 0 ? void 0 : _c.length)) {
7087
+ if (this.isResponsibilityRcLinkEnabled &&
7088
+ (res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) &&
7089
+ ((_c = res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) === null || _c === void 0 ? void 0 : _c.length)) {
6416
7090
  checkedMoreOptions.push('RC');
6417
7091
  this.moreOptions.RC = true;
6418
7092
  }
@@ -6420,11 +7094,15 @@
6420
7094
  checkedMoreOptions.push('CHECKPOINTS');
6421
7095
  this.moreOptions.CHECKPOINTS = true;
6422
7096
  }
6423
- if (((_g = (_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.reviewers) === null || _f === void 0 ? void 0 : _f.list) === null || _g === void 0 ? void 0 : _g.length) > 0 || ((_k = (_j = (_h = this.responsibilityForm) === null || _h === void 0 ? void 0 : _h.groupReviewer) === null || _j === void 0 ? void 0 : _j.list) === null || _k === void 0 ? void 0 : _k.length) > 0) {
7097
+ if (((_g = (_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.reviewers) === null || _f === void 0 ? void 0 : _f.list) === null || _g === void 0 ? void 0 : _g.length) > 0 ||
7098
+ ((_k = (_j = (_h = this.responsibilityForm) === null || _h === void 0 ? void 0 : _h.groupReviewer) === null || _j === void 0 ? void 0 : _j.list) === null || _k === void 0 ? void 0 : _k.length) > 0) {
6424
7099
  checkedMoreOptions.push('REVIEWER');
6425
7100
  this.moreOptions.REVIEWER = true;
6426
7101
  }
6427
- if (((_o = (_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseers) === null || _m === void 0 ? void 0 : _m.list) === null || _o === void 0 ? void 0 : _o.length) > 0 || ((_r = (_q = (_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.overseers) === null || _q === void 0 ? void 0 : _q.notifyList) === null || _r === void 0 ? void 0 : _r.length) > 0 || ((_u = (_t = (_s = this.responsibilityForm) === null || _s === void 0 ? void 0 : _s.overseersGroups) === null || _t === void 0 ? void 0 : _t.list) === null || _u === void 0 ? void 0 : _u.length) > 0 || ((_x = (_w = (_v = this.responsibilityForm) === null || _v === void 0 ? void 0 : _v.overseersGroups) === null || _w === void 0 ? void 0 : _w.notifyList) === null || _x === void 0 ? void 0 : _x.length) > 0) {
7102
+ if (((_o = (_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseers) === null || _m === void 0 ? void 0 : _m.list) === null || _o === void 0 ? void 0 : _o.length) > 0 ||
7103
+ ((_r = (_q = (_p = this.responsibilityForm) === null || _p === void 0 ? void 0 : _p.overseers) === null || _q === void 0 ? void 0 : _q.notifyList) === null || _r === void 0 ? void 0 : _r.length) > 0 ||
7104
+ ((_u = (_t = (_s = this.responsibilityForm) === null || _s === void 0 ? void 0 : _s.overseersGroups) === null || _t === void 0 ? void 0 : _t.list) === null || _u === void 0 ? void 0 : _u.length) > 0 ||
7105
+ ((_x = (_w = (_v = this.responsibilityForm) === null || _v === void 0 ? void 0 : _v.overseersGroups) === null || _w === void 0 ? void 0 : _w.notifyList) === null || _x === void 0 ? void 0 : _x.length) > 0) {
6428
7106
  checkedMoreOptions.push('OVERSEER');
6429
7107
  this.moreOptions.OVERSEER = true;
6430
7108
  }
@@ -6448,7 +7126,8 @@
6448
7126
  };
6449
7127
  // Format & Evidence
6450
7128
  WorkflowComplianceComponent.prototype.testFunction = function () {
6451
- if (this.responsibilityForm.responsibility.name.trim() !== '' && this.isEditWhat === false) {
7129
+ if (this.responsibilityForm.responsibility.name.trim() !== '' &&
7130
+ this.isEditWhat === false) {
6452
7131
  this.isEditWhat = true;
6453
7132
  }
6454
7133
  if (this.responsibilityForm.description == '<br>') {
@@ -6459,7 +7138,8 @@
6459
7138
  }
6460
7139
  };
6461
7140
  WorkflowComplianceComponent.prototype.reviewerTypeChange = function (event) {
6462
- this.responsibilityForm.reviewers.sequentialWorkflow = event === 'SEQUENTIAL' ? true : false;
7141
+ this.responsibilityForm.reviewers.sequentialWorkflow =
7142
+ event === 'SEQUENTIAL' ? true : false;
6463
7143
  };
6464
7144
  WorkflowComplianceComponent.prototype.selectedSampleData = function (event) {
6465
7145
  this.selectedSample = event;
@@ -6483,13 +7163,15 @@
6483
7163
  this.selectedSample = 1;
6484
7164
  }
6485
7165
  this.tempCheckValue = this.selectedSample;
6486
- this.sendAuditRemindersValue = testPlanCategory.frequency_pattern ? parseInt(testPlanCategory.frequency_pattern.split('~')[2]) : 2;
7166
+ this.sendAuditRemindersValue = testPlanCategory.frequency_pattern
7167
+ ? parseInt(testPlanCategory.frequency_pattern.split('~')[2])
7168
+ : 2;
6487
7169
  this.auditTime = moment__namespace(testPlanCategory === null || testPlanCategory === void 0 ? void 0 : testPlanCategory.frequency_time, 'HH:mm:ss').format('HH:mm a');
6488
7170
  };
6489
7171
  //on sample toggle on/off
6490
7172
  WorkflowComplianceComponent.prototype.checkInputValue = function (event) {
6491
7173
  var key = event.charCode; // key = event.keyCode; (Both can be used)
6492
- return ((key > 47 && key < 58) || key == 45);
7174
+ return (key > 47 && key < 58) || key == 45;
6493
7175
  };
6494
7176
  WorkflowComplianceComponent.prototype.switchEnable = function (event) {
6495
7177
  if (event) {
@@ -6511,7 +7193,9 @@
6511
7193
  */
6512
7194
  WorkflowComplianceComponent.prototype.getAssessmentDetails = function (assessmentDetails, type) {
6513
7195
  var _this = this;
6514
- this.responsibilityService.getAssessmentDetailsByID(assessmentDetails.assessment_id).subscribe(function (res) {
7196
+ this.responsibilityService
7197
+ .getAssessmentDetailsByID(assessmentDetails.assessment_id)
7198
+ .subscribe(function (res) {
6515
7199
  if ((res === null || res === void 0 ? void 0 : res.length) > 0) {
6516
7200
  if (type === 'assessment') {
6517
7201
  var categoryDetails = res[0].category.find(function (ele) { return ele._id == assessmentDetails.category_id; });
@@ -6522,9 +7206,9 @@
6522
7206
  assessmentDetails: {
6523
7207
  id: assessmentDetails.assessment_id,
6524
7208
  assessment_name: res[0].assessment_name,
6525
- questions: res[0].questionsCount
7209
+ questions: res[0].questionsCount,
6526
7210
  },
6527
- category_details: categoryDetails
7211
+ category_details: categoryDetails,
6528
7212
  };
6529
7213
  _this.responsibilityForm.assessment = JSON.parse(JSON.stringify(assessmentData));
6530
7214
  }
@@ -6543,9 +7227,9 @@
6543
7227
  this.responsibilityForm.checkpoints = [];
6544
7228
  };
6545
7229
  /**
6546
- *
6547
- * @param event Assessment details
6548
- */
7230
+ *
7231
+ * @param event Assessment details
7232
+ */
6549
7233
  WorkflowComplianceComponent.prototype.postAssessment = function (event) {
6550
7234
  var _a;
6551
7235
  this.responsibilityForm.new_checkpoints = event.assessmentDetails;
@@ -6585,7 +7269,7 @@
6585
7269
  };
6586
7270
  WorkflowComplianceComponent.prototype.openAssigneeChangeConfirmation = function (event) {
6587
7271
  if (event) {
6588
- this.responsibilityForm.assignees.whoCanComplete = "ANY_ONE";
7272
+ this.responsibilityForm.assignees.whoCanComplete = 'ANY_ONE';
6589
7273
  }
6590
7274
  else {
6591
7275
  this.responsibilityForm.assignees.whoCanComplete = '';
@@ -6597,7 +7281,8 @@
6597
7281
  * @param {any} event - any - the event that is triggered when the user selects a radio button
6598
7282
  */
6599
7283
  WorkflowComplianceComponent.prototype.onReviewerWorkflowChange = function (event) {
6600
- this.responsibilityForm.reviewers.sequentialWorkflow = event === 'sequential' ? true : false;
7284
+ this.responsibilityForm.reviewers.sequentialWorkflow =
7285
+ event === 'sequential' ? true : false;
6601
7286
  if (this.mode === 'EDIT' && this.hasReviewer) {
6602
7287
  this.onReviewerTypeChange.emit(event);
6603
7288
  }
@@ -7057,7 +7742,7 @@
7057
7742
  'linkProgram',
7058
7743
  'isAssessment',
7059
7744
  'owners',
7060
- 'policyAccess'
7745
+ 'policyAccess',
7061
7746
  ];
7062
7747
  this.riskClassification = [
7063
7748
  { name: 'LOW', value: 1, class: 'low' },
@@ -7154,7 +7839,8 @@
7154
7839
  WorkflowPolicyComponent.prototype.ngOnInit = function () {
7155
7840
  var _this = this;
7156
7841
  var _a, _b;
7157
- this.groupEnabled = ((_a = this.feature) === null || _a === void 0 ? void 0 : _a.isFeatureEnabled('ff_policy_groups')) || true;
7842
+ this.groupEnabled =
7843
+ ((_a = this.feature) === null || _a === void 0 ? void 0 : _a.isFeatureEnabled('ff_policy_groups')) || true;
7158
7844
  this.getRCList();
7159
7845
  this.getUsersList();
7160
7846
  this.getCategoriesList();
@@ -7166,7 +7852,9 @@
7166
7852
  if (!res.enable_riskclass) {
7167
7853
  _this.showRiskClassification = false;
7168
7854
  }
7169
- _this.organization_id = res._id;
7855
+ if (res._id) {
7856
+ _this.organization_id = res._id;
7857
+ }
7170
7858
  });
7171
7859
  this.member_obj_id = this.authService.getUserDetails()._id;
7172
7860
  this.userInfo = this.authService.getUserDetails().user;
@@ -7690,7 +8378,8 @@
7690
8378
  break;
7691
8379
  case 'policyAccess':
7692
8380
  var accessIds = void 0, accessGroupIds = void 0;
7693
- this.policyForm.availableOnPortal = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.futureUsersWillSelect;
8381
+ this.policyForm.availableOnPortal =
8382
+ selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.futureUsersWillSelect;
7694
8383
  if (this.groupEnabled) {
7695
8384
  accessIds = this.returnIds(selectedItems.users, 'member_id');
7696
8385
  accessGroupIds = this.returnIds(selectedItems.groups, 'group_id');
@@ -8237,8 +8926,12 @@
8237
8926
  ? policy === null || policy === void 0 ? void 0 : policy.businessCycle
8238
8927
  : undefined,
8239
8928
  policy_access_type: (_k = policy.policy_access_type) !== null && _k !== void 0 ? _k : 0,
8240
- policy_access_owners: policy.availableOnPortal ? [] : (policyAccessUsersIds !== null && policyAccessUsersIds !== void 0 ? policyAccessUsersIds : []),
8241
- policy_access_groups: policy.availableOnPortal ? [] : (policyAccessGroupsIds !== null && policyAccessGroupsIds !== void 0 ? policyAccessGroupsIds : []),
8929
+ policy_access_owners: policy.availableOnPortal
8930
+ ? []
8931
+ : policyAccessUsersIds !== null && policyAccessUsersIds !== void 0 ? policyAccessUsersIds : [],
8932
+ policy_access_groups: policy.availableOnPortal
8933
+ ? []
8934
+ : policyAccessGroupsIds !== null && policyAccessGroupsIds !== void 0 ? policyAccessGroupsIds : [],
8242
8935
  };
8243
8936
  if (this.mode == 'CREATE') {
8244
8937
  this.policyService.submitPolicy(payload).subscribe(function (res) {
@@ -8664,7 +9357,10 @@
8664
9357
  this.policyForm.policy_access_type = event;
8665
9358
  if (event == 0) {
8666
9359
  // this.policyForm.policy_access_owners = this.usersAccessList;
8667
- this.saveSelectedList('policyAccess', { users: this.usersAccessList, groups: [] });
9360
+ this.saveSelectedList('policyAccess', {
9361
+ users: this.usersAccessList,
9362
+ groups: [],
9363
+ });
8668
9364
  }
8669
9365
  };
8670
9366
  WorkflowPolicyComponent.prototype.getUsersAccessListByCategory = function (categoryDetails) {