Commit a0d0a5b2 by Tobin

Merge branch 'jansa' into 'master'

Jansa See merge request !152
parents d37478bb 751a65ae
...@@ -210,6 +210,16 @@ class OrganizerServices extends CI_Controller { ...@@ -210,6 +210,16 @@ class OrganizerServices extends CI_Controller {
} }
} }
public function checkerDelete(){
$data = (array) json_decode(file_get_contents('php://input'));
$res = $this->Organizer_model->checkerDelete($data);
if($res['status'] != 0){
$this->successResponse($res);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function getTagList(){ public function getTagList(){
$data = (array) json_decode(file_get_contents('php://input')); $data = (array) json_decode(file_get_contents('php://input'));
$res = $this->Organizer_model->getTagList($data); $res = $this->Organizer_model->getTagList($data);
......
...@@ -222,7 +222,7 @@ class Organizer_model extends CI_Model { ...@@ -222,7 +222,7 @@ class Organizer_model extends CI_Model {
$this->db->insert_batch('event_tags',$insertTag); $this->db->insert_batch('event_tags',$insertTag);
} }
} }
$res = array('status'=>1,'message'=>'Event Added Successfully'); $res = array('status'=>1,'message'=>'Event Updated Successfully');
} catch (Exception $e){ } catch (Exception $e){
$res = array('status'=>0,'message'=>'Ohh No!! Something Went South!!','code'=>'ER08'); $res = array('status'=>0,'message'=>'Ohh No!! Something Went South!!','code'=>'ER08');
} }
...@@ -509,9 +509,9 @@ class Organizer_model extends CI_Model { ...@@ -509,9 +509,9 @@ class Organizer_model extends CI_Model {
$err = 0; $err = 0;
$postData['seat_pricing'] = $postData['custom_seat_layout'] = ''; $postData['seat_pricing'] = $postData['custom_seat_layout'] = '';
if(isset($postData['layout_type']) && $postData['layout_type'] == 1){ if(isset($postData['layout_type'],$postData['fare_type']) && $postData['layout_type'] == 1 && $postData['fare_type'] == 2){
$postData['custom_seat_layout'] = $postData['layout']; $postData['custom_seat_layout'] = $postData['layout'];
} else { } else if($postData['layout_type'] == 2){
$postData['seat_pricing'] = $postData['layout']; $postData['seat_pricing'] = $postData['layout'];
} }
$eventData = array('venue_id'=>$postData['venue_id'], $eventData = array('venue_id'=>$postData['venue_id'],
...@@ -947,6 +947,21 @@ class Organizer_model extends CI_Model { ...@@ -947,6 +947,21 @@ class Organizer_model extends CI_Model {
return $res; return $res;
} }
public function checkerDelete($data){
try{
$count = $this->db->get_where('checker',array('id'=>$data['checker_id'],'provider_id'=>$data['organiser_id']))->num_rows();
if($count < 1){
$res = array('status'=>0,'message'=>'No Data Found','code'=>'ER06');
return $res;
}
$this->db->update('checker',array('status'=>2),array('id'=>$data['checker_id'],'provider_id'=>$data['organiser_id']));
$res = array('status'=>1,'message'=>'Checker Deleted Successfully');
} catch (Exception $e){
$res = array('status'=>0,'message'=>'Ohh No!! Something Went South!!','code'=>'ER08');
}
return $res;
}
} }
?> ?>
...@@ -274,12 +274,6 @@ class Validation_organizer_model extends CI_Model { ...@@ -274,12 +274,6 @@ class Validation_organizer_model extends CI_Model {
'message' => 'Tag is null or empty' 'message' => 'Tag is null or empty'
) )
), ),
'layout' => array(
'required' => array(
'code' => 'ER18',
'message' => 'Layout is null or empty'
)
),
), ),
'getLanguages'=>array(), 'getLanguages'=>array(),
'getCategories'=>array(), 'getCategories'=>array(),
...@@ -363,6 +357,20 @@ class Validation_organizer_model extends CI_Model { ...@@ -363,6 +357,20 @@ class Validation_organizer_model extends CI_Model {
) )
), ),
), ),
'checkerDelete'=>array(
'organiser_id'=>array(
'required'=>array(
'code'=>'ER30',
'message'=>'Organizer Id is null or empty'
)
),
'checker_id'=>array(
'required'=>array(
'code'=>'ER30',
'message'=>'Checker Id is null or empty'
)
),
),
); );
public function _consruct(){ public function _consruct(){
......
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