Commit d71b15dd authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Adapdation des types de ressources pour gérer les missions

parent 6b988992
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
    <field name="histoModification" type="datetime" column="HISTO_MODIFICATION" nullable="false"/>
    <field name="libelle" type="string" column="LIBELLE" length="200" nullable="false"/>
    <field name="referentiel" type="boolean" column="REFERENTIEL" nullable="false"/>
    <field name="mission" type="boolean" column="MISSION" nullable="false"/>
    <field name="etablissement" type="boolean" column="ETABLISSEMENT" nullable="false"/>
    <many-to-one field="histoModificateur" target-entity="Application\Entity\Db\Utilisateur">
      <join-columns>
+34 −0
Original line number Diff line number Diff line
@@ -50,6 +50,11 @@ class TypeRessource implements HistoriqueAwareInterface, ResourceInterface
     */
    private $referentiel;

    /**
     * @var boolean
     */
    private $mission;

    /**
     * @var integer
     */
@@ -258,6 +263,33 @@ class TypeRessource implements HistoriqueAwareInterface, ResourceInterface



    /**
     * Set mission
     *
     * @param boolean $mission
     *
     * @return TypeRessource
     */
    public function setMission($mission)
    {
        $this->mission = $mission;

        return $this;
    }



    /**
     * Get mission
     *
     * @return boolean
     */
    public function getMission()
    {
        return $this->mission;
    }


    /**
     * Get id
     *
@@ -315,6 +347,8 @@ class TypeRessource implements HistoriqueAwareInterface, ResourceInterface
                return $this->getFcMajorees();
            case TypeHeures::REFERENTIEL:
                return $this->getReferentiel();
            case TypeHeures::MISSION:
                return $this->getMission();
        }

        return false;
+8 −0
Original line number Diff line number Diff line
@@ -73,6 +73,14 @@ class TypeRessourceSaisieForm extends AbstractForm
            'type'    => 'Checkbox',
        ]);

        $this->add([
            'name'    => 'mission',
            'options' => [
                'label' => 'Mission',
            ],
            'type'    => 'Checkbox',
        ]);

        $this->add([
            'name'    => 'etablissement',
            'options' => [
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ class TypeRessourceHydrator implements HydratorInterface
        $object->setFc($data['fc']);
        $object->setFcMajorees($data['fc_majore']);
        $object->setReferentiel($data['referentiel']);
        $object->setMission($data['mission']);
        $object->setEtablissement($data['etablissement']);

        return $object;
@@ -50,6 +51,7 @@ class TypeRessourceHydrator implements HydratorInterface
            'fc'            => $object->getFc(),
            'fc_majore'     => $object->getFcMajorees(),
            'referentiel'   => $object->getReferentiel(),
            'mission'       => $object->getMission(),
            'etablissement' => $object->getEtablissement(),
        ];

+7 −1
Original line number Diff line number Diff line
<?php

/**
 * @var $listTypesRessources \Paiement\Entity\Db\TypeRessource[]
 */

use Application\Provider\Privilege\Privileges;

$this->headTitle()->append($title);
@@ -19,7 +23,8 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::TYPE_RESSOURCE
        <th>FC</th>
        <th>FC Majorée</th>
        <th>Référentiel</th>
        <th>Etablissement</th>
        <th>Mission</th>
        <th>Établissement</th>
        <?php if ($canEdit): ?>
            <th>Actions</th>
        <?php endif; ?>
@@ -37,6 +42,7 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::TYPE_RESSOURCE
            <td><?= ($type->getFc()) ? 'OUI' : 'NON'; ?></td>
            <td><?= ($type->getFcMajorees()) ? 'OUI' : 'NON'; ?></td>
            <td><?= ($type->getReferentiel()) ? 'OUI' : 'NON'; ?></td>
            <td><?= ($type->getMission()) ? 'OUI' : 'NON'; ?></td>
            <td><?= ($type->getEtablissement()) ? 'OUI' : 'NON'; ?></td>
            <?php if ($canEdit): ?>
                <td style="text-align:center;width:1px;white-space: nowrap">
Loading