@extends('admin.layout') @section('title', 'Eventos') @section('content')
Gerencie os eventos do sistema
| Evento | Período | Ocupação | Status | Características | Ações |
|---|---|---|---|---|---|
|
{{ $evento->titulo }}
@if($evento->descricao)
{{ Str::limit($evento->descricao, 50) }}
@endif
|
@if($evento->data_inicio && $evento->data_fim) @php $inicio = $evento->data_inicio->format('d/m/Y'); $fim = $evento->data_fim->format('d/m/Y'); @endphp {{ $inicio === $fim ? $inicio : $inicio . ' a ' . $fim }} @else Não informado @endif | @php $ocupados = $evento->entradas()->where('status', 'ativo')->whereNull('datahora_saida')->count(); $percentual = $evento->capacidade > 0 ? round(($ocupados / $evento->capacidade) * 100, 1) : 0; $colorClass = $percentual >= 90 ? 'text-red-600' : ($percentual >= 70 ? 'text-yellow-600' : 'text-green-600'); @endphp {{ number_format($ocupados) }}/{{ number_format($evento->capacidade) }} ({{ $percentual }}%) | @php $colors = [ 'ativo' => 'bg-green-100 text-green-800', 'inativo' => 'bg-gray-100 text-gray-800', 'cancelado' => 'bg-red-100 text-red-800', 'finalizado' => 'bg-blue-100 text-blue-800', ]; $color = $colors[$evento->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $evento->status_label }} |
@if($evento->publico)
Público
@else
Privado
@endif
@if($evento->permite_prevenda)
Prevenda
@endif
|
@if(request()->anyFilled(['search', 'status', 'publico', 'data_inicio'])) Nenhum evento corresponde aos filtros aplicados. @else Ainda não há eventos cadastrados no sistema. @endif
@if(!request()->anyFilled(['search', 'status', 'publico', 'data_inicio'])) Criar Primeiro Evento @else Limpar Filtros @endif