mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
display completed table
This commit is contained in:
@@ -78,10 +78,14 @@ class BookingController extends Controller
|
||||
return $bookings;
|
||||
}
|
||||
|
||||
public function bookingcompleted(){
|
||||
|
||||
|
||||
|
||||
|
||||
public function bookingTableComplete(){
|
||||
$user = Auth::user();
|
||||
$bookings = Booking::select('user_id', 'id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
->where('user_id', $user->id)
|
||||
->where('status', 7)
|
||||
->orderby('updated_at','desc')
|
||||
->paginate(10);
|
||||
|
||||
@@ -132,7 +136,7 @@ class BookingController extends Controller
|
||||
$booking->marking = $booking->user->marking;
|
||||
}
|
||||
|
||||
return $bookingcompleted;
|
||||
return $bookings;
|
||||
}
|
||||
public function adminIndex(){
|
||||
$user = Auth::user();
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
<el-tab-pane label="Booking Completed Table">
|
||||
<el-row :gutter="20">
|
||||
<div>
|
||||
<el-table :data="bookingTable">
|
||||
<el-table :data="bookingCompleteTable">
|
||||
<el-table-column label="Ref No." width="100">
|
||||
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Update</el-button>
|
||||
<el-button slot-scope="scope" type="text" @click="(event) => { BookingStatus(scope.row.status, scope.row.id) }"> {{ scope.row.id }}</el-button>
|
||||
@@ -362,7 +362,8 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-row><br><br>
|
||||
</el-tab-pane></el-tabs>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
<div align="right">
|
||||
@@ -490,6 +491,7 @@ export default {
|
||||
formLabelWidth: '0px',
|
||||
bookingTable: [
|
||||
],
|
||||
bookingCompleteTable: [],
|
||||
url: 'api/booking',
|
||||
pagination: [],
|
||||
bookingConfirmTable: {
|
||||
@@ -509,6 +511,7 @@ export default {
|
||||
this.getBooking();
|
||||
this.initBooking();
|
||||
this.getRate();
|
||||
this.getbookingTableComplete();
|
||||
},
|
||||
methods: {
|
||||
getBooking(){
|
||||
@@ -518,6 +521,13 @@ export default {
|
||||
$this.makePagination(response.data)
|
||||
})
|
||||
},
|
||||
getbookingTableComplete(){
|
||||
let $this = this
|
||||
axios.get('api/booking/complete').then(response => {
|
||||
this.bookingTableComplete = response.data.data
|
||||
$this.makePagination(response.data)
|
||||
})
|
||||
},
|
||||
getRate() {
|
||||
let $this = this
|
||||
axios.get('api/rate').then(response => {
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ Route::group(['middleware' => 'auth:api'], function () {
|
||||
Route::post('booking/{book_id}/approve-bank-slip','BookingController@approveBankSlip');
|
||||
Route::post('booking/{book_id}/cancel', 'BookingController@cancel');
|
||||
Route::get('booking', 'BookingController@index');
|
||||
Route::post('booking', 'BookingController@bookingcompleted');
|
||||
Route::get('booking/complete', 'BookingController@bookingTableComplete');
|
||||
|
||||
Route::get('user', 'UserController@show');
|
||||
Route::patch('settings/profile', 'Settings\ProfileController@update');
|
||||
|
||||
Reference in New Issue
Block a user