fix
This commit is contained in:
@@ -9,6 +9,8 @@ class Dash extends Admin_Controller {
|
||||
$this->load->helper('url');
|
||||
$data = array();
|
||||
|
||||
$data = $this->dashData();
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
@@ -23,7 +25,7 @@ class Dash extends Admin_Controller {
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-primary\">View</button>' AS View,name,username,email,added,last_login from practice ORDER BY id DESC LIMIT 7";
|
||||
$data['recent_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->set_heading(array('data' => 'View', 'style' => 'width:50px'),'Practice Name', 'Username', 'Email', 'Added','Last logn');
|
||||
$this->table->set_heading(array('data' => 'View', 'style' => 'width:50px'), 'Practice Name', 'Username', 'Email', 'Added', 'Last logn');
|
||||
$data['recent_practice'] = $this->table->generate($query);
|
||||
|
||||
|
||||
@@ -41,6 +43,28 @@ class Dash extends Admin_Controller {
|
||||
$this->renderAdminPage('view_dash', $data);
|
||||
}
|
||||
|
||||
private function dashData() {
|
||||
$data = [];
|
||||
|
||||
|
||||
|
||||
//$query = $this->db->query("SELECT count(*) FROM members WHERE acc_link IS NULL AND status = 1")->num_rows();
|
||||
// $query = $this->db->query(" SELECT count(*) FROM members WHERE acc_link IS NOT NULL AND status = 1")->num_rows();
|
||||
|
||||
$data["new_patient"] = $this->db->query("SELECT id FROM members WHERE acc_link IS NULL AND status = 1")->num_rows();
|
||||
$data["establish_pateint"] = $this->db->query(" SELECT id FROM members WHERE acc_link IS NOT NULL AND status = 1")->num_rows();
|
||||
$data['deleted_users'] = $this->db->query(" SELECT id FROM members WHERE status <> 1")->num_rows();
|
||||
|
||||
$data["new_patient_percent"] = ceil(100 * $data["establish_pateint"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
$data["establish_pateint_percent"] = ceil(100 * $data["new_patient"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
|
||||
|
||||
// $data["new_patient"] = $this->db->query("SELECT id FROM members WHERE acc_link IS NULL AND status = 1")->num_rows();
|
||||
//$data["establish_pateint"] = $this->db->query(" SELECT id FROM members WHERE acc_link IS NOT NULL AND status = 1")->num_rows();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function pendingpractice() {
|
||||
|
||||
$data = array();
|
||||
@@ -48,13 +72,14 @@ class Dash extends Admin_Controller {
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"approvePractice('||id||');\">Approve</button>' AS process,
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"approvePractice('||id||');\">Process</button>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" onclick=\"resendEmail('||id||');\">Email</button>' AS semail,
|
||||
status,
|
||||
practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 20";
|
||||
$data['pending_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$this->table->set_heading(array('data' => 'Process', 'style' => 'width:50px'), 'Resend Email', 'Status', 'Practice Name', 'Username', 'Email', array('data' => 'Date Added', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
$this->renderAdminPage('view_pendingpractice', $data);
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
</div>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col ml-3">
|
||||
<h4 class="mb-0">45%</h4>
|
||||
<h4 class="mb-0"><?=$new_patient_percent?>%</h4>
|
||||
<span> <i class="fa fa-square pr-1 text-primary"></i> New Patients </span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h4 class="mb-0">55%</h4>
|
||||
<h4 class="mb-0"><?=$establish_pateint_percent?>%</h4>
|
||||
<span> <i class="fa fa-square pr-1 text-info"></i> Establish Patients </span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,8 +28,8 @@
|
||||
<div class="card-body d-flex align-itemes-center">
|
||||
<div class="media align-items-center w-100">
|
||||
<div class="text-left">
|
||||
<h3 class="mb-0">45.8k </h3>
|
||||
<span>Pending Users</span>
|
||||
<h3 class="mb-0"><?=$establish_pateint?> </h3>
|
||||
<span>Establish Users</span>
|
||||
</div>
|
||||
<div class="img-icon bg-pink ml-auto">
|
||||
<i class="ti ti-user text-white"></i>
|
||||
@@ -39,8 +39,8 @@
|
||||
<div class="card-body d-flex align-itemes-center">
|
||||
<div class="media align-items-center w-100">
|
||||
<div class="text-left">
|
||||
<h3 class="mb-0">65.4k </h3>
|
||||
<span>New Users</span>
|
||||
<h3 class="mb-0"><?=$new_patient?> </h3>
|
||||
<span>New Users/Patients</span>
|
||||
</div>
|
||||
<div class="img-icon bg-primary ml-auto">
|
||||
<i class="ti ti-tag text-white"></i>
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="card-body d-flex align-itemes-center">
|
||||
<div class="media align-items-center w-100">
|
||||
<div class="text-left">
|
||||
<h3 class="mb-0">78.2k </h3>
|
||||
<h3 class="mb-0"><?=$deleted_users?> </h3>
|
||||
<span>Deleted Users</span>
|
||||
</div>
|
||||
<div class="img-icon bg-orange ml-auto">
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="card-body d-flex align-itemes-center">
|
||||
<div class="media align-items-center w-100">
|
||||
<div class="text-left">
|
||||
<h3 class="mb-0">65.3k </h3>
|
||||
<h3 class="mb-0"><?=($establish_pateint+$new_patient) ?> </h3>
|
||||
<span>Active Users</span>
|
||||
</div>
|
||||
<div class="img-icon bg-info ml-auto">
|
||||
|
||||
Reference in New Issue
Block a user