Viewing file: overview.blade.php (5.17 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.customer')
@section('title', trans('customer.Campaign_Overview'))
@section('extra-css') <link rel="stylesheet" href="{{asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')}}"> <link rel="stylesheet" href="{{asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')}}"> @endsection
@section('content') <!-- Main content --> <section class="content"> <div class="row">
<div class="col-md-6"> <div class="small-box"> <div class="inner"> <p class="dashboard_counter mb-2">{{count($overviews)}}</p>
<h4>{{trans('customer.Total_Clicked')}}</h4> </div> <div class="icon total-inbox-icon"> <i class="fa fa-envelope-open" aria-hidden="true"></i> </div> </div> </div> <div class="col-md-6"> <div class="small-box"> <div class="inner"> <p class="dashboard_counter mb-2">{{$total_contact}}</p>
<h4>{{trans('customer.Total_Contacts')}}</h4> </div> <div class="icon total-sent-icon"> <i class="fa fa-star" aria-hidden="true"></i> </div> </div> </div>
<div class="col-md-12 mb-4 mt-2"> <div class="row"> <div class="col-md-6 col-8"> <select name="short_url" id="short_url" class="form-control"> <option value="">{{trans('--Select URL--')}}</option> @foreach($short_links as $short_link) <option value="{{$short_link->id}}">{{$short_link->url}}</option> @endforeach </select> </div> <div class="col-md-6 col-8"> <div class="pt-1"> <strong class="url_result"> {{trans('customer.url_statistic')}} </strong> </div> </div>
</div> </div>
<div class="col-md-12"> <div class="card"> <div class="card-body"> <table id="contacts" class="table table-striped bg-white table-bordered dt-responsive nowrap"> <thead> <tr> <th scope="col">#</th> <th scope="col">{{trans('customer.name')}}</th> <th scope="col">{{trans('customer.number')}}</th> <th scope="col">{{trans('customer.url')}}</th> <th scope="col">{{trans('customer.ip_address')}}</th> <th scope="col">{{trans('customer.clicked_at')}}</th> </tr> </thead> <tbody> @if($overviews->isNotEmpty()) @foreach($overviews as $key=>$overview) <tr> <td>{{++$key}}</td> <td>{{$overview->contact->fullname}}</td> <td>{{$overview->number}}</td> <td>{{$overview->short_link->url}}</td> <td>{{$overview->ip_address}}</td> <td>{{$overview->created_at->format('d-m-Y h:i A')}}</td> </tr> @endforeach @else <tr class="text-center"> <td colspan="5">No Data Available</td> </tr> @endif </tbody>
</table> </div> </div> </div>
<!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> @endsection
@section('extra-scripts') <script> "use strict";
$(".show-more").css('overflow', 'hidden').readmore({collapsedHeight: 20});
$(document).on('change', '#short_url', function(e){ const id=$(this).val();
$.ajax({ type:'GET', url:'{{route('customer.shortlink.url.statistic')}}', data:{ id:id, campaign_id:'{{$campaign_id}}' },
success:function(res){
if(res.status=='success'){ $('.url_result').text('Total Clicked: '+res.clicked); }else{ $('.url_result').text('Select URL To See Statistic'); }
} }) }) </script> @endsection
|