DASHBOARD2

This commit is contained in:
velz 2018-10-05 15:03:35 +05:30
parent f5b886ce5c
commit 078d808d27
2 changed files with 12 additions and 12 deletions

View File

@ -282,7 +282,7 @@ class User_Management_Controller extends REST_Controller {
$userid = $this->post('userid');
$result = $this->User_Management_Model->getUserDetails($userid);
//echo "result";
if($result['data_status'])
{
$data['dataStatus'] = true;

View File

@ -70,23 +70,23 @@ class User_Management_Model extends SPARQ_Model {
$this->db->select('USERPROFILE.userid, USERPROFILE.aws_name, concat(USERPROFILE.first_name," ", USERPROFILE.last_name) as user_full_name, USERPROFILE.email, USERPROFILE.alt_email, USERPROFILE.mobile_no, USERPROFILE.alt_mobile_no, USERPROFILE.addressline1, USERPROFILE.addressline2, USERPROFILE.profilepic, USERPROFILE.createdon, USERPROFILE.fk_createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as created_full_name, USERPROFILE.updatedon, USERPROFILE.fk_updatedby,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name)as update_full_name, USERPROFILE.fk_entity_id,ENTITY.full_name, USERPROFILE.isactive, USERPROFILE.fk_designation,DESIGNATION.name, USERPROFILE.addressline3, USERPROFILE.fk_city,CITY.name as city_name, USERPROFILE.fk_state,STATE.name as state_name, USERPROFILE.pincode,USERPROFILEROLES.user_role_id,USERPROFILEROLES.user_role');
$this->db->from(USERPROFILE.' as USERPROFILE');
$this->db->join(ENTITY.' as ENTITY','USERPROFILE.fk_entity_id = ENTITY.entity_id and ENTITY.isactive = 1','LEFT');
$this->db->join(DESIGNATION.' as DESIGNATION','USERPROFILE.fk_designation = DESIGNATION.designation_id and DESIGNATION.isactive = 1','LEFT');
$this->db->join(STATE.' as STATE','USERPROFILE.fk_state = STATE.state_id and STATE.isactive = 1','LEFT');
$this->db->join(CITY.' as CITY','USERPROFILE.fk_city = CITY.city_id and CITY.isactive = 1','LEFT');
$this->db->join(USERPROFILE.' as USERPROFILE1','USERPROFILE.fk_createdby = USERPROFILE1.userid and USERPROFILE1.isactive = 1');
$this->db->join(USERPROFILE.' as USERPROFILE2','USERPROFILE.fk_updatedby = USERPROFILE2.userid and USERPROFILE2.isactive = 1','LEFT');
$this->db->join(USERPROFILEHIERARCHY.' as USERPROFILEHIERARCHY','USERPROFILE.userid = USERPROFILEHIERARCHY.fk_user_id and USERPROFILEHIERARCHY.isactive = 1','LEFT');
$this->db->join(LENDERHIERARCHY.' as LENDERHIERARCHY','USERPROFILEHIERARCHY.user_lender_hierarchy_id = LENDERHIERARCHY.lender_hierarchy_id and LENDERHIERARCHY.isactive = 1','LEFT');
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILE.userid = USERPROFILEROLES.fk_userid and USERPROFILEROLES.isactive = 1');
$this->db->join(ENTITYTYPE.' as ENTITYTYPE','ENTITY.fk_entity_type_id = ENTITYTYPE.entity_type_id and ENTITYTYPE.isactive = 1','LEFT');
$this->db->join(ENTITY.' as ENTITY','USERPROFILE.fk_entity_id = ENTITY.entity_id','LEFT');
$this->db->join(DESIGNATION.' as DESIGNATION','USERPROFILE.fk_designation = DESIGNATION.designation_id ','LEFT');
$this->db->join(STATE.' as STATE','USERPROFILE.fk_state = STATE.state_id','LEFT');
$this->db->join(CITY.' as CITY','USERPROFILE.fk_city = CITY.city_id','LEFT');
$this->db->join(USERPROFILE.' as USERPROFILE1','USERPROFILE.fk_createdby = USERPROFILE1.userid');
$this->db->join(USERPROFILE.' as USERPROFILE2','USERPROFILE.fk_updatedby = USERPROFILE2.userid','LEFT');
$this->db->join(USERPROFILEHIERARCHY.' as USERPROFILEHIERARCHY','USERPROFILE.userid = USERPROFILEHIERARCHY.fk_user_id','LEFT');
$this->db->join(LENDERHIERARCHY.' as LENDERHIERARCHY','USERPROFILEHIERARCHY.user_lender_hierarchy_id = LENDERHIERARCHY.lender_hierarchy_id','LEFT');
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILE.userid = USERPROFILEROLES.fk_userid','LEFT');
$this->db->join(ENTITYTYPE.' as ENTITYTYPE','ENTITY.fk_entity_type_id = ENTITYTYPE.entity_type_id ','LEFT');
$this->db->where('USERPROFILE.userid',$userid);
$result = $this->db->get()->result_array();
if(count($result) != 0 )
{
$result_data['data_status'] = true;