1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00
planka/client/src/actions/entry/card.js

46 lines
796 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
import EntryActionTypes from '../../constants/EntryActionTypes';
export const createCard = (listId, data) => ({
type: EntryActionTypes.CARD_CREATE,
payload: {
listId,
data,
},
});
export const updateCard = (id, data) => ({
type: EntryActionTypes.CARD_UPDATE,
payload: {
id,
data,
},
});
2020-03-25 00:15:47 +05:00
export const updateCurrentCard = (data) => ({
2019-08-31 04:07:25 +05:00
type: EntryActionTypes.CURRENT_CARD_UPDATE,
payload: {
data,
},
});
export const moveCard = (id, listId, index) => ({
type: EntryActionTypes.CARD_MOVE,
payload: {
id,
listId,
index,
},
});
2020-03-25 00:15:47 +05:00
export const deleteCard = (id) => ({
2019-08-31 04:07:25 +05:00
type: EntryActionTypes.CARD_DELETE,
payload: {
id,
},
});
export const deleteCurrentCard = () => ({
type: EntryActionTypes.CURRENT_CARD_DELETE,
payload: {},
});