@extends('layouts.main')

@section('breadcrumbs')
    {{ Breadcrumbs::render(request()->route()->getName(), request()->route('noreg')) }}
@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">
                <h3 class="card-title">
                    Show Kirim Email Penawaran
                </h3>
                <div class="flex items-center gap-2">
                    <a href="{{ route('tender.penawaran.ulang.index') }}" class="btn btn-xs btn-info"><i
                            class="ki-filled ki-exit-left"></i> Back</a>
                </div>
            </div>
            <div class="card-body grid gap-5">
                <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 class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
                            name="nomor_registrasi" readonly value="{{ $permohonan->nomor_registrasi ?? '-' }}">
                    </div>
                </div>
                <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
                    <label class="form-label max-w-56">Nama Debitur</label>
                    <div class="flex flex-wrap items-baseline w-full">
                        <input class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
                            name="nama_debitur" readonly value="{{ $permohonan->debiture->name ?? '-' }}">
                    </div>
                </div>
                <div class="card-body grid gap-5">
                    <div class="grid">
                        <div class="card border border-agi-100 card-grid min-w-full" data-datatable="false" id="kjpp-table"
                            data-api-url="{{ route('tender.penawaran.showKirimSurat.datatables', $noreg) }}">
                            <div class="card-header bg-agi-50 py-5 flex-wrap">
                                <div class="card-title">
                                    Data KJPP
                                </div>
                            </div>
                            <div class="card-body">
                                <div class="scrollable-x-auto">
                                    <table
                                        class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
                                        data-datatable-table="true">
                                        <thead>
                                            <tr>
                                                <th class="w-14" data-datatable-column="no">
                                                    No
                                                </th>
                                                <th class="min-w-[150px]" data-datatable-column="nomor_kjpp">
                                                    <span class="sort">
                                                        <span class="sort-label">
                                                            Nomor KJPP
                                                        </span>
                                                        <span class="sort-icon"> </span>
                                                    </span>
                                                </th>
                                                <th class="min-w-[150px]" data-datatable-column="nama_kjpp">
                                                    <span class="sort">
                                                        <span class="sort-label">
                                                            Nama KJPP
                                                        </span>
                                                        <span class="sort-icon"> </span>
                                                    </span>
                                                </th>
                                                <th class="min-w-[150px]" data-datatable-column="email_kantor">
                                                    Email Kantor
                                                </th>
                                                <th class="min-w-[150px]" data-datatable-column="status">
                                                    Status Kirim
                                                </th>
                                                <th class="min-w-[50px] text-center" data-datatable-column="actions">Action
                                                </th>
                                            </tr>
                                        </thead>
                                    </table>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="flex justify-end">
                    <a href="{{ route('tender.penawaran.kirimEmailAll', $noreg) }}" class="btn btn-primary">
                        <i class="ki-filled ki-paper-plane"></i> Kirim
                    </a>
                </div>
            </div>

        </div>
    </div>
@endsection

@include('lpj::penawaran.layouts.scripts')
