mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
added the refresh button
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div align="right">
|
||||
<el-button icon="el-icon-refresh" type="primary" size="mini" @click="RefreshBooking()">Refresh</el-button></div>
|
||||
<!-- Booking Table -->
|
||||
<el-row :gutter="20">
|
||||
<div>
|
||||
@@ -41,6 +44,7 @@
|
||||
</div>
|
||||
</el-row>
|
||||
<!-- Booking Table-end -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -52,26 +56,20 @@ export default {
|
||||
return {
|
||||
status: null,
|
||||
bookingTable: [
|
||||
]
|
||||
],
|
||||
url: 'api/admin/booking',
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
axios
|
||||
.get('/api/admin/booking')
|
||||
.then((response) => {
|
||||
console.log(response.data)
|
||||
this.bookingTable = response.data
|
||||
|
||||
// loading.close()
|
||||
}).catch((error) => {
|
||||
// console.log(error)
|
||||
// loading.close()
|
||||
// this.$router.push({
|
||||
// name: 'notfound'
|
||||
// })
|
||||
})
|
||||
this.RefreshBooking()
|
||||
},
|
||||
methods: {
|
||||
RefreshBooking() {
|
||||
let $this = this
|
||||
axios.get(this.url).then(response => {
|
||||
this.bookingTable = response.data
|
||||
})
|
||||
},
|
||||
filterTag (value, row) {
|
||||
return row.tag === value
|
||||
},
|
||||
|
||||
@@ -234,6 +234,8 @@
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<div align="right">
|
||||
<el-button icon="el-icon-refresh" type="primary" size="mini" @click="RefreshBooking()">Refresh</el-button></div>
|
||||
<!-- Booking Table -->
|
||||
<el-row :gutter="20">
|
||||
<div>
|
||||
@@ -379,6 +381,7 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.getBooking()
|
||||
this.RefreshBooking()
|
||||
},
|
||||
methods: {
|
||||
getBooking() {
|
||||
@@ -389,6 +392,12 @@ export default {
|
||||
$this.makePagination(response.data)
|
||||
})
|
||||
},
|
||||
RefreshBooking() {
|
||||
let $this = this
|
||||
axios.get(this.url).then(response => {
|
||||
this.bookingTable = response.data.data
|
||||
})
|
||||
},
|
||||
makePagination(data){
|
||||
let pagination = {
|
||||
current_page: data.current_page,
|
||||
|
||||
Reference in New Issue
Block a user