Checkpoint: Ajout de la colonne 'Export SP' dans le tableau historique de Ventilation FreePro : icône horloge grise = non exporté, icône verte = exporté (date au survol), icône rouge = erreur (message au survol). Le statut est sauvegardé en base (sharepointUploadStatus, sharepointUploadPath, sharepointUploadError, sharepointExportedAt) lors de chaque export via 'Envoyer vers SharePoint'.
This commit is contained in:
@@ -66,6 +66,10 @@ interface ImportRecord {
|
||||
nbLignes: number;
|
||||
totalTtc: string | null;
|
||||
createdAt: Date;
|
||||
sharepointUploadStatus: 'success' | 'error' | null;
|
||||
sharepointUploadPath: string | null;
|
||||
sharepointUploadError: string | null;
|
||||
sharepointExportedAt: Date | null;
|
||||
}
|
||||
|
||||
// ── Helpers ────────────────────────────────────────────────────────────────
|
||||
@@ -847,6 +851,7 @@ function VentilationFreeProContent() {
|
||||
<TableHead className="text-right">Lignes</TableHead>
|
||||
<TableHead className="text-right">Total TTC</TableHead>
|
||||
<TableHead>Importé le</TableHead>
|
||||
<TableHead className="text-center">Export SP</TableHead>
|
||||
<TableHead className="text-right">Actions</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
@@ -876,6 +881,29 @@ function VentilationFreeProContent() {
|
||||
<TableCell className="text-xs text-muted-foreground">
|
||||
{new Date(imp.createdAt).toLocaleDateString("fr-FR")}
|
||||
</TableCell>
|
||||
<TableCell className="text-center" onClick={(e) => e.stopPropagation()}>
|
||||
{imp.sharepointUploadStatus === 'success' ? (
|
||||
<span
|
||||
title={`Exporté le ${imp.sharepointExportedAt ? new Date(imp.sharepointExportedAt).toLocaleString('fr-FR') : ''}${imp.sharepointUploadPath ? '\n' + imp.sharepointUploadPath : ''}`}
|
||||
className="inline-flex items-center gap-1 text-green-600 cursor-default"
|
||||
>
|
||||
<CheckCircle2 className="h-4 w-4" />
|
||||
<span className="text-xs hidden sm:inline">Exporté</span>
|
||||
</span>
|
||||
) : imp.sharepointUploadStatus === 'error' ? (
|
||||
<span
|
||||
title={`Erreur : ${imp.sharepointUploadError || 'Erreur inconnue'}`}
|
||||
className="inline-flex items-center gap-1 text-red-500 cursor-default"
|
||||
>
|
||||
<XCircle className="h-4 w-4" />
|
||||
<span className="text-xs hidden sm:inline">Erreur</span>
|
||||
</span>
|
||||
) : (
|
||||
<span className="inline-flex items-center gap-1 text-muted-foreground/40 cursor-default" title="Non exporté vers SharePoint">
|
||||
<Clock className="h-4 w-4" />
|
||||
</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="text-right">
|
||||
<div className="flex items-center justify-end gap-1" onClick={(e) => e.stopPropagation()}>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user