Commit bd2c2f7a authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Changement de l'affichage des tableaux de fiches de poste (inversion nom +...

Changement de l'affichage des tableaux de fiches de poste (inversion nom + prenom et correction de l'affichage de fin de validité)
parent 52140b75
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@ Version 3.2.7 (XX/XX/2023)
---
- [FIX] Le tooltip pour les métiers échappe maintenant les caractères html et les quotes.
- Changement de l'affichage de la validité de la fiche de poste (ajout de la memtion "La fiche de poste n'est pas visée par l'agent·e")
- Amélioration de l'affichage des agents ayant un métier donné (filtrage des fiche etn rédaction, des historisations et des affectations non principales)
- Amélioration de l'affichage des agents ayant un métier donné (filtrage des fiches en rédaction, des historisations et des affectations non principales)
- Changement de l'affichage des tableaux de fiches de poste (inversion nom + prenom et correction de l'affichage de fin de validité)

Modification en BD
---
+2 −1
Original line number Diff line number Diff line
@@ -313,7 +313,8 @@ select
    m.libelle_default as fiche_principale,
    e.id as etat,
    e.code as etat_code,
   (f.fin_validite IS NULL OR f.fin_validite > current_timestamp) as en_cours
   (f.fin_validite IS NULL OR f.fin_validite > current_timestamp) as en_cours,
   f.fin_validite as fin_validite
from ficheposte f
left join agent a on f.agent = a.c_individu
left join agent_carriere_affectation aa on a.c_individu = aa.agent_id
+11 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ if ($retour) $query['retour'] = $retour;
            $fichePrincipale = ($fiche->toStringFicheMetierPrincipal() !== '')?$fiche->toStringFicheMetierPrincipal():null;
            $ficheLibelle = ($fiche->getLibelle() !== '')?$fiche->getLibelle():null;
            $isEnCours = $fiche->isEnCours();
            $finValidite = $fiche->getFinValidite();

            $canAfficher    = $this->isAllowed($fiche,FichePostePrivileges::FICHEPOSTE_AFFICHER);
            $canExporter    = $canAfficher;
@@ -83,12 +84,13 @@ if ($retour) $query['retour'] = $retour;
            $etat = $fiche['etat_code'];
            $destruction = $fiche['histo_destruction'];
            $agentId = $fiche['agent_id'];
            $agent = $fiche['prenom'] . " " . $fiche['nom_usage'];
            $agent = strtoupper($fiche['nom_usage']) . ' ' .ucwords(strtolower($fiche['prenom']), ' -') ;
            $structureId = $fiche['structure_id'];
            $structure = $fiche['structure'];
            $fichePrincipale = $fiche['fiche_principale'];
            $ficheLibelle = $fiche['fiche_libelle'];
            $isEnCours = ($fiche['en_cours'] === true) ? true : false;
            $finValidite = $fiche['fin_validite'];

            $canAfficher   = $this->isAllowed(FichePostePrivileges::getResourceId(FichePostePrivileges::FICHEPOSTE_AFFICHER));
            $canExporter   = $canAfficher;
@@ -170,6 +172,14 @@ if ($retour) $query['retour'] = $retour;
                            <?php if ($isEnCours) : ?>
                                <span class="icon icon-checked" style="color:darkgreen;" title="Fiche en cours de validité"></span>
                            <?php else : ?>
                                <span style="color:darkred;">
                                    <?php if ($finValidite) : ?>
                                        <?php if (is_string($finValidite)) $finValidite = DateTime::createFromFormat('Y-m-d H:i:s', $finValidite); ?>
                                        <?php if ($finValidite instanceof DateTime): ?>
                                            <?php echo $finValidite->format('d/m/Y'); ?>
                                        <?php endif; ?>
                                    <?php endif; ?>
                                </span>
                                <?php if ($fiche instanceof FichePoste) : ?>
                                    <span style="color:darkred;"><?php echo $fiche->getFinValidite()->format('d/m/Y'); ?></span>
                                <?php else : ?>