117 lines
6.3 KiB
PHP
Executable File
117 lines
6.3 KiB
PHP
Executable File
<div class="row g-2">
|
|
<div id="div_sans_seuil" class="col-md-5">
|
|
<div class="card border-0 shadow-sm" style="border-radius: var(--radius-md);">
|
|
<div class="card-header bg-white border-0 py-3 d-flex align-items-center justify-content-between">
|
|
<h6 class="mb-0 fw-bold text-uppercase text-muted small">
|
|
<i class="fas fa-list-ul me-2"></i><?= _("Garanties Sans seuil") ?>
|
|
</h6>
|
|
<span class="badge bg-light text-dark rounded-pill"><?= count($garanties_sans_seuils) ?></span>
|
|
</div>
|
|
|
|
<div class="p-2 border-top border-bottom bg-light">
|
|
<button type="button" class="btn btn-primary btn-sm w-100 fw-bold shadow-sm" onclick="javascript:ajouter_tous_garantie_produit();">
|
|
<?= _("Tout Ajouter") ?> <i class="fas fa-angle-double-right ms-2"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="table-responsive" style="max-height: 500px; overflow-y: auto;">
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 9pt;">
|
|
<thead class="bg-white sticky-top shadow-xs">
|
|
<tr>
|
|
<th class="ps-3"><?= _("Libellé Garantie") ?></th>
|
|
<th width="15%" class="text-center"><?= _("Action") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($garanties_sans_seuils as $v): $codeGarantie = $v['codeGarantie']; ?>
|
|
<tr>
|
|
<td class="ps-3 fw-medium text-dark"><?= $this->nettoyer($v['garantie']) ?></td>
|
|
<td class="text-center">
|
|
<button class="btn btn-outline-primary btn-xs rounded-circle" title="<?= _('Ajouter') ?>"
|
|
onClick="javascript:ajouter_un_garantie_produit('<?=$codeGarantie?>');">
|
|
<i class="fas fa-chevron-right"></i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="div_avec_seuil" class="col-md-7">
|
|
<div class="card border-0 shadow-sm" style="border-radius: var(--radius-md);">
|
|
<div class="card-header bg-white border-0 py-3 d-flex align-items-center justify-content-between">
|
|
<h6 class="mb-0 fw-bold text-uppercase text-warning small">
|
|
<i class="fas fa-check-double me-2"></i><?= _("Garanties avec Seuil d'alerte") ?>
|
|
</h6>
|
|
<button type="button" class="btn btn-outline-danger btn-xs fw-bold px-3" onclick="javascript:retirer_tous_garantie_produit();">
|
|
<i class="fas fa-trash-alt me-1"></i> <?= _("Tout Retirer") ?>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table id="tableSeuilsModif" class="table table-hover align-middle mb-0" style="font-size: 9pt;">
|
|
<thead class="bg-light text-muted small">
|
|
<tr>
|
|
<th width="5%" class="text-center">#</th>
|
|
<th><?= _("Garantie") ?></th>
|
|
<th width="20%" class="text-center"><?= _("Taux (%)") ?></th>
|
|
<th width="25%" class="text-center"><?= _("Forfait (Montant)") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($garanties_avec_seuils as $v):
|
|
$id = $v['id'];
|
|
$taux = $v['tauxSeuilAlerte'];
|
|
$montant = $v['seuilAlerte'];
|
|
?>
|
|
<tr>
|
|
<td class="text-center">
|
|
<button class="btn btn-link text-danger p-0" title="<?= _('Retirer') ?>"
|
|
onClick="javascript:retirer_un_garantie_produit('<?=$id?>');">
|
|
<i class="fas fa-minus-circle"></i>
|
|
</button>
|
|
</td>
|
|
<td class="fw-bold text-dark"><?= $this->nettoyer($v['garantie']) ?></td>
|
|
<td>
|
|
<div class="input-group input-group-sm">
|
|
<input type="number" class="form-control text-center border-warning-subtle fw-bold" value="<?= $taux ?>"
|
|
onchange="if(controle_numerique(this)){maj_taux_seuil_alerte_garantie('<?=$id?>', this.value);}">
|
|
<span class="input-group-text bg-white"><i class="fas fa-percent text-muted small"></i></span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="input-group input-group-sm">
|
|
<input type="number" class="form-control text-end pe-2 border-warning-subtle fw-bold" value="<?= $montant ?>"
|
|
onchange="if(controle_numerique(this)){maj_seuil_alerte_garantie('<?=$id?>', this.value);}">
|
|
<span class="input-group-text bg-white small">CFA</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* Style spécifique pour les inputs de modification */
|
|
#tableSeuilsModif .form-control:focus {
|
|
background-color: #fff9f0;
|
|
border-color: #f39c12;
|
|
box-shadow: none;
|
|
}
|
|
|
|
#tableSeuilsModif .form-control {
|
|
background-color: #fafafa;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
/* Scroll personnalisé pour la liste de gauche */
|
|
#div_sans_seuil .table-responsive::-webkit-scrollbar { width: 6px; }
|
|
#div_sans_seuil .table-responsive::-webkit-scrollbar-thumb { background: #dcdcdc; border-radius: 10px; }
|
|
</style>
|