+ Bug fixed when reporting credits requests v2

This commit is contained in:
Djery-Tom 2020-11-16 11:55:49 +01:00
parent 80116d0bc3
commit 396d5b9f6c
7 changed files with 490 additions and 423 deletions

View File

@ -30,8 +30,9 @@ class Hyperviseur_dash extends CI_Controller
redirect('index.php', $data);
} else {
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), 1);
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), 0);
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '1');
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '0');
$count_d_no_canceled = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '2');
$count_d = $this->user_model->getCountDemande($this->session->userdata('member_code'));
$data['active'] = "dash";
@ -54,6 +55,7 @@ class Hyperviseur_dash extends CI_Controller
$data['count_sup'] = $this->user_model->countUser("super", 'all', $this->session->userdata('member_code'));
$data['count_d_traite'] = $count_d_traite;
$data['count_d_no_traite'] = $count_d_no_traite;
$data['count_d_no_canceled'] = $count_d_no_canceled;
$data['count_d_users'] = $count_d;
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));

View File

@ -30,8 +30,9 @@ class Superviseur_dash extends CI_Controller
$count_g = $this->User_model->geolocatedCountByParrain($this->session->userdata('member_code'));
$count_d = $this->User_model->getCountDemande($this->session->userdata('member_code'));
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), 1);
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), 0);
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), '1');
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), '0');
$count_d_no_canceled = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '2');
$data['list_geolocated_users'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
@ -52,6 +53,7 @@ class Superviseur_dash extends CI_Controller
$data['count_d_users'] = $count_d;
$data['count_d_traite'] = $count_d_traite;
$data['count_d_no_traite'] = $count_d_no_traite;
$data['count_d_no_canceled'] = $count_d_no_canceled;
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$this->load->view('header_sup', $data);
$this->load->view('superviseur_dash');

View File

@ -553,4 +553,6 @@ $lang['modify_operator'] = "Modify operator";
$lang['assign_operator_to_country'] = "Assign an operator to a country";
$lang['operator_type'] = "Operator type";
$lang['no_type'] = "No type";
$lang['accepted_demands'] = "Requests accepted";
$lang['canceled_demands'] = "Canceled requests";
?>

View File

@ -565,4 +565,6 @@ $lang['modify_operator'] = "Modifier l'opérateur";
$lang['assign_operator_to_country'] = "Assigner un opérateur à un pays";
$lang['operator_type'] = "Type d'opérateur";
$lang['no_type'] = "Aucun type";
$lang['accepted_demands'] = "Demandes acceptées";
$lang['canceled_demands'] = "Demandes annulées";
?>

View File

@ -65,6 +65,17 @@
}
}
function getDelayOfTreatmentInSeconds($time, $dateAjout){
if ($time == null) {
$now = time();
$date2 = strtotime($dateAjout);
return abs($now - $date2);
}else{
return $time ;
}
}
// function toLocateDate($date , $timezone){
// if($date){
// $carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
@ -213,6 +224,7 @@
<th>" . $this->lang->line('Date de traitement') . "</th>
<th>" . $this->lang->line('Statut') . "</th>
<th>" . $this->lang->line('Délai de traitement') . "</th>
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
</tr>";
?>
@ -250,7 +262,7 @@
<td > " . $row->dateModif . "</td>
<td>$etat</td>
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
</tr>";
}
@ -304,6 +316,7 @@
<th>" . $this->lang->line('Date de traitement') . "</th>
<th>" . $this->lang->line('Statut') . "</th>
<th>" . $this->lang->line('Délai de traitement') . "</th>
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
</tr>";
?>
@ -339,6 +352,7 @@
<td > " . $row->dateModif . "</td>
<td>$etat</td>
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
</tr>";
@ -725,6 +739,7 @@
<th>" . $this->lang->line('Date de traitement') . "</th>
<th>" . $this->lang->line('Statut') . "</th>
<th>" . $this->lang->line('Délai de traitement') . "</th>
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
</tr>";
?>
</thead>
@ -763,6 +778,7 @@
<td> " . $row->dateModif . "</td>
<td>$etat</td>
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
</tr>";
}
@ -994,7 +1010,12 @@
"columnDefs": [{
targets: [5, 6],
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
}],
},
{
"targets": [ 9 ],
"visible": false
}
],
dom: 'Bfrtip',
"buttons": [
'pageLength',
@ -1020,7 +1041,12 @@
"columnDefs": [{
targets: [3, 4],
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
}],
},
{
"targets": [ 7 ],
"visible": false
}
],
dom: 'Bfrtip',
"buttons": [
'pageLength',
@ -1045,7 +1071,12 @@
"columnDefs": [{
targets: [1, 2],
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
}],
},
{
"targets": [ 5 ],
"visible": false
}
],
dom: 'Bfrtip',
"buttons": [
'pageLength',

View File

@ -182,7 +182,7 @@ if($users_geolocated_query!=false){
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
</div>
<div class="icon">
<i class=""></i>
<i class="ion ion-location"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
@ -197,7 +197,7 @@ if($users_geolocated_query!=false){
<p><?php echo $this->lang->line('Superviseur'); ?></p>
</div>
<div class="icon">
<i class=""></i>
<i class="ion ion-ios-people"></i>
</div>
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
@ -211,7 +211,7 @@ if($users_geolocated_query!=false){
<p><?php echo $this->lang->line('Demandes de crédits'); ?></p>
</div>
<div class="icon">
<i class=""></i>
<i class="ion ion-cash"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
@ -222,10 +222,24 @@ if($users_geolocated_query!=false){
<div class="inner">
<h3><?php echo $count_d_traite;?></h3>
<p><?php echo $this->lang->line("Demandes traitées"); ?></p>
<p><?php echo $this->lang->line("accepted_demands"); ?></p>
</div>
<div class="icon">
<i class=""></i>
<i class="ion ion-checkmark-circled"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-orange">
<div class="inner">
<h3><?php echo $count_d_no_traite;?></h3>
<p><?php echo $this->lang->line("Demandes non traitées"); ?></p>
</div>
<div class="icon">
<i class="ion ion-alert-circled"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
@ -234,12 +248,12 @@ if($users_geolocated_query!=false){
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3><?php echo $count_d_no_traite;?></h3>
<h3><?php echo $count_d_no_canceled;?></h3>
<p><?php echo $this->lang->line("Demandes non traitées"); ?></p>
<p><?php echo $this->lang->line("canceled_demands"); ?></p>
</div>
<div class="icon">
<i class=""></i>
<i class="ion ion-close-circled"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>

View File

@ -172,7 +172,7 @@
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
@ -181,12 +181,12 @@
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
</div>
<div class="icon">
<i class="ion ion-person-add"></i>
<i class="ion ion-location"></i>
</div>
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
@ -200,7 +200,7 @@
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
@ -214,20 +214,34 @@
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="small-box bg-orange">
<div class="inner">
<h3><?php echo $count_d_no_traite;?></h3>
<p><?php echo $this->lang->line('Demandes non traitées'); ?></p>
</div>
<div class="icon">
<i class="ion ion-close-circled"></i>
<i class="ion ion-alert-circled"></i>
</div>
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-2 col-md-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3><?php echo $count_d_no_canceled;?></h3>
<p><?php echo $this->lang->line("canceled_demands"); ?></p>
</div>
<div class="icon">
<i class="ion ion-close-circled"></i>
</div>
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-xs-12">
<!-- BAR CHART -->