diff options
author | IgnatzHome <ignatz@maschath.de> | 2018-06-14 19:42:09 +0200 |
---|---|---|
committer | IgnatzHome <ignatz@maschath.de> | 2018-06-14 19:42:09 +0200 |
commit | a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e (patch) | |
tree | 6e30c7ebc0106518ec5ea76bcb57d294cc9f48f1 /client/components/cards/cardDate.js | |
parent | 991e74bfc287d840951b7c707b7ff2a2f26e5001 (diff) | |
parent | fcf262cc9807c1e87e638ce6b0c6151ae2114f60 (diff) | |
download | wekan-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.js | 14 |
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'); - |