

<?php $__env->startSection('title','Edit Transaksi'); ?>

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

<div class="container" style="max-width:920px">
    <div class="card-modern p-4">
        <h3 class="mb-2">Edit Transaksi</h3>

        <?php if($errors->any()): ?>
            <div class="alert alert-danger"><ul class="mb-0"><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($error); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul></div>
        <?php endif; ?>

        <form action="<?php echo e(route('transaksi.update',$transaksi->id)); ?>" method="POST">
            <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
            <div class="row g-3">
                <div class="col-md-6">
                    <label class="form-label small">Tiket</label>
                    <select name="tiket_id" class="form-control input-rounded">
                        <?php $__currentLoopData = $tikets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tiket): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($tiket->id); ?>" <?php echo e($transaksi->tiket_id==$tiket->id ? 'selected':''); ?>><?php echo e($tiket->event->nama_event); ?> - <?php echo e($tiket->jenis); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
                <div class="col-md-6">
                    <div class="floating-label">
                        <input type="text" name="nama_pembeli" class="input-rounded form-control" placeholder=" " value="<?php echo e(old('nama_pembeli',$transaksi->nama_pembeli)); ?>" required>
                        <label>Nama Pembeli</label>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="floating-label">
                        <input type="number" name="jumlah" class="input-rounded form-control" placeholder=" " value="<?php echo e(old('jumlah',$transaksi->jumlah)); ?>" required>
                        <label>Jumlah</label>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="floating-label">
                        <input type="number" name="total_harga" class="input-rounded form-control" placeholder=" " value="<?php echo e(old('total_harga',$transaksi->total_harga)); ?>" required>
                        <label>Total Harga (Rp)</label>
                    </div>
                </div>

                <div class="col-md-4">
                    <label class="form-label small">Metode Pembayaran</label>
                    <select name="metode_pembayaran" class="form-control input-rounded">
                        <option value="Pending" <?php echo e($transaksi->metode_pembayaran=="Pending" ? 'selected':''); ?>>Pending</option>
                        <option value="Confirmed" <?php echo e($transaksi->metode_pembayaran=="Confirmed" ? 'selected':''); ?>>Confirmed</option>
                        <option value="Rejected" <?php echo e($transaksi->metode_pembayaran=="Rejected" ? 'selected':''); ?>>Rejected</option>
                    </select>
                </div>

                <div class="col-md-4">
                    <label class="form-label small">Status</label>
                    <select name="status" class="form-control input-rounded">
                        <option value="Pending" <?php echo e($transaksi->status=="Pending" ? 'selected':''); ?>>Pending</option>
                        <option value="Confirmed" <?php echo e($transaksi->status=="Confirmed" ? 'selected':''); ?>>Confirmed</option>
                        <option value="Rejected" <?php echo e($transaksi->status=="Rejected" ? 'selected':''); ?>>Rejected</option>
                    </select>
                </div>
            </div>

            <div class="mt-3 d-flex gap-2">
                <button class="btn btn-primary">Update</button>
                <a href="<?php echo e(route('transaksi.index')); ?>" class="btn btn-outline-secondary">Batal</a>
            </div>
        </form>
    </div>
</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/transaksi/edit.blade.php ENDPATH**/ ?>