@ -3,7 +3,7 @@
< head >
< head >
< meta charset = " UTF-8 " >
< meta charset = " UTF-8 " >
< meta name = " viewport " content = " width=device-width, initial-scale=1.0 " >
< meta name = " viewport " content = " width=device-width, initial-scale=1.0 " >
< title > Agency | Banking Management </ title >
< title > <? = $this -> lang -> line ( 'page_title_agency' ); ?> </title>
<!-- CSS DataTables & Plugins -->
<!-- CSS DataTables & Plugins -->
< link rel = " stylesheet " href = " https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap.min.css " >
< link rel = " stylesheet " href = " https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap.min.css " >
@ -51,7 +51,7 @@
< th class = " text-center " >< ? = $this -> lang -> line ( 'lastname' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'lastname' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'firstname' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'firstname' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'account' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'account' ); ?> </th>
< th class = " text-center " > I BAN </ th >
< th class = " text-center " > I ban </ th >
< th class = " text-center " > Type </ th >
< th class = " text-center " > Type </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'nationality' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'nationality' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'birth_date' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'birth_date' ); ?> </th>
@ -90,7 +90,7 @@
class = " open-review-modal btn btn-info btn-sm "
class = " open-review-modal btn btn-info btn-sm "
data - toggle = " modal "
data - toggle = " modal "
data - target = " #reviewModal "
data - target = " #reviewModal "
title = " Vérifier "
title = " <?= $this->lang ->line('btn_verify'); ?> "
data - id = " <?= $a->id ?> "
data - id = " <?= $a->id ?> "
data - lastname = " <?= $a->lastname ?> "
data - lastname = " <?= $a->lastname ?> "
data - firstname = " <?= $a->firstname ?> "
data - firstname = " <?= $a->firstname ?> "
@ -126,7 +126,7 @@
data - toggle = " modal "
data - toggle = " modal "
data - target = " #editModal "
data - target = " #editModal "
class = " open-edit-modal btn btn-primary btn-sm "
class = " open-edit-modal btn btn-primary btn-sm "
title = " <?= $this->lang ->line('btn_edit'); ?> "
data - id = " <?= $a->id ?> "
data - id = " <?= $a->id ?> "
data - lastname = " <?= $a->lastname ?> "
data - lastname = " <?= $a->lastname ?> "
data - firstname = " <?= $a->firstname ?> "
data - firstname = " <?= $a->firstname ?> "
@ -155,7 +155,7 @@
< i class = 'fa fa-edit' ></ i >
< i class = 'fa fa-edit' ></ i >
</ button >
</ button >
< button class = " delete-account btn btn-danger btn-sm " onclick = " deleteRequest(<?= $a->id ?>) " >
< button class = " delete-account btn btn-danger btn-sm " onclick = " deleteRequest(<?= $a->id ?>) " title = " <?= $this->lang ->line('btn_delete'); ?> " >
< i class = 'fa fa-trash' ></ i >
< i class = 'fa fa-trash' ></ i >
</ button >
</ button >
</ td >
</ td >
@ -172,7 +172,7 @@
======================================================= -->
======================================================= -->
< div class = " box box-info " style = " margin-top: 30px; " >
< div class = " box box-info " style = " margin-top: 30px; " >
< div class = " box-header with-border " >
< div class = " box-header with-border " >
< h3 class = " box-title " > Demandes de Rattachement ( Comptes Bancaires ) </ h3 >
< h3 class = " box-title " > <? = $this -> lang -> line ( 'title_link_requests' ); ?> </h3>
< div class = " box-tools pull-right " >
< div class = " box-tools pull-right " >
< button type = " button " class = " btn btn-box-tool " data - widget = " collapse " >< i class = " fa fa-minus " ></ i ></ button >
< button type = " button " class = " btn btn-box-tool " data - widget = " collapse " >< i class = " fa fa-minus " ></ i ></ button >
</ div >
</ div >
@ -183,13 +183,12 @@
< thead >
< thead >
< tr >
< tr >
< th class = " text-center " > ID </ th >
< th class = " text-center " > ID </ th >
< th class = " text-center " > Nom complet </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'full_name' ); ?> </th>
< th class = " text-center " > User Code </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'user_code' ); ?> </th>
< th class = " text-center " > Client </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'client' ); ?> </th>
< th class = " text-center " > Téléphone </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'phone_number' ); ?> </th>
< th class = " text-center " > Banque </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'bank_name' ); ?> </th>
< th class = " text-center " > IBAN / Compte </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'iban_account' ); ?> </th>
< th class = " text-center " > Code client </ th >
< th class = " text-center " >< ? = $this -> lang -> line ( 'status' ); ?> </th>
< th class = " text-center " >< ? = $this -> lang -> line ( 'status' ); ?> </th>
< th class = " text-center " > Actions </ th >
< th class = " text-center " > Actions </ th >
</ tr >
</ tr >
@ -217,7 +216,6 @@
< small >< ? = substr ( $l -> bank_address , 0 , 20 ) ?> ...</small>
< small >< ? = substr ( $l -> bank_address , 0 , 20 ) ?> ...</small>
</ td >
</ td >
< td class = " text-center " >< ? = $l -> iban ?> </td>
< td class = " text-center " >< ? = $l -> iban ?> </td>
< td class = " text-center " >< ? = ! empty ( $l -> code_client ) ? $l -> code_client : '-' ; ?> </td>
< td class = " text-center " >
< td class = " text-center " >
< ? = getStatusBadge ( $statusStr , $this -> lang ) ?>
< ? = getStatusBadge ( $statusStr , $this -> lang ) ?>
</ td >
</ td >
@ -226,7 +224,7 @@
class = " open-link-review-modal btn btn-info btn-sm "
class = " open-link-review-modal btn btn-info btn-sm "
data - toggle = " modal "
data - toggle = " modal "
data - target = " #reviewLinkModal "
data - target = " #reviewLinkModal "
title = " Vérifier le rattachement "
title = " <?= $this->lang ->line('btn_verify_link'); ?> "
data - id = " <?= $l->id_transaction ?> "
data - id = " <?= $l->id_transaction ?> "
data - user_code = " <?= $l->user_code ?> "
data - user_code = " <?= $l->user_code ?> "
data - fullname = " <?= $l->lastname . ' ' . $l->firstname ?> "
data - fullname = " <?= $l->lastname . ' ' . $l->firstname ?> "
@ -235,7 +233,6 @@
data - bank_name = " <?= $l->bank_name ?> "
data - bank_name = " <?= $l->bank_name ?> "
data - bank_address = " <?= $l->bank_address ?> "
data - bank_address = " <?= $l->bank_address ?> "
data - iban = " <?= $l->iban ?> "
data - iban = " <?= $l->iban ?> "
data - code_client = " <?= $l->code_client ?> "
data - status = " <?= $statusStr ?> "
data - status = " <?= $statusStr ?> "
data - created_at = " <?= $l->created_at ?> "
data - created_at = " <?= $l->created_at ?> "
>
>
@ -246,10 +243,9 @@
class = " open-edit-link-modal btn btn-primary btn-sm "
class = " open-edit-link-modal btn btn-primary btn-sm "
data - toggle = " modal "
data - toggle = " modal "
data - target = " #editLinkModal "
data - target = " #editLinkModal "
title = " Modifier "
title = " <?= $this->lang ->line('btn_edit'); ?> "
data - id = " <?= $l->id_transaction ?> "
data - id = " <?= $l->id_transaction ?> "
data - iban = " <?= $l->iban ?> "
data - iban = " <?= $l->iban ?> "
data - code_client = " <?= $l->code_client ?> "
data - bank_name = " <?= $l->bank_name ?> "
data - bank_name = " <?= $l->bank_name ?> "
data - status = " <?= $l->is_verified ?> "
data - status = " <?= $l->is_verified ?> "
>
>
@ -257,7 +253,7 @@
</ button >
</ button >
<!-- SUPPRIMER -->
<!-- SUPPRIMER -->
< button class = " btn btn-danger btn-sm btn-delete-link " data - id = " <?= $l->id_transaction ?> " title = " Supprimer " >
< button class = " btn btn-danger btn-sm btn-delete-link " data - id = " <?= $l->id_transaction ?> " title = " <?= $this->lang ->line('btn_delete'); ?> " >
< i class = 'fa fa-trash' ></ i >
< i class = 'fa fa-trash' ></ i >
</ button >
</ button >
</ td >
</ td >
@ -278,40 +274,35 @@
< div class = " modal-content " >
< div class = " modal-content " >
< div class = " modal-header " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< h4 class = " modal-title " > Modifier la demande de rattachement </ h4 >
< h4 class = " modal-title " > <? = $this -> lang -> line ( 'modal_title_edit_link' ); ?> </h4>
</ div >
</ div >
< div class = " modal-body " >
< div class = " modal-body " >
< form id = " update-link-form " >
< form id = " update-link-form " >
< input type = " hidden " name = " id_transaction " id = " edit_link_id " >
< input type = " hidden " name = " id_transaction " id = " edit_link_id " >
< div class = " form-group " >
< div class = " form-group " >
< label > Nom de la Banque </ label >
< label > <? = $this -> lang -> line ( 'bank_name' ); ?> </label>
< input type = " text " name = " bank_name " id = " edit_link_bank_name " class = " form-control " readonly >
< input type = " text " name = " bank_name " id = " edit_link_bank_name " class = " form-control " readonly >
</ div >
</ div >
< div class = " form-group " >
< div class = " form-group " >
< label > IBAN / Numéro de compte </ label >
< label > <? = $this -> lang -> line ( 'iban_account_number' ); ?> </label>
< input type = " text " name = " iban " id = " edit_link_iban " class = " form-control " >
< input type = " text " name = " iban " id = " edit_link_iban " class = " form-control " >
</ div >
</ div >
< div class = " form-group " >
< div class = " form-group " >
< label > Code Client </ label >
< label >< ? = $this -> lang -> line ( 'status' ); ?> </label>
< input type = " text " name = " code_client " id = " edit_link_code_client " class = " form-control " readonly >
</ div >
< div class = " form-group " >
< label > Statut </ label >
< select name = " is_verified " id = " edit_link_status " class = " form-control " >
< select name = " is_verified " id = " edit_link_status " class = " form-control " >
< option value = " 0 " > En attente </ option >
< option value = " 0 " >< ? = $this -> lang -> line ( 'status_pending' ); ?> </option>
< option value = " 1 " > Activé </ option >
< option value = " 1 " >< ? = $this -> lang -> line ( 'status_active' ); ?> </option>
< option value = " 2 " > Rejeté </ option >
< option value = " 2 " >< ? = $this -> lang -> line ( 'status_rejected' ); ?> </option>
</ select >
</ select >
</ div >
</ div >
</ form >
</ form >
</ div >
</ div >
< div class = " modal-footer " >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > Annuler </ button >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_cancel' ); ?> </button>
< button type = " button " class = " btn btn-primary " id = " btn-save-edit-link " > Enregistrer </ button >
< button type = " button " class = " btn btn-primary " id = " btn-save-edit-link " > <? = $this -> lang -> line ( 'btn_save' ); ?> </button>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
@ -323,15 +314,15 @@
< div class = " modal-content " >
< div class = " modal-content " >
< div class = " modal-header " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< h4 class = " modal-title " > Confirmer la suppression </ h4 >
< h4 class = " modal-title " > <? = $this -> lang -> line ( 'modal_title_confirm_delete' ); ?> </h4>
</ div >
</ div >
< div class = " modal-body " >
< div class = " modal-body " >
< p > Voulez - vous vraiment supprimer cette demande de rattachement ? </ p >
< p > <? = $this -> lang -> line ( 'msg_confirm_delete_link' ); ?> </p>
< input type = " hidden " id = " delete_link_id " >
< input type = " hidden " id = " delete_link_id " >
</ div >
</ div >
< div class = " modal-footer " >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > Non </ button >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_no' ); ?> </button>
< button type = " button " id = " confirmDeleteLink " class = " btn btn-danger " > Oui , supprimer </ button >
< button type = " button " id = " confirmDeleteLink " class = " btn btn-danger " > <? = $this -> lang -> line ( 'btn_yes_delete' ); ?> </button>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
@ -345,7 +336,7 @@
< div class = " modal-content " >
< div class = " modal-content " >
< div class = " modal-header " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< h4 class = " modal-title text-center " > Vérification de la demande d ' ouverture de compte </ h4 >
< h4 class = " modal-title text-center " > <? = $this -> lang -> line ( 'modal_title_review_account' ); ?> </h4>
</ div >
</ div >
< div class = " modal-body " >
< div class = " modal-body " >
< input type = " hidden " id = " review_id " >
< input type = " hidden " id = " review_id " >
@ -353,63 +344,63 @@
< input type = " hidden " id = " hidden_doc_front " >
< input type = " hidden " id = " hidden_doc_front " >
< input type = " hidden " id = " hidden_doc_back " >
< input type = " hidden " id = " hidden_doc_back " >
< div class = " row " >
< div class = " row " >
< div class = " col-md-12 " >< h5 class = " section-header " > Informations Personnelles </ h5 ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " > <? = $this -> lang -> line ( 'section_personal_info' ); ?> </h5></div>
< div class = " col-md-4 " >< span class = " view-label " > Nom :</ span > < span class = " view-value " id = " view_lastname " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'lastname' ); ?> :</span> <span class="view-value" id="view_lastname"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Prénom :</ span > < span class = " view-value " id = " view_firstname " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'firstname' ); ?> :</span> <span class="view-value" id="view_firstname"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Date Nais . :</ span > < span class = " view-value " id = " view_birth_date " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'birth_date' ); ?> :</span> <span class="view-value" id="view_birth_date"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Nationalité :</ span > < span class = " view-value " id = " view_nationality " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'nationality' ); ?> :</span> <span class="view-value" id="view_nationality"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Matrimonial :</ span > < span class = " view-value " id = " view_marital_status " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'marital_status' ); ?> :</span> <span class="view-value" id="view_marital_status"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Nom du conjoint :</ span > < span class = " view-value " id = " view_spouse_name " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'spouse_name' ); ?> :</span> <span class="view-value" id="view_spouse_name"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Ville de Naissance :</ span > < span class = " view-value " id = " view_birth_city " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'birth_city' ); ?> :</span> <span class="view-value" id="view_birth_city"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Numero de telephone :</ span > < span class = " view-value " id = " view_phone_number " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'phone_number' ); ?> :</span> <span class="view-value" id="view_phone_number"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > NIU :</ span > < span class = " view-value " id = " view_niu " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'niu' ); ?> :</span> <span class="view-value" id="view_niu"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Piece d ' identité :</ span > < span class = " view-value " id = " view_identification_number " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'id_document' ); ?> :</span> <span class="view-value" id="view_identification_number"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Pays de Naissance :</ span > < span class = " view-value " id = " view_birth_country " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'birth_country' ); ?> :</span> <span class="view-value" id="view_birth_country"></span></div>
< div class = " col-md-12 " style = " margin-top: 20px; " >
< div class = " col-md-12 " style = " margin-top: 20px; " >
< h5 class = " section-header " > Pièces Justificatives ( Identité ) </ h5 >
< h5 class = " section-header " > <? = $this -> lang -> line ( 'section_identity_docs' ); ?> </h5>
</ div >
</ div >
< div class = " col-md-6 " >
< div class = " col-md-6 " >
< span class = " view-label " > Recto :</ span >
< span class = " view-label " > <? = $this -> lang -> line ( 'doc_recto' ); ?> :</span>
< div id = " container_doc_front " style = " margin-top:5px; " >
< div id = " container_doc_front " style = " margin-top:5px; " >
</ div >
</ div >
</ div >
</ div >
< div class = " col-md-6 " >
< div class = " col-md-6 " >
< span class = " view-label " > Verso :</ span >
< span class = " view-label " > <? = $this -> lang -> line ( 'doc_verso' ); ?> :</span>
< div id = " container_doc_back " style = " margin-top:5px; " >
< div id = " container_doc_back " style = " margin-top:5px; " >
</ div >
</ div >
</ div >
</ div >
< div class = " col-md-12 " >< h5 class = " section-header " > Détails du Compte </ h5 ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " > <? = $this -> lang -> line ( 'section_account_details' ); ?> </h5></div>
< div class = " col-md-4 " >< span class = " view-label " > Numéro :</ span > < span class = " view-value " id = " view_account_number " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'account_number' ); ?> :</span> <span class="view-value" id="view_account_number"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Code du client :</ span > < span class = " view-value " id = " view_customer_number " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'client_code' ); ?> :</span> <span class="view-value" id="view_customer_number"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Type :</ span > < span class = " view-value " id = " view_type " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > Type :</ span > < span class = " view-value " id = " view_type " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > Solde :</ span > < span class = " view-value " id = " view_balance " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'balance' ); ?> :</span> <span class="view-value" id="view_balance"></span></div>
< div class = " col-md-6 " >< span class = " view-label " > I BAN :</ span > < span class = " view-value " id = " view_iban " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > I ban :</ span > < span class = " view-value " id = " view_iban " ></ span ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " > Informations Professionnelles </ h5 ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " > <? = $this -> lang -> line ( 'section_professional_info' ); ?> </h5></div>
< div class = " col-md-4 " >< span class = " view-label " > Profession :</ span > < span class = " view-value " id = " view_profession " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'profession' ); ?> :</span> <span class="view-value" id="view_profession"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Employeur :</ span > < span class = " view-value " id = " view_employer_name " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'employer_name' ); ?> :</span> <span class="view-value" id="view_employer_name"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Adresse employeur :</ span > < span class = " view-value " id = " view_employer_address " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'employer_address' ); ?> :</span> <span class="view-value" id="view_employer_address"></span></div>
< div class = " col-md-4 " >< span class = " view-label " > Ville employeur :</ span > < span class = " view-value " id = " view_employer_city " ></ span ></ div >
< div class = " col-md-4 " >< span class = " view-label " > <? = $this -> lang -> line ( 'employer_city' ); ?> :</span> <span class="view-value" id="view_employer_city"></span></div>
</ div >
</ div >
</ div >
</ div >
< div class = " modal-footer " style = " background-color: #f9f9f9; " >
< div class = " modal-footer " style = " background-color: #f9f9f9; " >
<!-- BLOC 1 : Boutons par défaut ( Fermer , Rejeter , Valider ) -->
<!-- BLOC 1 : Boutons par défaut ( Fermer , Rejeter , Valider ) -->
< div id = " default-actions " style = " display: flex; justify-content: space-between; " >
< div id = " default-actions " style = " display: flex; justify-content: space-between; " >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > Fermer </ button >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_close' ); ?> </button>
< div >
< div >
< button type = " button " class = " btn btn-danger btn-lg " id = " btn-show-reject-input " >
< button type = " button " class = " btn btn-danger btn-lg " id = " btn-show-reject-input " >
< i class = " fa fa-times " ></ i > REJETER
< i class = " fa fa-times " ></ i > < ? = $this -> lang -> line ( 'btn_reject' ); ?>
</ button >
</ button >
< button type = " button " class = " btn btn-success btn-lg " id = " btn-validate-request " style = " margin-left: 10px; " >
< button type = " button " class = " btn btn-success btn-lg " id = " btn-validate-request " style = " margin-left: 10px; " >
< i class = " fa fa-check " ></ i > VALIDER
< i class = " fa fa-check " ></ i > < ? = $this -> lang -> line ( 'btn_validate' ); ?>
</ button >
</ button >
</ div >
</ div >
</ div >
</ div >
@ -417,13 +408,13 @@
<!-- BLOC 2 : Zone de saisie du motif ( Cachée par défaut ) -->
<!-- BLOC 2 : Zone de saisie du motif ( Cachée par défaut ) -->
< div id = " reject-area " style = " display: none; " >
< div id = " reject-area " style = " display: none; " >
< div class = " form-group text-left " >
< div class = " form-group text-left " >
< label class = " text-danger " > Motif du rejet * :</ label >
< label class = " text-danger " > <? = $this -> lang -> line ( 'reject_reason' ); ?> * :</label>
< textarea id = " reject_reason " class = " form-control " rows = " 3 " placeholder = " Veuillez expliquer la raison du rejet (Ex: Document illisible, ID incorrect...) " ></ textarea >
< textarea id = " reject_reason " class = " form-control " rows = " 3 " placeholder = " <?= $this->lang ->line('reject_reason_placeholder'); ?> " ></ textarea >
</ div >
</ div >
< div class = " text-right " >
< div class = " text-right " >
< button type = " button " class = " btn btn-default " id = " btn-cancel-reject " > Annuler </ button >
< button type = " button " class = " btn btn-default " id = " btn-cancel-reject " > <? = $this -> lang -> line ( 'btn_cancel' ); ?> </button>
< button type = " button " class = " btn btn-danger " id = " btn-confirm-reject " >
< button type = " button " class = " btn btn-danger " id = " btn-confirm-reject " >
Confirmer le rejet
< ? = $this -> lang -> line ( 'btn_confirm_reject' ); ?>
</ button >
</ button >
</ div >
</ div >
</ div >
</ div >
@ -441,32 +432,31 @@
< div class = " modal-content " >
< div class = " modal-content " >
< div class = " modal-header " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< h4 class = " modal-title text-center " > Vérification des informations de la demande de rattachment de compte </ h4 >
< h4 class = " modal-title text-center " > <? = $this -> lang -> line ( 'modal_title_review_link' ); ?> </h4>
</ div >
</ div >
< div class = " modal-body " >
< div class = " modal-body " >
< input type = " hidden " id = " link_id_transaction " >
< input type = " hidden " id = " link_id_transaction " >
< div class = " row " >
< div class = " row " >
< div class = " col-md-12 " >< h5 class = " section-header " > Information du Client </ h5 ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " > <? = $this -> lang -> line ( 'section_client_info' ); ?> </h5></div>
< div class = " col-md-6 " >< span class = " view-label " > Code wallet Utilisateur :</ span > < span class = " view-value " id = " link_user_code " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'wallet_user_code' ); ?> :</span> <span class="view-value" id="link_user_code"></span></div>
< div class = " col-md-6 " >< span class = " view-label " > Nom Complet :</ span > < span class = " view-value " id = " link_fullname " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'full_name' ); ?> :</span> <span class="view-value" id="link_fullname"></span></div>
< div class = " col-md-6 " >< span class = " view-label " > Email :</ span > < span class = " view-value " id = " link_email " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'email' ); ?> :</span> <span class="view-value" id="link_email"></span></div>
< div class = " col-md-6 " >< span class = " view-label " > Téléphone :</ span > < span class = " view-value " id = " link_phone " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'phone_number' ); ?> :</span> <span class="view-value" id="link_phone"></span></div>
< div class = " col-md-12 " >< h5 class = " section-header " > Information Banque & Compte </ h5 ></ div >
< div class = " col-md-12 " >< h5 class = " section-header " >< ? = $this -> lang -> line ( 'section_bank_info' ); ?> </h5></div>
< div class = " col-md-12 " >< span class = " view-label " > Nom de la Banque :</ span > < span class = " view-value " id = " link_bank_name " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " >< ? = $this -> lang -> line ( 'bank_name' ); ?> :</span> <span class="view-value" id="link_bank_name"></span></div>
< div class = " col-md-12 " >< span class = " view-label " > Adresse Banque :</ span > < span class = " view-value " id = " link_bank_address " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " >< ? = $this -> lang -> line ( 'bank_address' ); ?> :</span> <span class="view-value" id="link_bank_address"></span></div>
< div class = " col-md-12 " >< span class = " view-label " > IBAN / Numéro Carte :</ span > < span class = " view-value " id = " link_iban " style = " font-size: 16px; font-weight:bold; letter-spacing: 1px; " ></ span ></ div >
< div class = " col-md-12 " >< span class = " view-label " >< ? = $this -> lang -> line ( 'iban_card_number' ); ?> :</span> <span class="view-value" id="link_iban" style="font-size: 16px; font-weight:bold; letter-spacing: 1px;"></span></div>
< div class = " col-md-12 " >< span class = " view-label " > Code Client :</ span > < span class = " view-value " id = " link_code_client " style = " font-size: 16px; font-weight:bold; letter-spacing: 1px; " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > Date Demande :</ span > < span class = " view-value " id = " link_created_at " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'request_date' ); ?> :</span> <span class="view-value" id="link_created_at"></span></div>
< div class = " col-md-6 " >< span class = " view-label " > Statut Actuel :</ span > < span class = " view-value " id = " link_status " ></ span ></ div >
< div class = " col-md-6 " >< span class = " view-label " > <? = $this -> lang -> line ( 'current_status' ); ?> :</span> <span class="view-value" id="link_status"></span></div>
</ div >
</ div >
</ div >
</ div >
< div class = " modal-footer " style = " background-color: #f9f9f9; display: flex; justify-content: space-between; " >
< div class = " modal-footer " style = " background-color: #f9f9f9; display: flex; justify-content: space-between; " >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > Fermer </ button >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_close' ); ?> </button>
< div >
< div >
< button type = " button " class = " btn btn-danger " id = " btn-reject-link " >< i class = " fa fa-times " ></ i > Rejeter </ button >
< button type = " button " class = " btn btn-danger " id = " btn-reject-link " >< i class = " fa fa-times " ></ i > < ? = $this -> lang -> line ( 'btn_reject' ); ?> </button>
< button type = " button " class = " btn btn-success " id = " btn-validate-link " style = " margin-left: 10px; " >< i class = " fa fa-check " ></ i > Valider </ button >
< button type = " button " class = " btn btn-success " id = " btn-validate-link " style = " margin-left: 10px; " >< i class = " fa fa-check " ></ i > < ? = $this -> lang -> line ( 'btn_validate' ); ?> </button>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
@ -482,7 +472,7 @@
< div class = " modal-header " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >
< h4 class = " modal-title text-center " > Modifier la demande </ h4 >
< h4 class = " modal-title text-center " > <? = $this -> lang -> line ( 'modal_title_edit_request' ); ?> </h4>
</ div >
</ div >
< div class = " modal-body " >
< div class = " modal-body " >
@ -491,60 +481,60 @@
< input type = " hidden " name = " id " id = " edit_id " >
< input type = " hidden " name = " id " id = " edit_id " >
< div class = " row " >
< div class = " row " >
< div class = " col-md-6 " >< label > Nom </ label >< input id = " edit_lastname " name = " lastname " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'lastname' ); ?> </label><input id="edit_lastname" name="lastname" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Prénom </ label >< input id = " edit_firstname " name = " firstname " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'firstname' ); ?> </label><input id="edit_firstname" name="firstname" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Numéro de compte </ label >< input id = " edit_account_number " name = " account_number " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'account_number' ); ?> </label><input id="edit_account_number" name="account_number" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > Code client </ label >< input id = " edit_customer_number " name = " customer_number " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'client_code' ); ?> </label><input id="edit_customer_number" name="customer_number" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > I BAN </ label >< input id = " edit_iban " name = " iban " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > I ban </ label >< input id = " edit_iban " name = " iban " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > Type de compte </ label >< input id = " edit_type " name = " type " class = " form-control input-lg " readonly ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'account_type' ); ?> </label><input id="edit_type" name="type" class="form-control input-lg" readonly></div>
< div class = " col-md-6 " >< label > Balance </ label >< input id = " edit_balance " name = " balance " class = " form-control input-lg " disabled ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'balance' ); ?> </label><input id="edit_balance" name="balance" class="form-control input-lg" disabled></div>
< div class = " col-md-6 " >
< div class = " col-md-6 " >
< label > Statut du compte </ label >
< label > <? = $this -> lang -> line ( 'account_status' ); ?> </label>
< select id = " edit_status " name = " status " class = " form-control input-lg " required >
< select id = " edit_status " name = " status " class = " form-control input-lg " required >
< option value = " pending " > En attente </ option >
< option value = " pending " > <? = $this -> lang -> line ( 'status_pending' ); ?> </option>
< option value = " actived " > Activé </ option >
< option value = " actived " > <? = $this -> lang -> line ( 'status_active' ); ?> </option>
< option value = " validated " > Validé </ option >
< option value = " validated " > <? = $this -> lang -> line ( 'status_validated' ); ?> </option>
< option value = " rejected " > Rejeté </ option >
< option value = " rejected " > <? = $this -> lang -> line ( 'status_rejected' ); ?> </option>
< option value = " close " > Fermé </ option >
< option value = " close " > <? = $this -> lang -> line ( 'status_closed' ); ?> </option>
</ select >
</ select >
</ div >
</ div >
< div class = " col-md-6 " >< label > Motif </ label >< input id = " edit_reason " name = " reason " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'reason' ); ?> </label><input id="edit_reason" name="reason" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Date de naissance </ label >< input id = " edit_birth_date " name = " birth_date " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'birth_date' ); ?> </label><input id="edit_birth_date" name="birth_date" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Pays de naissance </ label >< input id = " edit_birth_country " name = " birth_country " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'birth_country' ); ?> </label><input id="edit_birth_country" name="birth_country" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Ville de naissance </ label >< input id = " edit_birth_city " name = " birth_city " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'birth_city' ); ?> </label><input id="edit_birth_city" name="birth_city" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Nationalité </ label >< input id = " edit_nationality " name = " nationality " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'nationality' ); ?> </label><input id="edit_nationality" name="nationality" class="form-control input-lg" required></div>
< div class = " col-md-6 " >
< div class = " col-md-6 " >
< label > Statut matrimonial </ label >
< label > <? = $this -> lang -> line ( 'marital_status' ); ?> </label>
< select id = " edit_marital_status " name = " marital_status " class = " form-control input-lg " required >
< select id = " edit_marital_status " name = " marital_status " class = " form-control input-lg " required >
< option value = " celibataire " > Célibataire </ option >
< option value = " celibataire " > <? = $this -> lang -> line ( 'status_single' ); ?> </option>
< option value = " marie " > Marié </ option >
< option value = " marie " > <? = $this -> lang -> line ( 'status_married' ); ?> </option>
< option value = " veuf " > Veuf </ option >
< option value = " veuf " > <? = $this -> lang -> line ( 'status_widowed' ); ?> </option>
< option value = " divorce " > Divorcé </ option >
< option value = " divorce " > <? = $this -> lang -> line ( 'status_divorced' ); ?> </option>
</ select >
</ select >
</ div >
</ div >
< div class = " col-md-6 " >< label > Nom du conjoint </ label >< input id = " edit_spouse_name " name = " spouse_name " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'spouse_name' ); ?> </label><input id="edit_spouse_name" name="spouse_name" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > Numéro de téléphone </ label >< input id = " edit_phone_number " name = " phone_number " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'phone_number' ); ?> </label><input id="edit_phone_number" name="phone_number" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Numéro d ' identification </ label >< input id = " edit_identification_number " name = " identification_number " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'identification_number' ); ?> </label><input id="edit_identification_number" name="identification_number" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Profession </ label >< input id = " edit_profession " name = " profession " class = " form-control input-lg " required ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'profession' ); ?> </label><input id="edit_profession" name="profession" class="form-control input-lg" required></div>
< div class = " col-md-6 " >< label > Nom de l’ employeur </ label >< input id = " edit_employer_name " name = " employer_name " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'employer_name' ); ?> </label><input id="edit_employer_name" name="employer_name" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > Adresse de l’ employeur </ label >< input id = " edit_employer_address " name = " employer_address " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'employer_address' ); ?> </label><input id="edit_employer_address" name="employer_address" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > Ville de l’ employeur </ label >< input id = " edit_employer_city " name = " employer_city " class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'employer_city' ); ?> </label><input id="edit_employer_city" name="employer_city" class="form-control input-lg"></div>
< div class = " col-md-6 " >< label > Date de création </ label >< input id = " edit_created_at " readonly class = " form-control input-lg " ></ div >
< div class = " col-md-6 " >< label > <? = $this -> lang -> line ( 'creation_date' ); ?> </label><input id="edit_created_at" readonly class="form-control input-lg"></div>
</ div >
</ div >
< br >
< br >
< button type = " submit " class = " btn btn-primary " id = " btn-save-edit " > Enregistrer </ button >
< button type = " submit " class = " btn btn-primary " id = " btn-save-edit " > <? = $this -> lang -> line ( 'btn_save' ); ?> </button>
< button type = " button " class = " btn btn-default pull-right " data - dismiss = " modal " > Fermer </ button >
< button type = " button " class = " btn btn-default pull-right " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_close' ); ?> </button>
</ form >
</ form >
</ div >
</ div >
</ div >
</ div >
@ -555,11 +545,11 @@
< div class = " modal fade " id = " deleteModal " >
< div class = " modal fade " id = " deleteModal " >
< div class = " modal-dialog " >
< div class = " modal-dialog " >
< div class = " modal-content " >
< div class = " modal-content " >
< div class = " modal-header " >< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >< h4 class = " modal-title " > Confirmation </ h4 ></ div >
< div class = " modal-header " >< button type = " button " class = " close " data - dismiss = " modal " >< span >& times ; </ span ></ button >< h4 class = " modal-title " > <? = $this -> lang -> line ( 'modal_title_confirm_delete' ); ?> </h4></div>
< div class = " modal-body " >< p > Voulez - vous vraiment supprimer ce compte ? </ p >< input type = " hidden " id = " delete_id " ></ div >
< div class = " modal-body " >< p > <? = $this -> lang -> line ( 'msg_confirm_delete_account' ); ?> </p><input type="hidden" id="delete_id"></div>
< div class = " modal-footer " >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > Annuler </ button >
< button type = " button " class = " btn btn-default " data - dismiss = " modal " > <? = $this -> lang -> line ( 'btn_cancel' ); ?> </button>
< button type = " button " id = " confirmDelete " class = " btn btn-danger " > Supprimer </ button >
< button type = " button " id = " confirmDelete " class = " btn btn-danger " > <? = $this -> lang -> line ( 'btn_yes_delete' ); ?> </button>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
@ -590,21 +580,21 @@ $(document).ready(function () {
{
{
extend : 'excelHtml5' ,
extend : 'excelHtml5' ,
text : '<i class="fa fa-file-excel-o"></i> Excel' ,
text : '<i class="fa fa-file-excel-o"></i> Excel' ,
titleAttr : ' Exporter en Excel ',
titleAttr : ' <?= $this->lang->line("export_excel"); ?> ',
className : 'btn btn-success btn-sm' ,
className : 'btn btn-success btn-sm' ,
exportOptions : { columns : ':not(:last-child)' }
exportOptions : { columns : ':not(:last-child)' }
},
},
{
{
extend : 'csvHtml5' ,
extend : 'csvHtml5' ,
text : '<i class="fa fa-file-text-o"></i> CSV' ,
text : '<i class="fa fa-file-text-o"></i> CSV' ,
titleAttr : ' Exporter en CSV ',
titleAttr : ' <?= $this->lang->line("export_csv"); ?> ',
className : 'btn btn-info btn-sm' ,
className : 'btn btn-info btn-sm' ,
exportOptions : { columns : ':not(:last-child)' }
exportOptions : { columns : ':not(:last-child)' }
},
},
{
{
extend : 'pdfHtml5' ,
extend : 'pdfHtml5' ,
text : '<i class="fa fa-file-pdf-o"></i> PDF' ,
text : '<i class="fa fa-file-pdf-o"></i> PDF' ,
titleAttr : ' Exporter en PDF ',
titleAttr : ' <?= $this->lang->line("export_pdf"); ?> ',
className : 'btn btn-danger btn-sm' ,
className : 'btn btn-danger btn-sm' ,
orientation : 'landscape' ,
orientation : 'landscape' ,
pageSize : 'LEGAL' ,
pageSize : 'LEGAL' ,
@ -621,7 +611,10 @@ $(document).ready(function () {
dom : " <'row'<'col-sm-6'B><'col-sm-6'f>> " +
dom : " <'row'<'col-sm-6'B><'col-sm-6'f>> " +
" <'row'<'col-sm-12'tr>> " +
" <'row'<'col-sm-12'tr>> " +
" <'row'<'col-sm-5'i><'col-sm-7'p>> " ,
" <'row'<'col-sm-5'i><'col-sm-7'p>> " ,
buttons : exportButtonsConfig
buttons : exportButtonsConfig ,
language : {
url : " <?= base_url('assets/plugins/datatables/i18n/' . ( $this->session ->userdata('site_lang') == 'english' ? 'English' : 'French') . '.json') ?> "
}
});
});
// TABLEAU 2 : DEMANDES DE RATTACHEMENT
// TABLEAU 2 : DEMANDES DE RATTACHEMENT
@ -633,7 +626,10 @@ $(document).ready(function () {
dom : " <'row'<'col-sm-6'B><'col-sm-6'f>> " +
dom : " <'row'<'col-sm-6'B><'col-sm-6'f>> " +
" <'row'<'col-sm-12'tr>> " +
" <'row'<'col-sm-12'tr>> " +
" <'row'<'col-sm-5'i><'col-sm-7'p>> " ,
" <'row'<'col-sm-5'i><'col-sm-7'p>> " ,
buttons : exportButtonsConfig
buttons : exportButtonsConfig ,
language : {
url : " <?= base_url('assets/plugins/datatables/i18n/' . ( $this->session ->userdata('site_lang') == 'english' ? 'English' : 'French') . '.json') ?> "
}
});
});
// Datepicker pour le champ date de naissance
// Datepicker pour le champ date de naissance
@ -673,10 +669,10 @@ $(document).ready(function () {
toastr . success ( res . message );
toastr . success ( res . message );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( res . message || " Erreur lors de la mise à jour " );
toastr . error ( res . message || " <?= $this->lang ->line('error_update_generic'); ?> " );
}
}
},
},
error : function () { toastr . error ( " Erreur 500 " ); }
error : function () { toastr . error ( " <?= $this->lang ->line('error_server_500'); ?> " ); }
});
});
});
});
@ -691,11 +687,11 @@ $(document).ready(function () {
if ( status === 'actived' ) {
if ( status === 'actived' ) {
// Si actif, on désactive le bouton et on change le texte éventuellement
// Si actif, on désactive le bouton et on change le texte éventuellement
$ ( " #btn-validate-request " ) . prop ( " disabled " , true ) . text ( " Déjà Actif " );
$ ( " #btn-validate-request " ) . prop ( " disabled " , true ) . text ( " <?= $this->lang ->line('msg_already_active'); ?> " );
$ ( " #btn-reject-request " ) . prop ( " disabled " , true ); // Optionnel : désactiver aussi le rejet
$ ( " #btn-reject-request " ) . prop ( " disabled " , true ); // Optionnel : désactiver aussi le rejet
} else {
} else {
// Sinon, on le réactive (important si on ouvre une autre ligne après)
// Sinon, on le réactive (important si on ouvre une autre ligne après)
$ ( " #btn-validate-request " ) . prop ( " disabled " , false ) . html ( '<i class="fa fa-check"></i> VALIDER ');
$ ( " #btn-validate-request " ) . prop ( " disabled " , false ) . html ( '<i class="fa fa-check"></i> <?= $this->lang->line("btn_validate"); ?> ');
$ ( " #btn-reject-request " ) . prop ( " disabled " , false );
$ ( " #btn-reject-request " ) . prop ( " disabled " , false );
}
}
@ -705,7 +701,7 @@ $(document).ready(function () {
$ ( " #reject_reason " ) . val ( " " );
$ ( " #reject_reason " ) . val ( " " );
// Remplissage des données textes
// Remplissage des données textes
const fields = [ " lastname " , " firstname " , " account_number " , " iban " , " balance " , " profession " , " employer_name " , " sector_activity " , " account_type " , " birth_date " , " phone_number " , " customer_number " , " spouse_name " , " niu " , " identification_number " , " employer_address " , " employer_city " , " birth_country " , " birth_city " , " nationality " , " marital_status " ];
const fields = [ " lastname " , " firstname " , " account_number " , " iban " , " balance " , " profession " , " employer_name " , " sector_activity " , " account_type " , " birth_date " , " phone_number " , " customer_number " , " spouse_name " , " niu " , " identification_number " , " employer_address " , " employer_city " , " type " , " reason " , " birth_country " , " birth_city " , " nationality " , " marital_status " ];
fields . forEach ( f => { $ ( " #view_ " + f ) . text ( $ ( this ) . data ( f ) || " - " ); });
fields . forEach ( f => { $ ( " #view_ " + f ) . text ( $ ( this ) . data ( f ) || " - " ); });
// Gestion des documents (inchangé)
// Gestion des documents (inchangé)
@ -717,11 +713,11 @@ $(document).ready(function () {
// Affichage images... (inchangé)
// Affichage images... (inchangé)
if ( docFront && docFront !== " " ) {
if ( docFront && docFront !== " " ) {
$ ( " #container_doc_front " ) . html ( `<a href="${docFront}" target="_blank"><img src="${docFront}" class="img-thumbnail" style="max-height: 150px;"></a>` );
$ ( " #container_doc_front " ) . html ( `<a href="${docFront}" target="_blank"><img src="${docFront}" class="img-thumbnail" style="max-height: 150px;"></a>` );
} else { $ ( " #container_doc_front " ) . html ( '<span class="text-muted"> Aucun document </span>'); }
} else { $ ( " #container_doc_front " ) . html ( '<span class="text-muted"> <?= $this->lang->line("msg_no_document"); ?> </span>'); }
if ( docBack && docBack !== " " ) {
if ( docBack && docBack !== " " ) {
$ ( " #container_doc_back " ) . html ( `<a href="${docBack}" target="_blank"><img src="${docBack}" class="img-thumbnail" style="max-height: 150px;"></a>` );
$ ( " #container_doc_back " ) . html ( `<a href="${docBack}" target="_blank"><img src="${docBack}" class="img-thumbnail" style="max-height: 150px;"></a>` );
} else { $ ( " #container_doc_back " ) . html ( '<span class="text-muted"> Aucun document </span>'); }
} else { $ ( " #container_doc_back " ) . html ( '<span class="text-muted"> <?= $this->lang->line("msg_no_document"); ?> </span>'); }
});
});
/* =====================================================
/* =====================================================
@ -750,13 +746,13 @@ $(document).ready(function () {
// Validation : Le motif est obligatoire
// Validation : Le motif est obligatoire
if ( reason === " " ) {
if ( reason === " " ) {
toastr . warning ( " Veuillez saisir un motif pour le rejet. " );
toastr . warning ( " <?= $this->lang ->line('msg_enter_reject_reason'); ?> " );
$ ( " #reject_reason " ) . focus ();
$ ( " #reject_reason " ) . focus ();
return ;
return ;
}
}
// Désactivation pour éviter double clic
// Désactivation pour éviter double clic
$ ( this ) . prop ( 'disabled' , true ) . text ( ' Traitement... ');
$ ( this ) . prop ( 'disabled' , true ) . text ( ' <?= $this->lang->line("processing"); ?> ');
$ . ajax ({
$ . ajax ({
url : " <?= base_url('Gestion/update_request_agency'); ?> " ,
url : " <?= base_url('Gestion/update_request_agency'); ?> " ,
@ -770,16 +766,16 @@ $(document).ready(function () {
success : function ( res ) {
success : function ( res ) {
if ( res && res . success === " ok " ) {
if ( res && res . success === " ok " ) {
$ ( '#reviewModal' ) . modal ( 'hide' );
$ ( '#reviewModal' ) . modal ( 'hide' );
toastr . warning ( " Demande rejetée avec succès. " );
toastr . warning ( " <?= $this->lang ->line('msg_request_rejected_success'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( res . message || " Erreur lors du rejet. " );
toastr . error ( res . message || " <?= $this->lang ->line('error_reject_generic'); ?> " );
$ ( " #btn-confirm-reject " ) . prop ( 'disabled' , false ) . text ( ' Confirmer le rejet ');
$ ( " #btn-confirm-reject " ) . prop ( 'disabled' , false ) . text ( ' <?= $this->lang->line("btn_confirm_reject"); ?> ');
}
}
},
},
error : function () {
error : function () {
toastr . error ( " Erreur serveur (500). " );
toastr . error ( " <?= $this->lang ->line('error_server_500'); ?> " );
$ ( " #btn-confirm-reject " ) . prop ( 'disabled' , false ) . text ( ' Confirmer le rejet ');
$ ( " #btn-confirm-reject " ) . prop ( 'disabled' , false ) . text ( ' <?= $this->lang->line("btn_confirm_reject"); ?> ');
}
}
});
});
});
});
@ -798,7 +794,7 @@ $(document).ready(function () {
let docBack = $ ( " #hidden_doc_back " ) . val ();
let docBack = $ ( " #hidden_doc_back " ) . val ();
// On peut désactiver le bouton pour éviter le double clic
// On peut désactiver le bouton pour éviter le double clic
$ ( " #btn-validate-request " ) . prop ( 'disabled' , true ) . html ( '<i class="fa fa-spinner fa-spin"></i> Traitement... ');
$ ( " #btn-validate-request " ) . prop ( 'disabled' , true ) . html ( '<i class="fa fa-spinner fa-spin"></i> <?= $this->lang->line("processing"); ?> ');
$ . ajax ({
$ . ajax ({
url : " <?= base_url('Gestion/validate_request_agency'); ?> " , // URL SPÉCIFIQUE
url : " <?= base_url('Gestion/validate_request_agency'); ?> " , // URL SPÉCIFIQUE
@ -811,19 +807,19 @@ $(document).ready(function () {
},
},
dataType : " json " ,
dataType : " json " ,
success : function ( res ) {
success : function ( res ) {
$ ( " #btn-validate-request " ) . prop ( 'disabled' , false ) . html ( ' VALIDER ');
$ ( " #btn-validate-request " ) . prop ( 'disabled' , false ) . html ( ' <?= $this->lang->line("btn_validate"); ?> ');
if ( res && res . success === " ok " ) {
if ( res && res . success === " ok " ) {
$ ( '#reviewModal' ) . modal ( 'hide' );
$ ( '#reviewModal' ) . modal ( 'hide' );
toastr . success ( res . message || " Demande validée avec succès ! " );
toastr . success ( res . message || " <?= $this->lang ->line('msg_request_validated_success'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( res . message || " Erreur lors de la validation. " );
toastr . error ( res . message || " <?= $this->lang ->line('error_validate_generic'); ?> " );
}
}
},
},
error : function () {
error : function () {
$ ( " #btn-validate-request " ) . prop ( 'disabled' , false ) . html ( ' VALIDER ');
$ ( " #btn-validate-request " ) . prop ( 'disabled' , false ) . html ( ' <?= $this->lang->line("btn_validate"); ?> ');
toastr . error ( " Erreur serveur (500) lors de la validation. " );
toastr . error ( " <?= $this->lang ->line('error_validate_server'); ?> " );
}
}
});
});
}
}
@ -842,11 +838,11 @@ $(document).ready(function () {
let status = $ ( this ) . data ( " status " ); // Récupère 'active', 'pending', etc.
let status = $ ( this ) . data ( " status " ); // Récupère 'active', 'pending', etc.
// --- GESTION DU BOUTON VALIDATION ---
// --- GESTION DU BOUTON VALIDATION ---
if ( status === 'active ' || status === 'validated' || status == 1 ) {
if ( status === 'active d ' || status === 'validated' || status == 1 ) {
$ ( " #btn-validate-link " ) . prop ( " disabled " , true ) . text ( " Déjà Validé " );
$ ( " #btn-validate-link " ) . prop ( " disabled " , true ) . text ( " <?= $this->lang ->line('msg_already_validated'); ?> " );
$ ( " #btn-reject-link " ) . prop ( " disabled " , true );
$ ( " #btn-reject-link " ) . prop ( " disabled " , true );
} else {
} else {
$ ( " #btn-validate-link " ) . prop ( " disabled " , false ) . html ( '<i class="fa fa-check"></i> Valider ');
$ ( " #btn-validate-link " ) . prop ( " disabled " , false ) . html ( '<i class="fa fa-check"></i> <?= $this->lang->line("btn_validate"); ?> ');
$ ( " #btn-reject-link " ) . prop ( " disabled " , false );
$ ( " #btn-reject-link " ) . prop ( " disabled " , false );
}
}
// -------------------------------------
// -------------------------------------
@ -869,7 +865,6 @@ $(document).ready(function () {
// 2. Valider (API + Transaction)
// 2. Valider (API + Transaction)
$ ( " #btn-validate-link " ) . click ( function () {
$ ( " #btn-validate-link " ) . click ( function () {
let iban = $ ( " #link_iban " ) . text ();
let iban = $ ( " #link_iban " ) . text ();
let code_client = $ ( " #link_code_client " ) . text ();
let transactionId = $ ( " #link_id_transaction " ) . val ();
let transactionId = $ ( " #link_id_transaction " ) . val ();
$ ( this ) . prop ( 'disabled' , true ) . html ( '<i class="fa fa-spinner fa-spin"></i>' );
$ ( this ) . prop ( 'disabled' , true ) . html ( '<i class="fa fa-spinner fa-spin"></i>' );
@ -879,7 +874,6 @@ $(document).ready(function () {
type : " POST " ,
type : " POST " ,
data : {
data : {
iban : iban ,
iban : iban ,
code_client : code_client ,
id_transaction : transactionId
id_transaction : transactionId
},
},
dataType : " json " ,
dataType : " json " ,
@ -890,12 +884,12 @@ $(document).ready(function () {
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( res . message );
toastr . error ( res . message );
$ ( " #btn-validate-link " ) . prop ( 'disabled' , false ) . html ( ' Valider ');
$ ( " #btn-validate-link " ) . prop ( 'disabled' , false ) . html ( ' <?= $this->lang->line("btn_validate"); ?> ');
}
}
},
},
error : function () {
error : function () {
toastr . error ( " Erreur serveur (500) " );
toastr . error ( " <?= $this->lang ->line('error_server_500'); ?> " );
$ ( " #btn-validate-link " ) . prop ( 'disabled' , false ) . html ( ' Valider ');
$ ( " #btn-validate-link " ) . prop ( 'disabled' , false ) . html ( ' <?= $this->lang->line("btn_validate"); ?> ');
}
}
});
});
});
});
@ -904,7 +898,7 @@ $(document).ready(function () {
$ ( " #btn-reject-link " ) . click ( function () {
$ ( " #btn-reject-link " ) . click ( function () {
let id = $ ( " #link_id_transaction " ) . val ();
let id = $ ( " #link_id_transaction " ) . val ();
if ( ! confirm ( " Rejeter cette demande ? " )) return ;
if ( ! confirm ( " <?= $this->lang ->line('msg_confirm_reject_link'); ?> " )) return ;
$ . ajax ({
$ . ajax ({
url : " <?= base_url('Gestion/update_link_request'); ?> " ,
url : " <?= base_url('Gestion/update_link_request'); ?> " ,
@ -914,10 +908,10 @@ $(document).ready(function () {
success : function ( res ) {
success : function ( res ) {
if ( res . success === " ok " ) {
if ( res . success === " ok " ) {
$ ( '#reviewLinkModal' ) . modal ( 'hide' );
$ ( '#reviewLinkModal' ) . modal ( 'hide' );
toastr . warning ( " Demande rejetée " );
toastr . warning ( " <?= $this->lang ->line('msg_link_rejected'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( " Erreur lors du rejet " );
toastr . error ( " <?= $this->lang ->line('error_reject_generic'); ?> " );
}
}
}
}
});
});
@ -943,10 +937,10 @@ $(document).ready(function () {
success : function ( res ) {
success : function ( res ) {
if ( res . success === " ok " ) {
if ( res . success === " ok " ) {
$ ( '#editLinkModal' ) . modal ( 'hide' );
$ ( '#editLinkModal' ) . modal ( 'hide' );
toastr . success ( " Modifications enregistrées " );
toastr . success ( " <?= $this->lang ->line('msg_changes_saved'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( " Erreur lors de la mise à jour " );
toastr . error ( " <?= $this->lang ->line('error_update_generic'); ?> " );
}
}
}
}
});
});
@ -971,10 +965,10 @@ $(document).ready(function () {
success : function ( res ) {
success : function ( res ) {
if ( res . success === " ok " ) {
if ( res . success === " ok " ) {
$ ( '#deleteLinkModal' ) . modal ( 'hide' );
$ ( '#deleteLinkModal' ) . modal ( 'hide' );
toastr . success ( " Suppression réussie " );
toastr . success ( " <?= $this->lang ->line('msg_delete_success'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
} else {
} else {
toastr . error ( " Erreur lors de la suppression " );
toastr . error ( " <?= $this->lang ->line('error_delete_generic'); ?> " );
}
}
}
}
});
});
@ -998,7 +992,7 @@ $(document).ready(function () {
success : function ( response ) {
success : function ( response ) {
if ( response . success === " ok " ) {
if ( response . success === " ok " ) {
$ ( " #deleteModal " ) . modal ( " hide " );
$ ( " #deleteModal " ) . modal ( " hide " );
toastr . success ( response . message );
toastr . success ( response . message || " <?= $this->lang ->line('msg_delete_success'); ?> " );
setTimeout (() => location . reload (), 1500 );
setTimeout (() => location . reload (), 1500 );
}
}
}
}