54 lines
2 KiB
PHP
54 lines
2 KiB
PHP
@extends('layouts.main')
|
|
|
|
@section('content')
|
|
<h2>
|
|
<i class="fas fa-ticket-alt"></i>
|
|
{{ __('Coupons') }}
|
|
<a href="{{ route('coupon.create') }}" class="add-button">
|
|
<i class="fas fa-plus-square"></i>
|
|
{{ __('Ajouter') }}
|
|
</a>
|
|
</h2>
|
|
<div class="campagne-select"></div>
|
|
<div class="content-list">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>{{__('No') }}</th>
|
|
<th>{{__('Code de traitement') }}</th>
|
|
<th>{{__('Nom') }}</th>
|
|
<th>{{__('Valeur')}}</th>
|
|
<th>{{__('Quantité') }}</th>
|
|
<th>{{__('Qte restante') }}</th>
|
|
<th>{{__('Qte Diffusé') }}</th>
|
|
<th class="center">{{__('Publié ?')}}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($coupons as $c)
|
|
<tr>
|
|
<td>{{ $c->coupon_id }}</td>
|
|
<td><a href="{{ route('coupon.edit', $c) }}">{{ $c->coupon_code }}</a></td>
|
|
<td>{{ $c->coupon_name }}</td>
|
|
<td>{{ $c->coupon_value }} €</td>
|
|
<td>{{ $c->coupon_quantity }}</td>
|
|
<td>{{ $c->coupon_left }}</td>
|
|
<td>{{ $c->coupon_quantity - $c->coupon_left }}</td>
|
|
@if ( $c->coupon_published === 1)
|
|
<td class="pub center"><i data-couponid="{{ $c->coupon_id }}" class="fas fa-check-circle green unpublish"></i></td>
|
|
@else
|
|
<td class="pub center"><i data-couponid="{{ $c->coupon_id }}" class="fas fa-times-circle red publish"></i></td>
|
|
@endif
|
|
<th><a href="{{ route('coupon.destroy', $c) }}"><i class="fas fa-times delete-icon"></i></a></th>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<input type="hidden" name="csrf" id="csrf" value="<?= csrf_token(); ?>">
|
|
</div>
|
|
<form id="delete-hidden" method="POST">
|
|
@csrf
|
|
@method('DELETE')
|
|
</form>
|
|
@endsection
|