chore: return the title directly

This commit is contained in:
kolaente 2022-02-20 21:22:31 +01:00
parent 564f669ed4
commit 95d8cdffe4
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -98,17 +98,15 @@ const pageTitle = computed(() => {
.find(([key, value]) => dateFrom === value[0] && dateTo === value[1]) .find(([key, value]) => dateFrom === value[0] && dateTo === value[1])
?.[0] ?.[0]
if (typeof predefinedRange !== 'undefined') { if (typeof predefinedRange !== 'undefined') {
title = t(`input.datepickerRange.ranges.${predefinedRange}`) return t(`input.datepickerRange.ranges.${predefinedRange}`)
} else { }
title = showAll
return showAll
? t('task.show.titleCurrent') ? t('task.show.titleCurrent')
: t('task.show.fromuntil', { : t('task.show.fromuntil', {
from: formatDate(dateFrom, 'PPP'), from: formatDate(dateFrom, 'PPP'),
until: formatDate(dateTo, 'PPP'), until: formatDate(dateTo, 'PPP'),
}) })
}
return title
}) })
const tasksSorted = computed(() => { const tasksSorted = computed(() => {
// Sort all tasks to put those with a due date before the ones without a due date, the // Sort all tasks to put those with a due date before the ones without a due date, the