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

mission specifique via AgentVH

parent 29202bf0
Loading
Loading
Loading
Loading
+9 −7
Changes for module/Application/src/Application/View/Helper/partial/agent.phtml: 9 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentMissionSpecifique;
use Application\Provider\Privilege\AgentPrivileges;
use Application\Provider\Privilege\MissionspecifiqueaffectationPrivileges;
use Application\Provider\Privilege\MissionspecifiquePrivileges;

$canVoirMission         = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER));
@@ -16,7 +17,7 @@ $canLettre = $this->isAllowed(MissionspecifiquePrivileges::getResou
$canAjouterMission      = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER));
$canModifierMission     = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER));
$canHistoriserMission   = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER));
$canDetruireMission     = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER));
$canDetruireMission     = $this->isAllowed(MissionspecifiqueaffectationPrivileges::getResourceId(MissionspecifiqueaffectationPrivileges::MISSIONSPECIFIQUEAFFECTATION_DETRUIRE));

$now = new DateTime();

@@ -107,11 +108,11 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"];
            foreach ($agent->getMissionsSpecifiques() as $mission) :
                $structure = $mission->getStructure();
            ?>
            <tr
                <?php if (!$mission->estEnCours()) : ?>
                    class="historise"
                <?php endif; ?>
            >
                <?php if ($canDetruireMission OR $mission->estNonHistorise()) : ?>
                        <tr class="
                        <?php if (!$mission->estEnCours()) echo " termine "; ?>
                        <?php if ($mission->estHistorise()) echo " historise "; ?>
                    ">
                        <td> <?php echo $mission->getMission()->getLibelle(); ?> </td>
                        <td> <?php echo ($structure)?$structure->getLibelleLong():"Aucune structure"; ?> </td>
                        <td> <?php echo ($mission->getDateDebut())?$mission->getDateDebut()->format('d/m/Y'):"---"; ?> </td>
@@ -177,7 +178,8 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"];
                                <?php endif; ?>
                            </td>
                        <?php endif;?>
            </tr>
                    </>
                <?php endif; ?>
            <?php endforeach; ?>
            </tbody>
            </table>