Setup Medecin controlleur panel and improve nano-sante wallet
This commit is contained in:
parent
e3c17d1a3f
commit
c8bcfcf9cb
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class ControllerDoctor extends CI_Controller
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->load->model('nano_health_model');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if ($this->isLogged()){
|
||||||
|
$data['active'] = "dashboard";
|
||||||
|
$data['network_id'] = $data['id_network'] = $this->session->userdata('network_id');
|
||||||
|
|
||||||
|
if ($this->input->get('history')) {
|
||||||
|
$history_type = $this->input->get('history');
|
||||||
|
$id = $this->input->get('id');
|
||||||
|
if($history_type == 'invoices' && !empty($id)){
|
||||||
|
$data['active'] = "invoices";
|
||||||
|
$data['invoice'] = $this->nano_health_model->getInfosInvoiceById($id);
|
||||||
|
$data['agent'] = $this->db->get_where('agent_plus',['code_membre'=> $data['invoice']->institution_code ?? null])->first_row();
|
||||||
|
$data['health_care_sheets'] = $this->db->get_where('nh_infos_health_care_sheets',['invoice_id'=> $id]);
|
||||||
|
$this->load->view('nano_health/controller_doctor/header', $data);
|
||||||
|
$this->load->view('nano_health/controller_doctor/infos_invoice', $data);
|
||||||
|
$this->load->view('footer');
|
||||||
|
}else{
|
||||||
|
$this->historique($this->input->get('d'), $this->input->get('f'), $this->input->get('history'), $data);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$data['count_accepted'] = $this->nano_health_model->getCountInvoices(null,$this->session->userdata('agent_id'), 'ACCEPTED');
|
||||||
|
$data['count_accepted_modified'] = $this->nano_health_model->getCountInvoices(null, $this->session->userdata('agent_id'), 'ACCEPTED_MODIFIED');
|
||||||
|
$data['count_rejected'] = $this->nano_health_model->getCountInvoices(null,$this->session->userdata('agent_id'), 'REJECTED');
|
||||||
|
$data['count_under_validation'] = $this->nano_health_model->getCountInvoices($data['network_id'],null, 'UNDER_VALIDATION');
|
||||||
|
|
||||||
|
$this->load->view('nano_health/controller_doctor/header', $data);
|
||||||
|
$this->load->view('nano_health/controller_doctor/dashboard', $data);
|
||||||
|
$this->load->view('footer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function historique($startDate, $endDate,$type , $data)
|
||||||
|
{
|
||||||
|
|
||||||
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||||
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null;
|
||||||
|
$data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null;
|
||||||
|
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
|
||||||
|
|
||||||
|
if ($type == 'invoices')
|
||||||
|
$data['active'] = 'invoices';
|
||||||
|
|
||||||
|
$this->load->view('nano_health/controller_doctor/header', $data);
|
||||||
|
if ($type == 'invoices')
|
||||||
|
$this->load->view('nano_health/controller_doctor/invoices');
|
||||||
|
$this->load->view('footer');
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isLogged()
|
||||||
|
{
|
||||||
|
if (!$this->session->userdata('email')) {
|
||||||
|
$this->session->set_flashdata('error', 'log in first');
|
||||||
|
|
||||||
|
$data['alert'] = "ok";
|
||||||
|
$data['message'] = "Login first!";
|
||||||
|
|
||||||
|
redirect('index.php', $data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
use Spatie\Async\Pool;
|
use Spatie\Async\Pool;
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ class Gestion extends CI_Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
public function activer()
|
public function activer()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$villes = $this->input->post('villes');
|
$villes = $this->input->post('villes');
|
||||||
|
@ -69,7 +70,7 @@ class Gestion extends CI_Controller
|
||||||
|
|
||||||
public function update()
|
public function update()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id_country = $this->input->post('id_country');
|
$id_country = $this->input->post('id_country');
|
||||||
|
@ -89,7 +90,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function activer_desactiver()
|
public function activer_desactiver()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$aVilles = $this->input->post('aVilles');
|
$aVilles = $this->input->post('aVilles');
|
||||||
|
@ -126,7 +127,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function desactiver()
|
public function desactiver()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$villes = $this->input->post('villes');
|
$villes = $this->input->post('villes');
|
||||||
|
@ -148,7 +150,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function suppress()
|
public function suppress()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$villes = $this->input->post('ville');
|
$villes = $this->input->post('ville');
|
||||||
|
@ -243,7 +246,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function creat_network()
|
public function creat_network()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$network = $this->input->post('new_network');
|
$network = $this->input->post('new_network');
|
||||||
|
@ -263,13 +266,13 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function assignation()
|
public function assignation()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$network = $this->input->post('network');
|
$network = $this->input->post('network');
|
||||||
$existe = 0;
|
$existe = 0;
|
||||||
$this->db->trans_begin();
|
$this->db->trans_begin();
|
||||||
foreach ($_POST['id_country'] AS $country) {
|
foreach ($_POST['id_country'] as $country) {
|
||||||
$res = $this->user_model->checkIfAssignationExiste($country, $network);
|
$res = $this->user_model->checkIfAssignationExiste($country, $network);
|
||||||
|
|
||||||
if ($res == false) {
|
if ($res == false) {
|
||||||
|
@ -298,7 +301,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function update_network()
|
public function update_network()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$old_network = $this->input->post('old_name');
|
$old_network = $this->input->post('old_name');
|
||||||
|
@ -317,7 +320,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function change_status_network()
|
public function change_status_network()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$activations = $this->input->post('activations');
|
$activations = $this->input->post('activations');
|
||||||
|
@ -325,7 +328,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
$this->db->trans_begin();
|
$this->db->trans_begin();
|
||||||
if (!empty($_POST['activations'])) {
|
if (!empty($_POST['activations'])) {
|
||||||
foreach ($_POST['activations'] AS $network) {
|
foreach ($_POST['activations'] as $network) {
|
||||||
|
|
||||||
$data = array('status' => 1);
|
$data = array('status' => 1);
|
||||||
$this->db->where('id', $network);
|
$this->db->where('id', $network);
|
||||||
|
@ -334,7 +337,7 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($_POST['desactivations'])) {
|
if (!empty($_POST['desactivations'])) {
|
||||||
foreach ($_POST['desactivations'] AS $network) {
|
foreach ($_POST['desactivations'] as $network) {
|
||||||
|
|
||||||
$data = array('status' => 0);
|
$data = array('status' => 0);
|
||||||
$this->db->where('id', $network);
|
$this->db->where('id', $network);
|
||||||
|
@ -385,7 +388,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function create_admin()
|
public function create_admin()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$category = 1;
|
$category = 1;
|
||||||
$firstname = $this->input->post('prenom');
|
$firstname = $this->input->post('prenom');
|
||||||
|
@ -437,7 +440,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function modif_admin()
|
public function modif_admin()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id = $this->input->post('id');
|
$id = $this->input->post('id');
|
||||||
|
@ -462,7 +465,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function delete_admin()
|
public function delete_admin()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id = $this->input->post('id');
|
$id = $this->input->post('id');
|
||||||
|
@ -480,7 +483,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function codes()
|
public function codes()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
$ville = $this->session->userdata('current_ville');
|
$ville = $this->session->userdata('current_ville');
|
||||||
$hyper = $this->session->userdata('current_hyper');
|
$hyper = $this->session->userdata('current_hyper');
|
||||||
$pays = $this->session->userdata('current_pays');
|
$pays = $this->session->userdata('current_pays');
|
||||||
|
@ -562,7 +565,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
private function randomString($length = 10)
|
private function randomString($length = 10)
|
||||||
{
|
{
|
||||||
do{
|
do {
|
||||||
$str = "";
|
$str = "";
|
||||||
$characters = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'));
|
$characters = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'));
|
||||||
$max = count($characters) - 1;
|
$max = count($characters) - 1;
|
||||||
|
@ -570,8 +573,8 @@ if($this->isLogged()) {
|
||||||
$rand = mt_rand(0, $max);
|
$rand = mt_rand(0, $max);
|
||||||
$str .= $characters[$rand];
|
$str .= $characters[$rand];
|
||||||
}
|
}
|
||||||
$q = $this->db->get_where('codeGenerer',['code_membre' => $str]);
|
$q = $this->db->get_where('codeGenerer', ['code_membre' => $str]);
|
||||||
}while($q->num_rows() != 0);
|
} while ($q->num_rows() != 0);
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
@ -601,7 +604,7 @@ if($this->isLogged()) {
|
||||||
$network_geolocalisation = array();
|
$network_geolocalisation = array();
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
if($data['networks']) {
|
if ($data['networks']) {
|
||||||
foreach ($data['networks']->result() as $row) {
|
foreach ($data['networks']->result() as $row) {
|
||||||
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $data['current_agent']);
|
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $data['current_agent']);
|
||||||
$network_geolocalisation[$count] = $row->name;
|
$network_geolocalisation[$count] = $row->name;
|
||||||
|
@ -622,7 +625,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function infos_geolocalisation()
|
public function infos_geolocalisation()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$pays = $this->input->post('pays');
|
$pays = $this->input->post('pays');
|
||||||
|
@ -643,7 +646,7 @@ if($this->isLogged()) {
|
||||||
$network_geolocalisation = array();
|
$network_geolocalisation = array();
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
if($data['networks']) {
|
if ($data['networks']) {
|
||||||
foreach ($data['networks']->result() as $row) {
|
foreach ($data['networks']->result() as $row) {
|
||||||
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $lastname);
|
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $lastname);
|
||||||
$network_geolocalisation[$count] = $row->name;
|
$network_geolocalisation[$count] = $row->name;
|
||||||
|
@ -756,12 +759,12 @@ if($this->isLogged()) {
|
||||||
$networks_name[] = null;
|
$networks_name[] = null;
|
||||||
|
|
||||||
if ($data['agent'] != false) {
|
if ($data['agent'] != false) {
|
||||||
foreach ($data['agent']->result() AS $row1) {
|
foreach ($data['agent']->result() as $row1) {
|
||||||
if (!strstr($row1->lastname, "Super -") and !strstr($row1->lastname, "Airtel")) {
|
if (!strstr($row1->lastname, "Super -") and !strstr($row1->lastname, "Airtel")) {
|
||||||
$totalGeo = 0;
|
$totalGeo = 0;
|
||||||
$totalGeoCorrect = 0;
|
$totalGeoCorrect = 0;
|
||||||
$agent[$countA][0] = $row1->lastname;
|
$agent[$countA][0] = $row1->lastname;
|
||||||
foreach ($data['networks']->result() AS $row2) {
|
foreach ($data['networks']->result() as $row2) {
|
||||||
$number_geolocalisation [$countA][$count] = $this->user_model->getPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin);
|
$number_geolocalisation [$countA][$count] = $this->user_model->getPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin);
|
||||||
$number_correct [$countA][$count] = $this->user_model->getCorrectPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin);
|
$number_correct [$countA][$count] = $this->user_model->getCorrectPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin);
|
||||||
$network_geolocalisation [$countA][$count] = $row2->name;
|
$network_geolocalisation [$countA][$count] = $row2->name;
|
||||||
|
@ -780,7 +783,7 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($data['networks']->result() AS $row) {
|
foreach ($data['networks']->result() as $row) {
|
||||||
$networks_compte[$network_count] = $this->user_model->getPointGeolocalisedByNetwork($row->id, $debut, $fin);
|
$networks_compte[$network_count] = $this->user_model->getPointGeolocalisedByNetwork($row->id, $debut, $fin);
|
||||||
$networks_name[$network_count] = $row->name;
|
$networks_name[$network_count] = $row->name;
|
||||||
$network_count++;
|
$network_count++;
|
||||||
|
@ -813,7 +816,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function redirect_info_agent()
|
public function redirect_info_agent()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_GET)) {
|
if (isset($_GET)) {
|
||||||
$lastname = $this->input->get('agent');
|
$lastname = $this->input->get('agent');
|
||||||
|
@ -834,7 +837,7 @@ if($this->isLogged()) {
|
||||||
$network_geolocalisation = array();
|
$network_geolocalisation = array();
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
foreach ($data['networks']->result() AS $row) {
|
foreach ($data['networks']->result() as $row) {
|
||||||
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalisedByDate($row->id, $lastname, $debut, $fin);
|
$number_geolocalisation[$count] = $this->user_model->getPointGeolocalisedByDate($row->id, $lastname, $debut, $fin);
|
||||||
$network_geolocalisation[$count] = $row->name;
|
$network_geolocalisation[$count] = $row->name;
|
||||||
$count++;
|
$count++;
|
||||||
|
@ -902,7 +905,7 @@ if($this->isLogged()) {
|
||||||
$data['q2'] = $this->user_model->getQuota(2);
|
$data['q2'] = $this->user_model->getQuota(2);
|
||||||
$data['q3'] = $this->user_model->getQuota(3);
|
$data['q3'] = $this->user_model->getQuota(3);
|
||||||
$data['q4'] = $this->user_model->getQuota(4);
|
$data['q4'] = $this->user_model->getQuota(4);
|
||||||
$data['list'] = $this->user_model->getMembers($pays,$data['q1']);
|
$data['list'] = $this->user_model->getMembers($pays, $data['q1']);
|
||||||
$data['quota1'] = $this->user_model->getCoutForQuota($pays, $data['q1'], $data['q2']);
|
$data['quota1'] = $this->user_model->getCoutForQuota($pays, $data['q1'], $data['q2']);
|
||||||
$data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']);
|
$data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']);
|
||||||
$data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']);
|
$data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']);
|
||||||
|
@ -919,7 +922,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function activerGame()
|
public function activerGame()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$pays = $this->input->post('pays');
|
$pays = $this->input->post('pays');
|
||||||
|
@ -951,7 +955,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function desactiverGame()
|
public function desactiverGame()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$pays = $this->input->post('pays');
|
$pays = $this->input->post('pays');
|
||||||
|
@ -1030,7 +1035,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function modifierPalier()
|
public function modifierPalier()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$n1 = $this->input->post('n1');
|
$n1 = $this->input->post('n1');
|
||||||
|
@ -1134,7 +1140,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function get_user()
|
public function get_user()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$nom = $this->input->post('nom');
|
$nom = $this->input->post('nom');
|
||||||
|
@ -1226,7 +1232,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function update_info_user()
|
public function update_info_user()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id = $_POST['user_id'];
|
$id = $_POST['user_id'];
|
||||||
$phone = $_POST['contact'];
|
$phone = $_POST['contact'];
|
||||||
|
@ -1247,7 +1253,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function update_info_geolocated()
|
public function update_info_geolocated()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id_agent = $_POST['user_id'];
|
$id_agent = $_POST['user_id'];
|
||||||
$id_netAg = $_POST['id_netAg'];
|
$id_netAg = $_POST['id_netAg'];
|
||||||
|
@ -1256,9 +1262,9 @@ if($this->isLogged()) {
|
||||||
$adresse = $_POST['adresse'];
|
$adresse = $_POST['adresse'];
|
||||||
$email = $_POST['email'];
|
$email = $_POST['email'];
|
||||||
$nom = $_POST['nom'];
|
$nom = $_POST['nom'];
|
||||||
if($this->user_model->isAgentPhoneExist($id_netAg,$phone,$transac)){
|
if ($this->user_model->isAgentPhoneExist($id_netAg, $phone, $transac)) {
|
||||||
echo json_encode("400");
|
echo json_encode("400");
|
||||||
}else{
|
} else {
|
||||||
$res = $this->user_model->update_geolocated_infos($nom, $adresse, $email, $id_agent, $transac, $phone, $id_netAg);
|
$res = $this->user_model->update_geolocated_infos($nom, $adresse, $email, $id_agent, $transac, $phone, $id_netAg);
|
||||||
if ($res != false) {
|
if ($res != false) {
|
||||||
echo json_encode("200");
|
echo json_encode("200");
|
||||||
|
@ -1297,7 +1303,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function changePubState()
|
public function changePubState()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id_pub = $_POST['pub_id'];
|
$id_pub = $_POST['pub_id'];
|
||||||
$etat = $_POST['etat'];
|
$etat = $_POST['etat'];
|
||||||
|
@ -1318,7 +1324,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addPubRow()
|
public function addPubRow()
|
||||||
{if($this->isLogged()) {
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id_country = $_POST['country_id'];
|
$id_country = $_POST['country_id'];
|
||||||
$res = $this->user_model->createPubRow($id_country);
|
$res = $this->user_model->createPubRow($id_country);
|
||||||
|
@ -1347,16 +1354,16 @@ if($this->isLogged()) {
|
||||||
if ($this->input->get('id')) {
|
if ($this->input->get('id')) {
|
||||||
|
|
||||||
$network_id = $this->input->get('id');
|
$network_id = $this->input->get('id');
|
||||||
if($this->input->get('history')){
|
if ($this->input->get('history')) {
|
||||||
$this->historique($network_id,$this->input->get('d'),$this->input->get('f'),$this->input->get('history'));
|
$this->historique($network_id, $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
|
||||||
}else{
|
} else {
|
||||||
$taux = $this->user_model->getTaux($network_id);
|
$taux = $this->user_model->getTaux($network_id);
|
||||||
$data['currency'] = $this->wallet_model->getCurrency($network_id);
|
$data['currency'] = $this->wallet_model->getCurrency($network_id);
|
||||||
if ($taux != null) {
|
if ($taux != null) {
|
||||||
$taux = $taux->first_row();
|
$taux = $taux->first_row();
|
||||||
$data['idConfig'] = $taux->id;
|
$data['idConfig'] = $taux->id;
|
||||||
$data['type'] = $taux->type;
|
$data['type'] = $taux->type;
|
||||||
if ($taux->type == 'visa'){
|
if ($taux->type == 'visa') {
|
||||||
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
||||||
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
||||||
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
||||||
|
@ -1367,26 +1374,26 @@ if($this->isLogged()) {
|
||||||
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
||||||
$data['frais_d'] = $taux->frais_min_banque_depot;
|
$data['frais_d'] = $taux->frais_min_banque_depot;
|
||||||
|
|
||||||
$data['transactions'] = $this->user_model->getTransactions(null,null,$network_id);
|
$data['transactions'] = $this->user_model->getTransactions(null, null, $network_id);
|
||||||
$totalCommissionBanque = 0;
|
$totalCommissionBanque = 0;
|
||||||
if($data['transactions']){
|
if ($data['transactions']) {
|
||||||
foreach ($data['transactions']->result() as $row) {
|
foreach ($data['transactions']->result() as $row) {
|
||||||
$totalCommissionBanque += $row->commission_banque;
|
$totalCommissionBanque += $row->commission_banque;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['totalCommissionBanque'] = $totalCommissionBanque ;
|
$data['totalCommissionBanque'] = $totalCommissionBanque;
|
||||||
|
|
||||||
} elseif ($taux->type == 'ilink'){
|
} elseif ($taux->type == 'ilink') {
|
||||||
$data['plr_user_wallet_wallet'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_international", $data['idConfig']);
|
$data['plr_user_wallet_wallet'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_international", $data['idConfig']);
|
||||||
$data['plr_user_wallet_cash'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_international", $data['idConfig']);
|
$data['plr_user_wallet_cash'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_international", $data['idConfig']);
|
||||||
$data['plr_agent_depot_wallet_ilink'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_international" , $data['idConfig']);
|
$data['plr_agent_depot_wallet_ilink'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_international", $data['idConfig']);
|
||||||
$data['plr_agent_depot_autre_wallet'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_international" , $data['idConfig']);
|
$data['plr_agent_depot_autre_wallet'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_international", $data['idConfig']);
|
||||||
$data['plr_agent_cash_cash'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_international", $data['idConfig']);
|
$data['plr_agent_cash_cash'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_international", $data['idConfig']);
|
||||||
|
|
||||||
$data['plr_user_wallet_wallet_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_national", $data['idConfig']);
|
$data['plr_user_wallet_wallet_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_national", $data['idConfig']);
|
||||||
$data['plr_user_wallet_cash_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_national", $data['idConfig']);
|
$data['plr_user_wallet_cash_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_national", $data['idConfig']);
|
||||||
$data['plr_agent_depot_wallet_ilink_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_national" , $data['idConfig']);
|
$data['plr_agent_depot_wallet_ilink_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_national", $data['idConfig']);
|
||||||
$data['plr_agent_depot_autre_wallet_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_national" , $data['idConfig']);
|
$data['plr_agent_depot_autre_wallet_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_national", $data['idConfig']);
|
||||||
$data['plr_agent_cash_cash_national'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_national", $data['idConfig']);
|
$data['plr_agent_cash_cash_national'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_national", $data['idConfig']);
|
||||||
|
|
||||||
$data['taxes'] = $this->wallet_model->getTaxes($data['idConfig']);
|
$data['taxes'] = $this->wallet_model->getTaxes($data['idConfig']);
|
||||||
|
@ -1423,13 +1430,13 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
$data["totalCommissionBanque"] = $totalCommissionBanque;
|
$data["totalCommissionBanque"] = $totalCommissionBanque;
|
||||||
|
|
||||||
}elseif ($taux->type == 'autre') {
|
} elseif ($taux->type == 'autre') {
|
||||||
$res = $this->wallet_model->getSharingRateByNetwork($network_id);
|
$res = $this->wallet_model->getSharingRateByNetwork($network_id);
|
||||||
$data['commission'] = $res ? $res->first_row()->balance_com : 0 ;
|
$data['commission'] = $res ? $res->first_row()->balance_com : 0;
|
||||||
}elseif($taux->type == 'ilink_sante'){
|
} elseif ($taux->type == 'ilink_sante') {
|
||||||
$nh_config = $this->nano_health_model->getConfig($network_id);
|
$nh_config = $this->nano_health_model->getConfig($network_id);
|
||||||
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
|
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null;
|
||||||
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
|
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null;
|
||||||
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
|
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
|
||||||
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
||||||
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
||||||
|
@ -1440,7 +1447,7 @@ if($this->isLogged()) {
|
||||||
$data['walletHyper'] = $this->wallet_model->getWallet($hyper->agent_id);
|
$data['walletHyper'] = $this->wallet_model->getWallet($hyper->agent_id);
|
||||||
$data['network_id'] = $network_id;
|
$data['network_id'] = $network_id;
|
||||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||||
if($networkDetails){
|
if ($networkDetails) {
|
||||||
$data['network'] = $networkDetails->first_row()->network;
|
$data['network'] = $networkDetails->first_row()->network;
|
||||||
$data['country'] = $networkDetails->first_row()->country;
|
$data['country'] = $networkDetails->first_row()->country;
|
||||||
}
|
}
|
||||||
|
@ -1479,28 +1486,28 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function config_wallet($method = 'create')
|
public function config_wallet($method = 'create')
|
||||||
{
|
{
|
||||||
if($this->isLogged()){
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$type = $_POST['type'];
|
$type = $_POST['type'];
|
||||||
$res = false;
|
$res = false;
|
||||||
if($method == 'create') {
|
if ($method == 'create') {
|
||||||
$country_id = $_POST['country_id'];
|
$country_id = $_POST['country_id'];
|
||||||
$network_id = $_POST['network_id'];
|
$network_id = $_POST['network_id'];
|
||||||
|
|
||||||
if($type == 'ilink'){
|
if ($type == 'ilink') {
|
||||||
$exist = $this->wallet_model->verifyConfigWalletInCountry($type,$country_id);
|
$exist = $this->wallet_model->verifyConfigWalletInCountry($type, $country_id);
|
||||||
if($exist){
|
if ($exist) {
|
||||||
echo json_encode("403");
|
echo json_encode("403");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$res = $this->wallet_model->addConfigWallet($network_id , $type);
|
$res = $this->wallet_model->addConfigWallet($network_id, $type);
|
||||||
|
|
||||||
} else if($method == 'update'){
|
} else if ($method == 'update') {
|
||||||
|
|
||||||
$idConfig = $_POST['id_config'];
|
$idConfig = $_POST['id_config'];
|
||||||
|
|
||||||
if($type == 'visa'){
|
if ($type == 'visa') {
|
||||||
$taux_client_r = $_POST['taux_client_r'];
|
$taux_client_r = $_POST['taux_client_r'];
|
||||||
$taux_client_d = $_POST['taux_client_d'];
|
$taux_client_d = $_POST['taux_client_d'];
|
||||||
$taux_ag_d = $_POST['taux_ag_d'];
|
$taux_ag_d = $_POST['taux_ag_d'];
|
||||||
|
@ -1511,9 +1518,9 @@ if($this->isLogged()) {
|
||||||
$taux_bq_r = $_POST['taux_bq_r'];
|
$taux_bq_r = $_POST['taux_bq_r'];
|
||||||
$frais_d = $_POST['frais_d'];
|
$frais_d = $_POST['frais_d'];
|
||||||
|
|
||||||
$res = $this->wallet_model->updateConfigWallet($idConfig , $taux_client_r , $taux_client_d , $taux_ag_r ,$taux_ag_d , $taux_sup_r , $taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d);
|
$res = $this->wallet_model->updateConfigWallet($idConfig, $taux_client_r, $taux_client_d, $taux_ag_r, $taux_ag_d, $taux_sup_r, $taux_sup_d, $taux_bq_r, $taux_bq_d, $frais_d);
|
||||||
|
|
||||||
}else if ($type == 'ilink'){
|
} else if ($type == 'ilink') {
|
||||||
|
|
||||||
$config = $_POST['config'];
|
$config = $_POST['config'];
|
||||||
$fields = isset($_POST['fields']) ? $_POST['fields'] : [];
|
$fields = isset($_POST['fields']) ? $_POST['fields'] : [];
|
||||||
|
@ -1522,10 +1529,10 @@ if($this->isLogged()) {
|
||||||
//Convert fields to simple array
|
//Convert fields to simple array
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
$array = json_decode(json_encode($field), true);
|
$array = json_decode(json_encode($field), true);
|
||||||
$i=0;
|
$i = 0;
|
||||||
$name = "";
|
$name = "";
|
||||||
foreach ($array as $key => $value){
|
foreach ($array as $key => $value) {
|
||||||
if($i == 0)
|
if ($i == 0)
|
||||||
$name = $value;
|
$name = $value;
|
||||||
else
|
else
|
||||||
$rows[$name] = $value;
|
$rows[$name] = $value;
|
||||||
|
@ -1533,62 +1540,62 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($config){
|
switch ($config) {
|
||||||
case 'user_wallet_wallet':
|
case 'user_wallet_wallet':
|
||||||
$plr_user_wallet_wallet = isset($_POST['plr_user_wallet_wallet']) ? $_POST['plr_user_wallet_wallet'] : null ;
|
$plr_user_wallet_wallet = isset($_POST['plr_user_wallet_wallet']) ? $_POST['plr_user_wallet_wallet'] : null;
|
||||||
$plr_user_wallet_wallet_national = isset($_POST['plr_user_wallet_wallet_national']) ? $_POST['plr_user_wallet_wallet_national'] : null ;
|
$plr_user_wallet_wallet_national = isset($_POST['plr_user_wallet_wallet_national']) ? $_POST['plr_user_wallet_wallet_national'] : null;
|
||||||
$this->insertPalier($plr_user_wallet_wallet,"user_wallet_wallet_international", $idConfig);
|
$this->insertPalier($plr_user_wallet_wallet, "user_wallet_wallet_international", $idConfig);
|
||||||
$this->insertPalier($plr_user_wallet_wallet_national,"user_wallet_wallet_national", $idConfig);
|
$this->insertPalier($plr_user_wallet_wallet_national, "user_wallet_wallet_national", $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'user_wallet_carte':
|
case 'user_wallet_carte':
|
||||||
$this->wallet_model->updateConfigWalletIlink_u_w_cart($rows['taux_u_w_cart'],$rows['taux_hyp_s_wallet_cart_ilink'],$rows['taux_bq_s_wallet_cart_ilink'],$idConfig);
|
$this->wallet_model->updateConfigWalletIlink_u_w_cart($rows['taux_u_w_cart'], $rows['taux_hyp_s_wallet_cart_ilink'], $rows['taux_bq_s_wallet_cart_ilink'], $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'user_wallet_cash':
|
case 'user_wallet_cash':
|
||||||
$plr_user_wallet_cash = isset($_POST['plr_user_wallet_cash']) ? $_POST['plr_user_wallet_cash'] : null ;
|
$plr_user_wallet_cash = isset($_POST['plr_user_wallet_cash']) ? $_POST['plr_user_wallet_cash'] : null;
|
||||||
$plr_user_wallet_cash_national = isset($_POST['plr_user_wallet_cash_national']) ? $_POST['plr_user_wallet_cash_national'] : null ;
|
$plr_user_wallet_cash_national = isset($_POST['plr_user_wallet_cash_national']) ? $_POST['plr_user_wallet_cash_national'] : null;
|
||||||
$this->insertPalier($plr_user_wallet_cash,"user_wallet_cash_international", $idConfig);
|
$this->insertPalier($plr_user_wallet_cash, "user_wallet_cash_international", $idConfig);
|
||||||
$this->insertPalier($plr_user_wallet_cash_national,"user_wallet_cash_national", $idConfig);
|
$this->insertPalier($plr_user_wallet_cash_national, "user_wallet_cash_national", $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'user_carte_wallet':
|
case 'user_carte_wallet':
|
||||||
$this->wallet_model->updateConfigWalletIlink_u_c_w($rows['taux_u_c_w'],$rows['taux_u_c_c'], $rows['taux_hyp_r_cart_ilink'],$rows['taux_bq_r_cart_ilink'],$idConfig);
|
$this->wallet_model->updateConfigWalletIlink_u_c_w($rows['taux_u_c_w'], $rows['taux_u_c_c'], $rows['taux_hyp_r_cart_ilink'], $rows['taux_bq_r_cart_ilink'], $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'agent_remove_cash':
|
case 'agent_remove_cash':
|
||||||
$this->wallet_model->updateConfigWalletIlink_a_r_c($rows['taux_ag_r_c'],$rows['taux_sup_r_c'],
|
$this->wallet_model->updateConfigWalletIlink_a_r_c($rows['taux_ag_r_c'], $rows['taux_sup_r_c'],
|
||||||
$rows['taux_hyp_r_c'],$idConfig);
|
$rows['taux_hyp_r_c'], $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'agent_remove_carte_cash':
|
case 'agent_remove_carte_cash':
|
||||||
$this->wallet_model->updateConfigWalletIlink_a_r_cart($rows['taux_ag_cart_c'], $rows['taux_ag_r_cart'],$rows['taux_sup_r_cart'],
|
$this->wallet_model->updateConfigWalletIlink_a_r_cart($rows['taux_ag_cart_c'], $rows['taux_ag_r_cart'], $rows['taux_sup_r_cart'],
|
||||||
$rows['taux_hyp_r_cart'],$rows['taux_bq_r_cart'],$idConfig);
|
$rows['taux_hyp_r_cart'], $rows['taux_bq_r_cart'], $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'agent_send_cash_carte':
|
case 'agent_send_cash_carte':
|
||||||
$this->wallet_model->updateConfigWalletIlink_a_s_cc($rows['taux_ag_d_c_c'],$rows['taux_ag_d_c'],$rows['taux_sup_d_c'],$rows['taux_hyp_d_c'],$rows['taux_bq_d_c'],$idConfig);
|
$this->wallet_model->updateConfigWalletIlink_a_s_cc($rows['taux_ag_d_c_c'], $rows['taux_ag_d_c'], $rows['taux_sup_d_c'], $rows['taux_hyp_d_c'], $rows['taux_bq_d_c'], $idConfig);
|
||||||
break;
|
break;
|
||||||
case 'agent_send_cash_canal':
|
case 'agent_send_cash_canal':
|
||||||
$plr_agent_depot_wallet_ilink = isset($_POST['plr_agent_depot_wallet_ilink']) ? $_POST['plr_agent_depot_wallet_ilink'] : null;
|
$plr_agent_depot_wallet_ilink = isset($_POST['plr_agent_depot_wallet_ilink']) ? $_POST['plr_agent_depot_wallet_ilink'] : null;
|
||||||
$plr_agent_depot_autre_wallet = isset($_POST['plr_agent_depot_autre_wallet']) ? $_POST['plr_agent_depot_autre_wallet'] : null;
|
$plr_agent_depot_autre_wallet = isset($_POST['plr_agent_depot_autre_wallet']) ? $_POST['plr_agent_depot_autre_wallet'] : null;
|
||||||
$plr_agent_cash_cash = isset($_POST['plr_agent_cash_cash']) ? $_POST['plr_agent_cash_cash'] : null ;
|
$plr_agent_cash_cash = isset($_POST['plr_agent_cash_cash']) ? $_POST['plr_agent_cash_cash'] : null;
|
||||||
|
|
||||||
$plr_agent_depot_wallet_ilink_national = isset($_POST['plr_agent_depot_wallet_ilink_national']) ? $_POST['plr_agent_depot_wallet_ilink_national'] : null;
|
$plr_agent_depot_wallet_ilink_national = isset($_POST['plr_agent_depot_wallet_ilink_national']) ? $_POST['plr_agent_depot_wallet_ilink_national'] : null;
|
||||||
$plr_agent_depot_autre_wallet_national = isset($_POST['plr_agent_depot_autre_wallet_national']) ? $_POST['plr_agent_depot_autre_wallet_national'] : null;
|
$plr_agent_depot_autre_wallet_national = isset($_POST['plr_agent_depot_autre_wallet_national']) ? $_POST['plr_agent_depot_autre_wallet_national'] : null;
|
||||||
$plr_agent_cash_cash_national = isset($_POST['plr_agent_cash_cash_national']) ? $_POST['plr_agent_cash_cash_national'] : null ;
|
$plr_agent_cash_cash_national = isset($_POST['plr_agent_cash_cash_national']) ? $_POST['plr_agent_cash_cash_national'] : null;
|
||||||
|
|
||||||
$this->insertPalier($plr_agent_depot_wallet_ilink,"agent_depot_wallet_ilink_international", $idConfig);
|
$this->insertPalier($plr_agent_depot_wallet_ilink, "agent_depot_wallet_ilink_international", $idConfig);
|
||||||
$this->insertPalier($plr_agent_depot_autre_wallet,"agent_depot_autre_wallet_international", $idConfig);
|
$this->insertPalier($plr_agent_depot_autre_wallet, "agent_depot_autre_wallet_international", $idConfig);
|
||||||
$this->insertPalier($plr_agent_cash_cash,"agent_cash_cash_international", $idConfig);
|
$this->insertPalier($plr_agent_cash_cash, "agent_cash_cash_international", $idConfig);
|
||||||
|
|
||||||
$this->insertPalier($plr_agent_depot_wallet_ilink_national,"agent_depot_wallet_ilink_national", $idConfig);
|
$this->insertPalier($plr_agent_depot_wallet_ilink_national, "agent_depot_wallet_ilink_national", $idConfig);
|
||||||
$this->insertPalier($plr_agent_depot_autre_wallet_national,"agent_depot_autre_wallet_national", $idConfig);
|
$this->insertPalier($plr_agent_depot_autre_wallet_national, "agent_depot_autre_wallet_national", $idConfig);
|
||||||
$this->insertPalier($plr_agent_cash_cash_national,"agent_cash_cash_national", $idConfig);
|
$this->insertPalier($plr_agent_cash_cash_national, "agent_cash_cash_national", $idConfig);
|
||||||
|
|
||||||
$this->wallet_model->updateConfigWalletIlink_a_s_c($rows['taux_ag_s_c'],$rows['taux_sup_s_c'],$rows['taux_hyp_s_c'],$idConfig);
|
$this->wallet_model->updateConfigWalletIlink_a_s_c($rows['taux_ag_s_c'], $rows['taux_sup_s_c'], $rows['taux_hyp_s_c'], $idConfig);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = true;
|
$res = true;
|
||||||
}else if($type == 'ilink_sante'){
|
} else if ($type == 'ilink_sante') {
|
||||||
unset($_POST['id_config'],$_POST['type']);
|
unset($_POST['id_config'], $_POST['type']);
|
||||||
$this->nano_health_model->updateConfig($idConfig,$_POST);
|
$this->nano_health_model->updateConfig($idConfig, $_POST);
|
||||||
$res = true;
|
$res = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1603,9 +1610,10 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveTaxes(){
|
public function saveTaxes()
|
||||||
if($this->isLogged()) {
|
{
|
||||||
if(isset($_POST)) {
|
if ($this->isLogged()) {
|
||||||
|
if (isset($_POST)) {
|
||||||
$idConfig = $_POST['id_config'];
|
$idConfig = $_POST['id_config'];
|
||||||
$taxes = isset($_POST['taxes']) ? $_POST['taxes'] : null;
|
$taxes = isset($_POST['taxes']) ? $_POST['taxes'] : null;
|
||||||
$categorie = isset($_POST['categorie']) ? $_POST['categorie'] : 'wallet';
|
$categorie = isset($_POST['categorie']) ? $_POST['categorie'] : 'wallet';
|
||||||
|
@ -1621,14 +1629,15 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function insertPalier($palier , $name , $idConfig){
|
private function insertPalier($palier, $name, $idConfig)
|
||||||
|
{
|
||||||
|
|
||||||
$exist = $this->wallet_model->getPalierConfigWallet($name , $idConfig);
|
$exist = $this->wallet_model->getPalierConfigWallet($name, $idConfig);
|
||||||
if($exist){
|
if ($exist) {
|
||||||
$this->wallet_model->deletePalierConfigWallet($name , $idConfig);
|
$this->wallet_model->deletePalierConfigWallet($name, $idConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($palier) {
|
if ($palier) {
|
||||||
foreach ($palier as $p) {
|
foreach ($palier as $p) {
|
||||||
$array = json_decode(json_encode($p), true);
|
$array = json_decode(json_encode($p), true);
|
||||||
$row = [];
|
$row = [];
|
||||||
|
@ -1665,7 +1674,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function delete_config_wallet()
|
public function delete_config_wallet()
|
||||||
{
|
{
|
||||||
if($this->isLogged()){
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$network_id = $_POST['network_id'];
|
$network_id = $_POST['network_id'];
|
||||||
$res = $this->wallet_model->deleteConfigWallet($network_id);
|
$res = $this->wallet_model->deleteConfigWallet($network_id);
|
||||||
|
@ -1681,7 +1690,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function disable_config_wallet()
|
public function disable_config_wallet()
|
||||||
{
|
{
|
||||||
if($this->isLogged()){
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$network_id = $_POST['network_id'];
|
$network_id = $_POST['network_id'];
|
||||||
$res = $this->wallet_model->disableConfigWallet($network_id);
|
$res = $this->wallet_model->disableConfigWallet($network_id);
|
||||||
|
@ -1709,24 +1718,25 @@ if($this->isLogged()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generateAllWallets(){
|
public function generateAllWallets()
|
||||||
|
{
|
||||||
// Asynchrous method
|
// Asynchrous method
|
||||||
|
|
||||||
$network_id = $_POST['network_id'];
|
$network_id = $_POST['network_id'];
|
||||||
$type = $_POST['type'];
|
$type = $_POST['type'];
|
||||||
if($type != 'autre'){
|
if ($type != 'autre') {
|
||||||
$pool = Pool::create();
|
$pool = Pool::create();
|
||||||
$pool->add(function () use ($network_id) {
|
$pool->add(function () use ($network_id) {
|
||||||
// Fetch all agents , hyperviseur , superviseur
|
// Fetch all agents , hyperviseur , superviseur
|
||||||
$f_agents = $this->wallet_model->getAllAgentsForNetwork($network_id) ;
|
$f_agents = $this->wallet_model->getAllAgentsForNetwork($network_id);
|
||||||
if ($f_agents){
|
if ($f_agents) {
|
||||||
foreach($f_agents->result() AS $row){
|
foreach ($f_agents->result() as $row) {
|
||||||
//Create wallet if it not exist
|
//Create wallet if it not exist
|
||||||
$res = $this->wallet_model->getWallet($row->agent_id);
|
$res = $this->wallet_model->getWallet($row->agent_id);
|
||||||
if($res){
|
if ($res) {
|
||||||
// Reinitialize the wallet
|
// Reinitialize the wallet
|
||||||
// $this->wallet_model->reinitializeWallet($res->first_row()->wallet_id);
|
// $this->wallet_model->reinitializeWallet($res->first_row()->wallet_id);
|
||||||
}else{
|
} else {
|
||||||
$this->wallet_model->addWallet($row->agent_id);
|
$this->wallet_model->addWallet($row->agent_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1739,14 +1749,14 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function historique($network_id ,$startDate ,$endDate, $type)
|
private function historique($network_id, $startDate, $endDate, $type)
|
||||||
{
|
{
|
||||||
|
|
||||||
$data['configWallet'] = $this->wallet_model->getConfigWallet($network_id);
|
$data['configWallet'] = $this->wallet_model->getConfigWallet($network_id);
|
||||||
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ;
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||||
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ;
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null;
|
||||||
$data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ;
|
$data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null;
|
||||||
$endDate = Date('Y-m-d', strtotime($endDate."+1 day"));
|
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
|
||||||
if ($type == 'recharge')
|
if ($type == 'recharge')
|
||||||
$data['transactions'] = $this->wallet_model->getRecharges($startDate, $endDate, $network_id);
|
$data['transactions'] = $this->wallet_model->getRecharges($startDate, $endDate, $network_id);
|
||||||
|
|
||||||
|
@ -1755,7 +1765,7 @@ if($this->isLogged()) {
|
||||||
$data['networks'] = $this->wallet_model->getAllActivatedNetworks();
|
$data['networks'] = $this->wallet_model->getAllActivatedNetworks();
|
||||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||||
if($networkDetails){
|
if ($networkDetails) {
|
||||||
$data['network'] = $networkDetails->first_row()->network;
|
$data['network'] = $networkDetails->first_row()->network;
|
||||||
$data['country'] = $networkDetails->first_row()->country;
|
$data['country'] = $networkDetails->first_row()->country;
|
||||||
$data['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr;
|
$data['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr;
|
||||||
|
@ -1778,7 +1788,7 @@ if($this->isLogged()) {
|
||||||
public function currency()
|
public function currency()
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->isLogged()){
|
if ($this->isLogged()) {
|
||||||
$data['active'] = "currency";
|
$data['active'] = "currency";
|
||||||
$data['alert'] = "";
|
$data['alert'] = "";
|
||||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||||
|
@ -1797,7 +1807,7 @@ if($this->isLogged()) {
|
||||||
$this->load->view('header_gestion', $data);
|
$this->load->view('header_gestion', $data);
|
||||||
$this->load->view('gestion_monnaie');
|
$this->load->view('gestion_monnaie');
|
||||||
$this->load->view('footer');
|
$this->load->view('footer');
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$data['networks'] = $this->wallet_model->getAllActivatedWalletNetworks();
|
$data['networks'] = $this->wallet_model->getAllActivatedWalletNetworks();
|
||||||
|
|
||||||
|
@ -1808,20 +1818,21 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchExchangeRates(){
|
public function fetchExchangeRates()
|
||||||
|
{
|
||||||
if ($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
$api="c4e31fe540cd49c98abffc06cc5948c8"; ///// Provide your openexchangerates.org api key here
|
$api = "c4e31fe540cd49c98abffc06cc5948c8"; ///// Provide your openexchangerates.org api key here
|
||||||
$string = file_get_contents("https://openexchangerates.org/api/latest.json?app_id=$api");
|
$string = file_get_contents("https://openexchangerates.org/api/latest.json?app_id=$api");
|
||||||
$json = json_decode($string, true);
|
$json = json_decode($string, true);
|
||||||
|
|
||||||
$res= false;
|
$res = false;
|
||||||
|
|
||||||
foreach ($json['rates'] as $key => $value) {
|
foreach ($json['rates'] as $key => $value) {
|
||||||
if($this->wallet_model->getExchangeRate($key))
|
if ($this->wallet_model->getExchangeRate($key))
|
||||||
$this->wallet_model->updateExchangeRate($key , $value);
|
$this->wallet_model->updateExchangeRate($key, $value);
|
||||||
else
|
else
|
||||||
$this->wallet_model->insertExchangeRate($key , $value);
|
$this->wallet_model->insertExchangeRate($key, $value);
|
||||||
}
|
}
|
||||||
$res = true;
|
$res = true;
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
@ -1836,12 +1847,12 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
public function cancelTransation()
|
public function cancelTransation()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$id_transacton = $_POST['id_transaction'];
|
$id_transacton = $_POST['id_transaction'];
|
||||||
|
|
||||||
/* API URL */
|
/* API URL */
|
||||||
$url = WALLET_SERVICE_URL.'/transactions/'.$id_transacton;
|
$url = WALLET_SERVICE_URL . '/transactions/' . $id_transacton;
|
||||||
|
|
||||||
/* Init cURL resource */
|
/* Init cURL resource */
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
|
@ -1851,8 +1862,8 @@ if($this->isLogged()) {
|
||||||
/* set the content type json */
|
/* set the content type json */
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||||
'Content-Type:application/json',
|
'Content-Type:application/json',
|
||||||
'Authorization:'.WALLET_SERVICE_TOKEN,
|
'Authorization:' . WALLET_SERVICE_TOKEN,
|
||||||
'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
'X-localization:' . $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
||||||
));
|
));
|
||||||
|
|
||||||
/* set return type json */
|
/* set return type json */
|
||||||
|
@ -1890,8 +1901,8 @@ if($this->isLogged()) {
|
||||||
/* set the content type json */
|
/* set the content type json */
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||||
'Content-Type:application/json',
|
'Content-Type:application/json',
|
||||||
'Authorization:'.WALLET_SERVICE_TOKEN,
|
'Authorization:' . WALLET_SERVICE_TOKEN,
|
||||||
'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
'X-localization:' . $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
||||||
));
|
));
|
||||||
|
|
||||||
/* set return type json */
|
/* set return type json */
|
||||||
|
@ -1925,7 +1936,7 @@ if($this->isLogged()) {
|
||||||
if ($this->input->get('history')) {
|
if ($this->input->get('history')) {
|
||||||
$this->historique_nano_credit($data['network_id'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
|
$this->historique_nano_credit($data['network_id'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
|
||||||
} elseif ($this->input->get('group')) {
|
} elseif ($this->input->get('group')) {
|
||||||
$this->users_group_details($data['network_id'],$this->input->get('group'));
|
$this->users_group_details($data['network_id'], $this->input->get('group'));
|
||||||
} else {
|
} else {
|
||||||
$data['groups'] = $this->nano_credit_model->getUsersGroups($data['network_id']);
|
$data['groups'] = $this->nano_credit_model->getUsersGroups($data['network_id']);
|
||||||
$data['configWallet'] = $this->wallet_model->getConfigWallet($data['network_id'])->first_row();
|
$data['configWallet'] = $this->wallet_model->getConfigWallet($data['network_id'])->first_row();
|
||||||
|
@ -1990,7 +2001,7 @@ if($this->isLogged()) {
|
||||||
$this->load->view('footer');
|
$this->load->view('footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function users_group_details($network_id , $group_code)
|
private function users_group_details($network_id, $group_code)
|
||||||
{
|
{
|
||||||
$data['active'] = "nano_credit";
|
$data['active'] = "nano_credit";
|
||||||
$data['alert'] = "";
|
$data['alert'] = "";
|
||||||
|
@ -2011,10 +2022,10 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
//Calcul de la capacite d'emprunt
|
//Calcul de la capacite d'emprunt
|
||||||
$CE = 0;
|
$CE = 0;
|
||||||
if($data['members']){
|
if ($data['members']) {
|
||||||
$sommeCredits = 0;
|
$sommeCredits = 0;
|
||||||
$sommeEpargnes = 0;
|
$sommeEpargnes = 0;
|
||||||
foreach ($data['members']->result() as $user){
|
foreach ($data['members']->result() as $user) {
|
||||||
$sum_credit = $this->nano_credit_model->sumGroupCredit($user->id_user) ? $this->nano_credit_model->sumGroupCredit($user->id_user)->credit : 0;
|
$sum_credit = $this->nano_credit_model->sumGroupCredit($user->id_user) ? $this->nano_credit_model->sumGroupCredit($user->id_user)->credit : 0;
|
||||||
$sommeCredits += $sum_credit;
|
$sommeCredits += $sum_credit;
|
||||||
$sommeEpargnes += $user->balance_epargne;
|
$sommeEpargnes += $user->balance_epargne;
|
||||||
|
@ -2068,7 +2079,7 @@ if($this->isLogged()) {
|
||||||
public function regulations()
|
public function regulations()
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->isLogged()){
|
if ($this->isLogged()) {
|
||||||
$data['active'] = "regulations";
|
$data['active'] = "regulations";
|
||||||
$data['alert'] = "";
|
$data['alert'] = "";
|
||||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||||
|
@ -2087,7 +2098,7 @@ if($this->isLogged()) {
|
||||||
$this->load->view('header_gestion', $data);
|
$this->load->view('header_gestion', $data);
|
||||||
$this->load->view('gestion_monnaie');
|
$this->load->view('gestion_monnaie');
|
||||||
$this->load->view('footer');
|
$this->load->view('footer');
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$data['countries'] = $this->wallet_model->getRegulationsCountries();
|
$data['countries'] = $this->wallet_model->getRegulationsCountries();
|
||||||
|
|
||||||
|
@ -2098,7 +2109,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setRegulationsLimits(){
|
public function setRegulationsLimits()
|
||||||
|
{
|
||||||
if ($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
|
|
||||||
|
@ -2112,12 +2124,12 @@ if($this->isLogged()) {
|
||||||
$max_month_international = $_POST['max_month_international'];
|
$max_month_international = $_POST['max_month_international'];
|
||||||
|
|
||||||
$limits = $this->wallet_model->getRegulationsLimits($country_id);
|
$limits = $this->wallet_model->getRegulationsLimits($country_id);
|
||||||
if($limits){
|
if ($limits) {
|
||||||
$this->wallet_model->updateRegulationsLimits($country_id,$max_day_national,$max_week_national,$max_month_national,
|
$this->wallet_model->updateRegulationsLimits($country_id, $max_day_national, $max_week_national, $max_month_national,
|
||||||
$max_day_international,$max_week_international,$max_month_international);
|
$max_day_international, $max_week_international, $max_month_international);
|
||||||
}else{
|
} else {
|
||||||
$this->wallet_model->insertRegulationsLimits($country_id,$max_day_national,$max_week_national,$max_month_national,
|
$this->wallet_model->insertRegulationsLimits($country_id, $max_day_national, $max_week_national, $max_month_national,
|
||||||
$max_day_international,$max_week_international,$max_month_international);
|
$max_day_international, $max_week_international, $max_month_international);
|
||||||
}
|
}
|
||||||
$res = true;
|
$res = true;
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
@ -2174,9 +2186,9 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
$query = $this->db->get_where('type_operators', array('code' => $this->input->post('code')), 1);
|
$query = $this->db->get_where('type_operators', array('code' => $this->input->post('code')), 1);
|
||||||
$exist = $query->num_rows() > 0;
|
$exist = $query->num_rows() > 0;
|
||||||
if($exist){
|
if ($exist) {
|
||||||
echo json_encode(422);
|
echo json_encode(422);
|
||||||
}else{
|
} else {
|
||||||
$data = array(
|
$data = array(
|
||||||
'code' => $this->input->post('code'),
|
'code' => $this->input->post('code'),
|
||||||
'description_fr' => $this->input->post('description_fr'),
|
'description_fr' => $this->input->post('description_fr'),
|
||||||
|
@ -2219,10 +2231,10 @@ if($this->isLogged()) {
|
||||||
$id_operator = $this->input->post('id_operator');
|
$id_operator = $this->input->post('id_operator');
|
||||||
$existe = 0;
|
$existe = 0;
|
||||||
$this->db->trans_begin();
|
$this->db->trans_begin();
|
||||||
foreach ($_POST['id_country'] AS $country) {
|
foreach ($_POST['id_country'] as $country) {
|
||||||
$res = $this->wallet_model->checkIfOperatorAssignationExist($country, $id_operator);
|
$res = $this->wallet_model->checkIfOperatorAssignationExist($country, $id_operator);
|
||||||
if ($res == false) {
|
if ($res == false) {
|
||||||
$data = array('id_country' => $country , 'id_operator' => $id_operator);
|
$data = array('id_country' => $country, 'id_operator' => $id_operator);
|
||||||
$this->db->insert('operators_countries', $data);
|
$this->db->insert('operators_countries', $data);
|
||||||
} else {
|
} else {
|
||||||
$existe = $existe + 1;
|
$existe = $existe + 1;
|
||||||
|
@ -2253,7 +2265,7 @@ if($this->isLogged()) {
|
||||||
$address = $this->input->post('address');
|
$address = $this->input->post('address');
|
||||||
$code = $this->input->post('code');
|
$code = $this->input->post('code');
|
||||||
|
|
||||||
$res = $this->wallet_model->updateOperator($id_operator, $id_country ,$name , $address , $code);
|
$res = $this->wallet_model->updateOperator($id_operator, $id_country, $name, $address, $code);
|
||||||
|
|
||||||
if ($res == true) {
|
if ($res == true) {
|
||||||
echo json_encode("completed");
|
echo json_encode("completed");
|
||||||
|
@ -2273,7 +2285,7 @@ if($this->isLogged()) {
|
||||||
|
|
||||||
$this->db->trans_begin();
|
$this->db->trans_begin();
|
||||||
if (!empty($_POST['activations'])) {
|
if (!empty($_POST['activations'])) {
|
||||||
foreach ($_POST['activations'] AS $row) {
|
foreach ($_POST['activations'] as $row) {
|
||||||
|
|
||||||
$data = array('status' => 1);
|
$data = array('status' => 1);
|
||||||
$this->db->where('id_operator', $row['id_operator']);
|
$this->db->where('id_operator', $row['id_operator']);
|
||||||
|
@ -2283,7 +2295,7 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($_POST['desactivations'])) {
|
if (!empty($_POST['desactivations'])) {
|
||||||
foreach ($_POST['desactivations'] AS $row) {
|
foreach ($_POST['desactivations'] as $row) {
|
||||||
|
|
||||||
$data = array('status' => 0);
|
$data = array('status' => 0);
|
||||||
$this->db->where('id_operator', $row['id_operator']);
|
$this->db->where('id_operator', $row['id_operator']);
|
||||||
|
@ -2304,7 +2316,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function settings(){
|
public function settings()
|
||||||
|
{
|
||||||
if ($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
$data['active'] = "settings";
|
$data['active'] = "settings";
|
||||||
$data['alert'] = "";
|
$data['alert'] = "";
|
||||||
|
@ -2320,7 +2333,8 @@ if($this->isLogged()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update_settings(){
|
public function update_settings()
|
||||||
|
{
|
||||||
if ($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
$pas = $this->input->post('pas');
|
$pas = $this->input->post('pas');
|
||||||
|
@ -2331,33 +2345,33 @@ if($this->isLogged()) {
|
||||||
$office_penalty_percent = $this->input->post('office_penalty_percent');
|
$office_penalty_percent = $this->input->post('office_penalty_percent');
|
||||||
$month_delay_penalty_percent = $this->input->post('month_delay_penalty_percent');
|
$month_delay_penalty_percent = $this->input->post('month_delay_penalty_percent');
|
||||||
$payment_deadline_date = $this->input->post('payment_deadline_date');
|
$payment_deadline_date = $this->input->post('payment_deadline_date');
|
||||||
if(isset($pas)){
|
if (isset($pas)) {
|
||||||
$result = $this->user_model->insertAdminConfig('pas_chargement', $pas);
|
$result = $this->user_model->insertAdminConfig('pas_chargement', $pas);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($jours)){
|
if (isset($jours)) {
|
||||||
$result = $this->user_model->insertAdminConfig('jours_calendaires', $jours);
|
$result = $this->user_model->insertAdminConfig('jours_calendaires', $jours);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($default_locality)){
|
if (isset($default_locality)) {
|
||||||
$result = $this->user_model->insertAdminConfig('default_locality', $default_locality,'');
|
$result = $this->user_model->insertAdminConfig('default_locality', $default_locality, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isset($enable_sms_notifications)){
|
if (isset($enable_sms_notifications)) {
|
||||||
$result = $this->user_model->insertAdminConfig('enable_sms_notifications', $enable_sms_notifications, 'bool');
|
$result = $this->user_model->insertAdminConfig('enable_sms_notifications', $enable_sms_notifications, 'bool');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($office_penalty_percent)){
|
if (isset($office_penalty_percent)) {
|
||||||
$result = $this->user_model->insertAdminConfig('office_penalty_percent', $office_penalty_percent);
|
$result = $this->user_model->insertAdminConfig('office_penalty_percent', $office_penalty_percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($month_delay_penalty_percent)){
|
if (isset($month_delay_penalty_percent)) {
|
||||||
$result = $this->user_model->insertAdminConfig('month_delay_penalty_percent', $month_delay_penalty_percent);
|
$result = $this->user_model->insertAdminConfig('month_delay_penalty_percent', $month_delay_penalty_percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($payment_deadline_date)){
|
if (isset($payment_deadline_date)) {
|
||||||
$result = $this->user_model->insertAdminConfig('payment_deadline_date', $payment_deadline_date, 'date');
|
$result = $this->user_model->insertAdminConfig('payment_deadline_date', $payment_deadline_date, 'date');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -508,6 +508,8 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
|
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
|
||||||
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
|
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
|
||||||
$data['provider_billing_periods'] = $this->user_model->getEnumValues('nh_networks_configs','provider_billing_period');
|
$data['provider_billing_periods'] = $this->user_model->getEnumValues('nh_networks_configs','provider_billing_period');
|
||||||
|
$data['password_validation_types'] = $this->user_model->getEnumValues('nh_networks_configs','password_validation');
|
||||||
|
$data['payment_periods'] = $this->user_model->getEnumValues('nh_months_prices_grid','payment_period');
|
||||||
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
|
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
|
||||||
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
||||||
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
||||||
|
@ -2019,9 +2021,12 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
public function validating_agents($role = null){
|
public function validating_agents($role = null){
|
||||||
if ($this->isLogged()) {
|
if ($this->isLogged()) {
|
||||||
$data['alert'] = "";
|
$data['alert'] = "";
|
||||||
if($role == 'doctors'){
|
if($role == 'doctors') {
|
||||||
$data['active'] = "wallet_validating_doctors";
|
$data['active'] = "wallet_validating_doctors";
|
||||||
$data['role'] = 'DOCTOR';
|
$data['role'] = 'DOCTOR';
|
||||||
|
}else if($role == 'controllers'){
|
||||||
|
$data['active'] = "wallet_validating_controllers";
|
||||||
|
$data['role'] = 'CONTROLLER';
|
||||||
}else{
|
}else{
|
||||||
$data['active'] = "wallet_validating_agents";
|
$data['active'] = "wallet_validating_agents";
|
||||||
$data['role'] = 'AGENT';
|
$data['role'] = 'AGENT';
|
||||||
|
|
|
@ -17,12 +17,19 @@ class NanoHealthController extends CI_Controller
|
||||||
$configId = $_POST['config_id'];
|
$configId = $_POST['config_id'];
|
||||||
$grid = $_POST['grid'] ?? [];
|
$grid = $_POST['grid'] ?? [];
|
||||||
|
|
||||||
|
try{
|
||||||
|
$this->db->trans_begin();
|
||||||
$this->db->delete('nh_years_prices_grid',['nh_network_config_id' => $configId]);
|
$this->db->delete('nh_years_prices_grid',['nh_network_config_id' => $configId]);
|
||||||
if(sizeof($grid) > 0){
|
if(sizeof($grid) > 0){
|
||||||
$this->db->insert_batch('nh_years_prices_grid',$grid);
|
$this->db->insert_batch('nh_years_prices_grid',$grid);
|
||||||
}
|
}
|
||||||
|
$this->db->trans_commit();
|
||||||
echo json_encode("200");
|
echo json_encode("200");
|
||||||
|
}catch (Throwable $exception){
|
||||||
|
$this->db->trans_rollback();
|
||||||
|
var_dump($exception->getMessage());
|
||||||
|
echo json_encode("500");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,12 +39,36 @@ class NanoHealthController extends CI_Controller
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
$configId = $_POST['config_id'];
|
$configId = $_POST['config_id'];
|
||||||
$grid = $_POST['grid'] ?? [];
|
$grid = $_POST['grid'] ?? [];
|
||||||
|
foreach ($grid as $i => $row){
|
||||||
$this->db->delete('nh_months_prices_grid',['nh_network_config_id' => $configId]);
|
foreach ($row as $k => $v){
|
||||||
if(sizeof($grid) > 0){
|
if(empty($v)){
|
||||||
$this->db->insert_batch('nh_months_prices_grid',$grid);
|
$grid[$i][$k] = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
$this->db->trans_begin();
|
||||||
|
foreach ($grid as $row){
|
||||||
|
$n = $row['payment_period'] == 'DAILY' ? 22 : 1 ;
|
||||||
|
if($row['payment_period'] == 'ONE_TIME'){
|
||||||
|
$row['payment_duration_months'] = null;
|
||||||
|
}
|
||||||
|
$row['number_of_fractions'] = $n * ($row['payment_duration_months'] ?? 1);
|
||||||
|
if(!empty($row['id'])){
|
||||||
|
$this->db->where('id',$row['id']);
|
||||||
|
$this->db->update('nh_months_prices_grid', $row);
|
||||||
|
}else{
|
||||||
|
$this->db->insert('nh_months_prices_grid',$row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->db->trans_commit();
|
||||||
echo json_encode("200");
|
echo json_encode("200");
|
||||||
|
}catch (Throwable $exception){
|
||||||
|
$this->db->trans_rollback();
|
||||||
|
var_dump($exception->getMessage());
|
||||||
|
echo json_encode("500");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,76 +197,14 @@ class NanoHealthController extends CI_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateSubscription()
|
public function validateSubscription($subscription_id)
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
echo $this->makeRequest('PUT','/insurances/subscriptions/'.$subscription_id.'/validate', $_POST);
|
||||||
if (isset($_POST)) {
|
|
||||||
$subscription_id = $_POST['subscription_id'];
|
|
||||||
$url = NANO_SANTE_SERVICE_URL.'/insurances/subscriptions/'.$subscription_id.'/validate';
|
|
||||||
$ch = curl_init($url);
|
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
|
|
||||||
/* set the content type json */
|
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
|
||||||
'Content-Type:application/json',
|
|
||||||
'Authorization:'.NANO_SANTE_SERVICE_TOKEN,
|
|
||||||
'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
|
||||||
));
|
|
||||||
/* set return type json */
|
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
||||||
$body = new \stdClass();
|
|
||||||
$body->agent_id = $this->input->post('agent_id');
|
|
||||||
$body->nh_validating_agent_id = $this->input->post('nh_validating_agent_id');
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
|
|
||||||
|
|
||||||
/* execute request */
|
|
||||||
$result = curl_exec($ch);
|
|
||||||
/* close cURL resource */
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
echo $result;
|
|
||||||
} else {
|
|
||||||
echo json_encode(['status' => 500]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rejectSubscription()
|
public function rejectSubscription($subscription_id)
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
echo $this->makeRequest('PUT','/insurances/subscriptions/'.$subscription_id.'/reject', $_POST);
|
||||||
if (isset($_POST)) {
|
|
||||||
$subscription_id = $_POST['subscription_id'];
|
|
||||||
$url = NANO_SANTE_SERVICE_URL.'/insurances/subscriptions/'.$subscription_id.'/reject';
|
|
||||||
$ch = curl_init($url);
|
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
|
|
||||||
/* set the content type json */
|
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
|
||||||
'Content-Type:application/json',
|
|
||||||
'Authorization:'.NANO_SANTE_SERVICE_TOKEN,
|
|
||||||
'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en'
|
|
||||||
));
|
|
||||||
/* set return type json */
|
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
||||||
$body = new \stdClass();
|
|
||||||
$body->agent_id = $this->input->post('agent_id');
|
|
||||||
$body->nh_validating_agent_id = $this->input->post('nh_validating_agent_id');
|
|
||||||
$body->type = $this->input->post('type');
|
|
||||||
$body->reason = $this->input->post('reason');
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
|
|
||||||
|
|
||||||
/* execute request */
|
|
||||||
$result = curl_exec($ch);
|
|
||||||
/* close cURL resource */
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
echo $result;
|
|
||||||
} else {
|
|
||||||
echo json_encode(['status' => 500]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,6 +361,11 @@ class NanoHealthController extends CI_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSingleHealthCareSheet($id)
|
||||||
|
{
|
||||||
|
echo $this->makeRequest('GET','/health-care-sheets/'.$id);
|
||||||
|
}
|
||||||
|
|
||||||
public function generateInvoice()
|
public function generateInvoice()
|
||||||
{
|
{
|
||||||
if($this->isLogged()) {
|
if($this->isLogged()) {
|
||||||
|
@ -429,7 +403,12 @@ class NanoHealthController extends CI_Controller
|
||||||
echo $this->makeRequest('PUT','/authorizations-care-requests', $_POST);
|
echo $this->makeRequest('PUT','/authorizations-care-requests', $_POST);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function makeRequest($method , $path , $request_body){
|
public function validateInvoice($id)
|
||||||
|
{
|
||||||
|
echo $this->makeRequest('PUT','/invoices/'.$id, $_POST);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function makeRequest($method , $path , $request_body = []){
|
||||||
if($this->isLogged()) {
|
if($this->isLogged()) {
|
||||||
$url = NANO_SANTE_SERVICE_URL.$path;
|
$url = NANO_SANTE_SERVICE_URL.$path;
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
|
|
|
@ -97,6 +97,8 @@
|
||||||
$this->session->set_userdata('current_pays', $agent->country);
|
$this->session->set_userdata('current_pays', $agent->country);
|
||||||
if($agent->role == 'DOCTOR'){
|
if($agent->role == 'DOCTOR'){
|
||||||
redirect('ValidatingDoctor');
|
redirect('ValidatingDoctor');
|
||||||
|
}else if($agent->role == 'CONTROLLER'){
|
||||||
|
redirect('ControllerDoctor');
|
||||||
}else{
|
}else{
|
||||||
redirect('ValidatingAgent');
|
redirect('ValidatingAgent');
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,10 @@ class ValidatingAgent extends CI_Controller
|
||||||
if ($this->isLogged()){
|
if ($this->isLogged()){
|
||||||
$data['active'] = "dashboard";
|
$data['active'] = "dashboard";
|
||||||
$data['agent_id'] = $this->session->userdata('agent_id');
|
$data['agent_id'] = $this->session->userdata('agent_id');
|
||||||
|
$data['id_network'] = $this->session->userdata('network_id');
|
||||||
$data['acceptedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'ACCEPTED');
|
$data['acceptedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'ACCEPTED');
|
||||||
$data['rejectedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'REJECTED');
|
$data['rejectedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'REJECTED');
|
||||||
$data['untreatedRequests'] = $this->nano_health_model->getNhInsurancesSubscriptionCount('UNDER_VALIDATION');
|
$data['untreatedRequests'] = $this->nano_health_model->getNhInsurancesSubscriptionCount($data['id_network'],'UNDER_VALIDATION');
|
||||||
|
|
||||||
$this->load->view('nano_health/validating_agent/header', $data);
|
$this->load->view('nano_health/validating_agent/header', $data);
|
||||||
$this->load->view('nano_health/validating_agent/dashboard', $data);
|
$this->load->view('nano_health/validating_agent/dashboard', $data);
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
|
use Brick\Money\Context\AutoContext;
|
||||||
|
use Brick\Money\CurrencyConverter;
|
||||||
|
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||||
|
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||||
|
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||||
|
use Brick\Money\Money;
|
||||||
|
|
||||||
|
class ControllerDoctorInvoices extends CI_Controller
|
||||||
|
{
|
||||||
|
private $context = null;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
// Load member model
|
||||||
|
$this->load->model('pagination/Invoices_model', 'model');
|
||||||
|
|
||||||
|
// set to whatever your rates are relative to
|
||||||
|
$baseCurrency = 'USD';
|
||||||
|
|
||||||
|
// use your own credentials, or re-use your existing PDO connection
|
||||||
|
$pdo = new PDO('mysql:host=' . $this->db->hostname . ';dbname=' . $this->db->database, $this->db->username, $this->db->password);
|
||||||
|
|
||||||
|
$configuration = new PDOProviderConfiguration();
|
||||||
|
|
||||||
|
$configuration->tableName = 'exchange_rate';
|
||||||
|
$configuration->exchangeRateColumnName = 'exchange_rate';
|
||||||
|
$configuration->targetCurrencyColumnName = 'target_currency';
|
||||||
|
$configuration->sourceCurrencyCode = $baseCurrency;
|
||||||
|
|
||||||
|
// this provider loads exchange rates from your database
|
||||||
|
$provider = new PDOProvider($pdo, $configuration);
|
||||||
|
|
||||||
|
// this provider calculates exchange rates relative to the base currency
|
||||||
|
$provider = new BaseCurrencyProvider($provider, $baseCurrency);
|
||||||
|
|
||||||
|
// this currency converter can now handle any currency pair
|
||||||
|
$this->context = new AutoContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getLists()
|
||||||
|
{
|
||||||
|
$data = $row = array();
|
||||||
|
|
||||||
|
// Fetch member's records
|
||||||
|
$witData = $this->model->getRows($_POST);
|
||||||
|
|
||||||
|
$i = $_POST['start'];
|
||||||
|
$current_url = $_POST['currentURL'];
|
||||||
|
foreach ($witData as $row) {
|
||||||
|
$amount = Money::of(round($row->amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
|
$insured_amount = Money::of(round($row->insured_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
|
$insurer_amount = Money::of(round($row->insurer_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
|
|
||||||
|
$data[] = array($row->invoice_id , $row->institution_name , $amount , $insured_amount, $insurer_amount,
|
||||||
|
$row->period_start_at, $row->period_end_at, mb_strtoupper($this->lang->line($row->state) ,'UTF-8'), '<a href="'.$current_url.'?history=invoices&id='.$row->id.'" class="btn btn-primary"> '.$this->lang->line('Voir plus...').'</a>');
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = array(
|
||||||
|
"draw" => $_POST['draw'],
|
||||||
|
"recordsTotal" => $this->model->countAll($_POST),
|
||||||
|
"recordsFiltered" => $this->model->countFiltered($_POST),
|
||||||
|
"data" => $data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Output to JSON format
|
||||||
|
echo json_encode($output);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -58,7 +58,7 @@ class Invoices extends CI_Controller
|
||||||
$insurer_amount = Money::of(round($row->insurer_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR');
|
$insurer_amount = Money::of(round($row->insurer_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
|
|
||||||
$data[] = array($row->invoice_id , $row->institution_name , $amount , $insured_amount, $insurer_amount,
|
$data[] = array($row->invoice_id , $row->institution_name , $amount , $insured_amount, $insurer_amount,
|
||||||
$row->period_start_at, $row->period_end_at, '<a href="'.$row->file_url.'" class="btn btn-primary" target="blank"> '.$this->lang->line('Voir plus...').'</a>');
|
$row->period_start_at, $row->period_end_at, mb_strtoupper($this->lang->line($row->state),'UTF-8'), '<a href="'.$row->file_url.'" class="btn btn-primary" target="_blank"> '.$this->lang->line('Voir plus...').'</a>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = array(
|
$output = array(
|
||||||
|
|
|
@ -870,4 +870,35 @@ $lang['expired_insurance'] = "Insurance expired";
|
||||||
$lang['family_coverage_sharing'] = "Family coverage pooling";
|
$lang['family_coverage_sharing'] = "Family coverage pooling";
|
||||||
$lang['max_insurance_coverage_amount'] = "Insurance coverage limit amount";
|
$lang['max_insurance_coverage_amount'] = "Insurance coverage limit amount";
|
||||||
$lang['service_providers_per_town'] = "Prestataires par ville";
|
$lang['service_providers_per_town'] = "Prestataires par ville";
|
||||||
|
$lang['controllers_doctors'] = "Controllers doctors";
|
||||||
|
$lang['manage_controllers_doctors'] = "Manage controller doctors";
|
||||||
|
$lang['controller_doctor'] = "Controller doctor";
|
||||||
|
$lang['add_controller_doctor'] = "Add a controller doctor";
|
||||||
|
$lang['controller_doctor_updated'] = "Controller doctor updated";
|
||||||
|
$lang['controller_doctor_deleted'] = "Controller doctor deleted";
|
||||||
|
$lang['controller_doctor_deleted'] = "Controller doctor deleted";
|
||||||
|
$lang['accepted_invoices'] = "Accepted invoices";
|
||||||
|
$lang['rejected_invoices'] = "Rejected invoices";
|
||||||
|
$lang['rejected_invoices'] = "Rejected invoices";
|
||||||
|
$lang['accepted_modified_invoices'] = "Accepted invoices modified";
|
||||||
|
$lang['under_validation_invoices'] = "Invoices under validation";
|
||||||
|
$lang['invoice_detail'] = "Invoice detail";
|
||||||
|
$lang['issuer_information'] = "Issuer information";
|
||||||
|
$lang['download'] = "Download";
|
||||||
|
$lang['reject_invoice'] = "Reject the invoice";
|
||||||
|
$lang['institution'] = "Institution";
|
||||||
|
$lang['accept_and_update'] = "Accept and Modify";
|
||||||
|
$lang['accept_and_update_invoice'] = "Accept and Modify the invoice";
|
||||||
|
$lang['ACCEPTED_MODIFIED'] = "Accepted Modified";
|
||||||
|
$lang['waiting_period_days'] = "Waiting period (in days)";
|
||||||
|
$lang['password_validation'] = "Password validation";
|
||||||
|
$lang['MIN'] = "Minimum";
|
||||||
|
$lang['MAX'] = "Maximum";
|
||||||
|
$lang['payment_period'] = "Payment period";
|
||||||
|
$lang['payment_period'] = "Payment period";
|
||||||
|
$lang['payment_duration_months'] = "Payment duration (in months)";
|
||||||
|
$lang['ONE_TIME'] = "One time only";
|
||||||
|
$lang['DAILY'] = "Daily";
|
||||||
|
$lang['undefined'] = "Not defined";
|
||||||
|
$lang['number_of_fractions'] = "Number of fractions"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -881,4 +881,34 @@ $lang['expired_insurance'] = "Assurances arrivées à échéance";
|
||||||
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale";
|
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale";
|
||||||
$lang['max_insurance_coverage_amount'] = "Montant limite de couverture d'assurance";
|
$lang['max_insurance_coverage_amount'] = "Montant limite de couverture d'assurance";
|
||||||
$lang['service_providers_per_town'] = "Prestataires par ville";
|
$lang['service_providers_per_town'] = "Prestataires par ville";
|
||||||
|
$lang['controllers_doctors'] = "Médécins controlleurs";
|
||||||
|
$lang['manage_controllers_doctors'] = "Gestion des médécins controleurs";
|
||||||
|
$lang['controller_doctor'] = "Médécin controleur";
|
||||||
|
$lang['add_controller_doctor'] = "Ajouter un médécin controleur";
|
||||||
|
$lang['controller_doctor_updated'] = "Médécin controleur modifié";
|
||||||
|
$lang['controller_doctor_deleted'] = "Médécin controleur supprimé";
|
||||||
|
$lang['controller_doctor_deleted'] = "Médécin controleur supprimé";
|
||||||
|
$lang['accepted_invoices'] = "Factures acceptées";
|
||||||
|
$lang['rejected_invoices'] = "Factures rejetées";
|
||||||
|
$lang['accepted_modified_invoices'] = "Factures acceptées modifiées";
|
||||||
|
$lang['under_validation_invoices'] = "Factures en cours de validation";
|
||||||
|
$lang['invoice_detail'] = "Detail de la facture";
|
||||||
|
$lang['issuer_information'] = "Informations sur l'émetteur";
|
||||||
|
$lang['download'] = "Télécharger";
|
||||||
|
$lang['reject_invoice'] = "Rejecter la facture";
|
||||||
|
$lang['institution'] = "Etablissement";
|
||||||
|
$lang['accept_and_update'] = "Accepter et Modifier";
|
||||||
|
$lang['accept_and_update_invoice'] = "Accepter et Modifier la facture";
|
||||||
|
$lang['ACCEPTED_MODIFIED'] = "Acceptée Modifiée";
|
||||||
|
$lang['waiting_period_days'] = "Delai de carence (en jours)";
|
||||||
|
$lang['password_validation'] = "Validation par mot de passe";
|
||||||
|
$lang['MIN'] = "Minimale";
|
||||||
|
$lang['MAX'] = "Maximale";
|
||||||
|
$lang['payment_period'] = "Periode de paiement";
|
||||||
|
$lang['payment_period'] = "Periode de paiement";
|
||||||
|
$lang['payment_duration_months'] = "Durée du paiment (en mois)";
|
||||||
|
$lang['ONE_TIME'] = "Une seule fois";
|
||||||
|
$lang['DAILY'] = "Journalier";
|
||||||
|
$lang['undefined'] = "Non défini";
|
||||||
|
$lang['number_of_fractions'] = "Nombre de fractions"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -22,6 +22,7 @@ class Nano_health_model extends CI_Model
|
||||||
|
|
||||||
public function updateConfig($configId, $data){
|
public function updateConfig($configId, $data){
|
||||||
$this->db->where('id', $configId);
|
$this->db->where('id', $configId);
|
||||||
|
// $data = formatDBData($data);
|
||||||
return $this->db->update('nh_networks_configs', $data);
|
return $this->db->update('nh_networks_configs', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ class Nano_health_model extends CI_Model
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfigMonthsPricesGrid($configId){
|
public function getConfigMonthsPricesGrid($configId){
|
||||||
return $this->db->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]);
|
return $this->db->order_by('id','ASC')->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfigActs($configId){
|
public function getConfigActs($configId){
|
||||||
|
@ -52,8 +53,8 @@ class Nano_health_model extends CI_Model
|
||||||
->where('insurance_subscription_state', $state)->count_all_results();
|
->where('insurance_subscription_state', $state)->count_all_results();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNhInsurancesSubscriptionCount($state){
|
public function getNhInsurancesSubscriptionCount($networkId, $state){
|
||||||
return $this->db->from('nh_insurances_subscriptions')
|
return $this->db->from('nh_insurances_subscriptions')->where('network_id', $networkId)
|
||||||
->where('state', $state)->count_all_results();
|
->where('state', $state)->count_all_results();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,4 +158,20 @@ class Nano_health_model extends CI_Model
|
||||||
->where('i.deleted_at IS NOT NULL')
|
->where('i.deleted_at IS NOT NULL')
|
||||||
->where('i.insurance_id',$insuranceId)->order_by('i.deleted_at','desc')->get();
|
->where('i.insurance_id',$insuranceId)->order_by('i.deleted_at','desc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getInfosInvoiceById($id){
|
||||||
|
return $this->db->get_where('nh_infos_invoices',['id'=> $id])->first_row();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCountInvoices($network_id , $validating_agent_id, $state){
|
||||||
|
$query = $this->db->from('nh_infos_invoices')->where('state',$state);
|
||||||
|
if(!empty($validating_agent_id)){
|
||||||
|
$query = $query->where('validating_agent_id', $validating_agent_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($network_id)){
|
||||||
|
$query = $query->where('network_id', $network_id);
|
||||||
|
}
|
||||||
|
return $query->count_all_results();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,12 @@
|
||||||
<span><?php echo $this->lang->line('validating_doctors'); ?></span>
|
<span><?php echo $this->lang->line('validating_doctors'); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="<?php if ($active == "wallet_validating_controllers") {echo "active";} ?>">
|
||||||
|
<a href="<?php echo base_url('Hyperviseur_dash/validating_agents/controllers') ?>">
|
||||||
|
<i class="fa fa-stethoscope"></i>
|
||||||
|
<span><?php echo $this->lang->line('controllers_doctors'); ?></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li class="<?php if ($active == "wallet_validating_agents") {echo "active";} ?>">
|
<li class="<?php if ($active == "wallet_validating_agents") {echo "active";} ?>">
|
||||||
<a href="<?php echo base_url('Hyperviseur_dash/validating_agents') ?>">
|
<a href="<?php echo base_url('Hyperviseur_dash/validating_agents') ?>">
|
||||||
<i class="fa fa-user"></i>
|
<i class="fa fa-user"></i>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
|
||||||
<link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.css') ?>">
|
<link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.css') ?>">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,236 @@
|
||||||
|
<!-- Date Picker -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
|
||||||
|
<!-- Daterange picker -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="<?= base_url('bower_components/Chart.js/Chart.js') ?>"></script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$month = time();
|
||||||
|
$months[]=convertDate(date("M"));
|
||||||
|
$label_months [] = date("M")." ".date("Y");
|
||||||
|
$years[]= date("Y");
|
||||||
|
for ($i = 1; $i <= 11; $i++) {
|
||||||
|
$month = strtotime('last month', $month);
|
||||||
|
$months [] = convertDate(date("M", $month));
|
||||||
|
$years[] = date("Y", $month);
|
||||||
|
$label_months [] = date("M", $month)." ".date("Y", $month);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
** Simple User Treatment
|
||||||
|
**/
|
||||||
|
|
||||||
|
$date = date("Y");
|
||||||
|
|
||||||
|
$demandes_data[] = '';
|
||||||
|
$demandes_data =array();
|
||||||
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
|
$demandes_query_mounth = $this->db->query("SELECT id FROM nh_infos_invoices
|
||||||
|
WHERE MONTH(created_at) = '".$months[$i-1]."' AND YEAR(created_at) = ".$years[$i-1]."
|
||||||
|
AND network_id='".$network_id."'"
|
||||||
|
);
|
||||||
|
$demandes_data[] = $demandes_query_mounth->num_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
$pieChart = array();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<?= $this->lang->line('controller_doctor'); ?>
|
||||||
|
<small><?= $this->lang->line('Tableau de bord'); ?></small>
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<!-- Small boxes (Stat box) -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-md-4 col-xs-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-green">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $count_accepted ?? 0;?></h3>
|
||||||
|
|
||||||
|
<p><?= $this->lang->line('accepted_invoices'); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-checkmark-circled"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-md-4 col-xs-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $count_accepted_modified ?? 0;?></h3>
|
||||||
|
|
||||||
|
<p><?= $this->lang->line('accepted_modified_invoices'); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-alert-circled"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-md-4 col-xs-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-red">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $count_rejected ?? 0;?></h3>
|
||||||
|
|
||||||
|
<p><?= $this->lang->line("rejected_invoices"); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-close-circled"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-md-4 col-xs-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-blue">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $count_under_validation ?? 0;?></h3>
|
||||||
|
|
||||||
|
<p><?= $this->lang->line("under_validation_invoices"); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-information-circled"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<!-- BAR CHART -->
|
||||||
|
<div class="box box-success">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title"><?= $this->lang->line('invoices'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="chart">
|
||||||
|
<canvas id="barChart" style="height:230px"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button);
|
||||||
|
</script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- Morris.js charts -->
|
||||||
|
<script src="<?= base_url('bower_components/raphael/raphael.min.js') ?>"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script>
|
||||||
|
<!-- jvectormap -->
|
||||||
|
<script src="<?= base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="<?= base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
||||||
|
<!-- datepicker -->
|
||||||
|
<script src="<?= base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap WYSIHTML5 -->
|
||||||
|
<script src="<?= base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?= base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?= base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?= base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="<?= base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||||
|
|
||||||
|
<script >
|
||||||
|
|
||||||
|
//var Pie = '<?//= json_encode($pieChart) ?>//';
|
||||||
|
//if(Pie==='[]'){
|
||||||
|
// var select = document.getElementById('chartAd');
|
||||||
|
// $(select.children).hide();
|
||||||
|
// //$(select).append("<p><?////= $this->lang->line('Aucune adhesion'); ?>////</p>");
|
||||||
|
//}else{
|
||||||
|
// Pie = JSON.parse(Pie);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//var Pie2 = '<?//= json_encode($pieChart2) ?>//';
|
||||||
|
//if(Pie2==='[]') {
|
||||||
|
// var select = document.getElementById('chartDem');
|
||||||
|
// $(select.children).hide();
|
||||||
|
// $(select).append("<p><?//= $this->lang->line('Aucune demande'); ?>//</p>");
|
||||||
|
//}else{
|
||||||
|
// Pie2 = JSON.parse(Pie2);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var areaChartData = {
|
||||||
|
labels : <?= json_encode($label_months) ?>,
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label : 'Electronics',
|
||||||
|
fillColor : 'rgba(255, 162, 0, 1)',
|
||||||
|
strokeColor : 'rgba(255, 162, 0, 1)',
|
||||||
|
pointColor : 'rgba(255, 162, 0, 1)',
|
||||||
|
pointStrokeColor : '#ffa200',
|
||||||
|
pointHighlightFill : '#fff',
|
||||||
|
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||||
|
data: <?= json_encode($demandes_data) ?>
|
||||||
|
},
|
||||||
|
//{
|
||||||
|
// label : 'Digital Goods',
|
||||||
|
// fillColor : 'rgba(0, 187, 255, 1)',
|
||||||
|
// strokeColor : 'rgba(0, 187, 255, 1)',
|
||||||
|
// pointColor : '#00bbff',
|
||||||
|
// pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
||||||
|
// pointHighlightFill : '#fff',
|
||||||
|
// pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||||
|
// data : <?//= json_encode($demandes_data) ?>
|
||||||
|
//}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
var ctx = document.getElementById('barChart').getContext('2d');
|
||||||
|
var chart = new Chart(ctx, {
|
||||||
|
// The type of chart we want to create
|
||||||
|
type: 'line',
|
||||||
|
|
||||||
|
// The data for our dataset
|
||||||
|
data: {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December'],
|
||||||
|
datasets: [{
|
||||||
|
label: "My First dataset",
|
||||||
|
backgroundColor: 'rgb(255, 99, 132)',
|
||||||
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
|
data: [0, 10, 5, 2, 20, 30, 45]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
|
||||||
|
// Configuration options go here
|
||||||
|
options: {}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- Page script -->
|
||||||
|
<script src="<?= base_url('dist/js/custom.js') ?>"></script>
|
|
@ -0,0 +1,131 @@
|
||||||
|
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>iLink | <?= $this->lang->line('controller_doctor');?></title>
|
||||||
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||||
|
<!-- Ionicons -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||||
|
<!-- Theme style -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('dist/css/AdminLTE.css') ?>">
|
||||||
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||||
|
<link rel="shortcut icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">
|
||||||
|
<link rel="icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<style media="screen">
|
||||||
|
.img-dash {
|
||||||
|
height: 50px !important;
|
||||||
|
float: left !important;
|
||||||
|
padding: 1% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table_modified {
|
||||||
|
font-size: 11px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="hold-transition skin-blue sidebar-mini">
|
||||||
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<header class="main-header">
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="#" class="logo">
|
||||||
|
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||||
|
<span class="logo-mini"><b>iLink</b></span>
|
||||||
|
<!-- logo for regular state and mobile devices -->
|
||||||
|
<span class="logo-lg">
|
||||||
|
<img class="img img-responsive img-dash" src="<?= base_url('images/logo.png') ?>">
|
||||||
|
<b>iLink</b> World
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
<!-- Header Navbar: style can be found in header.less -->
|
||||||
|
<nav class="navbar navbar-static-top">
|
||||||
|
<!-- Sidebar toggle button-->
|
||||||
|
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
</a>
|
||||||
|
<div class="navbar-custom-menu">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
|
||||||
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
|
<li class="dropdown user user-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<?= $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?= $this->session->userdata('firstname').' '.$this->session->userdata('lastname');?></b></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<!-- User image -->
|
||||||
|
<li class="user-header">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?= $this->session->userdata('network');?>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="user-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6 text-center">
|
||||||
|
<?= $this->session->userdata('current_pays');?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 text-center">
|
||||||
|
<?= $this->session->userdata('email');?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</li>
|
||||||
|
<li class="user-footer">
|
||||||
|
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?= base_url('Users/logout') ?>" class="btn btn-default btn-flat"><?= $this->lang->line('Déconnexion'); ?></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
|
<aside class="main-sidebar">
|
||||||
|
<!-- sidebar: style can be found in sidebar.less -->
|
||||||
|
<section class="sidebar">
|
||||||
|
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||||
|
<ul class="sidebar-menu" data-widget="tree">
|
||||||
|
|
||||||
|
<li class="<?php if($active=="dashboard"){echo "active ";} ?>">
|
||||||
|
|
||||||
|
<a href="<?= base_url('ControllerDoctor') ?>">
|
||||||
|
<i class="fa fa-dashboard"></i> <span><?= $this->lang->line('Tableau de bord'); ?></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="<?php if($active=="invoices"){echo "active ";} ?>">
|
||||||
|
<a href="<?= base_url('ControllerDoctor?history=invoices') ?>">
|
||||||
|
<i class="fa fa-file-text"></i>
|
||||||
|
<span><?= $this->lang->line('invoices'); ?></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,244 @@
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?= base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css">
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<?php
|
||||||
|
?>
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<?= $this->lang->line('invoices_history') ?>
|
||||||
|
<!-- <input type="button" class="btn btn-primary pull-right" id="Bactiver"-->
|
||||||
|
<!-- value="Activer/Désactiver le(s) réseau(x)" />-->
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
|
<div class="info-box">
|
||||||
|
<span class="info-box-icon bg-aqua"><i class="ion ion-android-time"></i></span>
|
||||||
|
<div class="info-box-content">
|
||||||
|
<span class="info-box-text"><?= $this->lang->line('Période') ?> </span>
|
||||||
|
<span class="info-box-number">
|
||||||
|
<input id="picker"
|
||||||
|
style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%"
|
||||||
|
data-category="<?= isset($category) ? $category : null ?>"
|
||||||
|
type="text" name="daterange"
|
||||||
|
data-lang="<?= $this->session->userdata('site_lang') ?>"
|
||||||
|
value="<?= ($startDate != null & $endDate != null) ? $startDate . ' - ' . $endDate : '' ?>"/>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span> Format : <?= $this->session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?= $this->lang->line('export_invoices_list') ?></h3>
|
||||||
|
<div class="box-tools">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body" style="overflow-x:auto;">
|
||||||
|
|
||||||
|
<table id="invoices" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align='center'><?= $this->lang->line('invoice_id') ?></th>
|
||||||
|
<th>Emetteur</th>
|
||||||
|
<th><?= $this->lang->line('total_amount') ?></th>
|
||||||
|
<th><?= $this->lang->line('total_insured_part') ?></th>
|
||||||
|
<th><?= $this->lang->line('total_insurance_part') ?></th>
|
||||||
|
<th>Date debut</th>
|
||||||
|
<th>Date fin</th>
|
||||||
|
<th><?= $this->lang->line('state') ?></th>
|
||||||
|
<th align='center'>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="<?= base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- SlimScroll -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?= base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?= base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?= base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment-with-locales.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.20/dataRender/datetime.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.colVis.min.js"></script>
|
||||||
|
<script src="<?= base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
const lang = $('#picker').data('lang');
|
||||||
|
const format = lang === 'french' ? 'fr' : 'en';
|
||||||
|
moment.updateLocale(moment.locale(format), {invalidDate: ""}); // Blank text when is invalid date
|
||||||
|
|
||||||
|
var table = $('#invoices').DataTable({
|
||||||
|
// Processing indicator
|
||||||
|
"processing": true,
|
||||||
|
"language": {
|
||||||
|
"processing": "<?= $this->lang->line('loading') ?>",
|
||||||
|
"emptyTable" : "<?= $this->lang->line('no_insured') ?>"
|
||||||
|
},
|
||||||
|
// DataTables server-side processing mode
|
||||||
|
"serverSide": true,
|
||||||
|
// Initial no order.
|
||||||
|
"order": [],
|
||||||
|
// Load data from an Ajax source
|
||||||
|
"ajax": {
|
||||||
|
"url": "<?= base_url('pagination/ControllerDoctorInvoices/getLists'); ?>",
|
||||||
|
"data":{
|
||||||
|
"startDate" : "<?= $startDate?>",
|
||||||
|
"endDate" : "<?= $endDate?>",
|
||||||
|
"id_network" : "<?= $id_network ?? null ?>",
|
||||||
|
"network_agent_id" : "<?= $network_agent_id ?? null ?>",
|
||||||
|
"currentURL" : "<?= current_url()?>"
|
||||||
|
},
|
||||||
|
"type": "POST"
|
||||||
|
},
|
||||||
|
"aaSorting": [[6, "desc"]],
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": [5,6],
|
||||||
|
// "orderable": false,
|
||||||
|
render: $.fn.dataTable.render.moment('YYYY-MM-DD', 'D MMMM YYYY', format)
|
||||||
|
}],
|
||||||
|
dom: 'Bfrtip',
|
||||||
|
"buttons": [
|
||||||
|
'pageLength',
|
||||||
|
{
|
||||||
|
"extend": 'excelHtml5',
|
||||||
|
title: "<?= $this->lang->line('invoices_history') ?>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'csvHtml5',
|
||||||
|
title: "<?= $this->lang->line('invoices_history') ?>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'pdfHtml5',
|
||||||
|
orientation: 'landscape',
|
||||||
|
pageSize: 'LEGAL',
|
||||||
|
title: "<?= $this->lang->line('invoices_history') ?>",
|
||||||
|
trim: false,
|
||||||
|
"action": newexportaction
|
||||||
|
},
|
||||||
|
// 'colvis'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
table.buttons().container()
|
||||||
|
.appendTo('#example_wrapper .col-sm-6:eq(0)');
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var startDate;
|
||||||
|
var endDate;
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
const lang = $('#picker').data('lang');
|
||||||
|
const category = $('#picker').data('category');
|
||||||
|
const id_network = "<?= $id_network ?? null ?>";
|
||||||
|
const ne = "<?=$network_agent_id ?? null ?>"
|
||||||
|
$('input[name="daterange"]').daterangepicker({
|
||||||
|
opens: 'left',
|
||||||
|
autoUpdateInput: false,
|
||||||
|
locale: {
|
||||||
|
format: lang === 'french' ? 'DD-MM-YYYY' : 'YYYY-MM-DD',
|
||||||
|
cancelLabel: 'Clear'
|
||||||
|
}
|
||||||
|
}, function (start, end, label) {
|
||||||
|
const debut = start.format('YYYY-MM-DD');
|
||||||
|
const fin = end.format('YYYY-MM-DD');
|
||||||
|
if(category)
|
||||||
|
window.location = "<?= current_url()?>" + "?history=care-requests" + "&d=" + debut + "&f=" + fin;
|
||||||
|
else
|
||||||
|
window.location = "<?= current_url()?>" + "?id="+id_network+"&history=care-requests" + "&d=" + debut + "&f=" + fin;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[name="daterange"]').on('cancel.daterangepicker', function(ev, picker) {
|
||||||
|
//do something, like clearing an input
|
||||||
|
$('#daterange').val('');
|
||||||
|
if(category)
|
||||||
|
window.location = "<?= current_url()?>" + "?history=care-requests";
|
||||||
|
else
|
||||||
|
window.location = "<?= current_url()?>" + "?id="+id_network+"&history=care-requests";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#requests").on('click', ".treat-demand", function () {
|
||||||
|
let action = $(this).data('action');
|
||||||
|
let id = $(this).data('id');
|
||||||
|
$.ajax({
|
||||||
|
url: '<?= base_url('NanoHealthController/treatCareRequest')?>',
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
"action": action,
|
||||||
|
"validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
||||||
|
"request_id": id,
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
// console.log('data',data);
|
||||||
|
if(data.status === 200){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: data.response,
|
||||||
|
text:"<?= $this->lang->line('informations_updated')?>",
|
||||||
|
timer: 3000
|
||||||
|
}).then(()=>{
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
// alert("Les informations ont été mises à jour.") ? "" :
|
||||||
|
}else{
|
||||||
|
toastr.error(data.error , "<?= $this->lang->line('request_error')?>");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
error: function (resultat, statut, error) {
|
||||||
|
console.log(resultat + " " + error);
|
||||||
|
toastr.error("<?= $this->lang->line('error_message')?>" , "<?= $this->lang->line('request_error')?>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
|
@ -104,7 +104,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row centered">
|
<div class="row centered">
|
||||||
<div class="col-lg-3 col-xs-3">
|
<div class="col-lg-4 col-xs-3">
|
||||||
<div class="small-box bg-red-active">
|
<div class="small-box bg-red-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
|
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
|
||||||
|
@ -115,7 +115,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-xs-3">
|
<div class="col-lg-4 col-xs-3">
|
||||||
<div class="small-box bg-orange">
|
<div class="small-box bg-orange">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $this->lang->line($nh_config->family_coverage_sharing ? 'Oui' : 'Non'); ?></h3>
|
<h3><?= $this->lang->line($nh_config->family_coverage_sharing ? 'Oui' : 'Non'); ?></h3>
|
||||||
|
@ -126,7 +126,20 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
|
<div class="small-box bg-aqua-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $this->lang->line($nh_config->password_validation) ?></h3>
|
||||||
|
<p><?= $this->lang->line('password_validation') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fa fa-sort-numeric-desc"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row centered">
|
||||||
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
|
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
|
||||||
|
@ -137,7 +150,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->age_limit_of_insured_and_spouse ?? ''; ?></h3>
|
<h3><?= $nh_config->age_limit_of_insured_and_spouse ?? ''; ?></h3>
|
||||||
|
@ -148,7 +161,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
|
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
|
||||||
|
@ -232,7 +245,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row centered">
|
<div class="row centered">
|
||||||
<div class="col-lg-6 col-xs-12">
|
<div class="col-lg-4 col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="box-title"><?= $this->lang->line('years_price_grid') ?></h3>
|
<h3 class="box-title"><?= $this->lang->line('years_price_grid') ?></h3>
|
||||||
|
@ -253,7 +266,7 @@ $careRequests = [];
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $row->min_age ?></td>
|
<td><?= $row->min_age ?></td>
|
||||||
<td><?= $row->max_age ?></td>
|
<td><?= $row->max_age ?></td>
|
||||||
<td><?= $row->markup_percentage.'%' ?></td>
|
<td><?= floatval($row->markup_percentage).'%' ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -267,7 +280,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-xs-12">
|
<div class="col-lg-8 col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="box-title"><?= $this->lang->line('months_price_grid') ?></h3>
|
<h3 class="box-title"><?= $this->lang->line('months_price_grid') ?></h3>
|
||||||
|
@ -276,9 +289,13 @@ $careRequests = [];
|
||||||
<table class="table table-bordered" >
|
<table class="table table-bordered" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="80"><?= $this->lang->line('number_of_months') ?> </th>
|
<th><?= $this->lang->line('number_of_months') ?> </th>
|
||||||
<th><?= $this->lang->line('min_amount') ?> </th>
|
<th><?= $this->lang->line('min_amount') ?> </th>
|
||||||
<th width="180"><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
<th><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
||||||
|
<th><?= $this->lang->line('waiting_period_days') ?> </th>
|
||||||
|
<th><?= $this->lang->line('payment_period') ?> </th>
|
||||||
|
<th><?= $this->lang->line('payment_duration_months') ?> </th>
|
||||||
|
<th><?= $this->lang->line('number_of_fractions') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -289,7 +306,10 @@ $careRequests = [];
|
||||||
<td><?= $row->number_of_months ?></td>
|
<td><?= $row->number_of_months ?></td>
|
||||||
<td><?= Money::of(round($row->min_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?></td>
|
<td><?= Money::of(round($row->min_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?></td>
|
||||||
<td><?= Money::of(round($row->max_insurance_coverage_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?></td>
|
<td><?= Money::of(round($row->max_insurance_coverage_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?></td>
|
||||||
|
<td><?= $row->waiting_period_days ?? '' ?> </td>
|
||||||
|
<td><?= $this->lang->line($row->payment_period) ?> </td>
|
||||||
|
<td><?= $row->payment_duration_months ?> </td>
|
||||||
|
<td><?= $row->number_of_fractions ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -457,7 +477,7 @@ $careRequests = [];
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 40px">
|
<div class="form-group" style="margin-top: 40px">
|
||||||
<label class="col-form-label"><?= $this->lang->line('max_number_of_beneficiaries'); ?></label>
|
<label class="col-form-label"><?= $this->lang->line('max_number_of_beneficiaries'); ?></label>
|
||||||
<input type="number" min="0" max="9" step="1" required class="form-control"
|
<input type="number" min="0" max="1000" step="1" required class="form-control"
|
||||||
name="max_number_of_beneficiaries" value="<?= $nh_config->max_number_of_beneficiaries ?? 0 ?>">
|
name="max_number_of_beneficiaries" value="<?= $nh_config->max_number_of_beneficiaries ?? 0 ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -470,6 +490,17 @@ $careRequests = [];
|
||||||
<input type="number" min="0" max="99" step="1" required class="form-control"
|
<input type="number" min="0" max="99" step="1" required class="form-control"
|
||||||
name="age_limit_of_child_beneficiary" value="<?= $nh_config->age_limit_of_child_beneficiary ?? 0 ?>">
|
name="age_limit_of_child_beneficiary" value="<?= $nh_config->age_limit_of_child_beneficiary ?? 0 ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-form-label"><?= $this->lang->line('password_validation'); ?></label>
|
||||||
|
<select class="form-control" name="password_validation" required>
|
||||||
|
<?php $array = array_values($password_validation_types);
|
||||||
|
foreach ($array as $value) { ?>
|
||||||
|
<option value="<?=$value?>" <?= $value === ($nh_config->password_validation ?? '') ? 'selected' : '' ?> >
|
||||||
|
<?=$this->lang->line($value)?>
|
||||||
|
</option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
|
@ -558,7 +589,7 @@ $careRequests = [];
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $row->min_age ?></td>
|
<td><?= $row->min_age ?></td>
|
||||||
<td><?= $row->max_age ?></td>
|
<td><?= $row->max_age ?></td>
|
||||||
<td><?= $row->markup_percentage?></td>
|
<td><?= floatval($row->markup_percentage)?></td>
|
||||||
<td>
|
<td>
|
||||||
<a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
<a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
|
@ -584,7 +615,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="modal-months-grid">
|
<div class="modal fade" id="modal-months-grid">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
@ -610,9 +641,13 @@ $careRequests = [];
|
||||||
<table id="months_prices_grid" class="table table-bordered">
|
<table id="months_prices_grid" class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="display: none;">ID</th>
|
||||||
<th><?= $this->lang->line('number_of_months') ?> </th>
|
<th><?= $this->lang->line('number_of_months') ?> </th>
|
||||||
<th><?= $this->lang->line('min_amount') ?> </th>
|
<th><?= $this->lang->line('min_amount') ?> </th>
|
||||||
<th><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
<th><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
||||||
|
<th><?= $this->lang->line('waiting_period_days') ?> </th>
|
||||||
|
<th><?= $this->lang->line('payment_period') ?> </th>
|
||||||
|
<th><?= $this->lang->line('payment_duration_months') ?></th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -621,9 +656,13 @@ $careRequests = [];
|
||||||
if (isset($months_prices_grid)) {
|
if (isset($months_prices_grid)) {
|
||||||
foreach ($months_prices_grid->result() as $row) { ?>
|
foreach ($months_prices_grid->result() as $row) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $row->number_of_months ?></td>
|
<td name='id' style="display: none;"><?=$row->id?></td>
|
||||||
<td><?= $row->min_amount ?></td>
|
<td name='number_of_months'><?= $row->number_of_months ?></td>
|
||||||
<td><?= $row->max_insurance_coverage_amount ?></td>
|
<td name='min_amount'><?= floatval($row->min_amount) ?></td>
|
||||||
|
<td name='max_insurance_coverage_amount'><?= floatval($row->max_insurance_coverage_amount) ?></td>
|
||||||
|
<td name='waiting_period_days'><?= $row->waiting_period_days ?? '' ?></td>
|
||||||
|
<td name='payment_period' value="<?=$row->payment_period?>"><?= $this->lang->line($row->payment_period) ?></td>
|
||||||
|
<td name='payment_duration_months' ><?= $row->payment_duration_months ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a class="add add2" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="add add2" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
<a class="edit edit2" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="edit edit2" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
|
@ -841,6 +880,7 @@ $careRequests = [];
|
||||||
"age_limit_of_insured_and_spouse": $("input[name=age_limit_of_insured_and_spouse]").val(),
|
"age_limit_of_insured_and_spouse": $("input[name=age_limit_of_insured_and_spouse]").val(),
|
||||||
"age_limit_of_child_beneficiary": $("input[name=age_limit_of_child_beneficiary]").val(),
|
"age_limit_of_child_beneficiary": $("input[name=age_limit_of_child_beneficiary]").val(),
|
||||||
"family_coverage_sharing" : family_coverage_sharing,
|
"family_coverage_sharing" : family_coverage_sharing,
|
||||||
|
"password_validation" : $("select[name=password_validation]").val(),
|
||||||
"current_affection_percentage_insurer": current_affection_percentage_insurer,
|
"current_affection_percentage_insurer": current_affection_percentage_insurer,
|
||||||
"current_affection_percentage_insured": current_affection_percentage_insured,
|
"current_affection_percentage_insured": current_affection_percentage_insured,
|
||||||
"long_term_affection_percentage_insurer": long_term_affection_percentage_insurer,
|
"long_term_affection_percentage_insurer": long_term_affection_percentage_insurer,
|
||||||
|
@ -940,13 +980,16 @@ $careRequests = [];
|
||||||
$('#months_prices_grid tr').has('td').each(function (i, el) {
|
$('#months_prices_grid tr').has('td').each(function (i, el) {
|
||||||
var arrayItem = {};
|
var arrayItem = {};
|
||||||
var row = [];
|
var row = [];
|
||||||
$('td', $(this)).each(function (index, item) {
|
|
||||||
row.push(parseFloat($(item).html()));
|
|
||||||
});
|
|
||||||
arrayItem.nh_network_config_id = config_id
|
arrayItem.nh_network_config_id = config_id
|
||||||
arrayItem.number_of_months = row[0];
|
$('td', $(this)).each(function (index, item) {
|
||||||
arrayItem.min_amount = row[1];
|
if($(item).attr('name')){
|
||||||
arrayItem.max_insurance_coverage_amount = row[2];
|
if($(item).attr("name") === 'payment_period'){
|
||||||
|
arrayItem[$(item).attr("name")] = $(item).attr("value")
|
||||||
|
}else{
|
||||||
|
arrayItem[$(item).attr("name")] = parseFloat($(item).html()) || null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
grid.push(arrayItem);
|
grid.push(arrayItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -978,7 +1021,6 @@ $careRequests = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#monthsGridForm')[0].reportValidity();
|
$('#monthsGridForm')[0].reportValidity();
|
||||||
}
|
}
|
||||||
|
@ -1185,7 +1227,7 @@ $careRequests = [];
|
||||||
var row = '<tr>' +
|
var row = '<tr>' +
|
||||||
`<td><input type="number" required min="0" max="99" class="form-control" name="min_age" value="${initValue}" disabled></td>` +
|
`<td><input type="number" required min="0" max="99" class="form-control" name="min_age" value="${initValue}" disabled></td>` +
|
||||||
`<td><input type="number" required min="0" max="99" class="form-control" name="max_age" value="${maxAge}" ></td>` +
|
`<td><input type="number" required min="0" max="99" class="form-control" name="max_age" value="${maxAge}" ></td>` +
|
||||||
'<td><input type="number" required class="form-control" min="-100" max="100" name="markup_percentage"></td>' +
|
'<td><input type="number" required class="form-control" min="-100" max="100" step="any" name="markup_percentage"></td>' +
|
||||||
'<td> ' + actions1 + '</td>' +
|
'<td> ' + actions1 + '</td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
$("#years_prices_grid").append(row);
|
$("#years_prices_grid").append(row);
|
||||||
|
@ -1250,7 +1292,7 @@ $careRequests = [];
|
||||||
if (index == 1)
|
if (index == 1)
|
||||||
$(this).html('<input type="number" required class="form-control" name="max_age" value="' + $(this).text() + '" disabled>');
|
$(this).html('<input type="number" required class="form-control" name="max_age" value="' + $(this).text() + '" disabled>');
|
||||||
if (index == 2)
|
if (index == 2)
|
||||||
$(this).html('<input type="number" required class="form-control" min="-100" max="100" name="markup_percentage" value="' + $(this).text() + '">');
|
$(this).html('<input type="number" required class="form-control" min="-100" max="100" step="any" name="markup_percentage" value="' + $(this).text() + '">');
|
||||||
});
|
});
|
||||||
$(this).parents("tr").find(".add, .edit").toggle();
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
$(".new1").attr("disabled", "disabled");
|
$(".new1").attr("disabled", "disabled");
|
||||||
|
@ -1264,6 +1306,17 @@ $careRequests = [];
|
||||||
//Months Grid
|
//Months Grid
|
||||||
var actions2 = $("#months_prices_grid td:last-child").html();
|
var actions2 = $("#months_prices_grid td:last-child").html();
|
||||||
|
|
||||||
|
function getPaymentPeriods(selectedValue) {
|
||||||
|
var periods = '';
|
||||||
|
<?php foreach ($payment_periods as $p ) {?>
|
||||||
|
var val = "<?=$p?>";
|
||||||
|
var selected = val === selectedValue ? 'selected' : '';
|
||||||
|
periods += (`<option value='<?= $p ?>' ${selected} > <?= $this->lang->line($p) ?> </option>`);
|
||||||
|
<?php } ?>
|
||||||
|
return periods;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Append table with add row form on add new button click
|
// Append table with add row form on add new button click
|
||||||
$(".new2").click(function () {
|
$(".new2").click(function () {
|
||||||
if (!actions2) {
|
if (!actions2) {
|
||||||
|
@ -1277,6 +1330,13 @@ $careRequests = [];
|
||||||
'<td><input type="number" required min="1" class="form-control" name="number_of_months"></td>' +
|
'<td><input type="number" required min="1" class="form-control" name="number_of_months"></td>' +
|
||||||
'<td><input type="number" required min="0" step="0.01" class="form-control" name="min_amount" ></td>' +
|
'<td><input type="number" required min="0" step="0.01" class="form-control" name="min_amount" ></td>' +
|
||||||
'<td><input type="number" required min="0" step="0.01" class="form-control" name="max_insurance_coverage_amount" ></td>' +
|
'<td><input type="number" required min="0" step="0.01" class="form-control" name="max_insurance_coverage_amount" ></td>' +
|
||||||
|
'<td><input type="number" min="1" step="1" class="form-control" name="waiting_period_days" ></td>' +
|
||||||
|
'<td>' +
|
||||||
|
'<select required class="form-control" name="payment_period" >' +
|
||||||
|
getPaymentPeriods(null)+
|
||||||
|
'</select>' +
|
||||||
|
'</td>' +
|
||||||
|
'<td><input type="number" min="1" step="1" class="form-control" name="payment_duration_months" ></td>' +
|
||||||
'<td> ' + actions2 + '</td>' +
|
'<td> ' + actions2 + '</td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
$("#months_prices_grid").append(row);
|
$("#months_prices_grid").append(row);
|
||||||
|
@ -1289,6 +1349,7 @@ $careRequests = [];
|
||||||
var input = $(this).parents("tr").find('input[type="number"]');
|
var input = $(this).parents("tr").find('input[type="number"]');
|
||||||
var minAmount = parseFloat($(this).parents("tr").find('input[name="min_amount"]').first().val());
|
var minAmount = parseFloat($(this).parents("tr").find('input[name="min_amount"]').first().val());
|
||||||
var maxAmount = parseFloat($(this).parents("tr").find('input[name="max_insurance_coverage_amount"]').first().val());
|
var maxAmount = parseFloat($(this).parents("tr").find('input[name="max_insurance_coverage_amount"]').first().val());
|
||||||
|
var select = $(this).parents("tr").find('select');
|
||||||
|
|
||||||
input.each(function () {
|
input.each(function () {
|
||||||
if ($(this).attr('name') == 'min_amount') {
|
if ($(this).attr('name') == 'min_amount') {
|
||||||
|
@ -1313,21 +1374,39 @@ $careRequests = [];
|
||||||
$(this).parents("tr").find(".error").first().focus();
|
$(this).parents("tr").find(".error").first().focus();
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
input.each(function () {
|
input.each(function () {
|
||||||
$(this).parent("td").html($(this).val());
|
$(this).parent("td").attr('name', $(this).attr('name')).html($(this).val());
|
||||||
});
|
});
|
||||||
$(this).parents("tr").find(".add, .edit").toggle();
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
$(".new2").removeAttr("disabled");
|
$(".new2").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select.each(function () {
|
||||||
|
$(this).parent("td").html($(this).find('option:selected').text()).attr("value",$(this).val());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// Edit row on edit button click
|
// Edit row on edit button click
|
||||||
$(document).on("click", ".edit2", function () {
|
$(document).on("click", ".edit2", function () {
|
||||||
|
var length = $(this).parents("tr").find("td:not(:last-child)").length;
|
||||||
|
// If startAt =7 , alors il exite deja en BD, car on a hidden la 1ere colonne qui contient l'id
|
||||||
|
var startAt = length === 7 ? 1 : 0;
|
||||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||||
if (index == 0)
|
if (index === startAt)
|
||||||
$(this).html('<input type="number" required class="form-control" min="1" name="number_of_months" value="' + $(this).text() + '">');
|
$(this).html('<input type="number" required class="form-control" min="1" name="number_of_months" value="' + $(this).text() + '">');
|
||||||
if (index == 1)
|
if (index === (startAt + 1))
|
||||||
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="min_amount" value="' + $(this).text() + '">');
|
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="min_amount" value="' + $(this).text() + '">');
|
||||||
if (index == 2)
|
if (index === (startAt + 2))
|
||||||
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="max_insurance_coverage_amount" value="' + $(this).text() + '">');
|
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="max_insurance_coverage_amount" value="' + $(this).text() + '">');
|
||||||
|
if (index === (startAt + 3))
|
||||||
|
$(this).html('<input type="number" class="form-control" min="1" step="1" name="waiting_period_days" value="' + $(this).text() + '">');
|
||||||
|
if (index === (startAt + 4)){
|
||||||
|
let val = $(this).attr("value");
|
||||||
|
if(!val){
|
||||||
|
val = $(this).attr("payment_period");
|
||||||
|
}
|
||||||
|
$(this).html('<select class="form-control" name="payment_period" required >'+ getPaymentPeriods(val)+ '</select>');
|
||||||
|
}
|
||||||
|
if (index === (startAt + 5))
|
||||||
|
$(this).html('<input type="number" class="form-control" min="1" step="1" name="payment_duration_months" value="' + $(this).text() + '">');
|
||||||
});
|
});
|
||||||
$(this).parents("tr").find(".add, .edit").toggle();
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
$(".new2").attr("disabled", "disabled");
|
$(".new2").attr("disabled", "disabled");
|
||||||
|
|
|
@ -465,11 +465,10 @@
|
||||||
|
|
||||||
$('#accept-subscription').click(function() {
|
$('#accept-subscription').click(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url('NanoHealthController/validateSubscription')?>',
|
url: '<?= base_url('NanoHealthController/validateSubscription/'.$subscription->id )?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
"subscription_id": "<?=$subscription->id ?>",
|
|
||||||
<?php if(isset($category) && $category == 'AGENT') { ?>
|
<?php if(isset($category) && $category == 'AGENT') { ?>
|
||||||
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
@ -507,11 +506,10 @@
|
||||||
toastr.warning( "<?= $this->lang->line('reason_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
toastr.warning( "<?= $this->lang->line('reason_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
}else{
|
}else{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('NanoHealthController/rejectSubscription')?>',
|
url: '<?php echo base_url('NanoHealthController/rejectSubscription/'.$subscription->id)?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
"subscription_id": "<?=$subscription->id ?>",
|
|
||||||
<?php if(isset($category) && $category == 'AGENT') { ?>
|
<?php if(isset($category) && $category == 'AGENT') { ?>
|
||||||
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
@ -552,11 +550,10 @@
|
||||||
toastr.warning( "<?= $this->lang->line('message_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
toastr.warning( "<?= $this->lang->line('message_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
}else{
|
}else{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('NanoHealthController/rejectSubscription')?>',
|
url: '<?php echo base_url('NanoHealthController/rejectSubscription/'.$subscription->id)?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
"subscription_id": "<?=$subscription->id ?>",
|
|
||||||
<?php if(isset($category) && $category == 'AGENT') { ?>
|
<?php if(isset($category) && $category == 'AGENT') { ?>
|
||||||
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
"nh_validating_agent_id": "<?= $this->session->userdata('agent_id') ?>",
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
<th><?= $this->lang->line('total_insurance_part') ?></th>
|
<th><?= $this->lang->line('total_insurance_part') ?></th>
|
||||||
<th>Date debut</th>
|
<th>Date debut</th>
|
||||||
<th>Date fin</th>
|
<th>Date fin</th>
|
||||||
|
<th><?= $this->lang->line('state') ?></th>
|
||||||
<th align='center'>Action</th>
|
<th align='center'>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -3,9 +3,21 @@
|
||||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title1 ='manage_validating_doctors';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title1 ='manage_controllers_doctors';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title1 = 'manage_validating_agents';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<?= $this->lang->line( $role == 'DOCTOR' ? 'manage_validating_doctors' : 'manage_validating_agents') ; ?>
|
<?= $this->lang->line($title1) ; ?>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -14,7 +26,19 @@
|
||||||
<div class="col-xs-8">
|
<div class="col-xs-8">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="box-title"><?php echo $this->lang->line($role == 'DOCTOR' ? 'validating_doctors' : 'validating_agents'); ?></h3>
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title2 ='validating_doctors';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title2 ='controllers_doctors';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title2 = 'validating_agents';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line($title2); ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body" style="overflow-x:auto;">
|
<div class="box-body" style="overflow-x:auto;">
|
||||||
<table id="agents" class="table table-bordered table-striped">
|
<table id="agents" class="table table-bordered table-striped">
|
||||||
|
@ -67,7 +91,19 @@
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="box-title"><?php echo $this->lang->line($role == 'DOCTOR' ? 'add_validating_doctor': 'add_validating_agent'); ?></h3>
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title3 ='add_validating_doctor';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title3 ='add_controller_doctor';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title3 = 'add_validating_agent';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line($title3); ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form id="create-agent-form" class="bottom-75 center-block">
|
<form id="create-agent-form" class="bottom-75 center-block">
|
||||||
|
@ -187,6 +223,19 @@
|
||||||
$('#delete-modal').modal('show');
|
$('#delete-modal').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title4 ='validating_doctor_updated';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title4 ='controller_doctor_updated';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title4 = 'validating_agent_updated';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
$("#update-form").submit(function () {
|
$("#update-form").submit(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('NanoHealthController/updateValidatingAgent')?>',
|
url: '<?php echo base_url('NanoHealthController/updateValidatingAgent')?>',
|
||||||
|
@ -203,7 +252,7 @@
|
||||||
if(data.code === 200){
|
if(data.code === 200){
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: "<?= $this->lang->line($role == 'DOCTOR' ? 'validating_doctor_updated' : 'validating_agent_updated')?>",
|
title: "<?= $this->lang->line($title4)?>",
|
||||||
text:"<?= $this->lang->line('informations_updated')?>",
|
text:"<?= $this->lang->line('informations_updated')?>",
|
||||||
timer: 3000
|
timer: 3000
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
|
@ -222,6 +271,18 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title5 ='validating_doctor_created';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title5 ='controller_doctor_created';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title5 = 'validating_agent_created';
|
||||||
|
}
|
||||||
|
?>
|
||||||
$("#create-agent-form").submit(function (event) {
|
$("#create-agent-form").submit(function (event) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -240,7 +301,7 @@
|
||||||
if(data.code === 200){
|
if(data.code === 200){
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: "<?= $this->lang->line($role == 'DOCTOR' ? 'validating_doctor_created' : 'validating_agent_created')?>",
|
title: "<?= $this->lang->line($title5)?>",
|
||||||
text:"<?= $this->lang->line('informations_updated')?>",
|
text:"<?= $this->lang->line('informations_updated')?>",
|
||||||
timer: 3000
|
timer: 3000
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
|
@ -259,7 +320,18 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
switch ($role){
|
||||||
|
case 'DOCTOR':
|
||||||
|
$title6 ='validating_doctor_deleted';
|
||||||
|
break;
|
||||||
|
case 'CONTROLLER':
|
||||||
|
$title6 ='controller_doctor_deleted';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$title6 = 'validating_agent_deleted';
|
||||||
|
}
|
||||||
|
?>
|
||||||
$("#delete-btn").click(function () {
|
$("#delete-btn").click(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('NanoHealthController/deleteValidatingAgent')?>',
|
url: '<?php echo base_url('NanoHealthController/deleteValidatingAgent')?>',
|
||||||
|
@ -270,7 +342,7 @@
|
||||||
if(data.code === 200){
|
if(data.code === 200){
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: "<?= $this->lang->line($role == 'DOCTOR' ? 'validating_doctor_deleted' : 'validating_agent_deleted')?>",
|
title: "<?= $this->lang->line($title6)?>",
|
||||||
text:"<?= $this->lang->line('informations_updated')?>",
|
text:"<?= $this->lang->line('informations_updated')?>",
|
||||||
timer: 3000
|
timer: 3000
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
|
|
Loading…
Reference in New Issue