This commit is contained in:
BryamE
2026-01-08 21:18:15 -03:00
parent 1f79274469
commit 5adea83517
+1 -41
View File
@@ -30,53 +30,13 @@
</tr>
</thead>
<tbody>
@forelse($sales as $sale)
<tr class="bg-transparent border-b border-neutral-800 hover:bg-neutral-800/50 transition-colors">
<td class="px-6 py-4 font-mono text-neon-lime font-bold">
#{{ str_pad($sale->id, 5, '0', STR_PAD_LEFT) }}
</td>
<td class="px-6 py-4">
<div class="text-white">{{ $sale->created_at->format('d/m/Y') }}</div>
<div class="text-xs text-gray-600">{{ $sale->created_at->format('H:i') }} hs</div>
</td>
<td class="px-6 py-4">
@if($sale->client)
<div class="text-white font-medium">{{ $sale->client->name }}</div>
<div class="text-xs text-gray-500">Cli. Registrado</div>
@else
<span class="text-gray-500 italic">Consumidor Final</span>
@endif
</td>
<td class="px-6 py-4">
<span class="bg-neutral-700 text-gray-300 text-xs font-medium px-2.5 py-0.5 rounded border border-neutral-600">
{{ $sale->payment_method }}
</span>
</td>
<td class="px-6 py-4 text-right font-bold text-white text-base">
${{ number_format($sale->total, 2, ',', '.') }}
</td>
<td class="px-6 py-4 text-center">
<a href="{{ route('sales.show', $sale) }}" class="font-medium text-blue-400 hover:underline mr-3">Ver Detalle</a>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="px-6 py-12 text-center">
<div class="flex flex-col items-center justify-center">
<svg class="w-12 h-12 text-gray-600 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
<p class="text-gray-400 text-lg">No hay ventas registradas aún.</p>
<p class="text-gray-600 text-sm">Realiza tu primera venta desde el botón verde.</p>
</div>
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!-- Paginación -->
<div class="mt-4 w-full flex justify-center">
{{ $sales->links() }}
</div>
</x-layout>