WIP(teams): fixes, beta banner
This commit is contained in:
@@ -654,7 +654,7 @@ api.updateTask = {
|
||||
// the other of the keys when using .toObject()
|
||||
// see https://github.com/Automattic/mongoose/issues/2749
|
||||
|
||||
if (sanitizedObj.managerNotes) {
|
||||
if (Object.prototype.hasOwnProperty.call(sanitizedObj, 'managerNotes')) {
|
||||
task.group.managerNotes = sanitizedObj.managerNotes;
|
||||
}
|
||||
|
||||
|
||||
@@ -377,6 +377,21 @@ async function scoreTask (user, task, direction, req, res) {
|
||||
|
||||
if (rollbackUser) {
|
||||
delta = shared.ops.scoreTask({ task, user: rollbackUser, direction }, req, res.analytics);
|
||||
rollbackUser.addNotification('GROUP_TASK_NEEDS_WORK', {
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.profile.name }, rollbackUser.preferences.language),
|
||||
task: {
|
||||
id: task._id,
|
||||
text: task.text,
|
||||
},
|
||||
group: {
|
||||
id: group._id,
|
||||
name: group.name,
|
||||
},
|
||||
manager: {
|
||||
id: user._id,
|
||||
name: user.profile.name,
|
||||
},
|
||||
});
|
||||
await rollbackUser.save();
|
||||
} else {
|
||||
delta = shared.ops.scoreTask({ task, user, direction }, req, res.analytics);
|
||||
|
||||
Reference in New Issue
Block a user