Files
sirpremiumv2/resources/views/livewire/show-log-comisiones.blade.php
T
2025-07-31 15:19:22 -07:00

56 lines
3.3 KiB
PHP

<div class="p-6 max-w-7xl mx-auto">
<!-- Encabezado -->
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-semibold text-gray-800">Log comisiones</h2>
</div>
<!-- Input de búsqueda -->
{{-- <div class="mb-4">
<input type="text" wire:model.debounce.300ms="search" placeholder="" class="w-full px-4 py-2 border border-gray-300 rounded-xl shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent transition" />
</div> --}}
<!-- Tabla de datos -->
<div class="overflow-hidden rounded-xl shadow-md border border-gray-200 bg-white">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Compra</th>
<th class="px-6 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Valor</th>
<th class="px-6 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Utilidad</th>
<th class="px-6 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Vendedor</th>
<th class="px-6 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Servicio</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
@forelse($consultaLogs as $log)
<tr class="hover:bg-gray-50 transition">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">{{ \Carbon\Carbon::parse($log?->historial?->created_at ?? now())->format('y/m/d h:i a') }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">{{ $log?->historial?->valor ?? 'N/A' }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">{{ $log?->historial?->utilidad ?? 'N/A' }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">{{ $log?->user?->name ?? 'N/A' }} - {{ $log?->user?->email ?? 'N/A' }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
@if (!empty($log?->historial?->promocion_id))
{{ $log?->historial?->promocion?->nombre ?? 'Sin promoción' }}
@elseif(!empty($log?->historial?->tarifa_id))
@if (empty($log?->historial?->tarifa?->servicio?->por_tiempo))
{{ $log?->historial?->tarifa?->pantallas ?? 'N/A' }} P. de
@endif
{{ $log?->historial?->tarifa?->servicio?->nombre ?? 'Sin nombre' }} - {{ $log?->historial?->tarifa?->dias ?? 'N/A' }} d.
@endif
</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-6 py-4 text-center text-sm text-gray-500">No se encontraron resultados.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!-- Paginación -->
<div class="mt-4">
{{-- {{ $productos->links() }} --}}
</div>
</div>