ARREGLOS: Errores de disposicion de errores corregidos.

This commit is contained in:
Bryam105
2026-01-28 10:17:37 -03:30
parent 869d3e1a2c
commit 0c639cb7b9
3 changed files with 47 additions and 16 deletions
+1 -2
View File
@@ -36,8 +36,6 @@
<x-section-header subtitle="Punto de Venta" title="Nueva " highlight="Venta" /> <x-section-header subtitle="Punto de Venta" title="Nueva " highlight="Venta" />
<div class="w-full max-w-5xl mx-auto bg-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
<x-ui.alert /> <x-ui.alert />
@if($errors->any()) @if($errors->any())
@@ -50,6 +48,7 @@
</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">
<form action="{{ route('sales.store') }}" method="POST"> <form action="{{ route('sales.store') }}" method="POST">
@csrf @csrf
+28 -3
View File
@@ -2,6 +2,18 @@
<x-section-header subtitle="Taller" title="Nueva " highlight="Orden de Reparación" /> <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">
<ul class="list-disc list-inside">
@foreach($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</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-panel-bg border border-neutral-800 rounded-xl p-8 shadow-lg">
<form action="{{ route('taller.store') }}" method="POST" class="space-y-8" id="taller-form"> <form action="{{ route('taller.store') }}" method="POST" class="space-y-8" id="taller-form">
@csrf @csrf
@@ -19,11 +31,11 @@
<option value="{{ $client->id }}">{{ $client->name }}</option> <option value="{{ $client->id }}">{{ $client->name }}</option>
@endforeach @endforeach
</select> </select>
<a href="{{ route('clients.create') }}" class="text-xs text-neon-lime hover:underline mt-1 inline-block">+ Nuevo Cliente</a> <a href="{{ route('clients.create', ['origin' => 'taller']) }}" class="text-xs text-neon-lime hover:underline mt-1 inline-block">+ Nuevo Cliente</a>
</div> </div>
<div> <div>
<label class="block text-xs font-bold text-gray-400 uppercase mb-2">Teléfono Aviso (Opcional)</label> <label class="block text-xs font-bold text-gray-400 uppercase mb-2">Teléfono Aviso</label>
<input type="text" name="contact_phone" placeholder="Dejar vacío para usar el del perfil" 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" 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">
</div> </div>
</div> </div>
</div> </div>
@@ -106,9 +118,22 @@
@push('scripts') @push('scripts')
<script type="module"> <script type="module">
const partsDB = @json($products); const partsDB = @json($products);
const clientsDB = @json($clients);
let selectedParts = []; let selectedParts = [];
$(document).ready(function() { $(document).ready(function() {
// Telefono de Cliente al cambiar selección
$('select[name="client_id"]').on('change', function() {
let clientId = $(this).val();
let client = clientsDB.find(c => c.id == clientId);
if (client && client.phone) {
$('input[name="contact_phone"]').val(client.phone);
} else {
$('input[name="contact_phone"]').val('');
}
});
// --- 1. Lógica del Buscador --- // --- 1. Lógica del Buscador ---
$('#part-search').on('keyup focus', function() { $('#part-search').on('keyup focus', function() {
let term = $(this).val().toLowerCase(); let term = $(this).val().toLowerCase();
+7
View File
@@ -1,6 +1,13 @@
<x-layout title="Tablero de Taller"> <x-layout title="Tablero de Taller">
<x-section-header subtitle="Gestión" title="Tablero de " highlight="Taller" /> <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"> <div class="flex w-full justify-end items-end mb-4">
<a href="{{ route('taller.create') }}" class="px-5 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] uppercase tracking-wide text-xs flex items-center gap-2"> <a href="{{ route('taller.create') }}" class="px-5 py-2.5 bg-neon-lime text-neutral-900 font-bold rounded-lg hover:bg-[#b3e600] uppercase tracking-wide text-xs flex items-center gap-2">
+ Ingresar Bici + Ingresar Bici