fix(claiming): better sync and notif handling
This commit is contained in:
@@ -33,7 +33,7 @@ export function loadAsyncResource ({store, path, url, deserialize, forceLoad = f
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (loadingStatus === 'NOT_LOADED' || loadingStatus === 'LOADED' && forceLoad) {
|
||||
} else if (loadingStatus === 'NOT_LOADED' || forceLoad) {
|
||||
return axios.get(url).then(response => { // TODO support more params
|
||||
resource.loadingStatus = 'LOADED';
|
||||
// deserialize can be a promise
|
||||
|
||||
@@ -331,6 +331,7 @@ api.approveTask = {
|
||||
// Remove old notifications
|
||||
let approvalPromises = [];
|
||||
managers.forEach((manager) => {
|
||||
if (manager._id === task.group.approval.approvingUser) return;
|
||||
let notificationIndex = manager.notifications.findIndex(function findNotification (notification) {
|
||||
return notification && notification.data && notification.data.taskId === task._id && notification.type === 'GROUP_TASK_APPROVAL';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user