1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00

feat: Add tasks reordering

Closes #50, closes #232
This commit is contained in:
Maksim Eltyshev 2022-07-21 11:31:05 +02:00
parent a6a836c9a0
commit f8f2d7345e
27 changed files with 341 additions and 94 deletions

View file

@ -5,11 +5,23 @@ module.exports = {
custom: (value) => _.isString(value) || _.every(value, _.isString),
required: true,
},
exceptTaskIdOrIds: {
type: 'json',
custom: (value) => _.isString(value) || _.every(value, _.isString),
},
},
async fn(inputs) {
return sails.helpers.tasks.getMany({
const criteria = {
cardId: inputs.idOrIds,
});
};
if (!_.isUndefined(inputs.exceptTaskIdOrIds)) {
criteria.id = {
'!=': inputs.exceptTaskIdOrIds,
};
}
return sails.helpers.tasks.getMany(criteria);
},
};