@extends('layouts.app') @push('styles') @endpush @section('content') @php $clientId = $contract->user_id; $supplierId = $contract->suppliers->user_id ?? null; @endphp
{{-- Info del contrato --}}
Contrato #{{ $contract->id }} Cliente: {{ $contract->user->name ?? '—' }} Proveedor: {{ $contract->suppliers->company_name ?? '—' }} Categoría: {{ $contract->categories->name ?? '—' }} Monto: ${{ $contract->amount }} Cita: {{ $contract->appointment }} @if($report->veredict) Veredicto: {{ $report->veredict }} @endif
{{-- Leyenda --}}
Cliente Proveedor Moderador
{{-- Mensajes --}}
@forelse($comments as $comment) @php if ($comment->user_id == $clientId) { $side = 'right'; $label = 'Cliente'; } elseif ($comment->user_id == $supplierId) { $side = 'left'; $label = 'Proveedor'; } else { $side = 'center'; $label = 'Moderador'; } @endphp
{{ $label }} — {{ $comment->user->name ?? '—' }}
{{ $comment->comment }}
{{ $comment->created_at->format('d/m/Y H:i') }}
@empty

Sin comentarios aún.

@endforelse
{{-- Paginación --}} @if($comments->hasPages())
{{ $comments->links() }}
@endif {{-- Input del moderador --}}
@csrf @error('comment')
{{ $message }}
@enderror
@endsection