File manager - Edit - /var/www/html/portalHomolog/resources/views/admin/licitacoesProcedimentos/index.blade.php
Back
@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 <div class="card shadow-sm"> @php $headLine = "<i class='fa-solid fa-scale-balanced'></i> " . __('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', ]) <div class="card-body"> <form method="get" class="row g-2 mb-3 align-items-end" id="form-filtros-licitacoes-procedimentos"> <div class="col-md-2"> <label class="form-label" for="filtro-ano">{{ __('Ano:') }}</label> <input type="number" class="form-control" name="ano" id="filtro-ano" value="{{ request('ano') }}" placeholder="{{ __('Ano') }}"> </div> <div class="col-md-2"> <label class="form-label" for="lp-filtro-tipo-processo">{{ __('Tipo de processo:') }}</label> <select class="form-select" name="tipo_processo" id="lp-filtro-tipo-processo"> <option value="">{{ __('Todos') }}</option> <option value="licitacao" @selected($tipoProcessoFiltro === 'licitacao')>{{ __('Licitação') }}</option> <option value="procedimento" @selected($tipoProcessoFiltro === 'procedimento')>{{ __('Procedimento') }}</option> </select> </div> <div class="col-md-3"> <label class="form-label" for="lp-filtro-tipo">{{ __('Tipo:') }}</label> <select class="form-select" name="tipo" id="lp-filtro-tipo" data-tipos-licitacao="{{ $tiposLicitacaoJson }}" data-tipos-procedimento="{{ $tiposProcedimentoJson }}" data-tipo-selecionado="{{ $tipoFiltro }}" data-empty-label="{{ __('Todos') }}" @disabled($tipoProcessoFiltro === '') > <option value="">{{ __('Todos') }}</option> @foreach($tiposFiltroAtuais as $codigo => $label) <option value="{{ $codigo }}" @selected($tipoFiltro === (string) $codigo)>{{ __($label) }}</option> @endforeach </select> </div> <div class="col-md-2"> <label class="form-label" for="filtro-status">{{ __('Status:') }}</label> <select class="form-select" name="status" id="filtro-status"> <option value="">{{ __('Todos') }}</option> <option value="1" @selected((string) request('status') === '1')>{{ __('Licitado/Em Andamento') }}</option> <option value="2" @selected((string) request('status') === '2')>{{ __('Cancelado') }}</option> <option value="3" @selected((string) request('status') === '3')>{{ __('Suspenso') }}</option> <option value="4" @selected((string) request('status') === '4')>{{ __('Aguardando Licitação') }}</option> <option value="5" @selected((string) request('status') === '5')>{{ __('Não Homologada') }}</option> <option value="6" @selected((string) request('status') === '6')>{{ __('Homologada') }}</option> <option value="7" @selected((string) request('status') === '7')>{{ __('Fracassado') }}</option> </select> </div> <div class="col-md-3"> <label class="form-label" for="filtro-nr-processo">{{ __('Nº do Processo / Licitação:') }}</label> <input type="text" class="form-control" name="nr_processo" id="filtro-nr-processo" value="{{ request('nr_processo') }}" placeholder="{{ __('Processo ou licitação') }}" > </div> <div class="col-12 d-flex justify-content-end my-2 gap-2"> <a href="{{ route('admin.licitacoesProcedimentos.index') }}" class="btn btn-outline-secondary px-4">{{ __('Limpar') }}</a> <button class="btn btn-success px-4" type="submit">{{ __('Filtrar') }}</button> </div> </form> <x-tables._table :thead="['#', __('Tipo de processo'), __('Procedimento'), __('Modalidade'), __('Nº da Licitação'), __('Nº Processo'), __('Status'), __('Data'), __('Uploads'), __('Ações')]" :pagination="$registros->links()"> <x-slot name="body"> @php $index = $registros->firstItem(); @endphp @forelse($registros as $registro) <tr> <td>{{ $index }}</td> <td>{{ $registro->tipo_processo === 'licitacao' ? __('Licitação') : __('Procedimento') }}</td> <td>{{ $registro->procedimento_label ?: '-' }}</td> <td>{{ $registro->modalidade_label ?: '-' }}</td> <td>{{ $registro->nr_licitacao }}</td> <td>{{ $registro->nr_processo }}</td> <td>{{ $registro->cd_status_label ?? $registro->cd_status }}</td> <td>{{ optional($registro->dt_data)->format('d/m/Y') }}</td> <td> <div class="d-flex justify-content-center gap-2 flex-wrap"> @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 <a href="{{ $uploadHref }}" title="{{ $upload->ds_legenda ?: basename((string) $upload->ds_arquivo) }}" class="text-danger" target="_blank" > <i class="fa-solid fa-file-pdf fa-lg"></i> </a> @empty <span class="text-muted">-</span> @endforelse </div> </td> <td> <div class="d-flex justify-content-center gap-2"> @if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS')['editar']) <a class="btn btn-sm btn-warning" href="{{ route('admin.licitacoesProcedimentos.edit', [$registro->id] + request()->only($filterParams)) }}"> <i class="fa-solid fa-pen-to-square"></i> </a> <a class="btn btn-sm btn-primary" href="{{ route('admin.licitacoesProcedimentos.uploads', [$registro->id] + request()->only($filterParams)) }}" title="{{ __('Listar arquivos') }}"> <i class="fa-solid fa-file-lines"></i> </a> <a class="btn btn-sm btn-info text-white" href="{{ route('admin.licitacoesProcedimentos.homologacao', [$registro->id] + request()->only($filterParams)) }}" title="{{ __('Homologação') }}"> <i class="fa-solid fa-stamp"></i> </a> @endif @if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS')['excluir']) <form class="d-inline" action="{{ route('admin.licitacoesProcedimentos.destroy', $registro->id) }}" method="post" onsubmit="return confirmDelete(this)"> @csrf @method('delete') @foreach(request()->only($filterParams) as $key => $value) @if($value !== null && $value !== '') <input type="hidden" name="{{ $key }}" value="{{ $value }}"> @endif @endforeach <input type="hidden" name="confirm" value="{{ __('* Este registro será excluído e esta ação não poderá ser desfeita, deseja continuar?') }}"> <button type="submit" class="btn btn-sm btn-danger"> <i class="fa-solid fa-trash"></i> </button> </form> @endif </div> </td> </tr> @php $index++; @endphp @empty <tr> <td colspan="10" class="text-center">{{ __('Nenhum registro encontrado.') }}</td> </tr> @endforelse </x-slot> </x-tables._table> </div> </div> @endsection @push('scripts') <script src="{{ asset('pmar/js/admin/licitacoes-procedimentos.js') }}?v={{ @filemtime(public_path('pmar/js/admin/licitacoes-procedimentos.js')) ?: time() }}"></script> @endpush
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings