Add week of year toggle state in user model

This commit is contained in:
Nadav Tasher 2025-01-01 21:12:04 +02:00
parent 7df278e805
commit 99e579f47d

View file

@ -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 {