Files
Marvin 657c5ad5e3 Update project dependencies and enhance documentation
- Added `barryvdh/laravel-dompdf` to `composer.json` for PDF generation capabilities.
- Updated `boost.json` to include `tailwindcss-development` in skills.
- Modified `package.json` and `package-lock.json` to upgrade Tailwind CSS and related packages.
- Improved README.md for clarity and corrected French language errors.
- Created design system documentation for Filament components.
- Added new Filament pages for Dashboard and Documentation with dynamic content loading.
- Enhanced TablesExplorer functionality with improved table and column management.
2026-02-20 14:16:24 +01:00

41 lines
1.8 KiB
PHP

@props(['data', 'metadata' => null, 'emptyMessage' => 'Aucun resultat.', 'emptyIcon' => 'heroicon-o-inbox'])
@if (count($data) > 0)
@php
$firstRow = reset($data);
$isAssociative = is_array($firstRow);
$headers = $isAssociative ? array_keys($firstRow) : [];
@endphp
<div class="overflow-x-auto">
<table class="w-full text-left text-sm">
<thead>
<tr class="border-b border-gray-200 dark:border-white/10">
@if ($isAssociative)
@foreach ($headers as $key)
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">{{ $key }}</th>
@endforeach
@else
<th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Valeur</th>
@endif
</tr>
</thead>
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
@foreach ($data as $row)
<tr class="transition-colors hover:bg-gray-50 dark:hover:bg-white/5">
@if ($isAssociative)
@foreach ($row as $value)
<td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
@endforeach
@else
<td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $row }}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
@else
<x-logistics.empty-state :icon="$emptyIcon" :title="$emptyMessage" />
@endif