@extends('layouts.main')

@section('breadcrumbs')
    {{ Breadcrumbs::render('penilai.edit') }}
@endsection

@section('content')
    <div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
        <div class="card border border-agi-100 pb-2.5">
            <div class="card-header bg-agi-50" id="basic_settings">
                <div class="card-title flex flex-row gap-1.5">
                    Upload File Paparan
                </div>
                <div class="flex items-center gap-2">
                    <a href="{{ route('penilai.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
                </div>
            </div>
            <div class="card-body">
                <form action="{{ route('penilai.storePaparan',['id'=> $permohonan->id]) }}" method="POST" class="grid gap-5" enctype="multipart/form-data">
                    @csrf
                    <input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
                    <input type="hidden" name="dokument_id" value="{{ request('document_id') }}">
                    <input type="hidden" name="inspeksi_id" value="{{ request('inspeksi_id') }}">

                    <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                        <label class="form-label max-w-56">
                            Nomor Registrasi
                        </label>
                        <div class="flex flex-wrap items-baseline w-full">
                            <input readonly type="text" name="nomor_registrasi" id="nomor_registrasi" class="input w-full @error('nomor_registrasi') border-danger bg-danger-light @enderror" value="{{ old('nomor_registrasi', $permohonan->nomor_registrasi ?? '') }}" placeholder="Nomor Registrasi">
                            @error('nomor_registrasi')
                            <em class="alert text-danger text-sm">{{ $message }}</em>
                            @enderror
                        </div>
                    </div>

                    <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                        <label class="form-label max-w-56">
                            Debitur
                        </label>
                        <div class="flex flex-wrap items-baseline w-full">
                            <input readonly type="text" name="debitur" id="debitur" class="input w-full @error('debitur') border-danger bg-danger-light @enderror" value="{{ old('debitur', $permohonan->debiture->name ?? '') }}" placeholder="Debitur">
                            @error('debitur')
                            <em class="alert text-danger text-sm">{{ $message }}</em>
                            @enderror
                        </div>
                    </div>

                    <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                        <label class="form-label max-w-56">
                           File Paparan
                        </label>
                        <div class="flex flex-wrap items-baseline w-full">
                            <input type="file" name="file_paparan" id="file_paparan" class="file-input w-full @error('file_paparan') border-danger bg-danger-light @enderror" accept=".pdf,.jpg,.jpeg,.png">
                            @error('file_paparan')
                            <em class="alert text-danger text-sm">{{ $message }}</em>
                            @enderror
                        </div>
                    </div>
                    <div class="flex justify-end">
                        <button type="submit" class="btn btn-primary">
                            Proses
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection


@push('scripts')

@endpush
