liens de thème dans la page de graphe, thèmes bouche d'égout, micro bibliothèque, parc à jeux

This commit is contained in:
Tykayn 2025-07-14 18:55:53 +02:00 committed by tykayn
parent 0a5814011f
commit 979be016f2
6 changed files with 117 additions and 86 deletions

View file

@ -243,13 +243,12 @@ final class AdminController extends AbstractController
$this->entityManager->flush();
// Générer les suivis (followups) après la mise à jour des Places
$this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager);
$message = 'Labourage terminé avec succès. ' . $processedCount . ' nouveaux lieux traités.';
if ($updateExisting) {
$message .= ' ' . $updatedCount . ' lieux existants mis à jour pour la zone ' . $stats->getName() . ' (' . $stats->getZone() . ').';
$themes = \App\Service\FollowUpService::getFollowUpThemes();
foreach (array_keys($themes) as $theme) {
$this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager, true, $theme);
}
$this->addFlash('success', $message);
$this->entityManager->flush();
return $this->redirectToRoute('app_admin_stats', ['insee_code' => $insee_code]);
}
$this->entityManager->flush();
@ -649,8 +648,9 @@ final class AdminController extends AbstractController
'count_data' => json_encode($countData),
'completion_data' => json_encode($completionData),
'icons' => \App\Service\FollowUpService::getFollowUpIcons(),
'followup_labels' => $themes,
'geojson' => json_encode($geojson),
'overpass_query' => $overpass_query | "",
'overpass_query' => $overpass_query,
'josm_url' => $josm_url,
'center' => $center,
'maptiler_token' => $_ENV['MAPTILER_TOKEN'] ?? null,
@ -765,7 +765,10 @@ final class AdminController extends AbstractController
$this->addFlash('warning', "Le serveur est trop sollicité actuellement (RAM insuffisante). La mise à jour des lieux sera effectuée plus tard automatiquement.");
}
// Toujours générer les CityFollowUp (mais ne jamais les supprimer)
$this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager, true /* disable cleanup: ne supprime rien */);
$themes = \App\Service\FollowUpService::getFollowUpThemes();
foreach (array_keys($themes) as $theme) {
$this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager, true, $theme);
}
$this->entityManager->flush();
return $this->redirectToRoute('app_admin_stats', ['insee_code' => $insee_code]);
}