diff --git a/Js/fonctions.js b/Js/fonctions.js index fa772aa..c52ab95 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -6304,6 +6304,35 @@ async function valider_opticien() { return; } + const otpStatus = Number($("#otpStatus").val()); + + // Gestion OTP facturation + let o_msg = ""; + let o_msgEng = ""; + + switch (otpStatus) { + case 0: + o_msg = "Veuillez envoyer un code de vérification à l'assuré!"; + o_msgEng = "Please send a verification code to the insured.!"; + break; + case 2: + o_msg = "Veuillez saisir le code de vérification reçu par l'assuré sur son téléphone portable ou son adresse e-mail!"; + o_msgEng = "Please enter the verification code received by the insured person on their mobile phone or at their email address!"; + break; + case 9: + o_msg = "Code incorrect, veuillez réessayer!"; + o_msgEng = "Incorrect code, please try again!"; + break; + default: + o_msg = "Veuillez envoyer un code de vérification à l'assuré!"; + o_msgEng = "Please send a verification code to the insured!"; + } + + if (otpStatus!=1 && otpStatus!=-1) { + alert_ebene(o_msg, o_msgEng); + return; + } + // Show confirmation dialog const isConfirmed = await confirm_ebene_sweet( "Confirmez-vous cette facturation?", diff --git a/Vue/gabarit.php b/Vue/gabarit.php index f0f465b..fe04be3 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -885,7 +885,7 @@ - +