@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: ' . __('Licitações e Procedimentos')) @section('content') @include('errors.messageFlash') @php use App\Models\LicitacoesProcedimentos\Processo; $filterParams = ['ano', 'tipo_processo', 'tipo', 'status', 'nr_processo', 'page']; $tipoProcessoFiltro = request('tipo_processo', ''); $tipoFiltro = (string) request('tipo', ''); $tiposLicitacaoJson = json_encode( collect(Processo::TIPOS_LICITACAO)->mapWithKeys(fn (string $label, int $codigo) => [$codigo => __($label)])->all(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE ); $tiposProcedimentoJson = json_encode( collect(Processo::TIPOS_PROCEDIMENTO)->mapWithKeys(fn (string $label, int $codigo) => [$codigo => __($label)])->all(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE ); $tiposFiltroAtuais = match ($tipoProcessoFiltro) { 'procedimento' => Processo::TIPOS_PROCEDIMENTO, 'licitacao' => Processo::TIPOS_LICITACAO, default => [], }; @endphp
@php $headLine = " " . __('Licitações e Procedimentos'); @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeBack' => 'admin.dashboard', 'routeBackParams' => [], 'nameBack' => __('Voltar'), 'routeAdd' => 'admin.licitacoesProcedimentos.create', 'routeAddParams' => request()->only($filterParams), 'nameAdd' => __('Novo registro'), 'permission' => 'GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS', ])
{{ __('Limpar') }}
@php $index = $registros->firstItem(); @endphp @forelse($registros as $registro) {{ $index }} {{ $registro->tipo_processo === 'licitacao' ? __('Licitação') : __('Procedimento') }} {{ $registro->procedimento_label ?: '-' }} {{ $registro->modalidade_label ?: '-' }} {{ $registro->nr_licitacao }} {{ $registro->nr_processo }} {{ $registro->cd_status_label ?? $registro->cd_status }} {{ optional($registro->dt_data)->format('d/m/Y') }}
@forelse($registro->uploads as $upload) @php $rawPath = trim((string) $upload->ds_arquivo); $normalizedPath = ltrim(str_replace('\\', '/', $rawPath), '/'); $fileName = basename($normalizedPath); if (preg_match('#^https?://#i', $rawPath)) { $uploadHref = $rawPath; } elseif ( str_starts_with($normalizedPath, 'licitacoes_procedimentos/') || str_starts_with($normalizedPath, 'storage/licitacoes_procedimentos/') ) { $uploadHref = str_starts_with($normalizedPath, 'storage/') ? asset($normalizedPath) : asset('storage/' . $normalizedPath); } else { $uploadHref = 'https://angra.rj.gov.br/SAPO/_licitacao/adm/upload/' . rawurlencode($fileName); } @endphp @empty - @endforelse
@if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS')['editar']) @endif @if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS')['excluir'])
@csrf @method('delete') @foreach(request()->only($filterParams) as $key => $value) @if($value !== null && $value !== '') @endif @endforeach
@endif
@php $index++; @endphp @empty {{ __('Nenhum registro encontrado.') }} @endforelse
@endsection @push('scripts') @endpush