@@ -113,7 +113,7 @@ export function* handleCardsUpdate(cards, activities) {
|
||||
yield put(actions.handleCardsUpdate(cards, activities));
|
||||
}
|
||||
|
||||
export function* createCard(listId, data, autoOpen) {
|
||||
export function* createCard(listId, data, index, autoOpen) {
|
||||
const localId = yield call(createLocalId);
|
||||
const list = yield select(selectors.selectListById, listId);
|
||||
|
||||
@@ -127,7 +127,7 @@ export function* createCard(listId, data, autoOpen) {
|
||||
};
|
||||
|
||||
if (isListFinite(list)) {
|
||||
nextData.position = yield select(selectors.selectNextCardPosition, listId);
|
||||
nextData.position = yield select(selectors.selectNextCardPosition, listId, index);
|
||||
}
|
||||
|
||||
yield put(
|
||||
@@ -167,16 +167,16 @@ export function* createCard(listId, data, autoOpen) {
|
||||
}
|
||||
}
|
||||
|
||||
export function* createCardInFirstFiniteList(data, index, autoOpen) {
|
||||
const firstFiniteListId = yield select(selectors.selectFirstFiniteListId);
|
||||
|
||||
yield call(createCard, firstFiniteListId, data, index, autoOpen);
|
||||
}
|
||||
|
||||
export function* createCardInCurrentList(data, autoOpen) {
|
||||
const currentListId = yield select(selectors.selectCurrentListId);
|
||||
|
||||
yield call(createCard, currentListId, data, autoOpen);
|
||||
}
|
||||
|
||||
export function* createCardInFirstFiniteList(data, autoOpen) {
|
||||
const firstFiniteListId = yield select(selectors.selectFirstFiniteListId);
|
||||
|
||||
yield call(createCard, firstFiniteListId, data, autoOpen);
|
||||
yield call(createCard, currentListId, data, undefined, autoOpen);
|
||||
}
|
||||
|
||||
export function* handleCardCreate(card) {
|
||||
@@ -596,9 +596,9 @@ export default {
|
||||
fetchCardsInCurrentList,
|
||||
handleCardsUpdate,
|
||||
createCard,
|
||||
createCardInFirstFiniteList,
|
||||
createCardInCurrentList,
|
||||
handleCardCreate,
|
||||
createCardInFirstFiniteList,
|
||||
updateCard,
|
||||
updateCurrentCard,
|
||||
handleCardUpdate,
|
||||
|
||||
Reference in New Issue
Block a user