|
|
|
@ -184,6 +184,13 @@ Users.attachSchema( |
|
|
|
|
type: Boolean, |
|
|
|
|
optional: true, |
|
|
|
|
}, |
|
|
|
|
'profile.customFieldsGrid': { |
|
|
|
|
/** |
|
|
|
|
* has user at card Custom Fields have Grid (false) or one per row (true) layout? |
|
|
|
|
*/ |
|
|
|
|
type: Boolean, |
|
|
|
|
optional: true, |
|
|
|
|
}, |
|
|
|
|
'profile.hiddenSystemMessages': { |
|
|
|
|
/** |
|
|
|
|
* does the user want to hide system messages? |
|
|
|
@ -652,6 +659,11 @@ Users.helpers({ |
|
|
|
|
return profile.hiddenSystemMessages || false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
hasCustomFieldsGrid() { |
|
|
|
|
const profile = this.profile || {}; |
|
|
|
|
return profile.customFieldsGrid || false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
hasCardMaximized() { |
|
|
|
|
const profile = this.profile || {}; |
|
|
|
|
return profile.cardMaximized || false; |
|
|
|
@ -809,6 +821,14 @@ Users.mutations({ |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
toggleFieldsGrid(value = false) { |
|
|
|
|
return { |
|
|
|
|
$set: { |
|
|
|
|
'profile.customFieldsGrid': !value, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
toggleCardMaximized(value = false) { |
|
|
|
|
return { |
|
|
|
|
$set: { |
|
|
|
@ -911,6 +931,10 @@ Meteor.methods({ |
|
|
|
|
const user = Meteor.user(); |
|
|
|
|
user.toggleSystem(user.hasHiddenSystemMessages()); |
|
|
|
|
}, |
|
|
|
|
toggleCustomFieldsGrid() { |
|
|
|
|
const user = Meteor.user(); |
|
|
|
|
user.toggleFieldsGrid(user.hasCustomFieldsGrid()); |
|
|
|
|
}, |
|
|
|
|
toggleCardMaximized() { |
|
|
|
|
const user = Meteor.user(); |
|
|
|
|
user.toggleCardMaximized(user.hasCardMaximized()); |
|
|
|
|