@php use App\Lib\MyHelper; $grantedFeature = session('granted_features'); date_default_timezone_set('Asia/Jakarta'); @endphp @extends('layouts.main-closed') @include('promocampaign::promocampaign_filter') @section('page-style') @endsection @section('page-plugin') @endsection @section('page-script') @yield('child-script') @endsection @section('content')

@include('layouts.notifications') @yield('filter') @if (!empty($search))

Displaying search result :

{{ $promoTotal }}


Reset
@endif
Promo Campaign List {{ Request::get('promo_type') }}
Promo Type : @if( Request::get('promo_type') == 'Product discount' )
Product Discount
@else Product Discount @endif @if( Request::get('promo_type') == 'Tier discount' )
Tier Discount
@else Tier Discount @endif @if( Request::get('promo_type') == 'Buy X Get Y' )
Buy X Get Y
@else Buy X get Y @endif All
@php $i = $promoPerPage; $now = date("Y-m-d H:i:s"); @endphp @if(!empty($promo)) @foreach($promo as $res) @php if( isset($res['date_start']) ) { $date_start = $res['date_start']; $date_end = $res['date_end']; } @endphp @endforeach @else @endif
No Name Creator Periode Code Type Promo Type Status Actions
{{ $i++ }} {{ $res['campaign_name'] }} {{ $res['user']['name'] }} Start : {{ date("d F Y", strtotime($date_start)) }} {{ date("H:i", strtotime($date_start)) }}
End   : {{ date("d F Y", strtotime($date_end)) }} {{ date("H:i", strtotime($date_end)) }}
{{$res['code_type']}} {{ $res['promo_type'] }} @if ( empty($res['step_complete']) ) Not Complete @elseif($date_end < $now) Ended @elseif($date_start <= $now) Started @elseif($date_start > $now) Not Started @endif @if(MyHelper::hasAccess([201], $grantedFeature)) @endif @if(MyHelper::hasAccess([204], $grantedFeature)) @if( isset($res['date_start']) ) @if ($res['date_start'] > date("Y-m-d H:i:s")) @endif @endif @endif
Promo Campaign not found
@if ($promoPaginator) {{ $promoPaginator->links() }} @endif
@endsection