mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Add week of year toggle state in user model
This commit is contained in:
parent
7df278e805
commit
99e579f47d
1 changed files with 20 additions and 0 deletions
|
@ -458,6 +458,13 @@ Users.attachSchema(
|
|||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
'profile.showWeekOfYear': {
|
||||
/**
|
||||
* User-specified state of week-of-year in date displays.
|
||||
*/
|
||||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
services: {
|
||||
/**
|
||||
* services field of the user
|
||||
|
@ -978,6 +985,11 @@ Users.helpers({
|
|||
return verticalScrollbars;
|
||||
},
|
||||
|
||||
isShowWeekOfYear() {
|
||||
const { showWeekOfYear = true } = this.profile || {};
|
||||
return showWeekOfYear;
|
||||
},
|
||||
|
||||
remove() {
|
||||
User.remove({
|
||||
_id: this._id,
|
||||
|
@ -1058,6 +1070,14 @@ Users.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
toggleShowWeekOfYear() {
|
||||
const { showWeekOfYear = true } = this.profile || {};
|
||||
return {
|
||||
$set: {
|
||||
'profile.showWeekOfYear': !showWeekOfYear,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addInvite(boardId) {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue