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

Correction pour cas de multi fiche

parent 7ab378a3
Loading
Loading
Loading
Loading
+4 −2
Changes for documentation/002-BD_EMC2.sql: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ create table carriere_categorie
);
create unique index categorie_code_uindex on carriere_categorie (code);
create unique index categorie_id_uindex on carriere_categorie (id);

create table carriere_corps
(
    id         integer not null constraint corps_pk  primary key,
@@ -59,10 +58,13 @@ create table carriere_corps
    updated_on timestamp(0),
    deleted_on timestamp(0),
    niveau     integer,
    niveau_id integer constraint corps_niveau_definition_id_fk references carriere_niveau on delete set null
    niveau_id  integer  constraint corps_niveau_definition_id_fk references carriere_niveau on delete set null,
    niveaux_id integer constraint carriere_corps_carriere_niveau_enveloppe_id_fk references carriere_niveau_enveloppe on delete set null
);
create unique index corps_code_uindex on carriere_corps (code);



create table carriere_correspondance
(
    id serial not null constraint correspondance_pk primary key,
+3 −3
Changes for module/Application/src/Application/Entity/Db/MacroContent/AgentMacroTrait.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ trait AgentMacroTrait
    {
        /** @var Agent $agent */
        $agent = $this;
        $fiche = $agent->getFichePosteActive();
        $fiche = $agent->getFichePosteBest();

        if ($fiche === null) return "Aucune fiche de poste EMC2";
        $metier  = $fiche->getLibelleMetierPrincipal();
@@ -278,7 +278,7 @@ trait AgentMacroTrait
    {
        /** @var Agent $agent */
        $agent = $this;
        $fiche = $agent->getFichePosteActive();
        $fiche = $agent->getFichePosteBest();

        if ($fiche === null) return 'Aucune fiche de poste EMC2';
        if ($fiche->getFicheTypeExternePrincipale() === null) return 'Aucune fiche de métier EMC2 principale';
@@ -298,7 +298,7 @@ trait AgentMacroTrait
    {
        /** @var Agent $agent */
        $agent = $this;
        $fiche = $agent->getFichePosteActive();
        $fiche = $agent->getFichePosteBest();

        if ($fiche === null) return "Aucune fiche de poste EMC2";
        $metier  = $fiche->getFicheTypeExternePrincipale()->getFicheType()->getMetier()->getReferencesAffichage();