Files
logisticsAPI/resources/views/components/logistics/json-block.blade.php
Marvin bb1bbc2904 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.
2026-02-23 10:15:17 +01:00

13 lines
531 B
PHP

@props(['data', 'searched' => false])
@if (! empty($data))
<div class="overflow-x-auto">
<pre class="rounded-lg border border-gray-200 bg-gray-50 p-4 text-xs font-mono leading-relaxed text-gray-700 dark:border-white/10 dark:bg-gray-800 dark:text-gray-300">{{ json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
</div>
@elseif ($searched)
<x-logistics.empty-state
icon="heroicon-o-magnifying-glass"
title="Aucune donnée n'a été trouvée pour votre demande."
/>
@endif