1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-26 16:49:45 +02:00

fix: Use creation timestamp instead of id for ordering

Closes #465
This commit is contained in:
Maksim Eltyshev 2023-06-13 00:19:17 +02:00
parent 8578883fac
commit 21504c06a6
18 changed files with 219 additions and 301 deletions

View file

@ -1,12 +1,20 @@
import socket from './socket';
import http from './http';
import { transformUser } from './users';
import { transformBoardMembership } from './board-memberships';
import { transformCard } from './cards';
import { transformAttachment } from './attachments';
/* Actions */
const createBoard = (projectId, data, headers) =>
socket.post(`/projects/${projectId}/boards`, data, headers);
socket.post(`/projects/${projectId}/boards`, data, headers).then((body) => ({
...body,
included: {
...body.included,
boardMemberships: body.included.boardMemberships.map(transformBoardMembership),
},
}));
const createBoardWithImport = (projectId, data, requestId, headers) =>
http.post(`/projects/${projectId}/boards?requestId=${requestId}`, data, headers);
@ -18,6 +26,8 @@ const getBoard = (id, subscribe, headers) =>
...body,
included: {
...body.included,
users: body.included.users.map(transformUser),
boardMemberships: body.included.boardMemberships.map(transformBoardMembership),
cards: body.included.cards.map(transformCard),
attachments: body.included.attachments.map(transformAttachment),
},