2025-12-10 17:00:48 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2026-02-03 16:29:12 +00:00
|
|
|
<title><?= $this->lang->line('page_title_agency'); ?></title>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
|
|
|
|
<!-- 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/buttons/2.4.1/css/buttons.bootstrap.min.css">
|
2025-12-10 17:00:48 +00:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css">
|
|
|
|
|
<link rel="stylesheet" href="<?= base_url('bower_components/toastr/toastr.css') ?>">
|
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
|
|
|
|
|
|
|
|
|
<style>
|
2026-01-20 14:16:54 +00:00
|
|
|
div.dataTables_wrapper { width: 100%; margin: 0 auto; }
|
|
|
|
|
.action-buttons { display: flex; gap: 6px; justify-content: center; }
|
|
|
|
|
.action-buttons button { display: inline-flex; align-items: center; justify-content: center; }
|
|
|
|
|
|
|
|
|
|
/* Styles pour les modals de vérification (Review) */
|
|
|
|
|
.view-label { font-weight: bold; color: #555; font-size: 13px; }
|
|
|
|
|
.view-value { color: #000; margin-bottom: 10px; display: block; border-bottom: 1px solid #eee; padding-bottom: 5px; font-size: 14px; }
|
|
|
|
|
.section-header { border-bottom: 2px solid #3c8dbc; padding-bottom: 5px; margin-bottom: 15px; margin-top: 10px; color: #3c8dbc; font-weight: 600; }
|
2025-12-10 17:00:48 +00:00
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="content-wrapper">
|
|
|
|
|
|
|
|
|
|
<section class="content-header">
|
2026-01-20 14:16:54 +00:00
|
|
|
<h1><?= $this->lang->line('management_bank_accounts'); ?></h1>
|
2025-12-10 17:00:48 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="content">
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
<!-- =======================================================
|
|
|
|
|
TABLEAU 1 : COMPTES AGENCE
|
|
|
|
|
======================================================= -->
|
|
|
|
|
<div class="box box-primary">
|
2025-12-10 17:00:48 +00:00
|
|
|
<div class="box-header with-border">
|
2026-01-20 14:16:54 +00:00
|
|
|
<h3 class="box-title"><?= $this->lang->line('list_of_request_opening_bank_accounts'); ?></h3>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
|
|
|
|
</div>
|
2025-12-10 17:00:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
<table class="table table-bordered table-striped" id="accountsTable">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="text-center">ID</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('account'); ?></th>
|
2026-02-03 16:29:12 +00:00
|
|
|
<th class="text-center">Iban</th>
|
2025-12-10 17:00:48 +00:00
|
|
|
<th class="text-center">Type</th>
|
2026-02-02 10:08:12 +00:00
|
|
|
<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_country'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('marital_status'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('phone_number'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('reason'); ?></th>
|
2025-12-10 17:00:48 +00:00
|
|
|
<th class="text-center"><?= $this->lang->line('status'); ?></th>
|
|
|
|
|
<th class="text-center">Actions</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2026-01-20 14:16:54 +00:00
|
|
|
<?php if(!empty($request_bank_accounts)): ?>
|
|
|
|
|
<?php $j = 1; ?>
|
|
|
|
|
<?php foreach ($request_bank_accounts as $a): ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="text-center"><?= $j++; ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->lastname ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->firstname ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->account_number ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->iban ?></td>
|
2026-02-02 10:08:12 +00:00
|
|
|
<td class="text-center"><?= $a->type ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->nationality ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->birth_date ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->birth_country ?></td>
|
|
|
|
|
<td class="text-center"><?= ucfirst($a->marital_status) ?></td>
|
|
|
|
|
<td class="text-center"><?= $a->phone_number ?></td>
|
2026-02-24 13:26:23 +00:00
|
|
|
<td class="text-center"><?= truncateText($a->reason) ?></td>
|
2026-01-20 14:16:54 +00:00
|
|
|
<td class="text-center">
|
|
|
|
|
<?= getStatusBadge($a->status, $this->lang) ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="text-center action-buttons">
|
|
|
|
|
|
|
|
|
|
<!-- BOUTON VOIR (REVIEW) -->
|
|
|
|
|
<button
|
|
|
|
|
class="open-review-modal btn btn-info btn-sm"
|
|
|
|
|
data-toggle="modal"
|
|
|
|
|
data-target="#reviewModal"
|
2026-02-03 16:29:12 +00:00
|
|
|
title="<?= $this->lang->line('btn_verify'); ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-id="<?= $a->id ?>"
|
|
|
|
|
data-lastname="<?= $a->lastname ?>"
|
|
|
|
|
data-firstname="<?= $a->firstname ?>"
|
|
|
|
|
data-account_number="<?= $a->account_number ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-customer_number="<?= $a->customer_number ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-iban="<?= $a->iban ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-phone_number="<?= $a->phone_number ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-status="<?= $a->status ?>"
|
|
|
|
|
data-reason="<?= $a->reason ?>"
|
|
|
|
|
data-balance="<?= $a->balance ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-type="<?= $a->type ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-birth_date="<?= $a->birth_date ?>"
|
|
|
|
|
data-birth_country="<?= $a->birth_country ?>"
|
|
|
|
|
data-birth_city="<?= $a->birth_city ?>"
|
|
|
|
|
data-nationality="<?= $a->nationality ?>"
|
|
|
|
|
data-marital_status="<?= $a->marital_status ?>"
|
|
|
|
|
data-profession="<?= $a->profession ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-identification_number="<?= $a->identification_number ?>"
|
|
|
|
|
data-niu="<?= $a->niu ?>"
|
|
|
|
|
data-spouse_name="<?= $a->spouse_name ?>"
|
|
|
|
|
data-employer_city="<?= $a->employer_city ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-employer_name="<?= $a->employer_name ?>"
|
|
|
|
|
data-employer_address="<?= $a->employer_address ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-doc_front="<?= $a->document_image_front ? $a->document_image_front: '' ?>"
|
|
|
|
|
data-doc_back="<?= $a->document_image_back ? $a->document_image_back : '' ?>"
|
|
|
|
|
data-created_at="<?= $a->created_at ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
>
|
|
|
|
|
<i class='fa fa-eye'></i>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<!-- BOUTON MODIFIER (EDIT) -->
|
|
|
|
|
<button
|
|
|
|
|
data-toggle="modal"
|
|
|
|
|
data-target="#editModal"
|
|
|
|
|
class="open-edit-modal btn btn-primary btn-sm"
|
2026-02-03 16:29:12 +00:00
|
|
|
title="<?= $this->lang->line('btn_edit'); ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-id="<?= $a->id ?>"
|
|
|
|
|
data-lastname="<?= $a->lastname ?>"
|
|
|
|
|
data-firstname="<?= $a->firstname ?>"
|
|
|
|
|
data-account_number="<?= $a->account_number ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-customer_number="<?= $a->customer_number ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-iban="<?= $a->iban ?>"
|
|
|
|
|
data-status="<?= $a->status ?>"
|
|
|
|
|
data-reason="<?= $a->reason ?>"
|
|
|
|
|
data-balance="<?= $a->balance ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-type="<?= $a->type ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-birth_date="<?= $a->birth_date ?>"
|
|
|
|
|
data-birth_country="<?= $a->birth_country ?>"
|
|
|
|
|
data-birth_city="<?= $a->birth_city ?>"
|
|
|
|
|
data-nationality="<?= $a->nationality ?>"
|
|
|
|
|
data-marital_status="<?= $a->marital_status ?>"
|
|
|
|
|
data-profession="<?= $a->profession ?>"
|
2026-02-02 10:08:12 +00:00
|
|
|
data-employer_city="<?= $a->employer_city ?>"
|
|
|
|
|
data-spouse_name="<?= $a->spouse_name ?>"
|
|
|
|
|
data-identification_number="<?= $a->identification_number ?>"
|
|
|
|
|
data-phone_number="<?= $a->phone_number ?>"
|
|
|
|
|
data-niu="<?= $a->niu ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-employer_name="<?= $a->employer_name ?>"
|
|
|
|
|
data-employer_address="<?= $a->employer_address ?>"
|
|
|
|
|
data-created_at="<?= $a->created_at ?>"
|
|
|
|
|
>
|
|
|
|
|
<i class='fa fa-edit'></i>
|
|
|
|
|
</button>
|
|
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<button class="delete-account btn btn-danger btn-sm" onclick="deleteRequest(<?= $a->id ?>)" title="<?= $this->lang->line('btn_delete'); ?>">
|
2026-01-20 14:16:54 +00:00
|
|
|
<i class='fa fa-trash'></i>
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
<?php endif; ?>
|
2025-12-10 17:00:48 +00:00
|
|
|
</tbody>
|
2026-01-20 14:16:54 +00:00
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- =======================================================
|
|
|
|
|
TABLEAU 2 : DEMANDES DE RATTACHEMENT
|
|
|
|
|
======================================================= -->
|
|
|
|
|
<div class="box box-info" style="margin-top: 30px;">
|
|
|
|
|
<div class="box-header with-border">
|
2026-02-03 16:29:12 +00:00
|
|
|
<h3 class="box-title"><?= $this->lang->line('title_link_requests'); ?></h3>
|
2026-01-20 14:16:54 +00:00
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
<div class="box-body">
|
|
|
|
|
<table class="table table-bordered table-striped" id="linksTable">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="text-center">ID</th>
|
2026-02-03 16:29:12 +00:00
|
|
|
<th class="text-center"><?= $this->lang->line('full_name'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('user_code'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('client'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('phone_number'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('bank_name'); ?></th>
|
|
|
|
|
<th class="text-center"><?= $this->lang->line('iban_account'); ?></th>
|
2026-01-20 14:16:54 +00:00
|
|
|
<th class="text-center"><?= $this->lang->line('status'); ?></th>
|
|
|
|
|
<th class="text-center">Actions</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php if(!empty($request_links_bank_accounts)): ?>
|
|
|
|
|
<?php $i = 1; ?>
|
|
|
|
|
<?php foreach ($request_links_bank_accounts as $l): ?>
|
|
|
|
|
<?php
|
|
|
|
|
$statusStr = 'pending';
|
2026-02-02 16:53:59 +00:00
|
|
|
if($l->is_verified == 1) $statusStr = 'actived';
|
2026-01-20 14:16:54 +00:00
|
|
|
if($l->is_verified == 2) $statusStr = 'rejected';
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="text-center"><?= $i++; ?></td>
|
|
|
|
|
<td class="text-center"><?= $l->lastname .' '. $l->firstname ?></td>
|
|
|
|
|
<td class="text-center"><?= $l->user_code ?></td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<?= $l->lastname ?> <?= $l->firstname ?><br>
|
|
|
|
|
<small class="text-muted"><?= $l->email ?></small>
|
|
|
|
|
</td>
|
2026-02-02 16:53:59 +00:00
|
|
|
<td class="text-center"><?= !empty($l->phone) ? $l->phone : '-'; ?></td>
|
2026-01-20 14:16:54 +00:00
|
|
|
<td class="text-center">
|
|
|
|
|
<strong><?= $l->bank_name ?></strong><br>
|
|
|
|
|
<small><?= substr($l->bank_address, 0, 20) ?>...</small>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="text-center"><?= $l->iban ?></td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<?= getStatusBadge($statusStr, $this->lang) ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="text-center action-buttons">
|
|
|
|
|
<button
|
|
|
|
|
class="open-link-review-modal btn btn-info btn-sm"
|
|
|
|
|
data-toggle="modal"
|
|
|
|
|
data-target="#reviewLinkModal"
|
2026-02-03 16:29:12 +00:00
|
|
|
title="<?= $this->lang->line('btn_verify_link'); ?>"
|
2026-01-20 14:16:54 +00:00
|
|
|
data-id="<?= $l->id_transaction ?>"
|
|
|
|
|
data-user_code="<?= $l->user_code ?>"
|
|
|
|
|
data-fullname="<?= $l->lastname . ' ' . $l->firstname ?>"
|
|
|
|
|
data-email="<?= $l->email ?>"
|
|
|
|
|
data-phone="<?= $l->phone ?>"
|
|
|
|
|
data-bank_name="<?= $l->bank_name ?>"
|
|
|
|
|
data-bank_address="<?= $l->bank_address ?>"
|
|
|
|
|
data-iban="<?= $l->iban ?>"
|
|
|
|
|
data-status="<?= $statusStr ?>"
|
|
|
|
|
data-created_at="<?= $l->created_at ?>"
|
|
|
|
|
>
|
|
|
|
|
<i class='fa fa-eye'></i>
|
|
|
|
|
</button>
|
2026-02-02 16:53:59 +00:00
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
class="open-edit-link-modal btn btn-primary btn-sm"
|
|
|
|
|
data-toggle="modal"
|
|
|
|
|
data-target="#editLinkModal"
|
2026-02-03 16:29:12 +00:00
|
|
|
title="<?= $this->lang->line('btn_edit'); ?>"
|
2026-02-02 16:53:59 +00:00
|
|
|
data-id="<?= $l->id_transaction ?>"
|
|
|
|
|
data-iban="<?= $l->iban ?>"
|
|
|
|
|
data-bank_name="<?= $l->bank_name ?>"
|
|
|
|
|
data-status="<?= $l->is_verified ?>"
|
|
|
|
|
>
|
|
|
|
|
<i class='fa fa-edit'></i>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<!-- SUPPRIMER -->
|
2026-02-03 16:29:12 +00:00
|
|
|
<button class="btn btn-danger btn-sm btn-delete-link" data-id="<?= $l->id_transaction ?>" title="<?= $this->lang->line('btn_delete'); ?>">
|
2026-02-02 16:53:59 +00:00
|
|
|
<i class='fa fa-trash'></i>
|
|
|
|
|
</button>
|
2026-01-20 14:16:54 +00:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</tbody>
|
2025-12-10 17:00:48 +00:00
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
<!-- === MODAL EDIT LINK === -->
|
|
|
|
|
<div class="modal fade" id="editLinkModal">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
2026-02-03 16:29:12 +00:00
|
|
|
<h4 class="modal-title"><?= $this->lang->line('modal_title_edit_link'); ?></h4>
|
2026-02-02 16:53:59 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<form id="update-link-form">
|
|
|
|
|
<input type="hidden" name="id_transaction" id="edit_link_id">
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label><?= $this->lang->line('bank_name'); ?></label>
|
2026-02-02 16:53:59 +00:00
|
|
|
<input type="text" name="bank_name" id="edit_link_bank_name" class="form-control" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label><?= $this->lang->line('iban_account_number'); ?></label>
|
2026-02-02 16:53:59 +00:00
|
|
|
<input type="text" name="iban" id="edit_link_iban" class="form-control">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label><?= $this->lang->line('status'); ?></label>
|
2026-02-02 16:53:59 +00:00
|
|
|
<select name="is_verified" id="edit_link_status" class="form-control">
|
2026-02-03 16:29:12 +00:00
|
|
|
<option value="0"><?= $this->lang->line('status_pending'); ?></option>
|
|
|
|
|
<option value="1"><?= $this->lang->line('status_active'); ?> </option>
|
|
|
|
|
<option value="2"><?= $this->lang->line('status_rejected'); ?> </option>
|
2026-02-02 16:53:59 +00:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('btn_save'); ?></button>
|
2026-02-02 16:53:59 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- MODAL DELETE LINK -->
|
|
|
|
|
<div class="modal fade" id="deleteLinkModal">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
2026-02-03 16:29:12 +00:00
|
|
|
<h4 class="modal-title"><?= $this->lang->line('modal_title_confirm_delete'); ?></h4>
|
2026-02-02 16:53:59 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
2026-02-03 16:29:12 +00:00
|
|
|
<p><?= $this->lang->line('msg_confirm_delete_link'); ?></p>
|
2026-02-02 16:53:59 +00:00
|
|
|
<input type="hidden" id="delete_link_id">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('btn_yes_delete'); ?></button>
|
2026-02-02 16:53:59 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
<!-- =======================================================
|
|
|
|
|
MODAL 1 : VÉRIFICATION AGENCE (AGENCY BANKING)
|
|
|
|
|
======================================================= -->
|
|
|
|
|
<div class="modal fade" id="reviewModal">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
2026-02-03 16:29:12 +00:00
|
|
|
<h4 class="modal-title text-center"><?= $this->lang->line('modal_title_review_account'); ?></h4>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<input type="hidden" id="review_id">
|
2026-02-02 10:08:12 +00:00
|
|
|
<!-- HIDDEN INPUTS FOR DOCUMENT -->
|
|
|
|
|
<input type="hidden" id="hidden_doc_front">
|
|
|
|
|
<input type="hidden" id="hidden_doc_back">
|
2026-01-20 14:16:54 +00:00
|
|
|
<div class="row">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('lastname'); ?> :</span> <span class="view-value" id="view_lastname"></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"><?= $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"><?= $this->lang->line('nationality'); ?> :</span> <span class="view-value" id="view_nationality"></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"><?= $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"><?= $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"><?= $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"><?= $this->lang->line('niu'); ?>:</span> <span class="view-value" id="view_niu"></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"><?= $this->lang->line('birth_country'); ?> :</span> <span class="view-value" id="view_birth_country"></span></div>
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
<div class="col-md-12" style="margin-top: 20px;">
|
2026-02-03 16:29:12 +00:00
|
|
|
<h5 class="section-header"><?= $this->lang->line('section_identity_docs'); ?></h5>
|
2026-02-02 10:08:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
2026-02-03 16:29:12 +00:00
|
|
|
<span class="view-label"><?= $this->lang->line('doc_recto'); ?> :</span>
|
2026-02-02 10:08:12 +00:00
|
|
|
<div id="container_doc_front" style="margin-top:5px;">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
2026-02-03 16:29:12 +00:00
|
|
|
<span class="view-label"><?= $this->lang->line('doc_verso'); ?> :</span>
|
2026-02-02 10:08:12 +00:00
|
|
|
<div id="container_doc_back" style="margin-top:5px;">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $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"><?= $this->lang->line('client_code'); ?> :</span> <span class="view-value" id="view_customer_number"></span></div>
|
2026-02-02 10:08:12 +00:00
|
|
|
<div class="col-md-4"><span class="view-label">Type :</span> <span class="view-value" id="view_type"></span></div>
|
2026-02-03 16:29:12 +00:00
|
|
|
<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">Iban :</span> <span class="view-value" id="view_iban"></span></div>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('profession'); ?> :</span> <span class="view-value" id="view_profession"></span></div>
|
2026-02-02 10:08:12 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $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"><?= $this->lang->line('employer_city'); ?>:</span> <span class="view-value" id="view_employer_city"></span></div>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-02 10:08:12 +00:00
|
|
|
<div class="modal-footer" style="background-color: #f9f9f9;">
|
|
|
|
|
|
|
|
|
|
<!-- BLOC 1 : Boutons par défaut (Fermer, Rejeter, Valider) -->
|
|
|
|
|
<div id="default-actions" style="display: flex; justify-content: space-between;">
|
2026-02-03 16:29:12 +00:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"><?= $this->lang->line('btn_close'); ?></button>
|
2026-02-02 10:08:12 +00:00
|
|
|
<div>
|
|
|
|
|
<button type="button" class="btn btn-danger btn-lg" id="btn-show-reject-input">
|
2026-02-03 16:29:12 +00:00
|
|
|
<i class="fa fa-times"></i> <?= $this->lang->line('btn_reject'); ?>
|
2026-02-02 10:08:12 +00:00
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-success btn-lg" id="btn-validate-request" style="margin-left: 10px;">
|
2026-02-03 16:29:12 +00:00
|
|
|
<i class="fa fa-check"></i> <?= $this->lang->line('btn_validate'); ?>
|
2026-02-02 10:08:12 +00:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
<!-- BLOC 2 : Zone de saisie du motif (Cachée par défaut) -->
|
|
|
|
|
<div id="reject-area" style="display: none;">
|
|
|
|
|
<div class="form-group text-left">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label class="text-danger"><?= $this->lang->line('reject_reason'); ?> * :</label>
|
|
|
|
|
<textarea id="reject_reason" class="form-control" rows="3" placeholder="<?= $this->lang->line('reject_reason_placeholder'); ?>"></textarea>
|
2026-02-02 10:08:12 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="text-right">
|
2026-02-03 16:29:12 +00:00
|
|
|
<button type="button" class="btn btn-default" id="btn-cancel-reject"><?= $this->lang->line('btn_cancel'); ?></button>
|
2026-02-02 10:08:12 +00:00
|
|
|
<button type="button" class="btn btn-danger" id="btn-confirm-reject">
|
2026-02-03 16:29:12 +00:00
|
|
|
<?= $this->lang->line('btn_confirm_reject'); ?>
|
2026-02-02 10:08:12 +00:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- =======================================================
|
|
|
|
|
MODAL 2 : VÉRIFICATION RATTACHEMENT
|
|
|
|
|
======================================================= -->
|
|
|
|
|
<div class="modal fade" id="reviewLinkModal">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
2026-02-03 16:29:12 +00:00
|
|
|
<h4 class="modal-title text-center"><?= $this->lang->line('modal_title_review_link'); ?></h4>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<input type="hidden" id="link_id_transaction">
|
|
|
|
|
<div class="row">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $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"><?= $this->lang->line('full_name'); ?> :</span> <span class="view-value" id="link_fullname"></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"><?= $this->lang->line('phone_number'); ?> :</span> <span class="view-value" id="link_phone"></span></div>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12"><h5 class="section-header"><?= $this->lang->line('section_bank_info'); ?></h5></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-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"><?= $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>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('current_status'); ?> :</span> <span class="view-value" id="link_status"></span></div>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer" style="background-color: #f9f9f9; display: flex; justify-content: space-between;">
|
2026-02-03 16:29:12 +00:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"><?= $this->lang->line('btn_close'); ?></button>
|
2026-01-20 14:16:54 +00:00
|
|
|
<div>
|
2026-02-03 16:29:12 +00:00
|
|
|
<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> <?= $this->lang->line('btn_validate'); ?></button>
|
2026-01-20 14:16:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- =======================================================
|
|
|
|
|
MODAL 3 : EDIT (COMPLET AVEC TOUS LES CHAMPS)
|
|
|
|
|
======================================================= -->
|
2025-12-10 17:00:48 +00:00
|
|
|
<div class="modal fade" id="editModal">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
2026-02-03 16:29:12 +00:00
|
|
|
<h4 class="modal-title text-center"><?= $this->lang->line('modal_title_edit_request'); ?></h4>
|
2025-12-10 17:00:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<form id="update-form" class="bottom-75 center-block">
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="id" id="edit_id">
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $this->lang->line('firstname'); ?></label><input id="edit_firstname" name="firstname" class="form-control input-lg" required></div>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $this->lang->line('client_code'); ?></label><input id="edit_customer_number" name="customer_number" class="form-control input-lg"></div>
|
2026-02-02 10:08:12 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<div class="col-md-6"><label>Iban</label><input id="edit_iban" name="iban" class="form-control input-lg"></div>
|
2026-01-20 14:16:54 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $this->lang->line('balance'); ?></label><input id="edit_balance" name="balance" class="form-control input-lg" disabled></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label><?= $this->lang->line('account_status'); ?></label>
|
2025-12-10 17:00:48 +00:00
|
|
|
<select id="edit_status" name="status" class="form-control input-lg" required>
|
2026-02-03 16:29:12 +00:00
|
|
|
<option value="pending"><?= $this->lang->line('status_pending'); ?></option>
|
|
|
|
|
<option value="actived"><?= $this->lang->line('status_active'); ?></option>
|
|
|
|
|
<option value="validated"><?= $this->lang->line('status_validated'); ?></option>
|
|
|
|
|
<option value="rejected"><?= $this->lang->line('status_rejected'); ?></option>
|
2026-02-20 13:16:54 +00:00
|
|
|
<option value="closed"><?= $this->lang->line('status_closed'); ?></option>
|
2025-12-10 17:00:48 +00:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<div class="col-md-6"><label><?= $this->lang->line('reason'); ?></label><input id="edit_reason" name="reason" class="form-control input-lg" required></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $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><?= $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><?= $this->lang->line('nationality'); ?></label><input id="edit_nationality" name="nationality" class="form-control input-lg" required></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
2026-02-03 16:29:12 +00:00
|
|
|
<label><?= $this->lang->line('marital_status'); ?></label>
|
2025-12-10 17:00:48 +00:00
|
|
|
<select id="edit_marital_status" name="marital_status" class="form-control input-lg" required>
|
2026-02-03 16:29:12 +00:00
|
|
|
<option value="celibataire"><?= $this->lang->line('status_single'); ?></option>
|
|
|
|
|
<option value="marie"><?= $this->lang->line('status_married'); ?></option>
|
|
|
|
|
<option value="veuf"><?= $this->lang->line('status_widowed'); ?></option>
|
|
|
|
|
<option value="divorce"><?= $this->lang->line('status_divorced'); ?></option>
|
2025-12-10 17:00:48 +00:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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>
|
2026-02-02 10:08:12 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $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><?= $this->lang->line('profession'); ?></label><input id="edit_profession" name="profession" class="form-control input-lg" required></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
<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><?= $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><?= $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><?= $this->lang->line('creation_date'); ?></label><input id="edit_created_at" readonly class="form-control input-lg"></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<br>
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('btn_close'); ?></button>
|
2025-12-10 17:00:48 +00:00
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
<!-- MODAL DELETE (Agency) -->
|
2025-12-10 17:00:48 +00:00
|
|
|
<div class="modal fade" id="deleteModal">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
2026-02-03 16:29:12 +00:00
|
|
|
<div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span>×</span></button><h4 class="modal-title"><?= $this->lang->line('modal_title_confirm_delete'); ?></h4></div>
|
|
|
|
|
<div class="modal-body"><p><?= $this->lang->line('msg_confirm_delete_account'); ?></p><input type="hidden" id="delete_id"></div>
|
2025-12-10 17:00:48 +00:00
|
|
|
<div class="modal-footer">
|
2026-02-03 16:29:12 +00:00
|
|
|
<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"><?= $this->lang->line('btn_yes_delete'); ?></button>
|
2025-12-10 17:00:48 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
<!-- Scripts -->
|
2025-12-10 17:00:48 +00:00
|
|
|
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
|
|
|
|
|
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap.min.js"></script>
|
2026-01-20 14:16:54 +00:00
|
|
|
<!-- Export Scripts -->
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/2.4.1/js/dataTables.buttons.min.js"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.bootstrap.min.js"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.print.min.js"></script>
|
2025-12-10 17:00:48 +00:00
|
|
|
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
// Configuration commune pour l'exportation
|
|
|
|
|
const exportButtonsConfig = [
|
|
|
|
|
'pageLength',
|
|
|
|
|
{
|
|
|
|
|
extend: 'excelHtml5',
|
|
|
|
|
text: '<i class="fa fa-file-excel-o"></i> Excel',
|
2026-02-03 16:29:12 +00:00
|
|
|
titleAttr: '<?= $this->lang->line("export_excel"); ?>',
|
2026-01-20 14:16:54 +00:00
|
|
|
className: 'btn btn-success btn-sm',
|
|
|
|
|
exportOptions: { columns: ':not(:last-child)' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
extend: 'csvHtml5',
|
|
|
|
|
text: '<i class="fa fa-file-text-o"></i> CSV',
|
2026-02-03 16:29:12 +00:00
|
|
|
titleAttr: '<?= $this->lang->line("export_csv"); ?>',
|
2026-01-20 14:16:54 +00:00
|
|
|
className: 'btn btn-info btn-sm',
|
|
|
|
|
exportOptions: { columns: ':not(:last-child)' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
extend: 'pdfHtml5',
|
|
|
|
|
text: '<i class="fa fa-file-pdf-o"></i> PDF',
|
2026-02-03 16:29:12 +00:00
|
|
|
titleAttr: '<?= $this->lang->line("export_pdf"); ?>',
|
2026-01-20 14:16:54 +00:00
|
|
|
className: 'btn btn-danger btn-sm',
|
|
|
|
|
orientation: 'landscape',
|
|
|
|
|
pageSize: 'LEGAL',
|
|
|
|
|
exportOptions: { columns: ':not(:last-child)' }
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// TABLEAU 1 : COMPTES AGENCE
|
2025-12-10 17:00:48 +00:00
|
|
|
$('#accountsTable').DataTable({
|
|
|
|
|
"pageLength": 10,
|
|
|
|
|
"ordering": true,
|
2026-01-20 14:16:54 +00:00
|
|
|
"scrollX": true,
|
2026-02-02 16:53:59 +00:00
|
|
|
"order": [[ 0, "asc" ]],
|
2026-01-20 14:16:54 +00:00
|
|
|
dom: "<'row'<'col-sm-6'B><'col-sm-6'f>>" +
|
|
|
|
|
"<'row'<'col-sm-12'tr>>" +
|
|
|
|
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
2026-02-03 16:29:12 +00:00
|
|
|
buttons: exportButtonsConfig,
|
|
|
|
|
language: {
|
|
|
|
|
url: "<?= base_url('assets/plugins/datatables/i18n/' . ($this->session->userdata('site_lang') == 'english' ? 'English' : 'French') . '.json') ?>"
|
|
|
|
|
}
|
2026-01-20 14:16:54 +00:00
|
|
|
});
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
// TABLEAU 2 : DEMANDES DE RATTACHEMENT
|
|
|
|
|
$('#linksTable').DataTable({
|
|
|
|
|
"pageLength": 10,
|
|
|
|
|
"ordering": true,
|
|
|
|
|
"scrollX": true,
|
2026-02-02 16:53:59 +00:00
|
|
|
"order": [[ 0, "asc" ]],
|
2026-01-20 14:16:54 +00:00
|
|
|
dom: "<'row'<'col-sm-6'B><'col-sm-6'f>>" +
|
|
|
|
|
"<'row'<'col-sm-12'tr>>" +
|
|
|
|
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
2026-02-03 16:29:12 +00:00
|
|
|
buttons: exportButtonsConfig,
|
|
|
|
|
language: {
|
|
|
|
|
url: "<?= base_url('assets/plugins/datatables/i18n/' . ($this->session->userdata('site_lang') == 'english' ? 'English' : 'French') . '.json') ?>"
|
|
|
|
|
}
|
2025-12-10 17:00:48 +00:00
|
|
|
});
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
// Datepicker pour le champ date de naissance
|
|
|
|
|
flatpickr("#edit_birth_date", {
|
2025-12-10 17:00:48 +00:00
|
|
|
dateFormat: "Y-m-d",
|
|
|
|
|
maxDate: "today",
|
|
|
|
|
disableMobile: true
|
|
|
|
|
});
|
|
|
|
|
|
2026-01-20 14:16:54 +00:00
|
|
|
/* =====================================================
|
|
|
|
|
* LOGIQUE MODAL EDIT (AGENCY) - TOUS CHAMPS RESTAURÉS
|
2025-12-10 17:00:48 +00:00
|
|
|
* ===================================================== */
|
|
|
|
|
$(document).on("click", ".open-edit-modal", function () {
|
|
|
|
|
const fields = [
|
2026-02-02 10:08:12 +00:00
|
|
|
"id", "lastname", "firstname", "account_number", "iban",
|
2025-12-10 17:00:48 +00:00
|
|
|
"status", "reason", "balance", "birth_date", "birth_country",
|
2026-02-02 10:08:12 +00:00
|
|
|
"birth_city", "identification_number", "niu", "phone_number",
|
|
|
|
|
"spouse_name", "employer_city", "nationality",
|
|
|
|
|
"marital_status", "profession","customer_number",
|
|
|
|
|
"employer_name", "employer_address", "created_at", "type"
|
2025-12-10 17:00:48 +00:00
|
|
|
];
|
|
|
|
|
fields.forEach(f => {
|
|
|
|
|
$("#edit_" + f).val($(this).data(f));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btn-save-edit").on("click", function (e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/update_request_agency'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: $("#update-form").serialize(),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
2026-01-20 14:16:54 +00:00
|
|
|
if (res && res.success === "ok") {
|
|
|
|
|
$('#editModal').modal('hide');
|
|
|
|
|
toastr.success(res.message);
|
|
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error(res.message || "<?= $this->lang->line('error_update_generic'); ?>");
|
2025-12-10 17:00:48 +00:00
|
|
|
}
|
|
|
|
|
},
|
2026-02-03 16:29:12 +00:00
|
|
|
error: function() { toastr.error("<?= $this->lang->line('error_server_500'); ?>"); }
|
2026-01-20 14:16:54 +00:00
|
|
|
});
|
|
|
|
|
});
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
/* =====================================================
|
|
|
|
|
* 1. OUVERTURE MODAL REVIEW (AGENCY)
|
2026-01-20 14:16:54 +00:00
|
|
|
* ===================================================== */
|
2026-02-02 16:53:59 +00:00
|
|
|
$(document).on("click", ".open-review-modal", function () {
|
2026-02-02 10:08:12 +00:00
|
|
|
let id = $(this).data("id");
|
2026-02-02 16:53:59 +00:00
|
|
|
let status = $(this).data("status"); // On récupère le statut
|
|
|
|
|
|
2026-02-02 10:08:12 +00:00
|
|
|
$("#review_id").val(id);
|
|
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
if (status === 'actived') {
|
|
|
|
|
// Si actif, on désactive le bouton et on change le texte éventuellement
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-request").prop("disabled", true).text("<?= $this->lang->line('msg_already_active'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
$("#btn-reject-request").prop("disabled", true); // Optionnel : désactiver aussi le rejet
|
|
|
|
|
} else {
|
|
|
|
|
// Sinon, on le réactive (important si on ouvre une autre ligne après)
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-request").prop("disabled", false).html('<i class="fa fa-check"></i> <?= $this->lang->line("btn_validate"); ?>');
|
2026-02-02 16:53:59 +00:00
|
|
|
$("#btn-reject-request").prop("disabled", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reset de l'interface UI (Motif rejet caché, etc.)
|
2026-02-02 10:08:12 +00:00
|
|
|
$("#default-actions").show();
|
|
|
|
|
$("#reject-area").hide();
|
|
|
|
|
$("#reject_reason").val("");
|
|
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
// Remplissage des données textes
|
2026-02-03 16:29:12 +00:00
|
|
|
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"];
|
2026-02-02 16:53:59 +00:00
|
|
|
fields.forEach(f => { $("#view_" + f).text($(this).data(f) || "-"); });
|
2026-02-02 10:08:12 +00:00
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
// Gestion des documents (inchangé)
|
2026-02-02 10:08:12 +00:00
|
|
|
let docFront = $(this).data("doc_front");
|
|
|
|
|
let docBack = $(this).data("doc_back");
|
|
|
|
|
$("#hidden_doc_front").val(docFront);
|
|
|
|
|
$("#hidden_doc_back").val(docBack);
|
2026-02-02 16:53:59 +00:00
|
|
|
|
|
|
|
|
// Affichage images... (inchangé)
|
2026-02-02 10:08:12 +00:00
|
|
|
if(docFront && docFront !== "") {
|
|
|
|
|
$("#container_doc_front").html(`<a href="${docFront}" target="_blank"><img src="${docFront}" class="img-thumbnail" style="max-height: 150px;"></a>`);
|
2026-02-03 16:29:12 +00:00
|
|
|
} else { $("#container_doc_front").html('<span class="text-muted"><?= $this->lang->line("msg_no_document"); ?></span>'); }
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
if(docBack && docBack !== "") {
|
|
|
|
|
$("#container_doc_back").html(`<a href="${docBack}" target="_blank"><img src="${docBack}" class="img-thumbnail" style="max-height: 150px;"></a>`);
|
2026-02-03 16:29:12 +00:00
|
|
|
} else { $("#container_doc_back").html('<span class="text-muted"><?= $this->lang->line("msg_no_document"); ?></span>'); }
|
2026-01-20 14:16:54 +00:00
|
|
|
});
|
|
|
|
|
|
2026-02-02 10:08:12 +00:00
|
|
|
/* =====================================================
|
|
|
|
|
* 2. LOGIQUE UI : BASCULEMENT VERS LA ZONE DE REJET
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
// Quand on clique sur "REJETER" (le gros bouton rouge)
|
|
|
|
|
$("#btn-show-reject-input").click(function() {
|
|
|
|
|
$("#default-actions").slideUp(); // On cache les boutons
|
|
|
|
|
$("#reject-area").slideDown(); // On affiche le textarea
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Quand on clique sur "Annuler" (dans la zone de rejet)
|
|
|
|
|
$("#btn-cancel-reject").click(function() {
|
|
|
|
|
$("#reject-area").slideUp();
|
|
|
|
|
$("#default-actions").slideDown();
|
|
|
|
|
$("#reject_reason").val(""); // On nettoie
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* =====================================================
|
|
|
|
|
* 3. ACTION : CONFIRMER LE REJET (Update simple)
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
$("#btn-confirm-reject").click(function() {
|
|
|
|
|
let id = $("#review_id").val();
|
|
|
|
|
let reason = $("#reject_reason").val().trim();
|
|
|
|
|
|
|
|
|
|
// Validation : Le motif est obligatoire
|
|
|
|
|
if(reason === "") {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.warning("<?= $this->lang->line('msg_enter_reject_reason'); ?>");
|
2026-02-02 10:08:12 +00:00
|
|
|
$("#reject_reason").focus();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Désactivation pour éviter double clic
|
2026-02-03 16:29:12 +00:00
|
|
|
$(this).prop('disabled', true).text('<?= $this->lang->line("processing"); ?>');
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/update_request_agency'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: {
|
|
|
|
|
id: id,
|
|
|
|
|
status: 'rejected',
|
|
|
|
|
reason: reason // On envoie le motif saisi
|
|
|
|
|
},
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res && res.success === "ok") {
|
|
|
|
|
$('#reviewModal').modal('hide');
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.warning("<?= $this->lang->line('msg_request_rejected_success'); ?>");
|
2026-02-02 10:08:12 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error(res.message || "<?= $this->lang->line('error_reject_generic'); ?>");
|
|
|
|
|
$("#btn-confirm-reject").prop('disabled', false).text('<?= $this->lang->line("btn_confirm_reject"); ?>');
|
2026-02-02 10:08:12 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error: function () {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error("<?= $this->lang->line('error_server_500'); ?>");
|
|
|
|
|
$("#btn-confirm-reject").prop('disabled', false).text('<?= $this->lang->line("btn_confirm_reject"); ?>');
|
2026-02-02 10:08:12 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* =====================================================
|
|
|
|
|
* LOGIQUE DE VALIDATION (AGENCY BANKING)
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
|
|
|
|
|
// 1. Fonction pour VALIDER
|
|
|
|
|
function validateAgencyRequest() {
|
|
|
|
|
let id = $("#review_id").val();
|
|
|
|
|
|
|
|
|
|
// Récupération des documents (stockés dans les inputs cachés lors de l'ouverture du modal)
|
|
|
|
|
let docFront = $("#hidden_doc_front").val();
|
|
|
|
|
let docBack = $("#hidden_doc_back").val();
|
|
|
|
|
|
|
|
|
|
// On peut désactiver le bouton pour éviter le double clic
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-request").prop('disabled', true).html('<i class="fa fa-spinner fa-spin"></i> <?= $this->lang->line("processing"); ?>');
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/validate_request_agency'); ?>", // URL SPÉCIFIQUE
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: {
|
|
|
|
|
id: id,
|
2026-02-02 16:53:59 +00:00
|
|
|
status: 'actived',
|
2026-02-02 10:08:12 +00:00
|
|
|
doc_front: docFront,
|
|
|
|
|
doc_back: docBack
|
|
|
|
|
},
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-request").prop('disabled', false).html('<?= $this->lang->line("btn_validate"); ?>');
|
2026-02-02 10:08:12 +00:00
|
|
|
|
|
|
|
|
if (res && res.success === "ok") {
|
|
|
|
|
$('#reviewModal').modal('hide');
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.success(res.message || "<?= $this->lang->line('msg_request_validated_success'); ?>");
|
2026-02-02 10:08:12 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error(res.message || "<?= $this->lang->line('error_validate_generic'); ?>");
|
2026-02-02 10:08:12 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error: function () {
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-request").prop('disabled', false).html('<?= $this->lang->line("btn_validate"); ?>');
|
|
|
|
|
toastr.error("<?= $this->lang->line('error_validate_server'); ?>");
|
2026-02-02 10:08:12 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clic sur VALIDER
|
|
|
|
|
$("#btn-validate-request").click(function() {
|
|
|
|
|
validateAgencyRequest();
|
|
|
|
|
});
|
2026-01-20 14:16:54 +00:00
|
|
|
|
|
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
/* =====================================================
|
|
|
|
|
* GESTION RATTACHEMENT : REVIEW
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
$(document).on("click", ".open-link-review-modal", function () {
|
|
|
|
|
|
|
|
|
|
let status = $(this).data("status"); // Récupère 'active', 'pending', etc.
|
2025-12-10 17:00:48 +00:00
|
|
|
|
2026-02-02 16:53:59 +00:00
|
|
|
// --- GESTION DU BOUTON VALIDATION ---
|
2026-02-03 16:29:12 +00:00
|
|
|
if (status === 'actived' || status === 'validated' || status == 1) {
|
|
|
|
|
$("#btn-validate-link").prop("disabled", true).text("<?= $this->lang->line('msg_already_validated'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
$("#btn-reject-link").prop("disabled", true);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-link").prop("disabled", false).html('<i class="fa fa-check"></i> <?= $this->lang->line("btn_validate"); ?>');
|
2026-02-02 16:53:59 +00:00
|
|
|
$("#btn-reject-link").prop("disabled", false);
|
|
|
|
|
}
|
|
|
|
|
// -------------------------------------
|
|
|
|
|
|
|
|
|
|
$("#link_id_transaction").val($(this).data("id"));
|
|
|
|
|
|
|
|
|
|
$("#link_user_code").text($(this).data("user_code"));
|
|
|
|
|
$("#link_fullname").text($(this).data("fullname"));
|
|
|
|
|
$("#link_email").text($(this).data("email"));
|
|
|
|
|
$("#link_phone").text($(this).data("phone"));
|
|
|
|
|
|
|
|
|
|
$("#link_bank_name").text($(this).data("bank_name"));
|
|
|
|
|
$("#link_bank_address").text($(this).data("bank_address"));
|
|
|
|
|
$("#link_iban").text($(this).data("iban"));
|
|
|
|
|
$("#link_code_client").text($(this).data("code_client"));
|
|
|
|
|
$("#link_status").text(status);
|
|
|
|
|
$("#link_created_at").text($(this).data("created_at"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 2. Valider (API + Transaction)
|
|
|
|
|
$("#btn-validate-link").click(function() {
|
|
|
|
|
let iban = $("#link_iban").text();
|
|
|
|
|
let transactionId = $("#link_id_transaction").val();
|
|
|
|
|
|
|
|
|
|
$(this).prop('disabled', true).html('<i class="fa fa-spinner fa-spin"></i>');
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/validate_link_request'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: {
|
|
|
|
|
iban: iban,
|
|
|
|
|
id_transaction: transactionId
|
|
|
|
|
},
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res && res.success === "ok") {
|
|
|
|
|
$('#reviewLinkModal').modal('hide');
|
|
|
|
|
toastr.success(res.message);
|
|
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
|
|
|
|
toastr.error(res.message);
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-link").prop('disabled', false).html('<?= $this->lang->line("btn_validate"); ?>');
|
2026-02-02 16:53:59 +00:00
|
|
|
}
|
|
|
|
|
},
|
2026-02-20 13:16:54 +00:00
|
|
|
error: function (error) {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error("<?= $this->lang->line('error_server_500'); ?>");
|
2026-02-20 13:16:54 +00:00
|
|
|
console.error("AJAX Error: ", error);
|
2026-02-03 16:29:12 +00:00
|
|
|
$("#btn-validate-link").prop('disabled', false).html('<?= $this->lang->line("btn_validate"); ?>');
|
2026-02-02 16:53:59 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 3. Rejeter (Update Local Simple)
|
|
|
|
|
$("#btn-reject-link").click(function() {
|
|
|
|
|
let id = $("#link_id_transaction").val();
|
|
|
|
|
|
2026-02-03 16:29:12 +00:00
|
|
|
if(!confirm("<?= $this->lang->line('msg_confirm_reject_link'); ?>")) return;
|
2026-02-02 16:53:59 +00:00
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/update_link_request'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: { id_transaction: id, is_verified: 2 }, // 2 = Rejected
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.success === "ok") {
|
|
|
|
|
$('#reviewLinkModal').modal('hide');
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.warning("<?= $this->lang->line('msg_link_rejected'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error("<?= $this->lang->line('error_reject_generic'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* =====================================================
|
|
|
|
|
* GESTION RATTACHEMENT : MODIFIER (EDIT)
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
$(document).on("click", ".open-edit-link-modal", function () {
|
|
|
|
|
$("#edit_link_id").val($(this).data("id"));
|
|
|
|
|
$("#edit_link_iban").val($(this).data("iban"));
|
|
|
|
|
$("#edit_link_code_client").val($(this).data("code_client"));
|
|
|
|
|
$("#edit_link_bank_name").val($(this).data("bank_name"));
|
|
|
|
|
$("#edit_link_status").val($(this).data("status"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btn-save-edit-link").click(function() {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/update_link_request'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: $("#update-link-form").serialize(),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.success === "ok") {
|
|
|
|
|
$('#editLinkModal').modal('hide');
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.success("<?= $this->lang->line('msg_changes_saved'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error("<?= $this->lang->line('error_update_generic'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* =====================================================
|
|
|
|
|
* GESTION RATTACHEMENT : SUPPRIMER (DELETE)
|
|
|
|
|
* ===================================================== */
|
|
|
|
|
|
|
|
|
|
$(document).on("click", ".btn-delete-link", function() {
|
|
|
|
|
let id = $(this).data('id');
|
|
|
|
|
$("#delete_link_id").val(id);
|
|
|
|
|
$("#deleteLinkModal").modal("show");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#confirmDeleteLink").click(function() {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/delete_link_request'); ?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: { id_transaction: $("#delete_link_id").val() },
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.success === "ok") {
|
|
|
|
|
$('#deleteLinkModal').modal('hide');
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.success("<?= $this->lang->line('msg_delete_success'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
|
|
|
|
} else {
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.error("<?= $this->lang->line('error_delete_generic'); ?>");
|
2026-02-02 16:53:59 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2026-01-20 14:16:54 +00:00
|
|
|
|
|
|
|
|
|
2025-12-10 17:00:48 +00:00
|
|
|
/* =====================================================
|
2026-01-20 14:16:54 +00:00
|
|
|
* LOGIQUE DELETE
|
2025-12-10 17:00:48 +00:00
|
|
|
* ===================================================== */
|
|
|
|
|
window.deleteRequest = function (id) {
|
|
|
|
|
$("#delete_id").val(id);
|
|
|
|
|
$("#deleteModal").modal("show");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$("#confirmDelete").click(function () {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?= base_url('Gestion/delete_request_agency') ?>",
|
|
|
|
|
method: "POST",
|
2026-01-20 14:16:54 +00:00
|
|
|
data: { id: $("#delete_id").val() },
|
2025-12-10 17:00:48 +00:00
|
|
|
dataType: "json",
|
|
|
|
|
success: function (response) {
|
|
|
|
|
if (response.success === "ok") {
|
|
|
|
|
$("#deleteModal").modal("hide");
|
2026-02-03 16:29:12 +00:00
|
|
|
toastr.success(response.message || "<?= $this->lang->line('msg_delete_success'); ?>");
|
2026-01-20 14:16:54 +00:00
|
|
|
setTimeout(() => location.reload(), 1500);
|
2025-12-10 17:00:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2026-01-20 14:16:54 +00:00
|
|
|
</body>
|
|
|
|
|
</html>
|