fix: lint

This commit is contained in:
kolaente 2022-02-20 21:34:45 +01:00
parent 4ce9ac9c66
commit 622f08fb1b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -89,18 +89,16 @@ const {
const showAll = computed(() => typeof dateFrom === 'undefined' || typeof dateTo === 'undefined') const showAll = computed(() => typeof dateFrom === 'undefined' || typeof dateTo === 'undefined')
const pageTitle = computed(() => { const pageTitle = computed(() => {
let title = ''
// We need to define "key" because it is the first parameter in the array and we need the second // We need to define "key" because it is the first parameter in the array and we need the second
// eslint-disable-next-line no-unused-vars
const predefinedRange = Object.entries(DATE_RANGES) const predefinedRange = Object.entries(DATE_RANGES)
// eslint-disable-next-line no-unused-vars
.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') {
return t(`input.datepickerRange.ranges.${predefinedRange}`) return t(`input.datepickerRange.ranges.${predefinedRange}`)
} }
return showAll return showAll.value
? t('task.show.titleCurrent') ? t('task.show.titleCurrent')
: t('task.show.fromuntil', { : t('task.show.fromuntil', {
from: formatDate(dateFrom, 'PPP'), from: formatDate(dateFrom, 'PPP'),