

<?php $__env->startSection('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">List of Farm Records</h3>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-end">
                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                        <li class="breadcrumb-item active" aria-current="page">
                            Forms 4.3
                        </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">
                <div class="card-header">
                    <h3 class="card-title">Forms 4.3</h3>
                    <div class="text-end">
                        <a href="<?php echo e(route('form43.daily.create')); ?>" class="btn btn-success">Create New Entry</a>
                    </div>
                </div>

                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                                


                                <tr class="text-center">
                                    <th rowspan="2">No</th>
                                    <th rowspan="2">Farm Section</th>
                                    <th rowspan="2">Date</th>
                                    <th rowspan="2">(a) Tarikh Beli/ Guna </th>
                                    <th rowspan="2">(b) Jenis Bahan</th>
                                    <th rowspan="2">(c) Formulasi</th>
                                    <th colspan="3">
                                        (d) Pembelian
                                    </th>
                                    <th colspan="4">
                                        (e) Penggunaan
                                    </th>

                                    

                                    <th rowspan="2">Nama Operator</th>
                                    <th rowspan="2">Actions</th>
                                </tr>
                                <tr class="text-center" style="vertical-align: middle";>
                                    <th>(i) Kuantiti</th>
                                    <th>(ii) Harga (RM)</th>
                                    <th>(iii) Name Pembekal</th>
                                    <th>(i) Kuantiti</th>
                                    <th>(ii) Cara Aplikasi</th>
                                    <th>(iii) Lokasi/Blok</th>
                                    <th>(iv) Keluasan (ha)</th>
                                </tr>

                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $submissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $submission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($loop->iteration); ?></td>
                                        <td><?php echo e($submission->farmSection->name ?? 'N/A'); ?></td>
                                        <td><?php echo e($submission->created_at->format('d M Y, h:i A')); ?></td>
                                        <td><?php echo e($submission->tarikh_beli_guna->format('d M Y, h:i A')); ?></td>
                                        <td><?php echo e($submission->jenis_bahan); ?></td>
                                        <td><?php echo e($submission->formulasi); ?></td>
                                        <td><?php echo e($submission->pembelian_kuantiti); ?></td>
                                        <td><?php echo e($submission->pembelian_harga); ?></td>
                                        <td><?php echo e($submission->pembelian_nama_pembekal); ?></td>
                                        <td><?php echo e($submission->penggunaan_kuantiti); ?></td>
                                        <td><?php echo e($submission->penggunaan_caraAplikasi); ?></td>
                                        <td><?php echo e($submission->penggunaan_lokasi); ?></td>
                                        <td><?php echo e($submission->penggunaan_keluasan); ?></td>
                                        <td><?php echo e($submission->nama_operator); ?></td>
                                        <td>
                                            <div  class="text-center" class="btn-group">
                                                <!-- Add any actions you need here, e.g., View, Edit, Delete -->
                                                <a href="<?php echo e(route('form43.daily.show', $submission->id)); ?>"
                                                    class="btn btn-primary btn-sm">View</a>
                                                <a href="<?php echo e(route('form43.daily.edit', $submission->id)); ?>"
                                                    class="btn btn-warning btn-sm">Edit</a>
                                                <form action="<?php echo e(route('form43.daily.destroy', $submission->id)); ?>"
                                                    method="POST" style="display:inline-block;">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <button type="submit" class="btn btn-danger btn-sm"
                                                        onclick="return confirm('Are you sure?')">Delete</button>
                                                </form>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\FMIS_fypsystem\resources\views/form/form_43/index43.blade.php ENDPATH**/ ?>