mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
fix pagination for admin booking table
This commit is contained in:
@@ -80,7 +80,7 @@ class BookingController extends Controller
|
||||
$user = Auth::user();
|
||||
$bookings = Booking::select('user_id', 'id', 'created_at', 'admin_status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
->orderby('updated_at','desc')
|
||||
->get();
|
||||
->paginate(10);
|
||||
|
||||
// reformat to fit frontend structure
|
||||
foreach ($bookings as $booking) {
|
||||
|
||||
@@ -67,11 +67,11 @@ export default {
|
||||
middleware: 'admin',
|
||||
data () {
|
||||
return {
|
||||
status: null,
|
||||
pagination: [],
|
||||
bookingTable: [
|
||||
],
|
||||
status: null,
|
||||
prev_page_url: null,
|
||||
bookingTable: [],
|
||||
url: 'api/admin/booking',
|
||||
pagination: [],
|
||||
loading_btn: false,
|
||||
}
|
||||
},
|
||||
@@ -79,10 +79,12 @@ export default {
|
||||
this.getBooking()
|
||||
},
|
||||
methods: {
|
||||
getBooking() {
|
||||
getBooking(){
|
||||
let $this = this
|
||||
axios.get(this.url).then(response => {
|
||||
this.bookingTable = response.data
|
||||
this.bookingTable = response.data.data
|
||||
$this.makePagination(response.data)
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
RefreshBooking() {
|
||||
|
||||
Reference in New Issue
Block a user