@extends('layouts.app') @section('styles') @endsection @section('content')
@foreach ($data as $item) @endforeach
PACIENTE TRATAMIENTO DOCTOR FECHA ASISTENTE
{{-- Datos del paciente (ya cargados con Eager Loading) --}} {{ $item->paciente->nombre }}
@if ($item->tratamiento->tipo3 == 'NO') NO APLICA SALIDAS @endif @if ($item->tratamiento->tipo3 == 'SI') {{-- AHORA: Verificamos la propiedad que creamos en la subconsulta (salidainsumos)--}} {{-- Si es 1 (true), entra. Si es null (false), se va al else. --}} @if ($item->tiene_salida) SI REALIZADO @else NO REALIZADO {{-- Botón de desbloqueo --}} @endif @endif
{{$item->tratamiento->nombre ?? 'Tr. Eliminado'}} - {{$item->tratamiento->descripcion ?? ''}} {{$item->doctor->nombre ?? 'Doctor Eliminado'}} {{$item->fecha}} {{$item->asistio}}
@endsection @section('scripts') @endsection