mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
added booking lists controller and routes
This commit is contained in:
@@ -16,6 +16,10 @@ use DateTime;
|
||||
class BookingController extends Controller
|
||||
{
|
||||
|
||||
public function index(){
|
||||
return "hello";
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$booking = Booking::where('user_id',Auth::user()->id)->where('id', $id)->first();
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
<tr>
|
||||
<td class="el-table_2_column_9 is-right ">Amount : </td>
|
||||
<td class="el-table_2_column_9 is-left ">
|
||||
<b> {{ booking.amount }} </b>
|
||||
<b> RMB {{ booking.amount }} </b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200" class="el-table_2_column_9 is-right ">Bankin Amount : </td>
|
||||
<td width="200" class="el-table_2_column_9 is-left ">
|
||||
<b> {{ booking.bankin_amount }} </b>
|
||||
<b> MYR {{ booking.bankin_amount }} </b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -433,6 +433,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
axios
|
||||
.get('/api/booking/')
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.booking.amount = response.data.amount
|
||||
this.booking.bankin_amount = response.data.bia
|
||||
this.booking.timeout = response.data.timeout * 1000
|
||||
this.start = true;
|
||||
loading.close()
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
loading.close()
|
||||
this.$router.push({
|
||||
name: 'notfound'
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// TODO fetch booking data on load
|
||||
formatter(row, column) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ Route::group(['middleware' => 'auth:api'], function () {
|
||||
|
||||
|
||||
Route::group(['middleware' => 'guest:api'], function () {
|
||||
Route::post('login', 'Auth\LoginController@login');
|
||||
Route::post('login', 'Auth\LoginController@login')->name('login');
|
||||
Route::post('register', 'Auth\RegisterController@register');
|
||||
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
|
||||
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
|
||||
|
||||
Reference in New Issue
Block a user