@php use App\Models\LicitacoesProcedimentos\Processo; $tipoProcessoSelecionado = old('tipo_processo', $registro->tipo_processo ?? ''); $cdTipoSelecionado = (string) old('cd_tipo', $registro->cd_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 ); @endphp @csrf @if(isset($registro)) @method('put') @endif @foreach(['ano', 'tipo_processo', 'tipo', 'status', 'nr_processo', 'page'] as $filterKey) @if(request()->filled($filterKey)) @endif @endforeach
{{ __('Dados do Processo') }}
@php $idSetorSelecionado = (string) old('id_setor', $registro->id_setor ?? ''); $setoresLista = collect($secretarias ?? []); $setoresPorTipo = [ 'SECRETARIA' => $setoresLista->where('type', 'SECRETARIA'), 'SECRETARIA_EXECUTIVA' => $setoresLista->where('type', 'SECRETARIA_EXECUTIVA'), 'AUTARQUIA_FUNDACAO' => $setoresLista->whereIn('type', ['AUTARQUIA', 'FUNDACAO']), ]; $labelsGrupo = [ 'SECRETARIA' => __('Secretarias'), 'SECRETARIA_EXECUTIVA' => __('Secretarias Executivas'), 'AUTARQUIA_FUNDACAO' => __('Autarquias e Fundações'), ]; $idsDisponiveis = $setoresLista->pluck('id')->map(fn ($id) => (string) $id); $opcaoLegada = ($idSetorSelecionado !== '' && !$idsDisponiveis->contains($idSetorSelecionado)) ? Processo::getSetorOptionById($idSetorSelecionado) : null; @endphp