@extends('layouts.app')

@section('content')
    <!--begin::App Content Header-->
    <div class="app-content-header"> <!--begin::Container-->
        <div class="container-fluid">
            <!--begin::Row-->
            <div class="row">
                <div class="col-sm-6">
                    <h3 class="mb-0">Edit Form Daily 4.5</h3>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-end">
                        <li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Home</a></li>
                        <li class="breadcrumb-item"><a href="{{ route('form45.daily.index') }}">Index Form4.5</a></li>
                        <li class="breadcrumb-item active">Edit Form Daily 4.5</li>
                    </ol>
                </div>
            </div>
            <!--end::Row-->
        </div> <!--end::Container-->
    </div>
    <!--end::App Content Header-->

    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <form action="{{ route('form45.daily.update', $submission->id) }}" method="POST">
                    @csrf
                    @method('PUT')

                    <div class="card-body">
                        <div class="form-group">
                            <label for="id_farm_section">Farm Section</label>
                            <select class="form-select" name="id_farm_section" id="id_farm_section" class="form-control" required>
                                <option value="">Select Farm Section</option>
                                @foreach ($sections as $section)
                                    <option value="{{ $section->id }}"
                                        {{ $submission->id_farm_section == $section->id ? 'selected' : '' }}>
                                        {{ $section->title }}
                                    </option>
                                @endforeach
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="tanaman">Tanaman</label>
                            <input type="text" name="tanaman" id="tanaman" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="lokasi_keluasan">Lokasi & Keluasan (ha)</label>
                            <input type="text" name="lokasi_keluasan" id="lokasi_keluasan" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="nama_dagangan_bahan_aktif">Nama Dagangan & Bahan Aktif</label>
                            <input type="text" name="nama_dagangan_bahan_aktif" id="nama_dagangan_bahan_aktif"
                                class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="no_LRMP">No. LRMP</label>
                            <input type="text" name="no_LRMP" id="no_LRMP" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="harga">Harga</label>
                            <input type="text" name="harga" id="harga" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="kuantiti_pembelian_kadar_penggunaan">Kuantiti Pembelian/ Kadar Penggunaan</label>
                            <input type="text" name="kuantiti_pembelian_kadar_penggunaan"
                                id="kuantiti_pembelian_kadar_penggunaan" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="Justifikasi_penggunaan">Justifikasi Penggunaan</label>
                            <input type="text" name="Justifikasi_penggunaan" id="Justifikasi_penggunaan"
                                class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="alat_digunakan">Alat Yang Digunakan</label>
                            <input type="text" name="alat_digunakan" id="alat_digunakan" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="PHI_hari">PHI (Hari)</label>
                            <input type="text" name="PHI_hari" id="PHI_hari" class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="REI_hari">REI (Hari)</label>
                            <input type="text" name="REI_hari" id="REI_hari" class="form-control" required>
                        </div>

                        <div class="card-footer">
                            <button type="submit" class="btn btn-primary">Update</button>
                        </div>
                </form>
            </div>
        </div>
    </div>
@endsection
