@extends('layouts.admin.theme')
@section('title', env('APP_NAME') . ' :: ' . __('Editar portaria'))

@section('content')
    @include('errors.messageFlash')

    <div class="card shadow-sm">
        @php $headLine = "<i class='fa-solid fa-pen-to-square'></i> " . __('Editar portaria'); @endphp
        @include('components.buttons._headLineButtonsBackAdd', [
            'headLine' => __($headLine),
            'routeBack' => 'admin.legislacao.portarias.index',
            'routeBackParams' => request()->only(['q', 'page', 'ano', 'status', 'sort_by', 'sort_dir']),
            'nameBack' => __('Voltar'),
            'permission' => 'GERENCIADOR_DE_LEGISLACAO',
        ])
        <div class="card-body">
            <form id="portaria-main-form" method="post"
                action="{{ route('admin.legislacao.portarias.update', [$portaria] + request()->only(['q', 'page', 'ano', 'status', 'sort_by', 'sort_dir'])) }}">
                @csrf
                @method('put')
                @include('admin.legislacao.portarias._form', ['portaria' => $portaria])
            </form>

            @include('admin.legislacao.portarias._retificacoes_panel')
        </div>
    </div>
@endsection

@push('after-scripts')
    <script src="{{ asset('pmar/js/admin/legislacao-boletim-api-select.js') }}" defer></script>
    <script src="{{ asset('pmar/js/admin/legislacao-portaria-form.js') }}" defer></script>
@endpush
