// ECO-PANNEAU.FR - _react/riverains/_riverains_modals.jsx // 1. - MODALE : LECTEUR PDF (ARRÊTÉS) window.pano_RiverainPdfModal = ({ targetId, panneau, onClose, onOpenArretes, isPreview = false }) => { const { UniversalViewer } = window.pano_getComponents(); let numPages = 1; if (panneau.pdfId === targetId) { numPages = panneau.pdfNumPages || 1; } else if (panneau.modificatifs) { const mod = panneau.modificatifs.find(m => m.id === targetId); if (mod) numPages = mod.numPages || 1; } const handleClose = () => { onClose(); if (panneau.modificatifs?.length > 0) setTimeout(onOpenArretes, 50); }; if (!UniversalViewer) return null; return ( ); }; // 2. - MODALE : APERÇU D'IMAGE DU PROJET window.pano_RiverainImageModal = ({ displayImageUrl, onClose, isPreview = false }) => { const { UniversalViewer } = window.pano_getComponents(); if (!UniversalViewer) return null; return ( ); }; // 3. - MODALE : LISTE DES ARRÊTÉS (INITIAL ET MODIFICATIFS) window.pano_RiverainArretesModal = ({ panneau, onClose, onOpenPdf, isPreview = false }) => { const { FileDigitIcon, ArrowRightIcon, AlertTriangleIcon } = window.pano_getIcons(); const { Modal, Button } = window.pano_getComponents(); return ( ( )} >
{/* 3.1 - Arrêté Initial */} {panneau.pdfId ? (
{ onClose(); setTimeout(() => onOpenPdf(panneau.pdfId), 50); }} className="w-full p-3 bg-slate-50 hover:bg-emerald-50 border border-slate-200 rounded-2xl flex items-center justify-between group transition text-left cursor-pointer">

Arrêté initial

Document principal

) : (

Arrêté initial

Document manquant

)} {/* 3.2 - Arrêtés Modificatifs */} {panneau.modificatifs?.map((mod, idx) => { const hasPdf = mod.id && !mod.id.startsWith('mod_'); return (
{ if(hasPdf) { onClose(); setTimeout(() => onOpenPdf(mod.id), 50); } }} className={`w-full p-3 border border-slate-200 rounded-2xl flex items-center justify-between transition text-left ${hasPdf ? 'bg-slate-50 hover:bg-blue-50 cursor-pointer group' : 'bg-slate-50 opacity-60 cursor-not-allowed'}`} >
{hasPdf ? : }

{mod.label || `Modificatif n°${idx + 1}`}

{mod.date ? `Ajouté le ${new Date(mod.date).toLocaleDateString('fr-FR')}` : 'Date non définie'}

{hasPdf ? ( ) : ( PDF
manquant
)}
); })}
); }; // 4. - MODALE : AVERTISSEMENT DE MODE DÉMO (ZÉRO-TRUST) window.pano_RiverainDemoWarningModal = ({ targetId, onClose, isPreview = false }) => { const { InfoIcon } = window.pano_getIcons(); const { Button, Modal } = window.pano_getComponents(); return ( ( )} >

{targetId === 'chat' ? "La messagerie (messages et pièces jointes) est désactivée en mode aperçu ou démo." : "Les liens sortants sont désactivés en mode aperçu ou démo."}

); }; /* EOF ========== [_react/riverains/_riverains_modals.jsx] */