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

Correction du problème des types d'affectation et des types de structure

parent 3b0d9bb8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ class IndividuAffectation {
    private $individu;
    /** @var Structure */
    private $structure;
    /** @var StructureType */
    /** @var IndividuAffectationType */
    private $type;
    /** @var Source */
    private $source;
@@ -50,7 +50,7 @@ class IndividuAffectation {
    }

    /**
     * @return StructureType
     * @return IndividuAffectationType
     */
    public function getType()
    {
+53 −0
Original line number Diff line number Diff line
<?php

namespace Octopus\Entity\Db;

class IndividuAffectationType {
    /** @var integer */
    private $id;
    /** @var string */
    private $nom;
    /** @var string */
    private $libelle;
    /** @var string */
    private $description;

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

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

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

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

    public function __toString()
    {
        return $this->getLibelle();
    }


}
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
            <join-column name="STRUCTURE_ID" referenced-column-name="ID" />
        </many-to-one>

        <many-to-one target-entity="Octopus\Entity\Db\StructureType" field="type">
        <many-to-one target-entity="Octopus\Entity\Db\IndividuAffectationType" field="type">
            <join-column name="TYPE_ID" referenced-column-name="ID" />
        </many-to-one>

+14 −0
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="Octopus\Entity\Db\IndividuAffectationType" table="INDIVIDU_AFFECTATION_TYPE">

        <id name="id" type="integer" column="ID">
            <generator strategy="IDENTITY"/>
        </id>

        <field name="nom"           column="NOM"           type="string" length="50"    nullable="false"/>
        <field name="libelle"       column="LIBELLE"       type="string" length="255"   nullable="false"/>
        <field name="description"   column="DESCRIPTION"   type="string" length="1024"  nullable="false"/>

    </entity>
</doctrine-mapping>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -61,8 +61,9 @@ use UnicaenApp\Form\Element\SearchAndSelect;
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <?php echo $affectation->getSource(); ?>
                        <?php echo $affectation->getStructure()->getLibelleLong(); ?>
                        <?php echo $affectation->getType(); ?>
                        <?php echo $affectation->getStructure()->getType(); ?>
                        <?php echo $affectation->getStructure()->getLibelleLong(); ?>
                        (<?php echo $affectation->getDateDebut()->format('d/m/Y'); ?>
                        &rightarrow;
                        <?php echo ($affectation->getDateFin())?$affectation->getDateFin()->format('d/m/Y'):""; ?>)