File: /var/www/javago-portal-updates/storage/framework/views/a3b70bff7b0b9f20c212625b133932352846b918.php
<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<div class="container mt-5">
<h2 class="mb-4">Generate Codes</h2>
<div class="card shadow mb-5">
<div class="card-body">
<form method="POST" action="<?php echo e($url); ?>">
<?php echo csrf_field(); ?>
<div class="row">
<div class="col-md-6 mb-3">
<label>PROMO CODE TYPE</label>
<select name="type" class="form-control" required>
<option value="">Select Promo Type</option>
<option value="year_free_then_fixed">1st Year Free, then �12.99/month</option>
<option value="month_free_then_discount">1st Month Free, then 15% Off for 1 Year</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label>NUMBER OF CODES TO GENERATE</label>
<input type="number" name="quantity" class="form-control" min="1" value="1" required />
</div>
</div>
<button type="submit" class="btn btn-primary">Generate Promo Codes</button>
</form>
</div>
</div>
<div class="card shadow">
<div class="card-body">
<h4 class="mb-3">Generated Promo Codes</h4>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead class="table-light">
<tr>
<th style="color: var(--coffee-dark);">Code</th>
<th style="color: var(--coffee-dark);">Type</th>
<th style="color: var(--coffee-dark);">Free Months</th>
<th style="color: var(--coffee-dark);">Fixed Price</th>
<th style="color: var(--coffee-dark);">Price / Discount</th>
<th style="color: var(--coffee-dark);">Discount Duration</th>
<th style="color: var(--coffee-dark);">Status</th>
<th style="color: var(--coffee-dark);">Created At</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $promoCodes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $code): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><?php echo e($code->code); ?></td>
<td><?php echo e($code->type); ?></td>
<td><?php echo e($code->free_months); ?></td>
<td>
<?php if($code->fixed_price): ?>
�<?php echo e($code->fixed_price); ?>
<?php else: ?>
-
<?php endif; ?>
</td>
<td>
<?php if($code->price): ?>
�<?php echo e($code->price); ?>
<?php elseif($code->discount_percent): ?>
<?php echo e($code->discount_percent); ?>%
<?php else: ?>
-
<?php endif; ?>
</td>
<td>
<?php if($code->discount_duration_months): ?>
<?php echo e($code->discount_duration_months); ?> Months
<?php else: ?>
-
<?php endif; ?>
</td>
<td>
<?php if($code->is_active == 1): ?>
<span class="badge bg-success">Active</span>
<?php else: ?>
<span class="badge bg-danger">Used</span>
<?php endif; ?> </td>
<td><?php echo e($code->created_at->format('Y-m-d H:i')); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="6" class="text-center text-muted">No promo codes found.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="d-flex justify-content-center mt-3">
<?php echo e($promoCodes->links('pagination::bootstrap-5')); ?>
</div>
</div>
</div>
</div>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH /var/www/javago-portal-updates/resources/views/admin/generate-codes.blade.php ENDPATH**/ ?>