mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
updated booking status on upload user bankslip
revert back the correct routes for user update user path names
This commit is contained in:
@@ -259,7 +259,7 @@ class BookingController extends Controller
|
||||
|
||||
public function uploadbankslip(Request $request, $id)
|
||||
{
|
||||
$booking = Booking::where('user_id',Auth::user()->id)->where('id',$id)->first();
|
||||
$booking = Booking::where('user_id',Auth::user()->id)->where('id',$id)->first();
|
||||
|
||||
/* Validation*/
|
||||
if (!$booking)
|
||||
@@ -295,8 +295,13 @@ class BookingController extends Controller
|
||||
$user_bankslip = new UserBankSlip;
|
||||
$user_bankslip->booking_id = $booking->id;
|
||||
$user_bankslip->bankslip_path = $unique_image_path;
|
||||
$user_bankslip->transfer_amount = $request->input('transfer_amount');
|
||||
$user_bankslip->save();
|
||||
$user_bankslip->transfer_amount = $request->input('transfer_amount');
|
||||
$user_bankslip->save();
|
||||
|
||||
// update booking status
|
||||
$booking->admin_status = 2; // admin approving or rejecting bankslip
|
||||
$booking->status = 3; // user waiting admin to approve
|
||||
$booking->save();
|
||||
|
||||
|
||||
return response()->json(['message'=>"Success"],200);
|
||||
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
switch (this.status) {
|
||||
case 0:
|
||||
this.$router.push({
|
||||
name: 'booking.admin.verification',
|
||||
name: 'booking.admin.order',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
|
||||
@@ -487,36 +487,36 @@ export default {
|
||||
name: 'booking.user.upload',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
|
||||
break
|
||||
case 2:
|
||||
this.$router.push({
|
||||
name: 'booking.confirmation',
|
||||
name: 'booking.user.upload',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
this.$router.push({
|
||||
name: 'booking.transfer',
|
||||
name: 'booking.user.confirmation',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
case 4:
|
||||
this.$router.push({
|
||||
name: 'booking.user.uploadpo',
|
||||
name: 'booking.user.transfer',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
|
||||
case 5:
|
||||
this.$router.push({
|
||||
name: 'booking.user.pocomplete',
|
||||
name: 'booking.user.uploadpo',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
|
||||
case 6:
|
||||
this.$router.push({
|
||||
name: 'booking.complete',
|
||||
name: 'booking.user.complete',
|
||||
params: {id: booking_id }
|
||||
})
|
||||
break
|
||||
|
||||
@@ -46,8 +46,8 @@ export default [
|
||||
|
||||
// Booking
|
||||
{ path: '/booking/:id/upload-user-bankslip', name: 'booking.user.upload', component: Upload },
|
||||
{ path: '/booking/:id/confirmation', name: 'booking.confirmation', component: Confirmation },
|
||||
{ path: '/booking/:id/transfer', name: 'booking.transfer', component: Transfer },
|
||||
{ path: '/booking/:id/confirmation', name: 'booking.user.confirmation', component: Confirmation },
|
||||
{ path: '/booking/:id/transfer', name: 'booking.user.transfer', component: Transfer },
|
||||
{ path: '/booking/:id/upload-po', name: 'booking.user.uploadpo', component: UploadPo },
|
||||
{ path: '/booking/:id/po-complete', name: 'booking.user.pocomplete', component: PoComplete },
|
||||
{ path: '/booking/:id/complete', name: 'booking.complete', component: Completed },
|
||||
|
||||
Reference in New Issue
Block a user