Skip to content
Snippets Groups Projects
Commit 7ed4fafc authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout de colonne dans l'export des inscriptions

parent 9cac420b
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ echo $this->doctype();
border: 1px solid grey;
position: fixed;
bottom : 120px;
right : 100px;
right : 50px;
background: white;
z-index:1050 !important;
}
......
......@@ -45,7 +45,7 @@ class ExportController extends AbstractActionController {
} else { $inscriptions = null; }
if ($csv) {
$headers = ["stagiaire", "affectation", "action de formation", "domaines", "période", "Au plan de formation"];
$headers = ["stagiaire_id", "stagiaire", "affectation", "action de formation", "domaines", "début", "fin", "Au plan de formation"];
$records = [];
foreach ($inscriptions as $inscription) {
$stagiaire = $inscription->getIndividu();
......@@ -59,11 +59,13 @@ class ExportController extends AbstractActionController {
$action = $session->getFormation();
$domaines = array_map(function (Domaine $domaine) {return $domaine->getLibelle();}, $action->getDomaines());
$records[] = [
"stagiaire_id" => $stagiaire->getId(),
"stagiaire" => $stagiaire->getDenomination(false),
"affectation" => $affecation,
"action de formation" => $action->getLibelle(),
"domaines" => implode("\n",$domaines),
"période" => $session->getPeriode(),
"debut" => $session->getDebut(true)?$session->getDebut(true)->format("d/m/Y"):"",
"fin" => $session->getFin(true)?$session->getFin(true)->format("d/m/Y"):"",
"Au plan de formation" => (!empty($session->getDemandesExternes())) ? "Hors plan de formation":"Dans le plan de formation",
];
}
......
......@@ -275,6 +275,9 @@ class InscriptionService
return $result;
}
/**
* @return Inscription[]
*/
public function getInscriptionsWithFiltre(array $params)
{
$qb = $this->createQueryBuilder()->orderBy('inscription.histoCreation', 'asc');
......
......@@ -130,12 +130,14 @@ $this->headTitle("Extraction d'inscription");
<table class="table table-condensed" id="inscriptions">
<thead>
<tr>
<th> Id </th>
<th> Stagiaire </th>
<th> Affectation </th>
<!-- <th> État de l'inscription</th>-->
<th> Action de formation </th>
<th> Domaine </th>
<th> Période </th>
<th> Début </th>
<th> Fin </th>
<!-- <th> État de la sesion</th>-->
<!-- <th> Liste </th>-->
<th> Au plan de formation</th>
......@@ -155,6 +157,7 @@ $this->headTitle("Extraction d'inscription");
$action = $session->getFormation();
?>
<tr>
<td> <?php echo $stagiaire->getId(); ?> </td>
<td data-order="<?php echo $stagiaire->getDenomination(false); ?>">
<?php echo $stagiaire->getDenomination(); ?>
</td>
......@@ -171,7 +174,8 @@ $this->headTitle("Extraction d'inscription");
<?php endforeach; ?>
<?php endif; ?>
</td>
<td> <?php echo $session->getPeriode(); ?> </td>
<td> <?php echo ($session->getDebut(true))?->format('d/m/Y'); ?> </td>
<td> <?php echo ($session->getFin(true))?->format('d/m/Y'); ?> </td>
<!-- <td> --><?php //echo $this->etatinstance($session->getEtatActif()); ?><!--</td>-->
<!-- <td> --><?php //echo $inscription->getListe(); ?><!-- </td>-->
<td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment