Merge branch 'bryam' of https://github.com/BryamE/ProyectoLauck into giane

This commit is contained in:
Bryam105
2025-12-09 11:07:22 -03:30
27 changed files with 935 additions and 192 deletions
@@ -1,25 +0,0 @@
@props(['type' => 'dark'])
@php
switch ($type) {
case 'info':
$class = 'text-blue-800 bg-blue-50 dark:text-blue-400';
break;
case 'danger':
$class = 'text-red-800 bg-red-50 dark:text-red-400';
break;
case 'success':
$class = 'text-green-800 bg-green-50 dark:text-green-400';
break;
case 'warning':
$class = 'text-yellow-800 bg-yellow-50 dark:text-yellow-300';
break;
default:
$class = 'text-gray-800 bg-gray-50 dark:text-gray-300';
break;
}
@endphp
<div {{$attributes->merge(['class'=>'p-4 my-4 mx-auto text-md max-w-[80%] rounded-lg dark:bg-gray-800 '.$class])}} role="alert">
<span class="font-semibold">{{$title}}</span> {{$content}}
</div>
@@ -0,0 +1,7 @@
@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' : '')]) !!}>
@if($error)
<p class="mt-1 text-xs text-red-400">{{ $error }}</p>
@endif
@@ -0,0 +1,5 @@
@props(['value'])
<label {!! $attributes->merge(['class' => 'block mb-2 text-xs font-bold text-gray-400 uppercase tracking-wider']) !!}>
{{$value ?? $slot}}
</label>
@@ -0,0 +1,39 @@
@props(['disabled' => false, 'error' => null, 'options' => [], 'placeholder' => 'Seleccionar...'])
<!-- Contenedor relativo para posicionar la flecha personalizada si quisiéramos (opcional) -->
<div class="relative">
<select {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => '
appearance-none bg-transparent border-0 border-b-2 border-neutral-700 text-white text-sm
py-2.5 px-0 w-full focus:outline-none focus:ring-0 focus:border-neon-lime peer cursor-pointer
transition-colors' . ($error ? 'border-red-500 focus:border-red-500' : '')
]) !!}>
@if($placeholder)
<option value="" disabled selected class="bg-neutral-800 text-gray-500">{{ $placeholder }}</option>
@endif
{{ $slot }}
</select>
<!-- Flecha personalizada (SVG) posicionada a la derecha -->
<div class="absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none">
<svg class="w-4 h-4 text-gray-500 peer-focus:text-neon-lime transition-colors" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
<!-- Mensaje de error -->
@if($error)
<p class="mt-1 text-xs text-red-400">{{ $error }}</p>
@endif
</div>
{{--
NOTA DE ESTILO:
- `appearance-none`: Quita el estilo feo por defecto del navegador.
- `bg-transparent`: Fondo transparente para que se vea el color de fondo de tu web.
- `border-b-2`: Borde solo abajo (estilo línea).
- `focus:ring-0`: Quita el anillo azul de Chrome al hacer click.
- `peer`: Permite que el icono de la flecha cambie de color cuando el select tiene foco.
--}}
+4 -1
View File
@@ -36,7 +36,10 @@
</a>
</li>
<li>
<a href="#" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Taller</a>
<a href="#"
class="block py-2 px-3 md:p-0 transition-colors {{ request()->is('mantenimiento*') ? 'text-neon-lime border-b-2 border-neon-lime' : 'text-white hover:text-neon-lime' }}">
Taller
</a>
</li>
<li>
<a href="{{ route('sales.create') }}"
@@ -5,7 +5,7 @@
<h1 class="font-black text-4xl md:text-5xl text-white uppercase italic">
{{ $title }}
@if($highlight)
<span class="text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-500">{{ $highlight }}</span>
<span class="text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-500 pe-2">{{ $highlight }}</span>
@endif
</h1>
</div>
@@ -0,0 +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">
<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">
<span class="font-bold">Error:</span> {{ session('error') }}
</div>
@endif
@@ -0,0 +1,16 @@
@props(['color' => 'gray'])
@php
$colors = [
'gray' => 'bg-gray-700 text-gray-300',
'red' => 'bg-red-900/50 text-red-300 border border-red-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',
];
$classes = $colors[$color] ?? $colors['gray'];
@endphp
<span class="{{ $classes }} text-xs font-medium me-2 px-2.5 py-0.5 rounded border">
{{ $slot }}
</span>
-17
View File
@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>@yield('title','Lauck - Home')</title>
</head>
<body>
<header>Cabeza</header>
@yield('main')
<footer>Pies</footer>
</body>
</html>
+80 -10
View File
@@ -1,16 +1,11 @@
<x-appc>
<x-slot name="title">Lauck - Agregar</x-slot>
<x-slot name="navTitle">Agregar - Producto</x-slot>
{{-- <x-layout title="Lauck - Agregar">
@if ($errors->any())
<x-alert type="danger">
<x-slot name="title">Error: </x-slot>
<x-slot name="content">Todos los campos son obligatorios.</x-slot>
</x-alert>
@endif
<div class="w-full h-fit flex flex-col justify-start items-center gap-3 p-18">
<form class="w-lg mx-auto" action="{{route('productos.store')}}" method="POST">
@csrf
<x-forms.input></x-forms>
<div class="relative z-0 w-full mb-5 group">
<input type="text" value="{{old('nombre')}}" name="nombre" id="nombre" class="block py-2.5 px-0 w-full text-sm text-gray-300 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" "/>
<label for="nombre" class="peer-focus:font-medium absolute text-sm text-gray-300 dark:text-gray-300 duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:start-0 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Titulo</label>
@@ -58,4 +53,79 @@
</form>
</div>
</x-appc>
</x-layout> --}}
<x-layout title="Nuevo Producto">
<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">
<form action="{{ route('productos.store') }}" method="POST">
@csrf
<!-- Grid Layout -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<!-- Nombre (Ocupa 2 columnas) -->
<div class="md:col-span-2">
<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')" />
</div>
<!-- SKU -->
<div>
<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')" />
</div>
<!-- Tipo -->
<div>
<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">
<option value="accessory" {{ old('type') == 'accessory' ? 'selected' : '' }}>Accesorio / Repuesto</option>
<option value="bike" {{ old('type') == 'bike' ? 'selected' : '' }}>Bicicleta</option>
<option value="service" {{ old('type') == 'service' ? 'selected' : '' }}>Servicio / Mano de Obra</option>
</select>
</div>
<!-- Precios -->
<div>
<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')" />
</div>
<div>
<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')" />
</div>
<!-- Stock -->
<div>
<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')" />
</div>
<div>
<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 />
</div>
<!-- Descripción (2 columnas) -->
<div class="md:col-span-2">
<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>
</div>
</div>
<!-- Botones Acción -->
<div class="flex items-center 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">
Guardar Producto
</button>
</div>
</form>
</div>
</x-layout>
+91 -3
View File
@@ -1,4 +1,4 @@
<x-appc>
{{-- <x-appc>
<x-slot name="title">Lauck - Home - Productos</x-slot>
<x-slot name="navTitle">Productos</x-slot>
@@ -24,7 +24,7 @@
<tr class="bg-white border-b dark:bg-neutral-800 dark:border-neutral-700 border-neutral-200">
<th scope="row"
class="px-6 py-4 font-medium text-neutral-900 whitespace-nowrap dark:text-white">
<a href="{{route('productos.show',$prod)}}">{{ $prod->nombre }}</a>
<a href="{{route('productos.show',$prod)}}">{{ $prod->name }}</a>
</th>
<td class="px-6 py-4">{{ $prod->marca }}</td>
<td class="px-6 py-4">{{ $prod->modelo }}</td>
@@ -41,4 +41,92 @@
{{$products->links()}}
</div>
</x-appc>
</x-appc> --}}
<x-layout title="Stock - Lauck">
<x-section-header subtitle="Gestión de Inventario" title="Listado de " highlight="Productos" />
<!-- Mensajes de feedback -->
<x-ui.alert />
<!-- 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">
<!-- Buscador -->
<form action="{{ route('productos.index') }}" method="GET" class="w-full md:w-1/2">
<div class="relative">
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
<svg class="w-4 h-4 text-gray-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
<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"
placeholder="Buscar por nombre, SKU o marca...">
</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">
+ 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">
<tr>
<th scope="col" class="px-6 py-3">Producto / SKU</th>
<th scope="col" class="px-6 py-3">Tipo</th>
<th scope="col" class="px-6 py-3">Precio</th>
<th scope="col" class="px-6 py-3 text-center">Stock</th>
<th scope="col" class="px-6 py-3 text-right">Acciones</th>
</tr>
</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">
<div class="text-base font-bold">{{ $product->name }}</div>
<div class="text-xs text-gray-500 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>
@elseif($product->type === 'accessory') <x-ui.badge color="gray">Accesorio</x-ui.badge>
@else <x-ui.badge color="yellow">Servicio</x-ui.badge> @endif
</td>
<td class="px-6 py-4 font-mono text-white">
${{ number_format($product->price, 2) }}
</td>
<td class="px-6 py-4 text-center">
@if($product->type === 'service')
<span class="text-gray-600">-</span>
@elseif($product->stock_quantity <= $product->min_stock_alert)
<x-ui.badge color="red">{{ $product->stock_quantity }}</x-ui.badge>
@else
<x-ui.badge color="green">{{ $product->stock_quantity }}</x-ui.badge>
@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>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-6 py-10 text-center text-gray-500">
No se encontraron productos.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!-- Paginación -->
<div class="mt-4 w-full">
{{ $products->links() }}
</div>
</x-layout>
+46 -46
View File
@@ -1,53 +1,53 @@
<x-appc>
<x-slot name="title">Lauck - Vista - Producto</x-slot>
<x-slot name="navTitle">Producto - {{$producto->nombre}}</x-slot>
<x-layout title="Productos - Lauck">
<div class="w-full min-h-7/12 mx-auto px-4 my-5 flex flex-col gap-5 items-center justify-center">
<dl class="w-lg text-gray-900 dark:text-white *:border-b *:border-gray-200 *:dark:border-gray-400">
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Marca</dt>
<dd class="text-lg font-semibold">{{$producto->marca}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Modelo</dt>
<dd class="text-lg font-semibold">{{$producto->modelo}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Color</dt>
<dd class="text-lg font-semibold">{{$producto->color}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Rodado</dt>
<dd class="text-lg font-semibold">{{$producto->rodado}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Tipo</dt>
<dd class="text-lg font-semibold">{{$producto->tipo}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Descripcion</dt>
<dd class="text-lg font-semibold">{{$producto->descripcion}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Precio</dt>
<dd class="text-lg font-semibold">{{$producto->precio}}</dd>
</div>
</dl>
<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.edit',$producto)}}" 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',$producto)}}" 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>
<!-- Header -->
<x-section-header subtitle="Panel de Control" title="¡Bienvenido, " highlight="Jose!"/>
<div class="w-full min-h-7/12 mx-auto px-4 my-5 flex flex-col gap-5 items-center justify-center">
<dl class="w-lg text-gray-900 dark:text-white *:border-b *:border-gray-200 *:dark:border-gray-400">
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Marca</dt>
<dd class="text-lg font-semibold">{{$producto->marca}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Modelo</dt>
<dd class="text-lg font-semibold">{{$producto->modelo}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Color</dt>
<dd class="text-lg font-semibold">{{$producto->color}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Rodado</dt>
<dd class="text-lg font-semibold">{{$producto->rodado}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Tipo</dt>
<dd class="text-lg font-semibold">{{$producto->tipo}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Descripcion</dt>
<dd class="text-lg font-semibold">{{$producto->descripcion}}</dd>
</div>
<div class="flex flex-col pt-3">
<dt class="mb-1 text-gray-500 md:text-lg dark:text-gray-400">Precio</dt>
<dd class="text-lg font-semibold">{{$producto->precio}}</dd>
</div>
</dl>
<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.edit',$producto)}}" 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',$producto)}}" 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>
</x-appc>
</x-layout>
{{-- componente alerta --}}
{{-- <x-alert type="success">
+91
View File
@@ -0,0 +1,91 @@
<x-layout title="Nuevo Producto">
<x-section-header subtitle="Ventas" title="Registro de " :highlight="'ventas ' . ' '" />
<!-- Mensajes de feedback -->
<x-ui.alert />
<!-- 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">
<!-- Buscador -->
<form action="{{ url('sales') }}" method="GET" class="flex flex-row w-full max-w-3xl gap-4">
<div class="relative 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">
<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"
placeholder="Buscar por nombre, SKU o marca...">
</div>
<div class="w-1/3">
<x-forms.select id="type" name="type" :error="$errors->first('type')" placeholder="Filtro...">
<option value="bike" class="bg-neutral-800">Bicicleta</option>
<option value="accessory" class="bg-neutral-800">Accesorio</option>
<option value="service" class="bg-neutral-800">Servicio</option>
</x-forms.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">
+ Registrar Venta
</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">
<tr>
<th scope="col" class="px-6 py-3">ID Venta</th>
<th scope="col" class="px-6 py-3">Descripcion</th>
<th scope="col" class="px-6 py-3">Cant. Productos</th>
<th scope="col" class="px-6 py-3 text-center">Total Venta</th>
<th scope="col" class="px-6 py-3 text-right">Acciones</th>
</tr>
</thead>
<tbody>
@forelse($sales 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">
<div class="text-gray-500 font-mono">{{ $product->sku }}</div>
</td>
<td class="px-6 py-4 font-medium text-white whitespace-nowrap">
<div class="text-base font-bold">{{ $product->name }}</div>
</td>
<td class="px-6 py-4 font-mono text-white">
{{ $product->stock_quantity }}
</td>
<td class="px-6 py-4 font-mono text-white text-center">
${{ number_format(($product->price * 2), 2) }}
{{-- @if($product->type === 'service')
<span class="text-gray-600">-</span>
@elseif($product->stock_quantity <= $product->min_stock_alert)
<x-ui.badge color="red">{{ $product->stock_quantity }}</x-ui.badge>
@else
<x-ui.badge color="green">{{ $product->stock_quantity }}</x-ui.badge>
@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>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-6 py-10 text-center text-gray-500">
No se encontraron productos.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!-- Paginación -->
<div class="mt-4 w-full">
{{ $sales->links() }}
</div>
</x-layout>