STYLE:
- Continuo con la variante al modo claro.
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
@if ($products->count() > 0)
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
@foreach ($products as $product)
|
||||
<div class="group p-4 border bg-neutral-100/30 dark:bg-neutral-950/30 border-neutral-200 dark:border-neutral-800 rounded-xl hover:border-lime-500 hover:dark:border-neon-lime hover:-translate-y-1 transition-all duration-300">
|
||||
<div class="group p-4 border bg-stone-200/30 dark:bg-neutral-950/30 border-neutral-200 dark:border-neutral-800 rounded-xl hover:border-lime-500 hover:dark:border-neon-lime hover:-translate-y-1 transition-all duration-300">
|
||||
{{-- Imagen si existe --}}
|
||||
@if (!empty($product->image_path))
|
||||
<img src="{{ asset('storage/' . $product->image_path) }}" alt="{{ $product->name }}"
|
||||
class="w-full h-40 object-cover rounded mb-4">
|
||||
@else
|
||||
<div class="w-full border border-neutral-200 dark:border-neutral-800 h-40 bg-stone-100 dark:bg-stone-900 flex items-center justify-center rounded mb-4">
|
||||
<span class="text-lime-500 dark:text-neon-lime text-md uppercase font-bold">Sin imagen</span>
|
||||
<div class="w-full border border-neutral-200 dark:border-neutral-800 h-40 bg-stone-200 dark:bg-stone-900 flex items-center justify-center rounded mb-4">
|
||||
<span class="text-lime-800 dark:text-neon-lime text-md uppercase font-bold">Sin imagen</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
{{-- Descripción corta --}}
|
||||
<div class="h-10 overflow-y-auto [scrollbar-width:none]">
|
||||
@if (!empty($product->description))
|
||||
<p class="text-sm text-gray-400 mt-2">{{ $product->description }}</p>
|
||||
<p class="text-sm text-gray-700 dark:text-gray-400 mt-2">{{ $product->description }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Precio --}}
|
||||
@if (!empty($product->price))
|
||||
<p class="text-white group-hover:text-neon-lime font-bold mt-3 transition-colors">${{ number_format($product->price, 2, ',', '.') }}</p>
|
||||
<p class="text-neutral-900 dark:text-white group-hover:text-lime-700 group-hover:dark:text-neon-lime font-bold mt-3 transition-colors">${{ number_format($product->price, 2, ',', '.') }}</p>
|
||||
@endif
|
||||
|
||||
{{-- Botón --}}
|
||||
<a href="{{ route('catalogo.show', $product) }}"
|
||||
class="mt-4 block w-full bg-neon-lime/80 uppercase text-black font-semibold py-2 rounded-lg text-center shadow-md shadow-neon-lime/10 hover:bg-neutral-900/70 border border-transparent hover:text-neon-lime hover:shadow-neon-lime/20 hover:border-neutral-800 transition-all">
|
||||
class="mt-4 block w-full bg-neutral-900 dark:bg-neon-lime/80 uppercase text-neon-lime dark:text-black font-semibold py-2 rounded-lg text-center shadow-md shadow-gray-900/10 dark:shadow-neon-lime/10 hover:bg-neon-lime hover:dark:bg-neutral-900/70 border border-transparent hover:text-black hover:dark:text-neon-lime hover:border-black hover:dark:border-neon-lime transition-all">
|
||||
Ver +
|
||||
</a>
|
||||
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
<div class="container mx-auto px-4 py-8">
|
||||
|
||||
<!-- Botón Volver -->
|
||||
<a href="{{ route('catalogo.index') }}" class="inline-flex items-center text-gray-400 hover:text-white mb-6 transition-colors">
|
||||
<a href="{{ route('catalogo.index') }}" class="inline-flex items-center text-gray-700 dark:text-gray-400 hover:text-black hover:dark:text-white mb-6 transition-colors">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
||||
Volver al Catálogo
|
||||
</a>
|
||||
|
||||
<div class="bg-panel-bg rounded-xl shadow-2xl overflow-hidden border border-neutral-800">
|
||||
<div class="bg-slate-100 dark:bg-panel-bg rounded-xl shadow-2xl overflow-hidden border border-neutral-300 dark:border-neutral-800">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2">
|
||||
|
||||
<!-- COLUMNA IZQUIERDA: IMAGEN (El cuadro verde de tu ejemplo) -->
|
||||
<div class="bg-neutral-800 relative h-96 md:h-auto min-h-[500px] flex items-center justify-center py-4 group">
|
||||
<!-- PANEL IZQUIERDO -->
|
||||
<div class="bg-zinc-300 dark:bg-neutral-800 relative h-96 md:h-auto min-h-[500px] flex items-center justify-center py-4 group">
|
||||
|
||||
@if($product->image_path)
|
||||
<img src="{{ asset('storage/' . $product->image_path) }}"
|
||||
alt="{{ $product->name }}"
|
||||
class="w-full h-full object-contain max-h-[500px] transform drop-shadow-lg">
|
||||
@else
|
||||
<div class="text-neutral-700 flex flex-col items-center">
|
||||
<div class="text-neutral-400 dark:text-neutral-700 flex flex-col items-center">
|
||||
<svg class="w-48 h-48" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="0.5" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path></svg>
|
||||
<span class="mt-4 text-gray-500 text-sm uppercase tracking-widest">Sin Imagen</span>
|
||||
</div>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<!-- Badge de Tipo Flotante -->
|
||||
<div class="absolute top-6 left-6">
|
||||
<span class="bg-black/50 backdrop-blur text-white px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wide border border-white/10">
|
||||
<span class="bg-white/50 dark:bg-black/50 backdrop-blur text-black dark:text-white px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wide border border-black/40 dark:border-white/10">
|
||||
@if($product->type == 'bike')
|
||||
Bicicleta
|
||||
@elseif($product->type == 'clothing')
|
||||
@@ -42,34 +42,34 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- COLUMNA DERECHA: INFO (El cuadro azul de tu ejemplo) -->
|
||||
<div class="p-8 md:p-12 flex flex-col justify-center bg-panel-bg">
|
||||
<!-- PANEL DERECHO -->
|
||||
<div class="p-8 md:p-12 flex flex-col justify-center bg-neutral-200 dark:bg-panel-bg">
|
||||
|
||||
<!-- Encabezado -->
|
||||
<div class="mb-6 border-b border-neutral-800 pb-6">
|
||||
<p class="text-neon-lime text-sm font-bold uppercase tracking-widest mb-2">SKU: {{ $product->sku ?? 'N/A' }}</p>
|
||||
<h1 class="text-4xl font-black text-white italic mb-2 leading-tight">{{ $product->name }}</h1>
|
||||
<div class="mb-6 border-b border-neutral-400 dark:border-neutral-700 pb-6">
|
||||
<p class="text-stone-500 dark:text-neon-lime text-sm font-bold uppercase tracking-widest mb-2">SKU: {{ $product->sku ?? 'N/A' }}</p>
|
||||
<h1 class="text-4xl font-black text-black dark:text-white italic mb-2 leading-tight">{{ $product->name }}</h1>
|
||||
|
||||
<!-- Stock Status -->
|
||||
<div class="flex items-center gap-2 mt-4">
|
||||
@if($product->stock_quantity > 5)
|
||||
<span class="w-3 h-3 bg-green-500 rounded-full animate-pulse"></span>
|
||||
<span class="text-green-400 text-sm font-bold">En Stock ({{ $product->stock_quantity }} unid.)</span>
|
||||
<span class="w-3 h-3 bg-green-600 dark:bg-green-400 rounded-full animate-pulse"></span>
|
||||
<span class="text-green-700 dark:text-green-400 text-sm font-bold">En Stock ({{ $product->stock_quantity }} unid.)</span>
|
||||
@elseif($product->stock_quantity > 0)
|
||||
<span class="w-3 h-3 bg-yellow-500 rounded-full animate-pulse"></span>
|
||||
<span class="text-yellow-400 text-sm font-bold">¡Últimas Unidades! ({{ $product->stock_quantity }})</span>
|
||||
<span class="w-3 h-3 bg-yellow-600 dark:bg-yellow-400 rounded-full animate-pulse"></span>
|
||||
<span class="text-yellow-900 dark:text-yellow-400 text-sm font-bold">¡Últimas Unidades! ({{ $product->stock_quantity }})</span>
|
||||
@else
|
||||
<span class="w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
<span class="text-red-400 text-sm font-bold">Agotado</span>
|
||||
<span class="text-red-700 dark:text-red-400 text-sm font-bold">Agotado</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Precio -->
|
||||
<div class="mb-8">
|
||||
<span class="block text-gray-400 text-xs uppercase mb-1">Precio Contado</span>
|
||||
<span class="block text-gray-700 dark:text-gray-400 text-xs uppercase mb-1">Precio Contado</span>
|
||||
<div class="flex items-baseline gap-2">
|
||||
<span class="text-5xl font-black text-white">${{ number_format($product->price, 0, ',', '.') }}</span>
|
||||
<span class="text-5xl font-black text-black dark:text-white">${{ number_format($product->price, 0, ',', '.') }}</span>
|
||||
<span class="text-gray-500 font-medium">ARG</span>
|
||||
</div>
|
||||
<p class="text-gray-500 text-xs mt-2">* Consultar financiación en el local.</p>
|
||||
@@ -77,20 +77,20 @@
|
||||
|
||||
<!-- Descripción -->
|
||||
<div class="mb-8">
|
||||
<h3 class="text-white font-bold uppercase text-sm mb-3">Descripción</h3>
|
||||
<p class="text-gray-400 leading-relaxed">
|
||||
<h3 class="text-black dark:text-white font-bold uppercase text-sm mb-3">Descripción</h3>
|
||||
<p class="text-gray-700 dark:text-gray-400 leading-relaxed">
|
||||
{{ $product->description ?? 'Sin descripción detallada disponible para este producto. Por favor, acérquese al local para más información.' }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Botones de Acción -->
|
||||
<div class="mt-auto grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<button class="bg-neon-lime text-neutral-900 font-black py-4 px-6 rounded-lg hover:bg-[#b3e600] transition-all uppercase tracking-wide shadow-lg shadow-neon-lime/20 flex items-center justify-center gap-2 transform hover:-translate-y-1">
|
||||
<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">
|
||||
<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
|
||||
</button>
|
||||
|
||||
<a href="https://wa.me/?text=Hola,%20me%20interesa%20el%20producto:%20{{ $product->name }}" target="_blank" class="bg-neutral-800 text-white font-bold py-4 px-6 rounded-lg hover:bg-neutral-700 border border-neutral-700 transition-all uppercase tracking-wide flex items-center justify-center gap-2">
|
||||
<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">
|
||||
<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
|
||||
</a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@props(['disabled' => false, 'error' => null])
|
||||
|
||||
<input {{ $disabled ? 'disabled' : ''}} {!! $attributes->merge(['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 transition-colors ' . ($error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : '')]) !!}>
|
||||
<input {{ $disabled ? 'disabled' : ''}} {!! $attributes->merge(['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 transition-colors ' . ($error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : '')]) !!}>
|
||||
|
||||
@if($error)
|
||||
<p class="mt-1 text-xs text-red-400">{{ $error }}</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@props(['value'])
|
||||
|
||||
<label {!! $attributes->merge(['class' => 'block mb-2 text-xs font-bold text-gray-400 uppercase tracking-wider']) !!}>
|
||||
<label {!! $attributes->merge(['class' => 'block mb-2 text-xs font-bold text-gray-700 dark:text-gray-300 uppercase tracking-wider']) !!}>
|
||||
{{$value ?? $slot}}
|
||||
</label>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@if (session('success'))
|
||||
<div class="p-4 mb-4 text-sm text-green-400 rounded-lg bg-neutral-800 border border-green-800/50" role="alert">
|
||||
<div class="p-4 mb-4 text-md text-black rounded-lg bg-green-500 border border-green-800/50" role="alert">
|
||||
<span class="font-bold">¡Éxito!</span> {{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="p-4 mb-4 text-sm text-red-400 rounded-lg bg-neutral-800 border border-red-800/50" role="alert">
|
||||
<div class="p-4 mb-4 text-md text-black rounded-lg bg-red-500 border border-red-800/50" role="alert">
|
||||
<span class="font-bold">Error:</span> {{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
@php
|
||||
$colors = [
|
||||
'gray' => 'bg-gray-700 text-gray-300',
|
||||
'red' => 'bg-red-900/50 text-red-300 border border-red-800',
|
||||
'blue' => 'bg-blue-900/50 text-blue-300 border border-blue-800',
|
||||
'green' => 'bg-green-900/50 text-green-300 border border-green-800',
|
||||
'yellow' => 'bg-yellow-900/50 text-yellow-300 border border-yellow-800',
|
||||
'neon' => 'bg-[#ccff00]/10 text-[#ccff00] border border-[#ccff00]/50',
|
||||
'gray' => 'bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-300',
|
||||
'red' => 'bg-red-200 dark:bg-red-900/50 text-red-800 dark:text-red-300 border border-red-500 dark:border-red-800',
|
||||
'blue' => 'bg-blue-200 dark:bg-blue-900/50 text-blue-800 dark:text-blue-300 border border-blue-500 dark:border-blue-800',
|
||||
'green' => 'bg-green-200 dark:bg-green-900/50 text-green-800 dark:text-green-300 border border-green-500 dark:border-green-800',
|
||||
'yellow' => 'bg-yellow-200 dark:bg-yellow-900/50 text-yellow-800 dark:text-yellow-300 border border-yellow-500 dark:border-yellow-800',
|
||||
'neon' => 'bg-lime-200 dark:bg-[#ccff00]/10 text-lime-800 dark:text-[#ccff00] border border-lime-700 dark:border-[#ccff00]/50',
|
||||
];
|
||||
$classes = $colors[$color] ?? $colors['gray'];
|
||||
@endphp
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
@props(['href' => '#', 'title', 'description', 'linkText' => 'Ver detalles'])
|
||||
|
||||
<a href="{{ $href }}" class="group relative block p-6 bg-panel-bg border border-neutral-800 rounded-xl hover:border-neon-lime hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-neon-lime/20 h-full">
|
||||
<a href="{{ $href }}" class="group relative block p-6 bg-white dark:bg-panel-bg border border-neutral-200 dark:border-neutral-800 rounded-xl hover:border-neutral-600 hover:dark:border-neon-lime hover:-translate-y-1 transition-all duration-300 shadow-lg hover:dark:shadow-neon-lime/20 h-full">
|
||||
<!-- slot para SVG -->
|
||||
<div class="absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-100 transition-opacity">
|
||||
<div class="absolute top-0 right-0 p-4 opacity-30 dark:opacity-10 group-hover:opacity-100 transition-opacity">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
<h3 class="mt-4 text-xl font-bold text-white group-hover:text-neon-lime transition-colors">{{ $title }}</h3>
|
||||
<p class="mt-2 text-sm text-gray-500">{{ $description }}</p>
|
||||
<h3 class="mt-4 text-xl font-bold text-black dark:text-white group-hover:text-lime-500 group-hover:dark:text-neon-lime transition-colors">{{ $title }}</h3>
|
||||
<p class="mt-2 text-sm text-gray-700 dark:text-gray-500">{{ $description }}</p>
|
||||
|
||||
<div class="mt-6 inline-flex items-center text-xs font-bold text-neon-lime uppercase tracking-wider">
|
||||
<div class="mt-6 inline-flex items-center text-xs font-bold text-lime-500 dark:text-neon-lime uppercase tracking-wider">
|
||||
{{ $linkText }} <span class="ml-2 group-hover:translate-x-1 transition-transform">→</span>
|
||||
</div>
|
||||
</a>
|
||||
@@ -11,43 +11,43 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 w-full mb-12">
|
||||
<!-- Tarjeta Catálogo -->
|
||||
<x-ui.card href="{{ url('/catalogo') }}" title="Catálogo" description="Ver productos." linkText="Ir al catalogo">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" /></svg>
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" /></svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Clientes -->
|
||||
<x-ui.card href="{{ url('/clients') }}" title="Clientes" description="Base de datos de ciclistas." linkText="Ver Clientes">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Ventas -->
|
||||
<x-ui.card href="{{ url('/sales') }}" title="Ventas" description="Registro de Ventas" linkText="Ver Ventas">
|
||||
<svg class="w-14 h-14 text-neon-lime" viewBox="0 0 24 24">
|
||||
<svg class="w-14 h-14 text-lime-500 dark:text-neon-lime" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.6 16.733c.234.269.548.456.895.534a1.4 1.4 0 0 0 1.75-.762c.172-.615-.446-1.287-1.242-1.481-.796-.194-1.41-.861-1.241-1.481a1.4 1.4 0 0 1 1.75-.762c.343.077.654.26.888.524m-1.358 4.017v.617m0-5.939v.725M4 15v4m3-6v6M6 8.5 10.5 5 14 7.5 18 4m0 0h-3.5M18 4v3m2 8a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"></path>
|
||||
</svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Taller -->
|
||||
<x-ui.card href="{{ url('/taller') }}" title="Taller" description="Gestión de services y reparaciones." linkText="Ver agenda">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24">
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linejoin="round" stroke-width="1.5" d="M7.58209 8.96025 9.8136 11.1917l-1.61782 1.6178c-1.08305-.1811-2.23623.1454-3.07364.9828-1.1208 1.1208-1.32697 2.8069-.62368 4.1363.14842.2806.42122.474.73509.5213.06726.0101.1347.0133.20136.0098-.00351.0666-.00036.1341.00977.2013.04724.3139.24069.5867.52125.7351 1.32944.7033 3.01552.4971 4.13627-.6237.8375-.8374 1.1639-1.9906.9829-3.0736l4.8107-4.8108c1.0831.1811 2.2363-.1454 3.0737-.9828 1.1208-1.1208 1.3269-2.80688.6237-4.13632-.1485-.28056-.4213-.474-.7351-.52125-.0673-.01012-.1347-.01327-.2014-.00977.0035-.06666.0004-.13409-.0098-.20136-.0472-.31386-.2406-.58666-.5212-.73508-1.3294-.70329-3.0155-.49713-4.1363.62367-.8374.83741-1.1639 1.9906-.9828 3.07365l-1.7788 1.77875-2.23152-2.23148-1.41419 1.41424Zm1.31056-3.1394c-.04235-.32684-.24303-.61183-.53647-.76186l-1.98183-1.0133c-.38619-.19746-.85564-.12345-1.16234.18326l-.86321.8632c-.3067.3067-.38072.77616-.18326 1.16235l1.0133 1.98182c.15004.29345.43503.49412.76187.53647l1.1127.14418c.3076.03985.61628-.06528.8356-.28461l.86321-.8632c.21932-.21932.32446-.52801.2846-.83561l-.14417-1.1127ZM19.4448 16.4052l-3.1186-3.1187c-.7811-.781-2.0474-.781-2.8285 0l-.1719.172c-.7811.781-.7811 2.0474 0 2.8284l3.1186 3.1187c.7811.781 2.0474.781 2.8285 0l.1719-.172c.7811-.781.7811-2.0474 0-2.8284Z"/>
|
||||
</svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Productos -->
|
||||
<x-ui.card href="{{ url('/productos') }}" title="Stock" description="Administrar bicicletas y repuestos." linkText="Ir al stock">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" /></svg>
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" /></svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Proveedores -->
|
||||
<x-ui.card href="#" title="Proveedores" description="Base de datos de proveedores." linkText="Ver Proveedores">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
||||
</svg>
|
||||
</x-ui.card>
|
||||
|
||||
<!-- Tarjeta Compras -->
|
||||
<x-ui.card href="#" title="Gastos" description="Registro de compras y pedidos a proovedores." linkText="Ver Gastos">
|
||||
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24">
|
||||
<svg class="w-12 h-12 text-lime-500 dark:text-neon-lime" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 4h3a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3m0 3h6m-3 5h3m-6 0h.01M12 16h3m-6 0h.01M10 3v4h4V3h-4Z"/>
|
||||
</svg>
|
||||
</x-ui.card>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<x-section-header subtitle="Inventario" title="Nuevo " 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.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@@ -25,7 +25,7 @@
|
||||
<!-- Tipo -->
|
||||
<div class="md:col-span-2">
|
||||
<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" {{ old('type') == 'accessory' ? 'selected' : '' }}>Accesorio</option>
|
||||
<option value="bike" {{ old('type') == 'bike' ? 'selected' : '' }}>Bicicleta</option>
|
||||
<option value="clothing" {{ old('type') == 'clothing' ? 'selected' : '' }}>Indumentaria</option>
|
||||
@@ -58,22 +58,22 @@
|
||||
<!-- Descripción (2 columnas) -->
|
||||
<div class="md:col-span-4">
|
||||
<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">{{ 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 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 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-neon-lime file:text-neutral-900 hover:file:bg-[#b3e600]
|
||||
<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]
|
||||
" :error="$errors->first('image')"/>
|
||||
{{-- @error('image') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Botones Acción -->
|
||||
<div class="flex items-center justify-between md:justify-end space-x-4 border-t border-neutral-800 pt-6">
|
||||
<a href="{{ route('productos.index') }}" class="text-gray-400 hover: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">
|
||||
<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>
|
||||
<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
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -12,36 +12,36 @@
|
||||
<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="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, SKU o marca...">
|
||||
</div>
|
||||
<!-- Filtro de Estado de Stock -->
|
||||
<div class="w-full sm:w-1/3">
|
||||
<select name="stock_status" onchange="this.form.submit()"
|
||||
class="block w-full p-3 text-sm text-white border border-neutral-700 rounded-lg bg-neutral-800 focus:ring-neon-lime focus:border-neon-lime cursor-pointer">
|
||||
class="block w-full p-3 text-sm text-black dark:text-white border border-neutral-300 dark:border-neutral-700 rounded-lg bg-neutral-200 dark:bg-neutral-800 focus:ring-neon-lime focus:border-neon-lime cursor-pointer">
|
||||
<option value="">Todos</option>
|
||||
<option value="low" {{ request('stock_status') == 'low' ? 'selected' : '' }} class="text-red-300">Stock en Alerta</option>
|
||||
<option value="medium" {{ request('stock_status') == 'medium' ? 'selected' : '' }} class="text-yellow-300">Stock Bajo</option>
|
||||
<option value="ok" {{ request('stock_status') == 'ok' ? 'selected' : '' }} class="text-green-300">Stock Normal</option>
|
||||
<option value="low" {{ request('stock_status') == 'low' ? 'selected' : '' }} class="text-red-600 dark:text-red-300">Stock en Alerta</option>
|
||||
<option value="medium" {{ request('stock_status') == 'medium' ? 'selected' : '' }} class="text-yellow-600 dark:text-yellow-300">Stock Bajo</option>
|
||||
<option value="ok" {{ request('stock_status') == 'ok' ? 'selected' : '' }} class="text-green-600 dark:text-green-300">Stock Normal</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- 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-neutral-900 bg-neon-lime rounded-lg hover: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 hover:dark:bg-[#b3e600] transition-colors uppercase tracking-wide">
|
||||
+ Nuevo Producto
|
||||
</a>
|
||||
</div>
|
||||
<!-- Tabla de Productos -->
|
||||
<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">Producto / SKU</th>
|
||||
<th scope="col" class="px-6 py-3">Tipo</th>
|
||||
@@ -52,10 +52,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($products as $product)
|
||||
<tr class="bg-neutral-900/50 border-b border-neutral-800 hover:bg-neutral-800 transition-colors group">
|
||||
<td class="px-6 py-4 font-medium text-white whitespace-nowrap">
|
||||
<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-medium whitespace-nowrap">
|
||||
<div class="text-base font-bold">{{ $product->name }}</div>
|
||||
<div class="text-xs text-gray-500 font-mono">{{ $product->sku }}</div>
|
||||
<div class="text-xs text-gray-600 dark:text-gray-400 font-mono">{{ $product->sku }}</div>
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
@if($product->type === 'bike') <x-ui.badge color="neon">Bicicleta</x-ui.badge>
|
||||
@@ -63,7 +63,7 @@
|
||||
@elseif($product->type === 'spare') <x-ui.badge color="gray">Repuesto</x-ui.badge>
|
||||
@else <x-ui.badge color="yellow">Accesorio</x-ui.badge> @endif
|
||||
</td>
|
||||
<td class="px-6 py-4 font-mono text-white">
|
||||
<td class="px-6 py-4 font-mono">
|
||||
${{ number_format($product->price, 2) }}
|
||||
</td>
|
||||
<td class="px-6 py-4 text-center">
|
||||
@@ -76,7 +76,7 @@
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-4 text-right">
|
||||
<a href="{{ route('productos.edit', $product) }}" class="font-medium text-blue-400 hover:underline mr-3">Editar</a>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
|
||||
Reference in New Issue
Block a user