summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-03-26 19:04:02 +0000
committerRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-03-26 20:51:24 +0000
commit07217d0e5142028bbe794bdd3611e47890ab4bfb (patch)
treedf4747598115c2daf6813d004bcd48a7446a48ad /models
parent80941e57d39138338761311964dc32ad25fd34ad (diff)
downloadwekan-07217d0e5142028bbe794bdd3611e47890ab4bfb.tar.gz
wekan-07217d0e5142028bbe794bdd3611e47890ab4bfb.tar.bz2
wekan-07217d0e5142028bbe794bdd3611e47890ab4bfb.zip
Add additional dates (received & end), default title of checklists to 'Checklist'
Remove translations Add additional dates (received & end), default name checklists to Checklist
Diffstat (limited to 'models')
-rw-r--r--models/cards.js24
-rw-r--r--models/checklists.js1
2 files changed, 25 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 8fd15488..4a662953 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -59,6 +59,10 @@ Cards.attachSchema(new SimpleSchema({
type: [String],
optional: true,
},
+ receivedAt: {
+ type: Date,
+ optional: true,
+ },
startAt: {
type: Date,
optional: true,
@@ -67,6 +71,10 @@ Cards.attachSchema(new SimpleSchema({
type: Date,
optional: true,
},
+ endAt: {
+ type: Date,
+ optional: true,
+ },
spentTime: {
type: Number,
decimal: true,
@@ -271,6 +279,14 @@ Cards.mutations({
return {$unset: {coverId: ''}};
},
+ setReceived(receivedAt) {
+ return {$set: {receivedAt}};
+ },
+
+ unsetReceived() {
+ return {$unset: {receivedAt: ''}};
+ },
+
setStart(startAt) {
return {$set: {startAt}};
},
@@ -287,6 +303,14 @@ Cards.mutations({
return {$unset: {dueAt: ''}};
},
+ setEnd(endAt) {
+ return {$set: {endAt}};
+ },
+
+ unsetEnd() {
+ return {$unset: {endAt: ''}};
+ },
+
setOvertime(isOvertime) {
return {$set: {isOvertime}};
},
diff --git a/models/checklists.js b/models/checklists.js
index 637e280c..9946f98e 100644
--- a/models/checklists.js
+++ b/models/checklists.js
@@ -6,6 +6,7 @@ Checklists.attachSchema(new SimpleSchema({
},
title: {
type: String,
+ defaultValue: 'Checklist',
},
finishedAt: {
type: Date,