feat: export statistic

This commit is contained in:
myqnrrhmn 2025-07-16 10:48:32 +07:00
parent e851b5c072
commit d6dfdfb40e
9 changed files with 1212 additions and 35 deletions

View File

@ -118,7 +118,7 @@ public function show(Request $request, $category){
$loginActivities = LoginHistory::with(['user']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$loginActivities->whereYear('created_at', '=', $year);
}
@ -140,7 +140,7 @@ public function show(Request $request, $category){
$mediaCooperation = MediaCooperation::with(['cooperation', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$mediaCooperation->whereYear('created_at', '=', $year);
}
@ -216,7 +216,7 @@ public function show(Request $request, $category){
$airingProofReport = Report::with(['order', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$airingProofReport->whereYear('created_at', '=', $year);
}
@ -294,7 +294,7 @@ public function show(Request $request, $category){
$issues = IssueManagement::with(['mediaMonitoring']);
$mediaMonitorings = MediaMonitoring::with(['issue']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$issues->whereYear('created_at', $year);
$mediaMonitorings->whereYear('created_at', $year);
}
@ -361,7 +361,7 @@ public function show(Request $request, $category){
});
$mediaMonitoringWithoutIssue = MediaMonitoring::doesntHave('issue')
->when($year && $year !== 'all', function ($query) use ($year) {
->when($year && $year !== 'all' && !(filled($from_month) || filled($to_month)), function ($query) use ($year) {
$query->whereYear('created_at', $year);
})
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
@ -373,7 +373,7 @@ public function show(Request $request, $category){
->get();
$mediaMonitoringWithIssue = MediaMonitoring::has('issue')
->when($year && $year !== 'all', function ($query) use ($year) {
->when($year && $year !== 'all' && !(filled($from_month) || filled($to_month)), function ($query) use ($year) {
$query->whereYear('created_at', $year);
})
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
@ -392,12 +392,12 @@ public function show(Request $request, $category){
return view('dashboard.statistics.show.media-monitoring-issue-management', $data);
case 'cooperation-completions':
$data['title'] = 'Statistik Laporan Bukti Tayang';
$data['title'] = 'Statistik Penyelesaian Kerja Sama';
$data['data_time'] = $year === 'all' ? 'Semua' : 'Tahun '.$year;
$cooperationCompletion = CooperationCompletion::with(['order', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$cooperationCompletion->whereYear('created_at', '=', $year);
}
@ -475,7 +475,7 @@ public function show(Request $request, $category){
$registerUsers = User::query();
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$registerUsers->whereYear('created_at', '=', $year);
}
@ -513,7 +513,7 @@ public function show(Request $request, $category){
$contenteRecap = ContentRecap::with(['enhancer', 'classification']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$contenteRecap->whereYear('created_at', '=', $year);
}
@ -576,7 +576,7 @@ public function show(Request $request, $category){
$websiteVisitors = Visitor::query();
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$websiteVisitors->whereYear('created_at', '=', $year);
}
@ -617,14 +617,17 @@ public function export(Request $request, $category){
$data = [
'category' => $category,
'year' => $request->input('year') ? $request->input('year') : Carbon::now()->year,
'from_month' => $request->input('from_month') ? $request->input('from_month') : null,
'to_month' => $request->input('to_month') ? $request->input('to_month') : null,
];
$year = $request->input('year', Carbon::now()->year);
$from_month = $request->input('from_month', null);
$to_month = $request->input('to_month', null);
$year = $request->input('year') ? $request->input('year') : Carbon::now()->year;
$from_month = $request->input('from_month') ? $request->input('from_month') : null;
$to_month = $request->input('to_month') ? $request->input('to_month') : null;
$data['year'] = $year;
$data['from_month'] = $from_month;
$data['to_month'] = $to_month;
// dd($from_month.' - '. $to_month);
switch($category){
case 'login-activities':
@ -634,7 +637,7 @@ public function export(Request $request, $category){
$loginActivities = LoginHistory::with(['user']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$loginActivities->whereYear('created_at', '=', $year);
}
@ -657,7 +660,7 @@ public function export(Request $request, $category){
$mediaCooperation = MediaCooperation::with(['cooperation', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$mediaCooperation->whereYear('created_at', '=', $year);
}
@ -736,7 +739,7 @@ public function export(Request $request, $category){
$airingProofReport = Report::with(['order', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$airingProofReport->whereYear('created_at', '=', $year);
}
@ -815,7 +818,7 @@ public function export(Request $request, $category){
$issues = IssueManagement::with(['mediaMonitoring']);
$mediaMonitorings = MediaMonitoring::with(['issue']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$issues->whereYear('created_at', $year);
$mediaMonitorings->whereYear('created_at', $year);
}
@ -882,7 +885,7 @@ public function export(Request $request, $category){
});
$mediaMonitoringWithoutIssue = MediaMonitoring::doesntHave('issue')
->when($year && $year !== 'all', function ($query) use ($year) {
->when($year && $year !== 'all' && !(filled($from_month) || filled($to_month)), function ($query) use ($year) {
$query->whereYear('created_at', $year);
})
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
@ -894,7 +897,7 @@ public function export(Request $request, $category){
->get();
$mediaMonitoringWithIssue = MediaMonitoring::has('issue')
->when($year && $year !== 'all', function ($query) use ($year) {
->when($year && $year !== 'all' && !(filled($from_month) || filled($to_month)), function ($query) use ($year) {
$query->whereYear('created_at', $year);
})
->when($from_month && $to_month, function ($query) use ($from_month, $to_month) {
@ -911,14 +914,15 @@ public function export(Request $request, $category){
$data['mediaMonitoringMonthly'] = $mediaMonitoringMonthly;
$data['issueManagementMonthly'] = $issueManagementMonthly;
return view('dashboard.statistics.show.media-monitoring-issue-management', $data);
$pdf = Pdf::loadView('dashboard.statistics.exports.pdf.media-monitoring-issue-management', $data);
return $pdf->stream('monitoring-media-manajemen-isu.pdf');
case 'cooperation-completions':
$data['title'] = 'Statistik Laporan Bukti Tayang';
$data['title'] = 'Statistik Penyelesaian Kerja Sama';
$data['data_time'] = $year === 'all' ? 'Semua' : 'Tahun '.$year;
$cooperationCompletion = CooperationCompletion::with(['order', 'media']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$cooperationCompletion->whereYear('created_at', '=', $year);
}
@ -987,7 +991,8 @@ public function export(Request $request, $category){
$data['cooperationCompletionAccepted'] = $cooperationCompletionCount->get('1', 0);
$data['cooperationCompletionRejected'] = $cooperationCompletionCount->get('2', 0);
return view('dashboard.statistics.show.cooperation-completion', $data);
$pdf = Pdf::loadView('dashboard.statistics.exports.pdf.cooperation-completion', $data);
return $pdf->stream('penyelesaian-kerja-sama.pdf');
case 'users':
$data['title'] = 'Statistik Pengguna';
$data['data_time'] = $year === 'all' ? 'Semua' : 'Tahun '.$year;
@ -996,7 +1001,7 @@ public function export(Request $request, $category){
$registerUsers = User::query();
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$registerUsers->whereYear('created_at', '=', $year);
}
@ -1027,14 +1032,15 @@ public function export(Request $request, $category){
$data['registerUserMonth'] = $monthlyCount;
return view('dashboard.statistics.show.user', $data);
$pdf = Pdf::loadView('dashboard.statistics.exports.pdf.user', $data);
return $pdf->stream('pengguna.pdf');
case 'content-recaps':
$data['title'] = 'Statistik Rekap Konten';
$data['data_time'] = $year === 'all' ? 'Semua' : 'Tahun '.$year;
$contenteRecap = ContentRecap::with(['enhancer', 'classification']);
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$contenteRecap->whereYear('created_at', '=', $year);
}
@ -1088,7 +1094,8 @@ public function export(Request $request, $category){
$data['socialMedia2ContentRecap'] = $contentRecapSocialMediaCount->get('PPID Diskominfo Purwakarta', 0);
$data['socialMedia3ContentRecap'] = $contentRecapSocialMediaCount->get('Purwakarta Saber Hoaks', 0);
return view('dashboard.statistics.show.content-recap', $data);
$pdf = Pdf::loadView('dashboard.statistics.exports.pdf.content-recap', $data);
return $pdf->stream('rekap-konten.pdf');
case 'website-visitors':
$data['title'] = 'Statistik Pengunjung Website';
$data['data_time'] = $year === 'all' ? 'Semua' : 'Tahun '.$year;
@ -1097,7 +1104,7 @@ public function export(Request $request, $category){
$websiteVisitors = Visitor::query();
if($year && $year !== 'all'){
if($year && $year !== 'all' && !(filled($from_month) || filled($to_month))){
$websiteVisitors->whereYear('created_at', '=', $year);
}
@ -1128,7 +1135,8 @@ public function export(Request $request, $category){
$data['websiteVisitorMonth'] = $monthlyCount;
return view('dashboard.statistics.show.website-visitor', $data);
$pdf = Pdf::loadView('dashboard.statistics.exports.pdf.website-visitor', $data);
return $pdf->stream('pengunjung-aplikasi.pdf');
default:
abort(404);
}

View File

@ -0,0 +1,176 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Laporan Bukti Tayang</h2>
<h4>Data: {{$data_time}}</h4>
</div>
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Total Laporan Bukti Tayang Berdasarkan Status</h4>
</div>
<table>
<thead>
<tr>
<th>Status</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menunggu</td>
<td>{{$airingProofReportWaiting}}</td>
</tr>
<tr>
<td>Diterima</td>
<td>{{$airingProofReportAccepted}}</td>
</tr>
<tr>
<td>Ditolak</td>
<td>{{$airingProofReportRejected}}</td>
</tr>
</tbody>
</table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Total Laporan Bukti Tayang Perbulan Berdasarkan Status</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
<ul style="list-style: none; padding-left: 0;">
<li>Menunggu: {{$airingProofReportStatusMonthly['waiting'][$i]}}</li>
<li>Diterima: {{$airingProofReportStatusMonthly['accepted'][$i]}}</li>
<li>Ditolak: {{$airingProofReportStatusMonthly['rejected'][$i]}}</li>
<li><b>Total</b>: {{$airingProofReportStatusMonthly['waiting'][$i] + $airingProofReportStatusMonthly['accepted'][$i] + $airingProofReportStatusMonthly['rejected'][$i]}}</li>
</ul>
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Statistik Monitoring Media & Manajemen Isu</h2>
<h4>Data: {{$data_time}}</h4>
</div>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Kanal Rekap Konten</h4>
</div>
<thead>
<tr>
<th>Kanal</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Facebook</td>
<td>{{$facebookContentRecap}}</td>
</tr>
<tr>
<td>Twitter</td>
<td>{{$twitterContentRecap}}</td>
</tr>
<tr>
<td>Website</td>
<td>{{$websiteContentRecap}}</td>
</tr>
<tr>
<td>YouTube</td>
<td>{{$youtubeContentRecap}}</td>
</tr>
<tr>
<td>Instagram</td>
<td>{{$instagramContentRecap}}</td>
</tr>
<tr>
<td>TikTok</td>
<td>{{$tiktokContentRecap}}</td>
</tr>
<tr>
<td>Cetak</td>
<td>{{$cetakContentRecap}}</td>
</tr>
</tbody>
</table>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Sosial Media</h4>
</div>
<thead>
<tr>
<th>Sosial Media</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Diskominfo Purwakarta</td>
<td>{{$socialMedia1ContentRecap}}</td>
</tr>
<tr>
<td>PPID Diskominfo Purwakarta</td>
<td>{{$socialMedia2ContentRecap}}</td>
</tr>
<tr>
<td>Purwakarta Saber Hoaks</td>
<td>{{$socialMedia3ContentRecap}}</td>
</tr>
</tbody>
</table>
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Pembuatan Rekap Konten</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
{{$contentRecapMonthly[$i]}}
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,197 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Statistik Monitoring Media & Manajemen Isu</h2>
<h4>Data: {{$data_time}}</h4>
</div>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Status Penyelesaian Kerjasama</h4>
</div>
<thead>
<tr>
<th>Status</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menunggu</td>
<td>{{$cooperationCompletionWaiting}}</td>
</tr>
<tr>
<td>Diterima</td>
<td>{{$cooperationCompletionAccepted}}</td>
</tr>
<tr>
<td>Ditolak</td>
<td>{{$cooperationCompletionRejected}}</td>
</tr>
</tbody>
</table>
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Status Penyelesaian Kerja Sama</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
<ul style="list-style: none; padding-left: 0;">
<li>Menunggu: {{$cooperationCompletionStatusMonthly['waiting'][$i]}}</li>
<li>Diterima: {{$cooperationCompletionStatusMonthly['accepted'][$i]}}</li>
<li>Ditolak: {{$cooperationCompletionStatusMonthly['rejected'][$i]}}</li>
</ul>
</td>
</tr>
@endfor
</tbody>
</table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Penyelesaian Kerja Sama</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
{{$cooperationCompletionMonthly[$i]}}
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>

View File

@ -105,7 +105,7 @@
<div class="container">
<div class="header">
<h2 class="title">Aktivitas Login</h2>
<h4>Data: Tahun {{ $year }}</h4>
<h4>Data: {{$data_time}}</h4>
</div>
@php

View File

@ -105,7 +105,7 @@
<div class="container">
<div class="header">
<h2 class="title">Kerja Sama Media</h2>
<h4>Data: Tahun {{ $year }}</h4>
<h4>Data: {{$data_time}}</h4>
</div>
@php

View File

@ -0,0 +1,241 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Statistik Monitoring Media & Manajemen Isu</h2>
<h4>Data: {{$data_time}}</h4>
</div>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Kanal Monitoring Media</h4>
</div>
<thead>
<tr>
<th>Kanal</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Facebook</td>
<td>{{$facebookMediaMonitoring}}</td>
</tr>
<tr>
<td>Twitter</td>
<td>{{$twitterMediaMonitoring}}</td>
</tr>
<tr>
<td>Website</td>
<td>{{$websiteMediaMonitoring}}</td>
</tr>
<tr>
<td>YouTube</td>
<td>{{$youtubeMediaMonitoring}}</td>
</tr>
<tr>
<td>Instagram</td>
<td>{{$instagramMediaMonitoring}}</td>
</tr>
<tr>
<td>TikTok</td>
<td>{{$tiktokMediaMonitoring}}</td>
</tr>
<tr>
<td>Cetak</td>
<td>{{$cetakMediaMonitoring}}</td>
</tr>
</tbody>
</table>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Isu</h4>
</div>
<thead>
<tr>
<th>Isu</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Krisis</td>
<td>{{$crisisIssue}}</td>
</tr>
<tr>
<td>Negatif</td>
<td>{{$negativeIssue}}</td>
</tr>
<tr>
<td>Netral</td>
<td>{{$neutralIssue}}</td>
</tr>
<tr>
<td>Positif</td>
<td>{{$positiveIssue}}</td>
</tr>
</tbody>
</table>
<table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Status Monitoring Media</h4>
</div>
<thead>
<tr>
<th>Status</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Belum Memiliki Isu</td>
<td>{{$mediaMonitoringWithoutIssueCount}}</td>
</tr>
<tr>
<td>Sudah Memiliki Isu</td>
<td>{{$mediaMonitoringWithIssueCount}}</td>
</tr>
</tbody>
</table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Monitoring Media dan Manajemen Isu</h4>
</div>
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
<ul style="list-style: none; padding-left: 0;">
<li>Monitoring Media: {{$mediaMonitoringMonthly[$i]}}</li>
<li>Isu: {{$issueManagementMonthly[$i]}}</li>
</ul>
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Statistik Pengguna</h2>
<h4>Data: {{$data_time}}</h4>
</div>
{{-- <table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Status Penyelesaian Kerjasama</h4>
</div>
<thead>
<tr>
<th>Status</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menunggu</td>
<td>{{$cooperationCompletionWaiting}}</td>
</tr>
<tr>
<td>Diterima</td>
<td>{{$cooperationCompletionAccepted}}</td>
</tr>
<tr>
<td>Ditolak</td>
<td>{{$cooperationCompletionRejected}}</td>
</tr>
</tbody>
</table> --}}
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Traffic Pendaftaran Akun</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
{{$registerUserMonth[$i]}}
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('assets/defaults/simedkom-logo-circle.png');
background-size: 300px auto;
background-repeat: no-repeat;
background-position: center center;
opacity: 0.05;
z-index: -1;
}
header .icon {
text-align: center;
padding: 20px 0;
}
header .icon img {
width: 20%;
max-width: 200px;
height: auto;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
}
.header .title {
font-size: 24px;
color: #3A59D1;
margin: 0;
}
.header h4 {
font-size: 18px;
color: #666;
margin-top: 8px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table thead {
background-color: #3A59D1;
color: white;
}
table th, table td {
padding: 10px;
text-align: left;
border: 1px solid #ccc;
}
table tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.footer {
text-align: right;
font-size: 12px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo Simedkom">
</div>
</header>
<div class="container">
<div class="header">
<h2 class="title">Statistik Pengunjung Aplikasi</h2>
<h4>Data: {{$data_time}}</h4>
</div>
{{-- <table>
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Status Penyelesaian Kerjasama</h4>
</div>
<thead>
<tr>
<th>Status</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menunggu</td>
<td>{{$cooperationCompletionWaiting}}</td>
</tr>
<tr>
<td>Diterima</td>
<td>{{$cooperationCompletionAccepted}}</td>
</tr>
<tr>
<td>Ditolak</td>
<td>{{$cooperationCompletionRejected}}</td>
</tr>
</tbody>
</table> --}}
@php
$month = [
"Januari", "Februari", "Maret", "April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember"
];
@endphp
<div style="margin-bottom: 1px !important; margin-top: 2px !important;">
<h4>Pengunjung Aplikasi</h4>
</div>
<table>
<thead>
<tr>
<th>Bulan</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < count($month); $i++)
<tr>
<td>{{ $month[$i] }}</td>
<td>
{{$websiteVisitorMonth[$i]}}
</td>
</tr>
@endfor
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} - {{ $app->app_title }}
</div>
</div>
</body>
</html>