mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 19:00:12 +01:00
Added "Move Checklist" to checklist menu action
This commit is contained in:
parent
395452b54f
commit
a66257ec21
5 changed files with 274 additions and 1 deletions
|
|
@ -252,6 +252,38 @@ Users.attachSchema(
|
|||
*/
|
||||
type: String,
|
||||
},
|
||||
'profile.moveChecklistDialog' : {
|
||||
/**
|
||||
* move and copy card dialog
|
||||
*/
|
||||
type: Object,
|
||||
optional: true,
|
||||
blackbox: true,
|
||||
},
|
||||
'profile.moveChecklistDialog.$.boardId': {
|
||||
/**
|
||||
* last selected board id
|
||||
*/
|
||||
type: String,
|
||||
},
|
||||
'profile.moveChecklistDialog.$.swimlaneId': {
|
||||
/**
|
||||
* last selected swimlane id
|
||||
*/
|
||||
type: String,
|
||||
},
|
||||
'profile.moveChecklistDialog.$.listId': {
|
||||
/**
|
||||
* last selected list id
|
||||
*/
|
||||
type: String,
|
||||
},
|
||||
'profile.moveChecklistDialog.$.cardId': {
|
||||
/**
|
||||
* last selected card id
|
||||
*/
|
||||
type: String,
|
||||
},
|
||||
'profile.notifications': {
|
||||
/**
|
||||
* enabled notifications for the user
|
||||
|
|
@ -653,6 +685,17 @@ Users.helpers({
|
|||
return _ret;
|
||||
},
|
||||
|
||||
/** returns all confirmed move checklist dialog field values
|
||||
* <li> the board, swimlane, list and card id is stored for each board
|
||||
*/
|
||||
getMoveChecklistDialogOptions() {
|
||||
let _ret = {}
|
||||
if (this.profile && this.profile.moveChecklistDialog) {
|
||||
_ret = this.profile.moveChecklistDialog;
|
||||
}
|
||||
return _ret;
|
||||
},
|
||||
|
||||
hasTag(tag) {
|
||||
const { tags = [] } = this.profile || {};
|
||||
return _.contains(tags, tag);
|
||||
|
|
@ -781,6 +824,19 @@ Users.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
/** set the confirmed board id/swimlane id/list id/card id of a board
|
||||
* @param boardId the current board id
|
||||
* @param options an object with the confirmed field values
|
||||
*/
|
||||
setMoveChecklistDialogOption(boardId, options) {
|
||||
let currentOptions = this.getMoveChecklistDialogOptions();
|
||||
currentOptions[boardId] = options;
|
||||
return {
|
||||
$set: {
|
||||
'profile.moveChecklistDialog': currentOptions,
|
||||
},
|
||||
};
|
||||
},
|
||||
toggleBoardStar(boardId) {
|
||||
const queryKind = this.hasStarred(boardId) ? '$pull' : '$addToSet';
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue