fix longueur trop haute de la modale d'envoi de mail

This commit is contained in:
Yannick Le Duc
2025-08-25 23:03:33 +02:00
parent 39656b1cc9
commit 1730d77b2c
2 changed files with 20 additions and 20 deletions

View File

@@ -52,12 +52,12 @@ type SortOption =
| 'alphabetical';
const sortOptions = [
{ value: 'popularity', label: 'Popularité', icon: TrendingUp, description: 'Moyenne décroissante puis nombre de votants' },
{ value: 'total_impact', label: 'Impact total', icon: Target, description: 'Somme totale investie décroissante' },
{ value: 'consensus', label: 'Consensus', icon: Users2, description: 'Plus petit écart-type = plus de consensus' },
{ value: 'engagement', label: 'Engagement', icon: Users, description: 'Taux de participation décroissant' },
{ value: 'total_impact', label: 'Impact total', icon: Target, description: 'Somme totale investie' },
{ value: 'popularity', label: 'Popularité', icon: TrendingUp, description: 'Moyenne puis nombre de votants' },
{ value: 'consensus', label: 'Consensus', icon: Users2, description: 'Plus petit écart-type' },
{ value: 'engagement', label: 'Engagement', icon: Users, description: 'Taux de participation' },
{ value: 'distribution', label: 'Répartition', icon: BarChart3, description: 'Nombre de votes différents' },
{ value: 'alphabetical', label: 'Alphabétique', icon: Hash, description: 'Ordre alphabétique par titre' }
{ value: 'alphabetical', label: 'Alphabétique', icon: Hash, description: 'Ordre alphabétique' }
];
function CampaignStatsPageContent() {
@@ -70,7 +70,7 @@ function CampaignStatsPageContent() {
const [votes, setVotes] = useState<Vote[]>([]);
const [loading, setLoading] = useState(true);
const [propositionStats, setPropositionStats] = useState<PropositionStats[]>([]);
const [sortBy, setSortBy] = useState<SortOption>('popularity');
const [sortBy, setSortBy] = useState<SortOption>('total_impact');
useEffect(() => {
if (campaignId) {
@@ -322,19 +322,19 @@ function CampaignStatsPageContent() {
<div className="flex items-center gap-2">
<span className="text-sm font-medium text-slate-600 dark:text-slate-300">Trier par :</span>
<Select value={sortBy} onValueChange={(value: SortOption) => setSortBy(value)}>
<SelectTrigger className="w-48">
<SelectTrigger className="w-56">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectContent className="w-80">
{sortOptions.map((option) => {
const IconComponent = option.icon;
return (
<SelectItem key={option.value} value={option.value}>
<div className="flex items-center gap-2">
<IconComponent className="w-4 h-4" />
<div>
<div className="font-medium">{option.label}</div>
<div className="text-xs text-slate-500">{option.description}</div>
<SelectItem key={option.value} value={option.value} className="py-3">
<div className="flex items-center gap-3 w-full">
<IconComponent className="w-4 h-4 flex-shrink-0" />
<div className="min-w-0 flex-1">
<div className="font-medium truncate">{option.label}</div>
<div className="text-xs text-slate-500 truncate">{option.description}</div>
</div>
</div>
</SelectItem>