Commit 6c37d8f4 by Jemsheer K D

Merge branch 'master' into client

parents fe4778cd 9ee8a085
<?php
$default_date = '01/01/2001';
?>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Appfeedback extends CI_Controller {
public function __construct() {
parent::__construct();
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
$this->load->model('Appfeedback_model');
}
public function index() {
$all_policy = $this->Appfeedback_model->get_doctor_feedback();
$template['page'] = "Appfeedback/feedback_doctor";
$template['page_title'] = "Manage Feedbacks";
$template['data'] = $all_policy;
$this->load->view('template', $template);
}
public function patient_index(){
$result = $this->Appfeedback_model->get_patient_feedback();
//print_r($result);exit();
$template['page'] = "Appfeedback/feedback_patient";
$template['page_title'] = "Manage Feedbacks";
$template['data'] = $result;
$this->load->view('template',$template);
}
}
\ No newline at end of file
......@@ -86,7 +86,7 @@ class MajorProblems extends CI_Controller {
$all_problems = $this->MajorProblem_model->get_all_Problems();
$all_subproblems = $this->MajorProblem_model->get_all_subProblems();
$template['page'] = "ManageSubProblems/addsubProblems";
$template['page'] = "ManageSubproblems/addsubProblems";
$template['page_title'] = "Add Major SubProblem";
$template['datas'] = $all_subproblems;
$template['data'] = $all_problems;
......
......@@ -254,6 +254,7 @@ class Webservice extends CI_Controller {
header('Content-type: application/json');
// $data =(array) json_decode(file_get_contents("php://input"));
$data = $_POST;
//print_r($this->string->default_date);exit();
//print_r($data);die();
if(isset($data['name']) && strlen($data['name']) && isset($data['username']) && strlen($data['username']) && isset($data['email']) && strlen($data['email']) && isset($data['password']) && strlen($data['password']) && isset($data['dob']) && strlen($data['dob']) && isset($data['gender']) && strlen($data['gender']) && isset($data['zip_code']) && strlen($data['zip_code']) && isset($data['street_address']) && strlen($data['street_address']) && isset($data['locality']) && strlen($data['locality']) && isset($data['number']) && strlen($data['number']) && isset($_FILES['profile_photo']))
{
......@@ -1630,7 +1631,7 @@ class Webservice extends CI_Controller {
if($end <= $end_time && ($initial > strtotime($nowin_server_addoffset))){
$time = date('h:i a',$initial).' - '.date('h:i a',$end);
$result = $this->Webservice_model->is_waiting_list_used($data,$time);
if($result != false || count($result) <= 1){
if($result == false || count($result) <= 1){
array_push($res['data']['time_interval'], array('time'=>date('h:i a',$initial).' - '.date('h:i a',$end)));
}
}
......@@ -1639,7 +1640,7 @@ class Webservice extends CI_Controller {
if($end <= $end_time && ($initial > strtotime($nowin_server_addoffset))){
$time = date('h:i a',$initial).' - '.date('h:i a',$end);
$result = $this->Webservice_model->is_waiting_list_used($data,$time);
if($result != false || count($result) <= 1){
if($result == false || count($result) <= 1){
array_push($res['data']['time_interval'], array('time'=>date('h:i a',$initial).' - '.date('h:i a',$end)));
}
}
......@@ -1647,6 +1648,7 @@ class Webservice extends CI_Controller {
}
}
}
//echo "<pre>";print_r($res['data']['time_interval']);exit();
$res['data']['time_interval'] = array_values(array_unique($res['data']['time_interval'],SORT_REGULAR));
}else{
$res = array(
......@@ -6583,9 +6585,7 @@ class Webservice extends CI_Controller {
}
if($result != ''){
foreach ($result as $key => $value) {
array_push($withdrawArray, $value);
}
}
......
......@@ -194,7 +194,6 @@ function user_menu() {
{"name":"View","cap":"manage_faqs","url":"ManageFaqs/faq_view_doctor","subcap":"manage_faqs/view_doctor_faqs"}
]'
),
array(
"slug" => "Manage Charity",
"name" => "Manage Charity",
......@@ -229,8 +228,24 @@ function user_menu() {
"capabilities" => array("cancelled_consultations"),
),
array(
"slug" => "App Feedback Doctor",//fa-wheelchair-alt,fa-blind
"name" => "App Feedback Doctor",
"url" => "Appfeedback",
"icon" => "fa-bars",
"submenu" => false,
"capabilities" => array("app_feedback_doctor"),
),
array(
"slug" => "App Feedback Patient",//fa-wheelchair-alt,fa-blind
"name" => "App Feedback Patient",
"url" => "Appfeedback/patient_index",
"icon" => "fa-bars",
"submenu" => false,
"capabilities" => array("app_feedback_patient"),
),
array(
"slug" => "Principal Issues",//fa-wheelchair-alt,fa-blind
"name" => "Principal Issues",
......@@ -373,6 +388,8 @@ function user_capabilities() {
"manage_faqs/view_doctor_faqs" => "View Doctor Faqs",
"manage_charity/add" => "Add Charity",
"manage_charity/add_services" => "Add Charity to Clinic",
"app_feedback_doctor" => "Doctor's App Feedback",
"app_feedback_patient" => "Patient's App Feedback",
"manage_wallet/withdrawal" => "Withdrawal History",
"cancelled_consultations" => "Cancelled Consultations",
"manage_doctors/add" => "Add New Doctors",
......@@ -419,6 +436,9 @@ function user_page_capabilities() {
"ManageClinic-view" => "manage_clinic/view",
"ManageClinic-bookingList" => "manage_clinic/bookinglist",
"Appfeedback-index" => "app_feedback_doctor",
"Appfeedback-patient_index" => "app_feedback_patient",
"Promocode-index" => "manage_promocode/add",
"Promocode-promocode_view" => "manage_promocode/view",
"ManageFaqs-index" => "manage_faqs/add",
......
<?php
class Appfeedback_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
public function get_doctor_feedback(){
$this->db->select('tbl_doctors.name,tbl_app_feedback.*');
$this->db->join('tbl_doctors','tbl_doctors.id = tbl_app_feedback.doctor_id');
$this->db->group_by('tbl_app_feedback.id');
$result = $this->db->get_where('tbl_app_feedback',array('doctor_id !=' =>'0'))->result();
if($result){
return $result;
}else{
return false;
}
}
public function get_patient_feedback(){
$this->db->select('tbl_registration.name,tbl_app_feedback.*');
$this->db->join('tbl_registration','tbl_registration.id = tbl_app_feedback.user_id');
$this->db->group_by('tbl_app_feedback.id');
$result = $this->db->get_where('tbl_app_feedback',array('user_id !=' => '0'))->result();
if($result){
return $result;
}else{
return false;
}
}
}
\ No newline at end of file
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>Doctor Feedbacks</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- Add -->
<div class="col-md-12">
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
</div>
<div class="col-xs-12">
<div class="box box-solid box-info">
<div class="box-header">
<h3 class="box-title">Doctor Feedbacks</h3>
</div>
<div class="box-body">
<?php if($data != ''){?>
<table class="table table-bordered table-striped datatable" data-ordering="true">
<thead>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $customer) {?>
<tr>
<td class="hidden"><?php echo $customer->id; ?></td>
<td><?php echo $customer->name; ?></td>
<td><?php if($customer->feedback_type == 0){
echo "Problemas Atendimento";
}else if ($customer->feedback_type == 1) {
echo "Dificuldade para agendamento";
}else if($customer->feedback_type == 2){
echo "Problemas Pagamento";
}else{
echo "Outros";
}
?></td>
<td><?php echo $customer->feedback_content; ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</tfoot>
</table>
<?php } else{ ?>
<div>No Result Found</div>
<?php } ?>
</div>
</div>
</div>
<!-- /.row -->
</section><!-- /.content -->
</div>
\ No newline at end of file
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>Patient Feedbacks</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- Add -->
<div class="col-md-12">
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
</div>
<div class="col-xs-12">
<div class="box box-solid box-info">
<div class="box-header">
<h3 class="box-title">Patient Feedbacks</h3>
</div>
<div class="box-body">
<?php if($data != ''){?>
<table class="table table-bordered table-striped datatable" data-ordering="true">
<thead>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $customer) {?>
<tr>
<td class="hidden"><?php echo $customer->id; ?></td>
<td><?php echo $customer->name; ?></td>
<td><?php if($customer->feedback_type == 0){
echo "Problemas Atendimento";
}else if ($customer->feedback_type == 1) {
echo "Dificuldade para agendamento";
}else if($customer->feedback_type == 2){
echo "Problemas Pagamento";
}else{
echo "Outros";
}
?></td>
<td><?php echo $customer->feedback_content; ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</tfoot>
</table>
<?php } else{ ?>
<div>No Result Found</div>
<?php } ?>
</div>
</div>
</div>
<!-- /.row -->
</section><!-- /.content -->
</div>
\ 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