1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 15:49:46 +02:00

feat: Persist closed state per card

This commit is contained in:
Maksim Eltyshev 2025-07-09 17:45:47 +02:00
parent 69c75a03b1
commit 709a0d1758
19 changed files with 163 additions and 71 deletions

View file

@ -33,6 +33,28 @@ module.exports = {
async fn(inputs) {
const { values } = inputs;
if (values.type) {
let isClosed;
if (values.type === List.Types.CLOSED) {
if (inputs.record.type === List.Types.ACTIVE) {
isClosed = true;
}
} else if (inputs.record.type === List.Types.CLOSED) {
isClosed = false;
}
if (!_.isUndefined(isClosed)) {
await Card.qm.update(
{
listId: inputs.record.id,
},
{
isClosed,
},
);
}
}
if (!_.isUndefined(values.position)) {
const lists = await sails.helpers.boards.getFiniteListsById(
inputs.board.id,