@push('styles') @endpush @php $dataCount = count($data); @endphp
@php $fields = [ 'no_sent_message_3' => 'No. of Sent Message (3 Days)', 'no_sent_message_7' => 'No. of Sent Message (7 Days)', 'customer_spam_3_perc' => 'Customer spam % (3 Days)', 'customer_spam_7_perc' => 'Customer spam % (7 Days)', 'stop_opt_out_perc_3' => 'Stop opted out % (3 Days)', 'stop_opt_out_perc_7' => 'Stop opted out % (7 Days)' ]; @endphp
Total User(s): {{$data->total()}}
@php $nameOrder = $emailOrder = $noSentMessage3Order = $noSentMessage7Order = $customerSpam3Order = $customerSpam7Order = $stopOptOutPerc3Order = $stopOptOutPerc7Order = $brandIdOrder = $campaignIdOrder = $createdAtOrder = $ageOrder = $noOfPhoneOrder = ''; $nameSort = $emailSort = $noSentMessage3Sort = $noSentMessage7Sort = $customerSpam3Sort = $customerSpam7Sort = $stopOptOutPerc3Sort = $stopOptOutPerc7Sort = $brandIdSort = $campaignIdSort = $createdAtSort = $ageSort = $noOfPhoneSort = ''; $sortField = request()->get('sort_field'); $sortOrder = request()->get('sort_order'); if(!empty($sortField)): $sortFieldArray = [ 'name' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'name'], 'email' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'email'], 'no_sent_message_3' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'noSentMessage3'], 'no_sent_message_7' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'noSentMessage7'], 'customer_spam_3_perc' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'customerSpam3'], 'customer_spam_7_perc' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'customerSpam7'], 'stop_opt_out_perc_3' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'stopOptOutPerc3'], 'stop_opt_out_perc_7' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'stopOptOutPerc7'], 'brand_id' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'brandId'], 'campaign_id' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'campaignId'], 'created_at' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'createdAt'], 'age' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'age'], 'phone_number' => ['ASC' => 'ASC', 'DESC' => 'DESC', 'variableName' => 'noOfPhone'], ]; $sortOrder = strtoupper($sortOrder); if(isset($sortFieldArray[$sortField]) && isset($sortFieldArray[$sortField][$sortOrder]) ): $orderName = $sortFieldArray[$sortField]['variableName'].'Order'; $sortName = $sortFieldArray[$sortField]['variableName'].'Sort'; $$orderName = ($sortOrder == 'ASC') ? 'sorting_asc':'sorting_desc'; $$sortName = $sortOrder; endif; else: $createdAtOrder = 'sorting_desc'; $createdAtSort = 'DESC'; endif; @endphp @php $providers = getMessagingAPI(); @endphp @if ($dataCount > 0) @foreach ($data as $d) @endforeach @else @endif @if($data->total() > 0) {!! $data->appends(request()->input())->onEachSide(3)->links() !!} @endif
@push('scripts') @endpush