Loading module/Application/config/pieces.config.php +2 −2 Changes for module/Application/config/pieces.config.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -171,9 +171,9 @@ return [ ], ], 'type-piece-jointe-statut' => [ 'type' => 'Literal', 'type' => 'Segment', 'options' => [ 'route' => '/type-piece-jointe-statut', 'route' => '/type-piece-jointe-statut[/:codeTypeIntervenant]', 'defaults' => [ 'action' => 'type-piece-jointe-statut', ], Loading module/Application/src/Controller/PieceJointeController.php +10 −3 Changes for module/Application/src/Controller/PieceJointeController.php: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Application\Form\PieceJointe\Traits\ModifierTypePieceJointeStatutFormAwareTr use Application\Service\Traits\IntervenantServiceAwareTrait; use Application\Service\Traits\PieceJointeServiceAwareTrait; use Intervenant\Entity\Db\Statut; use Intervenant\Entity\Db\TypeIntervenant; use Intervenant\Service\StatutServiceAwareTrait; use Application\Service\Traits\TypePieceJointeServiceAwareTrait; use Application\Service\Traits\TypePieceJointeStatutServiceAwareTrait; Loading Loading @@ -345,11 +346,13 @@ class PieceJointeController extends AbstractController public function typePieceJointeStatutAction() { $codeIntervenant = $this->params()->fromRoute('codeTypeIntervenant', TypeIntervenant::CODE_EXTERIEUR); $this->em()->getFilters()->enable('historique')->init(entity: [ TypePieceJointe::class, Statut::class, TypePieceJointeStatut::class, ]); $this->em()->getFilters()->enable('annee')->init([ Statut::class, ]); Loading @@ -358,10 +361,13 @@ class PieceJointeController extends AbstractController $typesPiecesJointes = $this->getServiceTypePieceJointe()->getList(); $statuts = $this->getServiceStatut()->getList(); $statutsIntervenants = []; foreach ($statuts as $statut) { if ($statut->getTypeIntervenant()->getCode() == $codeIntervenant) { $statutsIntervenants[$statut->getTypeIntervenant()->getId()][] = $statut; } } $dql = " SELECT Loading @@ -370,12 +376,13 @@ class PieceJointeController extends AbstractController " . TypePieceJointeStatut::class . " tpjs JOIN tpjs.typePieceJointe tpj JOIN tpjs.statut si JOIN si.typeIntervenant ti WHERE tpjs.annee = :annee "; AND ti.code = :code"; /* @var $tpjss TypePieceJointeStatut[] */ $query = $this->em()->createQuery($dql)->setParameters(['annee' => $this->getServiceContext()->getAnnee()->getId()]); $query = $this->em()->createQuery($dql)->setParameters(['annee' => $this->getServiceContext()->getAnnee()->getId(), 'code' => $codeIntervenant]); $tpjss = $query->getResult(); $typesPiecesJointesStatuts = []; foreach ($tpjss as $tpjs) { Loading @@ -388,7 +395,7 @@ class PieceJointeController extends AbstractController $typesPiecesJointesStatuts[$tpjID][$siId][] = $tpjs; } return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts'); return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant'); } Loading module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml +42 −13 Changes for module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml: 42 added lines, 13 removed lines. Original line number Diff line number Diff line Loading @@ -4,11 +4,13 @@ use Application\Entity\Db\TypePieceJointe; use Intervenant\Entity\Db\Statut; use Application\Entity\Db\TypePieceJointeStatut; use Application\Provider\Privilege\Privileges; use Intervenant\Entity\Db\TypeIntervenant; /** * @var $typesPiecesJointes TypePieceJointe[] * @var $statutsIntervenants Statut[][] * @var $typesPiecesJointesStatuts TypePieceJointeStatut[][][] * @var $codeIntervenant string */ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_EDITION)); Loading Loading @@ -135,24 +137,52 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC <h1 class="page-header"><?= $title ?></h1> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">type d'intervenant</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Type d'intervenant</a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <?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> <?php endif; ?> </ul> </div> </div> </nav> <table id="tblTpjs" class="table-bordered table-condensed table-header table-header-rotated" style="width:1121px"> <thead> <tr> <th class="rotate-45 si" data-si=""><span> </span></th> <?php $i = 0; foreach ($statutsIntervenants as $statuts): foreach ($statuts as $statut): $i++; ?> foreach ($statutsIntervenants as $statuts): foreach ($statuts as $statut): $i++; ?> <th class="rotate-45 si <?= $i == 1 ? 'first' : '' ?>" data-si="<?php $statut->getLibelle() ?>"> <div id="<?= 'th' . $i ?>"><span><?= $statut; ?></span></div> </th> <?php endforeach; endforeach; ?> </tr> <tr> <th><span> </span></th> <?php foreach ($statutsIntervenants as $statuts): ?> <th colspan="<?= count($statuts) ?>"><?= reset($statuts)->getTypeIntervenant() ?></th> <?php endforeach; ?> <?php endforeach; endforeach; ?> </tr> </thead> Loading @@ -160,13 +190,12 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC <?php $j = 0; foreach ($typesPiecesJointes as $typePieceJointe) { echo $this->partial('partial/tpjs-ligne', [ 'canEdit' => $canEdit, echo $this->partial('partial/tpjs-ligne', ['canEdit' => $canEdit, 'statutsIntervenants' => $statutsIntervenants, 'typePieceJointe' => $typePieceJointe, 'tpjss' => isset($typesPiecesJointesStatuts[$typePieceJointe->getId()]) ? $typesPiecesJointesStatuts[$typePieceJointe->getId()] : [], 'j' => $j, ]); 'codeIntervenant' => $codeIntervenant,]); $j++; } ?> Loading module/Intervenant/view/intervenant/statut/saisie.phtml +3 −1 Changes for module/Intervenant/view/intervenant/statut/saisie.phtml: 3 added lines, 1 removed line. Original line number Diff line number Diff line <?php use Application\Provider\Privilege\Privileges; use Intervenant\Entity\Db\TypeIntervenant; /** * @var $this \Application\View\Renderer\PhpRenderer Loading Loading @@ -156,7 +157,8 @@ $canAdd = $this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_STA <div class="col-md-12"> <?= $this->formControlGroup($form->get('pieceJustificative')); ?> <?php if ($this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_VISUALISATION))): ?> <a target="_blank" href="<?= $this->url('piece-jointe/type-piece-jointe-statut'); ?>"> <a target="_blank" href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>"> Page d'administration des pièces justificatives </a> <?php endif; ?> Loading Loading
module/Application/config/pieces.config.php +2 −2 Changes for module/Application/config/pieces.config.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -171,9 +171,9 @@ return [ ], ], 'type-piece-jointe-statut' => [ 'type' => 'Literal', 'type' => 'Segment', 'options' => [ 'route' => '/type-piece-jointe-statut', 'route' => '/type-piece-jointe-statut[/:codeTypeIntervenant]', 'defaults' => [ 'action' => 'type-piece-jointe-statut', ], Loading
module/Application/src/Controller/PieceJointeController.php +10 −3 Changes for module/Application/src/Controller/PieceJointeController.php: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Application\Form\PieceJointe\Traits\ModifierTypePieceJointeStatutFormAwareTr use Application\Service\Traits\IntervenantServiceAwareTrait; use Application\Service\Traits\PieceJointeServiceAwareTrait; use Intervenant\Entity\Db\Statut; use Intervenant\Entity\Db\TypeIntervenant; use Intervenant\Service\StatutServiceAwareTrait; use Application\Service\Traits\TypePieceJointeServiceAwareTrait; use Application\Service\Traits\TypePieceJointeStatutServiceAwareTrait; Loading Loading @@ -345,11 +346,13 @@ class PieceJointeController extends AbstractController public function typePieceJointeStatutAction() { $codeIntervenant = $this->params()->fromRoute('codeTypeIntervenant', TypeIntervenant::CODE_EXTERIEUR); $this->em()->getFilters()->enable('historique')->init(entity: [ TypePieceJointe::class, Statut::class, TypePieceJointeStatut::class, ]); $this->em()->getFilters()->enable('annee')->init([ Statut::class, ]); Loading @@ -358,10 +361,13 @@ class PieceJointeController extends AbstractController $typesPiecesJointes = $this->getServiceTypePieceJointe()->getList(); $statuts = $this->getServiceStatut()->getList(); $statutsIntervenants = []; foreach ($statuts as $statut) { if ($statut->getTypeIntervenant()->getCode() == $codeIntervenant) { $statutsIntervenants[$statut->getTypeIntervenant()->getId()][] = $statut; } } $dql = " SELECT Loading @@ -370,12 +376,13 @@ class PieceJointeController extends AbstractController " . TypePieceJointeStatut::class . " tpjs JOIN tpjs.typePieceJointe tpj JOIN tpjs.statut si JOIN si.typeIntervenant ti WHERE tpjs.annee = :annee "; AND ti.code = :code"; /* @var $tpjss TypePieceJointeStatut[] */ $query = $this->em()->createQuery($dql)->setParameters(['annee' => $this->getServiceContext()->getAnnee()->getId()]); $query = $this->em()->createQuery($dql)->setParameters(['annee' => $this->getServiceContext()->getAnnee()->getId(), 'code' => $codeIntervenant]); $tpjss = $query->getResult(); $typesPiecesJointesStatuts = []; foreach ($tpjss as $tpjs) { Loading @@ -388,7 +395,7 @@ class PieceJointeController extends AbstractController $typesPiecesJointesStatuts[$tpjID][$siId][] = $tpjs; } return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts'); return compact('typesPiecesJointes', 'statutsIntervenants', 'typesPiecesJointesStatuts', 'codeIntervenant'); } Loading
module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml +42 −13 Changes for module/Application/view/application/piece-jointe/type-piece-jointe-statut.phtml: 42 added lines, 13 removed lines. Original line number Diff line number Diff line Loading @@ -4,11 +4,13 @@ use Application\Entity\Db\TypePieceJointe; use Intervenant\Entity\Db\Statut; use Application\Entity\Db\TypePieceJointeStatut; use Application\Provider\Privilege\Privileges; use Intervenant\Entity\Db\TypeIntervenant; /** * @var $typesPiecesJointes TypePieceJointe[] * @var $statutsIntervenants Statut[][] * @var $typesPiecesJointesStatuts TypePieceJointeStatut[][][] * @var $codeIntervenant string */ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_EDITION)); Loading Loading @@ -135,24 +137,52 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC <h1 class="page-header"><?= $title ?></h1> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">type d'intervenant</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Type d'intervenant</a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <?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> <?php endif; ?> </ul> </div> </div> </nav> <table id="tblTpjs" class="table-bordered table-condensed table-header table-header-rotated" style="width:1121px"> <thead> <tr> <th class="rotate-45 si" data-si=""><span> </span></th> <?php $i = 0; foreach ($statutsIntervenants as $statuts): foreach ($statuts as $statut): $i++; ?> foreach ($statutsIntervenants as $statuts): foreach ($statuts as $statut): $i++; ?> <th class="rotate-45 si <?= $i == 1 ? 'first' : '' ?>" data-si="<?php $statut->getLibelle() ?>"> <div id="<?= 'th' . $i ?>"><span><?= $statut; ?></span></div> </th> <?php endforeach; endforeach; ?> </tr> <tr> <th><span> </span></th> <?php foreach ($statutsIntervenants as $statuts): ?> <th colspan="<?= count($statuts) ?>"><?= reset($statuts)->getTypeIntervenant() ?></th> <?php endforeach; ?> <?php endforeach; endforeach; ?> </tr> </thead> Loading @@ -160,13 +190,12 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFIC <?php $j = 0; foreach ($typesPiecesJointes as $typePieceJointe) { echo $this->partial('partial/tpjs-ligne', [ 'canEdit' => $canEdit, echo $this->partial('partial/tpjs-ligne', ['canEdit' => $canEdit, 'statutsIntervenants' => $statutsIntervenants, 'typePieceJointe' => $typePieceJointe, 'tpjss' => isset($typesPiecesJointesStatuts[$typePieceJointe->getId()]) ? $typesPiecesJointesStatuts[$typePieceJointe->getId()] : [], 'j' => $j, ]); 'codeIntervenant' => $codeIntervenant,]); $j++; } ?> Loading
module/Intervenant/view/intervenant/statut/saisie.phtml +3 −1 Changes for module/Intervenant/view/intervenant/statut/saisie.phtml: 3 added lines, 1 removed line. Original line number Diff line number Diff line <?php use Application\Provider\Privilege\Privileges; use Intervenant\Entity\Db\TypeIntervenant; /** * @var $this \Application\View\Renderer\PhpRenderer Loading Loading @@ -156,7 +157,8 @@ $canAdd = $this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_STA <div class="col-md-12"> <?= $this->formControlGroup($form->get('pieceJustificative')); ?> <?php if ($this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_GESTION_VISUALISATION))): ?> <a target="_blank" href="<?= $this->url('piece-jointe/type-piece-jointe-statut'); ?>"> <a target="_blank" href="<?= $this->url('piece-jointe/type-piece-jointe-statut', ['codeTypeIntervenant' => TypeIntervenant::CODE_EXTERIEUR]); ?>"> Page d'administration des pièces justificatives </a> <?php endif; ?> Loading