From 2fff081268103c842887d3eb3d3f3411ff7e327d Mon Sep 17 00:00:00 2001 From: Jack Goh Date: Thu, 16 Aug 2018 10:23:52 +0800 Subject: [PATCH] remove notification --- app/Http/Controllers/BookingController.php | 34 +++------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php index ac8ba39a..d3028c35 100644 --- a/app/Http/Controllers/BookingController.php +++ b/app/Http/Controllers/BookingController.php @@ -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); } }