mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +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}')
|
template(v-slot:item.actions='{item}')
|
||||||
v-btn(@click='editPlace(item)' color='primary' icon)
|
v-btn(@click='editPlace(item)' color='primary' icon)
|
||||||
v-icon(v-text='mdiPencil')
|
v-icon(v-text='mdiPencil')
|
||||||
|
nuxt-link(:to='`/p/${item.name}`')
|
||||||
|
v-icon(v-text='mdiEye')
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapActions } from 'vuex'
|
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify, mdiEye } from '@mdi/js'
|
||||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify } from '@mdi/js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify,
|
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify, mdiEye,
|
||||||
loading: false,
|
loading: false,
|
||||||
dialog: false,
|
dialog: false,
|
||||||
valid: false,
|
valid: false,
|
||||||
|
places: [],
|
||||||
search: '',
|
search: '',
|
||||||
place: { name: '', address: '', id: null },
|
place: { name: '', address: '', id: null },
|
||||||
headers: [
|
headers: [
|
||||||
|
@ -62,9 +65,10 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapState(['places']),
|
async fetch () {
|
||||||
|
this.places = await this.$axios.$get('/place/all')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['updateMeta']),
|
|
||||||
editPlace (item) {
|
editPlace (item) {
|
||||||
this.place.name = item.name
|
this.place.name = item.name
|
||||||
this.place.address = item.address
|
this.place.address = item.address
|
||||||
|
|
Loading…
Reference in a new issue