Refactor error handling and enhance API interactions across Filament pages
- Introduced `ApiErrorTranslator` to normalize and translate API error messages, providing clearer feedback in French. - Updated all Filament pages (Articles, Documents, Divers, Journaux, Tiers, TablesExplorer) to utilize the new error translation mechanism, improving user experience during API interactions. - Added validation for required fields before API calls, ensuring users receive immediate feedback when mandatory inputs are missing. - Implemented tracking properties to distinguish between "never searched" and "searched without results," enhancing the user interface. - Removed the obsolete `$results` property from the Articles page and added a new `$barcode` property to align with API requirements. - Updated documentation to reflect changes in API behavior and error handling, including new metadata returned by the `art_list` endpoint. - Added new tests to verify the functionality of the barcode handling and validation logic.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Project Brief
|
||||
|
||||
Dernière mise à jour : 2026-02-21
|
||||
Dernière mise à jour : 2026-02-23
|
||||
|
||||
## Vision
|
||||
|
||||
@@ -22,7 +22,9 @@ Application Laravel de test dont l'objectif est de comprendre le fonctionnement
|
||||
- Affichage des résultats sous forme de tableaux structurés et de blocs JSON formatés.
|
||||
- Système de design unifié avec composants Blade réutilisables (`x-logistics.*`).
|
||||
- Traçage des requêtes effectuées dans une table `api_request_logs`.
|
||||
- Gestion robuste des erreurs API (timeout, retry, messages utilisateur en français).
|
||||
- Gestion robuste des erreurs API (timeout, retry, messages utilisateur en français, traduction avec explications via `ApiErrorTranslator`).
|
||||
- Validation des champs obligatoires avant chaque appel API avec messages en français.
|
||||
- Distinction "jamais recherché" / "recherché sans résultat" via propriétés de tracking.
|
||||
- Avertissements visuels pour les endpoints non fonctionnels (Document_GetPDF, custom_geninv_updatestock).
|
||||
|
||||
## Contraintes
|
||||
|
||||
Reference in New Issue
Block a user