mirror of
https://github.com/plankanban/planka.git
synced 2025-08-10 16:05:35 +02:00
Fixed sorting of tasks to be added in same order as in original card when copying cards.
This commit is contained in:
parent
ff511d0b9e
commit
50c7f4a490
1 changed files with 12 additions and 4 deletions
|
@ -7,10 +7,18 @@ import api from '../../../api';
|
|||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createTask(cardId, data) {
|
||||
const nextData = {
|
||||
...data,
|
||||
position: yield select(selectors.selectNextTaskPosition, cardId),
|
||||
};
|
||||
let nextData = {};
|
||||
if (data.position) {
|
||||
nextData = {
|
||||
...data,
|
||||
position: data.position,
|
||||
};
|
||||
} else {
|
||||
nextData = {
|
||||
...data,
|
||||
position: yield select(selectors.selectNextTaskPosition, cardId),
|
||||
};
|
||||
}
|
||||
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue