ref: Remove board types, refactoring

This commit is contained in:
Maksim Eltyshev
2022-12-26 21:10:50 +01:00
parent d39da61295
commit 5cd025ffb7
182 changed files with 1573 additions and 1239 deletions

View File

@@ -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) {

View File

@@ -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 {