...and Places

This commit is contained in:
lesion 2022-06-11 12:00:29 +02:00
parent 56ccbb5973
commit e0d2f6c231
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -1,48 +1,48 @@
<template lang='pug'>
v-container
v-card-title {{$t('common.places')}}
v-spacer
v-text-field(v-model='search'
:append-icon='mdiMagnify' outlined rounded
label='Search'
single-line hide-details)
v-card-subtitle(v-html="$t('admin.place_description')")
v-container
v-card-title {{$t('common.places')}}
v-spacer
v-text-field(v-model='search'
:append-icon='mdiMagnify' outlined rounded
label='Search'
single-line hide-details)
v-card-subtitle(v-html="$t('admin.place_description')")
v-dialog(v-model='dialog' width='600' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card(color='secondary')
v-card-title {{$t('admin.edit_place')}}
v-card-text
v-form(v-model='valid' ref='form' lazy-validation)
v-text-field(
:rules="[$validators.required('common.name')]"
:label="$t('common.name')"
v-model='place.name'
:placeholder='$t("common.name")')
v-dialog(v-model='dialog' width='600' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card(color='secondary')
v-card-title {{$t('admin.edit_place')}}
v-card-text
v-form(v-model='valid' ref='form' lazy-validation)
v-text-field(
:rules="[$validators.required('common.name')]"
:label="$t('common.name')"
v-model='place.name'
:placeholder='$t("common.name")')
v-text-field(
:rules="[$validators.required('common.address')]"
:label="$t('common.address')"
v-model='place.address'
:placeholder='$t("common.address")')
v-text-field(
:rules="[$validators.required('common.address')]"
:label="$t('common.address')"
v-model='place.address'
:placeholder='$t("common.address")')
v-card-actions
v-spacer
v-btn(@click='dialog=false' color='warning') {{$t('common.cancel')}}
v-btn(@click='savePlace' color='primary' :loading='loading'
:disable='!valid || loading') {{$t('common.save')}}
v-card-actions
v-spacer
v-btn(@click='dialog=false' color='warning') {{$t('common.cancel')}}
v-btn(@click='savePlace' color='primary' :loading='loading'
:disable='!valid || loading') {{$t('common.save')}}
v-card-text
v-data-table(
:headers='headers'
:items='places'
:hide-default-footer='places.length<5'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:search='search')
template(v-slot:item.actions='{item}')
v-btn(@click='editPlace(item)' color='primary' icon)
v-icon(v-text='mdiPencil')
nuxt-link(:to='`/p/${item.name}`')
v-icon(v-text='mdiEye')
v-card-text
v-data-table(
:headers='headers'
:items='places'
:hide-default-footer='places.length<5'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:search='search')
template(v-slot:item.actions='{item}')
v-btn(@click='editPlace(item)' color='primary' icon)
v-icon(v-text='mdiPencil')
nuxt-link(:to='`/p/${item.name}`')
v-icon(v-text='mdiEye')
</template>
<script>