Added few functions

This commit is contained in:
2026-02-16 14:43:02 +01:00
parent 0c908a21ac
commit 1ec4c935c9
31 changed files with 352 additions and 35 deletions

View File

@@ -5,6 +5,7 @@ import { DndContext, DragEndEvent, DragOverlay, DragStartEvent, useDraggable, us
import { CSS } from '@dnd-kit/utilities';
import TrajetDetailModal from './TrajetDetailModal';
import { useNotification } from './NotificationProvider';
import { getParticipationRef } from '@/lib/participation-ref';
interface Trajet {
id: string;
@@ -13,6 +14,7 @@ interface Trajet {
adresseArrivee: string;
commentaire?: string | null;
statut: string;
participations?: { id: string }[];
adherent: {
id: string;
nom: string;
@@ -518,6 +520,11 @@ export default function CalendrierTrajets({ refreshTrigger }: CalendrierTrajetsP
<span className="text-xs sm:text-sm font-semibold text-gray-900">
{trajet.adherent.prenom} {trajet.adherent.nom}
</span>
{trajet.participations?.[0] && (
<span className="px-1.5 sm:px-2 py-0.5 text-[10px] sm:text-xs font-mono font-medium rounded bg-lblue/10 text-lblue" title="Référence de prescription">
{getParticipationRef(trajet.participations[0].id)}
</span>
)}
<span className="px-1.5 sm:px-2 py-0.5 text-[10px] sm:text-xs font-medium rounded bg-lblue/10 text-lblue">
{formatTime(trajet.date)}
</span>