mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
remove notification
This commit is contained in:
@@ -624,13 +624,6 @@ class BookingController extends Controller
|
||||
$booking->admin_status = 2;
|
||||
$booking->save();
|
||||
|
||||
// Add notification message to admin
|
||||
$adminNotification = new Notification;
|
||||
$adminNotification->detail = "A bankslip is uploaded for booking " . $booking->id;
|
||||
$adminNotification->link = "/booking/" . $booking->id . "/verification";
|
||||
$adminNotification->user_id = User::withRole('admin')->first()->id;
|
||||
$adminNotification->save();
|
||||
|
||||
$user_bankslip->transfer_amount = $request->input('transfer_amount');
|
||||
$user_bankslip->save();
|
||||
return response()->json($adminNotification,200);
|
||||
@@ -855,21 +848,13 @@ class BookingController extends Controller
|
||||
$booking->status = 4;
|
||||
if($booking->term !== "x1_ba" || $booking->term !== "x2_cheque"){
|
||||
$booking->admin_status = 3;
|
||||
// Add notification message to user
|
||||
$userNotification = new Notification;
|
||||
$userNotification->detail = "Your bankslip for booking " . $booking->id . " is approved.";
|
||||
$userNotification->link = "/booking/" . $booking->id . "/transfer";
|
||||
$userNotification->user_id = $booking->user_id;
|
||||
$userNotification->save();
|
||||
// TODO : Add notification message to user
|
||||
|
||||
}
|
||||
else{
|
||||
$booking->admin_status = 5;
|
||||
// Add notification message to user
|
||||
$userNotification = new Notification;
|
||||
$userNotification->detail = "Your bankslip for booking " . $booking->id . " is approved.";
|
||||
$userNotification->link = "/booking/" . $booking->id . "/supplier";
|
||||
$userNotification->user_id = $booking->user_id;
|
||||
$userNotification->save();
|
||||
// TODO : Add notification message to user
|
||||
|
||||
}
|
||||
$booking->save();
|
||||
|
||||
@@ -989,12 +974,6 @@ class BookingController extends Controller
|
||||
$booking->admin_status = 6; // upload invoice
|
||||
$booking->save();
|
||||
|
||||
$adminNotification = new Notification;
|
||||
$adminNotification->detail = "Purchase Order for booking " . $booking->id . " is uploaded.";
|
||||
$adminNotification->link = "/booking/" . $booking->id . "/upload-invoice";
|
||||
$adminNotification->user_id = User::withRole('admin')->first()->id;
|
||||
$adminNotification->save();
|
||||
|
||||
return response()->json($purchase_order,200);
|
||||
}
|
||||
|
||||
@@ -1012,11 +991,6 @@ class BookingController extends Controller
|
||||
$booking->admin_status = 7; // completed
|
||||
|
||||
if($booking->save()){
|
||||
$adminNotification = new Notification;
|
||||
$adminNotification->detail = "Invoice for booking " . $booking->id . " is uploaded.";
|
||||
$adminNotification->link = "/booking/" . $booking->id . "/complete";
|
||||
$adminNotification->user_id = $booking->user_id;
|
||||
$adminNotification->save();
|
||||
return response()->json(['message'=>"Success"],200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user