mirror of
https://github.com/wekan/wekan.git
synced 2026-02-23 16:34:06 +01: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,
|
type: Boolean,
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
|
'profile.showWeekOfYear': {
|
||||||
|
/**
|
||||||
|
* User-specified state of week-of-year in date displays.
|
||||||
|
*/
|
||||||
|
type: Boolean,
|
||||||
|
defaultValue: true,
|
||||||
|
},
|
||||||
services: {
|
services: {
|
||||||
/**
|
/**
|
||||||
* services field of the user
|
* services field of the user
|
||||||
|
|
@ -978,6 +985,11 @@ Users.helpers({
|
||||||
return verticalScrollbars;
|
return verticalScrollbars;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isShowWeekOfYear() {
|
||||||
|
const { showWeekOfYear = true } = this.profile || {};
|
||||||
|
return showWeekOfYear;
|
||||||
|
},
|
||||||
|
|
||||||
remove() {
|
remove() {
|
||||||
User.remove({
|
User.remove({
|
||||||
_id: this._id,
|
_id: this._id,
|
||||||
|
|
@ -1058,6 +1070,14 @@ Users.mutations({
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
toggleShowWeekOfYear() {
|
||||||
|
const { showWeekOfYear = true } = this.profile || {};
|
||||||
|
return {
|
||||||
|
$set: {
|
||||||
|
'profile.showWeekOfYear': !showWeekOfYear,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
addInvite(boardId) {
|
addInvite(boardId) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue