vcomply-workflow-engine 2.4.25 → 2.4.45
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 +146 -40
- package/bundles/vcomply-workflow-engine.umd.js.map +1 -1
- package/esm2015/lib/workflow-compliance/workflow-compliance.component.js +145 -39
- package/esm2015/lib/workflow-compliance/workflow-compliance.component.ngsummary.json +1 -1
- package/esm2015/lib/workflow-services/responsibility.service.js +3 -3
- package/fesm2015/vcomply-workflow-engine.js +146 -40
- package/fesm2015/vcomply-workflow-engine.js.map +1 -1
- package/lib/workflow-compliance/workflow-compliance.component.d.ts +3 -1
- package/lib/workflow-services/responsibility.service.d.ts +1 -1
- package/package.json +2 -2
- package/vcomply-workflow-engine.metadata.json +1 -1
|
@@ -2075,10 +2075,10 @@
|
|
|
2075
2075
|
params: params, headers: headers
|
|
2076
2076
|
}).pipe(operators.retry(2));
|
|
2077
2077
|
};
|
|
2078
|
-
ResponsibilityService.prototype.getAssignorsList = function () {
|
|
2078
|
+
ResponsibilityService.prototype.getAssignorsList = function (params) {
|
|
2079
2079
|
var headers = new i1.HttpHeaders().set('token', this.authService.getAuthorizationToken());
|
|
2080
2080
|
return this.http.get(this.env.organizationGet + 'organizationUsers&isOnBehalf=1', {
|
|
2081
|
-
headers: headers
|
|
2081
|
+
params: params, headers: headers
|
|
2082
2082
|
}).pipe(operators.retry(2));
|
|
2083
2083
|
};
|
|
2084
2084
|
ResponsibilityService.prototype.getCategoriesList = function () {
|
|
@@ -2647,6 +2647,11 @@
|
|
|
2647
2647
|
link: true,
|
|
2648
2648
|
placeholder: 'Add more information about completing the responsibility',
|
|
2649
2649
|
};
|
|
2650
|
+
this.programPeopleList = {
|
|
2651
|
+
assigneesList: [],
|
|
2652
|
+
reviewersList: [],
|
|
2653
|
+
overseersList: [],
|
|
2654
|
+
};
|
|
2650
2655
|
this.loader = false;
|
|
2651
2656
|
this.submitted = false;
|
|
2652
2657
|
this.smileyMessage = "Done!";
|
|
@@ -2864,8 +2869,8 @@
|
|
|
2864
2869
|
this.getAssignorsList();
|
|
2865
2870
|
this.getAssigneesList();
|
|
2866
2871
|
this.getAssurance();
|
|
2867
|
-
this.getAssuranceForRequiresAudit();
|
|
2868
2872
|
this.getGroupsList();
|
|
2873
|
+
this.getAssuranceForRequiresAudit();
|
|
2869
2874
|
this.checkWhetherAllListsLoaded();
|
|
2870
2875
|
this.getOrganizationDetails();
|
|
2871
2876
|
this.getUserDetails();
|
|
@@ -3030,18 +3035,29 @@
|
|
|
3030
3035
|
this.getPeopleListAgainstPID(program_id);
|
|
3031
3036
|
this.getRCList(program_id);
|
|
3032
3037
|
this.getGroupsList(program_id);
|
|
3038
|
+
this.getAssignorsList(program_id);
|
|
3033
3039
|
}
|
|
3034
3040
|
else {
|
|
3035
3041
|
this.getAssigneesList();
|
|
3036
3042
|
this.getRCList();
|
|
3037
3043
|
this.getGroupsList();
|
|
3044
|
+
this.getAssignorsList();
|
|
3038
3045
|
}
|
|
3039
3046
|
};
|
|
3040
|
-
WorkflowComplianceComponent.prototype.getAssignorsList = function () {
|
|
3047
|
+
WorkflowComplianceComponent.prototype.getAssignorsList = function (program_id) {
|
|
3041
3048
|
var _this = this;
|
|
3042
|
-
|
|
3049
|
+
var params = new i1.HttpParams();
|
|
3050
|
+
if (program_id) {
|
|
3051
|
+
params = params.append('program_ids', program_id);
|
|
3052
|
+
}
|
|
3053
|
+
this.responsibilityService.getAssignorsList(params).subscribe(function (res) {
|
|
3043
3054
|
_this.behalfOfUsersList = res;
|
|
3044
|
-
|
|
3055
|
+
if (program_id) {
|
|
3056
|
+
_this.refreshListsWhileProgramSelected();
|
|
3057
|
+
}
|
|
3058
|
+
else {
|
|
3059
|
+
_this.refreshAllLists();
|
|
3060
|
+
}
|
|
3045
3061
|
_this.assignorsListLoaded = true;
|
|
3046
3062
|
}, function (err) {
|
|
3047
3063
|
console.error(err);
|
|
@@ -3059,7 +3075,12 @@
|
|
|
3059
3075
|
user.member_name = user.employee_name;
|
|
3060
3076
|
return user;
|
|
3061
3077
|
});
|
|
3062
|
-
|
|
3078
|
+
if (program_id) {
|
|
3079
|
+
_this.refreshListsWhileProgramSelected();
|
|
3080
|
+
}
|
|
3081
|
+
else {
|
|
3082
|
+
_this.refreshAllLists();
|
|
3083
|
+
}
|
|
3063
3084
|
_this.assigneesListLoaded = true;
|
|
3064
3085
|
}, function (err) {
|
|
3065
3086
|
console.error(err);
|
|
@@ -3085,6 +3106,11 @@
|
|
|
3085
3106
|
user.member_name = user.employee_name;
|
|
3086
3107
|
return user;
|
|
3087
3108
|
});
|
|
3109
|
+
_this.programPeopleList = {
|
|
3110
|
+
assigneesList: __spreadArray([], __read(new Set(_this.assigneesList))),
|
|
3111
|
+
reviewersList: __spreadArray([], __read(new Set(_this.reviewersList))),
|
|
3112
|
+
overseersList: __spreadArray([], __read(new Set(_this.overseersList))),
|
|
3113
|
+
};
|
|
3088
3114
|
if (_this.responsibilityForm.program[0].default_assignee_ids) {
|
|
3089
3115
|
if (_this.responsibilityForm.assignees.list.length) {
|
|
3090
3116
|
var ids = _this.returnIds(_this.responsibilityForm.assignees.list, 'my_member_id');
|
|
@@ -3221,7 +3247,7 @@
|
|
|
3221
3247
|
category: ((_e = res === null || res === void 0 ? void 0 : res.program_cat_ids) === null || _e === void 0 ? void 0 : _e.length) ? res === null || res === void 0 ? void 0 : res.category_ids_array.filter(function (ele) { return !res.program_cat_ids.includes(ele); }) : res === null || res === void 0 ? void 0 : res.category_ids_array,
|
|
3222
3248
|
program_selected_ids: (_f = res === null || res === void 0 ? void 0 : res.category_id.split(',')) !== null && _f !== void 0 ? _f : [],
|
|
3223
3249
|
category_id: (_g = res === null || res === void 0 ? void 0 : res.category_id) !== null && _g !== void 0 ? _g : '',
|
|
3224
|
-
program:
|
|
3250
|
+
program: (res === null || res === void 0 ? void 0 : res.programDetails) ? [res === null || res === void 0 ? void 0 : res.programDetails] : [],
|
|
3225
3251
|
checkpointInstruction: res === null || res === void 0 ? void 0 : res.checkpoint_description,
|
|
3226
3252
|
customTags: (res === null || res === void 0 ? void 0 : res.custom_tags) ? JSON.parse(res === null || res === void 0 ? void 0 : res.custom_tags) : '',
|
|
3227
3253
|
checkpoints: (res === null || res === void 0 ? void 0 : res.checkpoint_details) ? JSON.parse(res === null || res === void 0 ? void 0 : res.checkpoint_details) : '',
|
|
@@ -3311,7 +3337,12 @@
|
|
|
3311
3337
|
else {
|
|
3312
3338
|
_this.isAssessmentDisabled.emit(true);
|
|
3313
3339
|
}
|
|
3314
|
-
_this.
|
|
3340
|
+
if (_this.responsibilityForm.program.length) {
|
|
3341
|
+
_this.refreshListsWhileProgramSelected();
|
|
3342
|
+
}
|
|
3343
|
+
else {
|
|
3344
|
+
_this.refreshAllLists();
|
|
3345
|
+
}
|
|
3315
3346
|
_this.getEditMoreOptions(res);
|
|
3316
3347
|
}
|
|
3317
3348
|
});
|
|
@@ -3403,14 +3434,19 @@
|
|
|
3403
3434
|
};
|
|
3404
3435
|
WorkflowComplianceComponent.prototype.saveSelectedList = function (type, selectedItems) {
|
|
3405
3436
|
var _this = this;
|
|
3406
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v
|
|
3437
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
3407
3438
|
switch (type) {
|
|
3408
3439
|
case 'assignors':
|
|
3409
3440
|
if (this.invalidType === 'whom') {
|
|
3410
3441
|
this.invalidType = '';
|
|
3411
3442
|
}
|
|
3412
3443
|
this.responsibilityForm.assignors.list = this.setList(this.assignorsList, [selectedItems.member_id], 'member_id');
|
|
3413
|
-
this.
|
|
3444
|
+
if (this.responsibilityForm.program.length) {
|
|
3445
|
+
this.refreshListsWhileProgramSelected();
|
|
3446
|
+
}
|
|
3447
|
+
else {
|
|
3448
|
+
this.refreshAllLists();
|
|
3449
|
+
}
|
|
3414
3450
|
break;
|
|
3415
3451
|
case 'assignees':
|
|
3416
3452
|
if (this.invalidType === 'who') {
|
|
@@ -3418,13 +3454,19 @@
|
|
|
3418
3454
|
}
|
|
3419
3455
|
if (this.assigneeRadioSelect) {
|
|
3420
3456
|
this.responsibilityForm.assignees.list = this.setList(this.assigneesList, [selectedItems.employee_id], 'employee_id');
|
|
3421
|
-
if (this.responsibilityForm.program.length
|
|
3457
|
+
if (this.responsibilityForm.program.length) {
|
|
3458
|
+
this.refreshListsWhileProgramSelected();
|
|
3459
|
+
}
|
|
3460
|
+
else {
|
|
3422
3461
|
this.refreshAllLists();
|
|
3423
3462
|
}
|
|
3424
3463
|
}
|
|
3425
3464
|
else {
|
|
3426
3465
|
this.responsibilityForm.assignees.list = this.setList(this.assigneesList, selectedItems, 'my_member_id');
|
|
3427
|
-
if (
|
|
3466
|
+
if (this.responsibilityForm.program.length) {
|
|
3467
|
+
this.refreshListsWhileProgramSelected();
|
|
3468
|
+
}
|
|
3469
|
+
else {
|
|
3428
3470
|
this.refreshAllLists();
|
|
3429
3471
|
}
|
|
3430
3472
|
}
|
|
@@ -3454,14 +3496,14 @@
|
|
|
3454
3496
|
case 'program':
|
|
3455
3497
|
if (this.selectedProgram) {
|
|
3456
3498
|
this.responsibilityForm.category = (selectedItems.categories) ? selectedItems.categories : [];
|
|
3457
|
-
var categoryId = (
|
|
3458
|
-
if ((
|
|
3459
|
-
this.responsibilityForm.category_id = ((
|
|
3499
|
+
var categoryId = (_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _a === void 0 ? void 0 : _a.toString();
|
|
3500
|
+
if ((_b = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _b === void 0 ? void 0 : _b.length) {
|
|
3501
|
+
this.responsibilityForm.category_id = ((_c = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _c === void 0 ? void 0 : _c.category_id) + ',' + categoryId;
|
|
3460
3502
|
}
|
|
3461
3503
|
else {
|
|
3462
|
-
this.responsibilityForm.category_id = (
|
|
3504
|
+
this.responsibilityForm.category_id = (_e = (_d = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _d === void 0 ? void 0 : _d.category_id) === null || _e === void 0 ? void 0 : _e.toString();
|
|
3463
3505
|
}
|
|
3464
|
-
this.responsibilityForm.program_selected_ids = __spreadArray(__spreadArray([], __read(new Set(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories))), __read(new Set([(
|
|
3506
|
+
this.responsibilityForm.program_selected_ids = __spreadArray(__spreadArray([], __read(new Set(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories))), __read(new Set([(_f = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _f === void 0 ? void 0 : _f.category_id])));
|
|
3465
3507
|
}
|
|
3466
3508
|
else {
|
|
3467
3509
|
this.responsibilityForm.category = (selectedItems.categories) ? selectedItems.categories : [];
|
|
@@ -3470,15 +3512,15 @@
|
|
|
3470
3512
|
this.responsibilityForm.program_selected_ids = [];
|
|
3471
3513
|
this.responsibilityForm.customTags = [];
|
|
3472
3514
|
this.responsibilityForm.program = (selectedItems.program) ? [selectedItems.program] : [];
|
|
3473
|
-
var categoryId = (
|
|
3474
|
-
if ((
|
|
3475
|
-
this.responsibilityForm.category_id = ((
|
|
3515
|
+
var categoryId = (_g = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _g === void 0 ? void 0 : _g.toString();
|
|
3516
|
+
if ((_h = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories) === null || _h === void 0 ? void 0 : _h.length) {
|
|
3517
|
+
this.responsibilityForm.category_id = ((_j = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _j === void 0 ? void 0 : _j.category_id) + ',' + categoryId;
|
|
3476
3518
|
}
|
|
3477
3519
|
else {
|
|
3478
|
-
this.responsibilityForm.category_id = (
|
|
3520
|
+
this.responsibilityForm.category_id = (_l = (_k = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _k === void 0 ? void 0 : _k.category_id) === null || _l === void 0 ? void 0 : _l.toString();
|
|
3479
3521
|
}
|
|
3480
|
-
this.responsibilityForm.program_selected_ids = __spreadArray(__spreadArray([], __read(new Set(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.categories))), __read(new Set([(
|
|
3481
|
-
var programCustomTags = ((
|
|
3522
|
+
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])));
|
|
3523
|
+
var programCustomTags = ((_o = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _o === void 0 ? void 0 : _o.custom_tags) ? JSON.parse(selectedItems.program.custom_tags) : [];
|
|
3482
3524
|
programCustomTags.forEach(function (tag) {
|
|
3483
3525
|
var tagData = JSON.parse(tag);
|
|
3484
3526
|
var index = _this.responsibilityForm.customTags.findIndex(function (tagElement) { return tagElement.tag_name == tagData.tag_name; });
|
|
@@ -3486,11 +3528,11 @@
|
|
|
3486
3528
|
_this.responsibilityForm.customTags.push(tagData);
|
|
3487
3529
|
}
|
|
3488
3530
|
});
|
|
3489
|
-
this.responsibilityForm.formatAndEvidence.evidenceRequired = ((
|
|
3490
|
-
if ((
|
|
3531
|
+
this.responsibilityForm.formatAndEvidence.evidenceRequired = ((_p = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _p === void 0 ? void 0 : _p.evidence_upload_flag) ? true : false;
|
|
3532
|
+
if ((_q = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _q === void 0 ? void 0 : _q.evidence_upload_flag) {
|
|
3491
3533
|
this.moreOptions.FORMATE_EVIDENCE = true;
|
|
3492
3534
|
}
|
|
3493
|
-
if ((
|
|
3535
|
+
if ((_r = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.program) === null || _r === void 0 ? void 0 : _r._id) {
|
|
3494
3536
|
this.filterListsAccordingToProgram(selectedItems.program._id);
|
|
3495
3537
|
}
|
|
3496
3538
|
else {
|
|
@@ -3500,19 +3542,28 @@
|
|
|
3500
3542
|
break;
|
|
3501
3543
|
case 'reviewer':
|
|
3502
3544
|
this.responsibilityForm.reviewers.list = this.setList(this.reviewersList, selectedItems, 'employee_id');
|
|
3503
|
-
if (this.responsibilityForm.program.length
|
|
3545
|
+
if (this.responsibilityForm.program.length) {
|
|
3546
|
+
this.refreshListsWhileProgramSelected();
|
|
3547
|
+
}
|
|
3548
|
+
else {
|
|
3504
3549
|
this.refreshAllLists();
|
|
3505
3550
|
}
|
|
3506
3551
|
break;
|
|
3507
3552
|
case 'overseer':
|
|
3508
3553
|
this.responsibilityForm.overseers.list = this.setList(this.overseersList, selectedItems, 'employee_id');
|
|
3509
|
-
if (this.responsibilityForm.program.length
|
|
3554
|
+
if (this.responsibilityForm.program.length) {
|
|
3555
|
+
this.refreshListsWhileProgramSelected();
|
|
3556
|
+
}
|
|
3557
|
+
else {
|
|
3510
3558
|
this.refreshAllLists();
|
|
3511
3559
|
}
|
|
3512
3560
|
break;
|
|
3513
3561
|
case 'overseerNotify':
|
|
3514
3562
|
this.responsibilityForm.overseers.notifyList = this.setList(this.overseersList, selectedItems, 'employee_id');
|
|
3515
|
-
if (this.responsibilityForm.program.length
|
|
3563
|
+
if (this.responsibilityForm.program.length) {
|
|
3564
|
+
this.refreshListsWhileProgramSelected();
|
|
3565
|
+
}
|
|
3566
|
+
else {
|
|
3516
3567
|
this.refreshAllLists();
|
|
3517
3568
|
}
|
|
3518
3569
|
break;
|
|
@@ -3532,10 +3583,10 @@
|
|
|
3532
3583
|
this.responsibilityForm.riskMatrix = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.riskMatrix;
|
|
3533
3584
|
break;
|
|
3534
3585
|
case 'formate_evidence':
|
|
3535
|
-
this.responsibilityForm.formatAndEvidence.formatRequired = (
|
|
3536
|
-
this.responsibilityForm.formatAndEvidence.formatFiles = (
|
|
3537
|
-
this.responsibilityForm.formatAndEvidence.formatLinks = (
|
|
3538
|
-
this.responsibilityForm.formatAndEvidence.evidenceRequired = (
|
|
3586
|
+
this.responsibilityForm.formatAndEvidence.formatRequired = (_s = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isFormateUploaded) !== null && _s !== void 0 ? _s : false;
|
|
3587
|
+
this.responsibilityForm.formatAndEvidence.formatFiles = (_t = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.files) !== null && _t !== void 0 ? _t : [];
|
|
3588
|
+
this.responsibilityForm.formatAndEvidence.formatLinks = (_u = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.links) !== null && _u !== void 0 ? _u : [];
|
|
3589
|
+
this.responsibilityForm.formatAndEvidence.evidenceRequired = (_v = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.isEvidenceRequired) !== null && _v !== void 0 ? _v : false;
|
|
3539
3590
|
break;
|
|
3540
3591
|
case 'reviewFrequency':
|
|
3541
3592
|
this.responsibilityForm.reviewers.reviewFrequency = {
|
|
@@ -3559,33 +3610,50 @@
|
|
|
3559
3610
|
break;
|
|
3560
3611
|
case 'assignors':
|
|
3561
3612
|
this.responsibilityForm.assignors.list = [];
|
|
3562
|
-
this.
|
|
3613
|
+
if (this.responsibilityForm.program.length) {
|
|
3614
|
+
this.refreshListsWhileProgramSelected();
|
|
3615
|
+
}
|
|
3616
|
+
else {
|
|
3617
|
+
this.refreshAllLists();
|
|
3618
|
+
}
|
|
3563
3619
|
break;
|
|
3564
3620
|
case 'assignees':
|
|
3565
3621
|
var entrustIndex = this.responsibilityForm.assignees.list.findIndex(function (owner) { return owner.employee_id == event.employee_id; });
|
|
3566
3622
|
this.responsibilityForm.assignees.list.splice(entrustIndex, 1);
|
|
3567
|
-
if (this.responsibilityForm.program.length
|
|
3623
|
+
if (this.responsibilityForm.program.length) {
|
|
3624
|
+
this.refreshListsWhileProgramSelected();
|
|
3625
|
+
}
|
|
3626
|
+
else {
|
|
3568
3627
|
this.refreshAllLists();
|
|
3569
3628
|
}
|
|
3570
3629
|
break;
|
|
3571
3630
|
case 'reviewer':
|
|
3572
3631
|
var reviewerIndex = this.responsibilityForm.reviewers.list.findIndex(function (reviewer) { return reviewer.employee_id == event.employee_id; });
|
|
3573
3632
|
this.responsibilityForm.reviewers.list.splice(reviewerIndex, 1);
|
|
3574
|
-
if (this.responsibilityForm.program.length
|
|
3633
|
+
if (this.responsibilityForm.program.length) {
|
|
3634
|
+
this.refreshListsWhileProgramSelected();
|
|
3635
|
+
}
|
|
3636
|
+
else {
|
|
3575
3637
|
this.refreshAllLists();
|
|
3576
3638
|
}
|
|
3577
3639
|
break;
|
|
3578
3640
|
case 'overseer':
|
|
3579
3641
|
var overseerIndex = this.responsibilityForm.overseers.list.findIndex(function (overseer) { return overseer.employee_id == event.employee_id; });
|
|
3580
3642
|
this.responsibilityForm.overseers.list.splice(overseerIndex, 1);
|
|
3581
|
-
if (this.responsibilityForm.program.length
|
|
3643
|
+
if (this.responsibilityForm.program.length) {
|
|
3644
|
+
this.refreshListsWhileProgramSelected();
|
|
3645
|
+
}
|
|
3646
|
+
else {
|
|
3582
3647
|
this.refreshAllLists();
|
|
3583
3648
|
}
|
|
3584
3649
|
break;
|
|
3585
3650
|
case 'overseerNotifyList':
|
|
3586
3651
|
var overseerNotifyIndex = this.responsibilityForm.overseers.notifyList.findIndex(function (overseerN) { return overseerN.employee_id == event.employee_id; });
|
|
3587
3652
|
this.responsibilityForm.overseers.notifyList.splice(overseerNotifyIndex, 1);
|
|
3588
|
-
if (this.responsibilityForm.program.length
|
|
3653
|
+
if (this.responsibilityForm.program.length) {
|
|
3654
|
+
this.refreshListsWhileProgramSelected();
|
|
3655
|
+
}
|
|
3656
|
+
else {
|
|
3589
3657
|
this.refreshAllLists();
|
|
3590
3658
|
}
|
|
3591
3659
|
break;
|
|
@@ -3778,6 +3846,45 @@
|
|
|
3778
3846
|
this.reviewersList = allUsers.filter(function (user) { return !(overseerIds.includes(user.my_member_id) || assigneeIds.includes(user.my_member_id)); });
|
|
3779
3847
|
this.overseersList = allUsers.filter(function (user) { return !(assignorAndAssigneesIds.includes(user.my_member_id) || reviewersIds.includes(user.my_member_id)); });
|
|
3780
3848
|
};
|
|
3849
|
+
WorkflowComplianceComponent.prototype.refreshListsWhileProgramSelected = function () {
|
|
3850
|
+
var assignorAndAssigneesIds = [];
|
|
3851
|
+
var reviewersIds = [];
|
|
3852
|
+
var overseerIds = [];
|
|
3853
|
+
var assigneeIds = [];
|
|
3854
|
+
var behalfUsers = lodash.cloneDeep(this.behalfOfUsersList);
|
|
3855
|
+
var assignors = lodash.cloneDeep(this.responsibilityForm.assignors.list);
|
|
3856
|
+
var assignees = lodash.cloneDeep(this.responsibilityForm.assignees.list);
|
|
3857
|
+
var reviewers = lodash.cloneDeep(this.responsibilityForm.reviewers.list);
|
|
3858
|
+
var overseerList = lodash.cloneDeep(this.responsibilityForm.overseers.list);
|
|
3859
|
+
var notifyOverseers = lodash.cloneDeep(this.responsibilityForm.overseers.notifyList);
|
|
3860
|
+
assignors === null || assignors === void 0 ? void 0 : assignors.forEach(function (user) {
|
|
3861
|
+
assignorAndAssigneesIds.push(user.member_id);
|
|
3862
|
+
});
|
|
3863
|
+
assignees === null || assignees === void 0 ? void 0 : assignees.forEach(function (user) {
|
|
3864
|
+
assignorAndAssigneesIds.push(user.my_member_id);
|
|
3865
|
+
assigneeIds.push(user.my_member_id);
|
|
3866
|
+
});
|
|
3867
|
+
if (this.responsibilityForm.assignors.list.length == 0) {
|
|
3868
|
+
assignorAndAssigneesIds.push(this.memberId);
|
|
3869
|
+
}
|
|
3870
|
+
reviewers === null || reviewers === void 0 ? void 0 : reviewers.forEach(function (user) {
|
|
3871
|
+
reviewersIds.push(user.my_member_id);
|
|
3872
|
+
});
|
|
3873
|
+
overseerList === null || overseerList === void 0 ? void 0 : overseerList.forEach(function (user) {
|
|
3874
|
+
overseerIds.push(user.my_member_id);
|
|
3875
|
+
});
|
|
3876
|
+
notifyOverseers === null || notifyOverseers === void 0 ? void 0 : notifyOverseers.forEach(function (user) {
|
|
3877
|
+
overseerIds.push(user.my_member_id);
|
|
3878
|
+
});
|
|
3879
|
+
assignorAndAssigneesIds = __spreadArray([], __read(new Set(assignorAndAssigneesIds)));
|
|
3880
|
+
assigneeIds = __spreadArray([], __read(new Set(assigneeIds)));
|
|
3881
|
+
reviewersIds = __spreadArray([], __read(new Set(reviewersIds)));
|
|
3882
|
+
overseerIds = __spreadArray([], __read(new Set(overseerIds)));
|
|
3883
|
+
this.assignorsList = behalfUsers.filter(function (user) { return !(overseerIds.includes(user.member_id)); });
|
|
3884
|
+
this.assigneesList = this.programPeopleList.assigneesList.filter(function (user) { return !(reviewersIds.includes(user.my_member_id) || overseerIds.includes(user.my_member_id)); });
|
|
3885
|
+
this.reviewersList = this.programPeopleList.reviewersList.filter(function (user) { return !(overseerIds.includes(user.my_member_id) || assigneeIds.includes(user.my_member_id)); });
|
|
3886
|
+
this.overseersList = this.programPeopleList.overseersList.filter(function (user) { return !(assignorAndAssigneesIds.includes(user.my_member_id) || reviewersIds.includes(user.my_member_id)); });
|
|
3887
|
+
};
|
|
3781
3888
|
WorkflowComplianceComponent.prototype.submitResponsibility = function () {
|
|
3782
3889
|
var valid = this.validateResponsibility();
|
|
3783
3890
|
if (!valid) {
|
|
@@ -4547,7 +4654,6 @@
|
|
|
4547
4654
|
// TODO: select Assessment list and set id to payload
|
|
4548
4655
|
WorkflowComplianceComponent.prototype.onAssessmentSelect = function (event) {
|
|
4549
4656
|
this.isAssessment = false;
|
|
4550
|
-
debugger;
|
|
4551
4657
|
this.responsibilityForm.assessment = event;
|
|
4552
4658
|
};
|
|
4553
4659
|
// TODO: Populate assessment data from already selected data
|