feat: airing proof theme statistic
This commit is contained in:
parent
5c18d6384a
commit
9514ce0be2
@ -5,6 +5,7 @@
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\IssueManagement;
|
||||
use App\Models\MediaMonitoring;
|
||||
use App\Models\Report;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@ -31,8 +32,8 @@ public function index(Request $request){
|
||||
],
|
||||
[
|
||||
'name' => 'Laporan Bukti Tayang',
|
||||
'category' => 'reports',
|
||||
'is_available' => false
|
||||
'category' => 'airing-proof-reports',
|
||||
'is_available' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Media',
|
||||
@ -91,7 +92,6 @@ public function show(Request $request, $category){
|
||||
'login-activities',
|
||||
'journalists',
|
||||
'media-cooperations',
|
||||
'reports',
|
||||
'media',
|
||||
'cooperation-completions',
|
||||
'users',
|
||||
@ -104,20 +104,31 @@ public function show(Request $request, $category){
|
||||
return redirect()->back()->with('waiting-status', 'Dalam pegembangan');
|
||||
}
|
||||
|
||||
$year = $request->input('year') ? $request->input('year') : Carbon::now()->year;
|
||||
$year = $request->input('year', Carbon::now()->year);
|
||||
$from_month = $request->input('from_month', null);
|
||||
$to_month = $request->input('to_month', null);
|
||||
|
||||
switch($category){
|
||||
case 'media-monitorings-issue-management':
|
||||
$data['title'] = 'Statistik Monitoring Media & Manajemen Isu';
|
||||
|
||||
// Statistik Isu
|
||||
$issues = IssueManagement::with(['mediaMonitoring']);
|
||||
$mediaMonitorings = MediaMonitoring::with(['issue']);
|
||||
|
||||
if($year !== 'all'){
|
||||
if($year && $year !== 'all'){
|
||||
$issues->whereYear('created_at', $year);
|
||||
$mediaMonitorings->whereYear('created_at', $year);
|
||||
}
|
||||
|
||||
if($from_month && $to_month){
|
||||
$start = Carbon::parse($from_month)->startOfMonth();
|
||||
$end = Carbon::parse($to_month)->endOfMonth();
|
||||
|
||||
$issues->whereBetween('created_at', [$start, $end]);
|
||||
$mediaMonitorings->whereBetween('created_at', [$start, $end]);
|
||||
}
|
||||
|
||||
$issues = $issues->get();
|
||||
$mediaMonitorings = $mediaMonitorings->get();
|
||||
|
||||
@ -162,15 +173,27 @@ public function show(Request $request, $category){
|
||||
});
|
||||
|
||||
$mediaMonitoringWithoutIssue = MediaMonitoring::doesntHave('issue')
|
||||
->when($year !== 'all', function ($query) use ($year) {
|
||||
->when($year && $year !== 'all', function ($query) use ($year) {
|
||||
$query->whereYear('created_at', $year);
|
||||
})
|
||||
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
|
||||
$start = Carbon::parse($from_month)->startOfMonth();
|
||||
$end = Carbon::parse($to_month)->endOfMonth();
|
||||
|
||||
$query->whereBetween('created_at', [$start, $end]);
|
||||
})
|
||||
->get();
|
||||
|
||||
$mediaMonitoringWithIssue = MediaMonitoring::has('issue')
|
||||
->when($year !== 'all', function ($query) use ($year) {
|
||||
->when($year && $year !== 'all', function ($query) use ($year) {
|
||||
$query->whereYear('created_at', $year);
|
||||
})
|
||||
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
|
||||
$start = Carbon::parse($from_month)->startOfMonth();
|
||||
$end = Carbon::parse($to_month)->endOfMonth();
|
||||
|
||||
$query->whereBetween('created_at', [$start, $end]);
|
||||
})
|
||||
->get();
|
||||
|
||||
$data['mediaMonitoringWithoutIssueCount'] = $mediaMonitoringWithoutIssue->count();
|
||||
@ -180,9 +203,59 @@ public function show(Request $request, $category){
|
||||
$data['issueManagementMonthly'] = $issueManagementMonthly;
|
||||
|
||||
return view('dashboard.statistics.show.media-monitoring-issue-management', $data);
|
||||
case 'issue-managements':
|
||||
$data['title'] = 'Statistik Manajemen Isu';
|
||||
break;
|
||||
case 'airing-proof-reports':
|
||||
$data['title'] = 'Statistik Laporan Bukti Tayang';
|
||||
|
||||
$airingProofReport = Report::with(['order', 'media'])->get();
|
||||
$airingProofThemeCount = $airingProofReport->groupBy('status')->map(function ($group) {
|
||||
return $group->count();
|
||||
});
|
||||
|
||||
// Inisialisasi array 12 bulan untuk masing-masing status
|
||||
$monthlyStatus = [
|
||||
'waiting' => array_fill(0, 12, 0),
|
||||
'accepted' => array_fill(0, 12, 0),
|
||||
'rejected' => array_fill(0, 12, 0),
|
||||
];
|
||||
|
||||
// Kelompokkan data berdasarkan status lalu bulan
|
||||
$airingProofReport->groupBy('status')->each(function ($groupedByStatus, $status) use (&$monthlyStatus) {
|
||||
$label = match ((int)$status) {
|
||||
0 => 'waiting',
|
||||
1 => 'accepted',
|
||||
2 => 'rejected',
|
||||
default => null,
|
||||
};
|
||||
|
||||
if ($label) {
|
||||
$groupedByStatus->groupBy(function ($item) {
|
||||
return (int)$item->created_at->format('m'); // bulan sebagai angka 1–12
|
||||
})->each(function ($items, $month) use (&$monthlyStatus, $label) {
|
||||
$monthlyStatus[$label][$month - 1] = $items->count();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$monthlyCount = array_fill(0, 12, 0);
|
||||
|
||||
$airingProofReport->groupBy(function ($item) {
|
||||
return (int) \Carbon\Carbon::parse($item->publication_date)->format('m');
|
||||
})->each(function ($items, $month) use (&$monthlyCount) {
|
||||
// Simpan jumlah item tiap bulan ke index bulan - 1 (0-based)
|
||||
$monthlyCount[$month - 1] = $items->count();
|
||||
});
|
||||
|
||||
// Simpan ke variabel `$data`
|
||||
$data['airingProofReportStatusMonthly'] = $monthlyStatus;
|
||||
$data['airingProofReportPublicationMonthly'] = $monthlyCount;
|
||||
|
||||
$data['proofAiringThemeWaiting'] = $airingProofThemeCount->get('0', 0);
|
||||
$data['proofAiringThemeAccepted'] = $airingProofThemeCount->get('1', 0);
|
||||
$data['proofAiringThemeRejected'] = $airingProofThemeCount->get('2', 0);
|
||||
|
||||
return view('dashboard.statistics.show.airing-proof-report', $data);
|
||||
default:
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,3 +175,9 @@ .link-show{
|
||||
.not-available-text{
|
||||
color: rgb(195, 195, 195) !important;
|
||||
}
|
||||
|
||||
.apexcharts-xaxis text {
|
||||
fill: #000 !important;
|
||||
font-size: 12px !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
@ -0,0 +1,259 @@
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
!function (NioApp, $) {
|
||||
"use strict";
|
||||
|
||||
@if(is_role(['1']))
|
||||
var proofAiringThemeStatus = {
|
||||
labels: ["Menunggu", "Diterima", "Ditolak"],
|
||||
dataUnit: 'Data',
|
||||
legend: false,
|
||||
datasets: [{
|
||||
borderColor: "#fff",
|
||||
background: ["#FFCC00", "#0065F8", "#CB0404"],
|
||||
data: ["{{$proofAiringThemeWaiting}}", "{{$proofAiringThemeAccepted}}", "{{$proofAiringThemeRejected}}"]
|
||||
}]
|
||||
};
|
||||
|
||||
@elseif(is_role(['5']))
|
||||
var cooperationCompletionsStatistics = {
|
||||
labels: ["Menunggu", "Diterima", "Ditolak"],
|
||||
dataUnit: 'Data',
|
||||
legend: false,
|
||||
datasets: [{
|
||||
borderColor: "#fff",
|
||||
background: ["#FFB200", "#5CB338", "#E50046"],
|
||||
data: ["{{$cooperationCompletionWaiting}}", "{{$cooperationCompletionAccepted}}", "{{$cooperationCompletionRejected}}"]
|
||||
}]
|
||||
};
|
||||
@endif
|
||||
|
||||
function ecommerceDoughnutS1(selector, set_data) {
|
||||
var $selector = selector ? $(selector) : $('.ecommerce-doughnut-s1');
|
||||
$selector.each(function () {
|
||||
var $self = $(this),
|
||||
_self_id = $self.attr('id'),
|
||||
_get_data = typeof set_data === 'undefined' ? eval(_self_id) : set_data;
|
||||
|
||||
var selectCanvas = document.getElementById(_self_id).getContext("2d");
|
||||
var chart_data = [];
|
||||
|
||||
for (var i = 0; i < _get_data.datasets.length; i++) {
|
||||
chart_data.push({
|
||||
backgroundColor: _get_data.datasets[i].background,
|
||||
borderWidth: 2,
|
||||
borderColor: _get_data.datasets[i].borderColor,
|
||||
hoverBorderColor: _get_data.datasets[i].borderColor,
|
||||
data: _get_data.datasets[i].data
|
||||
});
|
||||
}
|
||||
|
||||
var chart = new Chart(selectCanvas, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: _get_data.labels,
|
||||
datasets: chart_data
|
||||
},
|
||||
options: {
|
||||
legend: {
|
||||
display: _get_data.legend ? _get_data.legend : false,
|
||||
rtl: NioApp.State.isRTL,
|
||||
labels: {
|
||||
boxWidth: 12,
|
||||
padding: 20,
|
||||
fontColor: '#6783b8'
|
||||
}
|
||||
},
|
||||
rotation: -1.5,
|
||||
cutoutPercentage: 70,
|
||||
maintainAspectRatio: false,
|
||||
tooltips: {
|
||||
enabled: true,
|
||||
rtl: NioApp.State.isRTL,
|
||||
callbacks: {
|
||||
title: function title(tooltipItem, data) {
|
||||
return data['labels'][tooltipItem[0]['index']];
|
||||
},
|
||||
label: function label(tooltipItem, data) {
|
||||
return data.datasets[tooltipItem.datasetIndex]['data'][tooltipItem['index']] + ' ' + _get_data.dataUnit;
|
||||
}
|
||||
},
|
||||
backgroundColor: '#1c2b46',
|
||||
titleFontSize: 13,
|
||||
titleFontColor: '#fff',
|
||||
titleMarginBottom: 6,
|
||||
bodyFontColor: '#fff',
|
||||
bodyFontSize: 12,
|
||||
bodySpacing: 4,
|
||||
yPadding: 10,
|
||||
xPadding: 10,
|
||||
footerMarginTop: 0,
|
||||
displayColors: false
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} // init chart
|
||||
|
||||
|
||||
NioApp.coms.docReady.push(function () {
|
||||
ecommerceDoughnutS1();
|
||||
});
|
||||
}(NioApp, jQuery);
|
||||
</script>
|
||||
<script>
|
||||
const monthlyStatusData = @json($airingProofReportStatusMonthly);
|
||||
|
||||
const statusOptions = {
|
||||
series: [
|
||||
{
|
||||
name: 'Menunggu',
|
||||
data: monthlyStatusData.waiting
|
||||
},
|
||||
{
|
||||
name: 'Diterima',
|
||||
data: monthlyStatusData.accepted
|
||||
},
|
||||
{
|
||||
name: 'Ditolak',
|
||||
data: monthlyStatusData.rejected
|
||||
}
|
||||
],
|
||||
colors: ['#FFA500', '#28a745', '#dc3545'],
|
||||
chart: {
|
||||
type: 'bar',
|
||||
height: 350
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
horizontal: false,
|
||||
columnWidth: '55%',
|
||||
borderRadius: 1,
|
||||
borderRadiusApplication: 'end'
|
||||
},
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false
|
||||
},
|
||||
stroke: {
|
||||
show: true,
|
||||
width: 1,
|
||||
colors: ['transparent']
|
||||
},
|
||||
xaxis: {
|
||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
labels: {
|
||||
show: true,
|
||||
rotate: -45,
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Helvetica, Arial, sans-serif',
|
||||
}
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
title: {
|
||||
text: 'Status Laporan Bukti Tayang'
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: 1
|
||||
},
|
||||
tooltip: {
|
||||
y: {
|
||||
formatter: function (val) {
|
||||
return val + " laporan bukti tayang"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const statusChart = new ApexCharts(document.querySelector("#airingProofThemeColumn"), statusOptions);
|
||||
statusChart.render();
|
||||
</script>
|
||||
<script>
|
||||
const monthlyTotalData = @json($airingProofReportPublicationMonthly);
|
||||
var publicationOptions = {
|
||||
series: [{
|
||||
name: 'Publikasi',
|
||||
data: monthlyTotalData
|
||||
}],
|
||||
chart: {
|
||||
height: 350,
|
||||
type: 'bar',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
borderRadius: 3,
|
||||
dataLabels: {
|
||||
position: 'center', // top, center, bottom
|
||||
},
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
formatter: function (val) {
|
||||
return val + " data";
|
||||
},
|
||||
offsetY: -20,
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: ["#304758"]
|
||||
}
|
||||
},
|
||||
|
||||
xaxis: {
|
||||
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
position: 'top',
|
||||
axisBorder: {
|
||||
show: false
|
||||
},
|
||||
axisTicks: {
|
||||
show: false
|
||||
},
|
||||
crosshairs: {
|
||||
fill: {
|
||||
type: 'gradient',
|
||||
gradient: {
|
||||
colorFrom: '#3572EF',
|
||||
colorTo: '#3ABEF9',
|
||||
stops: [0, 100],
|
||||
opacityFrom: 0.4,
|
||||
opacityTo: 0.5,
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
axisBorder: {
|
||||
show: false
|
||||
},
|
||||
axisTicks: {
|
||||
show: false,
|
||||
},
|
||||
labels: {
|
||||
show: false,
|
||||
formatter: function (val) {
|
||||
return val + " data";
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
title: {
|
||||
text: 'Publikasi Laporan Bukti Tayang',
|
||||
floating: true,
|
||||
offsetY: 330,
|
||||
align: 'center',
|
||||
style: {
|
||||
color: '#444'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var publicationChart = new ApexCharts(document.querySelector("#airingProofThemePublicationColumn"), publicationOptions);
|
||||
publicationChart.render();
|
||||
</script>
|
||||
@ -0,0 +1,171 @@
|
||||
@include('partials.dashboard.head')
|
||||
@include('partials.dashboard.sidebar', ['page' => 'statistics'])
|
||||
@include('partials.dashboard.header')
|
||||
<!-- content @s -->
|
||||
<div class="nk-content ">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block-head nk-block-head-sm">
|
||||
<div class="nk-block-between">
|
||||
<div class="nk-block-head-content">
|
||||
<h3 class="nk-block-title page-title">{{$title}}</h3>
|
||||
{{-- <div class="nk-block-des text-soft">
|
||||
<p>Data: Tahun {{$data_year}}</p>
|
||||
</div> --}}
|
||||
</div><!-- .nk-block-head-content -->
|
||||
{{-- {{dd($cooperationRequests)}} --}}
|
||||
<div class="nk-block-head-content">
|
||||
<div class="toggle-wrap nk-block-tools-toggle">
|
||||
<a href="#" class="btn btn-icon btn-trigger toggle-expand me-n1" data-target="pageMenu"><em class="icon ni ni-more-v"></em></a>
|
||||
<div class="toggle-expand-content" data-content="pageMenu">
|
||||
<ul class="nk-block-tools g-3">
|
||||
<li>
|
||||
<div>
|
||||
<a href="{{route('dashboard.statistics.index')}}" class="btn btn-white btn-dim btn-outline-light"><em class="icon ni ni-arrow-left"></em><span class="d-none d-md-inline">Kembali</a>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@if (filled($year) || filled($from_month) || filled($to_month))
|
||||
<span class="mx-1">
|
||||
<a href="{{route('dashboard.statistics.show', ['category' => $category])}}" class="text-secondary">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-xbox-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10m3.6 5.2a1 1 0 0 0 -1.4 .2l-2.2 2.933l-2.2 -2.933a1 1 0 1 0 -1.6 1.2l2.55 3.4l-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2 -2.933l2.2 2.933a1 1 0 0 0 1.6 -1.2l-2.55 -3.4l2.55 -3.4a1 1 0 0 0 -.2 -1.4" /></svg>
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
<div>
|
||||
<a href="javascript: void(0);" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalFilter"><em class="d-none d-sm-inline icon ni ni-filter"></em><span><span class="d-none d-md-inline">Filter</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .nk-block-head-content -->
|
||||
</div><!-- .nk-block-between -->
|
||||
</div><!-- .nk-block-head -->
|
||||
<div class="nk-block">
|
||||
<div class="row g-gs">
|
||||
@if (is_role(['1']))
|
||||
<div class="col-xxl-3 col-md-6">
|
||||
<div class="card card-full overflow-hidden">
|
||||
<div class="nk-ecwg nk-ecwg7 h-100">
|
||||
<div class="card-inner flex-grow-1">
|
||||
<div class="card-title-group mb-4">
|
||||
<div class="card-title">
|
||||
<h6 class="title">Status Laporan Bukti Tayang</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nk-ecwg7-ck">
|
||||
<canvas class="ecommerce-doughnut-s1" id="proofAiringThemeStatus"></canvas>
|
||||
</div>
|
||||
<ul class="nk-ecwg7-legends">
|
||||
<li>
|
||||
<div class="title">
|
||||
<span class="dot dot-lg sq" data-bg="#FFCC00"></span>
|
||||
<span>Menunggu {{ '('.$proofAiringThemeWaiting.')' }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="title">
|
||||
<span class="dot dot-lg sq" data-bg="#0065F8"></span>
|
||||
<span>Diterima {{ '('.$proofAiringThemeAccepted.')' }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="title">
|
||||
<span class="dot dot-lg sq" data-bg="#CB0404"></span>
|
||||
<span>Ditolak {{ '('.$proofAiringThemeRejected.')' }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- .card-inner -->
|
||||
</div>
|
||||
</div><!-- .card -->
|
||||
</div><!-- .col -->
|
||||
@endif
|
||||
<div class="col-xxl-3 col-md-12">
|
||||
<div class="card card-full overflow-hidden">
|
||||
<div class="nk-ecwg nk-ecwg7 h-100">
|
||||
<div class="card-inner flex-grow-1">
|
||||
<div class="card-title-group mb-4">
|
||||
<div class="card-title">
|
||||
<h6 class="title">Status Laporan Bukti Tayang</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div id="airingProofThemeColumn" style="width: 100%; height: 350px !important;"></div>
|
||||
</div><!-- .card-inner -->
|
||||
</div>
|
||||
</div><!-- .card -->
|
||||
</div><!-- .col -->
|
||||
<div class="col-xxl-3 col-md-12">
|
||||
<div class="card card-full overflow-hidden">
|
||||
<div class="nk-ecwg nk-ecwg7 h-100">
|
||||
<div class="card-inner flex-grow-1">
|
||||
<div class="card-title-group mb-4">
|
||||
<div class="card-title">
|
||||
<h6 class="title">Publikasi Laporan Bukti Tayang</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div id="airingProofThemePublicationColumn" style="width: 100%; height: 350px !important;"></div>
|
||||
</div><!-- .card-inner -->
|
||||
</div>
|
||||
</div><!-- .card -->
|
||||
</div><!-- .col -->
|
||||
<div class="modal fade" id="modalFilter">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Filter</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<form action="{{route('dashboard.statistics.show', ['category' => $category])}}" class="form-validate is-alter" method="get">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Contoh: 2025" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="from_month">Dari Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="from_month" placeholder="Data berita pada bulan dan tahun" name="from_month" value="{{ old('from_month', $from_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="to_month">Sampai Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="to_month" placeholder="Data berita pada bulan dan tahun" name="to_month" value="{{ old('to_month', $to_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-xxl-3 col-md-12">
|
||||
<div class="card card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
<div class="nk-ck">
|
||||
<canvas class="bar-chart" id="barChartMultiple"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .card-preview -->
|
||||
</div><!-- .col --> --}}
|
||||
</div><!-- .row -->
|
||||
</div><!-- .nk-block -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['statistic_chart' => 'airing-proof-report'])
|
||||
@ -10,6 +10,9 @@
|
||||
<div class="nk-block-between">
|
||||
<div class="nk-block-head-content">
|
||||
<h3 class="nk-block-title page-title">{{$title}}</h3>
|
||||
{{-- <div class="nk-block-des text-soft">
|
||||
<p>Data: Tahun {{$data_year}}</p>
|
||||
</div> --}}
|
||||
</div><!-- .nk-block-head-content -->
|
||||
{{-- {{dd($cooperationRequests)}} --}}
|
||||
<div class="nk-block-head-content">
|
||||
@ -23,7 +26,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@if (isset($year) && filled($year))
|
||||
@if (filled($year) || filled($from_month) || filled($to_month))
|
||||
<span class="mx-1">
|
||||
<a href="{{route('dashboard.statistics.show', ['category' => $category])}}" class="text-secondary">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-xbox-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10m3.6 5.2a1 1 0 0 0 -1.4 .2l-2.2 2.933l-2.2 -2.933a1 1 0 1 0 -1.6 1.2l2.55 3.4l-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2 -2.933l2.2 2.933a1 1 0 0 0 1.6 -1.2l-2.55 -3.4l2.55 -3.4a1 1 0 0 0 -.2 -1.4" /></svg>
|
||||
@ -31,7 +34,10 @@
|
||||
</span>
|
||||
@endif
|
||||
<div>
|
||||
<a href="javascript: void(0);" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalFilter"><em class="d-none d-sm-inline icon ni ni-filter"></em><span><span class="d-none d-md-inline">Filter</a>
|
||||
<a href="javascript: void(0);" class="btn btn-primary mx-1" data-bs-toggle="modal" data-bs-target="#modalFilter"><em class="d-none d-sm-inline icon ni ni-filter"></em><span><span class="d-none d-md-inline">Filter</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript: void(0);" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exportModal"><em class="d-none d-sm-inline icon ni ni-upload"></em><span><span class="d-none d-md-inline">Export</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -193,46 +199,87 @@
|
||||
</div><!-- .card -->
|
||||
</div><!-- .col -->
|
||||
<div class="modal fade" id="modalFilter">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Filter</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Filter</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<form action="{{route('dashboard.statistics.show', ['category' => $category])}}" class="form-validate is-alter" method="get">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Contoh: 2025" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="from_month">Dari Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="from_month" placeholder="Data berita pada bulan dan tahun" name="from_month" value="{{ old('from_month', $from_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="to_month">Sampai Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="to_month" placeholder="Data berita pada bulan dan tahun" name="to_month" value="{{ old('to_month', $to_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="exportModal">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Export</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<form action="{{route('dashboard.statistics.show', ['category' => $category])}}" class="form-validate is-alter" method="get">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Contoh: 2025" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="from_month">Dari Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="from_month" placeholder="Data berita pada bulan dan tahun" name="from_month" value="{{ old('from_month', $from_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="to_month">Sampai Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="to_month" placeholder="Data berita pada bulan dan tahun" name="to_month" value="{{ old('to_month', $to_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{route('dashboard.statistics.show', ['category' => $category])}}" class="form-validate is-alter" method="get">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Contoh: 2025" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="from_month">Dari Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="from_month" placeholder="Data berita pada bulan dan tahun" name="from_month" value="{{ old('from_month', $from_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="to_month">Sampai Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="to_month" placeholder="Data berita pada bulan dan tahun" name="to_month" value="{{ old('to_month', $to_month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-xxl-3 col-md-12">
|
||||
<div class="card card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
|
||||
@ -112,8 +112,8 @@
|
||||
@include('dashboard.statistics.chart.media-monitoring-issue-management')
|
||||
@include('dashboard.media-monitorings.statistics.media-monitoring-statistics')
|
||||
@break
|
||||
@case(2)
|
||||
|
||||
@case('airing-proof-report')
|
||||
@include('dashboard.statistics.chart.airing-proof-report')
|
||||
@break
|
||||
@default
|
||||
|
||||
@ -129,6 +129,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@ -19,5 +19,6 @@
|
||||
<script src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
||||
|
||||
</head>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user