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

Changement de gestion des postes (utilisation d'un import)

parent d95863a6
Loading
Loading
Loading
Loading
+3 −0
Changes for module/Application/config/merged/agent.config.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ use Application\Service\AgentGrade\AgentGradeService;
use Application\Service\AgentGrade\AgentGradeServiceFactory;
use Application\Service\AgentMissionSpecifique\AgentMissionSpecifiqueService;
use Application\Service\AgentMissionSpecifique\AgentMissionSpecifiqueServiceFactory;
use Application\Service\AgentPoste\AgentPosteService;
use Application\Service\AgentPoste\AgentPosteServiceFactory;
use Application\Service\AgentQuotite\AgentQuotiteService;
use Application\Service\AgentQuotite\AgentQuotiteServiceFactory;
use Application\Service\AgentStatut\AgentStatutService;
@@ -396,6 +398,7 @@ return [
            AgentAffectationService::class => AgentAffectationServiceFactory::class,
            AgentGradeService::class => AgentGradeServiceFactory::class,
            AgentMissionSpecifiqueService::class => AgentMissionSpecifiqueServiceFactory::class,
            AgentPosteService::class => AgentPosteServiceFactory::class,
            AgentQuotiteService::class => AgentQuotiteServiceFactory::class,
            AgentStatutService::class => AgentStatutServiceFactory::class,
        ],
+5 −0
Changes for module/Application/src/Application/Controller/FichePosteController.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ use Application\Provider\Template\PdfTemplate;
use Application\Provider\Validation\FichePosteValidations;
use Application\Service\ActivitesDescriptionsRetirees\ActivitesDescriptionsRetireesServiceAwareTrait;
use Application\Service\Agent\AgentServiceAwareTrait;
use Application\Service\AgentPoste\AgentPosteServiceAwareTrait;
use Application\Service\ApplicationsRetirees\ApplicationsRetireesServiceAwareTrait;
use Application\Service\CompetencesRetirees\CompetencesRetireesServiceAwareTrait;
use Application\Service\Expertise\ExpertiseServiceAwareTrait;
@@ -56,6 +57,8 @@ class FichePosteController extends AbstractActionController {
    /** Service **/
    use ActivitesDescriptionsRetireesServiceAwareTrait;
    use AgentServiceAwareTrait;
    use AgentPosteServiceAwareTrait;

    use ApplicationsRetireesServiceAwareTrait;
    use CompetencesRetireesServiceAwareTrait;
    use EtatServiceAwareTrait;
@@ -206,6 +209,7 @@ class FichePosteController extends AbstractActionController {
            'activites' => $activites,
            'parcours' => $parcours,
            'structure' => $structure,
            'postes' => ($fiche->getAgent())?$this->getAgentPosteService()->getPostesAsAgent($fiche->getAgent()):[],
        ]);
    }

@@ -236,6 +240,7 @@ class FichePosteController extends AbstractActionController {
            'competences' => $competences,
            'activites' => $activites,
            'parcours' => $parcours,
            'postes' => ($fiche->getAgent())?$this->getAgentPosteService()->getPostesAsAgent($fiche->getAgent()):[],
        ]);
    }

+4 −0
Changes for module/Application/src/Application/Controller/FichePosteControllerFactory.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ use Application\Form\Poste\PosteForm;
use Application\Form\Rifseep\RifseepForm;
use Application\Form\SpecificitePoste\SpecificitePosteForm;
use Application\Service\Agent\AgentService;
use Application\Service\AgentPoste\AgentPosteService;
use Application\Service\ApplicationsRetirees\ApplicationsRetireesService;
use Application\Service\CompetencesRetirees\CompetencesRetireesService;
use Application\Service\Expertise\ExpertiseService;
@@ -39,6 +40,7 @@ class FichePosteControllerFactory {
    {
        /**
         * @var AgentService $agentService
         * @var AgentPosteService $agentPosteService
         * @var RenduService $renduService
         * @var FicheMetierService $ficheMetierService
         * @var FichePosteService $fichePosteService
@@ -53,6 +55,7 @@ class FichePosteControllerFactory {
         * @var ValidationInstanceService $validationInstanceService
         */
        $agentService = $container->get(AgentService::class);
        $agentPosteService = $container->get(AgentPosteService::class);
        $renduService = $container->get(RenduService::class);
        $ficheMetierService = $container->get(FicheMetierService::class);
        $fichePosteService = $container->get(FichePosteService::class);
@@ -90,6 +93,7 @@ class FichePosteControllerFactory {
        $controller = new FichePosteController();

        $controller->setAgentService($agentService);
        $controller->setAgentPosteService($agentPosteService);
        $controller->setRenduService($renduService);
        $controller->setFicheMetierService($ficheMetierService);
        $controller->setFichePosteService($fichePosteService);
+55 −0
Changes for module/Application/src/Application/Entity/Db/AgentPoste.php: 55 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application\Entity\Db;

use Application\Entity\Db\Interfaces\HasSourceInterface;
use Application\Entity\Db\Traits\DbImportableAwareTrait;
use Application\Entity\Db\Traits\HasSourceTrait;

class AgentPoste implements HasSourceInterface
{
    use DbImportableAwareTrait;
    use HasSourceTrait;

    private ?int $id = null;
    private ?Agent $agent = null;
    private ?string $code = null;
    private ?string $libelle = null;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getAgent(): ?Agent
    {
        return $this->agent;
    }

    public function setAgent(?Agent $agent): void
    {
        $this->agent = $agent;
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(?string $code): void
    {
        $this->code = $code;
    }

    public function getLibelle(): ?string
    {
        return $this->libelle;
    }

    public function setLibelle(?string $libelle): void
    {
        $this->libelle = $libelle;
    }


}
+22 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentPoste.dcm.xml: 22 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
    <entity name="Application\Entity\Db\AgentPoste" table="agent_poste">

        <id    name="id"                        column="id"  type="integer" >
        </id>

        <many-to-one target-entity="Application\Entity\Db\Agent"  field="agent">
            <join-column name="agent_id" referenced-column-name="c_individu"/>
        </many-to-one>
        <field name="code"                    column="code_poste"        type="string"   length="128" nullable="true"/>
        <field name="libelle"                 column="intitule"          type="string"   length="1024" nullable="true"/>

        <!-- HAS SOURCE #############################  -->
        <field name="source"                   column="source_id"        type="string"   length="128" nullable="true"/>
        <field name="idSource"                 column="id_source"        type="string"   length="256" nullable="true"/>
        <!-- DB IMPORT  #############################  -->
        <field name="created_on"               column="created_on"       type="datetime"/>
        <field name="updated_on"               column="updated_on"       type="datetime"     nullable="true"/>
        <field name="deleted_on"               column="deleted_on"       type="datetime"     nullable="true"/>
    </entity>
</doctrine-mapping>
Loading