newdesigngestionnaire/Vue/Modifierproduit/index.php
2026-03-16 12:37:51 +00:00

113 lines
7.4 KiB
PHP
Executable File

<?php
$codeModecalculPrime = $produit['codeModecalculPrime'];
?>
<div class="page-content animate__animated animate__fadeIn">
<div class="header-section mb-1">
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow border-start border-warning border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-warning-light text-warning rounded-circle me-3" style="width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-edit fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase fs-5 text-warning"><?= _("Modifier Produit Santé") ?></h4>
<p class="text-muted small mb-0 d-none d-md-block"><?= _("Code :") ?> <span class="badge bg-light text-muted fw-bold border"><?= $this->nettoyer($produit['codeProduit']) ?></span> — <?= $this->nettoyer($produit['libelle']) ?></p>
</div>
</div>
<div class="d-flex gap-2">
<button type="button" class="btn btn-light rounded-pill px-3 fw-bold text-muted border shadow-sm btn-sm" onclick="retour_liste_produits();">
<i class="fas fa-times me-1"></i> <?= _("Annuler") ?>
</button>
<button type="button" id="btn_enreg" class="btn btn-warning rounded-pill px-4 fw-bold shadow-sm btn-sm text-light" onclick="enregistrer_modif_produit();">
<i class="fas fa-save me-1"></i> <?= _("Enregistrer les modifications") ?>
</button>
</div>
</div>
</div>
<form id="form_modifier_produit">
<input type="hidden" id="nomForm" name="nomForm" value="modifierproduit">
<input type="hidden" id="idProduit" name="idProduit" value="<?= $this->nettoyer($produit['idProduit']) ?>">
<input type="hidden" id="codeGcAssureur" name="codeGcAssureur" value="<?= $this->nettoyer($produit['codeGcAssureur']) ?>">
<input type="hidden" id="codeModecalculPrime" name="codeModecalculPrime" value="<?= $this->nettoyer($produit['codeModecalculPrime']) ?>">
<div class="card border-0 shadow-sm mb-1">
<div class="card-header bg-white py-3 border-bottom border-2 border-primary-light">
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-cog me-2"></i><?= _("Paramètres Généraux") ?></h6>
</div>
<div class="card-body p-4">
<div class="row g-3">
<div class="col-md-2">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Code") ?></label>
<input class="form-control bg-light border-2 fw-bold" type="text" id="codeProduit" name="codeProduit" value="<?= $this->nettoyer($produit['codeProduit']) ?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Nom du Produit") ?> <span class="text-danger">*</span></label>
<input class="form-control majuscule border-2 shadow-none" type="text" id="libelle" name="libelle" value="<?= $this->nettoyer($produit['libelle']) ?>" required autofocus>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Plafond Famille") ?></label>
<input class="form-control border-2 shadow-none fw-bold text-primary" type="text" id="plafondAdherent" name="plafondAdherent"
value="<?= format_N($this->nettoyer($produit['plafondAdherent'])) ?>"
onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("État") ?> <span class="text-danger">*</span></label>
<select class="form-select border-2 shadow-none" id="codeEtatProduit" name="codeEtatProduit" required>
<?php liste_options($etatproduit,$this->nettoyer($produit['codeEtatProduit']),true); ?>
</select>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Garant") ?></label>
<select class="form-control bg-light border-2" disabled>
<?php liste_options($garant,$this->nettoyer($produit['codeGcAssureur'])); ?>
</select>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Mode Calcul Prime") ?></label>
<select class="form-control bg-light border-2" disabled>
<?php liste_options($calculprime,$this->nettoyer($produit['codeModecalculPrime']),false); ?>
</select>
</div>
</div>
</div>
</div>
<div class="card border-0 shadow-sm mb-1">
<div class="card-header bg-light py-3 border-bottom border-2 border-primary-light">
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-calculator me-2"></i><?= _("Grille Tarifaire") ?></h6>
</div>
<div class="card-body p-4">
<div id="div_modeprime">
<?php if($codeModecalculPrime=="TA"): ?>
<div class="row align-items-center mb-1">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase mb-0"><?= _("Catégorie Tranche d'Âge") ?> <span class="text-danger">*</span></label>
</div>
<div class="col-md-9">
<select class="form-control selectpicker shadow-none" data-live-search="true" id="codeEnteteTrancheAge" name="codeEnteteTrancheAge" required onchange="trancheage();">
<?php liste_options($typesTranches,$this->nettoyer($produit['codeEnteteTrancheAge'])); ?>
</select>
</div>
</div>
<div id="div_trancheage" class="animate__animated animate__fadeIn">
</div>
<?php else: ?>
<div id="div_prime_lienparente" class="animate__animated animate__fadeIn">
</div>
<?php endif; ?>
</div>
</div>
</div>
</form>
</div>
<style>
.bg-warning-light { background-color: rgba(255, 193, 7, 0.15) !important; }
.border-primary-light { border-color: rgba(33, 46, 83, 0.1) !important; }
.majuscule { text-transform: uppercase; }
.form-control:focus, .form-select:focus { border-color: var(--bs-warning); box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.1); }
</style>