This commit is contained in:
KONE SOREL 2026-01-04 13:55:40 +00:00
parent 4de26ac2e5
commit 6d449a0154
2 changed files with 99 additions and 61 deletions

View File

@ -97,11 +97,6 @@
<textarea class="form-control shadow-sm" id="motifavenant" name="motifavenant" rows="2" placeholder="<?= _("Précisez l'objet de cet avenant...") ?>"></textarea>
</div>
<div class="col-12">
<div id="div_periodidite" class="rounded bg-light p-3 border-dashed">
</div>
</div>
<div class="col-12 mt-4">
<button type="button" class="btn btn-primary btn-lg w-100 shadow fw-bold py-3" onclick="javascript:enregistrer_avenant();">
<i class="fas fa-save me-2"></i> <?= _("Générer et Enregistrer l'Avenant") ?>

View File

@ -1,58 +1,101 @@
<?php
// $this->titre = "INTER-SANTE - Liste Avenants police";
?>
<div class="card shadow-sm border-0 mb-4 animate__animated animate__fadeIn">
<div class="card-header bg-white py-3">
<div class="d-flex align-items-center justify-content-between">
<h5 class="card-title mb-0 fw-bold text-dark">
<i class="fas fa-history me-2 text-primary"></i><?= _("Historique des Avenants") ?>
</h5>
<div class="text-muted small">
<span class="badge bg-light text-dark border ps-2">
<i class="fas fa-user-tie me-1"></i> <?= $_SESSION['nomClient_C'] ?>
</span>
<span class="badge bg-primary-subtle text-primary border border-primary-subtle ms-1">
<i class="fas fa-hashtag me-1"></i> <?= $police['numeroPolice'] ?>
</span>
</div>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0" style="font-size: 0.88rem;">
<thead class="table-light text-muted text-uppercase small">
<tr>
<th class="ps-3 py-3 text-center"><?= _("") ?></th>
<th class="text-center"><?= _("Date Effet") ?></th>
<th><?= _("Mouvement") ?></th>
<th><?= _("Commentaires / Motif") ?></th>
<th><?= _("Auteur") ?></th>
<th class="text-center"><?= _("Facturation") ?></th>
<th class="text-center"><?= _("Statut RH") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($avenants as $avenant):
$libelleAvenant = est_anglophone() ? $avenant['libelleAvenantEng'] : $avenant['libelleAvenant'];
$isFacture = ($avenant['facture'] == '1');
$isRH = ($avenant['ajoutClient'] == '1');
?>
<tr class="transition-row">
<td class="text-center fw-bold text-primary ps-3">
<?= $this->nettoyer($avenant['numeroAvenant']) ?>
</td>
<td class="text-center fw-bold">
<?= dateLang($this->nettoyer($avenant['dateEffet']), $_SESSION['lang']) ?>
</td>
<td>
<div class="fw-bold"><?= $libelleAvenant ?></div>
<div class="x-small text-muted">
<i class="far fa-clock me-1"></i><?= dateheureLang($this->nettoyer($avenant['dateSysteme'])) ?>
</div>
</td>
<td>
<p class="mb-0 text-truncate" style="max-width: 200px;" title="<?= $this->nettoyer($avenant['motifavenant']) ?>">
<?= $this->nettoyer($avenant['motifavenant']) ?: '<span class="text-muted italic small">Aucun motif</span>' ?>
</p>
</td>
<td>
<div class="d-flex align-items-center">
<div class="avatar-xs me-2 bg-light-subtle text-center rounded-circle border" style="width:24px; height:24px; line-height:24px;">
<i class="fas fa-user-edit x-small text-muted"></i>
</div>
<?= $this->nettoyer($avenant['utilisateur']) ?>
</div>
</td>
<td class="text-center">
<?php if($isFacture): ?>
<div class="d-inline-block text-center">
<span class="badge rounded-pill bg-success mb-1">
<i class="fas fa-check-circle me-1"></i><?= _("Facturé") ?>
</span>
<div class="x-small text-muted fw-bold"><?= $this->nettoyer($avenant['userFacturation']) ?></div>
<div class="x-small text-muted" style="font-size: 0.65rem;"><?= dateheureLang($this->nettoyer($avenant['dateFacturation'])) ?></div>
</div>
<?php else: ?>
<span class="badge rounded-pill bg-light text-muted border"><?= _("En attente") ?></span>
<?php endif; ?>
</td>
<legend> <?= _("Avenants de la police") . " => " . $_SESSION['nomClient_C'] . " => " . $police['numeroPolice'] . " => " . $police['idPolice'] ?> </legend>
<td class="text-center">
<?php if($isRH): ?>
<span class="badge bg-info-subtle text-info border border-info-subtle" title="<?= _("Transmis au client") ?>">
<i class="fas fa-sync-alt me-1"></i><?= _("Synchro") ?>
</span>
<?php else: ?>
<i class="fas fa-minus text-light"></i>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
<thead>
<tr>
<th style='text-align:center' > <?= _("Numéro") ?> </th>
<th style='text-align:center'> <?= _("Effet") ?> </th>
<th> <?= _("Libellé") ?> </th>
<th> <?= _("Commentaires") ?> </th>
<th> <?= _("Producteur") ?> </th>
<th style='text-align:center'> <?= _("Saisie") ?> </th>
<th colspan="3"style='text-align:center'> <?= _("Facturation") ?> </th>
<th style='text-align:center'> <?= _("RH") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($avenants as $avenant):
$libelleAvenant = $avenant['libelleAvenant'];
if (est_anglophone())
{
$libelleAvenant = $avenant['libelleAvenantEng'];
}
?>
<tr valign="top">
<td align='center'><?= $this->nettoyer($avenant['numeroAvenant']) ?></td>
<td align='center'><?= dateLang($this->nettoyer($avenant['dateEffet']), $_SESSION['lang']) ?></td>
<td><?= $libelleAvenant ?></td>
<td><?= $this->nettoyer($avenant['motifavenant']) ?></td>
<td><?= $this->nettoyer($avenant['utilisateur']) ?></td>
<td align='center'><?= dateheureLang($this->nettoyer($avenant['dateSysteme'])) ?></td>
<td align='center'>
<?php if($avenant['facture']=='1'): ?>
<input type="checkbox" checked disabled>
<?php else: ?>
<input type="checkbox" disabled>
<?php endif; ?>
</td>
<td align='center'> <?= dateheureLang($this->nettoyer($avenant['dateFacturation'])) ?></td>
<td align='center'> <?= $this->nettoyer($avenant['userFacturation']) ?> </td>
<td align='center'>
<?php if($avenant['ajoutClient']=='1'): ?>
<input type="checkbox" checked disabled>
<?php else: ?>
<input type="checkbox" disabled>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<style>
.x-small { font-size: 0.75rem; }
.transition-row { transition: background-color 0.2s ease; }
.transition-row:hover { background-color: rgba(13, 110, 253, 0.03) !important; }
.avatar-xs { font-size: 0.65rem; }
</style>