mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
Added Date Format setting to Opened Card.
Thanks to xet7 ! Fixes #2011, fixes #1176
This commit is contained in:
parent
516552cce6
commit
2dd3916f7e
8 changed files with 161 additions and 13 deletions
|
|
@ -465,6 +465,15 @@ Users.attachSchema(
|
|||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
'profile.dateFormat': {
|
||||
/**
|
||||
* User-specified date format for displaying dates (includes time HH:MM).
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
allowedValues: ['YYYY-MM-DD', 'DD-MM-YYYY', 'MM-DD-YYYY'],
|
||||
defaultValue: 'YYYY-MM-DD',
|
||||
},
|
||||
'profile.zoomLevel': {
|
||||
/**
|
||||
* User-specified zoom level for board view (1.0 = 100%, 1.5 = 150%, etc.)
|
||||
|
|
@ -1049,6 +1058,11 @@ Users.helpers({
|
|||
return profile.startDayOfWeek;
|
||||
},
|
||||
|
||||
getDateFormat() {
|
||||
const profile = this.profile || {};
|
||||
return profile.dateFormat || 'YYYY-MM-DD';
|
||||
},
|
||||
|
||||
getTemplatesBoardId() {
|
||||
return (this.profile || {}).templatesBoardId;
|
||||
},
|
||||
|
|
@ -1452,6 +1466,14 @@ Users.mutations({
|
|||
};
|
||||
},
|
||||
|
||||
setDateFormat(dateFormat) {
|
||||
return {
|
||||
$set: {
|
||||
'profile.dateFormat': dateFormat,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
setBoardView(view) {
|
||||
return {
|
||||
$set: {
|
||||
|
|
@ -1597,6 +1619,10 @@ Meteor.methods({
|
|||
check(startDay, Number);
|
||||
ReactiveCache.getCurrentUser().setStartDayOfWeek(startDay);
|
||||
},
|
||||
changeDateFormat(dateFormat) {
|
||||
check(dateFormat, String);
|
||||
ReactiveCache.getCurrentUser().setDateFormat(dateFormat);
|
||||
},
|
||||
applyListWidth(boardId, listId, width, constraint) {
|
||||
check(boardId, String);
|
||||
check(listId, String);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue