STYLE:
- Nuevos cambios en los estilos de la pagina (Seccion clientes completa).
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
<x-section-header subtitle="Gestión de Clientes" title="Cartera de " highlight="Clientes" />
|
||||
|
||||
<!-- Mensajes de feedback -->
|
||||
<x-ui.alert />
|
||||
@if(session('success'))
|
||||
<div class="bg-green-900/50 border border-green-500 text-green-300 px-4 py-3 rounded-lg mb-6 shadow-sm">
|
||||
{{ session('success') }}
|
||||
@@ -13,24 +15,24 @@
|
||||
<form action="{{ route('clients.index') }}" method="GET" class="w-full md:w-1/2">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
|
||||
<svg class="w-4 h-4 text-gray-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
||||
<svg class="w-4 h-4 text-gray-600 dark:text-gray-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<input type="text" name="search" value="{{ request('search') }}"
|
||||
class="block w-full p-3 ps-10 text-sm text-white border border-neutral-700 rounded-lg bg-neutral-800 focus:ring-neon-lime focus:border-neon-lime placeholder-gray-500"
|
||||
class="block w-full p-3 ps-10 text-sm text-black dark:text-white border border-neutral-400 dark:border-neutral-700 rounded-lg bg-neutral-200 dark:bg-neutral-800 placeholder-gray-600 dark:placeholder-gray-500"
|
||||
placeholder="Buscar por nombre, teléfono o email...">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a href="{{ route('clients.create') }}" class="w-full md:w-auto text-center px-5 py-3 text-sm font-bold text-neutral-900 bg-neon-lime rounded-lg hover:bg-[#b3e600] transition-colors uppercase tracking-wide shadow-lg shadow-neon-lime/20">
|
||||
<a href="{{ route('clients.create') }}" class="w-full md:w-auto text-center px-5 py-3 text-sm font-bold text-neon-lime dark:text-neutral-900 bg-neutral-950 dark:bg-neon-lime rounded-lg hover:bg-neutral-900/80 hover:dark:bg-[#b3e600] transition-colors uppercase tracking-wide">
|
||||
+ Nuevo Cliente
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="relative overflow-x-auto shadow-md sm:rounded-lg border border-neutral-800 w-full">
|
||||
<table class="w-full text-sm text-left rtl:text-right text-gray-400">
|
||||
<thead class="text-xs text-gray-300 uppercase bg-neutral-800 border-b border-neutral-700">
|
||||
<div class="relative overflow-x-auto shadow-md sm:rounded-lg border border-gray-400 dark:border-neutral-800 w-full">
|
||||
<table class="w-full text-sm text-left rtl:text-right text-neutral-900 dark:text-white">
|
||||
<thead class="text-xs text-neutral-800 dark:text-gray-300 uppercase bg-gray-400 dark:bg-neutral-800 border-b border-gray-300 dark:border-neutral-700">
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3">Cliente / Email</th>
|
||||
<th scope="col" class="px-6 py-3">Teléfono / WhatsApp</th>
|
||||
@@ -40,45 +42,43 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($clients as $client)
|
||||
<tr class="bg-neutral-900/50 border-b border-neutral-800 hover:bg-neutral-800 transition-colors group">
|
||||
|
||||
<tr class="bg-gray-200/50 dark:bg-neutral-900/50 border-b border-gray-400 dark:border-neutral-800 hover:bg-gray-400 hover:dark:bg-neutral-800 transition-colors group">
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="text-base font-bold text-white">{{ $client->name }}</div>
|
||||
<div class="text-xs text-gray-500 font-mono">
|
||||
<div class="text-base font-bold">{{ $client->name }}</div>
|
||||
<div class="text-xs text-gray-600 dark:text-gray-400 font-mono">
|
||||
{{ $client->email ?? 'Sin email registrado' }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="px-6 py-4">
|
||||
@if($client->phone)
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-mono text-gray-300">{{ $client->phone }}</span>
|
||||
<span class="text-green-500 text-xs bg-green-900/30 px-1.5 py-0.5 rounded">WA</span>
|
||||
<span class="font-mono">{{ $client->phone }}</span>
|
||||
<span class="text-xs text-green-600 border border-green-600 px-1.5 py-0.5 rounded">WA</span>
|
||||
</div>
|
||||
@else
|
||||
<span class="text-gray-600 italic">No registrado</span>
|
||||
<span class="italic">No registrado</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="px-6 py-4">
|
||||
<span class="text-gray-400 truncate max-w-xs block" title="{{ $client->address }}">
|
||||
<span class="truncate max-w-xs block" title="{{ $client->address }}">
|
||||
{{ $client->address ?? '-' }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="px-6 py-4 text-right flex items-center justify-end gap-3">
|
||||
<a href="{{ route('clients.edit', $client) }}" class="font-medium text-blue-400 hover:text-blue-300 hover:underline transition-colors">
|
||||
Editar
|
||||
<td class="px-6 py-4 text-right flex items-center justify-end gap-2">
|
||||
<a href="{{ route('clients.edit', $client) }}" title="Editar" class="font-semibold p-2 text-blue-700 dark:text-blue-400 border-2 border-blue-700 rounded-lg hover:bg-blue-700 hover:text-white dark:hover:text-white transition-colors">
|
||||
<svg class="size-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m14.304 4.844 2.852 2.852M7 7H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-4.5m2.409-9.91a2.017 2.017 0 0 1 0 2.853l-6.844 6.844L8 14l.713-3.565 6.844-6.844a2.015 2.015 0 0 1 2.852 0Z"/>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<form action="{{ route('clients.destroy', $client) }}" method="POST" class="inline-block" onsubmit="return confirm('¿Estás seguro de que deseas eliminar este cliente? Esta acción no se puede deshacer.');">
|
||||
<form action="{{route('clients.destroy',$client)}}" method="post">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
<button type="submit" class="font-medium text-red-500 hover:text-red-400 hover:underline transition-colors cursor-pointer bg-transparent border-0 p-0">
|
||||
Eliminar
|
||||
<button title="Eliminar" type="submit" class="w-full sm:w-auto p-2 font-bold dark:font-medium text-red-600 dark:text-red-400 border-2 border-red-600 rounded-lg hover:bg-red-600 hover:text-white dark:hover:text-white transition-colors">
|
||||
<svg class="size-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7h14m-9 3v8m4-8v8M10 3h4a1 1 0 0 1 1 1v3H9V4a1 1 0 0 1 1-1ZM6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user