1. Información del Equipo
@if($device?->notes) @endif
Modelo{{ $device?->model ?? '—' }}
Marca{{ $device?->brand ?? '—' }}
Nº de serie{{ $device?->serial ?? '—' }}
Ubicación{{ $device?->location ?? '—' }}
Estado{{ ucfirst($device?->status ?? '—') }}
Notas{{ \Str::limit($device->notes ?? '', 120) }}
2. Cliente y Servicio
@php $resultado = $service->attributes['resultado'] ?? $service->attributes['conformidad'] ?? null; @endphp
Cliente{{ $client?->name ?? '—' }}
CUIT / IVA{{ $client?->tax_id ?? '—' }}@if($client?->tax_condition) — {{ $client->tax_condition }}@endif
Contacto{{ $client?->billing_email ?? '—' }}
Apertura{{ $service->opened_at->format('d/m/Y H:i') }}
Cierre{{ $service->closed_at ? $service->closed_at->format('d/m/Y H:i') : '—' }}
Técnico{{ $service->assignedTo->name ?? '—' }}
Resultado @if($resultado) @php $r = strtolower($resultado); @endphp @if(str_contains($r, 'conforme') && !str_contains($r, 'no')) {{ $resultado }} @elseif(str_contains($r, 'no conforme') || str_contains($r, 'no-conforme')) {{ $resultado }} @else {{ $resultado }} @endif @else — @endif
3. Partes / Repuestos Usados
@forelse($partsUsed as $i => $p) @empty @endforelse @php $extraRows = max(0, 4 - count($partsUsed)); @endphp @for($i = 0; $i < $extraRows; $i++) @endfor
# Código Descripción Cant. Nº de lote Observaciones
{{ $i + 1 }} {{ $p->code }} {{ $p->description }} {{ $p->quantity }} {{ $p->lot ?? '—' }} {{ $p->notes ?? '—' }}
{{ count($partsUsed) + $i + 1 }}
Resumen del Servicio
@if($service->summary)
{{ \Str::limit($service->summary, 200) }}
@else
@endif
Trabajo Realizado
@if($service->realized_work)
{{ \Str::limit($service->realized_work, 200) }}
@else
@endif
@php $otherAttrs = $service->attributes ? array_filter((array)$service->attributes, fn($v, $k) => !in_array($k, ['resultado','conformidad']) && $v !== '' && $v !== null, ARRAY_FILTER_USE_BOTH) : []; @endphp @if(!empty($otherAttrs))
Atributos del Servicio
@foreach($otherAttrs as $key => $value) @endforeach
{{ \App\Models\ServiceAttributeDefinition::where('key', $key)->first()?->label ?? $key }} {{ $value }}
@endif
Observaciones adicionales (escribir a mano)