import ods/xls en + de csv
fix modal behavior on close, fine tune import file modal
This commit is contained in:
@@ -7,7 +7,7 @@ import { campaignService, participantService, voteService } from '@/lib/services
|
||||
import AddParticipantModal from '@/components/AddParticipantModal';
|
||||
import EditParticipantModal from '@/components/EditParticipantModal';
|
||||
import DeleteParticipantModal from '@/components/DeleteParticipantModal';
|
||||
import ImportCSVModal from '@/components/ImportCSVModal';
|
||||
import ImportFileModal from '@/components/ImportFileModal';
|
||||
import SendParticipantEmailModal from '@/components/SendParticipantEmailModal';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
@@ -166,7 +166,7 @@ function CampaignParticipantsPageContent() {
|
||||
<div className="flex gap-2">
|
||||
<Button variant="outline" onClick={() => setShowImportModal(true)}>
|
||||
<Upload className="w-4 h-4 mr-2" />
|
||||
Importer CSV
|
||||
Importer
|
||||
</Button>
|
||||
<Button onClick={() => setShowAddModal(true)} size="lg">
|
||||
✨ Nouveau participant
|
||||
@@ -409,7 +409,7 @@ function CampaignParticipantsPageContent() {
|
||||
/>
|
||||
)}
|
||||
|
||||
<ImportCSVModal
|
||||
<ImportFileModal
|
||||
isOpen={showImportModal}
|
||||
onClose={() => setShowImportModal(false)}
|
||||
onImport={handleImportParticipants}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { campaignService, propositionService } from '@/lib/services';
|
||||
import AddPropositionModal from '@/components/AddPropositionModal';
|
||||
import EditPropositionModal from '@/components/EditPropositionModal';
|
||||
import DeletePropositionModal from '@/components/DeletePropositionModal';
|
||||
import ImportCSVModal from '@/components/ImportCSVModal';
|
||||
import ImportFileModal from '@/components/ImportFileModal';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -154,7 +154,7 @@ function CampaignPropositionsPageContent() {
|
||||
<div className="flex gap-2">
|
||||
<Button variant="outline" onClick={() => setShowImportModal(true)}>
|
||||
<Upload className="w-4 h-4 mr-2" />
|
||||
Importer CSV
|
||||
Importer
|
||||
</Button>
|
||||
<Button onClick={() => setShowAddModal(true)} size="lg">
|
||||
✨ Nouvelle proposition
|
||||
@@ -323,7 +323,7 @@ function CampaignPropositionsPageContent() {
|
||||
/>
|
||||
)}
|
||||
|
||||
<ImportCSVModal
|
||||
<ImportFileModal
|
||||
isOpen={showImportModal}
|
||||
onClose={() => setShowImportModal(false)}
|
||||
onImport={handleImportPropositions}
|
||||
|
||||
@@ -362,7 +362,7 @@ function CampaignStatsPageContent() {
|
||||
<div key={stat.proposition.id} className="border rounded-lg p-6 hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors">
|
||||
<div className="flex items-start justify-between mb-4">
|
||||
<div className="flex-1">
|
||||
<div className="flex items-center gap-3 mb-2">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<Badge variant="outline" className="text-xs">
|
||||
#{index + 1}
|
||||
</Badge>
|
||||
@@ -370,9 +370,6 @@ function CampaignStatsPageContent() {
|
||||
{stat.proposition.title}
|
||||
</h3>
|
||||
</div>
|
||||
<p className="text-slate-600 dark:text-slate-300 text-sm">
|
||||
{stat.proposition.description}
|
||||
</p>
|
||||
</div>
|
||||
{index === 0 && stat.averageAmount > 0 && (
|
||||
<Badge className="bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200">
|
||||
|
||||
@@ -244,7 +244,7 @@ export default function PublicVotePage() {
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-4">
|
||||
<div>
|
||||
<h1 className="text-lg font-semibold text-gray-900">Vote - {campaign?.title}</h1>
|
||||
<h1 className="text-lg font-semibold text-gray-900">{campaign?.title}</h1>
|
||||
<p className="text-lg font-bold text-indigo-600">
|
||||
{participant?.first_name} {participant?.last_name}
|
||||
</p>
|
||||
@@ -287,7 +287,7 @@ export default function PublicVotePage() {
|
||||
<div className="grid grid-cols-1 md:grid-cols-1 gap-6">
|
||||
<div>
|
||||
<h3 className="text-sm font-medium text-gray-500">Description</h3>
|
||||
<p className="mt-1 text-sm text-gray-900">{campaign?.description}</p>
|
||||
<p className="mt-1 text-sm text-gray-900 whitespace-pre-wrap">{campaign?.description}</p>
|
||||
{isRandomOrder && (
|
||||
<div className="mt-3 p-2 bg-blue-50 border border-blue-200 rounded-md">
|
||||
<p className="text-xs text-blue-700 flex items-center gap-1">
|
||||
@@ -319,7 +319,7 @@ export default function PublicVotePage() {
|
||||
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
||||
{proposition.title}
|
||||
</h3>
|
||||
<p className="text-sm text-gray-600 mb-4">
|
||||
<p className="text-sm text-gray-600 mb-4 whitespace-pre-wrap">
|
||||
{proposition.description}
|
||||
</p>
|
||||
</div>
|
||||
@@ -359,7 +359,7 @@ export default function PublicVotePage() {
|
||||
const position = ((index + 1) / spendingTiers.length) * 100;
|
||||
return (
|
||||
<div
|
||||
key={tier}
|
||||
key={`tier-${index}-${tier}`}
|
||||
className="absolute text-center"
|
||||
style={{
|
||||
left: `${position}%`,
|
||||
|
||||
Reference in New Issue
Block a user