

<?php $__env->startSection('title','Riwayat Pembelian'); ?>

<?php $__env->startSection('content'); ?>

<div class="container">

    <h2 class="mb-4 fw-bold">
        🧾 Riwayat Pembelian Tiket
    </h2>

    <?php if(session('success')): ?>

        <div class="alert alert-success">

            <?php echo e(session('success')); ?>


        </div>

    <?php endif; ?>

    <?php if(session('error')): ?>

        <div class="alert alert-danger">

            <?php echo e(session('error')); ?>


        </div>

    <?php endif; ?>

    <?php if($transaksis->count()==0): ?>

        <div class="alert alert-warning">

            Anda belum pernah membeli tiket.

        </div>

    <?php else: ?>

        <div class="table-responsive">

            <table class="table table-bordered table-hover">

                <thead class="table-dark">

                    <tr>

                        <th>No</th>

                        <th>Event</th>

                        <th>Jenis Tiket</th>

                        <th>Harga</th>

                        <th>Jumlah</th>

                        <th>Total</th>

                        <th>Status</th>

                        <th>Tanggal</th>

                    </tr>

                </thead>

                <tbody>

                    <?php $__currentLoopData = $transaksis; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$transaksi): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                    <tr>

                        <td>

                            <?php echo e((($transaksis->currentPage()-1)*$transaksis->perPage())+$key); ?>


                        </td>

                        <td>

                            <?php echo e($transaksi->tiket->event->nama_event ?? '-'); ?>


                        </td>

                        <td>

                            <?php echo e($transaksi->tiket->jenis ?? '-'); ?>


                        </td>

                        <td>

                            Rp <?php echo e(number_format($transaksi->tiket->harga ?? 0,0,',','.')); ?>


                        </td>

                        <td>

                            <?php echo e($transaksi->jumlah); ?>


                        </td>

                        <td>

                            Rp <?php echo e(number_format($transaksi->total_harga,0,',','.')); ?>


                        </td>

                        <td>

                            <?php if($transaksi->status=="Pending"): ?>

                                <span class="badge bg-warning text-dark">

                                    Pending

                                </span>

                            <?php elseif($transaksi->status=="Confirmed"): ?>

                                <span class="badge bg-success">

                                    Confirmed

                                </span>

                            <?php elseif($transaksi->status=="Rejected"): ?>

                                <span class="badge bg-danger">

                                    Rejected

                                </span>

                            <?php else: ?>

                                <span class="badge bg-secondary">

                                    <?php echo e($transaksi->status); ?>


                                </span>

                            <?php endif; ?>

                        </td>

                        <td>

                            <?php echo e($transaksi->created_at->format('d M Y H:i')); ?>


                        </td>

                    </tr>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </tbody>

            </table>

        </div>

        <div class="mt-3">

            <?php echo e($transaksis->links()); ?>


        </div>

    <?php endif; ?>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\tugas pa asur\konser-ticket\resources\views/user/riwayat.blade.php ENDPATH**/ ?>