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 { useRouter } from 'next/navigation';
import TrajetForm from './TrajetForm';
import AdherentForm from './AdherentForm';
import TrajetDetailModal from './TrajetDetailModal';
import { getParticipationRef } from '@/lib/participation-ref';
interface Stats {
participationsMois: {
@@ -32,6 +33,7 @@ interface Trajet {
adresseArrivee: string;
commentaire?: string | null;
statut: string;
participations?: { id: string }[];
adherent: {
id: string;
nom: string;
@@ -361,6 +363,11 @@ export default function DashboardContent({ userName }: DashboardContentProps) {
{trajet.adherent.prenom} {trajet.adherent.nom}
</h3>
<div className="flex flex-wrap items-center gap-2 sm:gap-3 mt-1">
{trajet.participations?.[0] && (
<span className="px-1.5 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="text-[10px] sm:text-xs text-gray-500 flex items-center gap-1">
<svg className="w-2.5 h-2.5 sm:w-3 sm:h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />