fix longueur trop haute de la modale d'envoi de mail
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -118,8 +118,8 @@ L'équipe Mes Budgets Participatifs`);
|
||||
|
||||
return (
|
||||
<Dialog open={isOpen} onOpenChange={handleClose}>
|
||||
<DialogContent className="sm:max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogContent className="sm:max-w-2xl max-h-[90vh] flex flex-col">
|
||||
<DialogHeader className="flex-shrink-0">
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Mail className="w-5 h-5" />
|
||||
Envoyer un email à {participant.first_name} {participant.last_name}
|
||||
@@ -129,7 +129,7 @@ L'équipe Mes Budgets Participatifs`);
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-4 flex-1 overflow-y-auto min-h-0">
|
||||
{/* Informations du participant */}
|
||||
<div className="p-3 bg-slate-50 dark:bg-slate-800 rounded-lg">
|
||||
<h4 className="text-sm font-medium text-slate-900 dark:text-slate-100 mb-2">
|
||||
@@ -163,9 +163,9 @@ L'équipe Mes Budgets Participatifs`);
|
||||
placeholder="Votre message..."
|
||||
value={message}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
rows={12}
|
||||
rows={8}
|
||||
disabled={sending}
|
||||
className="font-mono text-sm"
|
||||
className="font-mono text-sm resize-none"
|
||||
/>
|
||||
<div className="text-xs text-slate-500 dark:text-slate-400">
|
||||
Le lien de vote sera automatiquement inclus dans votre message.
|
||||
@@ -197,7 +197,7 @@ L'équipe Mes Budgets Participatifs`);
|
||||
)}
|
||||
</div>
|
||||
|
||||
<DialogFooter className="flex flex-col sm:flex-row gap-2">
|
||||
<DialogFooter className="flex flex-col sm:flex-row gap-2 flex-shrink-0 pt-4 border-t border-slate-200 dark:border-slate-700">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={handleClose}
|
||||
|
||||
Reference in New Issue
Block a user