Implementation of customer account opening requests
This commit is contained in:
parent
103ca3ec2e
commit
9384d0842f
|
@ -95,3 +95,5 @@ define('NOTIFICATION_SERVICE_URL','https://ilink-app.com:8083');
|
|||
define('NOTIFICATION_SERVICE_TOKEN','RfXvPQzQRgwpzQYPnLfWpZzgx4QseHlg');
|
||||
define('NANO_SANTE_SERVICE_URL','https://ilink-app.com:8086');
|
||||
define('NANO_SANTE_SERVICE_TOKEN','eStSQIoAfnTJ9nkCs0IJkJiKACxYVcQm');
|
||||
define('USER_SERVICE_URL','https://ilink-app.com:8088');
|
||||
define('USER_SERVICE_TOKEN','T3J0c9lQXPBs6UWebvPWWdnzqmqWOQM6');
|
||||
|
|
|
@ -1356,6 +1356,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['category'] = $this->session->userdata('category');
|
||||
$data['idConfig'] = $data['hasWallet']->first_row()->id;
|
||||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
if (isset($country)) {
|
||||
$data['country_id'] = $country;
|
||||
$data['country'] = $this->wallet_model->getCountry($country)->first_row();
|
||||
|
@ -1517,6 +1518,15 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/taxes');
|
||||
break;
|
||||
case 'customers_accounts':
|
||||
$data['types'] = $this->db->select('t.* , p.name as parent')
|
||||
->from('customer_account_types t')->join('customer_account_types p', 't.parent_id = p.id','left')->get()->result();
|
||||
foreach ($data['types'] as $i => $type){
|
||||
$data['types'][$i]->documents = $this->db->get_where('customer_account_type_documents',['account_type_id' => $type->id])->result();
|
||||
}
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/customers_accounts');
|
||||
break;
|
||||
}
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
@ -2072,6 +2082,9 @@ class Hyperviseur_dash extends CI_Controller
|
|||
}else if($role == 'controllers'){
|
||||
$data['active'] = "wallet_validating_controllers";
|
||||
$data['role'] = 'CONTROLLER';
|
||||
}else if($role == 'account_opening_agents'){
|
||||
$data['active'] = "wallet_validating_account_opening_agents";
|
||||
$data['role'] = 'OPENING_ACCOUNT_AGENT';
|
||||
}else{
|
||||
$data['active'] = "wallet_validating_agents";
|
||||
$data['role'] = 'AGENT';
|
||||
|
@ -2085,10 +2098,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$nh_config = $this->nano_health_model->getConfig($data['network_id']);
|
||||
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
|
||||
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
|
||||
$data['agents'] = $this->db->get_where('nh_validating_agents',['nh_network_config_id' => $data['config_id'] , 'role' => $data['role']]);
|
||||
$data['agents'] = $this->db->get_where('nh_validating_agents',['network_id' => $data['network_id'] , 'role' => $data['role']]);
|
||||
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('nano_health/hyper/validating_agents');
|
||||
|
@ -2135,6 +2145,55 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function storeCustomerAccountType(){
|
||||
if($this->isLogged()) {
|
||||
if (isset($_POST)) {
|
||||
$id = $_POST['id'] ?? null ;
|
||||
|
||||
$exist = $this->db->get_where('customer_account_types', ['id !=' => $id ,'network_id' => $_POST['network_id'] , 'name' => $_POST['name']]);
|
||||
if ($exist->num_rows() == 0) {
|
||||
foreach ($_POST as $key => $value){
|
||||
if(empty($value)){
|
||||
$_POST[$key] = null;
|
||||
}
|
||||
}
|
||||
if(!empty($id)){
|
||||
$documents = $_POST['documents'] ?? [] ;
|
||||
unset($_POST['documents']);
|
||||
$this->db->where('id',$id);
|
||||
$this->db->update('customer_account_types',$_POST);
|
||||
$this->db->delete('customer_account_type_documents',['account_type_id' => $id]);
|
||||
if(sizeof($documents) > 0){
|
||||
$data = array_map(function ($document) use($id){
|
||||
$row = [];
|
||||
$row['name'] = $document[0];
|
||||
$row['description'] = $document[0];
|
||||
$row['account_type_id'] = $id;
|
||||
return $row;
|
||||
},$documents);
|
||||
$this->db->insert_batch('customer_account_type_documents',$data);
|
||||
}
|
||||
}else{
|
||||
$this->db->insert('customer_account_types',$_POST);
|
||||
}
|
||||
echo json_encode(['code' => 200]);
|
||||
|
||||
}else{
|
||||
echo json_encode(['code'=> 419 , 'message' => $this->lang->line("name_already_used")]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteCustomerAccountType(){
|
||||
if($this->isLogged()) {
|
||||
if (isset($_POST)) {
|
||||
$this->db->delete('customer_account_types', ['id' => $_POST['id']]);
|
||||
echo json_encode(['code' => 200]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Operation
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class OpeningAccountAgent extends CI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('opening_account_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 == 'requests' && !empty($id)){
|
||||
$data['active'] = "requests";
|
||||
$data['invoice'] = $this->opening_account_model->getInfosOpeningAccountRequestId($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('account_opening_agent/header', $data);
|
||||
$this->load->view('account_opening_agent/infos_invoice', $data);
|
||||
$this->load->view('footer');
|
||||
}else{
|
||||
$this->history($this->input->get('d'), $this->input->get('f'), $this->input->get('history'), $data);
|
||||
}
|
||||
}else{
|
||||
|
||||
$data['count_accepted'] = $this->opening_account_model->getCountRequests(null,$this->session->userdata('agent_id'), 'ACCEPTED');
|
||||
$data['count_rejected'] = $this->opening_account_model->getCountRequests(null,$this->session->userdata('agent_id'), 'REJECTED');
|
||||
$data['count_under_validation'] = $this->opening_account_model->getCountRequests($data['network_id'],null, 'UNDER_VALIDATION');
|
||||
|
||||
$this->load->view('account_opening_agent/header', $data);
|
||||
$this->load->view('account_opening_agent/dashboard', $data);
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function history($networkId , $startDate , $endDate , $type){
|
||||
|
||||
$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"));
|
||||
|
||||
$data['active'] = "subscription_requests";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['id_network'] = $this->session->userdata('network_id');
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['category'] = $this->session->userdata('role');
|
||||
|
||||
// if ($type == 'customer_account_opening_requests'){
|
||||
// $data['active'] = 'requests';
|
||||
// }
|
||||
|
||||
|
||||
$this->load->view('account_opening_agent/header', $data);
|
||||
if ($type == 'customer_account_opening_requests')
|
||||
$this->load->view('account_opening_agent/opening_account_requests');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
public function requests(){
|
||||
if ($this->isLogged()) {
|
||||
$data['id_network'] = $this->session->userdata('network_id');
|
||||
$data['active'] = "requests";
|
||||
$data['category'] = $this->session->userdata('role');
|
||||
|
||||
if ($this->input->get('history')) {
|
||||
if ($this->input->get('id') !== null) {
|
||||
$data['request'] = $this->opening_account_model->getInfosOpeningAccountRequestId($this->input->get('id'));
|
||||
$data['user'] = $this->db->get_where('user_infos', ['user_id' => $data['subscription']->user_id ?? null])->first_row();
|
||||
$data['documents'] = $this->opening_account_model->getOpeningAccountRequestDocuments($this->input->get('id'));
|
||||
$this->load->view('account_opening_agent/header', $data);
|
||||
$this->load->view('account_opening_agent/infos_opening_account_request');
|
||||
$this->load->view('footer');
|
||||
} else {
|
||||
$this->history($data['id_network'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function treatRequest($request_id)
|
||||
{
|
||||
echo makeRequest('user-service', 'PUT','/customers_accounts_requests/'.$request_id.'/treat', $_POST);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@
|
|||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['network_id'] =
|
||||
$data['network_id'] =
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network']);
|
||||
$data['count_geo'] = $this->user_model->countUser("geolocated",$this->session->userdata('network'));
|
||||
$data['count_sup'] = $this->user_model->countUser("super",$this->session->userdata('network'));
|
||||
|
@ -74,11 +74,10 @@
|
|||
'user_role' => $this->input->post('user_role')
|
||||
);
|
||||
|
||||
// Pour les agents valideurs de iLink Santé
|
||||
// Pour les agents valideurs de iLink Santé et iLink World
|
||||
if($user_login['user_role'] == 2 && filter_var($user_login['user_email'], FILTER_VALIDATE_EMAIL)){
|
||||
$sql = "SELECT nhd.* , n.name as network , n.id as network_id, cc.name as country, cc.currency_code
|
||||
FROM nh_validating_agents nhd INNER JOIN nh_networks_configs nhc ON nhc.id = nhd.nh_network_config_id
|
||||
INNER JOIN networks n ON n.id = nhc.network_id INNER JOIN countries_currencies cc ON cc.id = n.country_id WHERE nhd.email = ?";
|
||||
FROM nh_validating_agents nhd INNER JOIN networks n ON n.id = nhd.network_id INNER JOIN countries_currencies cc ON cc.id = n.country_id WHERE nhd.email = ?";
|
||||
$agent = $this->db->query($sql,[$user_login['user_email']]);
|
||||
if($agent->num_rows()>0) {
|
||||
$agent = $agent->first_row();
|
||||
|
@ -99,6 +98,8 @@
|
|||
redirect('ValidatingDoctor');
|
||||
}else if($agent->role == 'CONTROLLER'){
|
||||
redirect('ControllerDoctor');
|
||||
}else if($agent->role == 'OPENING_ACCOUNT_AGENT'){
|
||||
redirect('OpeningAccountAgent');
|
||||
}else{
|
||||
redirect('ValidatingAgent');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<?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 CustomerAccountOpeningRequests extends CI_Controller
|
||||
{
|
||||
private $context = null;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Load member model
|
||||
$this->load->model('pagination/CustomerAccountOpeningRequests_model', 'model');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
$buttons = '<a href="'.$current_url.'?history=customer_account_opening_requests&id='.$row->id.'" class="btn btn-primary" > '.$this->lang->line('Voir plus...').'</a>';
|
||||
|
||||
|
||||
$data[] = array($row->unique_id , $row->customer_account_type_name, $row->lastname , $row->firstname, $row->phone_number,
|
||||
mb_strtoupper($this->lang->line($row->status),'UTF-8'), $row->created_at ,$buttons);
|
||||
|
||||
}
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
}
|
|
@ -148,3 +148,61 @@ if (!function_exists('checkhashSSHA')) {
|
|||
return base64_encode(sha1($password . $salt, true) . $salt);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('makeRequest')) {
|
||||
function makeRequest($service , $method , $path , $request_body = []){
|
||||
if(empty($_SESSION['email'])) {
|
||||
return json_encode(['status' => 401]);
|
||||
}
|
||||
|
||||
switch ($service){
|
||||
case 'user-service':
|
||||
$baseUrl = USER_SERVICE_URL;
|
||||
$token = USER_SERVICE_TOKEN;
|
||||
break;
|
||||
case 'nano-service':
|
||||
$baseUrl = NANO_SANTE_SERVICE_URL;
|
||||
$token = NANO_SANTE_SERVICE_TOKEN;
|
||||
break;
|
||||
case 'wallet-service':
|
||||
$baseUrl = WALLET_SERVICE_URL;
|
||||
$token = WALLET_SERVICE_TOKEN;
|
||||
break;
|
||||
default:
|
||||
$baseUrl = '';
|
||||
$token = '';
|
||||
}
|
||||
$url = $baseUrl.$path;
|
||||
if($method == 'GET'){
|
||||
$data = http_build_query($_POST);
|
||||
$ch = curl_init($url."?".$data);
|
||||
}else{
|
||||
$ch = curl_init($url);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
|
||||
/* set the content type json */
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||
'Content-Type:application/json',
|
||||
'Authorization:'.$token,
|
||||
'X-localization:'. $_SESSION['site_lang'] == 'french' ? 'fr' : 'en'
|
||||
));
|
||||
/* set return type json */
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$body = new \stdClass();
|
||||
foreach ($request_body as $key => $value){
|
||||
$body->{$key} = $value;
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
|
||||
|
||||
/* execute request */
|
||||
$result = curl_exec($ch);
|
||||
/* close cURL resource */
|
||||
curl_close($ch);
|
||||
|
||||
if ($result) {
|
||||
return $result;
|
||||
}else{
|
||||
return json_encode(['status' => 500]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -962,5 +962,91 @@ $lang['aggregator_updated'] = "Payment aggregator updated";
|
|||
$lang['aggregator_deleted'] = "Payment aggregator deleted";
|
||||
$lang['aggregator_created'] = "Payment aggregator created";
|
||||
$lang['aggregator_activated'] = "Agrégateur de paiement activated" ;
|
||||
|
||||
$lang['delete_customer_account_type'] = 'Delete a customer account type';
|
||||
$lang['no_customer_account_type'] = 'No customer account type';
|
||||
$lang['no_parent'] = 'No parent';
|
||||
$lang['documents_list'] = 'List of documents';
|
||||
$lang['add_document'] = "Add document";
|
||||
$lang['account_opening_agents'] = "Account opening agents";
|
||||
$lang['manage_account_opening_agents'] = "Manage account opening agents";
|
||||
$lang['account_opening_agent'] = "Account opening agent";
|
||||
$lang['add_account_opening_agent'] = "Add an account opening agent";
|
||||
$lang['account_opening_agent_updated'] = "Modified account opening agent";
|
||||
$lang['account_opening_agent_deleted'] = "Deleted account opening agent";
|
||||
$lang['account_opening_agent_created'] = "Customer account opening agent created";
|
||||
$lang['customer_account_opening_requests'] = "Customer account opening requests";
|
||||
$lang['accepted_opening_account_requests'] = "Accepted account opening requests";
|
||||
$lang['rejected_opening_account_requests'] = "rejected account opening requests";
|
||||
$lang['not_treated_opening_account_requests'] = "Account opening requests not processed";
|
||||
$lang['customer_opening_account_requests_history'] = "History of customer account opening requests";
|
||||
$lang['customer_account_opening_request'] = "Customer account opening request";
|
||||
$lang['personal_details'] = "Personal information";
|
||||
$lang['title'] = "Title";
|
||||
$lang['spouse_name'] = "Marital name";
|
||||
$lang['nationality'] = "Nationality";
|
||||
$lang['birth_country'] = "Country of birth";
|
||||
$lang['birth_city'] = "City of birth";
|
||||
$lang['birth_locality'] = "Exact place of birth";
|
||||
$lang['parent_informations'] = "Parent information";
|
||||
$lang['father_lastname'] = "Father's name";
|
||||
$lang['father_firstname'] = "Father's first name";
|
||||
$lang['mother_birth_lastname'] = "Mother's birth name";
|
||||
$lang['mother_firstname'] = "Mother's first name";
|
||||
$lang['marital_status'] = "Marital status";
|
||||
$lang['spouse_lastname'] = "Spouse's name";
|
||||
$lang['spouse_firstname'] = "Spouse's first name";
|
||||
$lang['employment_details'] = "Employer";
|
||||
$lang['profession'] = "Profession";
|
||||
$lang['business_activity'] = "Business sector";
|
||||
$lang['sub_sector_business_activity'] = "Sub-sector of business";
|
||||
$lang['tax_number'] = "Tax number";
|
||||
$lang['security_number'] = "Social security number";
|
||||
$lang['employee_number'] = "Employer's number";
|
||||
$lang['function'] = "Function";
|
||||
$lang['employee_name'] = "Employer's name";
|
||||
$lang['employee_address'] = "Employer's address";
|
||||
$lang['residential_details'] = "Residential status";
|
||||
$lang['residential_status'] = "Resident status";
|
||||
$lang['residential_country'] = "Country of residence";
|
||||
$lang['residence_permit_number'] = "Residence permit number";
|
||||
$lang['issued_date'] = "Date of issue";
|
||||
$lang['expiry_date'] ="Expiration date";
|
||||
$lang['address_justification_doc'] = "Proof of address";
|
||||
$lang['geographic_address'] = "Geographic address";
|
||||
$lang['po_box'] = "Postal address";
|
||||
$lang['person_to_contact_in_case_of_needs_name'] = "Person to contact if needed";
|
||||
$lang['identification'] = "Identity";
|
||||
$lang['identification_document_type'] = "Identification document type";
|
||||
$lang['identification_document_number'] = "Identification number";
|
||||
$lang['issuance_city'] = "City of issuance";
|
||||
$lang['issuance_country'] = "Issuing country";
|
||||
$lang['guardianship'] = "Guardianship";
|
||||
$lang['customer_under_guardianship'] = "Customer under guardianship? ";
|
||||
$lang['guardian_fullname'] = "Guardian's first and last name";
|
||||
$lang['recommendation'] = "Recommendation";
|
||||
$lang['how_did_you_know_company'] = "How did you hear about the company? ";
|
||||
$lang['introducer_fullname'] = "Introducer's first and last name";
|
||||
$lang['know_your_customer'] = "Knowledge of the customer";
|
||||
$lang['expected_service'] = "Expected service";
|
||||
$lang['income_sources_and_frequency'] = "Income frequency and transaction limit";
|
||||
$lang['business_partners'] = "Business relationship";
|
||||
$lang['bank_references'] = "Bank references";
|
||||
$lang['has_account_with_other_bank'] = "Do you have accounts with other banks?";
|
||||
$lang['more_information_account_opening_request'] = "More information for the account opening request";
|
||||
$lang['reject_subscription_account_opening_request'] = "Reject the account opening request";
|
||||
$lang['has_operative_other_bank_account'] = "If yes, is the account operational?";
|
||||
$lang['has_engagement_with_other_banks'] = "Do you have any engagements with other banks?";
|
||||
$lang['exposed_person'] = "Exposed person";
|
||||
$lang['is_politically_exposed_person'] = "Is the applicant a politically exposed person?";
|
||||
$lang['is_politically_exposed_person_in_service'] = "In service?";
|
||||
$lang['has_relationship_with_politically_exposed_person'] = "Is the applicant a politically exposed person relationship?";
|
||||
$lang['relationship_with_politically_exposed_person'] = "If yes, list their names and the nature of the relationship.";
|
||||
$lang['electronic_products'] = "Electronic products";
|
||||
$lang['email_alerts'] = "Email Alerts";
|
||||
$lang['e_statement_frequency'] = "Bank statement";
|
||||
$lang['e_package'] = "E Package";
|
||||
$lang['debit_card_type'] = "Debit card type";
|
||||
$lang['opening_account_request_accepted'] = "Customer account opening request accepted";
|
||||
$lang['opening_account_request_rejected'] = "The request to open an account has been rejected";
|
||||
$lang['opening_account_request_more_information'] = "The request to open an account has been rejected";
|
||||
?>
|
||||
|
|
|
@ -768,7 +768,6 @@ $lang['mail_body_validating_agent'] = "votre compte agent valideur a bien été
|
|||
$lang['validating_agent_updated'] = "Agent valideur modifié";
|
||||
$lang['validating_agent_deleted'] = "Agent valideur supprimé";
|
||||
$lang['subscription_requests'] = "Demandes de souscriptions";
|
||||
$lang['subscription_requests'] = "Demandes de souscriptions";
|
||||
$lang['accepted_subscription_requests'] = "Demandes de souscriptions acceptées";
|
||||
$lang['rejected_subscription_requests'] = "Demandes de souscriptions rejetées";
|
||||
$lang['not_treated_subscription_requests'] = "Demandes de souscriptions non traitées";
|
||||
|
@ -971,5 +970,91 @@ $lang['aggregator_updated'] = "Agrégateur de paiement mis à jour" ;
|
|||
$lang['aggregator_deleted'] = "Agrégateur de paiement supprimé" ;
|
||||
$lang['aggregator_created'] = "Agrégateur de paiement créé" ;
|
||||
$lang['aggregator_activated'] = "Agrégateur de paiement activé" ;
|
||||
|
||||
$lang['delete_customer_account_type'] = "Supprimer un type de compte client";
|
||||
$lang['no_customer_account_type'] = 'Aucun type de compte client';
|
||||
$lang['no_parent'] = "Aucun parent";
|
||||
$lang['documents_list'] = "Liste des documents";
|
||||
$lang['add_document'] = "Ajouter document";
|
||||
$lang['account_opening_agents'] = "Agents d'ouverture de compte";
|
||||
$lang['manage_account_opening_agents'] = "Gestion des agents d'ouverture de compte client";
|
||||
$lang['account_opening_agent'] = "Agent d'ouverture de compte";
|
||||
$lang['add_account_opening_agent'] = "Ajouter un agent d'ouverture de compte client";
|
||||
$lang['account_opening_agent_updated'] = "Agent d'ouverture de compte client modifié";
|
||||
$lang['account_opening_agent_deleted'] = "Agent d'ouverture de compte client supprimé";
|
||||
$lang['account_opening_agent_created'] = "Agent d'ouverture de compte client créé";
|
||||
$lang['customer_account_opening_requests'] = "Demandes d'ouverture de compte client";
|
||||
$lang['accepted_opening_account_requests'] = "Demandes d'ouverture de compte acceptées";
|
||||
$lang['rejected_opening_account_requests'] = "Demandes d'ouverture de compte rejetées";
|
||||
$lang['not_treated_opening_account_requests'] = "Demandes d'ouverture de compte non traitées";
|
||||
$lang['customer_opening_account_requests_history'] = "Historique des demandes d'ouverture de compte client";
|
||||
$lang['customer_account_opening_request'] = "Demande d'ouverture de compte client";
|
||||
$lang['personal_details'] = "Informations personnelles";
|
||||
$lang['title'] = "Titre";
|
||||
$lang['spouse_name'] = "Nom Marital";
|
||||
$lang['nationality'] = "Nationalité";
|
||||
$lang['birth_country'] = "Pays de naissance";
|
||||
$lang['birth_city'] = "Ville de naissance";
|
||||
$lang['birth_locality'] = "Lieu exact de naissance";
|
||||
$lang['parent_informations'] = "Informations des parents";
|
||||
$lang['father_lastname'] = "Nom du père";
|
||||
$lang['father_firstname'] = "Prénom du père";
|
||||
$lang['mother_birth_lastname'] = "Nom de naissance de la mère";
|
||||
$lang['mother_firstname'] = "Prénom de la mère";
|
||||
$lang['marital_status'] = "Situation matrimoniale";
|
||||
$lang['spouse_lastname'] = "Nom du conjoint";
|
||||
$lang['spouse_firstname'] = "Prénom du conjoint";
|
||||
$lang['employment_details'] = "Employeur";
|
||||
$lang['profession'] = "Profession";
|
||||
$lang['business_activity'] = "Secteur d'activité économique";
|
||||
$lang['sub_sector_business_activity'] = "Sous secteur d'activité";
|
||||
$lang['tax_number'] = "Numéro Fiscal";
|
||||
$lang['security_number'] = "Numéro de sécurité sociale";
|
||||
$lang['employee_number'] = "Numéro de l'employeur";
|
||||
$lang['function'] = "Fonction";
|
||||
$lang['employee_name'] = "Nom de l'employeur";
|
||||
$lang['employee_address'] = "Addresse de l'employeur";
|
||||
$lang['residential_details'] = "Status résidentiel";
|
||||
$lang['residential_status'] = "Status de résident";
|
||||
$lang['residential_country'] = "Pays de résidence";
|
||||
$lang['residence_permit_number'] = "Numéro de permis de séjour";
|
||||
$lang['issued_date'] ="Date de délivrance";
|
||||
$lang['expiry_date'] ="Date d'expiration";
|
||||
$lang['address_justification_doc'] = "Justificatif d'adresse";
|
||||
$lang['geographic_address'] = "Adresse géographique";
|
||||
$lang['po_box'] ="Adresse postale";
|
||||
$lang['person_to_contact_in_case_of_needs_name'] = "Personne à contacter en cas de besoin";
|
||||
$lang['identification'] = "Identité";
|
||||
$lang['identification_document_type'] = "Type de pièce d'identification";
|
||||
$lang['identification_document_number'] = "Numéro d'identification";
|
||||
$lang['issuance_city'] = "Ville d'émission";
|
||||
$lang['issuance_country'] = "Pays d'émission";
|
||||
$lang['guardianship'] = "Tutelle";
|
||||
$lang['customer_under_guardianship'] = "Client sous tutelle ? ";
|
||||
$lang['guardian_fullname'] = "Nom(s) et Prénom(s) du tuteur";
|
||||
$lang['recommendation'] = "Recommendation";
|
||||
$lang['how_did_you_know_company'] = "Comment avez vous connu l'entreprise ? ";
|
||||
$lang['introducer_fullname'] = "Nom(s) et Prénom(s) de l'introducteur";
|
||||
$lang['know_your_customer'] = "Connaissance du client";
|
||||
$lang['expected_service'] = "Service attendu";
|
||||
$lang['income_sources_and_frequency'] = "Fréquence de revenus et Plafond des transactions";
|
||||
$lang['business_partners'] = "Relation d'affaires";
|
||||
$lang['bank_references'] = "Référence bancaires";
|
||||
$lang['has_account_with_other_bank'] = "Avez vous des comptes avec d'autres banques ?";
|
||||
$lang['more_information_account_opening_request'] = "Complément d'informations pour la demande d'ouverture de compte";
|
||||
$lang['reject_subscription_account_opening_request'] = "Rejeter la demande d'ouverture de compte";
|
||||
$lang['has_operative_other_bank_account'] = "Si oui, le compte est-il opérationnel ?";
|
||||
$lang['has_engagement_with_other_banks'] = "Avez vous des engagements avec d'autres banques ?";
|
||||
$lang['exposed_person'] = "Personne exposée";
|
||||
$lang['is_politically_exposed_person'] = "Le demandeur est-il une personne politiquement exposée ?";
|
||||
$lang['is_politically_exposed_person_in_service'] = "En service ?";
|
||||
$lang['has_relationship_with_politically_exposed_person'] = "Le demandeur est-il une relation avec des personnes politiquement exposées ?";
|
||||
$lang['relationship_with_politically_exposed_person'] = "Si oui, indiquez leurs noms et la nature de la relation";
|
||||
$lang['electronic_products'] = "Produits électroniques";
|
||||
$lang['email_alerts'] = "Alertes Email";
|
||||
$lang['e_statement_frequency'] = "Relevé bancaire";
|
||||
$lang['e_package'] = "E Package";
|
||||
$lang['debit_card_type'] = "Type de carte de débit";
|
||||
$lang['opening_account_request_accepted'] = "La demande d'ouverture de compte client été acceptée";
|
||||
$lang['opening_account_request_rejected'] = "La demande d'ouverture de compte client été rejetée";
|
||||
$lang['opening_account_request_more_information'] = "La demande d'ouverture de compte client en attente de complement d'informations";
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: capp
|
||||
* Date: 29/05/2018
|
||||
* Time: 15:49
|
||||
*/
|
||||
|
||||
|
||||
class Opening_account_model extends CI_Model
|
||||
{
|
||||
public function getCountRequests($network_id , $validating_agent_id, $state){
|
||||
$query = $this->db->from('customer_account_opening_requests')->where('status',$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();
|
||||
}
|
||||
|
||||
public function getInfosOpeningAccountRequestId($requestId){
|
||||
return $this->db->get_where('infos_customer_account_opening_requests',['id' => $requestId])->first_row();
|
||||
}
|
||||
|
||||
public function getOpeningAccountRequestDocuments($requestId){
|
||||
return $this->db->get_where('customer_account_request_documents',['request_id' => $requestId])->result();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class CustomerAccountOpeningRequests_model extends CI_Model
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
// Set table name
|
||||
$this->table = 'infos_customer_account_opening_requests';
|
||||
// Set orderable column fields
|
||||
$this->column_order = array('unique_id','customer_account_type_name', 'lastname','firstname', 'phone_number', 'status', 'created_at', null);
|
||||
// Set searchable column fields
|
||||
$this->column_search = array('unique_id','customer_account_type_name','lastname','firstname', 'phone_number', 'status', 'created_at');
|
||||
// Set default order
|
||||
$this->order = array('created_at' => 'desc');
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetch members data from the database
|
||||
* @param $_POST filter data based on the posted parameters
|
||||
*/
|
||||
public function getRows($postData)
|
||||
{
|
||||
$this->_get_datatables_query($postData);
|
||||
if ($postData['length'] != -1) {
|
||||
$this->db->limit($postData['length'], $postData['start']);
|
||||
}
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/*
|
||||
* Count all records
|
||||
*/
|
||||
public function countAll($postData)
|
||||
{
|
||||
$this->db->from($this->table);
|
||||
if(!empty($postData['id_network'])){
|
||||
$this->db->where('network_id', $postData['id_network']);
|
||||
}
|
||||
|
||||
if(!empty($postData['validating_agent_id'])){
|
||||
$this->db->where('validating_agent_id', $postData['validating_agent_id']);
|
||||
}
|
||||
return $this->db->count_all_results();
|
||||
}
|
||||
|
||||
/*
|
||||
* Count records based on the filter params
|
||||
* @param $_POST filter data based on the posted parameters
|
||||
*/
|
||||
public function countFiltered($postData)
|
||||
{
|
||||
$this->_get_datatables_query($postData);
|
||||
$query = $this->db->get();
|
||||
return $query->num_rows();
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the SQL queries needed for an server-side processing requested
|
||||
* @param $_POST filter data based on the posted parameters
|
||||
*/
|
||||
private function _get_datatables_query($postData)
|
||||
{
|
||||
|
||||
$this->db->from($this->table);
|
||||
if(!empty($postData['id_network'])){
|
||||
$this->db->where('network_id', $postData['id_network']);
|
||||
}
|
||||
|
||||
if(!empty($postData['validating_agent_id'])){
|
||||
$this->db->where('validating_agent_id', $postData['validating_agent_id']);
|
||||
}
|
||||
if (strlen($postData['startDate']) > 0 && strlen($postData['endDate']) > 0) {
|
||||
$this->db->where('created_at >=', date('Y-m-d', strtotime($postData['startDate'])));
|
||||
$this->db->where('created_at <', date('Y-m-d', strtotime($postData['endDate']. "+1 day")));
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
// loop searchable columns
|
||||
foreach ($this->column_search as $item) {
|
||||
// if datatable send POST for search
|
||||
if ($postData['search']['value']) {
|
||||
// first loop
|
||||
if ($i === 0) {
|
||||
// open bracket
|
||||
$this->db->group_start();
|
||||
$this->db->like($item, $postData['search']['value']);
|
||||
} else {
|
||||
$this->db->or_like($item, $postData['search']['value']);
|
||||
}
|
||||
|
||||
// last loop
|
||||
if (count($this->column_search) - 1 == $i) {
|
||||
// close bracket
|
||||
$this->db->group_end();
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (isset($postData['order'])) {
|
||||
$this->db->order_by($this->column_order[$postData['order']['0']['column']], $postData['order']['0']['dir']);
|
||||
} else if (isset($this->order)) {
|
||||
$order = $this->order;
|
||||
$this->db->order_by(key($order), $order[key($order)]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
<!-- 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);
|
||||
}
|
||||
|
||||
/**
|
||||
** Liste des souscriptions
|
||||
**/
|
||||
$date = date("Y");
|
||||
$insuranceSubcriptions =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$monthQuery = $this->db->query("SELECT id FROM customer_account_opening_requests
|
||||
WHERE MONTH(created_at) = '".$months[$i-1]."' AND YEAR(created_at) = '".$years[$i-1]."'
|
||||
AND network_id ='".$this->session->userdata('network_id')."'");
|
||||
array_push($insuranceSubcriptions, $monthQuery->num_rows());
|
||||
}
|
||||
|
||||
$careRequests = [];
|
||||
|
||||
// $date = date("Y");
|
||||
//
|
||||
// $demandes_data[] = '';
|
||||
// $demandes_data =array();
|
||||
// for ($i = 1; $i <= 12; $i++) {
|
||||
// $demandes_query_mounth = $this->db->query("SELECT demande_id FROM info_demandeCredits
|
||||
// WHERE MONTH(dateAjout) = '".$months[$i-1]."' AND YEAR(dateAjout) = ".$years[$i-1]."
|
||||
// AND codeParrain='".$this->session->userdata('member_code')."'"
|
||||
// );
|
||||
// $demandes_data[] = $demandes_query_mounth->num_rows();
|
||||
// }
|
||||
//
|
||||
// $demandes_query = $listdem;
|
||||
//
|
||||
// if($demandes_query!=false){
|
||||
// $demandes=$demandes_query->num_rows();
|
||||
// // Count networks for simple users
|
||||
// $array_simple = array();
|
||||
// $num = 0;
|
||||
// if ($demandes > 0) {
|
||||
// foreach($demandes_query->result() as $row) {
|
||||
// $num++;
|
||||
// $array_simple[] = $row->codeMembre;
|
||||
// }
|
||||
//
|
||||
// $vals_simple = array_count_values($array_simple);
|
||||
// //echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>';
|
||||
// //print_r($vals_simple);
|
||||
// $pieChart2 = array();
|
||||
// foreach(array_keys($vals_simple) as $paramName2) {
|
||||
// $color2 = dechex(rand(0x000000, 0xFFFFFF));
|
||||
// $trash2 = array("value" => $vals_simple[$paramName2],
|
||||
// "color" => "#".$color2,
|
||||
// "highlight" => "#".$color2,
|
||||
// "label" => $paramName2);
|
||||
//
|
||||
// $pieChart2[]= $trash2;
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
$pieChart2 = array();
|
||||
// }
|
||||
|
||||
/**
|
||||
** Geolocated User Treatment
|
||||
**/
|
||||
// $users_geolocated_query = $list_geolocated_users;
|
||||
// // Geolocated Users by month replace 2016 by NOW()
|
||||
// $users_geolocated_data[] = '';
|
||||
// $users_geolocated_data =array();
|
||||
// for ($i = 1; $i <= 12; $i++) {
|
||||
// $users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos
|
||||
// WHERE MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]."
|
||||
// AND category='geolocated' AND code_parrain='".$this->session->userdata('member_code')."'");
|
||||
// $users_geolocated_data[] = $users_geolocated_query_january->num_rows();
|
||||
// }
|
||||
//
|
||||
// if($users_geolocated_query!=false){
|
||||
//
|
||||
// $users_geolocated=$users_geolocated_query->num_rows();
|
||||
// //$users_geolocated_query = json_encode($users_geolocated_query->result());
|
||||
// // Counts network for geolocated users
|
||||
// $array_geolocated = array();
|
||||
// $num = 0;
|
||||
// if ($users_geolocated > 0) {
|
||||
// foreach($users_geolocated_query->result() as $row) {
|
||||
// $num++;
|
||||
// $array_geolocated[] = date("M", strtotime($row->date_created));
|
||||
// }
|
||||
// $vals_geolocated = array_count_values($array_geolocated);
|
||||
// //echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>';
|
||||
// //print_r($vals_geolocated);
|
||||
// $pieChart = array();
|
||||
// foreach(array_keys($vals_geolocated) as $paramName) {
|
||||
// $color = dechex(rand(0x000000, 0xFFFFFF));
|
||||
// $trash = array("value" => $vals_geolocated[$paramName],
|
||||
// "color" => "#".$color,
|
||||
// "highlight" => "#".$color,
|
||||
// "label" => $paramName);
|
||||
//
|
||||
// $pieChart[]= $trash;
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// $pieChart = array();
|
||||
// }
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?= $this->lang->line('account_opening_agent'); ?>
|
||||
<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_opening_account_requests'); ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-checkmark-circled"></i>
|
||||
</div>
|
||||
<a href="<?= base_url('OpeningAccountAgent/requests?history=insurance-subscriptions') ?>" class="small-box-footer"><?= $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
||||
</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_under_validation ?? 0;?></h3>
|
||||
|
||||
<p><?= $this->lang->line('not_treated_opening_account_requests'); ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-alert-circled"></i>
|
||||
</div>
|
||||
<a href="<?= base_url('OpeningAccountAgent/requests?history=insurance-subscriptions') ?>" class="small-box-footer"><?= $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</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_opening_account_requests"); ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-close-circled"></i>
|
||||
</div>
|
||||
<a href="<?= base_url('OpeningAccountAgent/requests?history=insurance-subscriptions') ?>" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?= $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</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('customer_account_opening_requests'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart">
|
||||
<canvas id="barChart" style="height:230px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-xs-6">-->
|
||||
|
||||
<!-- <div class="box box-danger">-->
|
||||
<!-- <div class="box-header with-border">-->
|
||||
<!-- <h3 class="box-title">--><?php //echo $this->lang->line('subscription_requests'); ?><!--</h3>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-body" id="chartAd">-->
|
||||
<!-- <canvas id="pieChart" style="height:250px"></canvas>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</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 areaChartData = {
|
||||
labels : <?= json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label : "<?= $this->lang->line('subscriptions') ?>",
|
||||
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($insuranceSubcriptions) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<script src="<?= base_url('dist/js/custom.js') ?>"></script>
|
|
@ -0,0 +1,130 @@
|
|||
<?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('validating_agent');?></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('OpeningAccountAgent') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?= $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="<?php if($active=="subscription_requests"){echo "active ";} ?>">
|
||||
<a href="<?= base_url('OpeningAccountAgent/requests?history=customer_account_opening_requests') ?>">
|
||||
<i class="fa fa-copy"></i>
|
||||
<span><?= $this->lang->line('customer_account_opening_requests'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,203 @@
|
|||
<!-- 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('customer_opening_account_requests_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_request_list') ?></h3>
|
||||
<div class="box-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="overflow-x:auto;">
|
||||
|
||||
<table id="requests" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='center'><?=$this->lang->line('request_id')?></th>
|
||||
<th>Type</th>
|
||||
<th><?= $this->lang->line('Nom') ?></th>
|
||||
<th><?= $this->lang->line('Nom') ?></th>
|
||||
<th><?= $this->lang->line('Contact') ?></th>
|
||||
<th><?= $this->lang->line('state') ?></th>
|
||||
<th>Date </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 = $('#requests').DataTable({
|
||||
// Processing indicator
|
||||
"processing": true,
|
||||
"language": {
|
||||
"processing": "<?= $this->lang->line('loading') ?>",
|
||||
"emptyTable" : "<?= $this->lang->line('no_demand') ?>"
|
||||
},
|
||||
// DataTables server-side processing mode
|
||||
"serverSide": true,
|
||||
// Initial no order.
|
||||
"order": [],
|
||||
// Load data from an Ajax source
|
||||
"ajax": {
|
||||
"url": "<?= base_url('pagination/CustomerAccountOpeningRequests/getLists'); ?>",
|
||||
"data":{
|
||||
"startDate" : "<?= $startDate?>",
|
||||
"endDate" : "<?= $endDate?>",
|
||||
"id_network" : "<?= $id_network ?? null ?>",
|
||||
"currentURL" : "<?= current_url()?>"
|
||||
},
|
||||
"type": "POST"
|
||||
},
|
||||
"aaSorting": [[6, "desc"]],
|
||||
"columnDefs": [{
|
||||
"targets": [6],
|
||||
// "orderable": false,
|
||||
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
|
||||
}],
|
||||
dom: 'Bfrtip',
|
||||
"buttons": [
|
||||
'pageLength',
|
||||
{
|
||||
"extend": 'excelHtml5',
|
||||
title: "<?= $this->lang->line('customer_opening_account_requests_history') ?>",
|
||||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: "<?= $this->lang->line('customer_opening_account_requests_history') ?>",
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LEGAL',
|
||||
title: "<?= $this->lang->line('customer_opening_account_requests_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";
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -0,0 +1,424 @@
|
|||
<link rel="stylesheet"
|
||||
href="<?= base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= base_url('bower_components/toastr/toastr.css') ?>">
|
||||
<link rel="stylesheet" href="<?= base_url('bower_components/google-material-icons/google-material-icons.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.css') ?>">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?= $this->lang->line('customers_accounts_configuration')?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
use Brick\Money\Context\AutoContext;
|
||||
use Brick\Money\Money;
|
||||
$context = new AutoContext();
|
||||
?>
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line( 'customer_account_types') ?></h3>
|
||||
</div>
|
||||
<div class="box-body" style="overflow-x:auto;">
|
||||
<table id="customer_account_types" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='center'>#</th>
|
||||
<th><?= $this->lang->line('Nom'); ?></th>
|
||||
<th>Description</th>
|
||||
<th>Parent</th>
|
||||
<th><?= $this->lang->line('opening_amount'); ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($types ?? [] as $i => $row) { ?>
|
||||
<tr>
|
||||
<td><?=$i+1?></td>
|
||||
<td><?=$row->name?></td>
|
||||
<td><?=$row->description?></td>
|
||||
<td><?=$row->parent?></td>
|
||||
<td><?= empty($row->opening_amount) ? '' : Money::of(round($row->opening_amount, 2), $currency_code ?? 'XAF', $context)->formatTo('fr_FR')?></td>
|
||||
<td>
|
||||
<button class="btn btn-success edit" data-id="<?=$row->id?>" data-name="<?=$row->name?>" data-description="<?=$row->description?>"
|
||||
data-parent_id="<?=$row->parent_id?>" data-opening_amount="<?=$row->opening_amount?>">
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
<button data-toggle="modal" class="btn btn-danger delete-doc" data-id="<?=$row->id?>" >
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('add_customer_account_type'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="create-form" class="bottom-75 center-block">
|
||||
<div class="form-group">
|
||||
<label for="name"><?= $this->lang->line('Nom'); ?></label>
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea class="form-control input-lg" name="description" id="description"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="opening_amount"><?= $this->lang->line('opening_amount'); ?></label>
|
||||
<input type="number" value="" class="form-control input-lg" name="opening_amount" id="opening_amount">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Parent</label>
|
||||
<select class="form-control input-lg" name="parent_id" >
|
||||
<option value="0"> <?=$this->lang->line('no_parent')?> </option>
|
||||
<?php foreach ($types ?? [] as $value) { ?>
|
||||
<option value="<?=$value->id?>"> <?=$value->name?> </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit"
|
||||
value="<?= $this->lang->line('save'); ?>"
|
||||
class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="editModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?= $this->lang->line('Mettre à jour des informations'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="update-form" method="post" class="bottom-75 center-block">
|
||||
<div class="form-group">
|
||||
<label for="name_u"><?= $this->lang->line('Nom'); ?></label>
|
||||
<input type="text" class="form-control input-lg" name="name" id="name_u" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description_u">Description</label>
|
||||
<textarea class="form-control input-lg" name="description" id="description_u"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="opening_amount_u"><?= $this->lang->line('opening_amount'); ?></label>
|
||||
<input type="number" value="" class="form-control input-lg" name="opening_amount" id="opening_amount_u">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Parent</label>
|
||||
<select class="form-control input-lg" name="parent_id" ></select>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('documents_list') ; ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new5"><i class="fa fa-plus"></i> <?= $this->lang->line('add_document') ; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="documents_list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->lang->line('Nom') ; ?> </th>
|
||||
<th>Description</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="btn-update" type="submit"
|
||||
value="<?= $this->lang->line('save'); ?>" class="btn btn-primary">
|
||||
<button type="button" class="btn btn-default pull-right"
|
||||
data-dismiss="modal"><?= $this->lang->line('Fermer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('include/delete_modal',['title' => $this->lang->line('delete_customer_account_type')]) ?>
|
||||
<?php $this->load->view('include/loader') ?>
|
||||
</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>
|
||||
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||
<script src="<?= base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
// Taxes
|
||||
const actions5 = '<a class="add add5" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit5" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete5" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
// Append table with add row form on add new button click
|
||||
$(".new5").click(function(){
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#documents_list tbody tr:last-child").index();
|
||||
var row = "<tr> <td><input type='text' required class='form-control' name='name'></td> " +
|
||||
"<td><input type='text' class='form-control' name='description'></td>" +
|
||||
"<td>" + actions5 + "</td>" +
|
||||
"</tr>";
|
||||
$("#documents_list").append(row);
|
||||
$("#documents_list tbody tr").eq(index + 1).find(".add, .edit").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add5", function(){
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input');
|
||||
var select = $(this).parents("tr").find('select');
|
||||
input.each(function(){
|
||||
if(!$(this)[0].checkValidity()){
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else{
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if(!empty){
|
||||
select.each(function(){
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
input.each(function(){
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add, .edit").toggle();
|
||||
$(".new5").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit5", function(){
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function(index){
|
||||
if(index == 0)
|
||||
$(this).html('<input type="text" required class="form-control" value="' + $(this).text() + '">');
|
||||
if(index == 1)
|
||||
$(this).html('<input type="text" required class="form-control" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add, .edit").toggle();
|
||||
$(".new5").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete5", function(){
|
||||
$(this).parents("tr").remove();
|
||||
$(".new5").removeAttr("disabled");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.closeMethod = 'fadeOut';
|
||||
toastr.options.closeDuration = 5000;
|
||||
toastr.options.closeEasing = 'swing';
|
||||
|
||||
$(function () {
|
||||
$('#customer_account_types').DataTable({
|
||||
"language": {
|
||||
"processing": "<?= $this->lang->line('loading') ?>",
|
||||
"emptyTable" : "<?= $this->lang->line('no_customer_account_type') ?>"
|
||||
},
|
||||
dom: 'Bfrtip',
|
||||
});
|
||||
})
|
||||
|
||||
var networkId = <?= $network_id ?>;
|
||||
var selectedId = null
|
||||
var types = <?= json_encode($types ?? []) ?>;
|
||||
|
||||
$(document).on("click", ".edit", function () {
|
||||
selectedId = $(this).data('id');
|
||||
$("#update-form input[name='name']").val($(this).data('name'));
|
||||
$("#update-form textarea[name='description']").val($(this).data('description'));
|
||||
$("#update-form input[name='opening_amount']").val($(this).data('opening_amount'));
|
||||
|
||||
$("#update-form select[name='parent_id']").empty().append("<option value='0'>"+ "<?this->lang->line('no_parent')?>" + "</option>");
|
||||
$.each(types, function (j, it) {
|
||||
$("#update-form select[name='parent_id']").append(`<option value='${it.id}'>${it.name}</option>`);
|
||||
});
|
||||
$(`#update-form select[name='parent_id'] option[value='${selectedId}']`).remove();
|
||||
$("#update-form select[name='parent_id']").val($(this).data('parent_id'));
|
||||
|
||||
// Load documents
|
||||
$("#documents_list tbody").children().remove();
|
||||
$.each(types, function (j, it) {
|
||||
if(it.id == selectedId){
|
||||
$.each(types[j].documents, function (j, doc) {
|
||||
$('#documents_list').append('<tr>' +
|
||||
'<td>' + (doc.name || '') + '</td>' +
|
||||
'<td>' + (doc.description || '') + '</td>' +
|
||||
'<td>' + actions5 + '</td>' +
|
||||
'</tr>')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#editModal').modal('show');
|
||||
|
||||
});
|
||||
|
||||
$(document).on("click", ".delete-doc", function () {
|
||||
selectedId = $(this).data('id');
|
||||
$('#delete-modal').modal('show');
|
||||
});
|
||||
|
||||
$("#update-form").submit(function () {
|
||||
// Paliers
|
||||
var documents = [];
|
||||
|
||||
$('#documents_list tr').has('td').each(function() {
|
||||
var arrayItem = {};
|
||||
$('td', $(this)).each(function(index, item) {
|
||||
if(index < 2){
|
||||
arrayItem[index] = $(item).html();
|
||||
}
|
||||
});
|
||||
documents.push(arrayItem);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url('Hyperviseur_dash/storeCustomerAccountType')?>',
|
||||
type: 'post',
|
||||
data: {
|
||||
id: selectedId,
|
||||
network_id : networkId,
|
||||
name: $("input[name=name]",this).val(),
|
||||
description: $("textarea[name=description]",this).val(),
|
||||
opening_amount: $("input[name=opening_amount]",this).val(),
|
||||
parent_id : $("select[name=parent_id]",this).val(),
|
||||
documents: documents
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if(data.code === 200){
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: "<?= $this->lang->line('customer_account_type_updated')?>",
|
||||
text:"<?= $this->lang->line('informations_updated')?>",
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
toastr.error(data.message , "<?= $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')?>");
|
||||
}
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$("#create-form").submit(function (event) {
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url('Hyperviseur_dash/storeCustomerAccountType')?>',
|
||||
type: 'post',
|
||||
data: {
|
||||
network_id : networkId,
|
||||
name: $("input[name=name]",this).val(),
|
||||
description: $("textarea[name=description]",this).val(),
|
||||
opening_amount: $("input[name=opening_amount]",this).val(),
|
||||
parent_id : $("select[name=parent_id]",this).val()
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if(data.code === 200){
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: "<?= $this->lang->line('customer_account_type_created')?>",
|
||||
text:"<?= $this->lang->line('informations_updated')?>",
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
toastr.error(data.message , "<?= $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')?>");
|
||||
}
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
$("#delete-btn").click(function () {
|
||||
$.ajax({
|
||||
url: '<?= base_url('Hyperviseur_dash/deleteCustomerAccountType')?>',
|
||||
type: 'post',
|
||||
data: {id: selectedId},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if(data.code === 200){
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: "<?= $this->lang->line('customer_account_type_deleted')?>",
|
||||
text:"<?= $this->lang->line('informations_updated')?>",
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
toastr.error(data.message , "<?= $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')?>");
|
||||
}
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
</script>
|
|
@ -254,23 +254,29 @@ $context = new \Brick\Money\Context\AutoContext();
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="col-lg-3">
|
||||
<div class="margin">
|
||||
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#rechargeAccount"><?= $this->lang->line('recharge_hypervisor_account') ?> </button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="col-lg-3">
|
||||
<div class="margin">
|
||||
<a class="btn btn-info" href="<?= current_url().($network_id ? '?config=taxes' : '')?>"
|
||||
style="width: 100%"><?= $this->lang->line('edit_tax') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="col-lg-3">
|
||||
<div class="margin">
|
||||
<a href="<?= current_url().($network_id ? '?config=paying_networks' : '')?>" class="btn btn-success"
|
||||
style="width: 100%"><?= $this->lang->line('edit_paying_and_transmitting_networks') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="margin">
|
||||
<a href="<?= current_url().($network_id ? '?config=customers_accounts' : '')?>" class="btn btn-primary"
|
||||
style="width: 100%"><?= $this->lang->line('customers_accounts_configuration') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
|
|
|
@ -211,6 +211,14 @@
|
|||
<span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if ($active == "wallet_validating_account_opening_agents") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<a href="<?= base_url('Hyperviseur_dash/validating_agents/account_opening_agents') ?>">
|
||||
<i class="fa fa-users"></i>
|
||||
<span><?= $this->lang->line('account_opening_agents'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($hasWallet->first_row()->type == 'ilink_sante') { ?>
|
||||
<li class="<?php if ($active == "wallet_drugs_and_devices") {
|
||||
echo "active";
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title1 ='manage_controllers_doctors';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title1 ='manage_account_opening_agents';
|
||||
break;
|
||||
default:
|
||||
$title1 = 'manage_validating_agents';
|
||||
}
|
||||
|
@ -34,6 +37,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title2 ='controllers_doctors';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title2 ='account_opening_agents';
|
||||
break;
|
||||
default:
|
||||
$title2 = 'validating_agents';
|
||||
}
|
||||
|
@ -99,6 +105,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title3 ='add_controller_doctor';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title3 ='add_account_opening_agent';
|
||||
break;
|
||||
default:
|
||||
$title3 = 'add_validating_agent';
|
||||
}
|
||||
|
@ -205,7 +214,7 @@
|
|||
$('#agents').DataTable();
|
||||
})
|
||||
|
||||
var idConfig = <?= $config_id ?>;
|
||||
var networkId = "<?=$network_id ?>"
|
||||
var selectedId = null
|
||||
|
||||
$(document).on("click", ".edit", function () {
|
||||
|
@ -231,6 +240,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title4 ='controller_doctor_updated';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title4 ='account_opening_agent_updated';
|
||||
break;
|
||||
default:
|
||||
$title4 = 'validating_agent_updated';
|
||||
}
|
||||
|
@ -279,6 +291,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title5 ='controller_doctor_created';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title5 ='account_opening_agent_created';
|
||||
break;
|
||||
default:
|
||||
$title5 = 'validating_agent_created';
|
||||
}
|
||||
|
@ -289,7 +304,7 @@
|
|||
url: '<?= base_url('NanoHealthController/createValidatingAgent')?>',
|
||||
type: 'post',
|
||||
data: {
|
||||
nh_network_config_id : idConfig,
|
||||
network_id : networkId,
|
||||
lastname: $("input[name=lastname]",this).val(),
|
||||
firstname: $("input[name=firstname]",this).val(),
|
||||
email: $("input[name=email]",this).val(),
|
||||
|
@ -328,6 +343,9 @@
|
|||
case 'CONTROLLER':
|
||||
$title6 ='controller_doctor_deleted';
|
||||
break;
|
||||
case 'OPENING_ACCOUNT_AGENT':
|
||||
$title6 ='account_opening_agent_deleted';
|
||||
break;
|
||||
default:
|
||||
$title6 = 'validating_agent_deleted';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue