Merge branch 'bryam' of https://github.com/BryamE/ProyectoLauck into giane
This commit is contained in:
@@ -85,12 +85,12 @@
|
|||||||
|
|
||||||
<!-- Botones de Acción -->
|
<!-- Botones de Acción -->
|
||||||
<div class="mt-auto grid grid-cols-1 sm:grid-cols-2 gap-4">
|
<div class="mt-auto grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||||
<button class="bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-black py-4 px-6 rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-all uppercase tracking-wide shadow-lg shadow-black/20 dark:shadow-neon-lime/20 flex items-center justify-center gap-2 transform hover:-translate-y-1">
|
<a href="tel:+5403434220103" class="bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-black py-4 px-6 rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-all uppercase tracking-wide shadow-lg shadow-black/20 dark:shadow-neon-lime/20 flex items-center justify-center gap-2 transform hover:-translate-y-1">
|
||||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path></svg>
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path></svg>
|
||||||
Consultar
|
Consultar
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a href="https://wa.me/3434718739?text=Hola,%20me%20interesa%20el%20producto:%20{{ $product->name }}" target="_blank" class="bg-green-500 dark:bg-neutral-800 text-white font-bold py-4 px-6 rounded-lg hover:bg-green-600 hover:dark:bg-neutral-700 border border-white dark:border-neutral-700 transition-all uppercase tracking-wide flex items-center justify-center gap-2">
|
<a href="https://wa.me/3434220103?text=Hola,%20me%20interesa%20el%20producto:%20{{ $product->name }}" target="_blank" class="bg-green-500 dark:bg-neutral-800 text-white font-bold py-4 px-6 rounded-lg hover:bg-green-600 hover:dark:bg-neutral-700 border border-white dark:border-neutral-700 transition-all uppercase tracking-wide flex items-center justify-center gap-2">
|
||||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.008-.57-.008-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.008-.57-.008-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
|
||||||
WhatsApp
|
WhatsApp
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,45 +1,40 @@
|
|||||||
<x-layout title="Lauck - Nuevo Cliente">
|
<x-layout title="Lauck - Nuevo Cliente">
|
||||||
|
|
||||||
<x-section-header subtitle="Gestión de Clientes" title="Nuevo " highlight="Cliente" />
|
<x-section-header subtitle="Gestión de Clientes" title="Nuevo " highlight="Cliente" />
|
||||||
|
|
||||||
<div class="w-full max-w-4xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
|
<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">
|
||||||
|
|
||||||
<form action="{{ route('clients.store') }}" method="POST">
|
<form action="{{ route('clients.store') }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<input type="hidden" name="origin" value="{{ request('origin') }}">
|
<input type="hidden" name="origin" value="{{ request('origin') }}">
|
||||||
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
||||||
|
|
||||||
|
<!-- Nombre -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="name" value="Nombre Completo" />
|
<x-forms.label for="name" value="Nombre Completo" />
|
||||||
<x-forms.input id="name" name="name" type="text" :value="old('name')" required autofocus placeholder="Ej: Sergio Lauck" :error="$errors->first('name')" />
|
<x-forms.input id="name" name="name" type="text" :value="old('name')" required autofocus placeholder="Ej: Juan Pérez" :error="$errors->first('name')" />
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Telefono -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="phone" value="Teléfono / WhatsApp" />
|
<x-forms.label for="phone" value="Teléfono / WhatsApp" />
|
||||||
<x-forms.input id="phone" name="phone" type="text" :value="old('phone')" placeholder="Ej: 343 154..." :error="$errors->first('phone')" />
|
<x-forms.input id="phone" name="phone" type="text" :value="old('phone')" placeholder="Ej: 343 154..." :error="$errors->first('phone')" />
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Correo -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="email" value="Correo Electrónico" />
|
<x-forms.label for="email" value="Correo Electrónico" />
|
||||||
<x-forms.input id="email" name="email" type="email" :value="old('email')" placeholder="cliente@ejemplo.com" :error="$errors->first('email')" />
|
<x-forms.input id="email" name="email" type="email" :value="old('email')" placeholder="cliente@ejemplo.com" :error="$errors->first('email')" />
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Direccion -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="address" value="Dirección / Domicilio" />
|
<x-forms.label for="address" value="Dirección / Domicilio" />
|
||||||
<textarea id="address" name="address" rows="3" class="bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500" placeholder="Calle, número, piso...">{{ old('address') }}</textarea>
|
<textarea id="address" name="address" rows="3" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-neutral-600 dark:placeholder-gray-400" placeholder="Calle, número, piso...">{{ old('address') }}</textarea>
|
||||||
@error('address')
|
@error('address')
|
||||||
<span class="text-red-500 text-xs mt-1">{{ $message }}</span>
|
<span class="text-red-500 text-xs mt-1">{{ $message }}</span>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-800 pt-6">
|
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
<a href="{{ route('clients.index') }}" class="text-gray-400 hover:text-white font-medium text-sm transition-colors">Cancelar</a>
|
<a href="{{ route('clients.index') }}" class="text-gray-700 dark:text-gray-400 hover:text-black hover:dark:text-white font-medium text-sm transition-colors">Cancelar</a>
|
||||||
|
<button type="submit" class="px-6 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
||||||
<button type="submit" class="px-6 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] transition-colors shadow-lg shadow-neon-lime/20">
|
|
||||||
Guardar Cliente
|
Guardar Cliente
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,75 +1,41 @@
|
|||||||
<x-layout title="Lauck - Editar Cliente">
|
<x-layout title="Lauck - Editar Cliente">
|
||||||
|
|
||||||
<x-section-header subtitle="Gestión de Clientes" title="Editar " highlight="Cliente" />
|
<x-section-header subtitle="Gestión de Clientes" title="Editar " highlight="Cliente" />
|
||||||
|
|
||||||
<div class="w-full max-w-4xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
|
<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">
|
||||||
|
|
||||||
<form action="{{ route('clients.update', $client) }}" method="POST">
|
<form action="{{ route('clients.update', $client) }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT') <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
@method('PUT')
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
||||||
|
|
||||||
|
<!-- Nombre -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="name" value="Nombre Completo" />
|
<x-forms.label for="name" value="Nombre Completo" />
|
||||||
<x-forms.input
|
<x-forms.input id="name" name="name" type="text" :value="old('name', $client->name)" required autofocus placeholder="Ej: Juan Pérez" :error="$errors->first('name')" />
|
||||||
id="name"
|
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
:value="old('name', $client->name)"
|
|
||||||
required
|
|
||||||
autofocus
|
|
||||||
placeholder="Ej: Sergio Lauck"
|
|
||||||
:error="$errors->first('name')"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Telefono -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="phone" value="Teléfono / WhatsApp" />
|
<x-forms.label for="phone" value="Teléfono / WhatsApp" />
|
||||||
<x-forms.input
|
<x-forms.input id="phone" name="phone" type="text" :value="old('phone', $client->phone)" placeholder="Ej: 343 154..." :error="$errors->first('phone')" />
|
||||||
id="phone"
|
|
||||||
name="phone"
|
|
||||||
type="text"
|
|
||||||
:value="old('phone', $client->phone)"
|
|
||||||
placeholder="Ej: 343 154..."
|
|
||||||
:error="$errors->first('phone')"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Correo -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="email" value="Correo Electrónico" />
|
<x-forms.label for="email" value="Correo Electrónico" />
|
||||||
<x-forms.input
|
<x-forms.input id="email" name="email" type="email" :value="old('email', $client->email)" placeholder="cliente@ejemplo.com" :error="$errors->first('email')" />
|
||||||
id="email"
|
|
||||||
name="email"
|
|
||||||
type="email"
|
|
||||||
:value="old('email', $client->email)"
|
|
||||||
placeholder="cliente@ejemplo.com"
|
|
||||||
:error="$errors->first('email')"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Direccion -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="address" value="Dirección / Domicilio" />
|
<x-forms.label for="address" value="Dirección / Domicilio" />
|
||||||
<textarea
|
<textarea id="address" name="address" rows="3" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500" placeholder="Calle, número, piso...">{{ old('address', $client->address) }}</textarea>
|
||||||
id="address"
|
|
||||||
name="address"
|
|
||||||
rows="3"
|
|
||||||
class="bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500"
|
|
||||||
placeholder="Calle, número, piso..."
|
|
||||||
>{{ old('address', $client->address) }}</textarea>
|
|
||||||
|
|
||||||
@error('address')
|
@error('address')
|
||||||
<span class="text-red-500 text-xs mt-1">{{ $message }}</span>
|
<span class="text-red-500 text-xs mt-1">{{ $message }}</span>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-800 pt-6">
|
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
|
<a href="{{ route('clients.index') }}" class="text-gray-800 dark:text-gray-400 hover:text-black hover:dark:text-white font-medium text-sm transition-colors">Cancelar</a>
|
||||||
<a href="{{ route('clients.index') }}" class="text-gray-400 hover:text-white font-medium text-sm transition-colors">
|
<button type="submit" class="px-4 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
||||||
Cancelar
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<button type="submit" class="px-6 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] transition-colors shadow-lg shadow-neon-lime/20">
|
|
||||||
Actualizar Cliente
|
Actualizar Cliente
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
<x-section-header subtitle="Gestión de Clientes" title="Cartera de " highlight="Clientes" />
|
<x-section-header subtitle="Gestión de Clientes" title="Cartera de " highlight="Clientes" />
|
||||||
|
|
||||||
|
<!-- Mensajes de feedback -->
|
||||||
|
<x-ui.alert />
|
||||||
@if(session('success'))
|
@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">
|
<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') }}
|
{{ session('success') }}
|
||||||
@@ -13,24 +15,24 @@
|
|||||||
<form action="{{ route('clients.index') }}" method="GET" class="w-full md:w-1/2">
|
<form action="{{ route('clients.index') }}" method="GET" class="w-full md:w-1/2">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
|
<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"/>
|
<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>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="search" value="{{ request('search') }}"
|
<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...">
|
placeholder="Buscar por nombre, teléfono o email...">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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
|
+ Nuevo Cliente
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative overflow-x-auto shadow-md sm:rounded-lg border border-neutral-800 w-full">
|
<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-gray-400">
|
<table class="w-full text-sm text-left rtl:text-right text-neutral-900 dark:text-white">
|
||||||
<thead class="text-xs text-gray-300 uppercase bg-neutral-800 border-b border-neutral-700">
|
<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>
|
<tr>
|
||||||
<th scope="col" class="px-6 py-3">Cliente / Email</th>
|
<th scope="col" class="px-6 py-3">Cliente / Email</th>
|
||||||
<th scope="col" class="px-6 py-3">Teléfono / WhatsApp</th>
|
<th scope="col" class="px-6 py-3">Teléfono / WhatsApp</th>
|
||||||
@@ -40,43 +42,41 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse($clients as $client)
|
@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">
|
<td class="px-6 py-4 whitespace-nowrap">
|
||||||
<div class="text-base font-bold text-white">{{ $client->name }}</div>
|
<div class="text-base font-bold">{{ $client->name }}</div>
|
||||||
<div class="text-xs text-gray-500 font-mono">
|
<div class="text-xs text-gray-600 dark:text-gray-400 font-mono">
|
||||||
{{ $client->email ?? 'Sin email registrado' }}
|
{{ $client->email ?? 'Sin email registrado' }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4">
|
<td class="px-6 py-4">
|
||||||
@if($client->phone)
|
@if($client->phone)
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span class="font-mono text-gray-300">{{ $client->phone }}</span>
|
<span class="font-mono">{{ $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="text-xs text-green-600 border border-green-600 px-1.5 py-0.5 rounded">WA</span>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<span class="text-gray-600 italic">No registrado</span>
|
<span class="italic">No registrado</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4">
|
<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 ?? '-' }}
|
{{ $client->address ?? '-' }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="px-6 py-4 text-right flex items-center justify-end gap-2">
|
||||||
<td class="px-6 py-4 text-right flex items-center justify-end gap-3">
|
<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">
|
||||||
<a href="{{ route('clients.edit', $client) }}" class="font-medium text-blue-400 hover:text-blue-300 hover:underline 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">
|
||||||
Editar
|
<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>
|
</a>
|
||||||
|
<form action="{{route('clients.destroy',$client)}}" method="post">
|
||||||
<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.');">
|
|
||||||
@csrf
|
@csrf
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
|
<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">
|
||||||
<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">
|
<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">
|
||||||
Eliminar
|
<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>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,27 +1,22 @@
|
|||||||
<x-layout title="Lauck - Nuevo Producto">
|
<x-layout title="Lauck - Nuevo Producto">
|
||||||
|
|
||||||
<x-section-header subtitle="Inventario" title="Nuevo " highlight="Producto" />
|
<x-section-header subtitle="Inventario" title="Nuevo " highlight="Producto" />
|
||||||
|
|
||||||
<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">
|
<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">
|
||||||
|
|
||||||
<form action="{{ route('productos.store') }}" method="POST" enctype="multipart/form-data">
|
<form action="{{ route('productos.store') }}" method="POST" enctype="multipart/form-data">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<!-- Grid Layout -->
|
<!-- Grid Layout -->
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
||||||
|
|
||||||
<!-- Nombre (Ocupa 2 columnas) -->
|
<!-- Nombre -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="name" value="Nombre del Producto" />
|
<x-forms.label for="name" value="Nombre del Producto" />
|
||||||
<x-forms.input id="name" name="name" type="text" :value="old('name')" required autofocus placeholder="Ej: Cámara 29 Válvula Auto" :error="$errors->first('name')" />
|
<x-forms.input id="name" name="name" type="text" :value="old('name')" required autofocus placeholder="Ej: Cámara 29 Válvula Auto" :error="$errors->first('name')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- SKU -->
|
<!-- SKU -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="sku" value="Código SKU (Opcional)" />
|
<x-forms.label for="sku" value="Código SKU (Opcional)" />
|
||||||
<x-forms.input id="sku" name="sku" type="text" :value="old('sku')" placeholder="Dejar vacío para generar auto" :error="$errors->first('sku')" />
|
<x-forms.input id="sku" name="sku" type="text" :value="old('sku')" placeholder="Dejar vacío para generar auto" :error="$errors->first('sku')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tipo -->
|
<!-- Tipo -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="type" value="Tipo de Producto" />
|
<x-forms.label for="type" value="Tipo de Producto" />
|
||||||
@@ -32,52 +27,45 @@
|
|||||||
<option value="spare" {{ old('type') == 'spare' ? 'selected' : '' }}>Repuesto</option>
|
<option value="spare" {{ old('type') == 'spare' ? 'selected' : '' }}>Repuesto</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Precios -->
|
<!-- Precios -->
|
||||||
<div class="">
|
<div class="">
|
||||||
<x-forms.label for="price" value="Precio Venta ($)" />
|
<x-forms.label for="price" value="Precio Venta ($)" />
|
||||||
<x-forms.input id="price" name="price" type="number" step="0.01" :value="old('price')" required :error="$errors->first('price')" />
|
<x-forms.input id="price" name="price" type="number" step="0.01" :value="old('price')" required :error="$errors->first('price')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<x-forms.label for="cost" value="Costo ($) - Solo Admin" />
|
<x-forms.label for="cost" value="Costo ($) - Solo Admin" />
|
||||||
<x-forms.input id="cost" name="cost" type="number" step="0.01" :value="old('cost')" :error="$errors->first('cost')" />
|
<x-forms.input id="cost" name="cost" type="number" step="0.01" :value="old('cost')" :error="$errors->first('cost')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Stock -->
|
<!-- Stock -->
|
||||||
<div class="">
|
<div class="">
|
||||||
<x-forms.label for="stock_quantity" value="Cantidad Inicial" />
|
<x-forms.label for="stock_quantity" value="Cantidad Inicial" />
|
||||||
<x-forms.input id="stock_quantity" name="stock_quantity" type="number" :value="old('stock_quantity', 0)" required :error="$errors->first('stock_quantity')" />
|
<x-forms.input id="stock_quantity" name="stock_quantity" type="number" :value="old('stock_quantity', 0)" required :error="$errors->first('stock_quantity')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<x-forms.label for="min_stock_alert" value="Alerta de Stock Mínimo" />
|
<x-forms.label for="min_stock_alert" value="Alerta de Stock Mínimo" />
|
||||||
<x-forms.input id="min_stock_alert" name="min_stock_alert" type="number" :value="old('min_stock_alert', 5)" required />
|
<x-forms.input id="min_stock_alert" name="min_stock_alert" type="number" :value="old('min_stock_alert', 5)" required />
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Descripción -->
|
||||||
<!-- Descripción (2 columnas) -->
|
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="description" value="Descripción / Notas" />
|
<x-forms.label for="description" value="Descripción / Notas" />
|
||||||
<textarea id="description" name="description" rows="3" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-neutral-600 dark:placeholder-gray-400">{{ old('description') }}</textarea>
|
<textarea id="description" name="description" rows="3" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-neutral-600 dark:placeholder-gray-400">{{ old('description') }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Imagen -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="image" value="Imagen del Producto" />
|
<x-forms.label for="image" value="Imagen del Producto" />
|
||||||
<x-forms.input type="file" name="image" class="block w-full text-sm dark:text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded-full
|
<x-forms.input type="file" name="image" class="block w-full text-sm dark:text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded-full
|
||||||
file:border-0 file:text-sm file:font-semibold file:bg-lime-500 dark:file:bg-neon-lime file:text-neutral-900 hover:file:bg-[#b3e600]
|
file:border-0 file:text-sm file:font-semibold file:bg-lime-500 dark:file:bg-neon-lime file:text-neutral-900 hover:file:bg-[#b3e600]
|
||||||
" :error="$errors->first('image')"/>
|
" :error="$errors->first('image')"/>
|
||||||
{{-- @error('image') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Botones Acción -->
|
<!-- Botones Acción -->
|
||||||
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
<a href="{{ route('productos.index') }}" class="text-gray-700 dark:text-gray-400 hover:text-black hover:dark:text-white font-medium text-sm transition-colors">Cancelar</a>
|
<a href="{{ route('productos.index') }}" class="px-4 py-2.5 text-red-500 border border-red-500 hover:bg-red-500 hover:text-white rounded-lg font-semibold text-sm transition-colors">Cancelar</a>
|
||||||
<button type="submit" class="px-6 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
<button type="submit" class="px-6 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
||||||
Guardar
|
Guardar
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</x-layout>
|
</x-layout>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
<x-layout title="Lauck - Editar Producto">
|
<x-layout title="Lauck - Editar Producto">
|
||||||
<x-section-header subtitle="Inventario" title="Edicion de " highlight="Producto" />
|
<x-section-header subtitle="Inventario" title="Edicion de " highlight="Producto" />
|
||||||
|
|
||||||
<div class="w-full max-w-4xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
|
<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">
|
||||||
<form action="{{route('productos.update',$product)}}" method="POST">
|
<form action="{{route('productos.update',$product)}}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
|
||||||
|
|
||||||
<!-- Nombre -->
|
<!-- Nombre -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="name" value="Nombre del Producto" />
|
<x-forms.label for="name" value="Nombre del Producto" />
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
<!-- Tipo -->
|
<!-- Tipo -->
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<x-forms.label for="type" value="Tipo de Producto" />
|
<x-forms.label for="type" value="Tipo de Producto" />
|
||||||
<select id="type" name="type" class="bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
<select id="type" name="type" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
||||||
<option value="accessory" {{ $product->type == 'accessory' ? 'selected' : '' }}>Accesorio</option>
|
<option value="accessory" {{ $product->type == 'accessory' ? 'selected' : '' }}>Accesorio</option>
|
||||||
<option value="bike" {{ $product->type == 'bike' ? 'selected' : '' }}>Bicicleta</option>
|
<option value="bike" {{ $product->type == 'bike' ? 'selected' : '' }}>Bicicleta</option>
|
||||||
<option value="clothing" {{ $product->type == 'clothing' ? 'selected' : '' }}>Indumentaria</option>
|
<option value="clothing" {{ $product->type == 'clothing' ? 'selected' : '' }}>Indumentaria</option>
|
||||||
@@ -47,14 +48,19 @@
|
|||||||
<!-- Descripción (2 columnas) -->
|
<!-- Descripción (2 columnas) -->
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<x-forms.label for="description" value="Descripción / Notas" />
|
<x-forms.label for="description" value="Descripción / Notas" />
|
||||||
<textarea id="description" name="description" rows="3" class="bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500">{{$product->description}}</textarea>
|
<textarea id="description" name="description" rows="3" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 dark:text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500">{{$product->description}}</textarea>
|
||||||
|
</div>
|
||||||
|
<!-- Imagen -->
|
||||||
|
<div class="md:col-span-2">
|
||||||
|
<x-forms.label for="image" value="Imagen del Producto" />
|
||||||
|
<x-forms.input type="file" name="image" class="block w-full text-sm dark:text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-lime-700 dark:file:bg-neon-lime file:text-white dark:file:text-neutral-900 hover:file:bg-lime-600" :error="$errors->first('image')"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Botones Acción -->
|
<!-- Botones Acción -->
|
||||||
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-800 pt-6">
|
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
<a href="{{ route('productos.index') }}" class="text-gray-400 hover:text-white font-medium text-sm transition-colors">Cancelar</a>
|
<a href="{{ route('productos.index') }}" class="text-gray-800 dark:text-gray-400 hover:text-black hover:dark:text-white font-medium text-sm transition-colors">Cancelar</a>
|
||||||
<button type="submit" class="px-6 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] transition-colors shadow-lg shadow-neon-lime/20">
|
<button type="submit" class="px-4 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
||||||
Guardar
|
Guardar
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
<!-- Barra de Herramientas (Buscador + Botón Crear) -->
|
<!-- Barra de Herramientas (Buscador + Botón Crear) -->
|
||||||
<div class="w-full flex flex-col md:flex-row justify-between items-center gap-4 mb-6">
|
<div class="w-full flex flex-col md:flex-row justify-between items-center gap-4 mb-6">
|
||||||
|
|
||||||
<!-- Buscador -->
|
<!-- Buscador -->
|
||||||
<form action="{{ route('productos.index') }}" method="GET" class="w-full lg:w-2/3 flex flex-col sm:flex-row gap-3">
|
<form action="{{ route('productos.index') }}" method="GET" class="w-full lg:w-2/3 flex flex-col sm:flex-row gap-3">
|
||||||
<div class="relative w-full sm:w-2/3">
|
<div class="relative w-full sm:w-2/3">
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Botón Nuevo -->
|
<!-- Botón Nuevo -->
|
||||||
<a href="{{ route('productos.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 hover:dark:bg-[#b3e600] transition-colors uppercase tracking-wide">
|
<a href="{{ route('productos.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 Producto
|
+ Nuevo Producto
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,13 +74,32 @@
|
|||||||
<x-ui.badge color="green">{{ $product->stock_quantity }}</x-ui.badge>
|
<x-ui.badge color="green">{{ $product->stock_quantity }}</x-ui.badge>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 text-right">
|
<td class="px-6 py-4 text-right flex items-center gap-2 justify-end">
|
||||||
<a href="{{ route('productos.edit', $product) }}" class="font-semibold dark:font-medium text-blue-800 dark:text-blue-400 hover:underline mr-3">Editar</a>
|
<a href="{{ route('productos.show', $product) }}" title="Ver Mas" class="font-semibold p-2 text-green-700 dark:text-green-400 border-2 border-green-700 rounded-lg hover:bg-green-700 dark:hover:bg-green-600 dark:hover:border-green-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-width="2" d="M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"/>
|
||||||
|
<path stroke="currentColor" stroke-width="2" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('productos.edit', $product) }}" title="Editar" class="font-semibold p-2 text-blue-800 dark:text-blue-400 border-2 border-blue-800 rounded-lg hover:bg-blue-800 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('productos.destroy',$product)}}" method="post">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5" class="px-6 py-10 text-center text-gray-500">
|
<td colspan="5" class="px-6 py-10 text-center font-semibold">
|
||||||
No se encontraron productos.
|
No se encontraron productos.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -35,15 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
<div class="flex gap-5">
|
<div class="flex gap-5">
|
||||||
<a href="{{route('productos.index')}}" class="w-full sm:w-auto px-5 py-2 rounded-full text-white font-semibold bg-stone-500 hover:bg-stone-600">Volver</a>
|
<a href="{{route('productos.index')}}" class="w-full sm:w-auto p-2 rounded-lg text-stone-500 border-2 border-stone-500 font-semibold hover:text-white hover:bg-stone-500">Volver</a>
|
||||||
<a href="{{ route('productos.edit', $product ) }}" class="w-full sm:w-auto px-5 py-2 rounded-full text-white font-semibold bg-blue-600 hover:bg-blue-700">Editar</a>
|
|
||||||
<form action="{{route('productos.destroy',$product)}}" method="post">
|
|
||||||
@csrf
|
|
||||||
@method('DELETE')
|
|
||||||
<button type="submit" class="w-full sm:w-auto px-5 py-2 rounded-full text-white font-semibold bg-red-600 hover:bg-red-700">
|
|
||||||
Borrar
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<x-appc>
|
|
||||||
<div class="max-w-6xl mx-auto px-4 py-8 text-white">
|
|
||||||
<a href="{{ route('catalogo') }}">Volver a catalogo</a>
|
|
||||||
<h1>Titulo: {{ $producto->name }}</h1>
|
|
||||||
<p>
|
|
||||||
<b>Categoria:</b> {{ $producto->type }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ $producto->content }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</x-appc>
|
|
||||||
@@ -1,36 +1,85 @@
|
|||||||
<x-layout title="Lauck - Nueva Venta">
|
<x-layout title="Lauck - Nueva Venta">
|
||||||
@push('styles')
|
@push('styles')
|
||||||
<style>
|
<style>
|
||||||
/* Select2 adaptado al Tema 'Lauck' (Neutral + Neon Lime) */
|
/* === MODO CLARO === */
|
||||||
|
/* Contenedor principal del input */
|
||||||
.select2-container--default .select2-selection--single {
|
.select2-container--default .select2-selection--single {
|
||||||
background-color: #262626 !important; /* neutral-800 */
|
background-color: #d1d5dc !important; /* Fondo blanco */
|
||||||
border-color: #404040 !important; /* neutral-700 */
|
border: 1px solid #a1a1a1 !important; /* Borde gray-300 */
|
||||||
color: white !important;
|
color: #111827 !important; /* Texto casi negro (gray-900) */
|
||||||
height: 42px;
|
height: 32px !important;
|
||||||
|
padding: 0 0.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 0.5rem; /* rounded-lg */
|
border-radius: 0.5rem; /* rounded-lg */
|
||||||
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
/* Texto seleccionado */
|
||||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
color: white !important;
|
color: #111827 !important;
|
||||||
line-height: 42px;
|
line-height: 32px !important;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
}
|
}
|
||||||
|
/* La caja desplegable (Dropdown) */
|
||||||
.select2-dropdown {
|
.select2-dropdown {
|
||||||
background-color: #262626 !important; /* neutral-800 */
|
background-color: #d1d5dc !important;
|
||||||
border-color: #404040 !important; /* neutral-700 */
|
border: 1px solid #d1d5db !important;
|
||||||
color: white !important;
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* Sombra suave para modo claro */
|
||||||
}
|
}
|
||||||
/* Color de resalto al pasar el mouse u opción seleccionada */
|
/* Opciones de la lista (texto normal) */
|
||||||
|
.select2-results__option {
|
||||||
|
color: #374151 !important; /* gray-700 */
|
||||||
|
}
|
||||||
|
/* Placeholder */
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||||
|
color: #6b7280 !important; /* gray-500 */
|
||||||
|
}
|
||||||
|
/* Input de búsqueda interno */
|
||||||
|
.select2-search--dropdown .select2-search__field {
|
||||||
|
background-color: #f3f4f6 !important; /* gray-100 */
|
||||||
|
color: #111827 !important;
|
||||||
|
border: 1px solid #d1d5db !important;
|
||||||
|
border-radius: 0.375rem !important;
|
||||||
|
padding: 6px 12px !important;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
/* Color de resalto (Hover o Navegación con teclado). Mantenemos tu color de marca */
|
||||||
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
|
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
|
||||||
background-color: #ccff00 !important; /* neon-lime */
|
background-color: #ccff00 !important; /* neon-lime */
|
||||||
color: #171717 !important; /* neutral-900 */
|
color: #171717 !important; /* neutral-900 */
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
/* Ajuste del placeholder */
|
|
||||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
/* === MODO OSCURO === */
|
||||||
|
/* Contenedor principal */
|
||||||
|
:is(.dark) .select2-container--default .select2-selection--single {
|
||||||
|
background-color: #262626 !important; /* neutral-800 */
|
||||||
|
border-color: #404040 !important; /* neutral-700 */
|
||||||
|
}
|
||||||
|
/* Texto seleccionado oscuro */
|
||||||
|
:is(.dark) .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
/* Caja desplegable oscura */
|
||||||
|
:is(.dark) .select2-dropdown {
|
||||||
|
background-color: #262626 !important;
|
||||||
|
border-color: #404040 !important;
|
||||||
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); /* Sombra más fuerte */
|
||||||
|
}
|
||||||
|
/* Opciones de la lista oscura */
|
||||||
|
:is(.dark) .select2-results__option {
|
||||||
|
color: #d4d4d4 !important; /* gray-300 */
|
||||||
|
}
|
||||||
|
/* Placeholder oscuro */
|
||||||
|
:is(.dark) .select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||||
color: #9ca3af !important; /* gray-400 */
|
color: #9ca3af !important; /* gray-400 */
|
||||||
}
|
}
|
||||||
|
/* Input de búsqueda interno oscuro */
|
||||||
|
:is(.dark) .select2-search--dropdown .select2-search__field {
|
||||||
|
background-color: #171717 !important; /* neutral-900 */
|
||||||
|
color: white !important;
|
||||||
|
border-color: #404040 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@@ -48,11 +97,11 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="w-full max-w-5xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
|
<div class="w-full max-w-5xl mx-auto bg-gray-200 dark:bg-panel-bg border border-neutral-400 dark:border-neutral-800 rounded-xl p-8 shadow-lg">
|
||||||
<form action="{{ route('sales.store') }}" method="POST">
|
<form action="{{ route('sales.store') }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-12 gap-6 mb-4 border-b border-neutral-700 pb-8">
|
<div class="grid grid-cols-1 md:grid-cols-12 gap-6 mb-4 border-b border-neutral-400 dark:border-neutral-700 pb-8">
|
||||||
<div class="md:col-span-10">
|
<div class="md:col-span-10">
|
||||||
<x-forms.label for="client_id" value="Cliente" />
|
<x-forms.label for="client_id" value="Cliente" />
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
@@ -65,26 +114,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="md:col-span-2 flex items-end mb-1">
|
<div class="md:col-span-2 flex items-end mb-1">
|
||||||
<a href="{{ route('clients.create', ['origin' => 'sales']) }}" target="_blank"
|
<a href="{{ route('clients.create', ['origin' => 'sales']) }}" target="_blank" class="inline-flex items-center dark:text-neon-lime text-lime-700/80 hover:text-lime-500 dark:hover:text-[#b3e600] font-bold text-sm transition-colors" title="Crear nuevo cliente">+ Nuevo Cliente</a>
|
||||||
class="inline-flex items-center text-neon-lime hover:text-[#b3e600] font-bold text-sm transition-colors"
|
|
||||||
title="Crear nuevo cliente">+ Nuevo Cliente</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<div class="flex justify-between items-end mb-4">
|
<div class="flex justify-between items-end mb-4">
|
||||||
<x-forms.label value="Detalle de Productos" />
|
<x-forms.label value="Detalle de Productos" />
|
||||||
<div class="text-sm text-gray-400">
|
<div class="text-sm dark:text-gray-400 text-neutral-800">
|
||||||
Total Items: <span class="text-white font-mono" id="item-count">1</span>
|
Total Items: <span class="dark:text-white font-mono font-bold" id="item-count">1</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="items-container" class="space-y-3">
|
<div id="items-container" class="space-y-3">
|
||||||
|
|
||||||
<div class="item-row grid grid-cols-1 md:grid-cols-12 gap-4 items-start bg-neutral-800/50 p-4 rounded-xl border border-neutral-800">
|
<div class="item-row grid grid-cols-1 md:grid-cols-12 gap-4 items-start bg-neutral-300/50 dark:bg-neutral-700/50 p-4 rounded-xl border dark:border-neutral-800 border-gray-400">
|
||||||
|
|
||||||
<div class="md:col-span-6">
|
<div class="md:col-span-6">
|
||||||
<label class="block text-gray-400 text-xs mb-1.5 uppercase tracking-wider font-semibold">Producto</label>
|
<x-forms.label value="Producto" />
|
||||||
<select name="items[0][product_id]" class="w-full select2-product product-select">
|
<select name="items[0][product_id]" class="w-full select2-product product-select">
|
||||||
<option value="" data-price="0" selected disabled>Buscar producto...</option>
|
<option value="" data-price="0" selected disabled>Buscar producto...</option>
|
||||||
@foreach($products as $product)
|
@foreach($products as $product)
|
||||||
@@ -96,18 +143,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<label class="block text-gray-400 text-xs mb-1.5 uppercase tracking-wider font-semibold">Cant.</label>
|
<x-forms.label value="Cant."/>
|
||||||
<input type="number" name="items[0][quantity]" value="1" min="1"
|
<x-forms.input type="number" name="items[0][quantity]" value="1" min="1" class="quantity-input border rounded-lg block w-full py-1! px-2"/>
|
||||||
class="quantity-input bg-neutral-800 border-neutral-700 border rounded-lg text-white text-sm focus:ring-neon-lime focus:border-neon-lime block w-full p-1 px-2 h-7">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-3 text-right flex flex-col justify-center h-[42px] mt-6">
|
<div class="md:col-span-3 text-right flex flex-col justify-center h-[42px] mt-6">
|
||||||
<span class="text-xs text-gray-500">Subtotal</span>
|
<span class="text-xs dark:text-gray-400 text-gray-700">Subtotal</span>
|
||||||
<span class="row-total text-lg font-bold text-neon-lime">$0.00</span>
|
<span class="row-total text-lg font-bold text-lime-700 dark:text-neon-lime">$0.00</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-1 flex items-end justify-end h-[42px] mt-6">
|
<div class="md:col-span-1 flex items-end justify-end h-[42px] mt-6">
|
||||||
<button type="button" class="btn-remove text-neutral-500 hover:text-red-500 transition-colors p-2" title="Quitar item">
|
<button type="button" class="btn-remove dark:text-neutral-400 text-neutral-600 hover:text-red-500 hover:dark:text-red-400 transition-colors p-2" title="Quitar item">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||||
</svg>
|
</svg>
|
||||||
@@ -117,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button type="button" id="btn-add-row" class="inline-flex items-center text-neon-lime hover:text-[#b3e600] font-bold text-sm transition-colors">
|
<button type="button" id="btn-add-row" class="inline-flex items-center dark:text-neon-lime text-lime-600 dark:hover:text-[#b3e600] hover:text-lime-500 font-bold text-sm transition-colors">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-1" viewBox="0 0 20 20" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-1" viewBox="0 0 20 20" fill="currentColor">
|
||||||
<path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
@@ -125,19 +171,19 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-5 flex justify-end items-center border-t border-neutral-700 pt-6">
|
<div class="mt-5 flex justify-end items-center border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<span class="block text-gray-400 text-sm mb-1">Monto Total a Pagar</span>
|
<span class="block text-gray-600 dark:text-gray-400 text-sm mb-1">Monto Total a Pagar</span>
|
||||||
<span id="grand-total" class="text-3xl font-bold text-white">$0.00</span>
|
<span id="grand-total" class="text-3xl font-bold">$0.00</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-end border-t border-neutral-800 pt-6">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-end border-t border-neutral-400 dark:border-neutral-700 pt-6">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<x-forms.label for="payment_method" value="Método de Pago" />
|
<x-forms.label for="payment_method" value="Método de Pago" />
|
||||||
<select name="payment_method" class="bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
<select name="payment_method" class="bg-gray-300 dark:bg-neutral-800 border border-neutral-400 dark:border-neutral-700 text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
||||||
<option value="Efectivo">Efectivo</option>
|
<option value="Efectivo">Efectivo</option>
|
||||||
<option value="Tarjeta de Débito">Tarjeta de Débito</option>
|
<option value="Tarjeta de Débito">Tarjeta de Débito</option>
|
||||||
<option value="Tarjeta de Crédito">Tarjeta de Crédito</option>
|
<option value="Tarjeta de Crédito">Tarjeta de Crédito</option>
|
||||||
@@ -146,10 +192,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end gap-4">
|
<div class="flex justify-end gap-4">
|
||||||
<a href="{{ route('sales.index') }}" class="px-6 py-2.5 text-gray-400 hover:text-white font-medium text-sm transition-colors flex items-center">
|
<a href="{{ route('sales.index') }}" class="px-4 py-2.5 text-red-500 border border-red-500 hover:bg-red-500 hover:text-white rounded-lg font-semibold text-sm transition-colors flex items-center">Cancelar</a>
|
||||||
Cancelar
|
<button type="submit" class="px-8 py-2.5 bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20">
|
||||||
</a>
|
|
||||||
<button type="submit" class="px-8 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] transition-colors shadow-lg shadow-neon-lime/20 transform hover:scale-105">
|
|
||||||
Confirmar Venta
|
Confirmar Venta
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,25 +2,23 @@
|
|||||||
|
|
||||||
<x-section-header subtitle="Finanzas" title="Historial de " highlight="Ventas" />
|
<x-section-header subtitle="Finanzas" title="Historial de " highlight="Ventas" />
|
||||||
|
|
||||||
<div class="mb-6 bg-neutral-800/50 p-4 rounded-xl border border-neutral-800 shadow-sm">
|
<div class="mb-6 bg-gray-200/50 dark:bg-neutral-800/50 p-4 rounded-xl border border-neutral-400 dark:border-neutral-800 shadow-sm">
|
||||||
<form action="{{ route('sales.index') }}" method="GET" class="grid grid-cols-1 md:grid-cols-12 gap-4 items-end">
|
<form action="{{ route('sales.index') }}" method="GET" class="grid grid-cols-1 md:grid-cols-12 gap-4 items-end">
|
||||||
|
|
||||||
<div class="md:col-span-3">
|
<div class="md:col-span-3">
|
||||||
<label class="block text-xs text-gray-500 mb-1 uppercase font-bold tracking-wider">N° Venta</label>
|
<x-forms.label value="N° Venta"/>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
|
<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" fill="none" viewBox="0 0 20 20">
|
<svg class="w-4 h-4 text-gray-500" 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"/>
|
<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>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="search" value="{{ request('search') }}"
|
<x-forms.input type="text" name="search" value="{{ request('search') }}" class="ps-10" placeholder="Ej: 1420"/>
|
||||||
class="bg-neutral-800 border border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 ps-10 placeholder-gray-600"
|
|
||||||
placeholder="Ej: 1420">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-4">
|
<div class="md:col-span-4">
|
||||||
<label class="block text-xs text-gray-500 mb-1 uppercase font-bold tracking-wider">Cliente</label>
|
<x-forms.label value="Cliente"/>
|
||||||
<select name="client_id" class="w-full select2-filter">
|
<select name="client_id" class="w-full select2-filter">
|
||||||
<option value="">-- Todos --</option>
|
<option value="">-- Todos --</option>
|
||||||
@foreach($clients as $client)
|
@foreach($clients as $client)
|
||||||
@@ -32,25 +30,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<label class="block text-xs text-gray-500 mb-1 uppercase font-bold tracking-wider">Desde</label>
|
<x-forms.label value="Desde"/>
|
||||||
<input type="date" name="date_from" value="{{ request('date_from') }}"
|
<x-forms.input type="date" name="date_from" value="{{ request('date_from') }}"/>
|
||||||
class="bg-neutral-800 border border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="md:col-span-2">
|
<div class="md:col-span-2">
|
||||||
<label class="block text-xs text-gray-500 mb-1 uppercase font-bold tracking-wider">Hasta</label>
|
<x-forms.label value="Hasta"/>
|
||||||
<input type="date" name="date_to" value="{{ request('date_to') }}"
|
<x-forms.input type="date" name="date_to" value="{{ request('date_to') }}"/>
|
||||||
class="bg-neutral-800 border border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:col-span-1 flex gap-2">
|
<div class="md:col-span-1 flex gap-2">
|
||||||
<button type="submit" class="w-full bg-neon-lime hover:bg-[#b3e600] text-neutral-900 font-bold rounded-lg text-sm p-2.5 transition-colors shadow-lg shadow-neon-lime/20 flex items-center justify-center" title="Aplicar Filtros">
|
<button type="submit" class="w-full bg-neutral-900 hover:bg-neutral-800 text-neon-lime dark:bg-neon-lime dark:hover:bg-[#b3e600] dark:text-neutral-900 font-bold rounded-lg text-sm p-2.5 transition-colors shadow-lg dark:shadow-neon-lime/20 flex items-center justify-center" title="Aplicar Filtros">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@if(request()->hasAny(['search', 'client_id', 'date_from', 'date_to']))
|
@if(request()->hasAny(['search', 'client_id', 'date_from', 'date_to']))
|
||||||
<a href="{{ route('sales.index') }}" class="w-full bg-neutral-700 hover:bg-neutral-600 text-white font-bold rounded-lg text-sm p-2.5 flex items-center justify-center transition-colors" title="Limpiar Filtros">
|
<a href="{{ route('sales.index') }}" class="w-full hover:bg-red-600 hover:text-white text-red-600 border border-red-600 font-bold rounded-lg text-sm p-2.5 flex items-center justify-center transition-colors" title="Limpiar Filtros">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||||
</svg>
|
</svg>
|
||||||
@@ -61,14 +57,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end mb-6">
|
<div class="flex justify-end mb-6">
|
||||||
<a href="{{ route('sales.create') }}" class="px-6 py-2.5 bg-neutral-800 border border-neon-lime text-neon-lime hover:bg-neon-lime hover:text-neutral-900 font-bold rounded-lg transition-all shadow-lg shadow-neon-lime/10 flex items-center gap-2 transform hover:-translate-y-0.5">
|
<a href="{{ route('sales.create') }}" class="px-6 py-2.5 border bg-neon-lime border-neutral-900 text-neutral-900 hover:text-neon-lime hover:bg-neutral-900 dark:bg-neutral-800 dark:border-neon-lime dark:text-neon-lime hover:dark:bg-neon-lime hover:dark:text-neutral-900 font-bold rounded-lg transition-all shadow-lg dark:shadow-neon-lime/10 flex items-center gap-2">
|
||||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
|
||||||
Nueva Venta
|
Nueva Venta
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative overflow-x-auto shadow-md sm:rounded-lg border border-neutral-800 bg-panel-bg">
|
<div class="relative overflow-x-auto shadow-md sm:rounded-lg border border-gray-400 dark:border-neutral-800">
|
||||||
<table class="w-full text-sm text-left text-gray-400">
|
<table class="w-full text-sm text-left text-neutral-900 dark:text-white">
|
||||||
<thead class="text-xs text-gray-300 uppercase bg-neutral-800 border-b border-neutral-700">
|
<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>
|
<tr>
|
||||||
<th scope="col" class="px-6 py-3"># Ref</th>
|
<th scope="col" class="px-6 py-3"># Ref</th>
|
||||||
<th scope="col" class="px-6 py-3">Fecha</th>
|
<th scope="col" class="px-6 py-3">Fecha</th>
|
||||||
@@ -78,49 +74,48 @@
|
|||||||
<th scope="col" class="px-6 py-3 text-center">Acciones</th>
|
<th scope="col" class="px-6 py-3 text-center">Acciones</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-neutral-800">
|
<tbody>
|
||||||
@forelse($sales as $sale)
|
@forelse($sales as $sale)
|
||||||
<tr class="bg-neutral-900/50 hover:bg-neutral-800 transition-colors">
|
<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 font-mono font-bold">
|
||||||
<td class="px-6 py-4 font-mono text-white font-bold">
|
|
||||||
#{{ str_pad($sale->id, 5, '0', STR_PAD_LEFT) }}
|
#{{ str_pad($sale->id, 5, '0', STR_PAD_LEFT) }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4 text-gray-300">
|
<td class="px-6 py-4 text-gray-600 dark:text-gray-300">
|
||||||
{{ $sale->created_at->format('d/m/Y H:i') }}
|
{{ $sale->created_at->format('d/m/Y H:i') }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4">
|
<td class="px-6 py-4">
|
||||||
@if($sale->client)
|
@if($sale->client)
|
||||||
<div class="font-bold text-white">{{ $sale->client->name }}</div>
|
<div class="font-bold">{{ $sale->client->name }}</div>
|
||||||
<div class="text-xs text-gray-500">{{ $sale->client->phone ?? '' }}</div>
|
<div class="text-xs text-gray-700 dark:text-gray-400">{{ $sale->client->phone ?? '' }}</div>
|
||||||
@else
|
@else
|
||||||
<span class="italic text-gray-500">Consumidor Final</span>
|
<span class="italic text-gray-600 dark:text-gray-400">Consumidor Final</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4">
|
<td class="px-6 py-4">
|
||||||
@php
|
@php
|
||||||
$colors = [
|
$colors = [
|
||||||
'Efectivo' => 'text-green-400 bg-green-900/20 border-green-800',
|
'Efectivo' => 'text-white dark:text-green-400 bg-green-600/80 dark:bg-green-900/20 border-green-800',
|
||||||
'Transferencia' => 'text-blue-400 bg-blue-900/20 border-blue-800',
|
'Transferencia' => 'text-white dark:text-blue-400 bg-blue-600/80 dark:bg-blue-900/20 border-blue-800',
|
||||||
'Tarjeta de Débito' => 'text-purple-400 bg-purple-900/20 border-purple-800',
|
'Tarjeta de Débito' => 'text-white dark:text-purple-400 bg-purple-600/80 dark:bg-purple-900/20 border-purple-800',
|
||||||
'Tarjeta de Crédito' => 'text-orange-400 bg-orange-900/20 border-orange-800',
|
'Tarjeta de Crédito' => 'text-white dark:text-orange-400 bg-orange-600/80 dark:bg-orange-900/20 border-orange-800',
|
||||||
];
|
];
|
||||||
$badgeClass = $colors[$sale->payment_method] ?? 'text-gray-400 bg-gray-800 border-gray-700';
|
$badgeClass = $colors[$sale->payment_method] ?? 'bg-gray-400 dark:bg-gray-800 border-gray-700';
|
||||||
@endphp
|
@endphp
|
||||||
<span class="{{ $badgeClass }} border px-2.5 py-0.5 rounded text-xs font-medium">
|
<span class="{{ $badgeClass }} border px-2.5 py-0.5 rounded text-xs font-medium">
|
||||||
{{ $sale->payment_method }}
|
{{ $sale->payment_method }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4 text-right font-bold text-lg text-neon-lime">
|
<td class="px-6 py-4 text-right font-bold text-lg text-zinc-900 dark:text-neon-lime">
|
||||||
${{ number_format($sale->total, 2) }}
|
${{ number_format($sale->total, 2) }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="px-6 py-4 text-center">
|
<td class="px-6 py-4 text-center">
|
||||||
<a href="{{ route('sales.show', $sale) }}"
|
<a href="{{ route('sales.show', $sale) }}"
|
||||||
class="inline-flex items-center justify-center w-8 h-8 rounded bg-neutral-700 hover:bg-neutral-600 text-gray-300 hover:text-white transition-colors"
|
class="inline-flex items-center justify-center w-8 h-8 border-2 border-emerald-700 dark:border-green-600 rounded-4xl hover:bg-emerald-700 text-emerald-700 hover:dark:bg-green-600 dark:text-green-600 hover:text-white hover:dark:text-white transition-colors"
|
||||||
title="Ver Detalle">
|
title="Ver Detalle">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||||
@@ -143,8 +138,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4 w-full flex justify-center">
|
<div class="mt-4 w-full max-w-4xl">
|
||||||
{{ $sales->links() }}
|
{{ $sales->links() }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</x-layout>
|
</x-layout>
|
||||||
@@ -49,6 +49,3 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::patch('/{appointment}/status', 'updateStatus')->name('updateStatus');
|
Route::patch('/{appointment}/status', 'updateStatus')->name('updateStatus');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Route::get('/productos/{id}/vistaUsuario', [ProductosController::class,'vistaUsuario'])->name('productos.vistaUsuario');
|
|
||||||
Reference in New Issue
Block a user