1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-25 16:19:47 +02:00

feat: Sort cards within list (#717)

Closes #390
This commit is contained in:
Samuel 2024-04-22 21:56:07 +02:00 committed by GitHub
parent 2c84316fe0
commit 934dcdf39b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 419 additions and 18 deletions

View file

@ -164,6 +164,14 @@ export default class extends BaseModel {
Card.withId(payload.cardLabel.cardId).labels.remove(payload.cardLabel.labelId);
} catch {} // eslint-disable-line no-empty
break;
case ActionTypes.LIST_SORT__SUCCESS:
case ActionTypes.LIST_SORT_HANDLE:
case ActionTypes.NOTIFICATION_CREATE_HANDLE:
payload.cards.forEach((card) => {
Card.upsert(card);
});
break;
case ActionTypes.CARD_CREATE:
case ActionTypes.CARD_UPDATE__SUCCESS:
@ -282,12 +290,6 @@ export default class extends BaseModel {
break;
}
case ActionTypes.NOTIFICATION_CREATE_HANDLE:
payload.cards.forEach((card) => {
Card.upsert(card);
});
break;
default:
}
}