/** * ========================================================================= * PLATEFORME ECO-PANNEAU.FR - VERSION 1.0.0 * Paramètres du compte client - Sous-onglet : Données et RGPD * ========================================================================= */ const FallbackNull = () => null; const FallbackButton = ({ children, onClick, className, disabled, title, type = "button" }) => ( ); window.pano_ClientSettingsPrivacy = ({ myClientData, data, showToast, refreshData, setArchiveConfig, openLocalDialog, closeCurrentLayer, activeDialog }) => { const { useState } = React; const [isSaving, setIsSaving] = useState(false); const [confirmConfig, setConfirmConfig] = useState(null); const [arcToReveal, setArcToReveal] = useState(null); const [revealedPwdData, setRevealedPwdData] = useState(null); const { DownloadIcon, Trash2Icon, EyeIcon, FileTextIcon, ArchiveIcon } = window.pano_getIcons?.() || {}; const Button = window.pano_Button || FallbackButton; const ConfirmModal = window.pano_ConfirmModal || FallbackNull; const PasswordPromptModal = window.pano_PasswordPromptModal || FallbackNull; const Modal = window.pano_Modal || FallbackNull; const rgpdArchives = (data.archives || []).filter(a => a.type === 'RGPD'); const handleDeleteArchive = (arc) => { setConfirmConfig({ title: "Supprimer l'archive RGPD", message: "Êtes-vous sûr de vouloir supprimer définitivement cette archive ? Cette action est irréversible.", confirmText: "Oui, supprimer", isDestructive: true, onConfirm: async () => { closeCurrentLayer(); const d = await window.pano_apiFetch('archives/delete', { body: { filename: arc.filename }, setLoading: setIsSaving, successMessage: "Archive supprimée avec succès." }); if (d && refreshData) refreshData(); } }); openLocalDialog('confirm_privacy'); }; return (

{DownloadIcon && } Portabilité des données (RGPD)

Conformément au RGPD, vous pouvez télécharger une archive `.zip` contenant l'intégralité de vos données personnelles, vos factures, ainsi que les informations de vos panneaux. Les documents stockés dans le coffre-fort légal y sont inclus.

{rgpdArchives.length > 0 && (

Vos archives générées

{rgpdArchives.map((arc, i) => (
{ArchiveIcon && }

Archive de vos données (RGPD)

Disponible jusqu'au {new Date(arc.expires_at * 1000).toLocaleString('fr-FR', {dateStyle: 'short', timeStyle: 'short'})}

))}
)}

{Trash2Icon && } Suppression du compte

La suppression de votre compte est irréversible. Toutes vos données personnelles, ainsi que vos panneaux en brouillon seront détruits de nos serveurs. Cependant, pour des raisons légales, les données liées à la facturation et aux panneaux publics passés ou actifs sont conservées le temps de leurs délais légaux respectifs.

{/* MODALES SPÉCIFIQUES À CE SOUS-ONGLET */} {activeDialog === 'confirm_privacy' && confirmConfig && ConfirmModal && ( { setConfirmConfig(null); closeCurrentLayer(); }} zIndex="z-[350]" /> )} {activeDialog === 'delete_account' && PasswordPromptModal && ( { const d = await window.pano_apiFetch('clients/request_delete', { body: { password }, setLoading: setIsSaving, successMessage: "Demande confirmée. Un e-mail de validation finale vous a été envoyé." }); if (d) closeCurrentLayer(); }} onCancel={closeCurrentLayer} isSaving={isSaving} zIndex="z-[350]" /> )} {activeDialog === 'pwd_arc' && arcToReveal && PasswordPromptModal && ( { const d = await window.pano_apiFetch('archives/reveal_password', { body: { filename: arcToReveal, password: pwd }, setLoading: setIsSaving }); if (d) { closeCurrentLayer(); setTimeout(() => { setRevealedPwdData(d.data.password); openLocalDialog('show_pwd'); }, 150); } }} onCancel={closeCurrentLayer} isSaving={isSaving} zIndex="z-[350]" /> )} {activeDialog === 'show_pwd' && revealedPwdData && Modal && (

Voici le mot de passe unique permettant d'extraire cette archive :

{revealedPwdData}
)}
); }; /* EOF ========== [_react/_clients_settings_privacy.jsx] */