@extends('layouts.app') @section('content') @php $currentSort = request('sort_column') ?: 'nome'; $currentDirection = request('sort_direction', 'ASC'); $sortUrl = function($column) use ($currentSort, $currentDirection) { $direction = ($currentSort == $column && $currentDirection == 'ASC') ? 'DESC' : 'ASC'; $params = array_merge(request()->query(), ['sort_column' => $column, 'sort_direction' => $direction, 'page' => 1]); return request()->url() . '?' . http_build_query($params); }; $sortIndicator = function($column) use ($currentSort, $currentDirection) { if ($currentSort == $column) { return $currentDirection == 'DESC' ? '▼' : '▲'; } return ''; }; @endphp

Clientes

Visualize os clientes cadastrados, seus status e dados de conexão.

Limpar
@if($clientes->count() > 0) @foreach($clientes as $cliente) @endforeach @else @endif
ID @if($currentSort == 'id') {{ $sortIndicator('id') }} @endif Nome @if($currentSort == 'nome') {{ $sortIndicator('nome') }} @endif Grupo @if($currentSort == 'grupo') {{ $sortIndicator('grupo') }} @endif Login @if($currentSort == 'login') {{ $sortIndicator('login') }} @endif Chave @if($currentSort == 'chave') {{ $sortIndicator('chave') }} @endif Status @if($currentSort == 'ativo') {{ $sortIndicator('ativo') }} @endif Entrada @if($currentSort == 'entrada') {{ $sortIndicator('entrada') }} @endif Saída @if($currentSort == 'saida') {{ $sortIndicator('saida') }} @endif Ações
{{ $cliente['id'] }} {{ $cliente['nome'] }} {{ $cliente['grupo'] ?? '-' }} {{ $cliente['login'] }} {{ $cliente['chave'] }} @php $ativo = $cliente['ativo'] == 1; $classe = $ativo ? 'status-tag active' : 'status-tag inactive'; $texto = $ativo ? 'Ativo' : 'Inativo'; @endphp {{ $texto }} {{ $cliente['entrada'] ? \Carbon\Carbon::parse($cliente['entrada'])->format('d/m/Y H:i') : '-' }} {{ $cliente['saida'] ? \Carbon\Carbon::parse($cliente['saida'])->format('d/m/Y H:i') : '-' }}
Nenhum cliente encontrado.
{{ $clientes->links('vendor.pagination.custom') }} @endsection