@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: Indicadores de TI') @section('content')
@include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => " " . __($headLine ?? 'Indicadores de TI'), 'routeBack' => 'admin.dashboard', 'routeBackParams' => [], 'nameBack' => __('Voltar'), 'permission' => 'INDICADORES_TI', 'routeOther' => 'admin.indicadoresTi.relatorio.index', 'nameOther' => __('Relatórios'), 'fontawesomeOther' => '', 'tabs' => [ [ 'route' => 'admin.indicadoresTi.gerenciar', 'label' => 'Gerenciar Assuntos', 'class' => 'fa-sliders', 'permission' => 'INDICADORES_TI', 'permission_check' => 'editar', ], [ 'route' => 'admin.indicadoresTi.gerenciar.clientes', 'label' => 'Gerenciar Clientes', 'class' => 'fa-users', 'permission' => 'INDICADORES_TI', 'permission_check' => 'editar', ], ], ])
@if (session('success')) @endif @if ($errors->any()) @endif @php $novoFormData = [ 'chamadoForm' => new \App\Models\IndicadoresTi\Chamado([ 'status' => 'pendente', 'prioridade' => 'media', 'tipo' => 'help_desk', 'canal' => 'portal', 'data_abertura' => now(), 'atendente_id' => auth()->id(), ]), 'action' => route('admin.indicadoresTi.store'), 'method' => 'POST', 'assuntosForm' => collect(), 'subassuntosForm' => collect(), 'filterParams' => $filterParams ?? [], ]; @endphp
@if (empty($chamadosAbertos))
@include('admin.indicadoresTi.form', $novoFormData)
@else
@include('admin.indicadoresTi.form', $novoFormData)
@foreach ($chamadosAbertos as $chamadoAberto)
@include('admin.indicadoresTi.form', [ 'chamadoForm' => $chamadoAberto, 'action' => route('admin.indicadoresTi.update', $chamadoAberto->id), 'method' => 'PUT', 'assuntosForm' => $chamadoAberto->setor_id ? \App\Models\IndicadoresTi\Assunto::where('setor_id', $chamadoAberto->setor_id)->orderBy('nome')->get() : collect(), 'subassuntosForm' => $chamadoAberto->assunto_id ? \App\Models\IndicadoresTi\Subassunto::where('assunto_id', $chamadoAberto->assunto_id)->orderBy('nome')->get() : collect(), 'filterParams' => $filterParams, ])
@endforeach
@endif
@include('admin.indicadoresTi.list')
@endsection