build: add name to components which failed lint check
This commit is contained in:
@@ -97,6 +97,7 @@
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
export default {
|
||||
name: 'EventDetail',
|
||||
props: {
|
||||
event: {
|
||||
type: Object,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
import Event from '../Event'
|
||||
|
||||
export default {
|
||||
name: 'EventList',
|
||||
components: {
|
||||
Event
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div :key="isAuthenticated">
|
||||
<span v-text="isAuthenticated" />
|
||||
<v-container fluid grid-list-md class="app-fade-in" :key="range">
|
||||
<v-layout row wrap v-if="!isAuthenticated">
|
||||
<v-flex xs12>
|
||||
@@ -97,6 +96,7 @@ import {
|
||||
import { useTranslation } from '../../../plugins/i18n'
|
||||
|
||||
export default {
|
||||
name: 'EventsPage',
|
||||
components: {
|
||||
List
|
||||
},
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
const { route, router } = useRouter()
|
||||
const range = computed({
|
||||
get: () => route.value.query.range || 'ONE_WEEK',
|
||||
set: value => router.push(`/?range=${value}`)
|
||||
set: (value) => router.push(`/?range=${value}`)
|
||||
})
|
||||
const enabled = ref(false)
|
||||
const { result: data, refetch } = useQuery(
|
||||
@@ -116,11 +116,11 @@ export default {
|
||||
{ includeOrigins: false },
|
||||
() => ({ enabled: enabled.value })
|
||||
)
|
||||
const events = useResult(data, [], result => result.events)
|
||||
const origins = useResult(data, [], result => result.origins)
|
||||
const events = useResult(data, [], (result) => result.events)
|
||||
const origins = useResult(data, [], (result) => result.origins)
|
||||
watch(
|
||||
range,
|
||||
r => {
|
||||
(r) => {
|
||||
enabled.value = true
|
||||
console.log('isAuthenticated', isAuthenticated.value)
|
||||
refetch({
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
)
|
||||
const { mutate: doToggleIgnoreState } = useMutation(toggleIgnoreState)
|
||||
|
||||
const toggleIgnoreSuccess = name => {
|
||||
const toggleIgnoreSuccess = (name) => {
|
||||
return () => {
|
||||
fetchEvents()
|
||||
snackbar.value.color = 'success'
|
||||
@@ -173,7 +173,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
const toggleIgnoreFailed = name => {
|
||||
const toggleIgnoreFailed = (name) => {
|
||||
return () => {
|
||||
snackbar.value.color = 'error'
|
||||
snackbar.value.text = `${name} kunde inte döljas`
|
||||
@@ -221,7 +221,7 @@ export default {
|
||||
)
|
||||
const fetchAddressFn = () => {
|
||||
if (window.navigator) {
|
||||
window.navigator.geolocation.getCurrentPosition(pos => {
|
||||
window.navigator.geolocation.getCurrentPosition((pos) => {
|
||||
addressEnabled.value = true
|
||||
doFetchAddress({
|
||||
latlng: `${pos.coords.latitude},${pos.coords.longitude}`
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
const saveOriginFn = o =>
|
||||
const saveOriginFn = (o) =>
|
||||
doSaveOrigin({ origin: o }).then(() => {
|
||||
origin.value = ''
|
||||
fetchEvents()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'FiltersList',
|
||||
props: {
|
||||
model: {
|
||||
type: Array,
|
||||
|
||||
@@ -74,6 +74,7 @@ import { useAuth } from '../../../plugins/auth'
|
||||
import { useTranslation } from '../../../plugins/i18n'
|
||||
|
||||
export default {
|
||||
name: 'FiltersPage',
|
||||
components: {
|
||||
List
|
||||
},
|
||||
@@ -83,11 +84,15 @@ export default {
|
||||
setTitle(t('app.links.filters'))
|
||||
const { isAuthenticated } = useAuth()
|
||||
const { result: data, loading, refetch } = useQuery(fetchFilters)
|
||||
const bands = useResult(data, [], result => result.bands)
|
||||
const cities = useResult(data, [], result => result.cities)
|
||||
const danceHalls = useResult(data, [], result => result.danceHalls)
|
||||
const municipalities = useResult(data, [], result => result.municipalities)
|
||||
const states = useResult(data, [], result => result.states)
|
||||
const bands = useResult(data, [], (result) => result.bands)
|
||||
const cities = useResult(data, [], (result) => result.cities)
|
||||
const danceHalls = useResult(data, [], (result) => result.danceHalls)
|
||||
const municipalities = useResult(
|
||||
data,
|
||||
[],
|
||||
(result) => result.municipalities
|
||||
)
|
||||
const states = useResult(data, [], (result) => result.states)
|
||||
const snackbar = ref({ active: false, color: 'success', text: '' })
|
||||
const { mutate: doToggleIgnoreBand } = useMutation(toggleIgnoreBand)
|
||||
const { mutate: doToggleIgnoreDanceHall } = useMutation(
|
||||
@@ -99,7 +104,7 @@ export default {
|
||||
)
|
||||
const { mutate: doToggleIgnoreState } = useMutation(toggleIgnoreState)
|
||||
|
||||
const toggleIgnoreSuccess = name => {
|
||||
const toggleIgnoreSuccess = (name) => {
|
||||
return () => {
|
||||
refetch()
|
||||
snackbar.value.color = 'success'
|
||||
@@ -108,7 +113,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
const toggleIgnoreFailed = name => {
|
||||
const toggleIgnoreFailed = (name) => {
|
||||
return () => {
|
||||
snackbar.value.color = 'error'
|
||||
snackbar.value.text = t('filters.failure', { name })
|
||||
|
||||
@@ -70,6 +70,7 @@ import { useAuth } from '../../../plugins/auth'
|
||||
import { useTranslation } from '../../../plugins/i18n'
|
||||
|
||||
export default {
|
||||
name: 'OriginsPage',
|
||||
setup() {
|
||||
const { setTitle } = useMutations(['setTitle'])
|
||||
const { t } = useTranslation()
|
||||
@@ -87,22 +88,22 @@ export default {
|
||||
const origin = ref('')
|
||||
const fetchAddressFn = () => {
|
||||
if (window.navigator) {
|
||||
window.navigator.geolocation.getCurrentPosition(pos => {
|
||||
window.navigator.geolocation.getCurrentPosition((pos) => {
|
||||
enabled.value = true
|
||||
doFetchAddress({
|
||||
latlng: `${pos.coords.latitude},${pos.coords.longitude}`
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
origin.value = res.address
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
const saveOriginFn = o =>
|
||||
const saveOriginFn = (o) =>
|
||||
doSaveOrigin({ origin: o }).then(() => {
|
||||
refetch()
|
||||
origin.value = ''
|
||||
})
|
||||
const removeOriginFn = o =>
|
||||
const removeOriginFn = (o) =>
|
||||
doRemoveOrigin({ origin: o }).then(() => refetch())
|
||||
return {
|
||||
isAuthenticated,
|
||||
|
||||
Reference in New Issue
Block a user