Set the end date to the same as the due date if a start date was set but no end date

This commit is contained in:
kolaente 2020-02-09 14:52:45 +01:00
parent 64cbfc113a
commit 2223072881
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -398,6 +398,13 @@
}
},
saveTask() {
// If no end date is being set, but a start date and due date,
// use the due date as the end date
if (this.task.endDate === null && this.task.startDate !== null && this.task.dueDate !== null) {
this.task.endDate = this.task.dueDate
}
this.taskService.update(this.task)
.then(r => {
this.$set(this, 'task', r)