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

up

parent 782ca32f
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -5,12 +5,26 @@ Version 4.0.1 (18/10/2023)
---
- Correction de l'oublie d'interface sur l'entite Fichier qui empêchait le dépôt de fichier
- Retrait de TODO rendu visible
- Décalage des mots clefs du CDREF qui étaient mal poisitionné


Modification en BD
---

```postgresql
-- Décalage des mots clefs du CREF mal positionnés
update unicaen_autoform_champ set mots_clefs=null where id=138;
update unicaen_autoform_champ set mots_clefs='CREF;6;VAE' where id=137;
update unicaen_autoform_champ set mots_clefs=null where id=129;
update unicaen_autoform_champ set mots_clefs='CREF;6;bilan' where id=134;
update unicaen_autoform_champ set mots_clefs=null where id=128;
update unicaen_autoform_champ set mots_clefs='CREF;6;periode' where id=130;
update unicaen_autoform_champ set mots_clefs=null where id=130;
update unicaen_autoform_champ set mots_clefs='CREF;6;conge' where id=135;
update unicaen_autoform_champ set mots_clefs=null where id=127;
update unicaen_autoform_champ set mots_clefs='CREF;6;ecarriere' where id=131;
update unicaen_autoform_champ set mots_clefs=null where id=136;
update unicaen_autoform_champ set mots_clefs='CREF;6;bcarriere' where id=132;
```

Evolution des librairies
+4 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ namespace EntretienProfessionnel\Controller;
use EntretienProfessionnel\Entity\Db\AgentForceSansObligation;
use EntretienProfessionnel\Form\AgentForceSansObligation\AgentForceSansObligationFormAwareTrait;
use EntretienProfessionnel\Service\AgentForceSansObligation\AgentForceSansObligationServiceAwareTrait;
use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait;
use Laminas\Http\Request;
use Laminas\Http\Response;
use Laminas\Mvc\Controller\AbstractActionController;
@@ -15,12 +16,15 @@ class AgentForceSansObligationController extends AbstractActionController
{
    use AgentForceSansObligationServiceAwareTrait;
    use AgentForceSansObligationFormAwareTrait;
    use CampagneServiceAwareTrait;

    public function indexAction(): ViewModel
    {
        $agentsForcesSansObligation = $this->getAgentForceSansObligationService()->getAgentsForcesSansObligation('id', 'ASC', true);
        $campagnes = $this->getCampagneService()->getCampagnes();
        return new ViewModel([
            'agentsForcesSansObligation' => $agentsForcesSansObligation,
            'campagnes' => $campagnes,
        ]);
    }

+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace EntretienProfessionnel\Controller;

use EntretienProfessionnel\Form\AgentForceSansObligation\AgentForceSansObligationForm;
use EntretienProfessionnel\Service\AgentForceSansObligation\AgentForceSansObligationService;
use EntretienProfessionnel\Service\Campagne\CampagneService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
@@ -18,13 +19,16 @@ class AgentForceSansObligationControllerFactory
    {
        /**
         * @var AgentForceSansObligationService $agentForceSansObligationService
         * @var CampagneService $campagneService
         * @var AgentForceSansObligationForm $agentForceSansObligationForm
         */
        $agentForceSansObligationService = $container->get(AgentForceSansObligationService::class);
        $campagneService = $container->get(CampagneService::class);
        $agentForceSansObligationForm = $container->get('FormElementManager')->get(AgentForceSansObligationForm::class);

        $controller = new AgentForceSansObligationController();
        $controller->setAgentForceSansObligationService($agentForceSansObligationService);
        $controller->setCampagneService($campagneService);
        $controller->setAgentForceSansObligationForm($agentForceSansObligationForm);
        return $controller;
    }
+5 −0
Original line number Diff line number Diff line
<?php

use EntretienProfessionnel\Entity\Db\AgentForceSansObligation;
use EntretienProfessionnel\Entity\Db\Campagne;
use EntretienProfessionnel\Provider\Privilege\AgentforcesansobligationPrivileges;

/**
 * @see \EntretienProfessionnel\Controller\AgentForceSansObligationController::indexAction()
 * @var AgentForceSansObligation[] $agentsForcesSansObligation
 *
 * @var Campagne[] $campagnes
 */

$this->headTitle("Agent·es forcé·es sans obligation d'entretien professionnel");
@@ -22,6 +25,8 @@ $canSupprimer = $this->isAllowed(AgentforcesansobligationPrivileges::getResource
    Agent·es forcé·es sans obligation d'entretien professionnel
</h1>

<?php echo $this->partial('partial/filtre', ['campagnes' => $campagnes, 'campagne' => null]); ?>

<?php if ($canAjouter) : ?>
    <?php /** @see \EntretienProfessionnel\Controller\AgentForceSansObligationController::ajouterAction() */ ?>
    <a href="<?php echo $this->url('entretien-professionnel/agent-force-sans-obligation/ajouter', [], [], true); ?>"
+89 −0
Original line number Diff line number Diff line
<?php

use EntretienProfessionnel\Entity\Db\Campagne;

/**
 * @var Campagne[] $campagnes
 * @var ?Campagne $campagne
 */

?>

<div class="card card-default">
    <div class="card-header">
        <span class="icon icon-filtrer"></span>
        Filtre des forçages
    </div>
    <div class="card-body">

        <form id="filtre" action="<?php echo $this->url(); ?>" method="get">
            <div class="row">
            <div class="col-md-4">
                <label for="campagne">Campagne d'entretien professionnel: </label>
                <select id="campagne" name="campagne" class="selectpicker" data-live-search="true">
                    <option value=""> Toutes les campagnes </option>
                    <?php foreach ($campagnes as $campagne_) : ?>
                        <?php $texte = "data-content='".$campagne_->getAnnee()."  "; ?>
                        <?php if ($campagne_->estEnCours()) : ?>
                            <?php $texte .= '<span class="text-success"><span class="icon icon-checked"></span> En cours </span>'; ?>
                        <?php else : ?>
                            <?php $texte .= '<span class="danger"><span class="icon icon-unchecked"></span> Terminée </span>'; ?>
                        <?php endif; ?>
                        <?php $texte .= "'"; ?>
                        <option value="<?php echo $campagne_->getId(); ?>" <?php if ($campagne_ === $campagne) echo " selected "; ?> <?php echo $texte; ?>>
                            <?php echo $campagne_->getAnnee(); ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
            <div class="col-md-4">
                <label for="agent">Agent : </label>
                <select id="agent" name="agent" class="agent">
                    <option value=""> Tous les agents </option>
                </select>
            </div>
            <!-- BOUTON -->
            <div class="col-md-4">
                <div class="pull-right">
                    <button class="btn btn-primary action" id="clear">
                        <span class="icon icon-gommer"></span>
                        R.A.Z.
                    </button>

                    <button class="btn btn-primary action" id="filter">
                        <span class="icon icon-filtrer"></span>
                        Filtrer
                    </button>
                </div>
            </div>
            </div>
        </form>
    </div>
</div>

<script>
    $("form#filtre").submit(function(e){
        e.preventDefault();
    });

    $('button#clear').click(function() {
        window.location.href = '?';
    });

    $('button#filter').click(function() {
        let groupeId = $('select#campagne option:selected').val();
        // let activiteId = $('select#activite option:selected').val();
        // console.log( "activite=" + activiteId);

        let query = "";
        query += "&campagne=" + campagne;
        // query += "&activite=" + activiteId;
        window.location.href = '?'+ query;
    });

    //$('select#groupe option[value=<?php //echo $groupe; ?>//]').prop('selected', true);
    //$('select#activite option[value=<?php //echo $actifId; ?>//]').prop('selected', true);
    //console.log('<?php //echo $groupe; ?>//');
    //console.log('<?php //echo $actifId; ?>//');

</script>