|
@@ -190,6 +190,13 @@ Users.attachSchema(
|
|
type: Number,
|
|
type: Number,
|
|
optional: true,
|
|
optional: true,
|
|
},
|
|
},
|
|
|
|
+ 'profile.startDayOfWeek': {
|
|
|
|
+ /**
|
|
|
|
+ * startDayOfWeek field of the user
|
|
|
|
+ */
|
|
|
|
+ type: Number,
|
|
|
|
+ optional: true,
|
|
|
|
+ },
|
|
'profile.starredBoards': {
|
|
'profile.starredBoards': {
|
|
/**
|
|
/**
|
|
* list of starred board IDs
|
|
* list of starred board IDs
|
|
@@ -521,6 +528,11 @@ Users.helpers({
|
|
return profile.language || 'en';
|
|
return profile.language || 'en';
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ getStartDayOfWeek() {
|
|
|
|
+ const profile = this.profile || {};
|
|
|
|
+ return profile.startDayOfWeek || 1;
|
|
|
|
+ },
|
|
|
|
+
|
|
getTemplatesBoardId() {
|
|
getTemplatesBoardId() {
|
|
return (this.profile || {}).templatesBoardId;
|
|
return (this.profile || {}).templatesBoardId;
|
|
},
|
|
},
|
|
@@ -652,6 +664,10 @@ Users.mutations({
|
|
return { $set: { 'profile.showCardsCountAt': limit } };
|
|
return { $set: { 'profile.showCardsCountAt': limit } };
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ setStartDayOfWeek(startDay) {
|
|
|
|
+ return { $set: { 'profile.startDayOfWeek': startDay } };
|
|
|
|
+ },
|
|
|
|
+
|
|
setBoardView(view) {
|
|
setBoardView(view) {
|
|
return {
|
|
return {
|
|
$set: {
|
|
$set: {
|
|
@@ -682,6 +698,10 @@ Meteor.methods({
|
|
check(limit, Number);
|
|
check(limit, Number);
|
|
Meteor.user().setShowCardsCountAt(limit);
|
|
Meteor.user().setShowCardsCountAt(limit);
|
|
},
|
|
},
|
|
|
|
+ changeStartDayOfWeek(startDay) {
|
|
|
|
+ check(startDay, Number);
|
|
|
|
+ Meteor.user().setStartDayOfWeek(startDay);
|
|
|
|
+ },
|
|
});
|
|
});
|
|
|
|
|
|
if (Meteor.isServer) {
|
|
if (Meteor.isServer) {
|