mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
use new /place/all api
This commit is contained in:
parent
a7704526f9
commit
fb4279a108
1 changed files with 9 additions and 5 deletions
|
@ -41,18 +41,21 @@
|
|||
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>
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify } from '@mdi/js'
|
||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify, mdiEye } from '@mdi/js'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify,
|
||||
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify, mdiEye,
|
||||
loading: false,
|
||||
dialog: false,
|
||||
valid: false,
|
||||
places: [],
|
||||
search: '',
|
||||
place: { name: '', address: '', id: null },
|
||||
headers: [
|
||||
|
@ -62,9 +65,10 @@ export default {
|
|||
]
|
||||
}
|
||||
},
|
||||
computed: mapState(['places']),
|
||||
async fetch () {
|
||||
this.places = await this.$axios.$get('/place/all')
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['updateMeta']),
|
||||
editPlace (item) {
|
||||
this.place.name = item.name
|
||||
this.place.address = item.address
|
||||
|
|
Loading…
Reference in a new issue