- Added a new Blade component `<x-logistics.param-table>` for displaying API parameter tables across all Filament pages, ensuring consistent styling and reducing HTML duplication. - Integrated parameter tables for each endpoint in the Articles, Documents, Divers, Journaux, Tiers, and other pages, providing users with clear reference information. - Updated the documentation to reflect the new structure and details of API parameters, including required fields and descriptions. - Improved user experience by ensuring that endpoints without parameters do not display empty tables. - Overall, enhanced the clarity and usability of API interactions within the application.
27 lines
1.5 KiB
PHP
27 lines
1.5 KiB
PHP
@props(['params'])
|
|
|
|
@if (count($params) > 0)
|
|
<div class="mt-6 overflow-x-auto">
|
|
<table class="w-full text-left text-sm">
|
|
<thead>
|
|
<tr class="border-b border-gray-200 dark:border-white/10">
|
|
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Parametre</th>
|
|
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Type</th>
|
|
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Obligatoire</th>
|
|
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
|
@foreach ($params as $param)
|
|
<tr>
|
|
<td class="px-3 py-2.5 font-mono text-sm text-gray-700 dark:text-gray-300">{{ $param['name'] }}</td>
|
|
<td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['type'] }}</td>
|
|
<td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['required'] }}</td>
|
|
<td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['description'] }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|