Commit 3a9b920d by Jansa Jose

webservices, admin panel and apis

parent 7a284506
......@@ -98,7 +98,6 @@ class Bookings extends CI_Controller {
echo json_encode($return_arr);exit;
}
$custom_booking_id = decode_param($_POST['custom_id']);
// print_r($custom_booking_id);exit();
$CustData = $this->Booking_model->getCustomData($custom_booking_id);
if(!empty($CustData)){
$return_arr['status'] = 1;
......@@ -107,5 +106,60 @@ class Bookings extends CI_Controller {
}
echo json_encode($return_arr);exit;
}
public function exportBookingData($mechanic_id = ''){
$bookingData = $this->Booking_model->getMechBookings($mechanic_id,'','0,1,3,4');
if(empty($bookingData)){
return;
}
$header = array('Booking ID','Name','Current Milage','Service Free','Scheduled Date','Scheduled Time','Customer Phone','Customer Mail','Car Name','Car Model','Car Model Year','Car Location','Selected Issue','Status','Mechanic Name');
$file = 'bookData_'.time().'.csv';
$fpoint = fopen('php://memory', 'w');
fputcsv($fpoint, $header, ',');
foreach($bookingData AS $mechanic){
$new = array();
$bookData = $this->Booking_model->getMechBookings($mechanic_id,$mechanic->booking_id,'0,1,3,4');
foreach (json_decode($bookData->issues_selected) as $key => $value) {
$new[] = $value->issue_category;
}
$status = 'Pending';
switch ($bookData->status) {
case '0': $status = 'Pending';break;
case '1': $status = 'Accepted ';break;
case '2': $status = 'Deleted';break;
case '3': $status = 'Completed';break;
case '4': $status = 'Cancelled';break;
case '5': $status = 'Payment Processing';break;
}
$data = array();
$data[] = $mechanic->booking_id;
$data[] = $bookData->custFirstName.' '.$mechanic->custLastName;
$data[] = $mechanic->mileage;
$data[] = $bookData->cost;
$data[] = $bookData->scheduled_date;
$data[] = $bookData->scheduled_time;
$data[] = $bookData->phone;
$data[] = $bookData->email;
$data[] = $bookData->car_model.' '.$bookData->car_maker.' '.$bookData->car_model_year;
$data[] = $bookData->car_maker;
$data[] = $bookData->car_model_year;
$data[] = $bookData->car_location;
$data[] = implode(',',$new);
$data[] = $status;
if($bookData->status == '1'){
$data[] = $bookData->mechanic_data[0]->first_name.' '.$bookData->mechanic_data[0]->last_name;
}
fputcsv($fpoint, $data, ',');
}
fseek($fpoint, 0);
header('Content-Type: application/csv');
header('Content-Disposition: attachement; filename="' . $file . '";');
fpassthru($fpoint);
}
}
?>
\ No newline at end of file
......@@ -7,6 +7,7 @@ class Customer extends CI_Controller {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('Customer_model');
$this->load->model('Vehicle_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login'));
......@@ -25,7 +26,8 @@ class Customer extends CI_Controller {
$template['menu'] = "Customer Management";
$template['smenu'] = "Add Customer";
$template['veh_data']['make'] = $this->Vehicle_model->getVehBrand('',1);
$template['veh_data']['model'] = $this->Vehicle_model->getVehModel('',1);
$this->load->view('template',$template);
}
......@@ -171,6 +173,8 @@ class Customer extends CI_Controller {
$template['pTitle'] = "Edit Customer";
$template['customer_id'] = $customer_id;
$template['veh_data']['make'] = $this->Vehicle_model->getVehBrand('',1);
$template['veh_data']['model'] = $this->Vehicle_model->getVehModel('',1);
$customer_id = decode_param($customer_id);
$template['customer_data']=$this->Customer_model->getCustomer(array('customer_id'=>$customer_id));
......@@ -248,5 +252,44 @@ class Customer extends CI_Controller {
redirect(base_url('Customer/editCustomer/'.$customer_id));
}
public function exportCustomerData(){
$custData = $this->Customer_model->getCustomer();
if(empty($custData)){
return;
}
$header = array('ID','Name','Phone','Email','Address','Date Of Birth','Status','Cars');
$file = 'custData_'.time().'.csv';
$fpoint = fopen('php://memory', 'w');
fputcsv($fpoint, $header, ',');
foreach($custData AS $customer){
$carData = $this->Customer_model->getCustomer(array('customer_id'=>$customer->customer_id));
$cars = '';
$data = array();
if(!empty($carData->vehicle_data)){
foreach($carData->vehicle_data AS $car){
$cars = $car->car_name.',';
$cars = trim($cars,',');
}
}
$data[] = $customer->customer_id;
$data[] = $customer->first_name.' '.$customer->last_name;
$data[] = $customer->phone;
$data[] = $customer->email;
$data[] = $customer->address;
$data[] = $customer->date_of_birth;
$data[] = ($customer->status == 1)?'Active':'De-active';
$data[] = $cars;
fputcsv($fpoint, $data, ',');
}
fseek($fpoint, 0);
header('Content-Type: application/csv');
header('Content-Disposition: attachement; filename="' . $file . '";');
fpassthru($fpoint);
}
}
?>
\ No newline at end of file
......@@ -304,5 +304,47 @@ class Mechanic extends CI_Controller {
redirect(base_url('Mechanic/editMechanics/'.$mechanic_id));
}
}
public function exportMechanicData(){
$mechData = $this->Mechanic_model->getMechanic();
if(empty($mechData)){
return;
}
$header = array('ID','Username','Name','Phone','Email','Address','City','State','Licence Number','Licence Exp Date','Start Time','End Time','Status','Shop Id','Shop Name','Shop Address',
'Shop Phone','Shop Email');
$file = 'mechData_'.time().'.csv';
$fpoint = fopen('php://memory', 'w');
fputcsv($fpoint, $header, ',');
foreach($mechData AS $mechanic){
$data = array();
$data[] = $mechanic->mechanic_id;
$data[] = $mechanic->username;
$data[] = $mechanic->display_name;
$data[] = $mechanic->phone;
$data[] = $mechanic->email_id;
$data[] = $mechanic->address;
$data[] = $mechanic->city;
$data[] = $mechanic->state;
$data[] = $mechanic->licence_number;
$data[] = $mechanic->licence_exp_date;
$data[] = $mechanic->start_time;
$data[] = $mechanic->end_time;
$data[] = ($mechanic->status == 1)?'Active':'De-active';
$data[] = $mechanic->shop_id;
$data[] = $mechanic->shop_name;
$data[] = $mechanic->shop_address;
$data[] = $mechanic->shop_phone;
$data[] = $mechanic->shop_email;
fputcsv($fpoint, $data, ',');
}
fseek($fpoint, 0);
header('Content-Type: application/csv');
header('Content-Disposition: attachement; filename="' . $file . '";');
fpassthru($fpoint);
}
}
?>
\ No newline at end of file
......@@ -53,5 +53,44 @@ class Orders extends CI_Controller {
$return_arr['status'] = $status;
echo json_encode($return_arr);exit;
}
public function exportOrderData(){
$orderData = $this->Order_model->getOrders();
if(empty($orderData)){
return;
}
$header = array('Order ID','Name','Product Name','Brand Name','Short Description','Quantity','Amount','Status','Expected Delivery','Delivered');
$file = 'orderData_'.time().'.csv';
$fpoint = fopen('php://memory', 'w');
fputcsv($fpoint, $header, ',');
foreach($orderData AS $order){
$new = array();
$odrData = $this->Order_model->getOrderDetails($order->order_id);
$data = array();
$data[] = $odrData->format_order_id;
$data[] = $odrData->customer_name;
$data[] = $odrData->product_name;
$data[] = $odrData->brand_name;
$data[] = $odrData->short_description;
$data[] = $odrData->quantity;
$data[] = $odrData->amount;
$data[] = $odrData->ord_status;
if($odrData->status == '2' || $odrData->status == '3' || $odrData->status == '4'){
$data[] = $odrData->expected_delivery;
}
if($odrData->status == '5' || $odrData->status == '6'){
$data[] = $odrData->delivered;
}
fputcsv($fpoint, $data, ',');
}
fseek($fpoint, 0);
header('Content-Type: application/csv');
header('Content-Disposition: attachement; filename="' . $file . '";');
fpassthru($fpoint);
}
}
?>
\ No newline at end of file
......@@ -8,6 +8,7 @@ class Product extends CI_Controller {
date_default_timezone_set("Asia/Kolkata");
$this->load->model('Brand_model');
$this->load->model('Product_model');
$this->load->model('Vehicle_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login'));
......@@ -23,6 +24,8 @@ class Product extends CI_Controller {
$template['brand_id'] = '';
$template['product_data'] = $this->Product_model->getProduct();
$template['veh_data']['make'] = $this->Vehicle_model->getVehBrand('',1);
$template['veh_data']['model'] = $this->Vehicle_model->getVehModel('',1);
$template['brand_data'] = $this->Brand_model->getbrand('',1);
$this->load->view('template',$template);
}
......@@ -146,6 +149,8 @@ class Product extends CI_Controller {
$template['product_id'] = encode_param($product_id);
$template['brand_data'] = $this->Brand_model->getbrand('',1);
$template['product_data'] = $this->Product_model->getProduct($product_id);
$template['veh_data']['make'] = $this->Vehicle_model->getVehBrand('',1);
$template['veh_data']['model'] = $this->Vehicle_model->getVehModel('',1, $template['product_data']->veh_brand_id);
$template['product_image'] = $this->Product_model->getProductImage($product_id);
$template['brand_id'] = $template['product_data']->brand_id;
......@@ -256,5 +261,40 @@ class Product extends CI_Controller {
}
public function exportProductData(){
$productData = $this->Product_model->getProduct('',1);
if(empty($productData)){
return;
}
$header = array('Product ID','Product Name','Brand Name','Short Description','Part ID','Vehicle Model','Amount','Status');
$file = 'productData_'.time().'.csv';
$fpoint = fopen('php://memory', 'w');
fputcsv($fpoint, $header, ',');
foreach($productData AS $product){
$data = array();
$status = 'Active';
switch ($product->status) {
case '0': $status = 'Inactive';break;
case '1': $status = 'Active ';break;
case '2': $status = 'Deleted';break;
}
$data[] = $product->product_id;
$data[] = $product->product_name;
$data[] = $product->brand_name;
$data[] = $product->short_description;
$data[] = $product->part_id;
$data[] = $product->model;
$data[] = $product->amount;
$data[] = $status;
fputcsv($fpoint, $data, ',');
}
fseek($fpoint, 0);
header('Content-Type: application/csv');
header('Content-Disposition: attachement; filename="' . $file . '";');
fpassthru($fpoint);
}
}
?>
\ No newline at end of file
......@@ -2462,6 +2462,33 @@
}
echo json_encode($respArr);exit;
}
public function getMechanicShops(){
header('Content-type:application/json');
$headers = apache_request_headers();
$result = $this->Webservice_model->getMechanicShops();
echo json_encode($result);exit;
}
public function getVehicleBrand(){
header('Content-type:application/json');
$headers = apache_request_headers();
$result = $this->Webservice_model->getVehicleBrand();
echo json_encode($result);exit;
}
public function getVehicleModel(){
header('Content-type:application/json');
$headers = apache_request_headers();
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$result = $this->Webservice_model->getVehicleModel($postData);
echo json_encode($result);exit;
}
}
......
......@@ -11,8 +11,8 @@ class Customer_model extends CI_Model {
$veh_data = array();
if(!empty($customer_data['customer_id'])){
$cond .= " AND customer_id = '".trim($customer_data['customer_id'])."'";
$veh_data = $this->db->get_where(
'customer_vehicle',array('status'=>'1','customer_id'=>$customer_data['customer_id']));
$veh_data = $this->db->get_where('customer_vehicle',
array('status'=>'1','customer_id'=>$customer_data['customer_id']));
$veh_data = (!empty($veh_data))?$veh_data->result():'';
}
......
......@@ -9,17 +9,15 @@ class Product_model extends CI_Model {
if(empty($product_data)){
return 0;
}
$cardata = $this->db->get_where('cardetails',array('year'=>$product_data['vehYear'],'make'=>$product_data['vehMake'],'model'=>$product_data['vehModel']))->row();
if($cardata){
$product_data['cardetail_id'] = $cardata->id;
$cardata = $this->db->get_where('vehicles_model',array('veh_brand_id'=>$product_data['vehMake'],'veh_modal_id'=>$product_data['vehModel']))->row();
if(isset($product_data['cardetail_id']) && !empty($product_data['cardetail_id'])){
$this->db->update('cardetails',array('year'=>$product_data['vehYear'],' veh_modal_id'=>$cardata->veh_modal_id),array('id'=>$product_data['cardetail_id']));
}else{
$this->db->insert('cardetails',array('year'=>$product_data['vehYear'],'make'=>$product_data['vehMake'],'model'=>$product_data['vehModel']));
$this->db->insert('cardetails',array('year'=>$product_data['vehYear'],' veh_modal_id'=>$cardata->veh_modal_id));
$product_data['cardetail_id'] = $this->db->insert_id();
}
unset($product_data['vehYear']);
unset($product_data['vehMake']);
unset($product_data['vehModel']);
unset($product_data['vehYear'],$product_data['vehMake'],$product_data['vehModel']);
$status = $this->db->insert('products',$product_data);
$last_id = $this->db->insert_id();
return $last_id;
......@@ -29,7 +27,12 @@ class Product_model extends CI_Model {
$cond = ($view_all != 0)?' products.status IN (0,1) ':' products.status IN (1) ';
$cond .= (!empty($product_id))?" AND products.product_id = '$product_id'":"";
$result = $this->db->query("SELECT cardetails.make,cardetails.year,cardetails.model,products.*,product_brand.brand_name FROM products join product_brand on product_brand.brand_id = products.brand_id join cardetails on cardetails.id = products.cardetail_id WHERE $cond");
$result = $this->db->query("SELECT cardetails.veh_modal_id,cardetails.year,vehicles_model.* ,products.*,product_brand.brand_name
FROM products
JOIN product_brand on product_brand.brand_id = products.brand_id
LEFT JOIN cardetails on cardetails.id = products.cardetail_id
LEFT JOIN vehicles_model on cardetails.veh_modal_id = vehicles_model.veh_modal_id
WHERE $cond");
if(empty($result)){
return;
}
......@@ -49,16 +52,14 @@ class Product_model extends CI_Model {
if(empty($product_id) || empty($product_data)){
return 0;
}
$cardata = $this->db->get_where('cardetails',array('year'=>$product_data['vehYear'],'make'=>$product_data['vehMake'],'model'=>$product_data['vehModel']))->row();
if($cardata){
$product_data['cardetail_id'] = $cardata->id;
$cardata = $this->db->get_where('vehicles_model',array('veh_brand_id'=>$product_data['vehMake'],'veh_modal_id'=>$product_data['vehModel']))->row();
if(isset($product_data['cardetail_id']) && !empty($product_data['cardetail_id'])){
$this->db->update('cardetails',array('year'=>$product_data['vehYear'],' veh_modal_id'=>$cardata->veh_modal_id),array('id'=>$product_data['cardetail_id']));
}else{
$this->db->insert('cardetails',array('year'=>$product_data['vehYear'],'make'=>$product_data['vehMake'],'model'=>$product_data['vehModel']));
$this->db->insert('cardetails',array('year'=>$product_data['vehYear'],' veh_modal_id'=>$cardata->veh_modal_id));
$product_data['cardetail_id'] = $this->db->insert_id();
}
unset($product_data['vehYear']);
unset($product_data['vehMake']);
unset($product_data['vehModel']);
unset($product_data['vehYear'],$product_data['vehMake'],$product_data['vehModel']);
$status = $this->db->update('products',$product_data,array('product_id'=>$product_id));
return ($status)?1:0;
}
......@@ -88,7 +89,6 @@ class Product_model extends CI_Model {
return $status;
}
function getProductImage($product_id = ''){
if(empty($product_id)){
return 0;
......@@ -97,9 +97,5 @@ class Product_model extends CI_Model {
return $status;
}
function getVehdata(){
return $this->db->get_where('cardetails')->result_array();
}
}
?>
\ No newline at end of file
......@@ -55,5 +55,90 @@ class Vehicle_model extends CI_Model {
return $upStatus;
}
public function addBrand($veh_data = array()){
if(empty($veh_data)){
return 0;
}
$result = $this->db->get_where('vehicles_brand',array('vehicles_brand.maker'=>$veh_data['maker']))->row();
if($result){
return 0;
}
$status = $this->db->insert('vehicles_brand',$veh_data);
$last_id = $this->db->insert_id();
return $last_id;
}
function getVehBrand($veh_brand_id = '',$view_all = 0){
$cond = ($view_all != 0)?' vehicles_brand.status IN (0,1) ':' vehicles_brand.status IN (1) ';
$cond .= (!empty($veh_brand_id))?" AND vehicles_brand.veh_brand_id = '$veh_brand_id'":"";
$result = $this->db->query("SELECT * FROM vehicles_brand
WHERE $cond ORDER BY vehicles_brand.maker");
if(empty($result)){
return;
}
return (empty($veh_brand_id))?$result->result():$result->row();
}
function changeVehicleStatus($brand_id = '', $status = '0',$type=''){
if(empty($brand_id)){
return 0;
}
if($type == '2'){
$status = $this->db->update('vehicles_model',array('status'=>$status), array('veh_modal_id'=>$brand_id));
}else{
$status = $this->db->update('vehicles_brand',array('status'=>$status), array('veh_brand_id'=>$brand_id));
}
return $status;
}
function updateVehBrand($brand_id = '', $brand_data = array()){
if(empty($brand_id) || empty($brand_data)){
return 0;
}
$status = $this->db->update('vehicles_brand',$brand_data,array('veh_brand_id'=>$brand_id));
return ($status)?1:0;
}
function getVehModel($veh_model_id = '',$view_all = 0,$veh_brand_id=''){
$cond = ($view_all != 0)?' vehicles_model.status IN (0,1) ':' vehicles_model.status IN (1) ';
$cond .= (!empty($veh_model_id))?" AND vehicles_model.veh_modal_id = '$veh_model_id'":"";
$cond .= (!empty($veh_brand_id))?" AND vehicles_model.veh_brand_id = '$veh_brand_id'":"";
$result = $this->db->query("SELECT vehicles_model.*, vehicles_brand.maker
FROM vehicles_model
JOIN vehicles_brand ON vehicles_brand.veh_brand_id = vehicles_model.veh_brand_id
WHERE $cond ORDER BY vehicles_model.model");
if(empty($result)){
return;
}
if(isset($veh_brand_id) && !empty($veh_brand_id)){
return $result->result();
}
return (empty($veh_model_id))?$result->result():$result->row();
}
public function addModel($veh_data = array()){
if(empty($veh_data)){
return 0;
}
$result = $this->db->get_where('vehicles_model',array('vehicles_model.model'=>$veh_data['model'],'vehicles_model.veh_brand_id'=>$veh_data['veh_brand_id']))->row();
if($result){
return 0;
}
$status = $this->db->insert('vehicles_model',$veh_data);
$last_id = $this->db->insert_id();
return $last_id;
}
function updateVehModel($model_id = '', $model_data = array()){
if(empty($model_id) || empty($model_data)){
return 0;
}
$status = $this->db->update('vehicles_model',$model_data,array('veh_modal_id'=>$model_id));
return ($status)?1:0;
}
}
?>
\ No newline at end of file
......@@ -78,7 +78,7 @@ class Webservice_model extends CI_Model {
'city'=>'',
'phone'=>$provider_data['phone'],
'state'=>'',
'shop_id'=>'',
'shop_id'=>(isset($provider_data['shop_id']) && !empty($provider_data['shop_id']))? $provider_data['shop_id']:'',
'address'=>'',
'licence'=>'',
'location'=>'',
......@@ -1090,11 +1090,60 @@ class Webservice_model extends CI_Model {
$postData['created_date'] = date('Y-m-d h:i:s');
if($this->db->insert('cart',$postData)){
$respArr['data'] = $this->db->insert_id();
$respArr['status'] = 'success';
}
return $respArr;
}
public function getMechanicShops(){
$respArr = array('status'=>'error');
$result = $this->db->get('mechanic_shop');
if(empty($result) || empty($result = $result->result())){
$respArr['status'] = "error";
return $respArr;
}
$respArr['status'] = 'success';
$respArr['data'] = $result;
return $respArr;
}
public function getVehicleBrand(){
$respArr = array('status'=>'error');
$this->db->order_by('maker');
$this->db->where('status','1');
$result = $this->db->get('vehicles_brand');
if(empty($result) || empty($result = $result->result())){
$respArr['status'] = "error";
return $respArr;
}
$respArr['status'] = 'success';
$respArr['data'] = $result;
return $respArr;
}
public function getVehicleModel($postData=array()){
$respArr = array('status'=>'error');
if(!isset($postData['vehBrand_id']) && empty($postData['vehBrand_id'])){
$respArr['message'] = 'Vehicle Brand Id is Required' ;
}
$this->db->order_by('model');
$result = $this->db->get_where('vehicles_model',array('veh_brand_id'=>$postData['vehBrand_id'],'status'=>'1'));
if(empty($result) || empty($result = $result->result())){
$respArr['status'] = "error";
return $respArr;
}
$respArr['status'] = 'success';
$respArr['data'] = $result;
return $respArr;
}
}
?>
......@@ -22,14 +22,20 @@
<?php } ?>
</div>
<?php if($this->session->userdata['user_type'] == 1 && !empty($mechanic_data)){ ?>
<div class="col-sm-12">
<div class="box box-warning">
<div class="box-header with-border">
<div class="col-md-6">
<h3 class="box-title">Booking Management</h3>
</div>
<div class="col-md-6" align="right">
<?php if(!empty($bookingData)){ ?>
<a class="btn btn-sm btn-success" href="<?= base_url('Bookings/exportBookingData/'.$mechanic_id) ?>">Generate Report</a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
<?php if($this->session->userdata['user_type'] == 1 && !empty($mechanic_data)){ ?>
<div class="box-body">
<form id="chooseMechForm" role="form" action="<?=base_url('Bookings/listBookings')?>"
method="post" class="validate" data-parsley-validate="" enctype="multipart/form-data">
......@@ -57,9 +63,10 @@
</div>
</form>
</div>
<?php } ?>
</div>
</div>
<?php }
<?php
if($this->session->userdata['user_type'] != 1 || ($this->session->userdata['user_type'] == 1)){ ?>
<div class="col-xs-12">
<div class="box box-warning">
......
......@@ -52,7 +52,7 @@
<div class="form-group has-feedback">
<label>Date Of Birth</label>
<div class="input-group date" data-provide="datepicker">
<input id="datepicker" type="text" class="form-control required" data-parsley-trigger="change" data-parsley-minlength="2" required="" name="date_of_birth" placeholder="Pick Date Of Birth" autocomplete="off" value="<?= (isset($customer_data) && isset($customer_data->date_of_birth))?$customer_data->date_of_birth:'' ?>">
<input id="datepicker" type="text" class="form-control required" data-parsley-trigger="change" data-parsley-minlength="2" required="" name="date_of_birth" placeholder="Pick Date Of Birth" autocomplete="off" value="<?= (isset($customer_data) && isset($customer_data->date_of_birth))?$customer_data->date_of_birth:'' ?>" style="z-index: 1;">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
......@@ -150,14 +150,36 @@
<div id="searchTyp_1">
<div class="col-md-12">
<div class="col-md-6">
<label>Vehicle Model</label>
<input type="text" class="form-control required" name="vehModel" input="search_params"
placeholder="Enter Vehicle Model" required="">
<label>Vehicle Maker</label>
<!-- <input type="text" class="form-control required" name="vehMaker" input="search_params" placeholder="Enter Vehicle Maker" required> -->
<select name="vehMaker" class="form-control required" data-parsley-trigger="change" required="" id="veh_make" input="search_params">
<option selected disabled value="">Choose Vehicle Make</option>
<?php
foreach ($veh_data['make'] as $key => $value) {
// $cond = (isset($product_data) && isset($product_data->veh_brand_id) &&
//!empty($product_data->veh_brand_id) &&
// $product_data->veh_brand_id == $value->veh_brand_id)?'selected':'';
echo '<option maker="'.$value->veh_brand_id.'" value="'.$value->maker.'">'.$value->maker.'</option>';
}
?>
</select>
</div>
<div class="col-md-6">
<label>Vehicle Maker</label>
<input type="text" class="form-control required" name="vehMaker" input="search_params"
placeholder="Enter Vehicle Maker" required>
<label>Vehicle Model</label>
<!-- <input type="text" class="form-control required" name="vehModel" input="search_params" placeholder="Enter Vehicle Model" required=""> -->
<select name="vehModel" class="form-control required" data-parsley-trigger="change" required="" id="veh_model" input="search_params">
<option selected="" disabled="" value="">Choose Vehicle Model</option>
<?php
if((isset($customer_id) || !empty($customer_id))){
foreach ($veh_data['model'] as $key => $value) {
// $cond = (isset($product_data) && isset($product_data->veh_modal_id) &&
//!empty($product_data->veh_modal_id) &&
// $product_data->veh_modal_id == $value->veh_modal_id)?'selected':'';
echo '<option value="'.$value->model.'" model="'.$value->model.'">'.$value->model.'</option>';
}
}
?>
</select>
</div>
</div>
<div class="col-md-12 padTop10">
......
......@@ -26,6 +26,7 @@
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Customers List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-success" href="<?= base_url('Customer/exportCustomerData')?>">Generate Report</a>
<a class="btn btn-sm btn-primary" href="<?= base_url('Customer/addCustomerUser')?>">Add New Customer</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
......
......@@ -28,6 +28,7 @@
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Mechanics List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-success" href="<?= base_url('Mechanic/exportMechanicData')?>">Generate Report</a>
<a class="btn btn-sm btn-primary" href="<?= base_url('Mechanic/addMechanic')?>">Add New Mechanic</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
......
......@@ -23,6 +23,13 @@
</div>
<div class="col-xs-12">
<div class="box box-warning">
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Order List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-success" href="<?= base_url('Orders/exportOrderData')?>">Generate Report</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
<div class="box-body">
<table id="mechanicUsers" class="table table-bordered table-striped datatable ">
<thead>
......
......@@ -144,53 +144,38 @@
</div>
<div class="col-md-4">
<label>Vehicle Make</label>
<select name="vehMake" class="form-control required" input="search_params"
data-parsley-trigger="change" required="">
<select name="vehMake" class="form-control required" data-parsley-trigger="change" required="" id="veh_make">
<option selected disabled value="">Choose Vehicle Make</option>
<option <?= ($product_data->make == 'Toyota') ? 'selected' : ''?> value="Toyota">Toyota</option>
<option <?= ($product_data->make == 'Alto') ? 'selected' : ''?> value="Alto">Alto</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Hyundai') ? 'selected' : ''?> value="Hyundai">Hyundai</option>
<option <?= ($product_data->make == 'Ford') ? 'selected' : ''?> value="Ford">Ford</option>
<option <?= ($product_data->make == 'Ford') ? 'selected' : ''?> value="Ford">Ford</option>
<option <?= ($product_data->make == 'Honda') ? 'selected' : ''?> value="Honda">Honda</option>
<option <?= ($product_data->make == 'Honda') ? 'selected' : ''?> value="Honda">Honda</option>
<option <?= ($product_data->make == 'Honda') ? 'selected' : ''?> value="Honda">Honda</option>
<?php
foreach ($veh_data['make'] as $key => $value) {
$cond = (isset($product_data) && isset($product_data->veh_brand_id) &&
!empty($product_data->veh_brand_id) &&
$product_data->veh_brand_id == $value->veh_brand_id)?'selected':'';
echo '<option '.$cond.' maker="'.$value->veh_brand_id.'" value="'.$value->veh_brand_id.'">'.$value->maker.'</option>';
}
?>
</select>
</div>
<div class="col-md-4">
<label>Vehicle Model</label>
<select name="vehModel" class="form-control required" input="search_params"
data-parsley-trigger="change" required="">
<select name="vehModel" class="form-control required" data-parsley-trigger="change" required="" id="veh_model">
<option selected="" disabled="" value="">Choose Vehicle Model</option>
<option <?= ($product_data->model == 'Corolla') ? 'selected' : ''?> value="Corolla">Corolla</option>
<option <?= ($product_data->model == '800') ? 'selected' : ''?> value="800">800</option>
<option <?= ($product_data->model == 'Eon') ? 'selected' : ''?>value="Eon">Eon</option>
<option <?= ($product_data->model == 'Eon') ? 'selected' : ''?> value="Eon">Eon</option>
<option <?= ($product_data->model == 'i10') ? 'selected' : ''?> value="i10">i10</option>
<option <?= ($product_data->model == 'i20') ? 'selected' : ''?> value="i20">i20</option>
<option <?= ($product_data->model == 'i10 Grand') ? 'selected' : ''?>value="i10 Grand">i10 Grand</option>
<option <?= ($product_data->model == 'i20 Grand') ? 'selected' : ''?> value="i20 Grand">i20 Grand</option>
<option <?= ($product_data->model == 'i10 Magna') ? 'selected' : ''?> value="i10 Magna">i10 Magna</option>
<option <?= ($product_data->model == 'i20 Magna') ? 'selected' : ''?> value="i20 Magna">i20 Magna</option>
<option <?= ($product_data->model == 'Sonata') ? 'selected' : ''?> value="Sonata">Sonata</option>
<option <?= ($product_data->model == 'Creta') ? 'selected' : ''?> value="Creta">Creta</option>
<option <?= ($product_data->model == 'Aspair') ? 'selected' : ''?> value="Aspair">Aspair</option>
<option <?= ($product_data->model == 'Eco-sport') ? 'selected' : ''?> value="Eco-sport">Eco-sport</option>
<option <?= ($product_data->model == 'City') ? 'selected' : ''?> value="City">City</option>
<option <?= ($product_data->model == 'Amaze') ? 'selected' : ''?> value="Amaze">Amaze</option>
<option <?= ($product_data->model == 'Sonata') ? 'selected' : ''?> value="Sonata">Sonata</option>
<?php
if((isset($product_id) || !empty($product_id))){
foreach ($veh_data['model'] as $key => $value) {
$cond = (isset($product_data) && isset($product_data->veh_modal_id) &&
!empty($product_data->veh_modal_id) &&
$product_data->veh_modal_id == $value->veh_modal_id)?'selected':'';
echo '<option '.$cond.' value="'.$value->veh_modal_id.'">'.$value->model.'</option>';
}
}
?>
</select>
</div>
</div>
<input type="hidden" name="cardetail_id" value="<?= (isset($product_data->cardetail_id) && !empty($product_data->cardetail_id))?$product_data->cardetail_id:'' ?>" >
<div class="col-md-6 padTop20">
<div class="form-group">
......
......@@ -28,7 +28,7 @@
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Brand List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-primary" href="<?= base_url('Brand/addBrand') ?>">Add New Products</a>
<a class="btn btn-sm btn-success" href="<?= base_url('Product/exportProductData')?>">Generate Report</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
......
......@@ -122,15 +122,36 @@
<a href="<?= base_url('Mailtemplate') ?>"><i class="fa fa-book" aria-hidden="true">
</i><span>Mail Template</span></a>
</li>
<?php } ?>
<li class="treeview">
<a href="#">
<i class="fa fa-bars" aria-hidden="true"></i>
<span>Vehicle Management</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li>
<a href="<?= base_url('Bookings/listBookings') ?>"><i class="fa fa-book" aria-hidden="true">
</i><span>Request Management</span></a>
<a href="<?= base_url('Vehicle/viewVehBrand') ?>">
<i class="fa fa-circle-o text-aqua"></i>
Vehicle Brand
</a>
</li>
<li>
<a href="<?= base_url('Vehicle/viewVehModel') ?>">
<i class="fa fa-circle-o text-aqua"></i>
Vehicle Models
</a>
</li>
</ul>
</li>
<li>
<a href="<?= base_url('Orders/listOrders') ?>"><i class="fa fa-book" aria-hidden="true">
</i><span>Order Management</span></a>
</li>
<?php } ?>
<li>
<a href="<?= base_url('Bookings/listBookings') ?>"><i class="fa fa-book" aria-hidden="true">
</i><span>Request Management</span></a>
</li>
<li class="treeview">
<a href="#">
<i class="fa fa-bars" aria-hidden="true"></i>
......
<div class="content-wrapper">
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
$url = (!isset($brand_id) || empty($brand_id))?'Vehicle/createbrand':'Vehicle/updateVehBrand/'.$brand_id;
if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-md-12">
<div class="box box-warning">
<div class="box-body">
<form role="form" action="<?= base_url($url) ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-md-6">
<div class="form-group">
<label>Brand Name</label>
<input type="text" class="form-control required" data-parsley-trigger="change"
data-parsley-minlength="2" data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$"
name="maker" required="" value="<?= (isset($vehBrand_data->maker))?$vehBrand_data->maker:'' ?>"placeholder="Enter Vehicle Brand">
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
<div class="col-md-12">
<div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Vehicle/viewVehBrand') ?>" class="btn btn-primary">Cancel</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
<div class="content-wrapper">
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
$url = (!isset($model_id) || empty($model_id))?'Vehicle/createModel':'Vehicle/updateVehModel/'.$model_id;
if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-md-12">
<div class="box box-warning">
<div class="box-body">
<form role="form" action="<?= base_url($url) ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-md-6">
<div class="form-group">
<label>Select Brand</label>
<select name="veh_brand_id" class="form-control required" placeholder="Select Brand" required="">
<option selected disabled>Choose a Brand</option>
<?php
foreach ($vehBrand_data as $brand) {
$select = (isset($vehModel_data->veh_brand_id) && $brand->veh_brand_id==
$vehModel_data->veh_brand_id)?'selected':'';
echo '<option '.$select.' value="'.$brand->veh_brand_id.'">'.
$brand->maker.
'</option>';
}
?>
</select>
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Model Name</label>
<input type="text" class="form-control required" data-parsley-trigger="change"
data-parsley-minlength="2" data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$"
name="model" required="" value="<?= (isset($vehModel_data->model))?$vehModel_data->model:'' ?>"placeholder="Enter Vehicle Model">
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
<div class="col-md-12">
<div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Vehicle/viewVehModel') ?>" class="btn btn-primary">Cancel</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
<div class="content-wrapper" >
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-xs-12">
<div class="box box-warning">
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Brand List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-primary" href="<?= base_url('Vehicle/addVehBrand') ?>">Add Vehicle Brand</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
<div class="box-body">
<table id="mechanicUsers" class="table table-bordered table-striped datatable ">
<thead>
<tr>
<th class="hidden">ID</th>
<th width="150px;">Brand Name</th>
<th width="100px;">Status</th>
<th width="300px;">Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($vehBrand_data)){
foreach($vehBrand_data as $brand) { ?>
<tr>
<th class="hidden"><?= $brand->veh_brand_id ?></th>
<th class="center"><?= $brand->maker ?></th>
<th class="center"><?= ($brand->status == 1)?'Active':'De-activate' ?></th>
<td class="center">
<a class="btn btn-sm btn-primary"
href="<?= base_url('Vehicle/editVehBrand/'.encode_param($brand->veh_brand_id)) ?>">
<i class="fa fa-fw fa-edit"></i>Edit
</a>
<a class="btn btn-sm btn-danger"
href="<?= base_url("Vehicle/changeVehicleStatus/".encode_param($brand->veh_brand_id))."/2" ?>"
onClick="return doconfirm()">
<i class="fa fa-fw fa-trash"></i>Delete
</a> <?php if($brand->status == 1){ ?>
<a class="btn btn-sm btn-success" style="background-color:#ac2925" href="<?= base_url("Vehicle/changeVehicleStatus/".encode_param($brand->veh_brand_id))."/0" ?>">
<i class="fa fa-cog"></i> De-activate
</a>
<?php } else { ?>
<a class="btn btn-sm btn-success" href="<?= base_url("Vehicle/changeVehicleStatus/".encode_param($brand->veh_brand_id))."/1" ?>">
<i class="fa fa-cog"></i> Activate
</a>
<?php } ?>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
<div class="content-wrapper" >
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-xs-12">
<div class="box box-warning">
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Vehicle Model List</h3></div>
<div class="col-md-6" align="right">
<a class="btn btn-sm btn-primary" href="<?= base_url('Vehicle/addVehModel') ?>">Add Vehicle Model</a>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
<div class="box-body">
<table id="mechanicUsers" class="table table-bordered table-striped datatable ">
<thead>
<tr>
<th class="hidden">ID</th>
<th width="150px;">Vehicle Brand</th>
<th width="150px;">Vehicle Model</th>
<th width="100px;">Status</th>
<th width="300px;">Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($vehModel_data)){
foreach($vehModel_data as $model) { ?>
<tr>
<th class="hidden"><?= $model->veh_modal_id ?></th>
<th class="center"><?= $model->maker ?></th>
<th class="center"><?= $model->model ?></th>
<th class="center"><?= ($model->status == 1)?'Active':'De-activate' ?></th>
<td class="center">
<a class="btn btn-sm btn-primary"
href="<?= base_url('Vehicle/editVehModel/'.encode_param($model->veh_modal_id)) ?>">
<i class="fa fa-fw fa-edit"></i>Edit
</a>
<a class="btn btn-sm btn-danger"
href="<?= base_url("Vehicle/changeModelStatus/".encode_param($model->veh_modal_id))."/2" ?>"
onClick="return doconfirm()">
<i class="fa fa-fw fa-trash"></i>Delete
</a>
<?php if($model->status == 1){ ?>
<a class="btn btn-sm btn-success" style="background-color:#ac2925" href="<?= base_url("Vehicle/changeModelStatus/".encode_param($model->veh_modal_id))."/0" ?>">
<i class="fa fa-cog"></i> De-activate
</a>
<?php } else { ?>
<a class="btn btn-sm btn-success" href="<?= base_url("Vehicle/changeModelStatus/".encode_param($model->veh_modal_id))."/1" ?>">
<i class="fa fa-cog"></i> Activate
</a>
<?php } ?>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
......@@ -394,6 +394,9 @@
.float-right {
float: right;
}
.float-left {
float: left;
}
.disp-block {
display:block !important;
......
......@@ -436,7 +436,7 @@ jQuery('[id="vehSearch"]').on('click',function(event) {
}
var vehVin = jQuery('[name="vehVin"]').val(),
vehYear = jQuery('[name="vehYear"]').val(),
vehModel = jQuery('[name="vehModel"]').val(),
vehModel = jQuery('option:selected', jQuery('[name="vehModel"]')).attr('model'),
vehMaker = jQuery('[name="vehMaker"]').val();
vehLocVin = jQuery('[name="vehLocationVin"]').val();
vehLocDetls = jQuery('[name="vehLocationDetails"]').val();
......@@ -471,6 +471,7 @@ jQuery('[id="vehSearch"]').on('click',function(event) {
return false;
}
var resp_data = jQuery.parseJSON(resp);
if(resp_data['status'] != '1' || (resp_data['status'] == 1 && resp_data['veh_data'] == '' || resp_data['veh_data'] == null || resp_data['veh_data'] == undefined || resp_data['veh_data'] == 'null' || resp_data['veh_data'] == 'undefined' || resp_data['car_id'] == '' || resp_data['car_id'] == null || resp_data['car_id'] == undefined || resp_data['car_id'] == 'null' || resp_data['car_id'] == 'undefined')){
var msg = 'Something went wrong, please try again later...!';
if(resp_data['status'] == '2')
......@@ -482,27 +483,15 @@ jQuery('[id="vehSearch"]').on('click',function(event) {
return false;
}
var vehHtmlBody = '', car_id = resp_data['car_id'], vehicleData = resp_data['veh_data'];
vehHtmlBody = '<span class="vechile-body disp-block marginBottom-10">'
vehHtmlBody = '<span class="vechile-body disp-block marginBottom-10" style="border:1px solid #e2e2e2;padding: 12px;">'
+vehicleData['vehicle']+
'<div onclick="searchAction('+car_id+',3,0,\''+vehicleData['vehicle']+'\');" class="float-right">'+
'<i class="fa fa-fw fa-close cpoint"></i>'+
'<div class="float-right">'+
'<div class="float-right margin-all" style="margin-top:0px;"><i class="fa fa-fw fa-close cpoint"></i></div>'+
'<div class="float-right margin-all"><button onclick="searchAction('+car_id+',2,0,\''+vehicleData['vehicle']+'\');" type="button" class="btn btn-primary float-right margin-all" style="margin-top: -10px">Add</button></div>'+
'</div>'+
'</span>';
jQuery.each(vehicleData['attributes'], function (index, value) {
if(value == '' || value == undefined || value == 'undefined' || value == null || value == 'null'){
return true;
}
vehHtmlBody += '<div class="col-xs-4">'+
'<div class="col-xs-6"><span class="info-box-text">'+index+'</span></div>'+
'<div class="col-xs-6"><span class="info-box-text">'+value+'</span></div>'+
'</div>';
});
vehHtmlBody += '<div class="col-md-12">'+
'<button onclick="searchAction('+car_id+',3,0,\''+vehicleData['vehicle']+'\');" type="button" class="btn btn-danger float-right margin-all">Remove</button>'+
'<button onclick="searchAction('+car_id+',2,0,\''+vehicleData['vehicle']+'\');" type="button" class="btn btn-primary float-right margin-all">Add</button>'+
'</div>';
jQuery('[id="carSearchResult"]').html('<div id="search_result_'+car_id+'" class="box-body border marginTop10">'+vehHtmlBody+'</div>');
jQuery('[id="carSearchResult"]').html('<div id="search_result_'+car_id+'" class="box-body">'+vehHtmlBody+'</div>');
jQuery('[id="carSearchResult"]').removeClass('hide');
remFullScreenLoader();
slideTo('carSearchResult');
......@@ -1649,3 +1638,21 @@ function changeOrderStatus(e){
}
});
}
jQuery('#veh_make').on('change', function () {
var id = jQuery('option:selected', this).attr('maker');
if(id == '' || id == undefined || id == 'undefined' || id == null || id == 'null'){
return false;
}
showFullScreenLoader();
jQuery.ajax({
type: "POST",
url: base_url + 'Vehicle/getVehModel',
data:'id=' + id,
success: function (data) {
jQuery('#veh_model').html(data);
remFullScreenLoader();
}
});
});
\ No newline at end of file
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