@extends('layouts.app') @section('title', 'Sedes de ' . $company->name . ' — TI Manager') @section('content')
{{-- Encabezado --}} {{-- Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if($branches->count() > 0) {{-- VISTA LISTA: Tabla --}}
@foreach($branches as $branch) @endforeach
Sede Dirección / GPS Teléfono Contacto Principal Inventario Estado Acciones
{{ $branch->name }}
@if($branch->is_main) Principal @endif
@if($branch->full_address)
{{ $branch->full_address }} @if($branch->hasGps()) @endif
@else @endif
@if($branch->phone) {{ $branch->phone }} @else @endif {{ $branch->contact_person ?? '—' }} {{ $branch->inventoryItems->count() }} items {{ $branch->is_active ? 'Activa' : 'Inactiva' }}
@if(Auth::user()->isAdmin())
@csrf @method('DELETE')
@endif
{{-- VISTA TARJETAS: Grid responsivo --}}
@foreach($branches as $branch)
{{ $branch->name }} @if($branch->is_main) Principal @endif {{ $branch->is_active ? 'Activa' : 'Inactiva' }}
@if($branch->full_address)
Dirección {{ $branch->full_address }}
@endif @if($branch->phone) @endif @if($branch->contact_person)
Contacto {{ $branch->contact_person }}
@endif @if($branch->hasGps())
GPS
@endif
Inventario {{ $branch->inventoryItems->count() }} items
Ver inventario @if(Auth::user()->isAdmin()) Editar
@csrf @method('DELETE')
@endif
@endforeach
@else {{-- Estado vacío --}}

No hay sedes registradas

Comienza agregando la primera sede para {{ $company->name }}.

@if(Auth::user()->isAdmin()) Crear Sede @endif
@endif
@endsection