NUEVO: Implementado PROTOTIPO (v0.1) de taller, creado a partir de modelo kanban con columnas de estados. PENDIENTE DE MUCHOS CAMBIOS...
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
@props(['job', 'color'])
|
||||
|
||||
@php
|
||||
$borderColor = match($color) {
|
||||
'red' => 'border-l-red-500',
|
||||
'yellow' => 'border-l-yellow-500',
|
||||
'neon' => 'border-l-neon-lime',
|
||||
default => 'border-l-gray-500'
|
||||
};
|
||||
@endphp
|
||||
|
||||
<div class="bg-panel-bg p-4 rounded-lg border border-neutral-700 border-l-4 {{ $borderColor }} shadow-lg group hover:bg-neutral-800 transition-colors">
|
||||
|
||||
<!-- Encabezado Tarjeta -->
|
||||
<div class="flex justify-between items-start mb-2">
|
||||
<span class="text-xs font-bold text-gray-400">{{ $job->client->name }}</span>
|
||||
<span class="text-xs font-mono text-gray-500">{{ $job->scheduled_at->format('d/m H:i') }}</span>
|
||||
</div>
|
||||
|
||||
<h4 class="text-white font-bold text-sm mb-1">{{ $job->bike_model }}</h4>
|
||||
<p class="text-gray-400 text-xs line-clamp-2 mb-3">{{ $job->problem_description }}</p>
|
||||
|
||||
@if($job->estimated_cost)
|
||||
<div class="text-right mb-3">
|
||||
<span class="text-xs text-gray-500">Presupuesto:</span>
|
||||
<span class="text-sm font-mono text-white font-bold">${{ number_format($job->estimated_cost, 0) }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Controles de Estado -->
|
||||
<div class="flex justify-between items-center pt-2 border-t border-neutral-700 mt-2 opacity-100 md:opacity-50 group-hover:opacity-100 transition-opacity">
|
||||
|
||||
<!-- Botón Mover Atrás -->
|
||||
@if($job->status !== 'pending')
|
||||
<form action="{{ route('taller.updateStatus', $job) }}" method="POST">
|
||||
@csrf @method('PATCH')
|
||||
<input type="hidden" name="status" value="{{ $job->status === 'ready' ? 'in_progress' : 'pending' }}">
|
||||
<button class="text-gray-500 hover:text-white p-1" title="Volver al estado anterior">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<div></div> <!-- Espaciador -->
|
||||
@endif
|
||||
|
||||
<!-- Enlace a WhatsApp -->
|
||||
<a href="https://wa.me/{{ $job->contact_phone }}?text=Hola {{ $job->client->name }}, te escribimos de Lauck para avisarte sobre tu {{ $job->bike_model }}..." target="_blank" class="text-green-500 hover:text-green-400">
|
||||
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M17.472 14.382c..."></path></svg> <!-- (Usa el mismo SVG de whatsapp de antes) -->
|
||||
<span class="text-xs ml-1">Avisar</span>
|
||||
</a>
|
||||
|
||||
<!-- Botón Mover Adelante -->
|
||||
@if($job->status !== 'ready')
|
||||
<form action="{{ route('taller.updateStatus', $job) }}" method="POST">
|
||||
@csrf @method('PATCH')
|
||||
<input type="hidden" name="status" value="{{ $job->status === 'pending' ? 'in_progress' : 'ready' }}">
|
||||
<button class="text-neon-lime hover:text-white p-1" title="Avanzar estado">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
|
||||
</button>
|
||||
</form>
|
||||
@elseif($job->status === 'ready')
|
||||
<!-- Botón Entregar (Archivar) -->
|
||||
<form action="{{ route('taller.updateStatus', $job) }}" method="POST">
|
||||
@csrf @method('PATCH')
|
||||
<input type="hidden" name="status" value="delivered">
|
||||
<button class="text-xs bg-neon-lime text-black px-2 py-1 rounded font-bold hover:bg-white" title="Marcar como entregado">
|
||||
Entregar
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user