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

Type de fonction déplacer vers les domaines et non plus les métiers

parent f0a141db
Loading
Loading
Loading
Loading
+2 −2
Changes for module/Application/src/Application/Controller/MetierController.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@ class MetierController extends AbstractActionController {

        $results = [];
        foreach($metiers as $metier) {
            $fonction = $metier->getFonction();
            $fonction = null; //$metier->getDgetFonction();
            $domaine =  null; //$metier->getDomaine();
            $famille = ($domaine)?$domaine->getFamille():null;
            $references = [];
@@ -608,7 +608,7 @@ class MetierController extends AbstractActionController {

        $results = [];
        foreach($metiers as $metier) {
            $fonction = $metier->getFonction();
            $fonction = null; //$metier->getFonction();
            $domaine = null; // ($metier)?$metier->getDomaine():null;
            $famille = ($domaine)?$domaine->getFamille():null;
            $references = [];
+20 −1
Changes for module/Application/src/Application/Entity/Db/Domaine.php: 20 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ class Domaine implements HistoriqueAwareInterface {
    private $id;
    /** @var string */
    private $libelle;

    /** @var string */
    private $typeFonction;
    /** @var FamilleProfessionnelle */
    private $famille;
    /** @var ArrayCollection */
@@ -50,6 +51,24 @@ class Domaine implements HistoriqueAwareInterface {
        return $this;
    }

    /**
     * @return string
     */
    public function getTypeFonction()
    {
        return $this->typeFonction;
    }

    /**
     * @param string $typeFonction
     * @return Domaine
     */
    public function setTypeFonction($typeFonction)
    {
        $this->typeFonction = $typeFonction;
        return $this;
    }

    /**
     * @return FamilleProfessionnelle
     */
−49
Changes for module/Application/src/Application/Entity/Db/FichePoste.php: 0 added lines, 49 removed lines.
Original line number Diff line number Diff line
@@ -273,55 +273,6 @@ class FichePoste implements ResourceInterface, HistoriqueAwareInterface {
        $this->applicationsRetirees->clear();
    }


    /**
     * //TODO finir cela
     * [
     *      [
     *          'famille' => 'Informatique,
     *          [
     *              'id' => 123,
     *              'metier' => 'Ingenieur en logiciel',
     *              'quotite' => '50',
     *              'principal' => true,
     *          ],
     *          [
     *              'id' => 43,
     *              'metier' => 'Gestionnaire de base de données',
     *              'quotite' => '20',
     *          ],
     *      ],
     *      [
     *          'famille' => 'Assistance technique et administration de la recherche ,
     *          [
     *              'id' => 665,
     *              'metier' => 'Responsable assistance support',
     *              'quotite' => '20',
     *          ],
     *      ],
     * ]
     *
     * @return array
     */
    public function getFamillesAsJson() {
        $result = [];
        foreach ($this->getFichesMetiers() as $fiche) {
            $metier  = $fiche->getFicheType()->getMetier()->getLibelle();
            $famille = $fiche->getFicheType()->getMetier()->getFonction()->getDomaine()->getFamille()->getLibelle();
            $quotite = $fiche->getQuotite();

            if (!isset($result[$famille])) {
                $result[$famille] = [];
            }
            $result[$famille][] = [
                'id' => $fiche->getId(),
                'metier' => $metier,
                'quotite' => $quotite
            ];
        }
        return $result;
    }

    /** EXPERTISE *****************************************************************************************************/

    /**
+1
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Domaine.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
        </id>

        <field name="libelle"           type="string" length="256"      column="libelle"                nullable="false"/>
        <field name="typeFonction"      type="string" length="256"      column="type_fonction"                nullable="false"/>

        <many-to-one target-entity="Application\Entity\Db\FamilleProfessionnelle"  field="famille">
            <join-column name="famille_id" referenced-column-name="id"/>
+1 −1
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Metier.dcm.xml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@
        </id>

        <field name="libelle"           type="string"   length="128"      column="libelle"                nullable="false"  />
        <field name="fonction"          type="string"   length="128"      column="fonction"               nullable="false"  />
        <field name="hasExpertise"      type="boolean"                    column="expertise"              nullable="true"  />

        <one-to-many target-entity="Application\Entity\Db\MetierReference" mapped-by="metier" field="references"/>

        <many-to-many field="domaines" inversed-by="metiers" target-entity="Application\Entity\Db\Domaine">
Loading