Loading module/Application/src/Controller/PieceJointeController.php +30 −2 Changes for module/Application/src/Controller/PieceJointeController.php: 30 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Application\Service\Traits\TypePieceJointeServiceAwareTrait; use Application\Service\Traits\TypePieceJointeStatutServiceAwareTrait; use Application\Form\PieceJointe\Traits\TypePieceJointeSaisieFormAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use phpDocumentor\Reflection\Types\Array_; use UnicaenApp\View\Model\MessengerViewModel; use Laminas\View\Model\ViewModel; use Laminas\View\Model\JsonModel; Loading Loading @@ -64,6 +65,7 @@ class PieceJointeController extends AbstractController } /** * * @return ViewModel Loading Loading @@ -105,6 +107,7 @@ class PieceJointeController extends AbstractController } /** * * @return ViewModel Loading @@ -125,6 +128,7 @@ class PieceJointeController extends AbstractController } /** * @param TblPieceJointeDemande[] $demandees * @param TblPieceJointeFournie[] $fournies Loading Loading @@ -172,6 +176,7 @@ class PieceJointeController extends AbstractController } public function validationAction() { $this->initFilters(); Loading @@ -184,6 +189,7 @@ class PieceJointeController extends AbstractController } public function validerAction() { $this->initFilters(); Loading @@ -201,6 +207,7 @@ class PieceJointeController extends AbstractController } public function archiverAction() { $this->initFilters(); Loading @@ -222,6 +229,7 @@ class PieceJointeController extends AbstractController } public function devaliderAction() { $this->initFilters(); Loading @@ -239,6 +247,7 @@ class PieceJointeController extends AbstractController } public function listerAction() { $this->initFilters(); Loading @@ -259,6 +268,7 @@ class PieceJointeController extends AbstractController } public function televerserAction() { $intervenant = $this->getEvent()->getParam('intervenant'); Loading @@ -282,6 +292,7 @@ class PieceJointeController extends AbstractController } public function telechargerAction() { /** @var Fichier $fichier */ Loading @@ -302,6 +313,7 @@ class PieceJointeController extends AbstractController } public function supprimerAction() { if (!$this->getRequest()->isPost()) { Loading @@ -328,6 +340,7 @@ class PieceJointeController extends AbstractController } /* Actions liées à la configuration des PJ */ public function configurationAction() Loading @@ -336,6 +349,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeStatutAction() { $codeIntervenant = $this->params()->fromRoute('codeTypeIntervenant', TypeIntervenant::CODE_EXTERIEUR); Loading @@ -353,8 +367,15 @@ class PieceJointeController extends AbstractController $typesPiecesJointes = $this->getServiceTypePieceJointe()->getList(); $statuts = $this->getServiceStatut()->getList(); $typesIntervenants = []; foreach ($statuts as $intervenant) { if (!in_array($intervenant->getTypeIntervenant(), $typesIntervenants)) { $typesIntervenants[] = $intervenant->getTypeIntervenant(); } } $statutsIntervenants = []; $statutsIntervenants = null; foreach ($statuts as $statut) { if ($statut->getTypeIntervenant()->getCode() == $codeIntervenant) { $statutsIntervenants[$statut->getTypeIntervenant()->getId()][] = $statut; Loading Loading @@ -387,10 +408,11 @@ class PieceJointeController extends AbstractController $typesPiecesJointesStatuts[$tpjID][$siId][] = $tpjs; } return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant'); return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant', 'typesIntervenants'); } public function typePieceJointeDeleteAction() { $typePieceJointe = $this->getEvent()->getParam('typePieceJointe'); Loading @@ -406,6 +428,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeSaisieAction() { /* @var $typePieceJointe TypePieceJointe */ Loading @@ -425,6 +448,7 @@ class PieceJointeController extends AbstractController } public function modifierTypePieceJointeStatutAction() { /* @var $tpjs TypePieceJointeStatut */ Loading @@ -450,6 +474,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeTrierAction() { /* @var $tpj TypePieceJointe */ Loading @@ -475,6 +500,7 @@ class PieceJointeController extends AbstractController } public function deleteTypePieceJointeStatutAction() { $typePieceJointeStatut = $this->getEvent()->getParam('typePieceJointeStatut'); Loading @@ -490,6 +516,7 @@ class PieceJointeController extends AbstractController } private function updateTableauxBord(Intervenant $intervenant, $validation = false) { $this->getServiceWorkflow()->calculerTableauxBord([ Loading @@ -510,6 +537,7 @@ class PieceJointeController extends AbstractController } public function refuserAction() { /** @var PieceJointe $pj */ Loading module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml +15 −20 Changes for module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml: 15 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Intervenant\Entity\Db\TypeIntervenant; * @var $statutsIntervenants Statut[][] * @var $typesPiecesJointesStatuts TypePieceJointeStatut[][][] * @var $codeIntervenant string * @var $typesIntervenants TypeIntervenant[] */ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_EDITION)); Loading Loading @@ -134,30 +135,24 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC </script> <?php $this->headTitle()->append($title = "Pièces justificatives attendues par statut d'intervenant") ?> <h1 class="page-header"><?= $title ?></h1> <ul class="type-intervenant"> <?php if ($codeIntervenant == TypeIntervenant::CODE_PERMANENT): ?> <li> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Vacataires</a> </li> <li class="active"> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_PERMANENT]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Permanents</a> </li> <?php else: ?> <li class="active"> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Vacataires</a> </li> <li> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_PERMANENT]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Permanents</a> </li> <div class="nav-local"> <ul> <?php foreach ($typesIntervenants as $intervenant): if ($codeIntervenant == $intervenant->getCode()):?> <li class="nav-item active"> <?php else: ?> <li class="nav-item"> <?php endif; ?> <a class="nav-link" href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => $intervenant->getCode()]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> <?php echo $intervenant->getLibelle() ?></a> </li> <?php endforeach; ?> </ul> <div style="clear:both"></div> </div> <table id="tblTpjs" class="table-bordered table-sm table-header table-header-rotated" style="width:1121px"> <thead> Loading Loading
module/Application/src/Controller/PieceJointeController.php +30 −2 Changes for module/Application/src/Controller/PieceJointeController.php: 30 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Application\Service\Traits\TypePieceJointeServiceAwareTrait; use Application\Service\Traits\TypePieceJointeStatutServiceAwareTrait; use Application\Form\PieceJointe\Traits\TypePieceJointeSaisieFormAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use phpDocumentor\Reflection\Types\Array_; use UnicaenApp\View\Model\MessengerViewModel; use Laminas\View\Model\ViewModel; use Laminas\View\Model\JsonModel; Loading Loading @@ -64,6 +65,7 @@ class PieceJointeController extends AbstractController } /** * * @return ViewModel Loading Loading @@ -105,6 +107,7 @@ class PieceJointeController extends AbstractController } /** * * @return ViewModel Loading @@ -125,6 +128,7 @@ class PieceJointeController extends AbstractController } /** * @param TblPieceJointeDemande[] $demandees * @param TblPieceJointeFournie[] $fournies Loading Loading @@ -172,6 +176,7 @@ class PieceJointeController extends AbstractController } public function validationAction() { $this->initFilters(); Loading @@ -184,6 +189,7 @@ class PieceJointeController extends AbstractController } public function validerAction() { $this->initFilters(); Loading @@ -201,6 +207,7 @@ class PieceJointeController extends AbstractController } public function archiverAction() { $this->initFilters(); Loading @@ -222,6 +229,7 @@ class PieceJointeController extends AbstractController } public function devaliderAction() { $this->initFilters(); Loading @@ -239,6 +247,7 @@ class PieceJointeController extends AbstractController } public function listerAction() { $this->initFilters(); Loading @@ -259,6 +268,7 @@ class PieceJointeController extends AbstractController } public function televerserAction() { $intervenant = $this->getEvent()->getParam('intervenant'); Loading @@ -282,6 +292,7 @@ class PieceJointeController extends AbstractController } public function telechargerAction() { /** @var Fichier $fichier */ Loading @@ -302,6 +313,7 @@ class PieceJointeController extends AbstractController } public function supprimerAction() { if (!$this->getRequest()->isPost()) { Loading @@ -328,6 +340,7 @@ class PieceJointeController extends AbstractController } /* Actions liées à la configuration des PJ */ public function configurationAction() Loading @@ -336,6 +349,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeStatutAction() { $codeIntervenant = $this->params()->fromRoute('codeTypeIntervenant', TypeIntervenant::CODE_EXTERIEUR); Loading @@ -353,8 +367,15 @@ class PieceJointeController extends AbstractController $typesPiecesJointes = $this->getServiceTypePieceJointe()->getList(); $statuts = $this->getServiceStatut()->getList(); $typesIntervenants = []; foreach ($statuts as $intervenant) { if (!in_array($intervenant->getTypeIntervenant(), $typesIntervenants)) { $typesIntervenants[] = $intervenant->getTypeIntervenant(); } } $statutsIntervenants = []; $statutsIntervenants = null; foreach ($statuts as $statut) { if ($statut->getTypeIntervenant()->getCode() == $codeIntervenant) { $statutsIntervenants[$statut->getTypeIntervenant()->getId()][] = $statut; Loading Loading @@ -387,10 +408,11 @@ class PieceJointeController extends AbstractController $typesPiecesJointesStatuts[$tpjID][$siId][] = $tpjs; } return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant'); return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant', 'typesIntervenants'); } public function typePieceJointeDeleteAction() { $typePieceJointe = $this->getEvent()->getParam('typePieceJointe'); Loading @@ -406,6 +428,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeSaisieAction() { /* @var $typePieceJointe TypePieceJointe */ Loading @@ -425,6 +448,7 @@ class PieceJointeController extends AbstractController } public function modifierTypePieceJointeStatutAction() { /* @var $tpjs TypePieceJointeStatut */ Loading @@ -450,6 +474,7 @@ class PieceJointeController extends AbstractController } public function typePieceJointeTrierAction() { /* @var $tpj TypePieceJointe */ Loading @@ -475,6 +500,7 @@ class PieceJointeController extends AbstractController } public function deleteTypePieceJointeStatutAction() { $typePieceJointeStatut = $this->getEvent()->getParam('typePieceJointeStatut'); Loading @@ -490,6 +516,7 @@ class PieceJointeController extends AbstractController } private function updateTableauxBord(Intervenant $intervenant, $validation = false) { $this->getServiceWorkflow()->calculerTableauxBord([ Loading @@ -510,6 +537,7 @@ class PieceJointeController extends AbstractController } public function refuserAction() { /** @var PieceJointe $pj */ Loading
module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml +15 −20 Changes for module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml: 15 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Intervenant\Entity\Db\TypeIntervenant; * @var $statutsIntervenants Statut[][] * @var $typesPiecesJointesStatuts TypePieceJointeStatut[][][] * @var $codeIntervenant string * @var $typesIntervenants TypeIntervenant[] */ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_EDITION)); Loading Loading @@ -134,30 +135,24 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC </script> <?php $this->headTitle()->append($title = "Pièces justificatives attendues par statut d'intervenant") ?> <h1 class="page-header"><?= $title ?></h1> <ul class="type-intervenant"> <?php if ($codeIntervenant == TypeIntervenant::CODE_PERMANENT): ?> <li> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Vacataires</a> </li> <li class="active"> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_PERMANENT]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Permanents</a> </li> <?php else: ?> <li class="active"> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Vacataires</a> </li> <li> <a href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_PERMANENT]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> Permanents</a> </li> <div class="nav-local"> <ul> <?php foreach ($typesIntervenants as $intervenant): if ($codeIntervenant == $intervenant->getCode()):?> <li class="nav-item active"> <?php else: ?> <li class="nav-item"> <?php endif; ?> <a class="nav-link" href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => $intervenant->getCode()]); ?>" data-placement="bottom"><i class="fas fa-eye"></i> <?php echo $intervenant->getLibelle() ?></a> </li> <?php endforeach; ?> </ul> <div style="clear:both"></div> </div> <table id="tblTpjs" class="table-bordered table-sm table-header table-header-rotated" style="width:1121px"> <thead> Loading