|
|
@ -12,7 +12,7 @@
|
|
|
|
<img src="{{asset('panel/images/xshop-logo.svg')}}" class="avatar-x64" alt="">
|
|
|
|
<img src="{{asset('panel/images/xshop-logo.svg')}}" class="avatar-x64" alt="">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-9 pt-1">
|
|
|
|
<div class="col-9 pt-1">
|
|
|
|
{{__("Welcome bak")}}
|
|
|
|
{{__("Welcome back")}}
|
|
|
|
<h4 class="mt-2">
|
|
|
|
<h4 class="mt-2">
|
|
|
|
{{auth()->user()->name}}
|
|
|
|
{{auth()->user()->name}}
|
|
|
|
</h4>
|
|
|
|
</h4>
|
|
|
@ -24,24 +24,40 @@
|
|
|
|
{{__("Posts")}}
|
|
|
|
{{__("Posts")}}
|
|
|
|
</h5>
|
|
|
|
</h5>
|
|
|
|
{{number_format(auth()->user()->posts()->count())}}
|
|
|
|
{{number_format(auth()->user()->posts()->count())}}
|
|
|
|
|
|
|
|
<div class="progress" role="progressbar" style="height: 3px">
|
|
|
|
|
|
|
|
<div class="progress-bar"
|
|
|
|
|
|
|
|
style="width: {{auth()->user()->postsPercent()}}%"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<h5>
|
|
|
|
<h5>
|
|
|
|
{{__("Products")}}
|
|
|
|
{{__("Products")}}
|
|
|
|
</h5>
|
|
|
|
</h5>
|
|
|
|
{{number_format(auth()->user()->products()->count())}}
|
|
|
|
{{number_format(auth()->user()->products()->count())}}
|
|
|
|
|
|
|
|
<div class="progress" role="progressbar" style="height: 3px">
|
|
|
|
|
|
|
|
<div class="progress-bar bg-warning"
|
|
|
|
|
|
|
|
style="width: {{auth()->user()->productsPercent()}}%"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<h5>
|
|
|
|
<h5>
|
|
|
|
{{__("Comments")}}
|
|
|
|
{{__("Comments")}}
|
|
|
|
</h5>
|
|
|
|
</h5>
|
|
|
|
{{number_format(auth()->user()->comments()->count())}}
|
|
|
|
{{number_format(auth()->user()->comments()->count())}}
|
|
|
|
|
|
|
|
<div class="progress" role="progressbar" style="height: 3px">
|
|
|
|
|
|
|
|
<div class="progress-bar bg-danger"
|
|
|
|
|
|
|
|
style="width: {{auth()->user()->commentsPercent()}}%"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<div class="col-6 mt-3">
|
|
|
|
<h5>
|
|
|
|
<h5>
|
|
|
|
{{__("Tickets")}}
|
|
|
|
{{__("Tickets")}}
|
|
|
|
</h5>
|
|
|
|
</h5>
|
|
|
|
{{number_format(auth()->user()->tickets()->count())}}
|
|
|
|
{{number_format(auth()->user()->tickets()->count())}}
|
|
|
|
|
|
|
|
<div class="progress" role="progressbar" style="height: 3px">
|
|
|
|
|
|
|
|
<div class="progress-bar bg-success"
|
|
|
|
|
|
|
|
style="width: {{auth()->user()->ticketsPercent()}}%"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -58,7 +74,7 @@
|
|
|
|
<a href="#">
|
|
|
|
<a href="#">
|
|
|
|
<i class="ri-shopping-bag-4-line"></i>
|
|
|
|
<i class="ri-shopping-bag-4-line"></i>
|
|
|
|
<h2>
|
|
|
|
<h2>
|
|
|
|
{{number_format(\App\Models\Ticket::where('status','PAID')->count())}}
|
|
|
|
{{number_format(\App\Models\Invoice::where('status','PAID')->count())}}
|
|
|
|
</h2>
|
|
|
|
</h2>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -73,7 +89,7 @@
|
|
|
|
<a href="{{route('admin.ticket.index')}}">
|
|
|
|
<a href="{{route('admin.ticket.index')}}">
|
|
|
|
<i class="ri-customer-service-2-line"></i>
|
|
|
|
<i class="ri-customer-service-2-line"></i>
|
|
|
|
<h2>
|
|
|
|
<h2>
|
|
|
|
{{number_format(\App\Models\Invoice::where('status','PENDING')->count())}}
|
|
|
|
{{number_format(\App\Models\Ticket::where('status','PENDING')->count())}}
|
|
|
|
</h2>
|
|
|
|
</h2>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -83,17 +99,40 @@
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-12 mb-3 p-0" id="visitor-container">
|
|
|
|
<div class="col-lg-12 mb-3 p-0" id="visitor-container">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card skewed-container">
|
|
|
|
|
|
|
|
<i class="ri-bar-chart-box-line skewed-icon"></i>
|
|
|
|
<div class="card-header">
|
|
|
|
<div class="card-header">
|
|
|
|
{{__("last month visits")}}
|
|
|
|
{{__("last month visits")}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-body">
|
|
|
|
<canvas id="visitor-chart" height="300"></canvas>
|
|
|
|
<canvas id="visitor-chart"></canvas>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-lg-4 p-0 pe-lg-2 mb-3">
|
|
|
|
|
|
|
|
<div class="card skewed-container h-100">
|
|
|
|
|
|
|
|
<i class="ri-computer-line skewed-icon"></i>
|
|
|
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
|
|
|
{{__("Last month visitors devices")}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<canvas id="visitor-device"></canvas>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-lg-8 p-0 ps-lg-2 mb-3">
|
|
|
|
|
|
|
|
<div class="card skewed-container h-100">
|
|
|
|
|
|
|
|
<i class="ri-shopping-bag-3-line skewed-icon"></i>
|
|
|
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
|
|
|
{{__("Last week orders")}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<canvas id="orders-chart"></canvas>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
@endsection
|
|
|
@ -102,6 +141,11 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener('resize', function () {
|
|
|
|
|
|
|
|
// window.vchart.resize(1,1);
|
|
|
|
|
|
|
|
window.vchart.resize(null, 300);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
|
|
|
|
|
|
|
|
if (isPaintedChart) {
|
|
|
|
if (isPaintedChart) {
|
|
|
@ -110,10 +154,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
isPaintedChart = true;
|
|
|
|
isPaintedChart = true;
|
|
|
|
|
|
|
|
|
|
|
|
let ctx = document.getElementById('visitor-chart').getContext('2d');
|
|
|
|
|
|
|
|
let visits = @json($visits);
|
|
|
|
let visits = @json($visits);
|
|
|
|
document.getElementById('visitor-chart').setAttribute('width', document.querySelector('#visitor-container').clientWidth - 45);
|
|
|
|
let ctx = document.getElementById('visitor-chart').getContext('2d');
|
|
|
|
let chart = new window.chartjs(ctx, {
|
|
|
|
// document.getElementById('visitor-chart').setAttribute('width', document.querySelector('#visitor-container').clientWidth - 45);
|
|
|
|
|
|
|
|
window.vchart = new window.chartjs(ctx, {
|
|
|
|
// The type of chart we want to create
|
|
|
|
// The type of chart we want to create
|
|
|
|
type: 'line', // also try bar or other graph types
|
|
|
|
type: 'line', // also try bar or other graph types
|
|
|
|
|
|
|
|
|
|
|
@ -141,6 +185,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
// Configuration options
|
|
|
|
// Configuration options
|
|
|
|
options: {
|
|
|
|
options: {
|
|
|
|
|
|
|
|
maintainAspectRatio: false,
|
|
|
|
|
|
|
|
resizeDelay: 1000,
|
|
|
|
|
|
|
|
// aspectRatio: 6,
|
|
|
|
layout: {
|
|
|
|
layout: {
|
|
|
|
padding: 10,
|
|
|
|
padding: 10,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -149,10 +196,52 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
display: true,
|
|
|
|
text: 'Precipitation in Toronto'
|
|
|
|
text: 'Website visits traffic'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
let ctx2 = document.getElementById('visitor-device').getContext('2d');
|
|
|
|
|
|
|
|
// document.getElementById('visitor-chart').setAttribute('width', document.querySelector('#visitor-container').clientWidth - 45);
|
|
|
|
|
|
|
|
window.dchart = new window.chartjs(ctx2, {
|
|
|
|
|
|
|
|
// The type of chart we want to create
|
|
|
|
|
|
|
|
type: 'pie', // also try bar or other graph types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// The data for our dataset
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
labels: ['All visitors','Desktop', 'Mobile / Tablet',],
|
|
|
|
|
|
|
|
datasets: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label:"{{__('Devices')}}",
|
|
|
|
|
|
|
|
data: [{{$all_visitor}},{{$all_visitor - $mobiles_count}}, {{$mobiles_count}}],
|
|
|
|
|
|
|
|
backgroundColor: ['rgba(255,128,0,0.69)', 'rgba(255,0,54,0.56)','rgba(0,202,202,0.56)'],
|
|
|
|
|
|
|
|
hoverBackgroundColor: ['rgba(255,128,0,0.9)', 'rgba(255,0,54,0.9)','rgba(0,202,202,0.9)'],
|
|
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
|
|
borderColor: '#00000011'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Configuration options
|
|
|
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
maintainAspectRatio: false,
|
|
|
|
|
|
|
|
resizeDelay: 1000,
|
|
|
|
|
|
|
|
// aspectRatio: 6,
|
|
|
|
|
|
|
|
layout: {
|
|
|
|
|
|
|
|
padding: 10
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
legend: {
|
|
|
|
|
|
|
|
position: 'bottom',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
title: {
|
|
|
|
|
|
|
|
display: true,
|
|
|
|
|
|
|
|
text: 'Visitor device'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.dispatchEvent(new Event('resize'));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|