Commit 40a6decc by Jansa Jose

emergency push

parent 4e8bcc8b
...@@ -1001,6 +1001,7 @@ ...@@ -1001,6 +1001,7 @@
$fcm_data['message'] = "Emergency booking"; $fcm_data['message'] = "Emergency booking";
$fcm_data['booking_id'] = $postData['booking_id']; $fcm_data['booking_id'] = $postData['booking_id'];
$fcm_data['device_id'] = $respData['data']['device_id']; $fcm_data['device_id'] = $respData['data']['device_id'];
$fcm_data['service_type'] = $respData['data']['service_type'];
$this->push_sent_cancel($fcm_data); $this->push_sent_cancel($fcm_data);
} }
} }
......
...@@ -357,7 +357,7 @@ class Webservice_model extends CI_Model { ...@@ -357,7 +357,7 @@ class Webservice_model extends CI_Model {
if($this->db->update('bookings',$insert_array,array('booking_id'=>$postData['booking_id']))){ if($this->db->update('bookings',$insert_array,array('booking_id'=>$postData['booking_id']))){
$this->db->insert("mechanic_booking",array('booking_id'=>$postData['booking_id'],'mechanic_id'=>$postData['mechanic_id'],'amount'=>$cost,'status'=>'0')); $this->db->insert("mechanic_booking",array('booking_id'=>$postData['booking_id'],'mechanic_id'=>$postData['mechanic_id'],'amount'=>$cost,'status'=>'0'));
$this->db->select("bookings.scheduled_time,bookings.scheduled_date,customer_vehicle.car_model as vehicle_model,customer_vehicle.car_maker as vehicle_make,customer_vehicle.car_model_year as vehicle_year,customer_vehicle.vehicle_data,TRIM(concat(mechanic.first_name,' ',IFNULL(mechanic.last_name,''))) as mechanic_name,mechanic_shop.shop_name as mechanic_shop,mechanic.address,mechanic.phone,mechanic.device_id,admin_users.profile_image as image,bookings.mileage,bookings.issues_selected,bookings.customer_id"); $this->db->select("bookings.scheduled_time,bookings.scheduled_date,customer_vehicle.car_model as vehicle_model,customer_vehicle.car_maker as vehicle_make,customer_vehicle.car_model_year as vehicle_year,customer_vehicle.vehicle_data,TRIM(concat(mechanic.first_name,' ',IFNULL(mechanic.last_name,''))) as mechanic_name,bookings.service_type,mechanic_shop.shop_name as mechanic_shop,mechanic.address,mechanic.phone,mechanic.device_id,admin_users.profile_image as image,bookings.mileage,bookings.issues_selected,bookings.customer_id");
$this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id'); $this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id');
$this->db->join("mechanic_booking","mechanic_booking.booking_id = bookings.booking_id AND mechanic_booking.mechanic_id =".$postData['mechanic_id'],'left'); $this->db->join("mechanic_booking","mechanic_booking.booking_id = bookings.booking_id AND mechanic_booking.mechanic_id =".$postData['mechanic_id'],'left');
$this->db->join('mechanic','mechanic_booking.mechanic_id = mechanic.mechanic_id'); $this->db->join('mechanic','mechanic_booking.mechanic_id = mechanic.mechanic_id');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment