Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-03-10 11:47:23 +0300
committerRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-03-10 11:47:23 +0300
commit0c68f1130df1bc4f3f0f96c47a50fbd9bd5dbd10 (patch)
tree875e722087f36de961e144cfe4812f0ed37f2cdc /src/models
parent4df067611ea465d793d829506b18eaba79f72acc (diff)
Show completed date in details view footer tooltip
Diffstat (limited to 'src/models')
-rw-r--r--src/models/task.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/models/task.js b/src/models/task.js
index ef6686c7..62768213 100644
--- a/src/models/task.js
+++ b/src/models/task.js
@@ -84,7 +84,9 @@ export default class Task {
this._summary = this.vtodo.getFirstPropertyValue('summary') || ''
this._priority = this.vtodo.getFirstPropertyValue('priority')
this._complete = this.vtodo.getFirstPropertyValue('percent-complete') || 0
- this._completed = !!this.vtodo.getFirstPropertyValue('completed')
+ var comp = this.vtodo.getFirstPropertyValue('completed')
+ this._completed = !!comp
+ this._completedDate = comp ? comp.toJSDate() : null
this._status = this.vtodo.getFirstPropertyValue('status')
this._note = this.vtodo.getFirstPropertyValue('description') || ''
this._related = this.vtodo.getFirstPropertyValue('related-to') || null
@@ -264,16 +266,13 @@ export default class Task {
this.vtodo.removeProperty('completed')
}
this.updateLastModified()
- this._completed = !!this.vtodo.getFirstPropertyValue('completed')
+ var comp = this.vtodo.getFirstPropertyValue('completed')
+ this._completed = !!comp
+ this._completedDate = comp ? comp.toJSDate() : null
}
get completedDate() {
- var comp = this.vtodo.getFirstPropertyValue('completed')
- if (comp) {
- return comp.toJSDate()
- } else {
- return null
- }
+ return this._completedDate
}
get status() {