Fix task filters
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
kolaente 2020-06-27 18:17:30 +02:00
parent 777cc95a00
commit a6bfaa0cb9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 10 additions and 9 deletions

View File

@ -78,8 +78,8 @@
this.wunderlistCode = this.$route.query.code
this.migrationService.getStatus()
.then(r => {
if(r.time_unix) {
this.lastMigrationDate = new Date(r.time_unix)
if(r.time) {
this.lastMigrationDate = new Date(r.time)
return
}
this.migrate()

View File

@ -68,15 +68,15 @@
</th>
<th v-if="activeColumns.dueDate">
Due&nbsp;Date
<sort :order="sortBy.due_date_unix" @click="sort('due_date_unix')"/>
<sort :order="sortBy.due_date" @click="sort('due_date')"/>
</th>
<th v-if="activeColumns.startDate">
Start&nbsp;Date
<sort :order="sortBy.start_date_unix" @click="sort('start_date_unix')"/>
<sort :order="sortBy.start_date" @click="sort('start_date')"/>
</th>
<th v-if="activeColumns.endDate">
End&nbsp;Date
<sort :order="sortBy.end_date_unix" @click="sort('end_date_unix')"/>
<sort :order="sortBy.end_date" @click="sort('end_date')"/>
</th>
<th v-if="activeColumns.percentDone">
%&nbsp;Done

View File

@ -57,24 +57,25 @@
}
const params = {
sort_by: ['due_date_unix', 'id'],
sort_by: ['due_date', 'id'],
order_by: ['desc', 'desc'],
filter_by: ['done'],
filter_value: [false],
filter_comparator: ['equals'],
filter_concat: 'and',
filter_include_nulls: true,
}
if (!this.showAll) {
params.filter_by.push('start_date')
params.filter_value.push(Math.round(+this.startDate / 1000))
params.filter_value.push(this.startDate)
params.filter_comparator.push('greater')
params.filter_by.push('end_date')
params.filter_value.push(Math.round(+this.endDate / 1000))
params.filter_value.push(this.endDate)
params.filter_comparator.push('less')
params.filter_by.push('due_date')
params.filter_value.push(Math.round(+this.endDate / 1000))
params.filter_value.push(this.endDate)
params.filter_comparator.push('less')
}