dsf
This commit is contained in:
parent
eab5d76777
commit
9bfc2f93f2
|
|
@ -34432,41 +34432,41 @@ function afficher_garantie_produit() {
|
|||
const codeProduit = $("#codeProduit").val();
|
||||
const div_cible = $('#div_garantieproduit');
|
||||
const racineWeb = $("#racineWeb").val();
|
||||
const codeLangue = $("#codeLangue").val();
|
||||
|
||||
// 2. Validation du Garant (avec SweetAlert2)
|
||||
// 2. Validation du Garant via alert_ebene
|
||||
if (!codeGcAssureur || codeGcAssureur.trim() === "") {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: '<?= _("Garant manquant") ?>',
|
||||
text: '<?= _("Veuillez sélectionner un garant pour continuer.") ?>',
|
||||
confirmButtonColor: '#212e53'
|
||||
});
|
||||
let v_msg = "Garant manquant ! Veuillez sélectionner un garant pour continuer.";
|
||||
let v_msg_eng = "Guarantor missing ! Please select a guarantor to continue.";
|
||||
|
||||
alert_ebene(v_msg, v_msg_eng);
|
||||
|
||||
$("#codeGcAssureur").focus();
|
||||
div_cible.html("");
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. Validation du Produit
|
||||
// 3. Validation du Produit via alert_ebene
|
||||
if (!codeProduit || codeProduit.trim() === "") {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: '<?= _("Produit manquant") ?>',
|
||||
text: '<?= _("Veuillez sélectionner un produit !") ?>',
|
||||
confirmButtonColor: '#212e53'
|
||||
});
|
||||
let v_msg = "Produit manquant ! Veuillez sélectionner un produit.";
|
||||
let v_msg_eng = "Product missing ! Please select a product.";
|
||||
|
||||
alert_ebene(v_msg, v_msg_eng);
|
||||
|
||||
div_cible.html("");
|
||||
return;
|
||||
}
|
||||
|
||||
// 4. Préparation des paramètres et affichage du loader "Ghost"
|
||||
// 4. Préparation et affichage du loader bilingue
|
||||
const donnees = { codeProduit: codeProduit };
|
||||
let loadingTxt = (codeLangue === "en_US") ? "Loading the entry form..." : "Chargement du formulaire de saisie...";
|
||||
|
||||
div_cible.html(`
|
||||
<div class="d-flex flex-column align-items-center justify-content-center p-5">
|
||||
<div class="spinner-grow text-warning" role="status" style="width: 3rem; height: 3rem;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<h5 class="mt-4 text-warning fw-bold text-uppercase italic">${'<?= _("Chargement du formulaire de saisie...") ?>'}</h5>
|
||||
<h5 class="mt-4 text-warning fw-bold text-uppercase italic">${loadingTxt}</h5>
|
||||
</div>
|
||||
`);
|
||||
|
||||
|
|
@ -34476,28 +34476,26 @@ function afficher_garantie_produit() {
|
|||
type: 'post',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// Injection du contenu (Tableau avec inputs de modification)
|
||||
div_cible.html(data);
|
||||
|
||||
// INITIALISATION DATATABLE
|
||||
// On utilise l'ID #tableSeuilsModif qui doit être présent dans le retour AJAX
|
||||
setTimeout(function() {
|
||||
const nomProduit = $("#codeProduit option:selected").text();
|
||||
initSmartTable('#tableSeuilsModif', 'Modif Seuils - ' + nomProduit);
|
||||
}, 150);
|
||||
},
|
||||
error: function() {
|
||||
let errorTxt = (codeLangue === "en_US") ? "Technical error while retrieving the form." : "Erreur technique lors de la récupération du formulaire.";
|
||||
div_cible.html(`
|
||||
<div class="alert alert-danger d-flex align-items-center m-3" role="alert">
|
||||
<i class="fas fa-exclamation-triangle me-2"></i>
|
||||
<div>${'<?= _("Erreur technique lors de la récupération du formulaire.") ?>'}</div>
|
||||
<div>${errorTxt}</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function ajouter_tous_garantie_produit() {
|
||||
const codeProduit = $("#codeProduit").val();
|
||||
const racineWeb = $("#racineWeb").val();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user