@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: ' . __('Lista de Empresas')) @section('content') @php $headLine = " " . __('Lista de Empresas'); @endphp
@include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeAdd' => 'admin.empresas.verify', 'routeAddParams' => [], 'nameAdd' => __('Nova empresa'), 'permission' => 'GERENCIADOR_DE_EMPRESAS', ])
@include("errors.messageFlash") @include('components/forms/_filtroPesquisaDefault', [ "id" => "cadastroDeEmpresas", "placeholder" => __("Pesquisar por empresa...") ]) @php $permissoes = auth()->user()->getPermissaoDetalhes('GERENCIADOR_DE_EMPRESAS'); @endphp @php $index = 0; @endphp @forelse($empresas as $empresa) {{ $empresa->created_at?->format('d/m/Y H:i') }} {{ $empresa->razaoSocial }} {{ $empresa->nomeFantasia }} {{ $empresa->cnpj }} {{ $empresa->email }} {{ $empresa->celular }} {{ $empresa->telefone }} @if(!empty($permissoes['editar'])) @include('components/buttons/_status', [ "index" => $index, "route" => "admin.empresas.status", "id" => $empresa->id, "status" => $empresa->status, "permission" => "GERENCIADOR_DE_EMPRESAS", ]) @else - @endif @php $podeEditar = !empty($permissoes['editar']); $podeExcluir = !empty($permissoes['excluir']); @endphp @if($podeEditar || $podeExcluir)
@include('components/buttons/_editButton', [ "route" => "admin.empresas.edit", "id" => $empresa->id, "fontawesome" => null, "title" => __("Editar"), "permission" => "GERENCIADOR_DE_EMPRESAS", ]) @include('components/buttons/_deleteButton', [ "message" => "* Esta empresa será excluída e esta ação não poderá ser desfeita?", "route" => "admin.empresas.destroy", "id" => $empresa->id, "fontawesome" => null, "title" => __("Excluir"), "permission" => "GERENCIADOR_DE_EMPRESAS", ])
@else - @endif @php $index++; @endphp @empty {{ __('* Nenhum registro encontrado!') }} @endforelse
@endsection