ctrlpanel/resources/views/admin/vouchers/index.blade.php

98 lines
3.3 KiB
PHP
Raw Normal View History

2021-07-09 22:11:13 +00:00
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
2021-12-13 09:12:32 +00:00
<h1>{{__('Vouchers')}}</h1>
2021-07-09 22:11:13 +00:00
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
2021-12-13 09:12:32 +00:00
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
2021-07-09 22:11:13 +00:00
<li class="breadcrumb-item"><a class="text-muted"
2021-12-13 09:12:32 +00:00
href="{{route('admin.vouchers.index')}}">{{__('Vouchers')}}</a></li>
2021-07-09 22:11:13 +00:00
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
2021-12-13 09:12:32 +00:00
<h5 class="card-title"><i class="fas fa-money-check-alt mr-2"></i>{{__('Vouchers')}}</h5>
2021-07-09 22:18:22 +00:00
<a href="{{route('admin.vouchers.create')}}" class="btn btn-sm btn-primary"><i
2021-12-13 09:12:32 +00:00
class="fas fa-plus mr-1"></i>{{__('Create new')}}</a>
2021-07-09 22:11:13 +00:00
</div>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">
<thead>
<tr>
2021-12-13 09:12:32 +00:00
<th>{{__('Status')}}</th>
<th>{{__('Code')}}</th>
<th>{{__('Memo')}}</th>
<th>{{CREDITS_DISPLAY_NAME}}</th>
2021-12-13 09:12:32 +00:00
<th>{{__('Used / Uses')}}</th>
<th>{{__('Expires')}}</th>
2021-07-09 22:11:13 +00:00
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<!-- END CUSTOM CONTENT -->
</section>
<!-- END CONTENT -->
<script>
function submitResult() {
2021-12-13 09:12:32 +00:00
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
2021-07-09 22:11:13 +00:00
}
document.addEventListener("DOMContentLoaded", function () {
$('#datatable').DataTable({
2021-12-13 21:39:40 +00:00
language: {
2022-08-17 08:33:44 +00:00
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
2021-12-13 21:39:40 +00:00
},
2021-07-09 22:11:13 +00:00
processing: true,
serverSide: true,
stateSave: true,
2021-07-09 22:18:22 +00:00
ajax: "{{route('admin.vouchers.datatable')}}",
2021-07-09 22:11:13 +00:00
columns: [
2021-07-09 22:18:22 +00:00
{data: 'status'},
{data: 'code'},
{data: 'memo'},
{data: 'credits'},
{data: 'uses'},
{data: 'expires_at'},
2021-07-09 22:11:13 +00:00
{data: 'actions', sortable: false},
],
fnDrawCallback: function( oSettings ) {
$('[data-toggle="popover"]').popover();
}
});
});
</script>
@endsection