Group approval ui (#8184)
* Added all ui components back * Added group ui items back and initial group approval directive * Added ability to mark tasks as requires approval. Added approvals ctrl. Added get approvals method to tasks service * Added approval list view with approving functionality * Added error to produce message when task requests approval * Added notification display for group approvals * Fixed notification read and adding task * Fixed syncing with group approval required * Added group id to notifications for redirect on client side * Fixed approval request tests * Fixed linting issues * Removed expectation from beforeEach * Moved string to locale * Added eslint ignore * Updated notification for group approved, added new icons, and updated styles * Hid group plan ui
This commit is contained in:
committed by
Matteo Pagliazzi
parent
3ff7692528
commit
13df60e0dd
@@ -225,7 +225,10 @@ api.approveTask = {
|
||||
task.group.approval.approvingUser = user._id;
|
||||
task.group.approval.approved = true;
|
||||
|
||||
assignedUser.addNotification('GROUP_TASK_APPROVAL', {message: res.t('yourTaskHasBeenApproved')});
|
||||
assignedUser.addNotification('GROUP_TASK_APPROVED', {
|
||||
message: res.t('yourTaskHasBeenApproved'),
|
||||
groupId: group._id,
|
||||
});
|
||||
|
||||
await Bluebird.all([assignedUser.save(), task.save()]);
|
||||
|
||||
@@ -266,7 +269,9 @@ api.getGroupApprovals = {
|
||||
'group.id': groupId,
|
||||
'group.approval.approved': false,
|
||||
'group.approval.requested': true,
|
||||
}, 'userId group').exec();
|
||||
}, 'userId group text')
|
||||
.populate('userId', 'profile')
|
||||
.exec();
|
||||
|
||||
res.respond(200, approvals);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user