@extends('layouts.app')
@section('title', 'Resultados de búsqueda — TI Manager')
@section('content')
@if($companies->isEmpty() && $inventory->isEmpty() && $users->isEmpty() && $customers->isEmpty() && $products->isEmpty() && $quotes->isEmpty() && $tickets->isEmpty() && $invoices->isEmpty())
Sin resultados
No se encontró ningún resultado con el término "{{ $query }}".
Volver
@endif
{{-- Empresas --}}
@if($companies->isNotEmpty())
Empresas ({{ $companies->count() }})
{{-- VISTA LISTA: Tabla --}}
| Nombre |
NIT |
Ciudad |
Acción |
@foreach($companies as $company)
@if($company->logo)
 }})
@else
{{ substr($company->name, 0, 2) }}
@endif
{{ $company->name }}
|
{{ $company->nit ?? '—' }} |
{{ $company->city ?? '—' }} |
Ver Detalle
|
@endforeach
{{-- VISTA TARJETAS: Grid responsivo --}}
@foreach($companies as $company)
@if($company->nit)
NIT
{{ $company->nit }}{{ $company->dv ? '-'.$company->dv : '' }}
@endif
@if($company->phone)
Teléfono
{{ $company->phone }}
@endif
@endforeach
@endif
{{-- Inventario --}}
@if($inventory->isNotEmpty())
Equipos de Inventario ({{ $inventory->count() }})
{{-- VISTA LISTA: Tabla --}}
| Equipo |
Serial |
Empresa |
Estado |
Acción |
@foreach($inventory as $item)
|
{{ $item->name }}
{{ $item->category->name ?? '—' }}
|
{{ $item->serial_number ?? '—' }} |
{{ $item->branch->company->name ?? '—' }} |
{{ $item->status_label }}
|
Ver Detalle
|
@endforeach
{{-- VISTA TARJETAS: Grid responsivo --}}
@foreach($inventory as $item)
@if($item->serial_number)
Serial
{{ $item->serial_number }}
@endif
@if($item->brand || $item->model)
Marca/Modelo
{{ $item->brand }} {{ $item->model }}
@endif
Empresa
{{ $item->branch->company->name ?? '—' }}
@endforeach
@endif
{{-- Usuarios --}}
@if($users->isNotEmpty())
Usuarios ({{ $users->count() }})
{{-- VISTA LISTA: Tabla --}}
| Usuario |
Rol |
Empresa |
Acción |
@foreach($users as $user)
@if($user->avatar)
 }})
@else
{{ strtoupper(substr($user->name, 0, 2)) }}
@endif
{{ $user->name }}
{{ $user->email }}
|
@if($user->isAdmin())
Admin
@elseif($user->isTechnician())
Técnico
@else
Cliente
@endif
|
@if($user->isAdmin())
Todas
@else
@if($user->companies->count() > 0)
{{ $user->companies->pluck('name')->join(', ') }}
@else
—
@endif
@endif
|
Editar
|
@endforeach
{{-- VISTA TARJETAS: Grid responsivo --}}
@foreach($users as $user)
Empresa
@if($user->isAdmin())
Todas
@else
@if($user->companies->count() > 0)
{{ $user->companies->pluck('name')->join(', ') }}
@else
—
@endif
@endif
@endforeach
@endif
{{-- Clientes Particulares --}}
@if($customers->isNotEmpty())
Clientes Particulares ({{ $customers->count() }})
| Cliente |
Documento |
Email |
Acción |
@foreach($customers as $customer)
| {{ $customer->name }} |
{{ $customer->document }} |
{{ $customer->email ?? '—' }} |
Ver Detalle |
@endforeach
@foreach($customers as $customer)
Documento{{ $customer->document }}
@if($customer->email)
Email{{ $customer->email }}
@endif
@endforeach
@endif
{{-- Productos --}}
@if($products->isNotEmpty())
Productos ({{ $products->count() }})
| Producto |
Categoría |
Precio |
Acción |
@foreach($products as $product)
| {{ $product->name }} |
{{ $product->category->name ?? '—' }} |
${{ number_format($product->price, 2) }} |
Editar |
@endforeach
@foreach($products as $product)
Precio${{ number_format($product->price, 2) }}
Categoría{{ $product->category->name ?? '—' }}
@endforeach
@endif
{{-- Cotizaciones --}}
@if($quotes->isNotEmpty())
Cotizaciones ({{ $quotes->count() }})
| Número |
Cliente |
Empresa |
Total |
Acción |
@foreach($quotes as $quote)
| {{ $quote->quote_number }} |
{{ $quote->customer_name }} |
{{ $quote->company->name ?? '—' }} |
${{ number_format($quote->total, 2) }} |
Ver Detalle |
@endforeach
@foreach($quotes as $quote)
Cliente{{ $quote->customer_name }}
Empresa{{ $quote->company->name ?? '—' }}
Total${{ number_format($quote->total, 2) }}
@endforeach
@endif
{{-- Tickets --}}
@if($tickets->isNotEmpty())
Tickets ({{ $tickets->count() }})
| Número |
Título |
Empresa |
Estado |
Acción |
@foreach($tickets as $ticket)
| {{ $ticket->ticket_number }} |
{{ $ticket->title }} |
{{ $ticket->company->name ?? '—' }} |
{{ strtoupper($ticket->status) }} |
Ver Detalle |
@endforeach
@foreach($tickets as $ticket)
Título{{ $ticket->title }}
Empresa{{ $ticket->company->name ?? '—' }}
@endforeach
@endif
{{-- Facturas --}}
@if($invoices->isNotEmpty())
Facturas ({{ $invoices->count() }})
| Documento |
Empresa |
Total |
Estado |
Acción |
@foreach($invoices as $invoice)
| {{ $invoice->document_number }} |
{{ $invoice->company->name ?? '—' }} |
${{ number_format($invoice->total_amount, 2) }} |
{{ strtoupper($invoice->status) }} |
Ver Detalle |
@endforeach
@foreach($invoices as $invoice)
Empresa{{ $invoice->company->name ?? '—' }}
Total${{ number_format($invoice->total_amount, 2) }}
@endforeach
@endif
@endsection