@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.1</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('form42.daily.index') }}">Index Form4.2</a></li>
                        <li class="breadcrumb-item active">Edit Form Daily 4.1</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('form42.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="JenisVarieti_PokokInduk_BahanTanaman">Jenis Varieti/Pokok Induk/BahanTanaman</label>
                            <input type="text" name="JenisVarieti_PokokInduk_BahanTanaman"
                                id="JenisVarieti_PokokInduk_BahanTanaman" class="form-control" required>
                        </div>

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

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

                        <div class="form-group">
                            <label for="penggunaan_kuantiti">Kuantiti Bahan/ Peralatan</label>
                            <input type="text" name="penggunaan_kuantiti" id="penggunaan_kuantiti" class="form-control"
                                required>
                        </div>

                        <div class="form-group">
                            <label for="penggunaan_blok">Penggunaan Blok/ Luas (Ha)</label>
                            <input type="text" name="penggunaan_blok" id="penggunaan_blok" class="form-control">
                        </div>

                        <div class="form-group">
                            <label for="rawatanBahanTanaman_Justifikasi">Rawatan Bahan Tanaman: Justifikasi</label>
                            <input type="text" name="rawatanBahanTanaman_Justifikasi"
                                id="rawatanBahanTanaman_Justifikasi" class="form-control" required>
                        </div>

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

                        <div class="form-group">
                            <label for="rawatanBahanTanaman_Kadar">Rawatan Bahan Tanaman: Kadar</label>
                            <input type="text" name="rawatanBahanTanaman_Kadar" id="rawatanBahanTanaman_Kadar"
                                class="form-control" required>
                        </div>

                        <div class="form-group">
                            <label for="nama_operator">Nama Operator</label>
                            <input type="text" name="nama_operator" id="nama_operator" class="form-control"
                                value="{{ $submission->nama_operator }}" readonly>
                        </div>
                    </div>

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