Commit c3ceb558 by Jansa Jose

get_mechanics api

parent b6bfc0dc
......@@ -1151,11 +1151,13 @@
}
$err = 0;
if((!isset($postdata['is_emergency']) || $postdata['is_emergency'] != 1) &&
(!isset($postData['service_id']) || empty($postData['service_id']))){
$err = 1;
$msg = 'Service Id is Required';
}
if(!isset($postData['is_emergency']) || $postData['is_emergency'] != 1){
if(!isset($postData['service_id']) || empty($postData['service_id'])){
$err = 1;
$msg = 'Service Id is Required';
}
}
else if(!isset($postData['location']) || empty($postData['location'])){
$err = 1;
$msg = 'Location is Required';
......
......@@ -392,7 +392,7 @@ class Webservice_model extends CI_Model {
}
$current_lat = $postData['location_lat'];
$current_lng = $postData['location_lng'];
$issue_cat_id = $postData['service_id'];
$issue_cat_id = (isset($postData['is_emergency']) && $postData['is_emergency'] == 1)?'':$postData['service_id'];
if($start != 0 || $per_page != 0){
$limt = "limit ".$start.",".$per_page;
}else{
......@@ -413,7 +413,7 @@ class Webservice_model extends CI_Model {
if(empty($mechData) || empty($mechData = $mechData->result_array())){
return 0;
}
if($type == 0){
$respArr = $this->getNearMechanicsDetails($mechData,$issue_cat_id);
if($respArr['status'] == 'success'){
......
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