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

[EMC2] Correction de l'ajout de fiche de métier qui échouait si vide

parent 88458fcc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Version 4.2.2 (XX/12/2023)
Évolution
---
- [EMC2] Correction de titres de modal
- [EMC2] Correction de l'ajout de fiche de métier qui échouait si vide

Modification en BD
---
+0 −36
Original line number Diff line number Diff line
digraph "entretienprofessionnel" {

splines  = ortho;
fontname = "Inconsolata";

node [colorscheme = ylgnbu4];
edge [colorscheme = dark28, dir = both];

agent                                                                                                                       [shape = record, label = "{ agent |  utilisateur_id : integer\l  prenom : varchar(64)\l  nom_usage : varchar(64)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  octo_id : varchar(40)\l  preecog_id : varchar(40)\l  harp_id : integer\l  login : varchar(256)\l  email : varchar(1024)\l  sexe : varchar(1)\l  t_contrat_long : varchar(1)\l  date_naissance : date\l  nom_famille : varchar(256)\l  id : bigint\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l  source_id : varchar(128)\l  id_orig : varchar(100)\l| c_individu : varchar(40)\l }"];
entretienprofessionnel                                                                                                      [shape = record, label = "{ entretienprofessionnel |  agent : varchar(40)\l  responsable_id : varchar(40)\l  formulaire_instance : integer\l  date_entretien : timestamp\l  campagne_id : integer\l  formation_instance : integer\l  lieu : text\l  token : varchar(255)\l  acceptation : timestamp\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
"entretienprofessionnel_agent_force_sansobligation  /* Table listant les agents pour lesquels on a forcé le fait qu'... */" [shape = record, label = "{ entretienprofessionnel_agent_force_sansobligation  /* Table listant les agents pour lesquels on a forcé le fait qu'... */ |  agent_id : varchar(40)\l  campagne_id : integer\l  raison : text\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_campagne                                                                                             [shape = record, label = "{ entretienprofessionnel_campagne |  annee : varchar(256)\l  precede_id : integer\l  date_debut : timestamp\l  date_fin : timestamp\l  date_circulaire : timestamp\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_critere_competence                                                                                   [shape = record, label = "{ entretienprofessionnel_critere_competence |  libelle : varchar(1024)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_critere_contribution                                                                                 [shape = record, label = "{ entretienprofessionnel_critere_contribution |  libelle : varchar(1024)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_critere_encadrement                                                                                  [shape = record, label = "{ entretienprofessionnel_critere_encadrement |  libelle : varchar(1024)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_critere_personnelle                                                                                  [shape = record, label = "{ entretienprofessionnel_critere_personnelle |  libelle : varchar(1024)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_etat                                                                                                 [shape = record, label = "{ entretienprofessionnel_etat |  entretien_id : integer\l  etat_id : integer\l }"];
entretienprofessionnel_observation                                                                                          [shape = record, label = "{ entretienprofessionnel_observation |  entretien_id : integer\l  observation_agent_entretien : text\l  observation_agent_perspective : text\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
entretienprofessionnel_validation                                                                                           [shape = record, label = "{ entretienprofessionnel_validation |  entretien_id : integer\l  validation_id : integer\l }"];
unicaen_etat_instance                                                                                                       [shape = record, label = "{ unicaen_etat_instance |  type_id : integer\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l  complement : text\l| id : integer\l }"];
unicaen_validation_instance                                                                                                 [shape = record, label = "{ unicaen_validation_instance |  type_id : integer\l  entity_class : varchar(1024)\l  entity_id : varchar(64)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l  justification : text\l  refus : boolean\l| id : integer\l }"];

entretienprofessionnel                                                                                                      -> agent                                                                                                                       [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "responsable_id:c_individu", headlabel = ""];
entretienprofessionnel                                                                                                      -> agent                                                                                                                       [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent:c_individu", headlabel = ""];
entretienprofessionnel                                                                                                      -> entretienprofessionnel_campagne                                                                                             [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "campagne_id:id", headlabel = ""];
"entretienprofessionnel_agent_force_sansobligation  /* Table listant les agents pour lesquels on a forcé le fait qu'... */" -> agent                                                                                                                       [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:id", headlabel = ""];
"entretienprofessionnel_agent_force_sansobligation  /* Table listant les agents pour lesquels on a forcé le fait qu'... */" -> agent                                                                                                                       [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:c_individu", headlabel = ""];
"entretienprofessionnel_agent_force_sansobligation  /* Table listant les agents pour lesquels on a forcé le fait qu'... */" -> entretienprofessionnel_campagne                                                                                             [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "campagne_id:id", headlabel = ""];
entretienprofessionnel_campagne                                                                                             -> entretienprofessionnel_campagne                                                                                             [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "precede_id:id", headlabel = ""];
entretienprofessionnel_etat                                                                                                 -> entretienprofessionnel                                                                                                      [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "entretien_id:id", headlabel = ""];
entretienprofessionnel_etat                                                                                                 -> unicaen_etat_instance                                                                                                       [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "etat_id:id", headlabel = ""];
entretienprofessionnel_observation                                                                                          -> entretienprofessionnel                                                                                                      [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "entretien_id:id", headlabel = ""];
entretienprofessionnel_validation                                                                                           -> entretienprofessionnel                                                                                                      [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "entretien_id:id", headlabel = ""];
entretienprofessionnel_validation                                                                                           -> unicaen_validation_instance                                                                                                 [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "validation_id:id", headlabel = ""];

}
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class FicheTypeExterne {
        $this->fichePoste = $fichePoste;
    }

    public function getFicheType(): FicheMetier
    public function getFicheType(): ?FicheMetier
    {
        return $this->ficheType;
    }
+2 −5
Original line number Diff line number Diff line
@@ -160,10 +160,7 @@ class AjouterFicheMetierForm extends Form {

    }

    /**
     * @param Agent $agent
     */
    public function reinitWithAgent(Agent $agent)
    public function reinitWithAgent(Agent $agent): void
    {
//        var_dump($agent->getNiveauEnveloppe()->getBorneInferieure()->getNiveau() .":".$agent->getNiveauEnveloppe()->getBorneSuperieure()->getNiveau());

@@ -175,7 +172,7 @@ class AjouterFicheMetierForm extends Form {
        $fiches = array_filter($fiches, function (FicheMetier $a) use ($agent) {
            return (
                $a->estNonHistorise() AND
                $a->getEtat()->getType()->getCode() === FicheMetierEtats::ETAT_VALIDE AND
                $a->isEtatActif(FicheMetierEtats::ETAT_VALIDE) AND
                ($a->getMetier()->getNiveaux() !== null AND NiveauEnveloppe::isCompatible($a->getMetier()->getNiveaux(), $agent->getNiveauEnveloppe())));
        });

+4 −0
Original line number Diff line number Diff line
@@ -203,7 +203,11 @@ if ($retour) $query['retour'] = $retour;

                <?php if ($displays['etat']) : ?>
                    <td>
                            <?php if (isset($etats[$etat])) : ?>
                                <?php echo $this->etattype($etats[$etat]); ?>
                            <?php else : ?>
                                État inconnu
                            <?php endif; ?>
                    </td>
                <?php endif; ?>

Loading