Add empleado, borrado del seeder, cambios esteticos y middleware.

This commit is contained in:
2026-06-10 15:57:51 -03:00
parent d0d61f7985
commit 2454ee3a23
20 changed files with 1039 additions and 200 deletions
+67
View File
@@ -0,0 +1,67 @@
<x-layout title="Lauck - Detalle de Proveedor">
<x-section-header subtitle="Proveedores" title="Detalle de " highlight="Proveedor" />
<div class="w-full max-w-4xl mx-auto bg-gray-200 dark:bg-panel-bg border border-neutral-400 dark:border-neutral-800 rounded-xl p-8 shadow-lg relative">
<div class="flex justify-between items-start mb-6">
<div>
<h3 class="text-2xl font-bold text-neutral-900 dark:text-white">{{ $supplier->name }}</h3>
<p class="text-sm text-gray-600 dark:text-gray-400">Registrado el: {{ $supplier->created_at->format('d/m/Y H:i') }}</p>
</div>
<div>
<a href="{{ route('suppliers.index') }}" class="text-sm font-bold text-gray-500 hover:text-white transition-colors">Volver al listado</a>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 bg-gray-300 dark:bg-neutral-800 p-6 rounded-lg border border-gray-400 dark:border-neutral-700">
<div>
<p class="text-xs text-gray-500 uppercase tracking-wider mb-1">Nombre / Razón Social</p>
<p class="text-lg font-bold text-neutral-900 dark:text-white">{{ $supplier->name }}</p>
</div>
<div>
<p class="text-xs text-gray-500 uppercase tracking-wider mb-1">Teléfono / WhatsApp</p>
@if($supplier->phone)
<p class="text-lg font-bold text-neutral-900 dark:text-white font-mono">{{ $supplier->phone }}</p>
@else
<p class="text-lg text-gray-500 italic">No registrado</p>
@endif
</div>
<div>
<p class="text-xs text-gray-500 uppercase tracking-wider mb-1">Correo Electrónico</p>
@if($supplier->email)
<p class="text-base font-semibold text-neutral-900 dark:text-white font-mono">{{ $supplier->email }}</p>
@else
<p class="text-base text-gray-500 italic">No registrado</p>
@endif
</div>
<div>
<p class="text-xs text-gray-500 uppercase tracking-wider mb-1">Dirección</p>
@if($supplier->address)
<p class="text-base font-semibold text-neutral-900 dark:text-white">{{ $supplier->address }}</p>
@else
<p class="text-base text-gray-500 italic">No registrada</p>
@endif
</div>
</div>
<div class="mt-8 flex justify-end gap-4">
@if(auth()->user()->role === 'admin')
<a href="{{ route('suppliers.order', $supplier) }}" class="px-6 py-2.5 text-sm font-bold text-white bg-green-600 hover:bg-green-700 rounded-lg transition-colors">
Hacer Pedido
</a>
<a href="{{ route('suppliers.edit', $supplier) }}" class="px-6 py-2.5 text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors">
Editar Proveedor
</a>
@else
<span title="Acceso denegado" class="px-6 py-2.5 text-sm font-bold text-gray-400 bg-gray-300 dark:bg-neutral-800 border border-gray-400 dark:border-neutral-700 rounded-lg cursor-not-allowed pointer-events-none">
Hacer Pedido
</span>
<span title="Acceso denegado" class="px-6 py-2.5 text-sm font-bold text-gray-400 bg-gray-300 dark:bg-neutral-800 border border-gray-400 dark:border-neutral-700 rounded-lg cursor-not-allowed pointer-events-none">
Editar Proveedor
</span>
@endif
</div>
</div>
</x-layout>