CambiosRevision
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<x-section-header subtitle="Taller" title="Nueva " highlight="Orden de Reparación" />
|
||||
|
||||
<x-ui.alert />
|
||||
|
||||
|
||||
@if($errors->any())
|
||||
<div class="w-120 bg-red-900/50 border border-red-500 text-red-300 px-4 py-3 rounded-lg mb-6 shadow-sm">
|
||||
@@ -14,19 +14,19 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="max-w-5xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
|
||||
<div class="max-w-5xl mx-auto bg-white dark:bg-panel-bg border border-gray-300 dark:border-neutral-800 rounded-xl p-8 shadow-lg">
|
||||
<form action="{{ route('taller.store') }}" method="POST" class="space-y-8" id="taller-form">
|
||||
@csrf
|
||||
|
||||
<!-- 1. Datos del Cliente -->
|
||||
<div class="border-b border-neutral-800 pb-6">
|
||||
<h3 class="text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-neutral-800 text-neon-lime px-2 py-0.5 rounded text-xs">1</span> Cliente
|
||||
<div class="border-b border-gray-300 dark:border-neutral-800 pb-6">
|
||||
<h3 class="text-gray-900 dark:text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-gray-200 dark:bg-neutral-800 text-green-600 dark:text-neon-lime px-2 py-0.5 rounded text-xs">1</span> Cliente
|
||||
</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Propietario</label>
|
||||
<select name="client_id" class="w-full bg-neutral-900 border border-neutral-700 text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-2">Propietario</label>
|
||||
<select name="client_id" class="w-full bg-gray-50 dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
<option value="" disabled {{ !request('new_client_id') ? 'selected' : '' }}>-- Seleccione un propietario --</option>
|
||||
@foreach($clients as $client)
|
||||
|
||||
@@ -38,41 +38,41 @@
|
||||
<a href="{{ route('clients.create', ['origin' => 'taller']) }}" class="text-xs text-neon-lime hover:underline mt-1 inline-block">+ Nuevo Cliente</a>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Teléfono Aviso</label>
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-2">Teléfono Aviso</label>
|
||||
|
||||
<input type="text" name="contact_phone" value="{{ request('new_client_phone') }}" placeholder="Ingresar numero de telefono" class="w-full bg-neutral-900 border border-neutral-700 text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
<input type="text" name="contact_phone" value="{{ request('new_client_phone') }}" placeholder="Ingresar numero de telefono" class="w-full bg-gray-50 dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 2. Diagnóstico y Repuestos -->
|
||||
<div class="border-b border-neutral-800 pb-6">
|
||||
<h3 class="text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-neutral-800 text-neon-lime px-2 py-0.5 rounded text-xs">2</span> Diagnóstico y Repuestos
|
||||
<div class="border-b border-gray-300 dark:border-neutral-800 pb-6">
|
||||
<h3 class="text-gray-900 dark:text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-gray-200 dark:bg-neutral-800 text-green-600 dark:text-neon-lime px-2 py-0.5 rounded text-xs">2</span> Diagnóstico y Repuestos
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Columna Izquierda: Datos Bici -->
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Modelo de Bici / Color</label>
|
||||
<input type="text" name="bike_model" required placeholder="Ej: Venzo Loki Roja R29" class="w-full bg-neutral-900 border border-neutral-700 text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-2">Modelo de Bici / Color</label>
|
||||
<input type="text" name="bike_model" required placeholder="Ej: Venzo Loki Roja R29" class="w-full bg-gray-50 dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Problema / Servicio</label>
|
||||
<textarea name="problem_description" rows="3" required class="w-full bg-neutral-900 border border-neutral-700 text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime" placeholder="Ej: Service completo, hace ruido la caja..."></textarea>
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-2">Problema / Servicio</label>
|
||||
<textarea name="problem_description" rows="3" required class="w-full bg-gray-50 dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime" placeholder="Ej: Service completo, hace ruido la caja..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Columna Derecha: Selector de Repuestos -->
|
||||
<div class="bg-neutral-900/50 p-4 rounded-xl border border-neutral-800">
|
||||
<label class="block text-xs font-bold text-neon-lime uppercase mb-2">Agregar Repuestos / Servicios</label>
|
||||
<div class="bg-gray-100 dark:bg-neutral-900/50 p-4 rounded-xl border border-gray-300 dark:border-neutral-800">
|
||||
<label class="block text-xs font-bold text-green-600 dark:text-neon-lime uppercase mb-2">Agregar Repuestos / Servicios</label>
|
||||
|
||||
<!-- Buscador -->
|
||||
<div class="relative mb-3">
|
||||
<input type="text" id="part-search" class="w-full bg-neutral-800 border border-neutral-700 text-white rounded-lg p-2 text-sm focus:ring-neon-lime focus:border-neon-lime" placeholder="Buscar repuesto..." autocomplete="off">
|
||||
<input type="text" id="part-search" class="w-full bg-white dark:bg-neutral-800 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2 text-sm focus:ring-neon-lime focus:border-neon-lime" placeholder="Buscar repuesto..." autocomplete="off">
|
||||
<!-- Lista desplegable de sugerencias -->
|
||||
<div id="suggestions-box" class="absolute left-0 right-0 z-50 bg-neutral-800 border border-neutral-600 rounded-b-lg shadow-xl max-h-40 overflow-y-auto hidden"></div>
|
||||
<div id="suggestions-box" class="absolute left-0 right-0 z-50 bg-white dark:bg-neutral-800 border border-gray-300 dark:border-neutral-600 rounded-b-lg shadow-xl max-h-40 overflow-y-auto hidden"></div>
|
||||
</div>
|
||||
|
||||
<!-- Lista Visual de Seleccionados -->
|
||||
@@ -88,29 +88,29 @@
|
||||
|
||||
<!-- 3. Agenda y Costos -->
|
||||
<div>
|
||||
<h3 class="text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-neutral-800 text-neon-lime px-2 py-0.5 rounded text-xs">3</span> Acuerdo
|
||||
<h3 class="text-gray-900 dark:text-white font-bold uppercase tracking-wider text-sm mb-4 flex items-center gap-2">
|
||||
<span class="bg-gray-200 dark:bg-neutral-800 text-green-600 dark:text-neon-lime px-2 py-0.5 rounded text-xs">3</span> Acuerdo
|
||||
</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-end">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Fecha Prometida / Retiro</label>
|
||||
<input type="datetime-local" name="scheduled_at" required class="w-full bg-neutral-900 border border-neutral-700 text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-2">Fecha Prometida / Retiro</label>
|
||||
<input type="datetime-local" name="scheduled_at" required class="w-full bg-gray-50 dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg p-2.5 focus:ring-neon-lime focus:border-neon-lime">
|
||||
</div>
|
||||
|
||||
<div class="bg-neutral-800 p-4 rounded-lg border border-neutral-700">
|
||||
<label class="block text-xs font-bold text-gray-400 uppercase mb-1">Presupuesto Estimado</label>
|
||||
<div class="bg-gray-100 dark:bg-neutral-800 p-4 rounded-lg border border-gray-300 dark:border-neutral-700">
|
||||
<label class="block text-xs font-bold text-gray-600 dark:text-gray-400 uppercase mb-1">Presupuesto Estimado</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-gray-500">$</span>
|
||||
<!-- Input de costo: Se autocalcula pero el usuario puede editarlo manualmente -->
|
||||
<input type="number" id="estimated_cost" name="estimated_cost" step="0.01" class="w-full bg-transparent border-0 text-white text-2xl font-black focus:ring-0 p-0" placeholder="0.00">
|
||||
<input type="number" id="estimated_cost" name="estimated_cost" step="0.01" class="w-full bg-transparent border-0 text-gray-900 dark:text-white text-2xl font-black focus:ring-0 p-0" placeholder="0.00">
|
||||
</div>
|
||||
<p class="text-[10px] text-gray-500 mt-1">* Calculado automáticamente según repuestos. Editable.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end pt-4 border-t border-neutral-800">
|
||||
<a href="{{ route('taller.index') }}" class="mr-4 px-6 py-3 text-gray-400 hover:text-white font-medium">Cancelar</a>
|
||||
<div class="flex justify-end pt-4 border-t border-gray-300 dark:border-neutral-800">
|
||||
<a href="{{ route('taller.index') }}" class="mr-4 px-6 py-3 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white font-medium">Cancelar</a>
|
||||
<button type="submit" class="px-8 py-3 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] uppercase tracking-wide shadow-lg shadow-neon-lime/20">
|
||||
Ingresar Bicicleta
|
||||
</button>
|
||||
@@ -154,10 +154,10 @@
|
||||
if (matches.length > 0) {
|
||||
matches.forEach(p => {
|
||||
html += `
|
||||
<div class="p-2 hover:bg-neutral-700 cursor-pointer text-xs text-white border-b border-neutral-700 last:border-0 suggestion-item flex justify-between items-center"
|
||||
<div class="p-2 hover:bg-gray-100 dark:hover:bg-neutral-700 cursor-pointer text-xs text-gray-900 dark:text-white border-b border-gray-200 dark:border-neutral-700 last:border-0 suggestion-item flex justify-between items-center"
|
||||
data-id="${p.id}" data-name="${p.name}" data-price="${p.price}">
|
||||
<span>${p.name}</span>
|
||||
<span class="text-neon-lime font-mono">$${p.price}</span>
|
||||
<span class="text-green-600 dark:text-neon-lime font-mono">$${p.price}</span>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
@@ -215,8 +215,8 @@
|
||||
|
||||
// Visual
|
||||
$container.append(`
|
||||
<div class="flex justify-between items-center bg-neutral-800 p-2 rounded border border-neutral-700 text-xs">
|
||||
<div class="text-white">
|
||||
<div class="flex justify-between items-center bg-gray-100 dark:bg-neutral-800 p-2 rounded border border-gray-300 dark:border-neutral-700 text-xs">
|
||||
<div class="text-gray-900 dark:text-white">
|
||||
${p.name}
|
||||
<span class="text-gray-500 ml-1">($${p.price})</span>
|
||||
</div>
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
|
||||
<x-section-header subtitle="Gestión" title="Tablero de " highlight="Taller" />
|
||||
|
||||
@if(session('success'))
|
||||
<div class="bg-green-900/50 border border-green-500 text-green-300 px-4 py-3 rounded-lg mb-6 shadow-sm">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="flex w-full justify-end items-end mb-4 gap-x-2">
|
||||
<a href="{{ route('agenda') }}"
|
||||
@@ -26,22 +22,45 @@
|
||||
bg-stone-100 border-stone-300
|
||||
dark:bg-neutral-900/50 dark:border-neutral-800">
|
||||
|
||||
<div class="p-4 flex justify-between items-center border-b rounded-t-xl
|
||||
bg-stone-200/50 border-stone-300
|
||||
dark:bg-neutral-800/50 dark:border-neutral-800">
|
||||
<h3 class="font-bold uppercase tracking-widest text-xs text-red-600 dark:text-gray-300">
|
||||
🔴 Pendientes / A Revisar
|
||||
</h3>
|
||||
<span class="text-xs px-2 py-1 rounded-full bg-stone-300 text-stone-700 dark:bg-neutral-900 dark:text-gray-400">
|
||||
{{ $pending->count() }}
|
||||
</span>
|
||||
<!-- COLUMNA 1 -->
|
||||
<div class="flex-1 min-w-[300px] bg-gray-50 dark:bg-neutral-900/50 border border-gray-300 dark:border-neutral-800 rounded-xl flex flex-col">
|
||||
<div class="p-4 border-b border-gray-300 dark:border-neutral-800 bg-gray-200 dark:bg-neutral-800/50 rounded-t-xl flex justify-between items-center">
|
||||
<h3 class="font-bold text-gray-800 dark:text-gray-300 uppercase tracking-widest text-xs">🔴 Pendientes / A Revisar</h3>
|
||||
<span class="bg-gray-300 dark:bg-neutral-900 text-gray-700 dark:text-gray-400 text-xs px-2 py-1 rounded-full">{{ $pending->count() }}</span>
|
||||
</div>
|
||||
<div class="p-4 space-y-4 overflow-y-auto flex-1 custom-scrollbar">
|
||||
@foreach($pending as $job)
|
||||
<x-taller-card :job="$job" color="red" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-4 space-y-4 overflow-y-auto flex-1 custom-scrollbar">
|
||||
@foreach($pending as $job)
|
||||
<x-taller-card :job="$job" color="red" />
|
||||
@endforeach
|
||||
<!-- COLUMNA 2 -->
|
||||
<div class="flex-1 min-w-[300px] bg-gray-50 dark:bg-neutral-900/50 border border-gray-300 dark:border-neutral-800 rounded-xl flex flex-col">
|
||||
<div class="p-4 border-b border-gray-300 dark:border-neutral-800 bg-gray-200 dark:bg-neutral-800/50 rounded-t-xl flex justify-between items-center">
|
||||
<h3 class="font-bold text-yellow-600 dark:text-yellow-500 uppercase tracking-widest text-xs">🟡 En Reparación</h3>
|
||||
<span class="bg-gray-300 dark:bg-neutral-900 text-gray-700 dark:text-gray-400 text-xs px-2 py-1 rounded-full">{{ $inProgress->count() }}</span>
|
||||
</div>
|
||||
<div class="p-4 space-y-4 overflow-y-auto flex-1 custom-scrollbar">
|
||||
@foreach($inProgress as $job)
|
||||
<x-taller-card :job="$job" color="yellow" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- COLUMNA 3 -->
|
||||
<div class="flex-1 min-w-[300px] bg-gray-50 dark:bg-neutral-900/50 border border-gray-300 dark:border-neutral-800 rounded-xl flex flex-col">
|
||||
<div class="p-4 border-b border-gray-300 dark:border-neutral-800 bg-gray-200 dark:bg-neutral-800/50 rounded-t-xl flex justify-between items-center">
|
||||
<h3 class="font-bold text-green-600 dark:text-neon-lime uppercase tracking-widest text-xs">🟢 Listas para Retirar</h3>
|
||||
<span class="bg-gray-300 dark:bg-neutral-900 text-gray-700 dark:text-gray-400 text-xs px-2 py-1 rounded-full">{{ $ready->count() }}</span>
|
||||
</div>
|
||||
<div class="p-4 space-y-4 overflow-y-auto flex-1 custom-scrollbar">
|
||||
@foreach($ready as $job)
|
||||
<x-taller-card :job="$job" color="neon" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex-1 min-w-[300px] flex flex-col rounded-xl border transition-colors
|
||||
|
||||
Reference in New Issue
Block a user