fgdf
This commit is contained in:
parent
a68c1a6dd8
commit
486be1c162
|
|
@ -15735,45 +15735,53 @@ function afficher_lite_prestataire()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function afficher_lite_prestataire_lot()
|
function afficher_lite_prestataire_lot() {
|
||||||
{
|
// 1. Collecte des données
|
||||||
donnees = "";
|
const donnees = {
|
||||||
donnees_retour = "";
|
codeTypePrestataire: $("#codeTypePrestataire").val(),
|
||||||
|
categoriePresataire: $("#categoriePresataire").val(),
|
||||||
|
libelle: $("#libelle").val(),
|
||||||
|
codePays: $("#codePays").val(),
|
||||||
|
codeVille: $("#codeVille").val(),
|
||||||
|
codeLocalite: $("#codeLocalite").val()
|
||||||
|
};
|
||||||
|
|
||||||
|
// 2. Affichage du Loader Neutral Pro
|
||||||
codeTypePrestataire = $("#codeTypePrestataire").val();
|
const loader = `
|
||||||
categoriePresataire = $("#categoriePresataire").val();
|
<div class="d-flex justify-content-center align-items-center p-5">
|
||||||
libelle = $("#libelle").val();
|
<div class="text-center">
|
||||||
|
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;"></div>
|
||||||
codePays = $("#codePays").val();
|
<div class="mt-2 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||||
codeVille = $("#codeVille").val();
|
${($("#codeLangue").val() === 'en_US') ? 'Searching...' : 'Recherche en cours...'}
|
||||||
codeLocalite = $("#codeLocalite").val();
|
</div>
|
||||||
|
</div>
|
||||||
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
|
</div>`;
|
||||||
donnees += '&categoriePresataire=' + categoriePresataire;
|
|
||||||
donnees += '&libelle=' + libelle;
|
$("#div_liste_prestataire").html(loader);
|
||||||
|
|
||||||
donnees += '&codePays=' + codePays;
|
$.ajax({
|
||||||
donnees += '&codeVille=' + codeVille;
|
url: $("#racineWeb").val() + "Ajaxlisteprestataireparlot/",
|
||||||
donnees += '&codeLocalite=' + codeLocalite;
|
type: 'post',
|
||||||
|
data: donnees,
|
||||||
$("#div_liste_prestataire").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>');
|
success: function(data) {
|
||||||
|
// Injection des données
|
||||||
$.ajax({
|
$("#div_liste_prestataire").html(data);
|
||||||
url: $("#racineWeb").val()+"Ajaxlisteprestataireparlot/",
|
|
||||||
type : 'post',
|
// Mise à jour du compteur dans la vue parente
|
||||||
data: donnees,
|
const nbreFiltre = $("#nbligne_info").val() || 0;
|
||||||
error: function(errorData) {
|
if(typeof updateLotCounter === 'function'){
|
||||||
},
|
updateLotCounter(nbreFiltre);
|
||||||
success: function(data) {
|
} else {
|
||||||
donnees_retour = data;
|
$("#nbligne").val("Lignes Filtrées : " + nbreFiltre);
|
||||||
},
|
}
|
||||||
complete: function() {
|
|
||||||
$("#div_liste_prestataire").html(donnees_retour);
|
// Initialisation d'une DataTable si nécessaire
|
||||||
$("#nbligne").val("Lignes Filtrées : "+$("#nbligne_info").val());
|
if (typeof dataTableSpeciale === 'function') dataTableSpeciale();
|
||||||
dataTableSpeciale();
|
},
|
||||||
}
|
error: function() {
|
||||||
});
|
$("#div_liste_prestataire").html('<div class="alert alert-danger mx-3"><?= _("Erreur lors du chargement des données") ?></div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,82 +1,100 @@
|
||||||
<?php
|
<?php
|
||||||
$nbligne = 0;
|
$nbligne = 0;
|
||||||
|
$isAnglais = est_anglophone();
|
||||||
if (est_anglophone()){
|
|
||||||
if($existeselection){
|
// Libellé du bouton de sélection globale
|
||||||
$libbouton = "Uncheck all";
|
if ($isAnglais) {
|
||||||
}else{
|
$libbouton = $existeselection ? "Uncheck all" : "Check all";
|
||||||
$libbouton = "Check all";
|
} else {
|
||||||
}
|
$libbouton = $existeselection ? "Décocher tous" : "Cocher tous";
|
||||||
}else{
|
}
|
||||||
if($existeselection){
|
|
||||||
$libbouton = "Décocher tous";
|
|
||||||
}else{
|
|
||||||
$libbouton = "Cocher tous";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="div_liste_prestataire">
|
<div class="animate__animated animate__fadeIn">
|
||||||
<input class="sr-only" type="text" id="fichier_lister" name="fichier_lister" value="Ajaxlisteprestataireparlot" >
|
<input type="hidden" id="fichier_lister" name="fichier_lister" value="Ajaxlisteprestataireparlot">
|
||||||
<div id="div_nblignes_cochee" style="width:20%; margin:auto;">
|
|
||||||
<table class="table-responsive table-condensed" style='font-size:10pt;'>
|
<div class="d-flex justify-content-center mb-3">
|
||||||
<tbody>
|
<div class="badge bg-warning text-dark border shadow-sm px-4 py-2 rounded-pill fs-6">
|
||||||
<tr>
|
<i class="fas fa-check-square me-2"></i>
|
||||||
<td>
|
<?= _("Lignes Cochées :") ?> <span class="fw-bold" id="nbcoche_display"><?= format_N($this->nettoyer($nbreprestataire['nbcoche'])) ?></span>
|
||||||
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbcoche"
|
<input type="hidden" id="nbcoche" name="nbcoche" value="<?= $this->nettoyer($nbreprestataire['nbcoche']) ?>">
|
||||||
name="nbcoche" value="Lignes Cochées : <?= format_N($this->nettoyer($nbreprestataire['nbcoche'])) ?>" readonly>
|
</div>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
</tbody>
|
<div class="card border-0 shadow-sm">
|
||||||
</table>
|
<div class="table-responsive">
|
||||||
</div>
|
<table class="table table-hover align-middle mb-0 tabspeciale" style="font-size: 9.5pt;">
|
||||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabspeciale compact" style="font-size:10pt;">
|
<thead class="bg-light">
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th class="ps-3 py-3"><?= _("Nom du Prestataire") ?></th>
|
||||||
<th > <?= _("Nom") ?> </th>
|
<th class="text-center">Code</th>
|
||||||
<th style="text-align:center" width="5%" >Code</th>
|
<th class="text-center"><?= _("Catégorie") ?></th>
|
||||||
<th style="text-align:center"> <?= _("Catégorie") ?> </th>
|
<th class="text-center">Type</th>
|
||||||
<th style="text-align:center" > Type </th>
|
<th class="text-center"><?= _("Ville / Pays") ?></th>
|
||||||
<th style="text-align:center" > <?= _("Ville") ?> </th>
|
<th class="text-center py-3" width="150px">
|
||||||
<th style="text-align:center"> <?= _("Pays") ?> </th>
|
<button type="button" id="btn-coche"
|
||||||
<th class="text-center">
|
class="btn btn-sm <?= $existeselection ? 'btn-danger' : 'btn-primary' ?> rounded-pill px-3 fw-bold shadow-sm"
|
||||||
<button
|
onclick="selection_prestataire_lot();">
|
||||||
type="button" id="btn-coche" class="form-control btn btn-primary"
|
<i class="fas <?= $existeselection ? 'fa-times-circle' : 'fa-check-circle' ?> me-1"></i>
|
||||||
onclick="javascript:selection_prestataire_lot();" > <?= $libbouton; ?>
|
<?= $libbouton; ?>
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($prestataires as $prestataire):
|
<?php foreach ($prestataires as $v):
|
||||||
$id = $this->nettoyer($prestataire['id']);
|
$id = $this->nettoyer($v['id']);
|
||||||
$codePrestataire = $this->nettoyer($prestataire['codePrestataire']);
|
$check = ($v['choix'] == '1') ? 'checked' : '';
|
||||||
$nbligne++;
|
$nbligne++;
|
||||||
?>
|
?>
|
||||||
<tr ondblclick="javascript:afficher_prestataire_id(<?= $id ?>);" valign="top">
|
<tr ondblclick="afficher_prestataire_id(<?= $id ?>);">
|
||||||
<td><?= $this->nettoyer($prestataire['libelle']) ?></td>
|
<td class="ps-3 fw-bold text-dark text-uppercase"><?= $this->nettoyer($v['libelle']) ?></td>
|
||||||
<td align="center"><?= $this->nettoyer($prestataire['codePrestataire']) ?></td>
|
<td class="text-center"><span class="badge bg-light text-muted border"><?= $this->nettoyer($v['codePrestataire']) ?></span></td>
|
||||||
<td align="center"><?= $this->nettoyer($prestataire['libelleCategorie']) ?></td>
|
<td class="text-center small"><?= $this->nettoyer($v['libelleCategorie']) ?></td>
|
||||||
<td align="center"><?= $this->nettoyer($prestataire['typeprestataire']) ?></td>
|
<td class="text-center">
|
||||||
<td align="center"><?= $this->nettoyer($prestataire['localite']) ?></td>
|
<span class="badge bg-primary-ghost text-primary fw-normal"><?= $this->nettoyer($v['typeprestataire']) ?></span>
|
||||||
<td align="center"><?= $this->nettoyer($prestataire['codePays']) ?></td>
|
</td>
|
||||||
<td class="text-center" width="10%">
|
<td class="text-center">
|
||||||
<?php
|
<div class="fw-bold"><?= $this->nettoyer($v['localite']) ?></div>
|
||||||
if($this->nettoyer($prestataire['choix'] == '0')){
|
<div class="text-muted smaller text-uppercase"><?= $this->nettoyer($v['codePays']) ?></div>
|
||||||
$check ='';
|
</td>
|
||||||
}
|
<td class="text-center">
|
||||||
else{
|
<div class="form-check form-switch d-flex justify-content-center">
|
||||||
$check = 'checked';
|
<input class="form-check-input custom-switch-lg cursor-pointer"
|
||||||
}
|
type="checkbox"
|
||||||
?>
|
role="switch"
|
||||||
<INPUT TYPE="checkbox" class="custom-control-input" style="width: 2rem;height: 2rem;" id="choix"
|
id="choix_<?= $id ?>"
|
||||||
NAME="choix" value="<?=(($this->nettoyer($prestataire['choix'])==0)? 0 : 1);?>"
|
value="<?= ($v['choix'] == 0 ? 0 : 1) ?>"
|
||||||
onclick="if (this.checked) this.value=1; else this.value=0;cocherDecocherUn($('#fichier_lister').val(),<?= $id; ?>);" <?= $check;?>>
|
onclick="this.value = this.checked ? 1 : 0; cocherDecocherUn('Ajaxlisteprestataireparlot', <?= $id; ?>);"
|
||||||
</td>
|
<?= $check ?>>
|
||||||
</tr>
|
</div>
|
||||||
<?php endforeach; ?>
|
</td>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
<?php endforeach; ?>
|
||||||
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>" >
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Switch de grande taille pour une meilleure ergonomie */
|
||||||
|
.custom-switch-lg {
|
||||||
|
width: 3.5rem !important;
|
||||||
|
height: 1.75rem !important;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.custom-switch-lg:checked {
|
||||||
|
background-color: var(--bs-primary);
|
||||||
|
border-color: var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabspeciale tbody tr:hover {
|
||||||
|
background-color: rgba(33, 46, 83, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.smaller { font-size: 0.8rem; }
|
||||||
|
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
|
||||||
|
</style>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<div class="card border-0 shadow-sm mb-1">
|
<div class="card border-0 shadow-sm mb-1">
|
||||||
<div class="card-header bg-white py-3 border-bottom border-2">
|
<div class="card-header bg-white py-3 border-bottom border-2">
|
||||||
<h6 class="mb-0 fw-bold text-muted text-uppercase small"><i class="fas fa-filter me-2"></i><?= _("Critères de sélection") ?></h6>
|
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-filter me-2"></i><?= _("Critères de sélection") ?></h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body bg-light-subtle">
|
<div class="card-body bg-light-subtle">
|
||||||
<form id="form_filtre_lot">
|
<form id="form_filtre_lot">
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label class="form-label small fw-bold text-muted"><?= (isset($_SESSION['affichagedynamique']['District / Région'])) ? _($_SESSION['affichagedynamique']['District / Région']) : _("District / Région") ?></label>
|
<label class="form-label small fw-bold text-muted"><?= (isset($_SESSION['affichagedynamique']['District / Région / Province'])) ? _($_SESSION['affichagedynamique']['District / Région / Province']) : _("District / Région / Province") ?></label>
|
||||||
<div id="listeville">
|
<div id="listeville">
|
||||||
<select class="selectpicker form-control border-2" id="codeVille" name="codeVille" data-live-search="true" onchange="ajaxListerLocaliteConsultation();">
|
<select class="selectpicker form-control border-2" id="codeVille" name="codeVille" data-live-search="true" onchange="ajaxListerLocaliteConsultation();">
|
||||||
<?php liste_options_consultation($ville, ""); ?>
|
<?php liste_options_consultation($ville, ""); ?>
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form-label small fw-bold text-muted"><?= (isset($_SESSION['affichagedynamique']['Commune'])) ? _($_SESSION['affichagedynamique']['Commune']) : _("Commune") ?></label>
|
<label class="form-label small fw-bold text-muted"><?= (isset($_SESSION['affichagedynamique']['Ville / Localité'])) ? _($_SESSION['affichagedynamique']['Ville / Localité']) : _("Ville / Localité") ?></label>
|
||||||
<div id="listelocalite">
|
<div id="listelocalite">
|
||||||
<select class="selectpicker form-control border-2" id="codeLocalite" name="codeLocalite" data-live-search="true">
|
<select class="selectpicker form-control border-2" id="codeLocalite" name="codeLocalite" data-live-search="true">
|
||||||
<?php liste_options_consultation($listelocalite, "" ); ?>
|
<?php liste_options_consultation($listelocalite, "" ); ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user