Améliorations diverses

This commit is contained in:
ocroguennec committed 2026-06-18 08:25:05 +02:00
1 parent eb961cbed4
commit 03b7b87538
7 files changed
+110 -64

No files matched your search

+11 -1
View File
@@ -72,10 +72,20 @@ export default function DrillCellPanel({
if (!cell) { setData(null); return; }
setLoading(true);
setData(null);
/* En mode consolidé, cell.platIds contient plusieurs IDs numériques ;
si l'utilisateur a choisi un filtre manuel dans le select, on l'utilise tel quel */
const isInitialFilter = cell.platId ? filterPlatId === String(cell.platId) : !filterPlatId;
const consolidatedIds = isInitialFilter && cell.platIds?.length > 1
? cell.platIds.join(',')
: null;
const params = {
annee: cell.annee,
mois: cell.mois,
...(filterPlatId ? { plateforme_id: filterPlatId } : {}),
...(consolidatedIds
? { plateforme_ids: consolidatedIds }
: filterPlatId ? { plateforme_id: filterPlatId } : {}),
...(activeView === 'all' ? { scope: 'all' } : {}),
};
api.get('/dashboard/detail-cellule', params)