Skip to content

Resolve VSN-1943 "Mes Documents"

yassine sabir a demandé de fusionner feature/VSN-1943 vers develop

feat(documents): integrate backend APIs, fix navigation and empty states, remove status, and persist favorites Summary of changes and features:

Backend integration

  • Added full document/folder API service with robust French error handling.
  • Replaced mock data with live endpoints for documents, folders, upload, move, delete, storage quota.
  • Implemented favorite endpoints for documents/folders; favorites now persist after refresh.

Store (Zustand)

  • Mapped backend DTOs (including createdAt/updatedAt and favorite) to frontend types.
  • Rewrote fetchDocuments/fetchFolders to load root and folder-scoped data, merge subfolders, and maintain counts.
  • Implemented moveDocument with proper UI refresh and folder counts update.
  • Implemented upload with size validation and surfaced API errors.
  • Reworked toggleFavorite/toggleFolderFavorite to call backend and update selectedDocument instantly.
  • Cleaned filters: removed “status”, kept favorites/type/date/size/tags/search. Added storage quota fetch with fallback.

UI/Navigation and UX

  • Documents screen now always shows root-only folders/files and has a clear empty state (global vs per-section).
  • Folder view screen loads its content directly, supports subfolders, move document, refreshes correctly, and back goes straight to root.
  • Document preview shows immediate favorite state sync for both header and action button.
  • Favorites screen sidebar cleaned; type/icon/colors updated for “Certificat d'absence”.

Cleanup

  • Removed all document “status” UI/filters and related code.
  • Removed console logs; tightened ConditionalComponent usage across screens.
  • Improved French messages throughout (errors and empty states).

Rapports de requête de fusion