<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * 
 *
 * @author Lalendra
 */
class Admin_dashboard extends MY_Controller {

    function __construct() {
        parent::__construct();
        $this->load->model('Dashboard_model');
    }

    public function getDataSet1() {
        $sess_array = $this->session->userdata('uDetails');
        if ($this->input->is_ajax_request() && $this->input->method() == "get" && $sess_array['type'] == "admin") {
            $data['SatisfactionLv'] = $this->Dashboard_model->overallSatisfaction();
            $data['depInf'] = $this->Dashboard_model->departmentVsEmp();
            echo json_encode($data);
        } else {
            $this->output->set_status_header('400');
            $this->data['message'] = 'You can not access';
        }
    }

}
