Move cards between boards and projects

This commit is contained in:
Maksim Eltyshev
2020-05-05 01:30:06 +05:00
parent ba2017705b
commit b1d187476d
24 changed files with 474 additions and 16 deletions
+23
View File
@@ -45,6 +45,29 @@ export function* moveCardService(id, listId, index) {
});
}
export function* moveCurrentCardService(listId, index) {
const { cardId } = yield select(pathSelector);
yield call(moveCardService, cardId, listId, index);
}
export function* transferCardService(id, boardId, listId, index) {
const position = yield select(nextCardPositionSelector, listId, index, id);
yield call(updateCardService, id, {
boardId,
listId,
position,
});
}
export function* transferCurrentCardService(boardId, listId, index) {
const { cardId, boardId: currentBoardId } = yield select(pathSelector);
yield call(goToBoardService, currentBoardId);
yield call(transferCardService, cardId, boardId, listId, index);
}
export function* deleteCardService(id) {
const { cardId, boardId } = yield select(pathSelector);