a
This commit is contained in:
parent
6481a5bc68
commit
db45261d54
|
|
@ -146,6 +146,13 @@ class ControleurAjaxcomposantetarif extends Controleur
|
|||
|
||||
public function validertarif()
|
||||
{
|
||||
$csrf_token = trim($this->requete->getParametreFormulaire("csrf_token"));
|
||||
|
||||
if (!Csrf::validateToken($csrf_token)) {
|
||||
$_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.';
|
||||
exit;
|
||||
}
|
||||
|
||||
$codeTarifActe = $this->requete->getParametreFormulaire("codeTarifActe");
|
||||
|
||||
$this->detailtarifacte->validertarif($codeTarifActe);
|
||||
|
|
|
|||
118
Js/fonctions.js
118
Js/fonctions.js
|
|
@ -63767,64 +63767,6 @@ function actualiserActesTarifes()
|
|||
|
||||
}
|
||||
|
||||
//21-05-2023
|
||||
function valider_tarif()
|
||||
{
|
||||
codeTarifActe=$("#codeTarifActe").val();
|
||||
codeFamilleActe=$("#codeFamilleActe").val();
|
||||
|
||||
if(codeTarifActe<=' ')
|
||||
{
|
||||
v_msg="Veuillez sélectionner un tarif!";
|
||||
v_msgEng="Please select a rate!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#codeTarifActe").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if(codeFamilleActe<=' ')
|
||||
{
|
||||
v_msg="Veuillez saisir une famille!";
|
||||
v_msgEng="Please select a family!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#codeFamilleActe").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
|
||||
|
||||
v_msg="Validez-vous cette composition de tarif?";
|
||||
v_msgEng="Do you validate this price composition?";
|
||||
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxcomposantetarif/validertarif/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data)
|
||||
{
|
||||
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
ajax_composante_tarif("1");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
console.log("Confirmation refusée");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ajouter_tous_prestataires_tarifclient()
|
||||
{
|
||||
idClient = $("#idClient").val();
|
||||
|
|
@ -92591,7 +92533,7 @@ function ajouter_un_acte_au_tarif(idActe)
|
|||
donnees = 'idActe='+idActe+'&codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
|
||||
|
||||
donnees = charger_csrf_token(donnees);
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxcomposantetarif/ajouterunacteautarif/",
|
||||
type: 'POST',
|
||||
|
|
@ -92605,3 +92547,61 @@ function ajouter_un_acte_au_tarif(idActe)
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function valider_tarif()
|
||||
{
|
||||
codeTarifActe=$("#codeTarifActe").val();
|
||||
codeFamilleActe=$("#codeFamilleActe").val();
|
||||
|
||||
if(codeTarifActe<=' ')
|
||||
{
|
||||
v_msg="Veuillez sélectionner un tarif!";
|
||||
v_msgEng="Please select a rate!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#codeTarifActe").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if(codeFamilleActe<=' ')
|
||||
{
|
||||
v_msg="Veuillez saisir une famille!";
|
||||
v_msgEng="Please select a family!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#codeFamilleActe").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
|
||||
|
||||
donnees = charger_csrf_token(donnees);
|
||||
|
||||
v_msg="Validez-vous cette composition de tarif?";
|
||||
v_msgEng="Do you validate this price composition?";
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxcomposantetarif/validertarif/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data)
|
||||
{
|
||||
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
ajax_composante_tarif("1");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
console.log("Confirmation refusée");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -985,7 +985,7 @@
|
|||
|
||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="Js/fonctions.js?ver=2026.04.20.09"></script>
|
||||
<script src="Js/fonctions.js?ver=2026.04.20.10"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user