chore: migrate to nuxt-bridge
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card xs12>
|
||||
<v-card flat outlined rounded class='mx-3 my-3 rounded-xl'>
|
||||
<v-card-title primary-title>
|
||||
<h3 class='headline mb-0'>
|
||||
<v-icon
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
<template>
|
||||
<v-col xs='12' sm='6' md='4' lg='3'>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span v-text="$tc(title, model.length)" />
|
||||
</v-card-title>
|
||||
<v-list>
|
||||
<v-list-item v-for="item in model" :key="item">
|
||||
<v-list-item-action @click="toggleIgnore(type, item)">
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on }">
|
||||
<v-icon v-on="on">mdi-delete-outline</v-icon>
|
||||
</template>
|
||||
<span v-text="$t('filters.remove')" />
|
||||
</v-tooltip>
|
||||
</v-list-item-action>
|
||||
<v-list-item-title><span v-text="item" /></v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-card flat outlined class='mx-3 my-3 rounded-xl'>
|
||||
<v-card-title>
|
||||
<span v-text='$tc(title, model.length)' />
|
||||
</v-card-title>
|
||||
<v-list>
|
||||
<v-list-item v-for='item in model' :key='item'>
|
||||
<v-list-item-action @click='toggleIgnore(type, item)'>
|
||||
<v-tooltip top>
|
||||
<template #activator='{ on }'>
|
||||
<v-icon v-on='on'>mdi-delete-outline</v-icon>
|
||||
</template>
|
||||
<span v-text="$t('filters.remove')" />
|
||||
</v-tooltip>
|
||||
</v-list-item-action>
|
||||
<v-list-item-title><span v-text='item' /></v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,55 +1,59 @@
|
||||
<template>
|
||||
<div :key="isAuthenticated">
|
||||
<v-container fluid grid-list-md class="app-fade-in">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<div :key='isAuthenticated'>
|
||||
<v-container fluid grid-list-md class='app-fade-in'>
|
||||
<v-row wrap>
|
||||
<v-col cols='12'>
|
||||
<v-card>
|
||||
<v-container fluid grid-list-md>
|
||||
<v-layout row wrap>
|
||||
<list
|
||||
:model="bands || []"
|
||||
title="filters.band"
|
||||
type="band"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
/>
|
||||
<v-flex xs12 sm6 md4 lg3>
|
||||
<v-layout column>
|
||||
<list
|
||||
:model="states || []"
|
||||
title="filters.state"
|
||||
type="state"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
/>
|
||||
<list
|
||||
:model="municipalities || []"
|
||||
title="filters.municipality"
|
||||
type="municipality"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
/>
|
||||
<list
|
||||
:model="cities || []"
|
||||
title="filters.city"
|
||||
type="city"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
/>
|
||||
<list
|
||||
:model="danceHalls || []"
|
||||
title="filters.hall"
|
||||
type="danceHall"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
/>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-row wrap>
|
||||
<v-col xs='12' sm='12' md='4' lg='4'>
|
||||
<list
|
||||
:model='bands || []'
|
||||
title='filters.band'
|
||||
type='band'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
</v-col>
|
||||
<v-col xs='12' sm='12' md='4' lg='4'>
|
||||
<v-row>
|
||||
<v-col cols='12'>
|
||||
<list
|
||||
:model='states || []'
|
||||
title='filters.state'
|
||||
type='state'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model='municipalities || []'
|
||||
title='filters.municipality'
|
||||
type='municipality'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model='cities || []'
|
||||
title='filters.city'
|
||||
type='city'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model='danceHalls || []'
|
||||
title='filters.hall'
|
||||
type='danceHall'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<v-snackbar
|
||||
v-model="snackbar.active"
|
||||
:color="snackbar.color"
|
||||
:timeout="5000"
|
||||
v-model='snackbar.active'
|
||||
:color='snackbar.color'
|
||||
:timeout='5000'
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
</v-snackbar>
|
||||
@@ -58,15 +62,18 @@
|
||||
|
||||
<script lang='ts'>
|
||||
import { computed, ref } from 'vue'
|
||||
import { useStore } from '@nuxtjs/composition-api'
|
||||
import { useNuxtApp } from '@nuxt/bridge/dist/runtime'
|
||||
|
||||
import List from './List/index.vue'
|
||||
import { useAuth } from '~/plugins/auth'
|
||||
import { useTranslation } from '~/plugins/i18n'
|
||||
import {
|
||||
useFetchFiltersQuery,
|
||||
useToggleIgnoreBandMutation, useToggleIgnoreCityMutation,
|
||||
useToggleIgnoreDanceHallMutation, useToggleIgnoreMunicipalityMutation, useToggleIgnoreStateMutation
|
||||
useToggleIgnoreBandMutation,
|
||||
useToggleIgnoreCityMutation,
|
||||
useToggleIgnoreDanceHallMutation,
|
||||
useToggleIgnoreMunicipalityMutation,
|
||||
useToggleIgnoreStateMutation
|
||||
} from '~/graphql/generated/operations'
|
||||
|
||||
export default {
|
||||
@@ -75,9 +82,9 @@ export default {
|
||||
List
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
const { $store } = useNuxtApp()
|
||||
const { t } = useTranslation()
|
||||
store.commit('setTitle', t('app.links.filters'))
|
||||
$store.commit('setTitle', t('app.links.filters'))
|
||||
const { isAuthenticated } = useAuth()
|
||||
const { result, loading, refetch } = useFetchFiltersQuery()
|
||||
const bands = computed(() => result.value?.bands ?? [])
|
||||
|
||||
Reference in New Issue
Block a user