mirror of
https://github.com/plankanban/planka.git
synced 2025-12-27 01:11:50 +03:00
ref: Remove board types, refactoring
This commit is contained in:
@@ -12,7 +12,6 @@ export function* createCard(listId, data) {
|
||||
|
||||
const nextData = {
|
||||
...data,
|
||||
listId,
|
||||
position: yield select(selectors.selectNextCardPosition, listId),
|
||||
};
|
||||
|
||||
@@ -22,13 +21,14 @@ export function* createCard(listId, data) {
|
||||
actions.createCard({
|
||||
...nextData,
|
||||
boardId,
|
||||
listId,
|
||||
id: localId,
|
||||
}),
|
||||
);
|
||||
|
||||
let card;
|
||||
try {
|
||||
({ item: card } = yield call(request, api.createCard, boardId, nextData));
|
||||
({ item: card } = yield call(request, api.createCard, listId, nextData));
|
||||
} catch (error) {
|
||||
yield put(actions.createCard.failure(localId, error));
|
||||
return;
|
||||
@@ -61,8 +61,9 @@ export function* updateCurrentCard(data) {
|
||||
yield call(updateCard, cardId, data);
|
||||
}
|
||||
|
||||
// TODO: handle card transfer
|
||||
export function* handleCardUpdate(card) {
|
||||
yield put(actions.handleCardUpdate(card)); // TODO: handle card transfer
|
||||
yield put(actions.handleCardUpdate(card));
|
||||
}
|
||||
|
||||
export function* moveCard(id, listId, index) {
|
||||
|
||||
@@ -39,8 +39,8 @@ export function* createListInCurrentBoard(data) {
|
||||
yield call(createList, boardId, data);
|
||||
}
|
||||
|
||||
export function* handleListCreate(label) {
|
||||
yield put(actions.handleListCreate(label));
|
||||
export function* handleListCreate(list) {
|
||||
yield put(actions.handleListCreate(list));
|
||||
}
|
||||
|
||||
export function* updateList(id, data) {
|
||||
@@ -57,8 +57,8 @@ export function* updateList(id, data) {
|
||||
yield put(actions.updateList.success(list));
|
||||
}
|
||||
|
||||
export function* handleListUpdate(label) {
|
||||
yield put(actions.handleListUpdate(label));
|
||||
export function* handleListUpdate(list) {
|
||||
yield put(actions.handleListUpdate(list));
|
||||
}
|
||||
|
||||
export function* moveList(id, index) {
|
||||
@@ -84,8 +84,8 @@ export function* deleteList(id) {
|
||||
yield put(actions.deleteList.success(list));
|
||||
}
|
||||
|
||||
export function* handleListDelete(label) {
|
||||
yield put(actions.handleListDelete(label));
|
||||
export function* handleListDelete(list) {
|
||||
yield put(actions.handleListDelete(list));
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user