1
0

chore: rename date ranges export

This commit is contained in:
kolaente
2022-02-06 19:33:52 +01:00
parent f435ca99f4
commit 60be8b428e
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
export const dateRanges = {
export const DATE_RANGES = {
// Format:
// Key is the title, as a translation string, the first entry of the value array
// is the "from" date, the second one is the "to" date.

View File

@ -11,7 +11,7 @@
{{ $t('misc.custom') }}
</BaseButton>
<BaseButton
v-for="(value, text) in dateRanges"
v-for="(value, text) in DATE_RANGES"
:key="text"
@click="setDateRange(value)"
:class="{'is-active': from === value[0] && to === value[1]}">
@ -78,7 +78,7 @@ import flatPickr from 'vue-flatpickr-component'
import 'flatpickr/dist/flatpickr.css'
import Popup from '@/components/misc/popup.vue'
import {dateRanges} from '@/components/date/dateRanges'
import {DATE_RANGES} from '@/components/date/dateRanges'
import BaseButton from '@/components/base/BaseButton.vue'
import DatemathHelp from '@/components/date/datemathHelp.vue'
@ -156,7 +156,7 @@ function setDateRange(range: string[] | null) {
}
const customRangeActive = computed<Boolean>(() => {
return !Object.values(dateRanges).some(el => from.value === el[0] && to.value === el[1])
return !Object.values(DateRanges).some(el => from.value === el[0] && to.value === el[1])
})
const buttonText = computed<string>(() => {