@extends('layouts.main')

@section('breadcrumbs')
    {{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@php
    // $route = Route::currentRouteName();
    // dd($route);
    $route = explode('.', Route::currentRouteName());
@endphp

@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">

        <form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
            <!-- $id => penawaran.id -->
            <input type="hidden" id="{{$route[0]}}_id" name="id" value="{{ $id }}">
            @method('PUT')
            @csrf
                    <div class="card border border-agi-100 pb-2.5">
                        <div class="card-header bg-agi-50" id="basic_settings">
                            <h3 class="card-title">
                                Tambah Registrasi Final
                            </h3>
                            <div class="flex items-center gap-2">
                                <a href="{{ route('registrasifinal.show', $id) }}" class="btn btn-xs btn-primary" title="Detail"><i class="ki-filled ki-abstract-26"></i> Detail</a>
                                <a href="{{ route('registrasifinal.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
                            </div>
                        </div>
                        <div class="card-body lg:py-7.5 grid grid-cols-3">
                            <div class="mb-5">
                                <h3 class="text-md font-medium text-gray-900">
                                    Nomor Register Permohonan:
                                </h3>
                                <span class="text-2sm text-gray-700">
                                    <label class="card-title" id="textReg">
                                        No. registrasi
                                    </label>
                                </span>
                            </div>

                            <div class="mb-5">
                                <h3 class="text-md font-medium text-gray-900">
                                    Kode Penawaran:
                                </h3>
                                <span class="text-2sm text-gray-700">
                                    <label class="card-title" id="textCodePenawaran">
                                        Kode Penawaran
                                    </label>
                                </span>
                            </div>

                            <div class="mb-5">
                                <h3 class="text-md font-medium text-gray-900">
                                    Status Penawaran:
                                </h3>
                                <span class="text-2sm text-gray-700">
                                    <label class="card-title" id="textStatusPenawaran">
                                        Status
                                    </label>
                                </span>
                            </div>

                        </div>
                        <div class="card-body grid gap-5">

                            <div id="{{ $route[0] }}_div_region" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Dokumen SPK
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <em id="" class="alert text-danger text-sm"></em>
                                    <div class="flex items-center justify-between flex-wrap my-2.5 gap-2">{!! $doc_pdf !!}</div>
                                </div>
                            </div>
                            <div id="{{ $route[0] }}_div_region" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Region
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <select class="inputku select" id="{{$route[0]}}_region" name="{{$route[0]}}_region">
                                        <option></option>
                                    </select>
                                    <em id="{{$route[0]}}_region_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>
                            <div id="{{ $route[0] }}_div_catatan" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                                <label class="form-label max-w-56">
                                    Catatan
                                </label>
                                <div class="flex flex-wrap items-baseline w-full">
                                    <textarea class="inputku textarea" name="{{$route[0]}}_catatan" id="{{$route[0]}}_catatan" placeholder="Catatan..." rows="6"></textarea>
                                    <em id="{{$route[0]}}_catatan_msg" class="alert text-danger text-sm"></em>
                                </div>
                            </div>

                            <div class="flex justify-end">
                                <button type="button" class="btn btn-primary" id="toEdit">
                                    Save
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
</div>
@endsection
@include('lpj::registrasifinal.js.editjs')
