mirror of
https://github.com/plankanban/planka.git
synced 2025-07-25 08:09:44 +02:00
46 lines
891 B
JavaScript
46 lines
891 B
JavaScript
import ActionTypes from '../constants/ActionTypes';
|
|
|
|
const handleNotificationCreate = (notification, users, cards, activities) => ({
|
|
type: ActionTypes.NOTIFICATION_CREATE_HANDLE,
|
|
payload: {
|
|
notification,
|
|
users,
|
|
cards,
|
|
activities,
|
|
},
|
|
});
|
|
|
|
const deleteNotification = (id) => ({
|
|
type: ActionTypes.NOTIFICATION_DELETE,
|
|
payload: {
|
|
id,
|
|
},
|
|
});
|
|
|
|
deleteNotification.success = (notification) => ({
|
|
type: ActionTypes.NOTIFICATION_DELETE__SUCCESS,
|
|
payload: {
|
|
notification,
|
|
},
|
|
});
|
|
|
|
deleteNotification.failure = (id, error) => ({
|
|
type: ActionTypes.NOTIFICATION_DELETE__FAILURE,
|
|
payload: {
|
|
id,
|
|
error,
|
|
},
|
|
});
|
|
|
|
const handleNotificationDelete = (notification) => ({
|
|
type: ActionTypes.NOTIFICATION_DELETE_HANDLE,
|
|
payload: {
|
|
notification,
|
|
},
|
|
});
|
|
|
|
export default {
|
|
handleNotificationCreate,
|
|
deleteNotification,
|
|
handleNotificationDelete,
|
|
};
|