<?php $__env->startSection('container'); ?>
    <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
        <h1 class="h2">History</h1>
    </div>
    <div class="input-group mb-3">
        <input type="text" class="form-control" placeholder="Search" name="search" value="<?php echo e(request('search')); ?>">
        <button class="btn btn-danger" type="submit" >Search</button>
      </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="card card-default rounded-0 shadow">
                <div class="card-header">
                    <div class="row">
                        <div class="col-lg-10 col-md-10 col-sm-8 col-xs-6">
                            <h3 class="card-title">History</h3>
                        </div>
                        <div class="col-lg-2 col-md-2 col-sm-4 col-xs-6 text-end">
                        </div>
                    </div>
                    <div class="clear:both"></div>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-sm-12 table-responsive">
                            <table id="supplierList" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>No</th>
                                        <th>Nama Customer</th>
                                        <th>No Polisi</th>
                                        <th>Nama Employee</th>
                                        <th>Discount</th>
                                        <th>Total Harga</th>
                                        <th>Tanggal</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                            $no=1;
                                        ?>
                                        <?php $__currentLoopData = $history; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($no++); ?></td>
                                        <td><?php echo e($data->nama); ?></td>
                                        <td><?php echo e($data->no_polisi); ?></td>
                                        <td><?php echo e($data->nama_pegawai); ?></td>
                                        <td><?php echo e($data->discount); ?>%</td>
                                        <td><?php echo e($data->harga_total); ?></td>
                                        <td><?php echo e(\Carbon\Carbon::parse($data->created_at)->format('d-m-Y')); ?></td>
                                        <td>
                                            <a href="<?php echo e(route('history.print',$data->id)); ?>" target="_BLANK" class="badge bg-success"><i class="bi bi-printer" style="cursor: pointer;"></i></a>
                                            <a href="<?php echo e(route('service',$data->id)); ?>" class="badge bg-warning"><i class="bi bi-pencil" style="cursor: pointer;"></i></a>
                                            <form action="<?php echo e(route('deleteHistory', $data->id)); ?>" method="post"
                                                style="display: inline-block;">
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('DELETE'); ?>
                                                <button class="badge bg-danger border-0"
                                                    onclick="return confirm('Are You Sure ?')"><i
                                                        class="bi bi-trash3"></i></button>
                                            </form>
                                        </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('dashboard.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Files\2024\05 - Bengkel\bengkel\resources\views/history.blade.php ENDPATH**/ ?>