0}
- onChange={toggleAll}
- />
-
+
+ {TABS.map((t) => (
+
+ ))}
- {/* Rows */}
- {list.ideas.map((idea) => (
-
-
toggleSelect(idea.id)}
- />
-
-
{idea.content}
-
- {idea.author && (
- {idea.author}
- )}
- {idea.flagged && (
-
- {idea.flagCount}×
-
- )}
- {idea.rejectionReason && (
-
- ✗ {idea.rejectionReason}
-
- )}
- {idea.adminNote && (
-
- Note: {idea.adminNote}
-
- )}
-
-
+
+
-
-
- {idea.accepted ? "Acceptée" : "Rejetée"}
-
-
+ {/* Sélection multiple */}
+ {selected.size > 0 && (
+
+ {selected.size} sélectionnée(s)
+
+
+
+ )}
-
- {idea.createdAt ? (
-
- {new Date(idea.createdAt).toLocaleDateString("fr-FR", {
- day: "2-digit", month: "2-digit", year: "2-digit",
- hour: "2-digit", minute: "2-digit",
- })}
-
- ) : null}
-
-
-
- {idea.flagged && (
-
- )}
-
-
-
+ {/* Tableau */}
+
+ {loading ? (
+
+ Chargement...
- ))}
- >
- )}
-
+ ) : !list || list.ideas.length === 0 ? (
+
+ Aucune contribution dans cette catégorie.
+
+ ) : (
+ <>
+
+ 0}
+ onChange={toggleAll}
+ />
+ Contribution
+ Statut
+ Date
+ Actions
+
- {/* Pagination */}
- {list && list.pages > 1 && (
-
-
-
- {page} / {list.pages}
-
-
-
+ {list.ideas.map((idea) => (
+
+
toggleSelect(idea.id)}
+ />
+
+
{idea.content}
+
+ {idea.author && (
+ {idea.author}
+ )}
+ {idea.consultationId && (
+ consultation #{idea.consultationId}
+ )}
+ {idea.flagged && (
+
+ {idea.flagCount}×
+
+ )}
+ {idea.rejectionReason && (
+
+ ✗ {idea.rejectionReason}
+
+ )}
+ {idea.adminNote && (
+
+ Note: {idea.adminNote}
+
+ )}
+
+
+
+
+
+ {idea.accepted ? "Acceptée" : "Rejetée"}
+
+
+
+
+ {idea.createdAt && (
+
+ {new Date(idea.createdAt).toLocaleDateString("fr-FR", {
+ day: "2-digit", month: "2-digit", year: "2-digit",
+ hour: "2-digit", minute: "2-digit",
+ })}
+
+ )}
+
+
+
+ {idea.flagged && (
+
+ )}
+
+
+
+
+ ))}
+ >
+ )}
+
+
+ {/* Pagination */}
+ {list && list.pages > 1 && (
+