@extends('Layouts/dashboard')
@section('submenu')
@if (isset($company) && $company)
@include(
'Plugins/Payment/Views/Elements/Order/company_list_submenu',
[
'extra' => view(
'Plugins/Payment/Views/Elements/Coupon/add_submenu',
['company' => $company]
)
]
)
@else
@include(
'Plugins/Payment/Views/Elements/Order/list_submenu',
[
'extra' => view(
'Plugins/Payment/Views/Elements/Coupon/add_submenu',
['venue' => isset($venue) ? $venue : null]
)
]
)
@endif
{{-- @include('Elements/Venue/submenu') --}}
@endsection
@section('content')
{!! Form::open(['class' => 'form-inline mb', 'method' => 'get']) !!}
{!! Form::text(
'data[code]',
(isset($filter->code) ? $filter->code : null),
[
'class' => 'form-control',
'placeholder' => t('Coupon Code')
]
) !!}
{!! Form::close() !!}
{!! pagination_sort('name', t('Name')) !!} |
{{ __('Type') }} |
{{ __('Code') }} |
{{ __('Discount') }} |
{{ __('Limits') }} |
{{ __('Valid') }} |
{!! pagination_sort('created', t('Created')) !!} |
{{ __('ID') }} |
|
@foreach ($data as $row)
{{ $row->name }} |
{{ $row->type }} |
{{ $row->code }} |
@if($row->type == 'percentage')
{{ __('%s%%', $row->discount) }}
@endif
@if ($row->type == 'qty')
{{ __('buy %s get %s free', [$row->discount_buy, $row->discount_free]) }}
@endif
@if ($row->type == 'fixed' || $row->type == 'fixed-total')
{{ __('£%s', $row->discount) }}
@endif
@if ($row->type == 'fixed-person' || $row->type == 'fixed-qty')
{{ __('£%s/each', $row->discount) }}
@endif
|
@if ($row->total)
{{ __('Total coupons: ' . $row->total) }}
@endif
@if ($row->total_per_user)
{{ __('Total coupons per user: ' . $row->total_per_user) }}
@endif
@if ($row->total_per_user_per_day)
{{ __('Total coupons per user per day: ' . $row->total_per_user_per_day) }}
@endif
|
@if ($row->start && $row->end)
@date($row->start) - @date($row->end)
@else
@if ($row->start || $row->end)
@if ($row->start)
{{ __('From ') }} @date($row->start)
@endif
@if ($row->end)
{{ __('until ') }} @date($row->end)
@endif
@else
{{ __('endless') }}
@endif
@endif
|
@timestamp($row->created) |
{{ $row->id }} |
|
@endforeach
{!! pagination(['total' => $pagination_total]) !!}
@t('Import Coupons')
@include(
'Elements/Common/modal',
[
'title' => __('Import Coupons (CSV)'),
'form' => [
'action' => $import_url,
'method' => 'post',
'id' => 'import',
'enctype' => "multipart/form-data"
],
'content' => view(
'Plugins/Payment/Views/Elements/Coupon/modal_form'
)
]
)
@endsection