fg
This commit is contained in:
parent
6d78454cd3
commit
d255fb7f7f
|
|
@ -35,5 +35,12 @@ class ControleurAjaxavenant extends Controleur {
|
||||||
|
|
||||||
$this->genererVueAjax(array('dateAvenant' => $dateAvenant));
|
$this->genererVueAjax(array('dateAvenant' => $dateAvenant));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function notifier()
|
||||||
|
{
|
||||||
|
$idAvenant = $this->requete->getParametre("idAvenant");
|
||||||
|
|
||||||
|
$this->avenant->notifieravenant($idAvenant);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -7258,4 +7258,30 @@ function requetes_detail_sinistres()
|
||||||
appliquerDataTable('.tabliste', {}, titre);
|
appliquerDataTable('.tabliste', {}, titre);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function envoyer_notification_avenant(idAvenant)
|
||||||
|
{
|
||||||
|
donnees = 'idAvenant='+idAvenant;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: $("#racineWeb").val()+"Ajaxavenant/notifier/",
|
||||||
|
type : 'post',
|
||||||
|
data: donnees,
|
||||||
|
error: function(errorData) {
|
||||||
|
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
const msg = "Votre notification a été transmise avec succès.";
|
||||||
|
const msgEng = "Your notification has been successfully sent.";
|
||||||
|
|
||||||
|
alert_ebene(msg, msgEng);
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
complete: function()
|
||||||
|
{
|
||||||
|
liste_avenant();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -104,5 +104,13 @@ class Avenant extends Modele {
|
||||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function notifieravenant($idAvenant)
|
||||||
|
{
|
||||||
|
$user = $_SESSION['codeUtilisateur'];
|
||||||
|
|
||||||
|
$sql = 'call sp_rh_notifier_avenant(?, ?)';
|
||||||
|
|
||||||
|
$this->executerRequete($sql, array($idAvenant, $user));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
$libelleAvenant = est_anglophone() ? $avenant['libelleAvenantEng'] : $avenant['libelleAvenant'];
|
$libelleAvenant = est_anglophone() ? $avenant['libelleAvenantEng'] : $avenant['libelleAvenant'];
|
||||||
$isFacture = ($avenant['facture'] == '1');
|
$isFacture = ($avenant['facture'] == '1');
|
||||||
$isRH = ($avenant['ajoutClient'] == '1');
|
$isRH = ($avenant['ajoutClient'] == '1');
|
||||||
|
$idAvenant = $avenant['idAvenant'];
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center fw-bold ps-3 text-secondary">
|
<td class="text-center fw-bold ps-3 text-secondary">
|
||||||
|
|
@ -74,7 +75,7 @@
|
||||||
<?php if($isRH): ?>
|
<?php if($isRH): ?>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-outline-primary fw-bold shadow-sm px-3"
|
class="btn btn-sm btn-outline-primary fw-bold shadow-sm px-3"
|
||||||
onclick="envoyer_notification_avenant('<?= $avenant['numeroAvenant'] ?>')">
|
onclick="envoyer_notification_avenant('<?= $idAvenant ?>')">
|
||||||
<i class="fas fa-bell me-1"></i> <?= _("Notifier") ?>
|
<i class="fas fa-bell me-1"></i> <?= _("Notifier") ?>
|
||||||
</button>
|
</button>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
@ -97,9 +98,9 @@
|
||||||
|
|
||||||
// Préparation du bloc d'informations (Le \n sert pour le retour à la ligne dans Excel/PDF)
|
// Préparation du bloc d'informations (Le \n sert pour le retour à la ligne dans Excel/PDF)
|
||||||
const infosComplementaires =
|
const infosComplementaires =
|
||||||
"<?= _('Souscripteur').' : '.$_SESSION['nomClient_C'] ?>\n" +
|
"\n<?= _('Souscripteur').' : '.$_SESSION['nomClient_C'] ?>\n" +
|
||||||
"<?= _('Numéro Police').' : '.$_SESSION['numeroPolice_C'] ?>\n" +
|
"<?= _('Numéro Police').' : '.$_SESSION['numeroPolice_C'] ?>\n" +
|
||||||
"<?= _('Période couverte').' : '.dateLang($sppoliceentete['dateEffet'], $_SESSION['lang']) ?> <?= _('au') ?> <?= dateLang($sppoliceentete['dateEcheance'], $_SESSION['lang']) ?>";
|
"<?= _('Période couverte').' : '.dateLang($sppoliceentete['dateEffet'], $_SESSION['lang']) ?> <?= _('au') ?> <?= dateLang($sppoliceentete['dateEcheance'], $_SESSION['lang']) ?>\n";
|
||||||
|
|
||||||
// Appel de la fonction
|
// Appel de la fonction
|
||||||
appliquerDataTable('.tabliste', {}, titre, infosComplementaires);
|
appliquerDataTable('.tabliste', {}, titre, infosComplementaires);
|
||||||
|
|
|
||||||
|
|
@ -710,7 +710,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
|
||||||
<!-- Application Scripts -->
|
<!-- Application Scripts -->
|
||||||
<script src="/Js/fonctions.js?ver=2026.03.28.04"></script>
|
<script src="/Js/fonctions.js?ver=2026.03.28.05"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
raffraichier_gabarit();
|
raffraichier_gabarit();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user