df
This commit is contained in:
parent
c8a35b51a2
commit
89de61127b
121
Js/fonctions.js
121
Js/fonctions.js
|
|
@ -30799,44 +30799,40 @@ function enregistrer_modif_reseaus()
|
|||
|
||||
}
|
||||
|
||||
function afficher_reseau_categorie()
|
||||
{
|
||||
|
||||
|
||||
codeProduit=$("#codeProduit").val();
|
||||
/**
|
||||
* Affiche les réseaux (Disponibles vs Ajoutés) pour un produit
|
||||
*/
|
||||
function afficher_reseau_categorie() {
|
||||
const codeProduit = $("#codeProduit").val();
|
||||
|
||||
if (codeProduit<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un produit!";
|
||||
v_msgEng="Please select a category!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$('#div_produitreseau').html("");
|
||||
if (!codeProduit || codeProduit.trim() === "") {
|
||||
alert_ebene("Veuillez sélectionner un produit!", "Please select a product!");
|
||||
$('#div_produitreseau').html("");
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
// Loader Standard Neutral Pro
|
||||
const loader = `
|
||||
<div class="d-flex justify-content-center align-items-center p-5" style="min-height:300px;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-primary" role="status" style="width: 3.5rem; height: 3.5rem;"></div>
|
||||
<div class="mt-3 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||
${($("#codeLangue").val() === 'en_US') ? 'Loading networks...' : 'Chargement des réseaux...'}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#div_produitreseau').html(loader);
|
||||
|
||||
donnees = 'codeProduit='+codeProduit;
|
||||
|
||||
var div_attente = $('#div_produitreseau');
|
||||
|
||||
div_attente.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxproduitreseau/afficherreseaucategorie/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
},
|
||||
success: function(data) {
|
||||
div_attente.html(data);
|
||||
appliquerDataTable();
|
||||
|
||||
},
|
||||
complete: function() {
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxproduitreseau/afficherreseaucategorie/",
|
||||
type: 'post',
|
||||
data: { codeProduit: codeProduit },
|
||||
success: function(data) {
|
||||
$('#div_produitreseau').hide().html(data).fadeIn(400);
|
||||
if (typeof appliquerDataTable === 'function') appliquerDataTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ajouter_tous_reseaus_produit()
|
||||
|
|
@ -75293,42 +75289,33 @@ function recherchecodesociete()
|
|||
|
||||
}
|
||||
|
||||
function filtreproduitreseau(){
|
||||
|
||||
|
||||
var codeGcAssureur = $('#codeGcAssureur').val();
|
||||
|
||||
if(codeGcAssureur<=" "){
|
||||
$('#div_produitreseau').html("");
|
||||
}
|
||||
|
||||
donnees = 'codeGcAssureur='+codeGcAssureur;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxfiltreproduitreseau/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData){
|
||||
//alert("Erreur : "+errorData);
|
||||
},
|
||||
success: function(data) {
|
||||
//alert("Success : "+data);
|
||||
//
|
||||
$('#div_produit').html(data);
|
||||
|
||||
$("#codeProduit").selectpicker();
|
||||
},
|
||||
complete: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Filtre les produits selon le garant choisi
|
||||
*/
|
||||
function filtreproduitreseau() {
|
||||
const codeGcAssureur = $('#codeGcAssureur').val();
|
||||
|
||||
if (!codeGcAssureur || codeGcAssureur.trim() === "") {
|
||||
$('#div_produitreseau').html("");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxfiltreproduitreseau/",
|
||||
type: 'post',
|
||||
data: { codeGcAssureur: codeGcAssureur },
|
||||
success: function(data) {
|
||||
// Mise à jour du div contenant le select des produits
|
||||
$('#div_produit').html(data);
|
||||
|
||||
// Réinitialisation propre du SelectPicker Neutral Pro
|
||||
actualiserSelectPicker('#codeProduit');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function filtrefamilleactetype()
|
||||
{
|
||||
|
||||
|
||||
donnees = "codeTypePrestation="+$("#codeTypePrestation").val();
|
||||
|
||||
$.ajax({
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
<SELECT style="font-size:10pt; height:30px;" class="form-control selectpicker" data-live-search="true" id="codeProduit" NAME="codeProduit" required autofocus onChange="javascript:afficher_reseau_categorie();">
|
||||
<?php liste_options($produits,"",false); ?>
|
||||
</SELECT>
|
||||
<select class="selectpicker form-control border-2"
|
||||
data-live-search="true"
|
||||
id="codeProduit"
|
||||
name="codeProduit"
|
||||
required
|
||||
onchange="afficher_reseau_categorie();">
|
||||
<?php liste_options($produits, "", false); ?>
|
||||
</select>
|
||||
|
|
@ -1,71 +1,97 @@
|
|||
<div id="div_produitreseau">
|
||||
<div id="div_produitreseau" class="animate__animated animate__fadeIn">
|
||||
<div class="row g-1">
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-header bg-white py-3 border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h6 class="mb-0 fw-bold text-muted text-uppercase small">
|
||||
<i class="fas fa-unlock me-2"></i><?= _("Réseaux Disponibles") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary-ghost btn-sm w-100 rounded-pill fw-bold" onclick="ajouter_tous_reseaus_produit();">
|
||||
<?= _("Ajouter tous") ?> <i class="fas fa-angle-double-right ms-1"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive" style="max-height: 450px;">
|
||||
<table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
|
||||
<thead class="bg-light sticky-top">
|
||||
<tr>
|
||||
<th class="ps-3 py-2"><?= _("Libellé du Réseau") ?></th>
|
||||
<th class="text-center py-2" width="70px"><?= _("Action") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($reseausnonaccessibles as $v): $code = $v['codeReseau']; ?>
|
||||
<tr>
|
||||
<td class="ps-3 fw-bold text-dark"><?= $this->nettoyer($v['libelle']) ?></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-sm btn-primary-ghost rounded-circle action-icon"
|
||||
onclick="ajouter_un_reseau_produit('<?= $code ?>');" title="Ajouter">
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="div_adherents_importes_1" class="col-6" >
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center'> <?= _("RESEAUX DE SOINS DISPONIBLES") ?> </th>
|
||||
<!--<th width="20%" style='text-align:center'> <?= _("T M") ?> </th>-->
|
||||
<th style='text-align:center'> => </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:ajouter_tous_reseaus_produit();" > <?= _("Ajouter tous"). " ==>" ?> </button> </th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100 border-start border-success border-4">
|
||||
<div class="card-header bg-white py-3 border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h6 class="mb-0 fw-bold text-success text-uppercase small">
|
||||
<i class="fas fa-check-circle me-2"></i><?= _("Réseaux Accessibles") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger-light btn-sm w-100 rounded-pill fw-bold" onclick="retirer_tous_reseau_produit();">
|
||||
<i class="fas fa-angle-double-left me-1"></i> <?= _("Retirer tous les réseaux") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive" style="max-height: 450px;">
|
||||
<table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
|
||||
<thead class="bg-success-light text-success sticky-top">
|
||||
<tr>
|
||||
<th class="text-center py-2" width="70px"><?= _("Action") ?></th>
|
||||
<th class="py-2"><?= _("Libellé du Réseau") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($reseausaccessibles as $v): $code = $v['codeReseau']; ?>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-sm btn-danger-light rounded-circle action-icon"
|
||||
onclick="retirer_un_reseau_produit('<?= $code ?>');" title="Retirer">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td class="fw-bold text-dark text-uppercase"><?= $this->nettoyer($v['reseausoin']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($reseausnonaccessibles as $reseausnonaccessible):
|
||||
$codeReseau = $reseausnonaccessible['codeReseau'];
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'><?= $this->nettoyer($reseausnonaccessible['libelle']) ?></td>
|
||||
<!--<td align='center'><?= $this->nettoyer($reseausnonaccessible['tm']) ?></td>-->
|
||||
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_un_reseau_produit('<?=$codeReseau?>');" ></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="div_adherents_importes_2" class="col-6" >
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center'> <= </th>
|
||||
<th style='text-align:center'> <?= _("RESEAUX DE SOINS AJOUTES") ?> </th>
|
||||
<!--<th colspan="2" style='text-align:center'> <?= _("T M") ?> </th>-->
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-danger" onclick="javascript:retirer_tous_reseau_produit();" > <?= "<== " . _("Retirer tous les réseaux") ?> </button> </td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($reseausaccessibles as $reseausaccessible):
|
||||
$codeReseau = $reseausaccessible['codeReseau'];
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_un_reseau_produit('<?=$codeReseau?>');" ></td>
|
||||
|
||||
<td align='center'><?= $this->nettoyer($reseausaccessible['reseausoin']) ?></td>
|
||||
<!--
|
||||
<td <th width="15%" align='center'><?= $this->nettoyer($reseausaccessible['tm']) ?></td>
|
||||
|
||||
<td <th width="15%" >
|
||||
<INPUT style="font-size:10pt; text-align:center;" class="form-control" TYPE="number" value="<?= $this->nettoyer($reseausaccessible['tm']) ?>"
|
||||
onChange="this.value=supprimer_espace_nombre(this.value);if(controle_numerique(this)){maj_tm_produit_reseau('<?=$codeReseau?>', this.value);}">
|
||||
</td>
|
||||
-->
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<style>
|
||||
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; color: #212e53; }
|
||||
.bg-success-light { background-color: rgba(25, 135, 84, 0.08) !important; }
|
||||
.btn-danger-light { color: #dc3545; background-color: rgba(220, 53, 69, 0.1); border: none; }
|
||||
|
||||
.action-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
|
||||
.action-icon:hover { transform: scale(1.1); }
|
||||
|
||||
/* Scrollbar personnalisée */
|
||||
.table-responsive::-webkit-scrollbar { width: 5px; }
|
||||
.table-responsive::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user