summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDate.js
diff options
context:
space:
mode:
authorIgnatzHome <ignatz@maschath.de>2018-06-14 19:42:09 +0200
committerIgnatzHome <ignatz@maschath.de>2018-06-14 19:42:09 +0200
commita433f7d9fe310e1aa5f5c831b2bfacb5b86c941e (patch)
tree6e30c7ebc0106518ec5ea76bcb57d294cc9f48f1 /client/components/cards/cardDate.js
parent991e74bfc287d840951b7c707b7ff2a2f26e5001 (diff)
parentfcf262cc9807c1e87e638ce6b0c6151ae2114f60 (diff)
downloadwekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.tar.gz
wekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.tar.bz2
wekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.zip
Merge branch 'feature-custom-fields' of https://github.com/feuerball11/wekan into feature-custom-fields
Diffstat (limited to 'client/components/cards/cardDate.js')
-rw-r--r--client/components/cards/cardDate.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js
index f33e8c19..e95c3a23 100644
--- a/client/components/cards/cardDate.js
+++ b/client/components/cards/cardDate.js
@@ -93,7 +93,7 @@ Template.dateBadge.helpers({
});
// editCardReceivedDatePopup
-(class extends EditCardDate {
+(class extends DatePicker {
onCreated() {
super.onCreated();
this.data().receivedAt && this.date.set(moment(this.data().receivedAt));
@@ -156,7 +156,7 @@ Template.dateBadge.helpers({
}).register('editCardDueDatePopup');
// editCardEndDatePopup
-(class extends EditCardDate {
+(class extends DatePicker {
onCreated() {
super.onCreated();
this.data().endAt && this.date.set(moment(this.data().endAt));
@@ -279,11 +279,14 @@ class CardDueDate extends CardDate {
classes() {
let classes = 'due-date' + ' ';
- if (this.now.get().diff(this.date.get(), 'days') >= 2)
+ if ((this.now.get().diff(this.date.get(), 'days') >= 2) &&
+ (this.date.get().isBefore(this.data().endAt)))
classes += 'long-overdue';
- else if (this.now.get().diff(this.date.get(), 'minute') >= 0)
+ else if ((this.now.get().diff(this.date.get(), 'minute') >= 0) &&
+ (this.date.get().isBefore(this.data().endAt)))
classes += 'due';
- else if (this.now.get().diff(this.date.get(), 'days') >= -1)
+ else if ((this.now.get().diff(this.date.get(), 'days') >= -1) &&
+ (this.date.get().isBefore(this.data().endAt)))
classes += 'almost-due';
return classes;
}
@@ -355,4 +358,3 @@ CardEndDate.register('cardEndDate');
return this.date.get().format('l');
}
}).register('minicardEndDate');
-