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

Modification de Agent pour envoi de mail vers agent non créé

parent 9b6f95bc
Loading
Loading
Loading
Loading
+12 −0
Changes for module/Application/config/merged/entretien-professionnel.config.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ return [
                    'action' => [
                        'creer',
                        'modifier',
                        'envoyer-convocation',
                    ],
                    'privileges' => [
                        EntretienproPrivileges::ENTRETIENPRO_AJOUTER,
@@ -352,6 +353,17 @@ return [
                            ],
                        ],
                    ],
                    'envoyer-convocation' => [
                        'type'  => Segment::class,
                        'may_terminate' => true,
                        'options' => [
                            'route'    => '/envoyer-convocation/:entretien',
                            'defaults' => [
                                'controller' => EntretienProfessionnelController::class,
                                'action'     => 'envoyer-convocation',
                            ],
                        ],
                    ],
                    /** CAMPAGNE */
                    'campagne' => [
                        'type'  => Literal::class,
+10 −0
Changes for module/Application/src/Application/Controller/EntretienProfessionnelController.php: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -134,6 +134,16 @@ class EntretienProfessionnelController extends AbstractActionController
        return $vm;
    }

    public function envoyerConvocationAction()
    {
        $entretien = $this->getEntretienProfessionnelService()->getRequestedEntretienProfessionnel($this, 'entretien');
        $campagne = $entretien->getCampagne();
        $agent = $entretien->getAgent();
        $utilisateur = $agent->getUtilisateur();
        $this->getMailingService()->sendMailType("ENTRETIEN_CONVOCATION_AGENT", ['campagne' => $entretien->getCampagne(), 'entretien' => $entretien, 'user' => $entretien->getAgent()]);
        return $this->redirect()->toRoute('entretien-professionnel', [], [], true);
    }

    public function modifierAction()
    {
        $structure = $this->getStructureService()->getRequestedStructure($this);
+40 −0
Changes for module/Application/src/Application/Entity/Db/Agent.php: 40 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ class Agent implements HasApplicationCollectionInterface, HasCompetenceCollectio
    private $utilisateur;
    /** @var int */
    private $harpId;
    /** @var string */
    private $login;
    /** @var string */
    private $email;
    /** @var DateTime */
    private $delete;

@@ -111,6 +115,42 @@ class Agent implements HasApplicationCollectionInterface, HasCompetenceCollectio

    }

    /**
     * @return string|null
     */
    public function getLogin(): ?string
    {
        return $this->login;
    }

    /**
     * @param string|null $login
     * @return Agent
     */
    public function setLogin(?string $login): Agent
    {
        $this->login = $login;
        return $this;
    }

    /**
     * @return string|null
     */
    public function getEmail(): ?string
    {
        return $this->email;
    }

    /**
     * @param string|null $email
     * @return Agent
     */
    public function setEmail(?string $email): Agent
    {
        $this->email = $email;
        return $this;
    }

    /**
     * @return AgentAffectation[]
     */
+2 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Agent.dcm.xml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@
        <field name="prenom"                   column="prenom"              type="string" length="64" />
        <field name="nomUsuel"                 column="nom_usage"           type="string" length="64" />
        <field name="harpId"                   column="harp_id"             type="integer" />
        <field name="login"                    column="login"               type="string" length="256" />
        <field name="email"                    column="email"               type="string" length="1024" />

        <one-to-many target-entity="Application\Entity\Db\AgentQuotite" mapped-by="agent" field="quotites"/>
        <one-to-many target-entity="Application\Entity\Db\AgentAffectation" mapped-by="agent" field="affectations"/>