mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
feat: Log action when user is removed from card
This commit is contained in:
parent
eeb52d19bb
commit
3aedbff5d0
9 changed files with 86 additions and 17 deletions
|
@ -9,6 +9,10 @@ module.exports = {
|
|||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
user: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
project: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
|
@ -52,6 +56,7 @@ module.exports = {
|
|||
buildData: () => ({
|
||||
item: cardMembership,
|
||||
included: {
|
||||
users: [inputs.user],
|
||||
projects: [inputs.project],
|
||||
boards: [inputs.board],
|
||||
lists: [inputs.list],
|
||||
|
@ -75,6 +80,20 @@ module.exports = {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
await sails.helpers.actions.createOne.with({
|
||||
values: {
|
||||
type: Action.Types.REMOVE_MEMBER_FROM_CARD,
|
||||
data: {
|
||||
user: _.pick(inputs.user, ['id', 'name']),
|
||||
},
|
||||
user: inputs.actorUser,
|
||||
card: inputs.card,
|
||||
},
|
||||
project: inputs.project,
|
||||
board: inputs.board,
|
||||
list: inputs.list,
|
||||
});
|
||||
}
|
||||
|
||||
return cardMembership;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue