Commit 643b41bc authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'refs/heads/b23'

parents 4479b679 958c2f51
Loading
Loading
Loading
Loading
+1
Changes for config/autoload/unicaen-tbl.global.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -493,6 +493,7 @@ return [
                ],
                'key_values_if_null' => [
                    'PLAFOND_ID'             => 0,
                    'INTERVENANT_ID'         => 0,
                    'TYPE_VOLUME_HORAIRE_ID' => 0,
                ],
            ],
+1 −1
Changes for data/ddl/table/TBL_PLAFOND_STRUCTURE.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ return [
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => FALSE,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 5,
            'commentaire' => NULL,
+23 −3
Changes for module/Intervenant/src/Form/EditionForm.php: 23 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ use Intervenant\Service\CiviliteServiceAwareTrait;
use Intervenant\Service\GradeServiceAwareTrait;
use Intervenant\Service\StatutServiceAwareTrait;
use Laminas\Form\Element;
use Laminas\Form\Element\Email;
use Laminas\Form\FormInterface;
use Laminas\Validator\EmailAddress;
use Lieu\Entity\Db\Structure;
use Lieu\Service\StructureServiceAwareTrait;
use OffreFormation\Entity\Db\Discipline;
@@ -61,6 +63,7 @@ class EditionForm extends AbstractForm
        'code'               => ['type' => 'string'],
        'codeRh'             => ['type' => 'string'],
        'utilisateurCode'    => ['type' => 'string'],
        'emailPerso'         => ['type' => 'string'],
        'source'             => ['type' => Source::class],
        'sourceCode'         => ['type' => 'string'],
        'syncStatut'         => ['type' => 'bool'],
@@ -232,6 +235,20 @@ class EditionForm extends AbstractForm

        ]);

        $this->add([
            'name'       => 'emailPerso',
            'type'       => Email::class,
            'options'    => [
                'label' => 'E-mail personnel',
                //'label_options' => ['disable_html_escape' => true],
            ],
            'attributes' => [
                //'placeholder' => "Email établissement",
                //'class'     => 'form-control left-border-none dossierElement',
            ],
            'type'       => Email::class,
        ]);

        $utilisateur = new SearchAndSelect('utilisateur');
        $utilisateur->setRequired(false)
            ->setSelectionRequired(false)
@@ -548,6 +565,12 @@ class EditionForm extends AbstractForm
            'nomPatronymique'              => ['required' => false],
            'prenom'                       => ['required' => true],
            'dateNaissance'                => ['required' => true],
            'emailPerso'                   => [
                'required'   => false,
                'validators' => [
                    ['name' => EmailAddress::class],
                ],
            ],
            'statut'                       => ['required' => false],
            'structure'                    => ['required' => false],
            'discipline'                   => ['required' => false],
@@ -579,9 +602,6 @@ class EditionForm extends AbstractForm
}





class EditionFormHydrator extends GenericHydrator
{
    use UtilisateurServiceAwareTrait;
+3
Changes for module/Intervenant/view/intervenant/intervenant/saisir.phtml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ if ($errors) {
                        <div class="col-md-4"><?= $this->formControlGroup($form->get('civilite')); ?></div>
                        <div class="col-md-8"><?= $this->formControlGroup($form->get('nomPatronymique')); ?></div>
                    </div>
                    <div class="row">
                        <div class="col-md-12"><?= $this->formControlGroup($form->get('emailPerso')); ?></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('validiteDebut')); ?></div>
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('validiteFin')); ?></div>
+20 −1
Changes for module/Mission/src/Controller/OffreEmploiController.php: 20 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ use Mission\Form\OffreEmploiFormAwareTrait;
use Mission\Service\CandidatureServiceAwareTrait;
use Mission\Service\MissionServiceAwareTrait;
use Mission\Service\OffreEmploiServiceAwareTrait;
use Plafond\Processus\PlafondProcessusAwareTrait;
use Service\Service\TypeVolumeHoraireServiceAwareTrait;
use UnicaenVue\View\Model\AxiosModel;


@@ -35,6 +37,8 @@ class OffreEmploiController extends AbstractController
    use ContextServiceAwareTrait;
    use MissionServiceAwareTrait;
    use WorkflowServiceAwareTrait;
    use PlafondProcessusAwareTrait;
    use TypeVolumeHoraireServiceAwareTrait;


    public function indexAction()
@@ -56,9 +60,24 @@ class OffreEmploiController extends AbstractController
        } else {
            $title = "Modification d'une offre d'emploi";
        }
        $form->bindRequestSave($offreEmploi, $this->getRequest(), function () use ($offreEmploi, $form) {

        // A adapter pour utiliser le futur type de volume horaire "BESOIN"
        $typeVolumeHoraire = $this->getServiceTypeVolumeHoraire()->getPrevu();

        $hDeb = $offreEmploi->getNombreHeures() * $offreEmploi->getNombrePostes();
        $form->bindRequestSave($offreEmploi, $this->getRequest(), function () use ($offreEmploi, $form, $hDeb, $typeVolumeHoraire) {

            $this->getProcessusPlafond()->beginTransaction();
            try {
                $this->getServiceOffreEmploi()->save($offreEmploi);
                $hFin = $offreEmploi->getNombreHeures() * $offreEmploi->getNombrePostes();
                $this->getProcessusPlafond()->endTransaction($offreEmploi->getStructure(), $typeVolumeHoraire, $hFin < $hDeb);

            } catch (\Exception $e) {
                $this->flashMessenger()->addErrorMessage($this->translate($e));
                $this->em()->rollback();
            }


            $this->flashMessenger()->addSuccessMessage(
                "Enregistrement effectué"
Loading