@extends('admin.base-admin') @section('page_title', 'Agendamento de Equipamentos | Admin TI') @section('nav') @include('admin.partials.nav-ti') @endsection @section('page-header')

Equipamentos

@endsection @section('styles') @endsection @section('content')
{{-- Toolbar --}}
{{-- Painel lateral de stats --}}
@php $allTypes = array_unique(array_merge( array_keys($livreCount), array_keys($ocupadosCount), $itens->pluck('type')->unique()->toArray() )); $equipIcons = ['Projetor'=>'bi-projector-fill','Notebook'=>'bi-laptop','TABLET'=>'bi-tablet']; $equipLabels = ['Projetor'=>'Projetor','Notebook'=>'Notebook','TABLET'=>'Tablet']; @endphp
Disponíveis
@foreach ($allTypes as $type)
{{ $equipLabels[$type] ?? $type }} {{ $livreCount[$type] ?? 0 }}
@endforeach
Em uso
@foreach ($allTypes as $type)
{{ $equipLabels[$type] ?? $type }} {{ $ocupadosCount[$type] ?? 0 }}
@endforeach
{{-- Tabela --}}
#
CATEGORIA
SELO
MODELO
RESPONSÁVEL
STATUS
@forelse ($itens as $i)
#{{ $i['id'] }}
{{ $i['type'] }}
{{ $i['selo'] ?: '—' }}
{{ $i['model'] ?: '—' }}
@if ($i['resp'])
{{ $i['resp'] }}
@if ($i['setor'])
{{ $i['setor'] }}
@endif
@else — @endif
@if ($i['disp'] == 1) Disponível @elseif ($i['disp'] == 2) Em uso @else Inativo @endif
@empty

Nenhum equipamento encontrado.

@endforelse
{{-- Modal: Ver detalhes (AJAX) --}} {{-- Modal: Atribuir equipamento --}} {{-- Modal: Confirmar devolução --}} {{-- Modal: Novo equipamento --}} {{-- Modais: Editar (um por item) --}} @foreach ($itens as $i) @endforeach {{-- Modal: Confirmar desativar/ativar --}} @endsection @section('scripts') @endsection