Begin file upload, add theme change

This commit is contained in:
2024-09-26 01:00:46 -04:00
parent ccc3423953
commit 66137ff7b4
17 changed files with 487 additions and 90 deletions

View File

@@ -8,6 +8,7 @@ import { Participant } from '../../types/Participant';
import { CreateParticipantDialog } from './CreateParticipantDialog';
import { Trash2 } from 'lucide-react';
import { useToast } from '~/hooks/use-toast';
import { UploadConsentForm } from './UploadConsentForm';
export function Participants() {
const [participants, setParticipants] = useState<Participant[]>([]);
@@ -88,18 +89,21 @@ export function Participants() {
</CardHeader>
<CardContent>
{participants.length > 0 ? (
<ul className="space-y-2">
<ul className="space-y-4">
{participants.map(participant => (
<li key={participant.id} className="bg-gray-100 p-2 rounded flex justify-between items-center">
<span>{participant.name}</span>
<Button
variant="ghost"
size="sm"
onClick={() => deleteParticipant(participant.id)}
className="text-red-500 hover:text-red-700"
>
<Trash2 className="h-4 w-4" />
</Button>
<li key={participant.id} className="bg-gray-100 p-4 rounded">
<div className="flex justify-between items-center mb-2">
<span className="font-semibold">{participant.name}</span>
<Button
variant="ghost"
size="sm"
onClick={() => deleteParticipant(participant.id)}
className="text-red-500 hover:text-red-700"
>
<Trash2 className="h-4 w-4" />
</Button>
</div>
<UploadConsentForm studyId={selectedStudy.id} participantId={participant.id} />
</li>
))}
</ul>