@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: Gerenciar Assuntos e Subassuntos') @section('content')
@include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => " " . __($headLine), 'routeBack' => 'admin.demandas.dashboard', 'routeBackParams' => [], 'nameBack' => __('Voltar'), 'permission' => 'GERENCIADOR_DEMANDAS', ])
@if (session('success')) @endif @if ($errors->any()) @endif {{-- Novo setor --}}
{{ __('Novo Setor') }}
@csrf
@error('nome_setor') {{ $message }} @enderror
{{-- Lista de setores --}}
@forelse ($setores as $setor)
{{-- Cabeçalho do setor --}}
{{-- Toggle público setor --}}
@csrf @method('PATCH')
@csrf @method('DELETE')
{{-- Form editar setor --}}
@csrf @method('PUT')
@error('nome_setor_' . $setor->id) {{ $message }} @enderror
{{-- Corpo do setor --}}
@forelse ($setor->assuntos as $assunto)
{{ $assunto->nome }} @if ($assunto->publico) @endif {{ $assunto->subassuntos_count }} {{ __('subassunto(s)') }} {{-- Toggle público assunto --}}
@csrf @method('PATCH')
@csrf @method('DELETE')
@csrf @method('PUT')
@error('nome_assunto_' . $assunto->id) {{ $message }} @enderror
@csrf
@error('nome_subassunto') {{ $message }} @enderror
@if ($assunto->subassuntos->isNotEmpty()) @foreach ($assunto->subassuntos as $subassunto)
{{ $subassunto->nome }} @if ($subassunto->publico) @endif {{-- Toggle público subassunto --}}
@csrf @method('PATCH')
@csrf @method('DELETE')
@csrf @method('PUT')
@error('nome_subassunto_' . $subassunto->id) {{ $message }} @enderror
@endforeach @endif
@empty
{{ __('Nenhum assunto cadastrado neste setor.') }}
@endforelse {{-- Adicionar novo assunto --}}
@csrf
@error('nome_assunto') {{ $message }} @enderror
@empty
{{ __('Nenhum setor cadastrado.') }}
@endforelse
@endsection