Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ class IndividuAffectation { ...@@ -12,7 +12,7 @@ class IndividuAffectation {
private $individu; private $individu;
/** @var Structure */ /** @var Structure */
private $structure; private $structure;
/** @var StructureType */ /** @var IndividuAffectationType */
private $type; private $type;
/** @var Source */ /** @var Source */
private $source; private $source;
...@@ -50,7 +50,7 @@ class IndividuAffectation { ...@@ -50,7 +50,7 @@ class IndividuAffectation {
} }
/** /**
* @return StructureType * @return IndividuAffectationType
*/ */
public function getType() public function getType()
{ {
......
<?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();
}
}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<join-column name="STRUCTURE_ID" referenced-column-name="ID" /> <join-column name="STRUCTURE_ID" referenced-column-name="ID" />
</many-to-one> </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" /> <join-column name="TYPE_ID" referenced-column-name="ID" />
</many-to-one> </many-to-one>
......
<?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
...@@ -61,8 +61,9 @@ use UnicaenApp\Form\Element\SearchAndSelect; ...@@ -61,8 +61,9 @@ use UnicaenApp\Form\Element\SearchAndSelect;
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<?php echo $affectation->getSource(); ?> <?php echo $affectation->getSource(); ?>
<?php echo $affectation->getStructure()->getLibelleLong(); ?>
<?php echo $affectation->getType(); ?> <?php echo $affectation->getType(); ?>
<?php echo $affectation->getStructure()->getType(); ?>
<?php echo $affectation->getStructure()->getLibelleLong(); ?>
(<?php echo $affectation->getDateDebut()->format('d/m/Y'); ?> (<?php echo $affectation->getDateDebut()->format('d/m/Y'); ?>
&rightarrow; &rightarrow;
<?php echo ($affectation->getDateFin())?$affectation->getDateFin()->format('d/m/Y'):""; ?>) <?php echo ($affectation->getDateFin())?$affectation->getDateFin()->format('d/m/Y'):""; ?>)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment