File manager - Edit - /var/www/html/portalHomolog/resources/views/admin/licitacoesProcedimentos/homologacao.blade.php
Back
@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: ' . __('Homologação')) @section('content') @include('errors.messageFlash') <div class="card shadow border-0 rounded-4"> @php $headLine = "<i class='fa-solid fa-stamp text-success'></i> " . __('Homologação'); @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeBack' => 'admin.licitacoesProcedimentos.index', 'routeBackParams' => request()->only(['ano', 'tipo_processo', 'tipo', 'status', 'nr_processo', 'page']), 'nameBack' => __('Voltar'), 'permission' => 'GERENCIADOR_DE_LICITACOES_E_PROCEDIMENTOS', ]) <div class="card-body p-4"> @php $favorecidosOld = old('favorecidos'); $boletinsRegistro = collect($registro->boletins ?? []); $favorecidosRegistro = collect(); if ($boletinsRegistro->isNotEmpty() && is_array($boletinsRegistro->first()) && array_key_exists('ds_favorecido', $boletinsRegistro->first())) { $favorecidosRegistro = $boletinsRegistro; } else { $boletinsLegado = $boletinsRegistro; if ($boletinsLegado->isEmpty() && (!empty($registro->ds_bo) || !empty($registro->ds_urlbo))) { $boletinsLegado = collect([['ds_bo' => $registro->ds_bo, 'ds_urlbo' => $registro->ds_urlbo]]); } $favorecidosRegistro = collect([[ 'ds_favorecido' => $registro->ds_favorecido, 'dt_homologacao' => optional($registro->dt_homologacao)->format('Y-m-d'), 'boletins' => $boletinsLegado->values()->all(), ]]); } $favorecidosPreenchidos = collect($favorecidosOld ?? $favorecidosRegistro)->values(); if ($favorecidosPreenchidos->isEmpty()) { $favorecidosPreenchidos = collect([[ 'ds_favorecido' => '', 'dt_homologacao' => '', 'boletins' => [['ds_bo' => '', 'ds_urlbo' => '']], ]]); } $nextFavorecidoIndex = $favorecidosPreenchidos->count(); @endphp <form method="post" action="{{ route('admin.licitacoesProcedimentos.homologacao.update', [$registro->id] + request()->only(['ano', 'tipo_processo', 'tipo', 'status', 'nr_processo', 'page'])) }}"> @csrf @method('put') @foreach(['ano', 'tipo_processo', 'tipo', 'status', 'nr_processo', 'page'] as $filterKey) @if(request()->filled($filterKey)) <input type="hidden" name="{{ $filterKey }}" value="{{ request($filterKey) }}"> @endif @endforeach <div class="row g-4" id="favorecidos-wrapper" data-next-favorecido-index="{{ $nextFavorecidoIndex }}"> @foreach($favorecidosPreenchidos as $favorecidoIndex => $favorecidoAtual) @php $favorecidoNome = $favorecidoAtual['ds_favorecido'] ?? ($favorecidoAtual->ds_favorecido ?? ''); $favorecidoData = $favorecidoAtual['dt_homologacao'] ?? ($favorecidoAtual->dt_homologacao ?? ''); $boletinsFavorecido = collect($favorecidoAtual['boletins'] ?? [])->values(); if ($boletinsFavorecido->isEmpty()) { $boletinsFavorecido = collect([['ds_bo' => '', 'ds_urlbo' => '']]); } $nextBoletimIndex = $boletinsFavorecido->count(); @endphp <div class="col-12 favorecido-item" data-favorecido-index="{{ $favorecidoIndex }}"> <div class="border rounded-4 p-4 bg-light-subtle"> <div class="d-flex justify-content-between align-items-center mb-3"> <h6 class="fw-bold text-muted mb-0"> <i class="fa-solid fa-user-check me-1"></i> {{ __('Favorecido') }} <span class="js-favorecido-number">{{ $loop->iteration }}</span> </h6> @if(!$loop->first) <button type="button" class="btn btn-outline-danger btn-sm remove-favorecido-btn"> <i class="fa-solid fa-trash me-1"></i> {{ __('Apagar favorecido') }} </button> @endif </div> <div class="row g-3"> <div class="col-md-8"> <label class="form-label fw-semibold"> <i class="fa-solid fa-user text-secondary me-1"></i> {{ __('Nome do favorecido') }} </label> <input type="text" name="favorecidos[{{ $favorecidoIndex }}][ds_favorecido]" class="form-control rounded-3 shadow-sm" placeholder="{{ __('Digite o nome do favorecido') }}" value="{{ $favorecidoNome }}" > </div> <div class="col-md-4"> <label class="form-label fw-semibold"> <i class="fa-solid fa-calendar-days text-secondary me-1"></i> {{ __('Data da homologação') }} </label> <input type="date" name="favorecidos[{{ $favorecidoIndex }}][dt_homologacao]" class="form-control rounded-3 shadow-sm" value="{{ $favorecidoData }}" > </div> </div> <div class="mt-4"> <h6 class="fw-bold text-muted mb-2"> <i class="fa-solid fa-file-lines me-1"></i> {{ __('Boletins oficiais (máximo 3)') }} </h6> <div class="boletins-wrapper" data-next-boletim-index="{{ $nextBoletimIndex }}"> @foreach($boletinsFavorecido as $boletimIndex => $boletimAtual) @php $boletimNumero = $boletimAtual['ds_bo'] ?? ($boletimAtual->ds_bo ?? ''); $boletimUrl = $boletimAtual['ds_urlbo'] ?? ($boletimAtual->ds_urlbo ?? ''); @endphp <div class="mb-3 boletim-item"> <div class="border rounded-3 p-3 bg-white"> <div class="row g-3 align-items-end"> <div class="col-md-4"> <label class="form-label small fw-semibold text-muted"> {{ __('Boletim n°') }} <span class="js-boletim-number">{{ $loop->iteration }}</span> </label> <select class="form-select boletim-select rounded-3" name="favorecidos[{{ $favorecidoIndex }}][boletins][{{ $boletimIndex }}][ds_bo]" data-endpoint="{{ url('/api/boletins-oficiais') }}" data-selected="{{ $boletimNumero }}" data-url-target="#favorecido-{{ $favorecidoIndex }}-boletim-url-{{ $boletimIndex }}" > <option value="">{{ __('Selecione') }}</option> </select> </div> <div class="col-md-6"> <label class="form-label small fw-semibold text-muted">{{ __('URL do BO') }}</label> <input type="text" id="favorecido-{{ $favorecidoIndex }}-boletim-url-{{ $boletimIndex }}" name="favorecidos[{{ $favorecidoIndex }}][boletins][{{ $boletimIndex }}][ds_urlbo]" maxlength="250" class="form-control rounded-3" placeholder="{{ __('https://...') }}" value="{{ $boletimUrl }}" > </div> <div class="col-md-2"> <button type="button" class="btn btn-outline-danger rounded-3 w-100 remove-boletim-btn"> <i class="fa-solid fa-trash"></i> </button> </div> </div> </div> </div> @endforeach </div> <button type="button" class="btn btn-outline-secondary rounded-3 add-boletim-btn" data-endpoint="{{ url('/api/boletins-oficiais') }}" data-label-select="{{ __('Selecione') }}" data-label-url="{{ __('URL do BO') }}" data-placeholder-url="{{ __('https://...') }}" data-max-boletins="3" > <i class="fa-solid fa-plus me-1"></i> {{ __('Adicionar boletim') }} </button> </div> </div> </div> @endforeach <div class="col-12"> <button type="button" id="add-favorecido-btn" class="btn btn-outline-primary rounded-3" data-endpoint="{{ url('/api/boletins-oficiais') }}" data-label-select="{{ __('Selecione') }}" data-label-url="{{ __('URL do BO') }}" data-placeholder-url="{{ __('https://...') }}" data-label-remove-favorecido="{{ __('Apagar favorecido') }}" data-label-add-boletim="{{ __('Adicionar boletim') }}" data-label-favorecido="{{ __('Favorecido') }}" data-label-favorecido-nome="{{ __('Nome do favorecido') }}" data-placeholder-favorecido="{{ __('Digite o nome do favorecido') }}" data-label-data-homologacao="{{ __('Data da homologação') }}" data-label-boletins="{{ __('Boletins oficiais (máximo 3)') }}" > <i class="fa-solid fa-user-plus me-1"></i> {{ __('Adicionar favorecido') }} </button> </div> </div> {{-- Botão --}} <div class="mt-4 d-flex justify-content-end"> <button class="btn btn-success px-4 py-2 rounded-3 shadow-sm" type="submit"> <i class="fa-solid fa-check me-1"></i> {{ __('Salvar homologação') }} </button> </div> </form> </div> </div> @push('after-scripts') <script src="{{ asset('pmar/js/admin/licitacoes-procedimentos-homologacao.js') }}?v={{ @filemtime(public_path('pmar/js/admin/licitacoes-procedimentos-homologacao.js')) ?: time() }}"></script> @endpush @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings