Fix Datetime Handling (#168)
Fix task filters Fix null dates Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/168
This commit is contained in:
parent
d586e15c56
commit
cd588caa02
5 changed files with 32 additions and 31 deletions
|
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue