vcomply-workflow-engine 3.0.18 → 3.0.20
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.
- package/bundles/vcomply-workflow-engine.umd.js +1104 -407
- package/bundles/vcomply-workflow-engine.umd.js.map +1 -1
- package/esm2015/lib/workflow-compliance/workflow-compliance.component.js +1162 -432
- package/esm2015/lib/workflow-policy/workflow-policy.component.js +22 -9
- package/fesm2015/vcomply-workflow-engine.js +1181 -438
- package/fesm2015/vcomply-workflow-engine.js.map +1 -1
- package/lib/workflow-compliance/workflow-compliance.component.d.ts +8 -8
- package/package.json +1 -1
- package/vcomply-workflow-engine.metadata.json +1 -1
|
@@ -3616,7 +3616,19 @@
|
|
|
3616
3616
|
this.disableRadioAssignee = [];
|
|
3617
3617
|
this.isResponsibilitySimplified = false;
|
|
3618
3618
|
this.queryParam = '';
|
|
3619
|
-
this.recentResponsibilityUrl = {
|
|
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
|
-
{
|
|
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: '',
|
|
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 = [
|
|
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 =
|
|
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' &&
|
|
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
|
-
{
|
|
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
|
|
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 &&
|
|
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 &&
|
|
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) &&
|
|
4110
|
-
|
|
4111
|
-
|
|
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 = {
|
|
4170
|
+
_this.responsibilityForm.assessment = {
|
|
4171
|
+
assessment_id: '',
|
|
4172
|
+
category_id: '',
|
|
4173
|
+
};
|
|
4115
4174
|
}
|
|
4116
4175
|
}
|
|
4117
4176
|
else {
|
|
4118
|
-
_this.responsibilityForm.assessment = {
|
|
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) ||
|
|
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) {
|
|
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) ||
|
|
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 ((
|
|
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 ||
|
|
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 =
|
|
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
|
|
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 &&
|
|
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) &&
|
|
4358
|
-
|
|
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'
|
|
4406
|
-
|
|
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 =
|
|
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
|
|
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:
|
|
4424
|
-
list: ((
|
|
4425
|
-
_this.setList(_this.assigneesList, res.
|
|
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:
|
|
4432
|
-
|
|
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)
|
|
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)
|
|
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: ((
|
|
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: (
|
|
4444
|
-
reviewNOtCompletedDays: (
|
|
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
|
|
4447
|
-
|
|
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)
|
|
4451
|
-
|
|
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: ((
|
|
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 =
|
|
4470
|
-
|
|
4471
|
-
|
|
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 !== '' &&
|
|
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 (((
|
|
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 &&
|
|
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) ||
|
|
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) {
|
|
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) ||
|
|
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 =
|
|
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) {
|
|
4615
|
-
|
|
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 =
|
|
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) ||
|
|
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 ((
|
|
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)
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
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[
|
|
4662
|
-
list: ((_e = res === null || res === void 0 ? void 0 : res.userGroupIds) === null || _e === void 0 ? void 0 : _e.ccEmailGroupIds)
|
|
4663
|
-
|
|
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)
|
|
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 =
|
|
4673
|
-
|
|
4674
|
-
|
|
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: (
|
|
4677
|
-
reviewNOtCompletedDays: (
|
|
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
|
|
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[
|
|
4683
|
-
sequentialWorkflow: ((
|
|
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: (
|
|
4686
|
-
reviewNOtCompletedDays: (
|
|
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
|
|
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 = (
|
|
4696
|
-
|
|
4697
|
-
|
|
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[
|
|
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[
|
|
4710
|
-
whoCanComplete:
|
|
4711
|
-
list: ((
|
|
4712
|
-
this.setList(this.assigneesList,
|
|
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[
|
|
4892
|
+
this.responsibilityForm['assigneeGroups'] = {
|
|
4715
4893
|
whoCanComplete: (res === null || res === void 0 ? void 0 : res.isGroupAssignTo) ? 'ANY_ONE' : 'ALL',
|
|
4716
|
-
list: ((
|
|
4717
|
-
|
|
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 =
|
|
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
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
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 =
|
|
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 =
|
|
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,15 @@
|
|
|
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 &&
|
|
4767
|
-
this.
|
|
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
|
-
|
|
4957
|
+
console.log('this.frameworkDetailsthis.frameworkDetails ==>', this.frameworkDetails);
|
|
4958
|
+
this.assignFromFramework(this.frameworkDetails[0]);
|
|
4770
4959
|
}
|
|
4771
4960
|
if (this.mode === 'EDIT') {
|
|
4772
4961
|
this.getEditResponsibilityDetails(this.responsibilityId);
|
|
@@ -4777,13 +4966,25 @@
|
|
|
4777
4966
|
if (this.selectedProgram) {
|
|
4778
4967
|
this.responsibilityForm.program.push(this.selectedProgram);
|
|
4779
4968
|
this.responsibilityForm.program_selected_ids.push(this.selectedProgram.category_id);
|
|
4780
|
-
this.responsibilityForm.category_id =
|
|
4969
|
+
this.responsibilityForm.category_id =
|
|
4970
|
+
(_c = (_b = this.selectedProgram) === null || _b === void 0 ? void 0 : _b.category_id) === null || _c === void 0 ? void 0 : _c.toString();
|
|
4781
4971
|
if ((_d = this.orgDetails) === null || _d === void 0 ? void 0 : _d.hasProgramFullPermission) {
|
|
4782
|
-
this.responsibilityForm.assignees.whoCanComplete =
|
|
4783
|
-
|
|
4784
|
-
|
|
4972
|
+
this.responsibilityForm.assignees.whoCanComplete =
|
|
4973
|
+
((_e = this.selectedProgram) === null || _e === void 0 ? void 0 : _e.default_assignee_type) == 'ANYONE'
|
|
4974
|
+
? 'ANY_ONE'
|
|
4975
|
+
: 'ALL';
|
|
4976
|
+
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
4977
|
+
((_f = this.selectedProgram) === null || _f === void 0 ? void 0 : _f.default_reviewers_type) == 'SEQUENTIAL'
|
|
4978
|
+
? true
|
|
4979
|
+
: false;
|
|
4980
|
+
this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_g = this
|
|
4981
|
+
.selectedProgram) === null || _g === void 0 ? void 0 : _g.evidence_upload_flag)
|
|
4982
|
+
? true
|
|
4983
|
+
: false;
|
|
4785
4984
|
}
|
|
4786
|
-
var programCustomTags = ((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h.custom_tags)
|
|
4985
|
+
var programCustomTags = ((_h = this.selectedProgram) === null || _h === void 0 ? void 0 : _h.custom_tags)
|
|
4986
|
+
? JSON.parse(this.selectedProgram.custom_tags)
|
|
4987
|
+
: [];
|
|
4787
4988
|
programCustomTags.forEach(function (tag) {
|
|
4788
4989
|
var tagData = JSON.parse(tag);
|
|
4789
4990
|
var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
|
|
@@ -4794,7 +4995,8 @@
|
|
|
4794
4995
|
var checkedMoreOptions = [];
|
|
4795
4996
|
this.moreOptions.PROGRAM = true;
|
|
4796
4997
|
checkedMoreOptions.push('PROGRAM');
|
|
4797
|
-
if (((_j = this.selectedProgram) === null || _j === void 0 ? void 0 : _j.evidence_upload_flag) &&
|
|
4998
|
+
if (((_j = this.selectedProgram) === null || _j === void 0 ? void 0 : _j.evidence_upload_flag) &&
|
|
4999
|
+
((_k = this.orgDetails) === null || _k === void 0 ? void 0 : _k.hasProgramFullPermission)) {
|
|
4798
5000
|
checkedMoreOptions.push('FORMATE_EVIDENCE');
|
|
4799
5001
|
this.moreOptions.FORMATE_EVIDENCE = true;
|
|
4800
5002
|
}
|
|
@@ -4824,7 +5026,8 @@
|
|
|
4824
5026
|
if (this.invalidType === 'who') {
|
|
4825
5027
|
this.invalidType = '';
|
|
4826
5028
|
}
|
|
4827
|
-
if (!this.isEntrust &&
|
|
5029
|
+
if (!this.isEntrust &&
|
|
5030
|
+
this.responsibilityForm.assignees.whoCanComplete !== 'ANY_ONE') {
|
|
4828
5031
|
this.responsibilityForm.assignees.list = this.setList(this.assigneesList, [selectedItems.employee_id], 'employee_id');
|
|
4829
5032
|
this.callRefreshList();
|
|
4830
5033
|
}
|
|
@@ -4849,7 +5052,11 @@
|
|
|
4849
5052
|
case 'category':
|
|
4850
5053
|
this.responsibilityForm.category = selectedItems;
|
|
4851
5054
|
selectedItems.forEach(function (element) {
|
|
4852
|
-
var tag = element.custom_tags !== '' &&
|
|
5055
|
+
var tag = element.custom_tags !== '' &&
|
|
5056
|
+
element.custom_tags !== 'null' &&
|
|
5057
|
+
element.custom_tags != '[]'
|
|
5058
|
+
? JSON.parse(element.custom_tags)
|
|
5059
|
+
: [];
|
|
4853
5060
|
if ((tag === null || tag === void 0 ? void 0 : tag.length) > 0) {
|
|
4854
5061
|
tag.forEach(function (tagData) {
|
|
4855
5062
|
var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
|
|
@@ -4862,19 +5069,29 @@
|
|
|
4862
5069
|
break;
|
|
4863
5070
|
case 'program':
|
|
4864
5071
|
this.responsibilityForm.linkedProgram = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.linkedProgram;
|
|
4865
|
-
if (
|
|
4866
|
-
|
|
5072
|
+
if (this.selectedProgram &&
|
|
5073
|
+
!((((_c = this.selectedProgram) === null || _c === void 0 ? void 0 : _c.programType) === 0 &&
|
|
5074
|
+
((_e = (_d = this.selectedProgram) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'uncategorized') ||
|
|
5075
|
+
!((_f = this.orgDetails) === null || _f === void 0 ? void 0 : _f.hasProgramFullPermission)) &&
|
|
5076
|
+
!this.feature.isFeatureEnabled('ff_deprecate_primary_program_flag')) {
|
|
5077
|
+
this.responsibilityForm.category = selectedItems.categories
|
|
5078
|
+
? selectedItems.categories
|
|
5079
|
+
: [];
|
|
4867
5080
|
var categoryId = (_g = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _g === void 0 ? void 0 : _g.toString();
|
|
4868
5081
|
if ((_h = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _h === void 0 ? void 0 : _h.length) {
|
|
4869
|
-
this.responsibilityForm.category_id =
|
|
5082
|
+
this.responsibilityForm.category_id =
|
|
5083
|
+
((_j = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _j === void 0 ? void 0 : _j.category_id) + ',' + categoryId;
|
|
4870
5084
|
}
|
|
4871
5085
|
else {
|
|
4872
|
-
this.responsibilityForm.category_id =
|
|
5086
|
+
this.responsibilityForm.category_id =
|
|
5087
|
+
(_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
5088
|
}
|
|
4874
5089
|
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)
|
|
5090
|
+
var programCustomTags = ((_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _o === void 0 ? void 0 : _o.custom_tags)
|
|
5091
|
+
? JSON.parse((_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _p === void 0 ? void 0 : _p.custom_tags)
|
|
5092
|
+
: [];
|
|
4876
5093
|
programCustomTags === null || programCustomTags === void 0 ? void 0 : programCustomTags.forEach(function (tag) {
|
|
4877
|
-
var tagData = typeof tag ===
|
|
5094
|
+
var tagData = typeof tag === 'string' ? JSON.parse(tag) : tag;
|
|
4878
5095
|
var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
|
|
4879
5096
|
if (index == -1) {
|
|
4880
5097
|
_this.responsibilityForm.customTags.push(tagData);
|
|
@@ -4883,40 +5100,59 @@
|
|
|
4883
5100
|
}
|
|
4884
5101
|
else {
|
|
4885
5102
|
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)
|
|
5103
|
+
((_s = Object.keys((_r = this.responsibilityForm) === null || _r === void 0 ? void 0 : _r.assessment)) === null || _s === void 0 ? void 0 : _s.length)
|
|
5104
|
+
? this.getProgramDetails(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program._id)
|
|
5105
|
+
: null;
|
|
4887
5106
|
}
|
|
4888
|
-
this.responsibilityForm.category =
|
|
5107
|
+
this.responsibilityForm.category = selectedItems.categories
|
|
5108
|
+
? selectedItems.categories
|
|
5109
|
+
: [];
|
|
4889
5110
|
this.responsibilityForm.program = [];
|
|
4890
5111
|
this.responsibilityForm.category_id = '';
|
|
4891
5112
|
this.responsibilityForm.program_selected_ids = [];
|
|
4892
5113
|
this.responsibilityForm.customTags = [];
|
|
4893
|
-
this.responsibilityForm.program =
|
|
5114
|
+
this.responsibilityForm.program = selectedItems.program
|
|
5115
|
+
? [selectedItems.program]
|
|
5116
|
+
: [];
|
|
4894
5117
|
var categoryId = (_t = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _t === void 0 ? void 0 : _t.toString();
|
|
4895
5118
|
if ((_u = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _u === void 0 ? void 0 : _u.length) {
|
|
4896
|
-
this.responsibilityForm.category_id =
|
|
5119
|
+
this.responsibilityForm.category_id =
|
|
5120
|
+
((_v = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _v === void 0 ? void 0 : _v.category_id) + ',' + categoryId;
|
|
4897
5121
|
}
|
|
4898
5122
|
else {
|
|
4899
|
-
this.responsibilityForm.category_id =
|
|
5123
|
+
this.responsibilityForm.category_id =
|
|
5124
|
+
(_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
5125
|
}
|
|
4901
5126
|
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)
|
|
5127
|
+
var programCustomTags = ((_z = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _z === void 0 ? void 0 : _z.custom_tags)
|
|
5128
|
+
? JSON.parse((_0 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _0 === void 0 ? void 0 : _0.custom_tags)
|
|
5129
|
+
: [];
|
|
4903
5130
|
programCustomTags === null || programCustomTags === void 0 ? void 0 : programCustomTags.forEach(function (tag) {
|
|
4904
|
-
var tagData = typeof tag ===
|
|
5131
|
+
var tagData = typeof tag === 'string' ? JSON.parse(tag) : tag;
|
|
4905
5132
|
var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
|
|
4906
5133
|
if (index == -1) {
|
|
4907
5134
|
_this.responsibilityForm.customTags.push(tagData);
|
|
4908
5135
|
}
|
|
4909
5136
|
});
|
|
4910
5137
|
if ((_1 = this.orgDetails) === null || _1 === void 0 ? void 0 : _1.hasProgramFullPermission) {
|
|
4911
|
-
this.responsibilityForm.assignees.whoCanComplete =
|
|
4912
|
-
|
|
4913
|
-
|
|
5138
|
+
this.responsibilityForm.assignees.whoCanComplete =
|
|
5139
|
+
((_2 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _2 === void 0 ? void 0 : _2.default_assignee_type) == 'ANYONE'
|
|
5140
|
+
? 'ANY_ONE'
|
|
5141
|
+
: 'ALL';
|
|
5142
|
+
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
5143
|
+
((_3 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _3 === void 0 ? void 0 : _3.default_reviewers_type) == 'SEQUENTIAL'
|
|
5144
|
+
? true
|
|
5145
|
+
: false;
|
|
5146
|
+
this.responsibilityForm.formatAndEvidence.evidenceRequired =
|
|
5147
|
+
((_4 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _4 === void 0 ? void 0 : _4.evidence_upload_flag) ? true : false;
|
|
4914
5148
|
if ((_5 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _5 === void 0 ? void 0 : _5.evidence_upload_flag) {
|
|
4915
5149
|
this.moreOptions.FORMATE_EVIDENCE = true;
|
|
4916
5150
|
}
|
|
4917
5151
|
}
|
|
4918
|
-
if (!(((_6 = this.selectedProgram) === null || _6 === void 0 ? void 0 : _6.programType) === 0 &&
|
|
4919
|
-
|
|
5152
|
+
if (!(((_6 = this.selectedProgram) === null || _6 === void 0 ? void 0 : _6.programType) === 0 &&
|
|
5153
|
+
((_8 = (_7 = this.selectedProgram) === null || _7 === void 0 ? void 0 : _7.name) === null || _8 === void 0 ? void 0 : _8.toLowerCase()) === 'uncategorized')) {
|
|
5154
|
+
if (((_9 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _9 === void 0 ? void 0 : _9._id) &&
|
|
5155
|
+
((_10 = this.orgDetails) === null || _10 === void 0 ? void 0 : _10.hasProgramFullPermission)) {
|
|
4920
5156
|
this.filterListsAccordingToProgram(selectedItems.program._id);
|
|
4921
5157
|
}
|
|
4922
5158
|
else {
|
|
@@ -4957,21 +5193,27 @@
|
|
|
4957
5193
|
break;
|
|
4958
5194
|
case 'requires_audit':
|
|
4959
5195
|
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'] =
|
|
5196
|
+
this.responsibilityForm['audit_category_details']['category_id'] =
|
|
5197
|
+
selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.category_id;
|
|
4961
5198
|
break;
|
|
4962
5199
|
case 'checkpoints':
|
|
4963
5200
|
this.responsibilityForm.checkpoints = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.checkpointDetails;
|
|
4964
|
-
this.responsibilityForm.checkpointInstruction =
|
|
5201
|
+
this.responsibilityForm.checkpointInstruction =
|
|
5202
|
+
selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.checkpointInstruction;
|
|
4965
5203
|
break;
|
|
4966
5204
|
case 'calculatedrisk':
|
|
4967
5205
|
this.responsibilityForm.riskClass = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskClass;
|
|
4968
5206
|
this.responsibilityForm.riskMatrix = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskMatrix;
|
|
4969
5207
|
break;
|
|
4970
5208
|
case 'formate_evidence':
|
|
4971
|
-
this.responsibilityForm.formatAndEvidence.formatRequired =
|
|
4972
|
-
|
|
4973
|
-
this.responsibilityForm.formatAndEvidence.
|
|
4974
|
-
|
|
5209
|
+
this.responsibilityForm.formatAndEvidence.formatRequired =
|
|
5210
|
+
(_11 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _11 !== void 0 ? _11 : false;
|
|
5211
|
+
this.responsibilityForm.formatAndEvidence.formatFiles =
|
|
5212
|
+
(_12 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _12 !== void 0 ? _12 : [];
|
|
5213
|
+
this.responsibilityForm.formatAndEvidence.formatLinks =
|
|
5214
|
+
(_13 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _13 !== void 0 ? _13 : [];
|
|
5215
|
+
this.responsibilityForm.formatAndEvidence.evidenceRequired =
|
|
5216
|
+
(_14 = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _14 !== void 0 ? _14 : false;
|
|
4975
5217
|
break;
|
|
4976
5218
|
case 'reviewFrequency':
|
|
4977
5219
|
this.responsibilityForm.reviewers.reviewFrequency = {
|
|
@@ -4988,7 +5230,8 @@
|
|
|
4988
5230
|
*/
|
|
4989
5231
|
WorkflowComplianceComponent.prototype.callRefreshList = function () {
|
|
4990
5232
|
var _a, _b;
|
|
4991
|
-
if (((_a = this.responsibilityForm.program) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
5233
|
+
if (((_a = this.responsibilityForm.program) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
5234
|
+
((_b = this.orgDetails) === null || _b === void 0 ? void 0 : _b.hasProgramFullPermission)) {
|
|
4992
5235
|
this.refreshListsWhileProgramSelected();
|
|
4993
5236
|
}
|
|
4994
5237
|
else {
|
|
@@ -5091,7 +5334,7 @@
|
|
|
5091
5334
|
sample: 0,
|
|
5092
5335
|
percentage: 0,
|
|
5093
5336
|
frequency_pattern: '',
|
|
5094
|
-
frequency_time: ''
|
|
5337
|
+
frequency_time: '',
|
|
5095
5338
|
};
|
|
5096
5339
|
break;
|
|
5097
5340
|
case 'assurance':
|
|
@@ -5103,8 +5346,8 @@
|
|
|
5103
5346
|
break;
|
|
5104
5347
|
case 'assessment':
|
|
5105
5348
|
this.responsibilityForm.assessment = {
|
|
5106
|
-
category_id:
|
|
5107
|
-
assessment_id:
|
|
5349
|
+
category_id: '',
|
|
5350
|
+
assessment_id: '',
|
|
5108
5351
|
};
|
|
5109
5352
|
break;
|
|
5110
5353
|
case 'new-checkpoints':
|
|
@@ -5127,8 +5370,13 @@
|
|
|
5127
5370
|
userObj.push(ele.employee_id);
|
|
5128
5371
|
});
|
|
5129
5372
|
this.responsibilityForm.reviewers.list = this.setList(this.reviewersList, userObj, 'employee_id');
|
|
5130
|
-
this.responsibilityForm.groupReviewers = {
|
|
5131
|
-
|
|
5373
|
+
this.responsibilityForm.groupReviewers = {
|
|
5374
|
+
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 : [],
|
|
5375
|
+
};
|
|
5376
|
+
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
5377
|
+
((_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
|
|
5378
|
+
? false
|
|
5379
|
+
: this.responsibilityForm.reviewers.sequentialWorkflow;
|
|
5132
5380
|
};
|
|
5133
5381
|
WorkflowComplianceComponent.prototype.saveOverseerData = function (selectedItems, type) {
|
|
5134
5382
|
var _a, _b;
|
|
@@ -5136,12 +5384,14 @@
|
|
|
5136
5384
|
case 'overseerList':
|
|
5137
5385
|
var overseerselectedlist = this.returnIds(selectedItems.users, 'employee_id');
|
|
5138
5386
|
this.responsibilityForm.overseers.list = this.setList(this.overseersList, overseerselectedlist, 'employee_id');
|
|
5139
|
-
this.responsibilityForm.overseersGroups['list'] =
|
|
5387
|
+
this.responsibilityForm.overseersGroups['list'] =
|
|
5388
|
+
((_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
5389
|
break;
|
|
5141
5390
|
case 'overseerNotifyList':
|
|
5142
5391
|
var overseerselectedNotifylist = this.returnIds(selectedItems.users, 'employee_id');
|
|
5143
5392
|
this.responsibilityForm.overseers.notifyList = this.setList(this.overseersList, overseerselectedNotifylist, 'employee_id');
|
|
5144
|
-
this.responsibilityForm.overseersGroups['notifyList'] =
|
|
5393
|
+
this.responsibilityForm.overseersGroups['notifyList'] =
|
|
5394
|
+
((_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
5395
|
break;
|
|
5146
5396
|
}
|
|
5147
5397
|
};
|
|
@@ -5151,59 +5401,95 @@
|
|
|
5151
5401
|
this.activeDeselector();
|
|
5152
5402
|
this.responsibilityForm.responsibility = {
|
|
5153
5403
|
name: event.report_name,
|
|
5154
|
-
keyResponsibility:
|
|
5404
|
+
keyResponsibility: event.key_compliance ? true : false,
|
|
5155
5405
|
};
|
|
5156
|
-
var newStartDate = event.start_date || event.start_date != null || event.start_date !== ''
|
|
5157
|
-
|
|
5406
|
+
var newStartDate = event.start_date || event.start_date != null || event.start_date !== ''
|
|
5407
|
+
? new Date(event.start_date * 1000)
|
|
5408
|
+
: new Date();
|
|
5409
|
+
var pvtTemplate = event.frequency_template && event.frequency_template !== ''
|
|
5410
|
+
? event.frequency_template
|
|
5411
|
+
: event.frequency;
|
|
5158
5412
|
var frequencyDetailsObject = this.frequencyService.shortHand_freqCal(pvtTemplate, newStartDate.getDate(), newStartDate.getMonth(), newStartDate.getFullYear());
|
|
5159
5413
|
this.responsibilityForm.frequency_details = frequencyDetailsObject === null || frequencyDetailsObject === void 0 ? void 0 : frequencyDetailsObject.pattern;
|
|
5160
5414
|
event.frequency_details = this.responsibilityForm.frequency_details;
|
|
5161
5415
|
event.frequency_time = '23:59:00';
|
|
5162
|
-
event.reminder_before_days = event.remind_days_before_due_date
|
|
5163
|
-
|
|
5164
|
-
|
|
5416
|
+
event.reminder_before_days = event.remind_days_before_due_date
|
|
5417
|
+
? event.remind_days_before_due_date
|
|
5418
|
+
: 2;
|
|
5419
|
+
event.failed_after_days = event.mark_failed_after
|
|
5420
|
+
? event.mark_failed_after
|
|
5421
|
+
: 2;
|
|
5165
5422
|
event.lifecycle_details = '0000-00-00~~0';
|
|
5166
5423
|
event.start_of_day_utc = this.frequencyService.frameworkStartDate(event);
|
|
5167
5424
|
event.on_completion_of = [];
|
|
5168
5425
|
event.dom_utc = new Date().getTime();
|
|
5169
|
-
event.continuous_failed_days =
|
|
5170
|
-
|
|
5426
|
+
event.continuous_failed_days =
|
|
5427
|
+
frequencyDetailsObject.continuous_failed_days;
|
|
5428
|
+
this.responsibilityForm.frequency =
|
|
5429
|
+
this.responsibilityForm.frequency_details;
|
|
5171
5430
|
this.responsibilityForm.frequency_time = '23:59:00';
|
|
5172
|
-
this.responsibilityForm.reminder_before_days =
|
|
5173
|
-
|
|
5174
|
-
this.responsibilityForm.failed_after_days = event.mark_failed_after
|
|
5431
|
+
this.responsibilityForm.reminder_before_days =
|
|
5432
|
+
event.remind_days_before_due_date ? event.remind_days_before_due_date : 2;
|
|
5433
|
+
this.responsibilityForm.failed_after_days = event.mark_failed_after
|
|
5434
|
+
? event.mark_failed_after
|
|
5435
|
+
: 2;
|
|
5175
5436
|
this.responsibilityForm.lifecycleDetails = '0000-00-00~~0';
|
|
5176
|
-
this.responsibilityForm.start_of_day_utc = this.frequencyService
|
|
5437
|
+
this.responsibilityForm.start_of_day_utc = this.frequencyService
|
|
5438
|
+
.frameworkStartDate(event)
|
|
5439
|
+
.toFixed()
|
|
5440
|
+
.toString();
|
|
5177
5441
|
this.responsibilityForm.on_completion_of = [];
|
|
5178
5442
|
this.responsibilityForm.dom_utc = new Date().getTime();
|
|
5179
|
-
this.responsibilityForm.description =
|
|
5180
|
-
|
|
5181
|
-
this.responsibilityForm.
|
|
5443
|
+
this.responsibilityForm.description =
|
|
5444
|
+
event.remarks.trim() != '' ? event.remarks : '';
|
|
5445
|
+
this.responsibilityForm.customTags =
|
|
5446
|
+
event.custom_tags &&
|
|
5447
|
+
event.custom_tags !== null &&
|
|
5448
|
+
event.custom_tags !== 'null' &&
|
|
5449
|
+
event.custom_tags !== ''
|
|
5450
|
+
? JSON.parse(event.custom_tags)
|
|
5451
|
+
: [];
|
|
5452
|
+
this.responsibilityForm.objective = event.control_objective
|
|
5453
|
+
? event.control_objective
|
|
5454
|
+
: '';
|
|
5182
5455
|
this.responsibilityForm.category = this.setList(this.allCategories, [event.category_id], 'category_id'); //
|
|
5183
5456
|
this.responsibilityForm.reviewers.reviewFrequency.reviewCompleteDays = 2;
|
|
5184
5457
|
this.responsibilityForm.reviewers.reviewFrequency.reviewNOtCompletedDays = 2;
|
|
5185
|
-
this.responsibilityForm.rc = this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; })
|
|
5458
|
+
this.responsibilityForm.rc = this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; })
|
|
5459
|
+
? [
|
|
5460
|
+
this.responsibilityCentersList.find(function (rc) { return rc.rc_id === event.entity_id; }),
|
|
5461
|
+
]
|
|
5462
|
+
: [];
|
|
5186
5463
|
this.responsibilityForm.riskClass = this.isRiskEnable ? 1 : 2;
|
|
5187
5464
|
this.responsibilityForm.private_library_id = event.report_id;
|
|
5188
|
-
this.responsibilityForm.frequency =
|
|
5465
|
+
this.responsibilityForm.frequency =
|
|
5466
|
+
this.responsibilityForm.frequency_details;
|
|
5189
5467
|
this.responsibilityForm.classification = this.isRiskEnable ? 1 : 2;
|
|
5190
|
-
this.responsibilityForm.continuous_failed_days =
|
|
5191
|
-
|
|
5468
|
+
this.responsibilityForm.continuous_failed_days =
|
|
5469
|
+
frequencyDetailsObject.continuous_failed_days;
|
|
5470
|
+
this.responsibilityForm.startDate =
|
|
5471
|
+
this.frequencyService.frameworkStartDate(event);
|
|
5192
5472
|
this.responsibilityForm.formatAndEvidence = {
|
|
5193
5473
|
evidenceRequired: event.report_upload_flag ? true : false,
|
|
5194
5474
|
formatFiles: event.report_format,
|
|
5195
|
-
formatLinks: !
|
|
5196
|
-
|
|
5475
|
+
formatLinks: !event.report_format_link || event.report_format_link == ''
|
|
5476
|
+
? []
|
|
5477
|
+
: [event.report_format_link],
|
|
5478
|
+
formatRequired: ((_a = event.report_format) === null || _a === void 0 ? void 0 : _a.length) > 0 ||
|
|
5479
|
+
(event.report_format_link && event.report_format_link != '')
|
|
5480
|
+
? true
|
|
5481
|
+
: false,
|
|
5197
5482
|
};
|
|
5198
5483
|
this.responsibilityForm.audit_category_details = {
|
|
5199
5484
|
category_id: 0,
|
|
5200
5485
|
sample: 5,
|
|
5201
5486
|
percentage: 30,
|
|
5202
5487
|
frequency_pattern: '1~0~3~1',
|
|
5203
|
-
frequency_time: '23:59:00'
|
|
5488
|
+
frequency_time: '23:59:00',
|
|
5204
5489
|
};
|
|
5205
5490
|
event.frequency_time = '11:59 pm';
|
|
5206
|
-
if (event.frequency_details !== '' &&
|
|
5491
|
+
if (event.frequency_details !== '' &&
|
|
5492
|
+
event.frequency_details !== '5~0~0~0') {
|
|
5207
5493
|
this.frequencyPopulation(event);
|
|
5208
5494
|
}
|
|
5209
5495
|
else {
|
|
@@ -5222,7 +5508,8 @@
|
|
|
5222
5508
|
checkedMoreOptions.push('CATEGORY');
|
|
5223
5509
|
this.moreOptions.CATEGORY = true;
|
|
5224
5510
|
}
|
|
5225
|
-
if (((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.formatAndEvidence) === null || _d === void 0 ? void 0 : _d.evidenceRequired) ||
|
|
5511
|
+
if (((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.formatAndEvidence) === null || _d === void 0 ? void 0 : _d.evidenceRequired) ||
|
|
5512
|
+
((_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.formatAndEvidence) === null || _f === void 0 ? void 0 : _f.formatRequired)) {
|
|
5226
5513
|
checkedMoreOptions.push('FORMATE_EVIDENCE');
|
|
5227
5514
|
this.moreOptions.FORMATE_EVIDENCE = true;
|
|
5228
5515
|
}
|
|
@@ -5230,11 +5517,13 @@
|
|
|
5230
5517
|
checkedMoreOptions.push('RC');
|
|
5231
5518
|
this.moreOptions.RC = true;
|
|
5232
5519
|
}
|
|
5520
|
+
console.log('dwcewdec ewfwe ===>', event, this.responsibilityForm);
|
|
5233
5521
|
this.populateOption.emit(checkedMoreOptions);
|
|
5234
5522
|
// event.placeholder
|
|
5235
5523
|
};
|
|
5236
5524
|
WorkflowComplianceComponent.prototype.assignFromFramework = function (freqObj) {
|
|
5237
5525
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5526
|
+
console.log('objec ===>', freqObj);
|
|
5238
5527
|
if (freqObj.data) {
|
|
5239
5528
|
// this.reset();
|
|
5240
5529
|
this.activeDeselector();
|
|
@@ -5249,7 +5538,8 @@
|
|
|
5249
5538
|
event.start_of_day_utc = Date.now() / 1000;
|
|
5250
5539
|
event.on_completion_of = [];
|
|
5251
5540
|
event.dom_utc = new Date().getTime();
|
|
5252
|
-
event.continuous_failed_days =
|
|
5541
|
+
event.continuous_failed_days =
|
|
5542
|
+
frequencyDetailsObject.continuous_failed_days;
|
|
5253
5543
|
this.getFrequencyPlaceholder(event);
|
|
5254
5544
|
event.placeholder = this.frequencyPlaceholder;
|
|
5255
5545
|
event.frequency_time = '11:59 pm';
|
|
@@ -5259,7 +5549,8 @@
|
|
|
5259
5549
|
this.responsibilityForm.frequency = (_c = frequencyDetailsObject === null || frequencyDetailsObject === void 0 ? void 0 : frequencyDetailsObject.pattern) !== null && _c !== void 0 ? _c : '';
|
|
5260
5550
|
this.responsibilityForm.startDate = event.start_of_day_utc;
|
|
5261
5551
|
this.responsibilityForm.reminder_before_days = event.reminder_before_days;
|
|
5262
|
-
this.responsibilityForm.continuous_failed_days =
|
|
5552
|
+
this.responsibilityForm.continuous_failed_days =
|
|
5553
|
+
event.continuous_failed_days;
|
|
5263
5554
|
this.responsibilityForm.failed_after_days = event.failed_after_days;
|
|
5264
5555
|
this.selectedFrameworkValues = (_d = freqObj.selectedFrameworkData) !== null && _d !== void 0 ? _d : undefined;
|
|
5265
5556
|
if ((_e = freqObj === null || freqObj === void 0 ? void 0 : freqObj.data) === null || _e === void 0 ? void 0 : _e.description) {
|
|
@@ -5313,11 +5604,17 @@
|
|
|
5313
5604
|
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
5605
|
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
5606
|
var reviewers = lodash.cloneDeep(this.responsibilityForm.reviewers.list);
|
|
5316
|
-
var groupReviewersList = this.featureFlag_groups
|
|
5607
|
+
var groupReviewersList = this.featureFlag_groups
|
|
5608
|
+
? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list)
|
|
5609
|
+
: [];
|
|
5317
5610
|
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
|
|
5611
|
+
var groupOverseerList = this.featureFlag_groups
|
|
5612
|
+
? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list)
|
|
5613
|
+
: [];
|
|
5319
5614
|
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
|
|
5615
|
+
var groupNotifyOverseers = this.featureFlag_groups
|
|
5616
|
+
? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList)
|
|
5617
|
+
: [];
|
|
5321
5618
|
assignors === null || assignors === void 0 ? void 0 : assignors.forEach(function (user) {
|
|
5322
5619
|
assignorAndAssigneesIds.push(user.member_id);
|
|
5323
5620
|
_this.assignorId.push(user.member_id);
|
|
@@ -5332,7 +5629,7 @@
|
|
|
5332
5629
|
this.assignorId.push(this.memberId);
|
|
5333
5630
|
}
|
|
5334
5631
|
allUsers === null || allUsers === void 0 ? void 0 : allUsers.forEach(function (user) {
|
|
5335
|
-
allUsersIds.push(
|
|
5632
|
+
allUsersIds.push(user === null || user === void 0 ? void 0 : user.my_member_id);
|
|
5336
5633
|
});
|
|
5337
5634
|
assigneeGroupList === null || assigneeGroupList === void 0 ? void 0 : assigneeGroupList.forEach(function (group) {
|
|
5338
5635
|
assigneeGroupIds.push(group === null || group === void 0 ? void 0 : group.group_id);
|
|
@@ -5372,29 +5669,39 @@
|
|
|
5372
5669
|
groupOverseerIds = __spreadArray([], __read(new Set(groupOverseerIds)));
|
|
5373
5670
|
this.assignorsList = behalfUsers.filter(function (user) { return !(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user.member_id)); });
|
|
5374
5671
|
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)) ||
|
|
5376
|
-
|
|
5672
|
+
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)) ||
|
|
5673
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
|
|
5674
|
+
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)) ||
|
|
5675
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
|
|
5377
5676
|
this.disableList(allUsers, assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds);
|
|
5378
5677
|
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)) ||
|
|
5678
|
+
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)) ||
|
|
5679
|
+
(groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5380
5680
|
this.reviewerMemberIdsList = this.assignUserMemberId(this.allUsersList);
|
|
5381
5681
|
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)) ||
|
|
5383
|
-
|
|
5682
|
+
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)) ||
|
|
5683
|
+
(assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5684
|
+
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)) ||
|
|
5685
|
+
(groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5384
5686
|
}
|
|
5385
5687
|
};
|
|
5386
5688
|
WorkflowComplianceComponent.prototype.disableList = function (allUsers, assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds) {
|
|
5387
|
-
var disableAssigneeList = allUsers.filter(function (user) { return (
|
|
5689
|
+
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)) ||
|
|
5690
|
+
(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5388
5691
|
this.disableAssigneeIds = this.returnIds(disableAssigneeList, 'my_member_id');
|
|
5389
5692
|
this.disableRadioAssignee = this.returnIds(disableAssigneeList, 'employee_id');
|
|
5390
|
-
var disableReviewerList = allUsers.filter(function (user) { return (
|
|
5693
|
+
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)) ||
|
|
5694
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5391
5695
|
this.disableReviewerIds = this.returnIds(disableReviewerList, 'employee_id');
|
|
5392
|
-
var disableOverseerList = allUsers.filter(function (user) { return (
|
|
5696
|
+
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)) ||
|
|
5697
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5393
5698
|
this.disableOverseerIds = this.returnIds(disableOverseerList, 'employee_id');
|
|
5394
5699
|
if (this.featureFlag_groups) {
|
|
5395
|
-
var disableReviewerList_1 = allUsers.filter(function (user) { return (
|
|
5700
|
+
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)) ||
|
|
5701
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5396
5702
|
this.disableReviewerIds = this.returnIds(disableReviewerList_1, 'member_id');
|
|
5397
|
-
var disableOverseersList = allUsers.filter(function (user) { return (
|
|
5703
|
+
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)) ||
|
|
5704
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5398
5705
|
this.disableOverseerIds = this.returnIds(disableOverseersList, 'member_id');
|
|
5399
5706
|
}
|
|
5400
5707
|
};
|
|
@@ -5416,13 +5723,21 @@
|
|
|
5416
5723
|
var allGroups = lodash.cloneDeep(this.OrgGroup);
|
|
5417
5724
|
var assignors = lodash.cloneDeep(this.responsibilityForm.assignors.list);
|
|
5418
5725
|
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
|
|
5726
|
+
var assigneeGroupList = this.featureFlag_groups
|
|
5727
|
+
? lodash.cloneDeep((_d = (_c = this.responsibilityForm) === null || _c === void 0 ? void 0 : _c.assigneeGroups) === null || _d === void 0 ? void 0 : _d.list)
|
|
5728
|
+
: [];
|
|
5420
5729
|
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
|
|
5730
|
+
var groupReviewersList = this.featureFlag_groups
|
|
5731
|
+
? lodash.cloneDeep((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.groupReviewers) === null || _h === void 0 ? void 0 : _h.list)
|
|
5732
|
+
: [];
|
|
5422
5733
|
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
|
|
5734
|
+
var groupOverseerList = this.featureFlag_groups
|
|
5735
|
+
? lodash.cloneDeep((_m = (_l = this.responsibilityForm) === null || _l === void 0 ? void 0 : _l.overseersGroups) === null || _m === void 0 ? void 0 : _m.list)
|
|
5736
|
+
: [];
|
|
5424
5737
|
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
|
|
5738
|
+
var groupNotifyOverseers = this.featureFlag_groups
|
|
5739
|
+
? lodash.cloneDeep((_r = (_q = this.responsibilityForm) === null || _q === void 0 ? void 0 : _q.overseersGroups) === null || _r === void 0 ? void 0 : _r.notifyList)
|
|
5740
|
+
: [];
|
|
5426
5741
|
assignors === null || assignors === void 0 ? void 0 : assignors.forEach(function (user) {
|
|
5427
5742
|
_this.assignorId.push(user === null || user === void 0 ? void 0 : user.member_id);
|
|
5428
5743
|
assignorAndAssigneesIds.push(user === null || user === void 0 ? void 0 : user.member_id);
|
|
@@ -5473,14 +5788,31 @@
|
|
|
5473
5788
|
this.overseerIds = __spreadArray([], __read(new Set(this.overseerIds)));
|
|
5474
5789
|
this.assignorsList = behalfUsers.filter(function (user) { return !(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user.member_id)); });
|
|
5475
5790
|
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)) ||
|
|
5477
|
-
|
|
5791
|
+
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)) ||
|
|
5792
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
|
|
5793
|
+
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)) ||
|
|
5794
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id))); });
|
|
5478
5795
|
if (this.featureFlag_groups) {
|
|
5479
|
-
this.groupAssigneeList =
|
|
5796
|
+
this.groupAssigneeList =
|
|
5797
|
+
this.selectedProgram &&
|
|
5798
|
+
((_z = (_y = this.selectedProgram) === null || _y === void 0 ? void 0 : _y.assignee_group_ids) === null || _z === void 0 ? void 0 : _z.length) > 0
|
|
5799
|
+
? this.programGroupList(allGroups, (_0 = this.selectedProgram) === null || _0 === void 0 ? void 0 : _0.assignee_group_ids)
|
|
5800
|
+
: allGroups.filter(function (group) { return !((groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
|
|
5801
|
+
(groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5480
5802
|
this.reviewerMemberIdsList = this.assignUserMemberId(this.programPeopleList.reviewersList);
|
|
5481
|
-
this.groupReviewerList =
|
|
5803
|
+
this.groupReviewerList =
|
|
5804
|
+
this.selectedProgram &&
|
|
5805
|
+
((_2 = (_1 = this.selectedProgram) === null || _1 === void 0 ? void 0 : _1.reviewer_group_ids) === null || _2 === void 0 ? void 0 : _2.length) > 0
|
|
5806
|
+
? this.programGroupList(allGroups, (_3 = this.selectedProgram) === null || _3 === void 0 ? void 0 : _3.reviewer_group_ids)
|
|
5807
|
+
: allGroups.filter(function (group) { return !((groupOverseerIds === null || groupOverseerIds === void 0 ? void 0 : groupOverseerIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
|
|
5808
|
+
(assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5482
5809
|
this.overseersList = this.assignUserMemberId(this.programPeopleList.overseersList);
|
|
5483
|
-
this.groupOverseerList =
|
|
5810
|
+
this.groupOverseerList =
|
|
5811
|
+
this.selectedProgram &&
|
|
5812
|
+
((_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
|
|
5813
|
+
? 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)
|
|
5814
|
+
: allGroups.filter(function (group) { return !((assigneeGroupIds === null || assigneeGroupIds === void 0 ? void 0 : assigneeGroupIds.includes(group === null || group === void 0 ? void 0 : group.group_id)) ||
|
|
5815
|
+
(groupReviewerIds === null || groupReviewerIds === void 0 ? void 0 : groupReviewerIds.includes(group === null || group === void 0 ? void 0 : group.group_id))); });
|
|
5484
5816
|
}
|
|
5485
5817
|
this.disableProgramList(assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds);
|
|
5486
5818
|
};
|
|
@@ -5494,23 +5826,28 @@
|
|
|
5494
5826
|
var assigneeProgram = [];
|
|
5495
5827
|
var groupIds = args[0];
|
|
5496
5828
|
if (this.selectedProgram && ((_a = this.selectedProgram) === null || _a === void 0 ? void 0 : _a.assignee_group_ids)) {
|
|
5497
|
-
assigneeProgram = allGroups.filter(function (group) { return
|
|
5829
|
+
assigneeProgram = allGroups.filter(function (group) { return groupIds.includes(group.group_id); });
|
|
5498
5830
|
}
|
|
5499
5831
|
return assigneeProgram;
|
|
5500
5832
|
};
|
|
5501
5833
|
WorkflowComplianceComponent.prototype.disableProgramList = function (assignorAndAssigneesIds, assigneeIds, reviewersIds, overseerIds) {
|
|
5502
5834
|
var _a, _b, _c;
|
|
5503
|
-
var disableAssigneeList = (_a = this.programPeopleList) === null || _a === void 0 ? void 0 : _a.assigneesList.filter(function (user) { return (
|
|
5835
|
+
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)) ||
|
|
5836
|
+
(overseerIds === null || overseerIds === void 0 ? void 0 : overseerIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5504
5837
|
this.disableAssigneeIds = this.returnIds(disableAssigneeList, 'my_member_id');
|
|
5505
5838
|
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 (
|
|
5839
|
+
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)) ||
|
|
5840
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5507
5841
|
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 (
|
|
5842
|
+
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)) ||
|
|
5843
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5509
5844
|
this.disableOverseerIds = this.returnIds(disableOverseerList, 'employee_id');
|
|
5510
5845
|
if (this.featureFlag_groups) {
|
|
5511
|
-
var disableReviewerList_2 = this.reviewerMemberIdsList.filter(function (user) { return (
|
|
5846
|
+
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)) ||
|
|
5847
|
+
(assigneeIds === null || assigneeIds === void 0 ? void 0 : assigneeIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5512
5848
|
this.disableReviewerIds = this.returnIds(disableReviewerList_2, 'member_id');
|
|
5513
|
-
var disableOverseerList_1 = this.overseersList.filter(function (user) { return (
|
|
5849
|
+
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)) ||
|
|
5850
|
+
(reviewersIds === null || reviewersIds === void 0 ? void 0 : reviewersIds.includes(user === null || user === void 0 ? void 0 : user.my_member_id)); });
|
|
5514
5851
|
this.disableOverseerIds = this.returnIds(disableOverseerList_1, 'member_id');
|
|
5515
5852
|
}
|
|
5516
5853
|
};
|
|
@@ -5545,24 +5882,42 @@
|
|
|
5545
5882
|
WorkflowComplianceComponent.prototype.validateResponsibility = function () {
|
|
5546
5883
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
5547
5884
|
this.submitted = true;
|
|
5548
|
-
if (this.responsibilityForm.assignors.enable &&
|
|
5549
|
-
this.
|
|
5885
|
+
if (this.responsibilityForm.assignors.enable &&
|
|
5886
|
+
((_a = this.responsibilityForm.assignors.list) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
5887
|
+
this.invalidType = 'whom';
|
|
5550
5888
|
return;
|
|
5551
5889
|
}
|
|
5552
|
-
if (!this.responsibilityForm.responsibility.name ||
|
|
5890
|
+
if (!this.responsibilityForm.responsibility.name ||
|
|
5891
|
+
this.responsibilityForm.responsibility.name.trim() == '') {
|
|
5553
5892
|
this.invalidType = 'what';
|
|
5554
5893
|
}
|
|
5555
|
-
else if (!((_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assignees) === null || _c === void 0 ? void 0 : _c.list) ||
|
|
5894
|
+
else if (!((_c = (_b = this.responsibilityForm) === null || _b === void 0 ? void 0 : _b.assignees) === null || _c === void 0 ? void 0 : _c.list) ||
|
|
5895
|
+
(((_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 &&
|
|
5896
|
+
(!this.featureFlag_groups ||
|
|
5897
|
+
((!((_h = (_g = this.responsibilityForm) === null || _g === void 0 ? void 0 : _g.assigneeGroups) === null || _h === void 0 ? void 0 : _h.list) ||
|
|
5898
|
+
((_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) &&
|
|
5899
|
+
this.featureFlag_groups)))) {
|
|
5556
5900
|
this.invalidType = 'who';
|
|
5557
5901
|
}
|
|
5558
|
-
else if (!this.responsibilityForm.frequency ||
|
|
5902
|
+
else if (!this.responsibilityForm.frequency ||
|
|
5903
|
+
this.responsibilityForm.frequency == '' ||
|
|
5904
|
+
this.responsibilityForm.frequency === '' ||
|
|
5905
|
+
this.responsibilityForm.frequency === '5~0~0~0') {
|
|
5559
5906
|
this.invalidType = 'when';
|
|
5560
5907
|
}
|
|
5561
5908
|
else {
|
|
5562
5909
|
this.invalidType = '';
|
|
5563
5910
|
}
|
|
5564
|
-
if (!this.responsibilityForm.responsibility.name ||
|
|
5565
|
-
|
|
5911
|
+
if (!this.responsibilityForm.responsibility.name ||
|
|
5912
|
+
this.responsibilityForm.responsibility.name.trim() == '' ||
|
|
5913
|
+
!this.responsibilityForm.frequency ||
|
|
5914
|
+
this.responsibilityForm.frequency === '' ||
|
|
5915
|
+
this.responsibilityForm.frequency === '5~0~0~0' ||
|
|
5916
|
+
(((_m = this.responsibilityForm.assignees.list) === null || _m === void 0 ? void 0 : _m.length) == 0 &&
|
|
5917
|
+
(!this.featureFlag_groups ||
|
|
5918
|
+
((!this.responsibilityForm.assigneeGroups.list ||
|
|
5919
|
+
((_o = this.responsibilityForm.assigneeGroups.list) === null || _o === void 0 ? void 0 : _o.length) == 0) &&
|
|
5920
|
+
this.featureFlag_groups)))) {
|
|
5566
5921
|
return false;
|
|
5567
5922
|
}
|
|
5568
5923
|
else {
|
|
@@ -5574,22 +5929,26 @@
|
|
|
5574
5929
|
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
5930
|
this.loader = true;
|
|
5576
5931
|
this.uiKitService.isLoader = true;
|
|
5577
|
-
var startDate = moment__namespace(parseInt(entrustForm.startDate) * 1000).format(
|
|
5578
|
-
startDate = moment__namespace(startDate.split(' ')[0] +
|
|
5579
|
-
var rcDetails = ((_a = entrustForm.rc) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5932
|
+
var startDate = moment__namespace(parseInt(entrustForm.startDate) * 1000).format('YYYY-MM-DD HH:mm:ss');
|
|
5933
|
+
startDate = moment__namespace(startDate.split(' ')[0] + ' 00:00:00').format('YYYY-MM-DD HH:mm:ss');
|
|
5934
|
+
var rcDetails = ((_a = entrustForm.rc) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
5935
|
+
? entrustForm.rc.map(function (rc) {
|
|
5936
|
+
if (rc) {
|
|
5937
|
+
var rcDetailsArr = {
|
|
5938
|
+
parent_rc_ids: rc.parent_rc_ids,
|
|
5939
|
+
rc_id: rc.rc_id,
|
|
5940
|
+
};
|
|
5941
|
+
return rcDetailsArr;
|
|
5942
|
+
}
|
|
5943
|
+
})
|
|
5944
|
+
: [];
|
|
5945
|
+
var rcDetailsIdArr = ((_b = entrustForm.rc) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
5946
|
+
? entrustForm.rc.map(function (rc) {
|
|
5947
|
+
if (rc) {
|
|
5948
|
+
return rc.rc_id;
|
|
5949
|
+
}
|
|
5950
|
+
})
|
|
5951
|
+
: [];
|
|
5593
5952
|
var moreOptions = this.moreOptions;
|
|
5594
5953
|
var checkContinuousFailedValue = function (details) {
|
|
5595
5954
|
var frequencyType = parseInt(details.split('~')[0]);
|
|
@@ -5611,7 +5970,7 @@
|
|
|
5611
5970
|
subProgramIds: (_c = ele === null || ele === void 0 ? void 0 : ele.child_id) === null || _c === void 0 ? void 0 : _c.filter(function (el) {
|
|
5612
5971
|
var _a;
|
|
5613
5972
|
return (_a = _this.responsibilityForm.category) === null || _a === void 0 ? void 0 : _a.includes(el);
|
|
5614
|
-
})
|
|
5973
|
+
}),
|
|
5615
5974
|
};
|
|
5616
5975
|
linkedProgramIds === null || linkedProgramIds === void 0 ? void 0 : linkedProgramIds.push(program);
|
|
5617
5976
|
linkedCategoryIds === null || linkedCategoryIds === void 0 ? void 0 : linkedCategoryIds.push(ele === null || ele === void 0 ? void 0 : ele.category_id);
|
|
@@ -5620,49 +5979,81 @@
|
|
|
5620
5979
|
var categoryIdsExceptDefault = [];
|
|
5621
5980
|
categoryIdsExceptDefault = (_f = (_e = this.responsibilityForm) === null || _e === void 0 ? void 0 : _e.category) === null || _f === void 0 ? void 0 : _f.filter(function (el) {
|
|
5622
5981
|
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) &&
|
|
5982
|
+
return (el !== ((_b = (_a = _this.responsibilityForm) === null || _a === void 0 ? void 0 : _a.program[0]) === null || _b === void 0 ? void 0 : _b.category_id) &&
|
|
5983
|
+
!((_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
5984
|
});
|
|
5625
|
-
this.combineUserAndUserGroupMembers(
|
|
5626
|
-
|
|
5627
|
-
|
|
5985
|
+
this.combineUserAndUserGroupMembers(this.mode === 'EDIT' &&
|
|
5986
|
+
this.responsibilityForm.assignees.whoCanComplete === 'ALL' &&
|
|
5987
|
+
((_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));
|
|
5988
|
+
var remarks = entrustForm.description.replace(/\ /g, '').trim() !== ''
|
|
5989
|
+
? entrustForm.description
|
|
5990
|
+
: '';
|
|
5991
|
+
var objective = entrustForm.objective.replace(/\ /g, '').trim() !== ''
|
|
5992
|
+
? entrustForm.objective
|
|
5993
|
+
: '';
|
|
5628
5994
|
var payload = {
|
|
5629
5995
|
app_association: [],
|
|
5630
5996
|
assigned_to: this.returnIds(this.assigneeUserList, 'employee_id').toString(),
|
|
5631
|
-
program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM)
|
|
5997
|
+
program_cat_ids: (moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.PROGRAM)
|
|
5998
|
+
? ((_k = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program) === null || _k === void 0 ? void 0 : _k.length)
|
|
5999
|
+
? [(_l = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.program[0]) === null || _l === void 0 ? void 0 : _l.category_id]
|
|
6000
|
+
: []
|
|
6001
|
+
: [],
|
|
5632
6002
|
linked_program_ids: linkedProgramIds,
|
|
5633
6003
|
linked_category_ids: this.getUniqueIds(__spreadArray(__spreadArray([], __read(categoryIdsExceptDefault)), __read(linkedCategoryIds))),
|
|
5634
6004
|
// category_id: (this.responsibilityForm?.program_selected_ids?.length > 0) ? this.responsibilityForm?.category_id : '',
|
|
5635
|
-
category_id: ((
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
6005
|
+
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
|
|
6006
|
+
? (_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()
|
|
6007
|
+
: '',
|
|
6008
|
+
cc_email: moreOptions.OVERSEER
|
|
6009
|
+
? this.returnIds(this.overseerUserList, 'employee_id').toString()
|
|
6010
|
+
: '',
|
|
6011
|
+
checkpoint_description: moreOptions.CHECKPOINTS
|
|
6012
|
+
? entrustForm.checkpointInstruction
|
|
6013
|
+
: '',
|
|
6014
|
+
checkpoint_details: moreOptions.CHECKPOINTS
|
|
6015
|
+
? JSON.stringify(this.responsibilityForm.checkpoints)
|
|
6016
|
+
: '',
|
|
5639
6017
|
checkpoint_flag: 0,
|
|
5640
6018
|
collaborator_mark_done: 0,
|
|
5641
6019
|
comment: '',
|
|
5642
|
-
continuous_failed_days: checkContinuousFailedValue(entrustForm.frequency)
|
|
6020
|
+
continuous_failed_days: checkContinuousFailedValue(entrustForm.frequency)
|
|
6021
|
+
? entrustForm.continuous_failed_days
|
|
6022
|
+
: 0,
|
|
5643
6023
|
cost_of_compliance: '',
|
|
5644
6024
|
created_by: ((_s = entrustForm.assignors.list) === null || _s === void 0 ? void 0 : _s.length) < 1 ? 0 : this.memberId,
|
|
5645
6025
|
creation_window: 0,
|
|
5646
6026
|
custom_tags: JSON.stringify(entrustForm.customTags),
|
|
5647
|
-
entity_tree:
|
|
6027
|
+
entity_tree: moreOptions.RC
|
|
6028
|
+
? this.isResponsibilityRcLinkEnabled &&
|
|
6029
|
+
this.responsibilityCenterType == 1
|
|
6030
|
+
? []
|
|
6031
|
+
: rcDetails
|
|
6032
|
+
: [],
|
|
5648
6033
|
entrust_from_risk: this.openedFrom === 'RISK_TREATMENT' ? true : false,
|
|
5649
6034
|
failed_after_days: entrustForm.failed_after_days,
|
|
5650
6035
|
failed_time_utc: entrustForm.failed_time_utc,
|
|
5651
|
-
failure_cc_email:
|
|
6036
|
+
failure_cc_email: moreOptions.OVERSEER
|
|
6037
|
+
? this.returnIds(this.overseerUserNotifyList, 'employee_id').toString()
|
|
6038
|
+
: '',
|
|
5652
6039
|
frequency_details: entrustForm.frequency,
|
|
5653
|
-
frequency_time: (_t = entrustForm.timeIn24Hr) !== null && _t !== void 0 ? _t :
|
|
6040
|
+
frequency_time: (_t = entrustForm.timeIn24Hr) !== null && _t !== void 0 ? _t : '23:59:00',
|
|
5654
6041
|
grc_object_id: 0,
|
|
5655
6042
|
grc_relationship: '',
|
|
5656
6043
|
if_testplan_failed: 0,
|
|
5657
6044
|
impact: '',
|
|
5658
|
-
isGroupAssignTo:
|
|
6045
|
+
isGroupAssignTo: entrustForm.assignees.whoCanComplete == 'ANY_ONE' ? 1 : 0,
|
|
5659
6046
|
is_key_compliance: entrustForm.responsibility.keyResponsibility ? 1 : 0,
|
|
5660
6047
|
library_report_id: 0,
|
|
5661
6048
|
lifecycle_details: (_u = entrustForm.lifecycleDetails) !== null && _u !== void 0 ? _u : '0000-00-00~~0',
|
|
5662
|
-
link_for_details:
|
|
6049
|
+
link_for_details: moreOptions.FORMATE_EVIDENCE
|
|
6050
|
+
? entrustForm.formatAndEvidence.formatLinks
|
|
6051
|
+
: [],
|
|
5663
6052
|
linkages: { compliance: [] },
|
|
5664
|
-
member_id: ((_v = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _v === void 0 ? void 0 : _v.length) > 0
|
|
5665
|
-
|
|
6053
|
+
member_id: ((_v = this.returnIds(entrustForm.assignors.list, 'member_id')) === null || _v === void 0 ? void 0 : _v.length) > 0
|
|
6054
|
+
? this.returnIds(entrustForm.assignors.list, 'member_id')[0]
|
|
6055
|
+
: this.memberId,
|
|
6056
|
+
objective: moreOptions.OBJECTIVE ? objective : '',
|
|
5666
6057
|
on_completion_of: entrustForm.reportId ? [entrustForm.reportId] : [],
|
|
5667
6058
|
on_completion_of_type: 1,
|
|
5668
6059
|
organisation_id: this.organizationId,
|
|
@@ -5672,66 +6063,126 @@
|
|
|
5672
6063
|
private_library_id: 0,
|
|
5673
6064
|
remarks: remarks,
|
|
5674
6065
|
reminder_before_days: entrustForm.reminder_before_days,
|
|
5675
|
-
report_format:
|
|
6066
|
+
report_format: moreOptions.FORMATE_EVIDENCE
|
|
6067
|
+
? entrustForm.formatAndEvidence.formatFiles
|
|
6068
|
+
: [],
|
|
5676
6069
|
report_format_link: '',
|
|
5677
6070
|
report_name: entrustForm.responsibility.name,
|
|
5678
|
-
report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
6071
|
+
report_upload_flag: entrustForm.formatAndEvidence.evidenceRequired
|
|
6072
|
+
? 1
|
|
6073
|
+
: 0,
|
|
6074
|
+
review_after_days: moreOptions.REVIEWER
|
|
6075
|
+
? entrustForm.reviewers.reviewFrequency.reviewCompleteDays === ''
|
|
6076
|
+
? 0
|
|
6077
|
+
: Number(entrustForm.reviewers.reviewFrequency.reviewCompleteDays)
|
|
6078
|
+
: 0,
|
|
6079
|
+
review_failed_after_days: moreOptions.REVIEWER
|
|
6080
|
+
? entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays === ''
|
|
6081
|
+
? 0
|
|
6082
|
+
: Number(entrustForm.reviewers.reviewFrequency.reviewNOtCompletedDays)
|
|
6083
|
+
: 0,
|
|
6084
|
+
reviewer_arr: moreOptions.REVIEWER
|
|
6085
|
+
? {
|
|
6086
|
+
level1: {
|
|
6087
|
+
reviewers: this.setReviewerPayload(this.reviewerUserList, 'list', entrustForm.reviewers.acceptedData, entrustForm.reviewers.sequentialWorkflow
|
|
6088
|
+
? 'SEQUENTIAL'
|
|
6089
|
+
: 'ANYONE'),
|
|
6090
|
+
type: entrustForm.reviewers.sequentialWorkflow
|
|
6091
|
+
? 'SEQUENTIAL'
|
|
6092
|
+
: 'ANYONE',
|
|
6093
|
+
},
|
|
6094
|
+
}
|
|
6095
|
+
: {},
|
|
5687
6096
|
userGroupIds: {
|
|
5688
|
-
assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
|
|
5689
|
-
|
|
6097
|
+
assigneeAllGroupIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
|
|
6098
|
+
? this.returnIds((_w = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _w === void 0 ? void 0 : _w.list, 'group_id')
|
|
6099
|
+
: [],
|
|
6100
|
+
assigneeAnyoneGroupIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE'
|
|
6101
|
+
? this.returnIds((_x = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assigneeGroups) === null || _x === void 0 ? void 0 : _x.list, 'group_id')
|
|
6102
|
+
: [],
|
|
5690
6103
|
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
6104
|
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 : []
|
|
6105
|
+
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
6106
|
},
|
|
5694
6107
|
existingUserIds: {
|
|
5695
|
-
assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
|
|
5696
|
-
|
|
6108
|
+
assigneeAllIds: entrustForm.assignees.whoCanComplete !== 'ANY_ONE'
|
|
6109
|
+
? this.returnIds((_7 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _7 === void 0 ? void 0 : _7.list, 'my_member_id')
|
|
6110
|
+
: [],
|
|
6111
|
+
assigneeAnyoneIds: entrustForm.assignees.whoCanComplete === 'ANY_ONE'
|
|
6112
|
+
? this.returnIds((_8 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assignees) === null || _8 === void 0 ? void 0 : _8.list, 'my_member_id')
|
|
6113
|
+
: [],
|
|
5697
6114
|
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
6115
|
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 : []
|
|
6116
|
+
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
6117
|
},
|
|
5701
6118
|
reviewer_checkpoints: [{ checkpoints: [], instruction: '' }],
|
|
5702
6119
|
reviewer_id: 0,
|
|
5703
6120
|
risk_class: this.isRiskEnable ? entrustForm.riskClass : 2,
|
|
5704
6121
|
risk_ids: '',
|
|
5705
|
-
risk_matrix_data:
|
|
6122
|
+
risk_matrix_data: moreOptions.RISK_CLASSIFICATION
|
|
6123
|
+
? entrustForm.riskMatrix
|
|
6124
|
+
: '0,0,0,0,0,0',
|
|
5706
6125
|
sample_size: 0,
|
|
5707
6126
|
start_date_utc: startDate,
|
|
5708
6127
|
statutory_day: 0,
|
|
5709
|
-
test_required_flag:
|
|
5710
|
-
|
|
6128
|
+
test_required_flag: moreOptions.ASSURANCE
|
|
6129
|
+
? ((_16 = entrustForm.assuranceList) === null || _16 === void 0 ? void 0 : _16.length) > 0
|
|
6130
|
+
? 1
|
|
6131
|
+
: 0
|
|
6132
|
+
: 0,
|
|
6133
|
+
testplan_category_id: moreOptions.ASSURANCE
|
|
6134
|
+
? this.returnIds(entrustForm.assuranceList, 'category_id')
|
|
6135
|
+
: [],
|
|
5711
6136
|
testplan_category_manager: '',
|
|
5712
|
-
audit_category_details: moreOptions.REQUIRES_AUDIT &&
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
6137
|
+
audit_category_details: moreOptions.REQUIRES_AUDIT &&
|
|
6138
|
+
((_18 = (_17 = this.responsibilityForm) === null || _17 === void 0 ? void 0 : _17.audit_category_details) === null || _18 === void 0 ? void 0 : _18.category_id)
|
|
6139
|
+
? {
|
|
6140
|
+
category_id: this.responsibilityForm.audit_category_details.category_id,
|
|
6141
|
+
sample: this.selectedSample === 0 ? this.sampleValue : 0,
|
|
6142
|
+
percentage: this.selectedSample === 1 ? this.samplePercentage : 0,
|
|
6143
|
+
frequency_pattern: "1~0~" + this.sendAuditRemindersValue + "~1",
|
|
6144
|
+
frequency_time: moment__namespace(this.auditTime, 'HH:mm a').format('HH:mm:ss'),
|
|
6145
|
+
}
|
|
6146
|
+
: {
|
|
6147
|
+
category_id: 0,
|
|
6148
|
+
sample: 0,
|
|
6149
|
+
percentage: 0,
|
|
6150
|
+
frequency_pattern: "",
|
|
6151
|
+
frequency_time: '',
|
|
6152
|
+
},
|
|
5725
6153
|
assessment: {
|
|
5726
|
-
category_id: moreOptions.ASSESSMENT
|
|
5727
|
-
|
|
6154
|
+
category_id: moreOptions.ASSESSMENT
|
|
6155
|
+
? (_19 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _19 === void 0 ? void 0 : _19.category_id
|
|
6156
|
+
: '',
|
|
6157
|
+
assessment_id: moreOptions.ASSESSMENT
|
|
6158
|
+
? (_20 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _20 === void 0 ? void 0 : _20.assessment_id
|
|
6159
|
+
: '',
|
|
5728
6160
|
},
|
|
5729
|
-
assessment_checkpoint: moreOptions.CHECKPOINTS_NEW
|
|
5730
|
-
|
|
6161
|
+
assessment_checkpoint: moreOptions.CHECKPOINTS_NEW
|
|
6162
|
+
? ((_21 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _21 === void 0 ? void 0 : _21.length) > 0
|
|
6163
|
+
? entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints
|
|
6164
|
+
: {}
|
|
6165
|
+
: {},
|
|
6166
|
+
questionnaire_type: moreOptions.CHECKPOINTS_NEW
|
|
6167
|
+
? ((_22 = Object.keys(entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.new_checkpoints)) === null || _22 === void 0 ? void 0 : _22.length) > 0
|
|
6168
|
+
? 'assessment_checkpoint'
|
|
6169
|
+
: moreOptions.ASSESSMENT && ((_23 = entrustForm === null || entrustForm === void 0 ? void 0 : entrustForm.assessment) === null || _23 === void 0 ? void 0 : _23.category_id)
|
|
6170
|
+
? 'assessment'
|
|
6171
|
+
: JSON.stringify(this.responsibilityForm.checkpoints) != '' &&
|
|
6172
|
+
moreOptions.CHECKPOINTS
|
|
6173
|
+
? 'checkpoint'
|
|
6174
|
+
: ''
|
|
6175
|
+
: '',
|
|
5731
6176
|
};
|
|
5732
6177
|
if (this.isResponsibilityRcLinkEnabled) {
|
|
5733
|
-
payload['responsibilityCenterType'] =
|
|
5734
|
-
|
|
6178
|
+
payload['responsibilityCenterType'] =
|
|
6179
|
+
this.isResponsibilityRcLinkEnabled && moreOptions.RC
|
|
6180
|
+
? this.responsibilityCenterType
|
|
6181
|
+
: 0;
|
|
6182
|
+
payload['responsibilityCenterArr'] =
|
|
6183
|
+
this.isResponsibilityRcLinkEnabled && moreOptions.RC
|
|
6184
|
+
? rcDetailsIdArr
|
|
6185
|
+
: [];
|
|
5735
6186
|
}
|
|
5736
6187
|
this.responsibilityPayload = payload;
|
|
5737
6188
|
if (this.mode == 'CREATE' && !this.isDuplicateEntrust) {
|
|
@@ -5745,11 +6196,12 @@
|
|
|
5745
6196
|
_this.smileyMessage = "You have entrusted " + res.calculate_no_of_responsibiities + " responsibilities. These would be reflected within your account in sometime.";
|
|
5746
6197
|
}
|
|
5747
6198
|
if (_this.isNotificationPending && payload.created_by == 0) {
|
|
5748
|
-
_this.smileyMessage =
|
|
6199
|
+
_this.smileyMessage =
|
|
6200
|
+
'This responsibility has been added to the notification queue.';
|
|
5749
6201
|
}
|
|
5750
6202
|
else {
|
|
5751
6203
|
if (payload.created_by > 0) {
|
|
5752
|
-
_this.actionButtons[1].buttonText =
|
|
6204
|
+
_this.actionButtons[1].buttonText = 'View Responsibilities';
|
|
5753
6205
|
_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
6206
|
}
|
|
5755
6207
|
}
|
|
@@ -5763,7 +6215,9 @@
|
|
|
5763
6215
|
}
|
|
5764
6216
|
if (this.mode == 'EDIT' || this.isDuplicateEntrust) {
|
|
5765
6217
|
this.smileyMessage = "The responsibility has been modified.";
|
|
5766
|
-
this.responsibilityService
|
|
6218
|
+
this.responsibilityService
|
|
6219
|
+
.updateEntrust(payload, this.responsibilityId, true)
|
|
6220
|
+
.subscribe(function (res) {
|
|
5767
6221
|
_this.responsibilityData = res;
|
|
5768
6222
|
_this.loader = false;
|
|
5769
6223
|
_this.uiKitService.isLoader = false;
|
|
@@ -5788,8 +6242,10 @@
|
|
|
5788
6242
|
WorkflowComplianceComponent.prototype.combineUserAndUserGroupMembers = function (isGroup) {
|
|
5789
6243
|
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
6244
|
if (this.featureFlag_groups) {
|
|
5791
|
-
console.log(
|
|
5792
|
-
this.assigneeUserList = isGroup
|
|
6245
|
+
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);
|
|
6246
|
+
this.assigneeUserList = isGroup
|
|
6247
|
+
? [{ employee_id: (_c = this.rawResponsibility) === null || _c === void 0 ? void 0 : _c.assigned_to }]
|
|
6248
|
+
: 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
6249
|
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
6250
|
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
6251
|
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 +6254,8 @@
|
|
|
5798
6254
|
this.assigneeUserList = (_w = (_v = this.responsibilityForm) === null || _v === void 0 ? void 0 : _v.assignees) === null || _w === void 0 ? void 0 : _w.list;
|
|
5799
6255
|
this.reviewerUserList = (_y = (_x = this.responsibilityForm) === null || _x === void 0 ? void 0 : _x.reviewers) === null || _y === void 0 ? void 0 : _y.list;
|
|
5800
6256
|
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 =
|
|
6257
|
+
this.overseerUserNotifyList =
|
|
6258
|
+
(_2 = (_1 = this.responsibilityForm) === null || _1 === void 0 ? void 0 : _1.overseers) === null || _2 === void 0 ? void 0 : _2.notifyList;
|
|
5802
6259
|
}
|
|
5803
6260
|
};
|
|
5804
6261
|
/**
|
|
@@ -5811,7 +6268,7 @@
|
|
|
5811
6268
|
this.responsibilityForm = {
|
|
5812
6269
|
assignors: {
|
|
5813
6270
|
enable: false,
|
|
5814
|
-
list: []
|
|
6271
|
+
list: [],
|
|
5815
6272
|
},
|
|
5816
6273
|
responsibility: {
|
|
5817
6274
|
name: '',
|
|
@@ -5819,11 +6276,11 @@
|
|
|
5819
6276
|
},
|
|
5820
6277
|
assigneeGroups: {
|
|
5821
6278
|
whoCanComplete: 'ALL',
|
|
5822
|
-
list: []
|
|
6279
|
+
list: [],
|
|
5823
6280
|
},
|
|
5824
6281
|
assignees: {
|
|
5825
6282
|
whoCanComplete: 'ALL',
|
|
5826
|
-
list: []
|
|
6283
|
+
list: [],
|
|
5827
6284
|
},
|
|
5828
6285
|
frequency: '',
|
|
5829
6286
|
description: '',
|
|
@@ -5837,25 +6294,25 @@
|
|
|
5837
6294
|
sequentialWorkflow: true,
|
|
5838
6295
|
reviewFrequency: {
|
|
5839
6296
|
reviewCompleteDays: 2,
|
|
5840
|
-
reviewNOtCompletedDays: 2
|
|
6297
|
+
reviewNOtCompletedDays: 2,
|
|
5841
6298
|
},
|
|
5842
|
-
list: []
|
|
6299
|
+
list: [],
|
|
5843
6300
|
},
|
|
5844
6301
|
groupReviewers: {
|
|
5845
6302
|
sequentialWorkflow: true,
|
|
5846
6303
|
reviewFrequency: {
|
|
5847
6304
|
reviewCompleteDays: 2,
|
|
5848
|
-
reviewNOtCompletedDays: 2
|
|
6305
|
+
reviewNOtCompletedDays: 2,
|
|
5849
6306
|
},
|
|
5850
|
-
list: []
|
|
6307
|
+
list: [],
|
|
5851
6308
|
},
|
|
5852
6309
|
overseers: {
|
|
5853
6310
|
notifyList: [],
|
|
5854
|
-
list: []
|
|
6311
|
+
list: [],
|
|
5855
6312
|
},
|
|
5856
6313
|
overseersGroups: {
|
|
5857
6314
|
notifyList: [],
|
|
5858
|
-
list: []
|
|
6315
|
+
list: [],
|
|
5859
6316
|
},
|
|
5860
6317
|
formatAndEvidence: {
|
|
5861
6318
|
formatRequired: false,
|
|
@@ -5868,7 +6325,7 @@
|
|
|
5868
6325
|
riskClass: 1,
|
|
5869
6326
|
riskMatrix: '0,0,0,0,0,0',
|
|
5870
6327
|
program: [],
|
|
5871
|
-
program_selected_ids: []
|
|
6328
|
+
program_selected_ids: [],
|
|
5872
6329
|
};
|
|
5873
6330
|
this.moreOptions = {
|
|
5874
6331
|
OBJECTIVE: false,
|
|
@@ -5897,7 +6354,7 @@
|
|
|
5897
6354
|
time: '11:59 pm',
|
|
5898
6355
|
failedTime: '',
|
|
5899
6356
|
continuous_failed_days: 0,
|
|
5900
|
-
onCompletionReportDetails: {}
|
|
6357
|
+
onCompletionReportDetails: {},
|
|
5901
6358
|
};
|
|
5902
6359
|
this.sampleValue = undefined;
|
|
5903
6360
|
this.samplePercentage = undefined;
|
|
@@ -5926,12 +6383,14 @@
|
|
|
5926
6383
|
var url;
|
|
5927
6384
|
var urlSubstring = '';
|
|
5928
6385
|
this.disconnectRefresh.emit(false);
|
|
5929
|
-
if (this.isNotificationPending &&
|
|
6386
|
+
if (this.isNotificationPending &&
|
|
6387
|
+
this.responsibilityPayload.created_by == 0) {
|
|
5930
6388
|
if (this.isResponsibilitySimplified) {
|
|
5931
6389
|
urlSubstring = 'compliance/manage-responsibility?' + this.url;
|
|
5932
6390
|
}
|
|
5933
6391
|
else {
|
|
5934
|
-
urlSubstring =
|
|
6392
|
+
urlSubstring =
|
|
6393
|
+
'compliance/manage-responsibilities/responsibilities-queue';
|
|
5935
6394
|
}
|
|
5936
6395
|
}
|
|
5937
6396
|
else {
|
|
@@ -5983,7 +6442,7 @@
|
|
|
5983
6442
|
continuous_failed_days: event.continuous_failed_days,
|
|
5984
6443
|
startDate: Number(event === null || event === void 0 ? void 0 : event.start_of_day_utc),
|
|
5985
6444
|
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')
|
|
6445
|
+
timeIn12hr: this.frequencyService.timeIn12(event.frequency_time != '' ? event.frequency_time : '23:59:00'),
|
|
5987
6446
|
};
|
|
5988
6447
|
var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
|
|
5989
6448
|
if (onCompletionReportDetails != null) {
|
|
@@ -6001,11 +6460,13 @@
|
|
|
6001
6460
|
this.frequencyDetails.startDate = event === null || event === void 0 ? void 0 : event.start_of_day_utc;
|
|
6002
6461
|
this.frequencyDetails.selectedReport = (_a = event === null || event === void 0 ? void 0 : event.on_completion_of[0]) !== null && _a !== void 0 ? _a : 0;
|
|
6003
6462
|
this.frequencyDetails.dateOfModified = event === null || event === void 0 ? void 0 : event.dom_utc;
|
|
6004
|
-
this.frequencyDetails.continuous_failed_days =
|
|
6463
|
+
this.frequencyDetails.continuous_failed_days =
|
|
6464
|
+
event === null || event === void 0 ? void 0 : event.continuous_failed_days;
|
|
6005
6465
|
this.frequencyPlaceholder = event === null || event === void 0 ? void 0 : event.placeholder;
|
|
6006
6466
|
var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
|
|
6007
6467
|
if (onCompletionReportDetails != null) {
|
|
6008
|
-
this.frequencyDetails.onCompletionReportDetails =
|
|
6468
|
+
this.frequencyDetails.onCompletionReportDetails =
|
|
6469
|
+
onCompletionReportDetails;
|
|
6009
6470
|
}
|
|
6010
6471
|
};
|
|
6011
6472
|
WorkflowComplianceComponent.prototype.frequencyData = function (event) {
|
|
@@ -6014,7 +6475,8 @@
|
|
|
6014
6475
|
this.invalidType = '';
|
|
6015
6476
|
}
|
|
6016
6477
|
this.responsibilityForm.frequency = event.pattern;
|
|
6017
|
-
this.responsibilityForm.reminder_before_days =
|
|
6478
|
+
this.responsibilityForm.reminder_before_days =
|
|
6479
|
+
event.case === 'daily' ? 0 : event.window;
|
|
6018
6480
|
//this.responsibilityForm.reminder_before_days = event.window;
|
|
6019
6481
|
this.responsibilityForm.failed_after_days = event.failedAfter;
|
|
6020
6482
|
this.responsibilityForm.failed_time_utc = event.failed_time_utc;
|
|
@@ -6022,7 +6484,8 @@
|
|
|
6022
6484
|
this.responsibilityForm.reportId = (_a = event.reportId) !== null && _a !== void 0 ? _a : 0;
|
|
6023
6485
|
this.responsibilityForm.startDate = event.startFrom;
|
|
6024
6486
|
this.responsibilityForm.timeIn24Hr = event.timeIn24Hr;
|
|
6025
|
-
this.responsibilityForm.continuous_failed_days =
|
|
6487
|
+
this.responsibilityForm.continuous_failed_days =
|
|
6488
|
+
event.continuous_failed_days;
|
|
6026
6489
|
this.activateSelector('frequency', false);
|
|
6027
6490
|
var payload = {
|
|
6028
6491
|
frequency_details: event.pattern,
|
|
@@ -6034,7 +6497,7 @@
|
|
|
6034
6497
|
on_completion_of: [event.reportId],
|
|
6035
6498
|
dom_utc: Math.floor(Date.now() / 1000),
|
|
6036
6499
|
continuous_failed_days: event.continuous_failed_days,
|
|
6037
|
-
placeholder: event.placeholder
|
|
6500
|
+
placeholder: event.placeholder,
|
|
6038
6501
|
};
|
|
6039
6502
|
event.frequency_details = event.pattern;
|
|
6040
6503
|
var onCompletionReportDetails = this.getOnCompletionReportDetails(event);
|
|
@@ -6060,7 +6523,9 @@
|
|
|
6060
6523
|
try {
|
|
6061
6524
|
if (res.frequency_details) {
|
|
6062
6525
|
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'
|
|
6526
|
+
var frequencyTime = (res === null || res === void 0 ? void 0 : res.frequency_time) === '00:00:00'
|
|
6527
|
+
? '12:00 am'
|
|
6528
|
+
: this.frequencyService.timeIn12(res === null || res === void 0 ? void 0 : res.frequency_time);
|
|
6064
6529
|
switch (parseInt(frequencyDetails[0])) {
|
|
6065
6530
|
case 1:
|
|
6066
6531
|
this.getDailyPlaceholder(frequencyDetails, frequencyTime);
|
|
@@ -6082,10 +6547,22 @@
|
|
|
6082
6547
|
break;
|
|
6083
6548
|
case 0:
|
|
6084
6549
|
{
|
|
6085
|
-
var dateObject = new Date(moment__namespace(frequencyDetails[1] +
|
|
6550
|
+
var dateObject = new Date(moment__namespace(frequencyDetails[1] +
|
|
6551
|
+
'-' +
|
|
6552
|
+
frequencyDetails[2] +
|
|
6553
|
+
'-' +
|
|
6554
|
+
frequencyDetails[3] +
|
|
6555
|
+
' 00:00:00', 'YYYY-MM-DD HH:mm:ss').unix() * 1000);
|
|
6086
6556
|
// tslint:disable-next-line: max-line-length
|
|
6087
6557
|
this.frequencyPlaceholder =
|
|
6088
|
-
'One Time ' +
|
|
6558
|
+
'One Time ' +
|
|
6559
|
+
dateObject.getDate() +
|
|
6560
|
+
' ' +
|
|
6561
|
+
this.shortMonth[dateObject.getMonth()] +
|
|
6562
|
+
' ' +
|
|
6563
|
+
dateObject.getFullYear() +
|
|
6564
|
+
' by ' +
|
|
6565
|
+
frequencyTime;
|
|
6089
6566
|
}
|
|
6090
6567
|
break;
|
|
6091
6568
|
case 8:
|
|
@@ -6094,7 +6571,8 @@
|
|
|
6094
6571
|
break;
|
|
6095
6572
|
case 10:
|
|
6096
6573
|
{
|
|
6097
|
-
this.frequencyPlaceholder =
|
|
6574
|
+
this.frequencyPlaceholder =
|
|
6575
|
+
'You have selected an ongoing frequency.';
|
|
6098
6576
|
}
|
|
6099
6577
|
break;
|
|
6100
6578
|
case 6:
|
|
@@ -6115,10 +6593,21 @@
|
|
|
6115
6593
|
* @param {number} reportId - number
|
|
6116
6594
|
*/
|
|
6117
6595
|
WorkflowComplianceComponent.prototype.getOnCompletionOf = function (frequencyDetails, reportId, onCompletionReportDetails) {
|
|
6118
|
-
this.frequencyPlaceholder =
|
|
6596
|
+
this.frequencyPlaceholder =
|
|
6597
|
+
frequencyDetails[3] +
|
|
6598
|
+
' ' +
|
|
6599
|
+
(parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') +
|
|
6600
|
+
' after completion of ';
|
|
6119
6601
|
if (onCompletionReportDetails) {
|
|
6120
6602
|
if (reportId === onCompletionReportDetails.ReportId) {
|
|
6121
|
-
this.frequencyPlaceholder =
|
|
6603
|
+
this.frequencyPlaceholder =
|
|
6604
|
+
frequencyDetails[3] +
|
|
6605
|
+
' ' +
|
|
6606
|
+
(parseInt(frequencyDetails[3]) > 1 ? 'days' : 'day') +
|
|
6607
|
+
' after completion of ' +
|
|
6608
|
+
(onCompletionReportDetails
|
|
6609
|
+
? onCompletionReportDetails.report_name
|
|
6610
|
+
: '');
|
|
6122
6611
|
}
|
|
6123
6612
|
}
|
|
6124
6613
|
this.loader = false;
|
|
@@ -6138,7 +6627,11 @@
|
|
|
6138
6627
|
this.frequencyPlaceholder = 'Daily by ' + frequencyTime;
|
|
6139
6628
|
}
|
|
6140
6629
|
else if (parseInt(frequencyDetails[3]) > 1) {
|
|
6141
|
-
this.frequencyPlaceholder =
|
|
6630
|
+
this.frequencyPlaceholder =
|
|
6631
|
+
'Every ' +
|
|
6632
|
+
parseInt(frequencyDetails[3]) +
|
|
6633
|
+
' days by ' +
|
|
6634
|
+
frequencyTime;
|
|
6142
6635
|
}
|
|
6143
6636
|
}
|
|
6144
6637
|
};
|
|
@@ -6162,16 +6655,25 @@
|
|
|
6162
6655
|
return _this.frequencyService.dayName[parseInt(ele) - 1];
|
|
6163
6656
|
});
|
|
6164
6657
|
if (parseInt(frequencyDetails[3]) === 1) {
|
|
6165
|
-
this.frequencyPlaceholder =
|
|
6658
|
+
this.frequencyPlaceholder =
|
|
6659
|
+
'Every ' + selectedDay.join() + ' by ' + frequencyTime;
|
|
6166
6660
|
}
|
|
6167
6661
|
if (parseInt(frequencyDetails[3]) === 2) {
|
|
6168
|
-
this.frequencyPlaceholder =
|
|
6662
|
+
this.frequencyPlaceholder =
|
|
6663
|
+
'Every alternate ' + selectedDay.join() + ' by ' + frequencyTime;
|
|
6169
6664
|
}
|
|
6170
6665
|
if (parseInt(frequencyDetails[3]) === 3) {
|
|
6171
|
-
this.frequencyPlaceholder =
|
|
6666
|
+
this.frequencyPlaceholder =
|
|
6667
|
+
'Every 3rd ' + selectedDay.join() + ' by ' + frequencyTime;
|
|
6172
6668
|
}
|
|
6173
6669
|
if (parseInt(frequencyDetails[3]) > 3) {
|
|
6174
|
-
this.frequencyPlaceholder =
|
|
6670
|
+
this.frequencyPlaceholder =
|
|
6671
|
+
'Every ' +
|
|
6672
|
+
parseInt(frequencyDetails[1]) +
|
|
6673
|
+
'th ' +
|
|
6674
|
+
selectedDay.join() +
|
|
6675
|
+
' by ' +
|
|
6676
|
+
frequencyTime;
|
|
6175
6677
|
}
|
|
6176
6678
|
}
|
|
6177
6679
|
};
|
|
@@ -6188,25 +6690,49 @@
|
|
|
6188
6690
|
return _this.shortMonth[parseInt(ele) - 1];
|
|
6189
6691
|
});
|
|
6190
6692
|
if (parseInt(frequencyDetails[1]) === 1) {
|
|
6191
|
-
this.frequencyPlaceholder =
|
|
6693
|
+
this.frequencyPlaceholder =
|
|
6694
|
+
'1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6192
6695
|
}
|
|
6193
6696
|
else if (parseInt(frequencyDetails[1]) === 2) {
|
|
6194
|
-
this.frequencyPlaceholder =
|
|
6697
|
+
this.frequencyPlaceholder =
|
|
6698
|
+
'2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6195
6699
|
}
|
|
6196
6700
|
else if (parseInt(frequencyDetails[1]) === 3) {
|
|
6197
|
-
this.frequencyPlaceholder =
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6701
|
+
this.frequencyPlaceholder =
|
|
6702
|
+
'3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6703
|
+
}
|
|
6704
|
+
else if (parseInt(frequencyDetails[1]) === 21 ||
|
|
6705
|
+
parseInt(frequencyDetails[1]) === 31) {
|
|
6706
|
+
this.frequencyPlaceholder =
|
|
6707
|
+
parseInt(frequencyDetails[1]) +
|
|
6708
|
+
'st of every ' +
|
|
6709
|
+
selectedMonth.join(', ') +
|
|
6710
|
+
' by ' +
|
|
6711
|
+
frequencyTime;
|
|
6201
6712
|
}
|
|
6202
6713
|
else if (parseInt(frequencyDetails[1]) === 22) {
|
|
6203
|
-
this.frequencyPlaceholder =
|
|
6714
|
+
this.frequencyPlaceholder =
|
|
6715
|
+
parseInt(frequencyDetails[1]) +
|
|
6716
|
+
'nd of every ' +
|
|
6717
|
+
selectedMonth.join(', ') +
|
|
6718
|
+
' by ' +
|
|
6719
|
+
frequencyTime;
|
|
6204
6720
|
}
|
|
6205
6721
|
else if (parseInt(frequencyDetails[1]) === 23) {
|
|
6206
|
-
this.frequencyPlaceholder =
|
|
6722
|
+
this.frequencyPlaceholder =
|
|
6723
|
+
parseInt(frequencyDetails[1]) +
|
|
6724
|
+
'rd of every ' +
|
|
6725
|
+
selectedMonth.join(', ') +
|
|
6726
|
+
' by ' +
|
|
6727
|
+
frequencyTime;
|
|
6207
6728
|
}
|
|
6208
6729
|
else if (parseInt(frequencyDetails[1]) > 3) {
|
|
6209
|
-
this.frequencyPlaceholder =
|
|
6730
|
+
this.frequencyPlaceholder =
|
|
6731
|
+
parseInt(frequencyDetails[1]) +
|
|
6732
|
+
'th of every ' +
|
|
6733
|
+
selectedMonth.join(', ') +
|
|
6734
|
+
' by ' +
|
|
6735
|
+
frequencyTime;
|
|
6210
6736
|
}
|
|
6211
6737
|
}
|
|
6212
6738
|
};
|
|
@@ -6219,27 +6745,64 @@
|
|
|
6219
6745
|
*/
|
|
6220
6746
|
WorkflowComplianceComponent.prototype.getQuarterlyPlaceholder = function (frequencyDetails, frequencyTime) {
|
|
6221
6747
|
{
|
|
6222
|
-
var quarterly = [
|
|
6748
|
+
var quarterly = [
|
|
6749
|
+
'January, April, July, October',
|
|
6750
|
+
'February, May, August, November',
|
|
6751
|
+
' March, June, September, December',
|
|
6752
|
+
];
|
|
6223
6753
|
if (parseInt(frequencyDetails[1]) === 1) {
|
|
6224
|
-
this.frequencyPlaceholder =
|
|
6754
|
+
this.frequencyPlaceholder =
|
|
6755
|
+
'1st of every ' +
|
|
6756
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6757
|
+
' by ' +
|
|
6758
|
+
frequencyTime;
|
|
6225
6759
|
}
|
|
6226
6760
|
else if (parseInt(frequencyDetails[1]) === 2) {
|
|
6227
|
-
this.frequencyPlaceholder =
|
|
6761
|
+
this.frequencyPlaceholder =
|
|
6762
|
+
'2nd of every ' +
|
|
6763
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6764
|
+
' by ' +
|
|
6765
|
+
frequencyTime;
|
|
6228
6766
|
}
|
|
6229
6767
|
else if (parseInt(frequencyDetails[1]) === 3) {
|
|
6230
|
-
this.frequencyPlaceholder =
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6768
|
+
this.frequencyPlaceholder =
|
|
6769
|
+
'3rd of every ' +
|
|
6770
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6771
|
+
' by ' +
|
|
6772
|
+
frequencyTime;
|
|
6773
|
+
}
|
|
6774
|
+
else if (parseInt(frequencyDetails[1]) === 21 ||
|
|
6775
|
+
parseInt(frequencyDetails[1]) === 31) {
|
|
6776
|
+
this.frequencyPlaceholder =
|
|
6777
|
+
parseInt(frequencyDetails[1]) +
|
|
6778
|
+
'st of every ' +
|
|
6779
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6780
|
+
' by ' +
|
|
6781
|
+
frequencyTime;
|
|
6234
6782
|
}
|
|
6235
6783
|
else if (parseInt(frequencyDetails[1]) === 22) {
|
|
6236
|
-
this.frequencyPlaceholder =
|
|
6784
|
+
this.frequencyPlaceholder =
|
|
6785
|
+
parseInt(frequencyDetails[1]) +
|
|
6786
|
+
'nd of every ' +
|
|
6787
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6788
|
+
' by ' +
|
|
6789
|
+
frequencyTime;
|
|
6237
6790
|
}
|
|
6238
6791
|
else if (parseInt(frequencyDetails[1]) === 23) {
|
|
6239
|
-
this.frequencyPlaceholder =
|
|
6792
|
+
this.frequencyPlaceholder =
|
|
6793
|
+
parseInt(frequencyDetails[1]) +
|
|
6794
|
+
'rd of every ' +
|
|
6795
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6796
|
+
' by ' +
|
|
6797
|
+
frequencyTime;
|
|
6240
6798
|
}
|
|
6241
6799
|
else if (parseInt(frequencyDetails[1]) > 3) {
|
|
6242
|
-
this.frequencyPlaceholder =
|
|
6800
|
+
this.frequencyPlaceholder =
|
|
6801
|
+
parseInt(frequencyDetails[1]) +
|
|
6802
|
+
'th of every ' +
|
|
6803
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
6804
|
+
' by ' +
|
|
6805
|
+
frequencyTime;
|
|
6243
6806
|
}
|
|
6244
6807
|
}
|
|
6245
6808
|
};
|
|
@@ -6255,25 +6818,49 @@
|
|
|
6255
6818
|
return _this.shortMonth[parseInt(ele) - 1];
|
|
6256
6819
|
});
|
|
6257
6820
|
if (parseInt(frequencyDetails[1]) === 1) {
|
|
6258
|
-
this.frequencyPlaceholder =
|
|
6821
|
+
this.frequencyPlaceholder =
|
|
6822
|
+
'1st of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6259
6823
|
}
|
|
6260
6824
|
else if (parseInt(frequencyDetails[1]) === 2) {
|
|
6261
|
-
this.frequencyPlaceholder =
|
|
6825
|
+
this.frequencyPlaceholder =
|
|
6826
|
+
'2nd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6262
6827
|
}
|
|
6263
6828
|
else if (parseInt(frequencyDetails[1]) === 3) {
|
|
6264
|
-
this.frequencyPlaceholder =
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6829
|
+
this.frequencyPlaceholder =
|
|
6830
|
+
'3rd of every ' + selectedMonth.join(', ') + ' by ' + frequencyTime;
|
|
6831
|
+
}
|
|
6832
|
+
else if (parseInt(frequencyDetails[1]) === 21 ||
|
|
6833
|
+
parseInt(frequencyDetails[1]) === 31) {
|
|
6834
|
+
this.frequencyPlaceholder =
|
|
6835
|
+
parseInt(frequencyDetails[1]) +
|
|
6836
|
+
'st of every ' +
|
|
6837
|
+
selectedMonth.join(', ') +
|
|
6838
|
+
' by ' +
|
|
6839
|
+
frequencyTime;
|
|
6268
6840
|
}
|
|
6269
6841
|
else if (parseInt(frequencyDetails[1]) === 22) {
|
|
6270
|
-
this.frequencyPlaceholder =
|
|
6842
|
+
this.frequencyPlaceholder =
|
|
6843
|
+
parseInt(frequencyDetails[1]) +
|
|
6844
|
+
'nd of every ' +
|
|
6845
|
+
selectedMonth.join(', ') +
|
|
6846
|
+
' by ' +
|
|
6847
|
+
frequencyTime;
|
|
6271
6848
|
}
|
|
6272
6849
|
else if (parseInt(frequencyDetails[1]) === 23) {
|
|
6273
|
-
this.frequencyPlaceholder =
|
|
6850
|
+
this.frequencyPlaceholder =
|
|
6851
|
+
parseInt(frequencyDetails[1]) +
|
|
6852
|
+
'rd of every ' +
|
|
6853
|
+
selectedMonth.join(', ') +
|
|
6854
|
+
' by ' +
|
|
6855
|
+
frequencyTime;
|
|
6274
6856
|
}
|
|
6275
6857
|
else if (parseInt(frequencyDetails[1]) > 3) {
|
|
6276
|
-
this.frequencyPlaceholder =
|
|
6858
|
+
this.frequencyPlaceholder =
|
|
6859
|
+
parseInt(frequencyDetails[1]) +
|
|
6860
|
+
'th of every ' +
|
|
6861
|
+
selectedMonth.join(', ') +
|
|
6862
|
+
' by ' +
|
|
6863
|
+
frequencyTime;
|
|
6277
6864
|
}
|
|
6278
6865
|
}
|
|
6279
6866
|
};
|
|
@@ -6291,53 +6878,126 @@
|
|
|
6291
6878
|
var yearSequence = parseInt(frequencyDetails[3]) > 0 ? parseInt(frequencyDetails[3]) : 1;
|
|
6292
6879
|
if (parseInt(frequencyDetails[1]) < 2) {
|
|
6293
6880
|
if (parseInt(frequencyDetails[1]) === 1) {
|
|
6294
|
-
this.frequencyPlaceholder =
|
|
6881
|
+
this.frequencyPlaceholder =
|
|
6882
|
+
'1st of every ' +
|
|
6883
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6884
|
+
' by ' +
|
|
6885
|
+
frequencyTime;
|
|
6295
6886
|
}
|
|
6296
6887
|
if (parseInt(frequencyDetails[1]) === 2) {
|
|
6297
|
-
this.frequencyPlaceholder =
|
|
6888
|
+
this.frequencyPlaceholder =
|
|
6889
|
+
'2nd of every ' +
|
|
6890
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6891
|
+
' by ' +
|
|
6892
|
+
frequencyTime;
|
|
6298
6893
|
}
|
|
6299
6894
|
if (parseInt(frequencyDetails[1]) === 3) {
|
|
6300
|
-
this.frequencyPlaceholder =
|
|
6895
|
+
this.frequencyPlaceholder =
|
|
6896
|
+
'3rd of every ' +
|
|
6897
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6898
|
+
' by ' +
|
|
6899
|
+
frequencyTime;
|
|
6301
6900
|
}
|
|
6302
6901
|
if (parseInt(frequencyDetails[1]) > 3) {
|
|
6303
|
-
this.frequencyPlaceholder =
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6902
|
+
this.frequencyPlaceholder =
|
|
6903
|
+
parseInt(frequencyDetails[1]) +
|
|
6904
|
+
'th of every ' +
|
|
6905
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6906
|
+
' by ' +
|
|
6907
|
+
frequencyTime;
|
|
6908
|
+
}
|
|
6909
|
+
if (parseInt(frequencyDetails[1]) === 31 ||
|
|
6910
|
+
parseInt(frequencyDetails[1]) === 21) {
|
|
6911
|
+
this.frequencyPlaceholder =
|
|
6912
|
+
parseInt(frequencyDetails[1]) +
|
|
6913
|
+
'st of every ' +
|
|
6914
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6915
|
+
' by ' +
|
|
6916
|
+
frequencyTime;
|
|
6307
6917
|
}
|
|
6308
6918
|
if (parseInt(frequencyDetails[1]) === 22) {
|
|
6309
|
-
this.frequencyPlaceholder =
|
|
6919
|
+
this.frequencyPlaceholder =
|
|
6920
|
+
parseInt(frequencyDetails[1]) +
|
|
6921
|
+
'nd of every ' +
|
|
6922
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6923
|
+
' by ' +
|
|
6924
|
+
frequencyTime;
|
|
6310
6925
|
}
|
|
6311
6926
|
if (parseInt(frequencyDetails[1]) === 23) {
|
|
6312
|
-
this.frequencyPlaceholder =
|
|
6927
|
+
this.frequencyPlaceholder =
|
|
6928
|
+
parseInt(frequencyDetails[1]) +
|
|
6929
|
+
'rd of every ' +
|
|
6930
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6931
|
+
' by ' +
|
|
6932
|
+
frequencyTime;
|
|
6313
6933
|
}
|
|
6314
6934
|
}
|
|
6315
6935
|
if (parseInt(frequencyDetails[1]) > 1) {
|
|
6316
6936
|
if (parseInt(frequencyDetails[1]) === 1) {
|
|
6317
6937
|
// tslint:disable-next-line: max-line-length
|
|
6318
|
-
this.frequencyPlaceholder =
|
|
6938
|
+
this.frequencyPlaceholder =
|
|
6939
|
+
'1st ' +
|
|
6940
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6941
|
+
', Interval: every ' +
|
|
6942
|
+
yearSequence +
|
|
6943
|
+
' years by ' +
|
|
6944
|
+
frequencyTime;
|
|
6319
6945
|
}
|
|
6320
6946
|
if (parseInt(frequencyDetails[1]) === 2) {
|
|
6321
6947
|
// tslint:disable-next-line: max-line-length
|
|
6322
|
-
this.frequencyPlaceholder =
|
|
6948
|
+
this.frequencyPlaceholder =
|
|
6949
|
+
'2nd ' +
|
|
6950
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6951
|
+
', Interval: every ' +
|
|
6952
|
+
yearSequence +
|
|
6953
|
+
' years by ' +
|
|
6954
|
+
frequencyTime;
|
|
6323
6955
|
}
|
|
6324
6956
|
if (parseInt(frequencyDetails[1]) === 3) {
|
|
6325
6957
|
// tslint:disable-next-line: max-line-length
|
|
6326
|
-
this.frequencyPlaceholder =
|
|
6958
|
+
this.frequencyPlaceholder =
|
|
6959
|
+
'3rd ' +
|
|
6960
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6961
|
+
', Interval: every ' +
|
|
6962
|
+
yearSequence +
|
|
6963
|
+
' years by ' +
|
|
6964
|
+
frequencyTime;
|
|
6327
6965
|
}
|
|
6328
6966
|
if (parseInt(frequencyDetails[1]) > 3) {
|
|
6329
6967
|
// tslint:disable-next-line: max-line-length
|
|
6330
6968
|
this.frequencyPlaceholder =
|
|
6331
|
-
parseInt(frequencyDetails[1]) +
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6969
|
+
parseInt(frequencyDetails[1]) +
|
|
6970
|
+
'th of ' +
|
|
6971
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6972
|
+
', Interval: every ' +
|
|
6973
|
+
yearSequence +
|
|
6974
|
+
' years by ' +
|
|
6975
|
+
frequencyTime;
|
|
6976
|
+
}
|
|
6977
|
+
if (parseInt(frequencyDetails[1]) === 31 ||
|
|
6978
|
+
parseInt(frequencyDetails[1]) === 21) {
|
|
6979
|
+
this.frequencyPlaceholder =
|
|
6980
|
+
parseInt(frequencyDetails[1]) +
|
|
6981
|
+
'st of every ' +
|
|
6982
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6983
|
+
' by ' +
|
|
6984
|
+
frequencyTime;
|
|
6335
6985
|
}
|
|
6336
6986
|
if (parseInt(frequencyDetails[1]) === 22) {
|
|
6337
|
-
this.frequencyPlaceholder =
|
|
6987
|
+
this.frequencyPlaceholder =
|
|
6988
|
+
parseInt(frequencyDetails[1]) +
|
|
6989
|
+
'nd of every ' +
|
|
6990
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6991
|
+
' by ' +
|
|
6992
|
+
frequencyTime;
|
|
6338
6993
|
}
|
|
6339
6994
|
if (parseInt(frequencyDetails[1]) === 23) {
|
|
6340
|
-
this.frequencyPlaceholder =
|
|
6995
|
+
this.frequencyPlaceholder =
|
|
6996
|
+
parseInt(frequencyDetails[1]) +
|
|
6997
|
+
'rd of every ' +
|
|
6998
|
+
this.shortMonth[parseInt(frequencyDetails[2]) - 1] +
|
|
6999
|
+
' by ' +
|
|
7000
|
+
frequencyTime;
|
|
6341
7001
|
}
|
|
6342
7002
|
}
|
|
6343
7003
|
}
|
|
@@ -6348,11 +7008,16 @@
|
|
|
6348
7008
|
*/
|
|
6349
7009
|
WorkflowComplianceComponent.prototype.getRandomPlaceholder = function (frequencyDetails, frequencyTime) {
|
|
6350
7010
|
var _this = this;
|
|
6351
|
-
var quarterly = [
|
|
7011
|
+
var quarterly = [
|
|
7012
|
+
'January, April, July, October',
|
|
7013
|
+
'February, May, August, November',
|
|
7014
|
+
' March, June, September, December',
|
|
7015
|
+
];
|
|
6352
7016
|
{
|
|
6353
7017
|
switch (parseInt(frequencyDetails[1])) {
|
|
6354
7018
|
case 1:
|
|
6355
|
-
this.frequencyPlaceholder =
|
|
7019
|
+
this.frequencyPlaceholder =
|
|
7020
|
+
'Every week for ' + frequencyDetails[3] + ' random instances';
|
|
6356
7021
|
break;
|
|
6357
7022
|
case 2:
|
|
6358
7023
|
this.frequencyPlaceholder =
|
|
@@ -6366,10 +7031,16 @@
|
|
|
6366
7031
|
' random instances';
|
|
6367
7032
|
break;
|
|
6368
7033
|
case 3:
|
|
6369
|
-
this.frequencyPlaceholder =
|
|
7034
|
+
this.frequencyPlaceholder =
|
|
7035
|
+
'Every ' +
|
|
7036
|
+
quarterly[parseInt(frequencyDetails[2].split(',')[0]) - 1] +
|
|
7037
|
+
' for ' +
|
|
7038
|
+
frequencyDetails[3] +
|
|
7039
|
+
' random instances';
|
|
6370
7040
|
break;
|
|
6371
7041
|
case 4:
|
|
6372
|
-
this.frequencyPlaceholder =
|
|
7042
|
+
this.frequencyPlaceholder =
|
|
7043
|
+
'Every year for ' + frequencyDetails[3] + ' random instances';
|
|
6373
7044
|
}
|
|
6374
7045
|
}
|
|
6375
7046
|
};
|
|
@@ -6382,6 +7053,7 @@
|
|
|
6382
7053
|
var _this = this;
|
|
6383
7054
|
setTimeout(function () {
|
|
6384
7055
|
var _a, _b;
|
|
7056
|
+
// this will make the execution after the above boolean has changed
|
|
6385
7057
|
_this.isEditWhat = false;
|
|
6386
7058
|
(_b = (_a = _this.whatInput) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
6387
7059
|
}, 0);
|
|
@@ -6404,7 +7076,8 @@
|
|
|
6404
7076
|
checkedMoreOptions.push('PROGRAM');
|
|
6405
7077
|
this.moreOptions.PROGRAM = true;
|
|
6406
7078
|
}
|
|
6407
|
-
if (this.responsibilityForm.formatAndEvidence.evidenceRequired ||
|
|
7079
|
+
if (this.responsibilityForm.formatAndEvidence.evidenceRequired ||
|
|
7080
|
+
this.responsibilityForm.formatAndEvidence.formatRequired) {
|
|
6408
7081
|
checkedMoreOptions.push('FORMATE_EVIDENCE');
|
|
6409
7082
|
this.moreOptions.FORMATE_EVIDENCE = true;
|
|
6410
7083
|
}
|
|
@@ -6412,7 +7085,9 @@
|
|
|
6412
7085
|
checkedMoreOptions.push('RC');
|
|
6413
7086
|
this.moreOptions.RC = true;
|
|
6414
7087
|
}
|
|
6415
|
-
if (this.isResponsibilityRcLinkEnabled &&
|
|
7088
|
+
if (this.isResponsibilityRcLinkEnabled &&
|
|
7089
|
+
(res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) &&
|
|
7090
|
+
((_c = res === null || res === void 0 ? void 0 : res.responsibilityCenterArr) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
6416
7091
|
checkedMoreOptions.push('RC');
|
|
6417
7092
|
this.moreOptions.RC = true;
|
|
6418
7093
|
}
|
|
@@ -6420,11 +7095,15 @@
|
|
|
6420
7095
|
checkedMoreOptions.push('CHECKPOINTS');
|
|
6421
7096
|
this.moreOptions.CHECKPOINTS = true;
|
|
6422
7097
|
}
|
|
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 ||
|
|
7098
|
+
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 ||
|
|
7099
|
+
((_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
7100
|
checkedMoreOptions.push('REVIEWER');
|
|
6425
7101
|
this.moreOptions.REVIEWER = true;
|
|
6426
7102
|
}
|
|
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 ||
|
|
7103
|
+
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 ||
|
|
7104
|
+
((_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 ||
|
|
7105
|
+
((_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 ||
|
|
7106
|
+
((_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
7107
|
checkedMoreOptions.push('OVERSEER');
|
|
6429
7108
|
this.moreOptions.OVERSEER = true;
|
|
6430
7109
|
}
|
|
@@ -6448,7 +7127,8 @@
|
|
|
6448
7127
|
};
|
|
6449
7128
|
// Format & Evidence
|
|
6450
7129
|
WorkflowComplianceComponent.prototype.testFunction = function () {
|
|
6451
|
-
if (this.responsibilityForm.responsibility.name.trim() !== '' &&
|
|
7130
|
+
if (this.responsibilityForm.responsibility.name.trim() !== '' &&
|
|
7131
|
+
this.isEditWhat === false) {
|
|
6452
7132
|
this.isEditWhat = true;
|
|
6453
7133
|
}
|
|
6454
7134
|
if (this.responsibilityForm.description == '<br>') {
|
|
@@ -6459,7 +7139,8 @@
|
|
|
6459
7139
|
}
|
|
6460
7140
|
};
|
|
6461
7141
|
WorkflowComplianceComponent.prototype.reviewerTypeChange = function (event) {
|
|
6462
|
-
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
7142
|
+
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
7143
|
+
event === 'SEQUENTIAL' ? true : false;
|
|
6463
7144
|
};
|
|
6464
7145
|
WorkflowComplianceComponent.prototype.selectedSampleData = function (event) {
|
|
6465
7146
|
this.selectedSample = event;
|
|
@@ -6483,13 +7164,15 @@
|
|
|
6483
7164
|
this.selectedSample = 1;
|
|
6484
7165
|
}
|
|
6485
7166
|
this.tempCheckValue = this.selectedSample;
|
|
6486
|
-
this.sendAuditRemindersValue = testPlanCategory.frequency_pattern
|
|
7167
|
+
this.sendAuditRemindersValue = testPlanCategory.frequency_pattern
|
|
7168
|
+
? parseInt(testPlanCategory.frequency_pattern.split('~')[2])
|
|
7169
|
+
: 2;
|
|
6487
7170
|
this.auditTime = moment__namespace(testPlanCategory === null || testPlanCategory === void 0 ? void 0 : testPlanCategory.frequency_time, 'HH:mm:ss').format('HH:mm a');
|
|
6488
7171
|
};
|
|
6489
7172
|
//on sample toggle on/off
|
|
6490
7173
|
WorkflowComplianceComponent.prototype.checkInputValue = function (event) {
|
|
6491
7174
|
var key = event.charCode; // key = event.keyCode; (Both can be used)
|
|
6492
|
-
return (
|
|
7175
|
+
return (key > 47 && key < 58) || key == 45;
|
|
6493
7176
|
};
|
|
6494
7177
|
WorkflowComplianceComponent.prototype.switchEnable = function (event) {
|
|
6495
7178
|
if (event) {
|
|
@@ -6511,7 +7194,9 @@
|
|
|
6511
7194
|
*/
|
|
6512
7195
|
WorkflowComplianceComponent.prototype.getAssessmentDetails = function (assessmentDetails, type) {
|
|
6513
7196
|
var _this = this;
|
|
6514
|
-
this.responsibilityService
|
|
7197
|
+
this.responsibilityService
|
|
7198
|
+
.getAssessmentDetailsByID(assessmentDetails.assessment_id)
|
|
7199
|
+
.subscribe(function (res) {
|
|
6515
7200
|
if ((res === null || res === void 0 ? void 0 : res.length) > 0) {
|
|
6516
7201
|
if (type === 'assessment') {
|
|
6517
7202
|
var categoryDetails = res[0].category.find(function (ele) { return ele._id == assessmentDetails.category_id; });
|
|
@@ -6522,9 +7207,9 @@
|
|
|
6522
7207
|
assessmentDetails: {
|
|
6523
7208
|
id: assessmentDetails.assessment_id,
|
|
6524
7209
|
assessment_name: res[0].assessment_name,
|
|
6525
|
-
questions: res[0].questionsCount
|
|
7210
|
+
questions: res[0].questionsCount,
|
|
6526
7211
|
},
|
|
6527
|
-
category_details: categoryDetails
|
|
7212
|
+
category_details: categoryDetails,
|
|
6528
7213
|
};
|
|
6529
7214
|
_this.responsibilityForm.assessment = JSON.parse(JSON.stringify(assessmentData));
|
|
6530
7215
|
}
|
|
@@ -6543,9 +7228,9 @@
|
|
|
6543
7228
|
this.responsibilityForm.checkpoints = [];
|
|
6544
7229
|
};
|
|
6545
7230
|
/**
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
7231
|
+
*
|
|
7232
|
+
* @param event Assessment details
|
|
7233
|
+
*/
|
|
6549
7234
|
WorkflowComplianceComponent.prototype.postAssessment = function (event) {
|
|
6550
7235
|
var _a;
|
|
6551
7236
|
this.responsibilityForm.new_checkpoints = event.assessmentDetails;
|
|
@@ -6585,7 +7270,7 @@
|
|
|
6585
7270
|
};
|
|
6586
7271
|
WorkflowComplianceComponent.prototype.openAssigneeChangeConfirmation = function (event) {
|
|
6587
7272
|
if (event) {
|
|
6588
|
-
this.responsibilityForm.assignees.whoCanComplete =
|
|
7273
|
+
this.responsibilityForm.assignees.whoCanComplete = 'ANY_ONE';
|
|
6589
7274
|
}
|
|
6590
7275
|
else {
|
|
6591
7276
|
this.responsibilityForm.assignees.whoCanComplete = '';
|
|
@@ -6597,7 +7282,8 @@
|
|
|
6597
7282
|
* @param {any} event - any - the event that is triggered when the user selects a radio button
|
|
6598
7283
|
*/
|
|
6599
7284
|
WorkflowComplianceComponent.prototype.onReviewerWorkflowChange = function (event) {
|
|
6600
|
-
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
7285
|
+
this.responsibilityForm.reviewers.sequentialWorkflow =
|
|
7286
|
+
event === 'sequential' ? true : false;
|
|
6601
7287
|
if (this.mode === 'EDIT' && this.hasReviewer) {
|
|
6602
7288
|
this.onReviewerTypeChange.emit(event);
|
|
6603
7289
|
}
|
|
@@ -7057,7 +7743,7 @@
|
|
|
7057
7743
|
'linkProgram',
|
|
7058
7744
|
'isAssessment',
|
|
7059
7745
|
'owners',
|
|
7060
|
-
'policyAccess'
|
|
7746
|
+
'policyAccess',
|
|
7061
7747
|
];
|
|
7062
7748
|
this.riskClassification = [
|
|
7063
7749
|
{ name: 'LOW', value: 1, class: 'low' },
|
|
@@ -7154,7 +7840,8 @@
|
|
|
7154
7840
|
WorkflowPolicyComponent.prototype.ngOnInit = function () {
|
|
7155
7841
|
var _this = this;
|
|
7156
7842
|
var _a, _b;
|
|
7157
|
-
this.groupEnabled =
|
|
7843
|
+
this.groupEnabled =
|
|
7844
|
+
((_a = this.feature) === null || _a === void 0 ? void 0 : _a.isFeatureEnabled('ff_policy_groups')) || true;
|
|
7158
7845
|
this.getRCList();
|
|
7159
7846
|
this.getUsersList();
|
|
7160
7847
|
this.getCategoriesList();
|
|
@@ -7166,7 +7853,9 @@
|
|
|
7166
7853
|
if (!res.enable_riskclass) {
|
|
7167
7854
|
_this.showRiskClassification = false;
|
|
7168
7855
|
}
|
|
7169
|
-
|
|
7856
|
+
if (res._id) {
|
|
7857
|
+
_this.organization_id = res._id;
|
|
7858
|
+
}
|
|
7170
7859
|
});
|
|
7171
7860
|
this.member_obj_id = this.authService.getUserDetails()._id;
|
|
7172
7861
|
this.userInfo = this.authService.getUserDetails().user;
|
|
@@ -7690,7 +8379,8 @@
|
|
|
7690
8379
|
break;
|
|
7691
8380
|
case 'policyAccess':
|
|
7692
8381
|
var accessIds = void 0, accessGroupIds = void 0;
|
|
7693
|
-
this.policyForm.availableOnPortal =
|
|
8382
|
+
this.policyForm.availableOnPortal =
|
|
8383
|
+
selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.futureUsersWillSelect;
|
|
7694
8384
|
if (this.groupEnabled) {
|
|
7695
8385
|
accessIds = this.returnIds(selectedItems.users, 'member_id');
|
|
7696
8386
|
accessGroupIds = this.returnIds(selectedItems.groups, 'group_id');
|
|
@@ -8237,8 +8927,12 @@
|
|
|
8237
8927
|
? policy === null || policy === void 0 ? void 0 : policy.businessCycle
|
|
8238
8928
|
: undefined,
|
|
8239
8929
|
policy_access_type: (_k = policy.policy_access_type) !== null && _k !== void 0 ? _k : 0,
|
|
8240
|
-
policy_access_owners: policy.availableOnPortal
|
|
8241
|
-
|
|
8930
|
+
policy_access_owners: policy.availableOnPortal
|
|
8931
|
+
? []
|
|
8932
|
+
: policyAccessUsersIds !== null && policyAccessUsersIds !== void 0 ? policyAccessUsersIds : [],
|
|
8933
|
+
policy_access_groups: policy.availableOnPortal
|
|
8934
|
+
? []
|
|
8935
|
+
: policyAccessGroupsIds !== null && policyAccessGroupsIds !== void 0 ? policyAccessGroupsIds : [],
|
|
8242
8936
|
};
|
|
8243
8937
|
if (this.mode == 'CREATE') {
|
|
8244
8938
|
this.policyService.submitPolicy(payload).subscribe(function (res) {
|
|
@@ -8664,7 +9358,10 @@
|
|
|
8664
9358
|
this.policyForm.policy_access_type = event;
|
|
8665
9359
|
if (event == 0) {
|
|
8666
9360
|
// this.policyForm.policy_access_owners = this.usersAccessList;
|
|
8667
|
-
this.saveSelectedList('policyAccess', {
|
|
9361
|
+
this.saveSelectedList('policyAccess', {
|
|
9362
|
+
users: this.usersAccessList,
|
|
9363
|
+
groups: [],
|
|
9364
|
+
});
|
|
8668
9365
|
}
|
|
8669
9366
|
};
|
|
8670
9367
|
WorkflowPolicyComponent.prototype.getUsersAccessListByCategory = function (categoryDetails) {
|