|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/liminfinity.edukrypt.in/resources/views/admin/promocodes/ |
Upload File : |
@extends('admin.layout')
@section('content')
<!-- begin::main content -->
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header">
<h3>Promocode</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Promocode List</li>
</ol>
</nav>
</div>
<!-- end::page header -->
<div class="row">
<div class="col-md-6">
<form action="" method="GET">
<div class="form-group col-md-8">
<input type="text" class="form-control" name="query" placeholder="Search here....." value="{{ request()->input('query') }}">
<span class="text-danger">@error('query'){{ $message }} @enderror</span>
</div>
</div>
<div class="form-group col-md-4">
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> Search</button>
<a href="{{asset('admin/promocode-list')}}" class="btn btn-primary"><i class="fa fa-refresh"></i> Reset</a>
</div>
</form>
</div>
<div class="card">
<div class="card-body">
<a href="{{asset('admin/add-promocode')}}" class="form-group btn btn-primary pull-right"><i class="fa fa-plus"></i> Add Promocode</a>
@if(isset($promocodes))
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Id</th>
<th>Code</th>
<th>Discount Type</th>
<th>Amount</th>
<th>Limit Value</th>
<th>Promo For</th>
<th>Promo Type</th>
<th>Date</th>
<th>Courses</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@if(!empty($promocodes))
@foreach($promocodes as $promocode)
<tr>
<td>{{$promocode->id}}</td>
<td>{{$promocode->code}}</td>
<td>{{$promocode->discount_type}}</td>
<td>{{$promocode->amount}}</td>
<td>{{$promocode->limit_value}}</td>
<td>{{$promocode->promo_for}}</td>
<td>
@if($promocode->promo_type == "1")
<label for="" class="text-success">Single Times</label>
@endif
@if($promocode->promo_type == "2")
<label for="" class="text-danger">Multiple Times</label>
@endif
</td>
<td>{{date("d-m-Y",strtotime($promocode->start_date))."To".date("d-m-Y",strtotime($promocode->end_date))}}</td>
<?php
if($promocode->promo_for == 'selected_courses'){
?>
<td><a href="{{asset('admin/map-course-list/'.$promocode->id)}}"><i class="fa fa-plus"></i></a></td>
<?php }else{ ?>
<td></td>
<?php } ?>
<td>
@if($promocode->status == 1)
<label for="" class="text-success">Active</label>
@endif
@if($promocode->status == 0)
<label for="" class="text-danger">Inactive</label>
@endif
</td>
<td>
<?php
$permission = App\Helpers\PermissionActivity::getPermissionByAdminId(session('loggedIn')['id'],16);
?>
@if($permission == 'read')
<a href="{{asset('admin/view-product/'.$promocode->id)}}"><i class="fa fa-eye text-primary"></i></a>
@endif
@if($permission == 'write')
<a href="{{asset('admin/view-promocode/'.$promocode->id)}}"><i class="fa fa-eye text-primary"></i></a>
<a href="{{asset('admin/edit-promocode/'.$promocode->id)}}"><i class="fa fa-edit text-success"></i></a>
@endif
@if($permission == 'delete')
<a href="{{asset('admin/view-promocode/'.$promocode->id)}}"><i class="fa fa-eye text-primary"></i></a>
<a href="{{asset('admin/edit-promocode/'.$promocode->id)}}"><i class="fa fa-edit text-success"></i></a>
<a href="{{asset('admin/delete-promocode/'.$promocode->id)}}" class="delete-confirm" ><i class="fa fa-trash text-danger"></i></a>
@endif
</td>
</tr>
@endforeach
@else
<h1>No Record Found!!</h1>
@endif
</tbody>
</table>
<div class="pagination-block">
@if(isset($_GET['query']))
{{ $promocodes->appends(['query' => $_GET['query']])->links('admin.includes.paginationlinks') }}
@else
{{ $promocodes->links('admin.includes.paginationlinks') }}
@endif
<label>Total Record Found- <?php echo count($promocodes) ?></label>
</div>
@endif
</div>
</div>
</div>
</main>
<!-- end::main content -->
@endsection
@push('footer-script')
<!-- begin::dataTable -->
<script src="{{asset('public/admin/js/examples/datatable.js')}}"></script>
<!-- end::dataTable -->
@endpush