df
This commit is contained in:
parent
75d99961d6
commit
27f3ff0fe2
167
Js/fonctions.js
167
Js/fonctions.js
|
|
@ -63660,10 +63660,13 @@ function afficherDetailBareme()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function init_saisie_detailbareme()
|
/**
|
||||||
{
|
* Réinitialisation du formulaire après insertion
|
||||||
$("#dateEffetBareme").val("");
|
*/
|
||||||
$("#actif").val("");
|
function init_saisie_detailbareme() {
|
||||||
|
$("#dateEffetBareme").val("");
|
||||||
|
//$("#actif").val("");
|
||||||
|
// On ne vide pas le TM car l'utilisateur peut vouloir le réutiliser pour une autre date
|
||||||
}
|
}
|
||||||
|
|
||||||
function controleDateEffetBareme(){
|
function controleDateEffetBareme(){
|
||||||
|
|
@ -63707,32 +63710,23 @@ function controleDateEffetBareme(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function actualiser_detailbareme()
|
/**
|
||||||
{
|
* Rafraîchissement de la zone d'historique des taux
|
||||||
idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
|
*/
|
||||||
|
function actualiser_detailbareme() {
|
||||||
donnees = 'idBaremePriseEnCharge='+idBaremePriseEnCharge;
|
const idBareme = $("#idBaremePriseEnCharge").val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: $("#racineWeb").val()+"Ajaxinsererdetailbareme/",
|
url: $("#racineWeb").val() + "Ajaxinsererdetailbareme/",
|
||||||
type : 'post',
|
type: 'post',
|
||||||
data: donnees,
|
data: { idBaremePriseEnCharge: idBareme },
|
||||||
error: function(errorData){
|
success: function(data) {
|
||||||
//alert("Erreur : "+errorData);
|
$('#div_bareme').html(data);
|
||||||
},
|
}
|
||||||
success: function(data) {
|
});
|
||||||
//alert("Success : "+data);
|
|
||||||
$('#div_bareme').html(data);
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function supprimer_detailbareme(adminProd, idDetail)
|
function supprimer_detailbareme(adminProd, idDetail)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -63773,59 +63767,74 @@ function supprimer_detailbareme(adminProd, idDetail)
|
||||||
}
|
}
|
||||||
|
|
||||||
// inserer_bareme()
|
// inserer_bareme()
|
||||||
function inserer_bareme()
|
/**
|
||||||
{
|
* Déploiement du Ticket Modérateur Global sur l'ensemble du barème
|
||||||
idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
|
*/
|
||||||
dateEffetBareme = $("#dateEffetBareme").val();
|
function inserer_bareme() {
|
||||||
ticketModerateurBareme = $("#ticketModerateurBareme").val();
|
const idBareme = $("#idBaremePriseEnCharge").val();
|
||||||
//actif = $("#actif").val();
|
const dateEffet = $("#dateEffetBareme").val();
|
||||||
|
const tm = $("#ticketModerateurBareme").val();
|
||||||
if(dateEffetBareme <= " "){
|
const lang = $("#codeLangue").val();
|
||||||
|
|
||||||
v_msg="Veuillez entrer une date d'effet!";
|
|
||||||
v_msgEng="Please enter an effective date!";
|
|
||||||
alert_ebene(v_msg, v_msgEng);
|
|
||||||
|
|
||||||
$("#dateEffetBareme").focus();
|
// 1. Validations de saisie
|
||||||
return;
|
if (!dateEffet || dateEffet.trim() === "") {
|
||||||
|
alert_ebene("Veuillez entrer une date d'effet !", "Please enter an effective date!");
|
||||||
}
|
$("#dateEffetBareme").focus();
|
||||||
|
return;
|
||||||
if(ticketModerateurBareme <= " "){
|
}
|
||||||
|
|
||||||
v_msg="Veuillez entrer un ticket modérateur!";
|
|
||||||
v_msgEng="Please enter a co-payment!";
|
|
||||||
alert_ebene(v_msg, v_msgEng);
|
|
||||||
|
|
||||||
$("#ticketModerateurBareme").focus();
|
if (!tm || tm.trim() === "") {
|
||||||
return;
|
alert_ebene("Veuillez entrer un ticket modérateur !", "Please enter a co-payment!");
|
||||||
|
$("#ticketModerateurBareme").focus();
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
$("#div_bareme").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>');
|
|
||||||
|
// 2. Confirmation Critique (Standard Neutral Pro)
|
||||||
donnees = 'idBaremePriseEnCharge='+idBaremePriseEnCharge;
|
const c_msg = `Attention : Vous allez appliquer un taux de ${tm}% à TOUS les actes de ce barème avec effet au ${dateEffet}. Confirmez-vous ce déploiement global ?`;
|
||||||
donnees += '&dateEffetBareme='+dateEffetBareme;
|
const c_msgEng = `Warning: You are about to apply a ${tm}% rate to ALL acts in this scale effective ${dateEffet}. Do you confirm this global deployment?`;
|
||||||
donnees += '&ticketModerateurBareme='+ticketModerateurBareme;
|
|
||||||
|
confirm_ebene(c_msg, c_msgEng).then((isConfirmed) => {
|
||||||
$.ajax({
|
if (isConfirmed) {
|
||||||
url: $("#racineWeb").val()+"Ajaxinsererdetailbareme/ajouter/",
|
// Affichage du loader dans la zone d'historique
|
||||||
type : 'post',
|
$("#div_bareme").html(`
|
||||||
data: donnees,
|
<div class="d-flex justify-content-center align-items-center p-5">
|
||||||
error: function(errorData){
|
<div class="text-center">
|
||||||
//alert("Erreur : "+errorData);
|
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;"></div>
|
||||||
},
|
<div class="mt-2 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||||
success: function(data) {
|
${(lang === 'en_US') ? 'Deploying rates...' : 'Déploiement des taux...'}
|
||||||
//alert("Success : "+data);
|
</div>
|
||||||
init_saisie_detailbareme();
|
</div>
|
||||||
actualiser_detailbareme();
|
</div>`);
|
||||||
},
|
|
||||||
complete: function() {
|
const donnees = {
|
||||||
afficheNombreLigneBareme('detailbareme');
|
idBaremePriseEnCharge: idBareme,
|
||||||
$("#masquerBareme").val("0");
|
dateEffetBareme: dateEffet,
|
||||||
afficherDetailBareme();
|
ticketModerateurBareme: tm
|
||||||
}
|
};
|
||||||
});
|
|
||||||
|
$.ajax({
|
||||||
|
url: $("#racineWeb").val() + "Ajaxinsererdetailbareme/ajouter/",
|
||||||
|
type: 'post',
|
||||||
|
data: donnees,
|
||||||
|
success: function(data) {
|
||||||
|
init_saisie_detailbareme();
|
||||||
|
actualiser_detailbareme();
|
||||||
|
// On informe l'utilisateur que tout est à jour
|
||||||
|
alert_ebene("Le barème a été mis à jour avec succès !", "The scale has been successfully updated!");
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
// Mise à jour du badge compteur "Lignes globales"
|
||||||
|
if (typeof afficheNombreLigneBareme === 'function') {
|
||||||
|
afficheNombreLigneBareme('detailbareme');
|
||||||
|
}
|
||||||
|
$("#masquerBareme").val("0");
|
||||||
|
// On force l'affichage de l'historique pour montrer la nouvelle ligne
|
||||||
|
$("#div_bareme").show();
|
||||||
|
$("#span_bareme").removeClass('fa-chevron-down').addClass('fa-chevron-up');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//15-05-2023
|
//15-05-2023
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,67 @@
|
||||||
<?php
|
<?php
|
||||||
$adminProd = $_SESSION['adminProd'];
|
$adminProd = $_SESSION['adminProd'];
|
||||||
|
$isAnglais = est_anglophone();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<INPUT class="sr-only" TYPE="text" id="maxDateEffetBareme" name="maxDateEffetBareme" value="<?= $maxDateEffetBareme; ?>">
|
<input type="hidden" id="maxDateEffetBareme" name="maxDateEffetBareme" value="<?= $maxDateEffetBareme; ?>">
|
||||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:12pt;">
|
|
||||||
<thead >
|
<div class="table-responsive animate__animated animate__fadeIn">
|
||||||
<tr >
|
<table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
|
||||||
<th style='text-align:center; border: 2px solid #ddd;'> <?= _("Effet") ?> </th>
|
<thead class="bg-light border-bottom">
|
||||||
<th style='text-align:center; border: 2px solid #ddd;'> <?= _("Ticket Modérateur") ?> </th>
|
<tr>
|
||||||
<th style='text-align:center; border: 2px solid #ddd;'> <?= _("Actif") ?> </th>
|
<th class="ps-3 py-3 text-center" width="25%"><?= _("Date d'Effet") ?></th>
|
||||||
<th style='text-align:center; border: 2px solid #fff;'> <?= _("Suppr") ?> </th>
|
<th class="text-center py-3" width="25%"><?= _("Part Patient (TM)") ?></th>
|
||||||
</tr>
|
<th class="text-center py-3" width="25%"><?= _("État / Actif") ?></th>
|
||||||
</thead>
|
<th class="text-center py-3 pe-3" width="15%"><?= _("Action") ?></th>
|
||||||
<tbody>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
<?php foreach ($detailbareme as $v):
|
<tbody>
|
||||||
$idDetail = $v['id'];
|
<?php foreach ($detailbareme as $v):
|
||||||
|
$idDetail = $v['id'];
|
||||||
$supprime = $v['supprime'];
|
$supprime = (int)$v['supprime'];
|
||||||
|
$isActif = ($v['actif'] == "1");
|
||||||
if($this->nettoyer($v['actif'])=="1"){
|
|
||||||
$actif = "Oui";
|
// Style spécifique pour les lignes supprimées
|
||||||
}else{
|
$rowStyle = ($supprime === 1) ? 'style="background-color: #fff5f5; opacity: 0.6; text-decoration: line-through text-decoration-color: #dc3545;"' : '';
|
||||||
$actif = "Non";
|
?>
|
||||||
}
|
<tr <?= $rowStyle ?>>
|
||||||
?>
|
<td class="text-center fw-bold text-dark">
|
||||||
<?php if($supprime=='1'): ?>
|
<i class="fas fa-calendar-alt me-2 text-muted small"></i><?= datefr($this->nettoyer($v['dateEffet'])); ?>
|
||||||
<tr valign="top" style="text-decoration: line-through red;">
|
</td>
|
||||||
<?php else: ?>
|
<td class="text-center">
|
||||||
<tr valign="top">
|
<span class="badge bg-primary-ghost text-primary px-3 py-2 rounded-pill fw-bold fs-6">
|
||||||
<?php endif; ?>
|
<?= $this->nettoyer($v['ticketModerateur']); ?> %
|
||||||
<td style='text-align:center; border: 2px solid #ddd;'><?= datefr($this->nettoyer($v['dateEffet'])); ?></td>
|
</span>
|
||||||
<td style='text-align:center; border: 2px solid #ddd;'><?= $this->nettoyer($v['ticketModerateur']);?></td>
|
</td>
|
||||||
<td style='text-align:center; border: 2px solid #ddd;'><?= $actif;?></td>
|
<td class="text-center">
|
||||||
|
<?php if ($supprime === 0): ?>
|
||||||
<?php if($supprime=='0'): ?>
|
<span class="badge <?= $isActif ? 'bg-success' : 'bg-light text-muted border' ?> rounded-pill px-3 py-2 fw-bold">
|
||||||
<td>
|
<i class="fas <?= $isActif ? 'fa-check-circle' : 'fa-clock' ?> me-1"></i>
|
||||||
<button type="button" class="form-control btn btn-danger" onClick="javascript:supprimer_detailbareme('<?= $adminProd?>',<?= $idDetail ?>);">
|
<?= $isActif ? _("En vigueur") : _("Futur / Passé") ?>
|
||||||
<i class="fa fa-times" aria-hidden="true"></i>
|
</span>
|
||||||
</button>
|
<?php else: ?>
|
||||||
</td>
|
<span class="badge bg-danger-light text-danger rounded-pill px-3 py-2 fw-bold small">
|
||||||
<?php else: ?>
|
<?= _("Supprimé") ?>
|
||||||
<td> </td>
|
</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
</tr>
|
<td class="text-center pe-3">
|
||||||
<?php endforeach; ?>
|
<?php if ($supprime === 0): ?>
|
||||||
</tbody>
|
<button type="button" class="btn btn-sm btn-danger-light rounded-circle action-icon shadow-none"
|
||||||
</table>
|
onclick="supprimer_detailbareme('<?= $adminProd ?>', <?= $idDetail ?>);"
|
||||||
|
title="<?= _('Supprimer cette révision') ?>">
|
||||||
|
<i class="fas fa-trash-alt"></i>
|
||||||
|
</button>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.bg-danger-light { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; }
|
||||||
|
.action-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
|
||||||
|
.action-icon:hover { background-color: #dc3545; color: white; transform: scale(1.1); }
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user