mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
At opened card, toggle to show checklist at minicard. Part 1.
Thanks to xet7 !
This commit is contained in:
parent
66fa59d715
commit
2a190fdc19
5 changed files with 49 additions and 1 deletions
|
|
@ -27,6 +27,14 @@ Checklists.attachSchema(
|
|||
type: Date,
|
||||
optional: true,
|
||||
},
|
||||
showAtMinicard: {
|
||||
/**
|
||||
* Show at minicard. Default: false.
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
defaultValue: false,
|
||||
},
|
||||
createdAt: {
|
||||
/**
|
||||
* Creation date of the checklist
|
||||
|
|
@ -134,6 +142,9 @@ Checklists.helpers({
|
|||
const items = ReactiveCache.getChecklist({ _id: this._id }).items;
|
||||
return _.pluck(items, '_id').indexOf(itemId);
|
||||
},
|
||||
hasShowChecklistAtMinicard() {
|
||||
return showAtMinicard || false;
|
||||
},
|
||||
});
|
||||
|
||||
Checklists.allow({
|
||||
|
|
@ -191,6 +202,15 @@ Checklists.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
|
||||
toggleShowChecklistAtMinicard() {
|
||||
const value = this.hasShowChecklistAtMinicard();
|
||||
return {
|
||||
$set: {
|
||||
'showAtMinicard': !value,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue