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:
@@ -2436,9 +2436,16 @@ export const appRouter = router({
|
||||
);
|
||||
|
||||
if (!result.success) {
|
||||
// Sauvegarder le statut d'erreur en base
|
||||
const { updateFreeproSharepointStatus } = await import('./db');
|
||||
await updateFreeproSharepointStatus(input.id, 'error', null, result.error || 'Erreur inconnue');
|
||||
throw new TRPCError({ code: "INTERNAL_SERVER_ERROR", message: result.error || 'Erreur upload SharePoint' });
|
||||
}
|
||||
|
||||
// Sauvegarder le statut de succès en base
|
||||
const { updateFreeproSharepointStatus } = await import('./db');
|
||||
await updateFreeproSharepointStatus(input.id, 'success', result.webUrl || null, null);
|
||||
|
||||
return { success: true, webUrl: result.webUrl, fileName };
|
||||
}),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user