feat: filter data

feat: export data

chore: change button in hero section landing page
This commit is contained in:
myuqinurrohman 2025-04-22 11:02:02 +07:00
parent 04a464a2f9
commit dc78f8ba32
8 changed files with 584 additions and 49 deletions

View File

@ -0,0 +1,176 @@
<?php
namespace App\Exports;
use App\Models\IssueManagement;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class IssueManagementExport implements FromCollection, WithHeadings, WithStyles, WithMapping
{
/**
* @return \Illuminate\Support\Collection
*/
protected $no = 1;
protected $classification;
protected $sub_classification;
protected $location;
protected $sub_location;
protected $government_agency;
protected $issue;
protected $response;
protected $year;
protected $month;
protected $date;
public function __construct($classification, $sub_classification, $location, $sub_location, $government_agency, $issue, $response, $year, $month, $date)
{
$this->classification = $classification;
$this->sub_classification = $sub_classification;
$this->location = $location;
$this->sub_location = $sub_location;
$this->government_agency = $government_agency;
$this->issue = $issue;
$this->response = $response;
$this->year = $year;
$this->month = $month;
$this->date = $date;
}
public function collection()
{
$query = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies']);
if ($this->classification) {
$query->where('classification_id', decrypt_id($this->classification));
}
if ($this->sub_classification) {
$query->where('sub_classification_id', decrypt_id($this->sub_classification));
}
if ($this->location) {
$query->where('location_id', decrypt_id($this->location));
}
if ($this->sub_location) {
$query->where('sub_location_id', decrypt_id($this->sub_location));
}
if ($this->government_agency) {
$query->whereHas('governmentAgencies', function ($query) {
$query->where('issue_managements_government_agencies.government_agency_id', decrypt_id($this->government_agency));
});
}
if ($this->issue) {
switch($this->issue){
case 'positive':
$query->where('issue', 'positif');
break;
case 'negative':
$query->where('issue', 'negatif');
break;
case 'neutral':
$query->where('issue', 'netral');
break;
case 'crisis':
$query->where('issue', 'krisis');
break;
}
}
if ($this->response) {
switch($this->response){
case 'positive':
$query->where('response', 'positif');
break;
case 'negative':
$query->where('response', 'negatif');
break;
case 'neutral':
$query->where('response', 'netral');
break;
case 'crisis':
$query->where('response', 'krisis');
break;
}
}
if ($this->year) {
$query->whereYear('created_at', $this->year);
}
if ($this->month) {
$monthYear = Carbon::parse($this->month);
$query->whereYear('created_at', $monthYear->year)
->whereMonth('created_at', $monthYear->month);
}
if ($this->date) {
$query->whereDate('created_at', $this->date);
}
return $query->get();
}
public function map($issueManagement): array
{
return [
$this->no++,
$issueManagement->mediaMonitoring->code,
$issueManagement->mediaMonitoring->title,
$issueManagement->classification->name,
$issueManagement->subClassification->name,
$issueManagement->location->name,
$issueManagement->subLocation->name,
ucfirst($issueManagement->issue),
ucfirst($issueManagement->response),
$issueManagement->governmentAgencies->map(function($agency) {
return Str::ucfirst($agency->name);
})->implode(', '),
$issueManagement->enhancer->name ?? 'Admin',
Carbon::parse($issueManagement->created_at)->locale('id')->translatedFormat('l, d F Y'),
];
}
public function headings(): array
{
return [
['Data Managemen Isu', '', '', '', '', '', '', '', '', '', '', ''],
['NO', 'Kode', 'Monitoring Media', 'Klasifikasi', 'Sub Klasifikasi', 'Lokus', 'Sub Lokus', 'Isu', 'Tanggapan', 'Dinas', 'Oleh', 'Dibuat Pada']
];
}
public function styles(Worksheet $sheet)
{
$sheet->mergeCells('A1:L1'); // A1 sampai D1 digabung
// Set alignment untuk pusat horizontal dan vertikal
$sheet->getStyle('A1:L1')->getAlignment()->setHorizontal('center');
$sheet->getStyle('A1:L1')->getAlignment()->setVertical('center');
$sheet->getColumnDimension('A')->setWidth(7); // Set column A width
$sheet->getColumnDimension('B')->setAutoSize(true);
$sheet->getColumnDimension('C')->setAutoSize(true);
$sheet->getColumnDimension('D')->setAutoSize(true);
$sheet->getColumnDimension('E')->setAutoSize(true);
$sheet->getColumnDimension('F')->setAutoSize(true);
$sheet->getColumnDimension('G')->setAutoSize(true);
$sheet->getColumnDimension('H')->setAutoSize(true);
$sheet->getColumnDimension('I')->setAutoSize(true);
$sheet->getColumnDimension('J')->setAutoSize(true);
$sheet->getColumnDimension('K')->setAutoSize(true);
$sheet->getColumnDimension('L')->setAutoSize(true);
// Menambahkan gaya lain jika diperlukan
$sheet->getStyle('A1:L1')->getFont()->setBold(true);
$sheet->getStyle('A1:L1')->getFont()->setSize(14);
}
}

View File

@ -115,7 +115,7 @@ public function map($mediaMonitoring): array
public function headings(): array
{
return [
['Data Rekap Konten', '', '', '', '', '', '', '', '', '', '', '', '', ''],
['Data Monitoring Media', '', '', '', '', '', '', '', '', '', '', '', '', ''],
['NO', 'Kode', 'Judul Berita', 'Media', 'Tema', 'Penulis', 'Channel', 'Kata Kunci', 'Influencer', 'Link', 'Halaman Berita', 'Tanggal Rilis', 'Status Isu', 'Oleh',
'Tanggal Input']
];

View File

@ -2331,34 +2331,91 @@ public function mediaMonitoring(Request $request){
public function issueManagement(Request $request){
if ($request->ajax()) {
$classificationParam = $request->input('classification', null);
$subClassificationParam = $request->input('sub_classification', null);
$locationParam = $request->input('location', null);
$subLocationParam = $request->input('sub_location', null);
$governmentAgencyParam = $request->input('government_agency', null);
$classification = $request->input('classification', null);
$sub_classification = $request->input('sub_classification', null);
$location = $request->input('location', null);
$sub_location = $request->input('sub_location', null);
$government_agency = $request->input('government_agency', null);
$issue = $request->input('issue', null);
$response = $request->input('response', null);
$year = $request->input('year', null);
$month = $request->input('month', null);
$date = $request->input('date', null);
if($classificationParam){
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])->where('classification_id', decrypt_id($classificationParam))->get();
$query = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies']);
}else if($subClassificationParam){
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])->where('sub_classification_id', decrypt_id($subClassificationParam))->get();
}else if($locationParam){
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])->where('location_id', decrypt_id($locationParam))->get();
}else if($subLocationParam){
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])->where('sub_location_id', decrypt_id($subLocationParam))->get();
}else if($governmentAgencyParam){
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])
->whereHas('governmentAgencies', function ($query) use ($governmentAgencyParam) {
$query->where('issue_managements_government_agencies.government_agency_id', decrypt_id($governmentAgencyParam));
})
->get();
}else{
$data = IssueManagement::with(['location', 'subLocation', 'classification', 'subClassification', 'enhancer', 'governmentAgencies'])->get();
if ($classification) {
$query->where('classification_id', decrypt_id($classification));
}
if ($sub_classification) {
$query->where('sub_classification_id', decrypt_id($sub_classification));
}
if ($location) {
$query->where('location_id', decrypt_id($location));
}
if ($sub_location) {
$query->where('sub_location_id', decrypt_id($sub_location));
}
if ($government_agency) {
$query->whereHas('governmentAgencies', function ($query) use ($government_agency) {
$query->where('issue_managements_government_agencies.government_agency_id', decrypt_id($government_agency));
});
}
if ($issue) {
switch($issue){
case 'positive':
$query->where('issue', 'positif');
break;
case 'negative':
$query->where('issue', 'negatif');
break;
case 'neutral':
$query->where('issue', 'netral');
break;
case 'crisis':
$query->where('issue', 'krisis');
break;
}
}
if ($response) {
switch($response){
case 'positive':
$query->where('response', 'positif');
break;
case 'negative':
$query->where('response', 'negatif');
break;
case 'neutral':
$query->where('response', 'netral');
break;
case 'crisis':
$query->where('response', 'krisis');
break;
}
}
if ($year) {
$query->whereYear('created_at', $year);
}
if ($month) {
$monthYear = Carbon::parse($month);
$query->whereYear('created_at', $monthYear->year)
->whereMonth('created_at', $monthYear->month);
}
if ($date) {
$query->whereDate('created_at', $date);
}
$data = $query->get();
return DataTables::of($data)
->addIndexColumn()

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Dashboard;
use App\Exports\IssueManagementExport;
use App\Http\Controllers\Controller;
use App\Http\Requests\IssueManagementRequest;
use App\Models\Classification;
@ -11,8 +12,10 @@
use App\Models\MediaMonitoring;
use App\Models\SubClassification;
use App\Models\SubLocation;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
class IssueManagementController extends Controller
{
@ -24,6 +27,18 @@ public function index(Request $request){
'location' => $request->input('location', null),
'sub_location' => $request->input('sub_location', null),
'government_agency' => $request->input('government_agency', null),
'media_monitoring' => $request->input('media_monitoring', null),
'issue' => $request->input('issue', null),
'response' => $request->input('response', null),
'year' => $request->input('year', null),
'month' => $request->input('month', null),
'date' => $request->input('date', null),
'locations' => Location::all(),
'sub_locations' => SubLocation::all(),
'classifications' => Classification::all(),
'sub_classifications' => SubClassification::all(),
'government_agencies' => GovernmentAgency::all(),
]);
}
@ -131,4 +146,33 @@ public function getSubClassifications($location_id)
return response()->json(['sub_classifications' => $subLocations]);
}
public function filter(Request $request){
$filteredRequest = $request->except('_token');
$filterField = array_filter($filteredRequest, function ($value) {
return filled($value);
});
return redirect()->route('dashboard.issue.managements.index', $filterField);
}
public function export(Request $request)
{
$classification = $request->input('classification', null);
$sub_classification = $request->input('sub_classification', null);
$location = $request->input('location', null);
$sub_location = $request->input('sub_location', null);
$government_agency = $request->input('government_agency', null);
$issue = $request->input('issue', null);
$response = $request->input('response', null);
$year = $request->input('year', null);
$month = $request->input('month', null);
$date = $request->input('date', null);
$formattedNow = Carbon::parse(now())->locale('id')->translatedFormat('d-m-Y');
return Excel::download(new IssueManagementExport($classification, $sub_classification, $location, $sub_location, $government_agency, $issue, $response, $year, $month, $date), 'issue-managements-'.$formattedNow.'.xlsx');
}
}

View File

@ -11,28 +11,32 @@
<div class="nk-block-head-content">
<h3 class="nk-block-title page-title">{{$title}}</h3>
</div><!-- .nk-block-head-content -->
{{-- <div class="nk-block-head-content">
<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 class="drodown">
<a href="#" class="dropdown-toggle btn btn-white btn-dim btn-outline-light" data-bs-toggle="dropdown"><em class="d-none d-sm-inline icon ni ni-calender-date"></em><span><span class="d-none d-md-inline">Last</span> 30 Days</span><em class="dd-indc icon ni ni-chevron-right"></em></a>
<div class="dropdown-menu dropdown-menu-end">
<ul class="link-list-opt no-bdr">
<li><a href="#"><span>Last 30 Days</span></a></li>
<li><a href="#"><span>Last 6 Months</span></a></li>
<li><a href="#"><span>Last 1 Years</span></a></li>
</ul>
</div>
@if (filled(value: $media_monitoring) || filled(value: $classification) || filled(value: $sub_classification) || filled(value: $location) || filled(value: $sub_location) || filled($year) || filled(value: $government_agency) || filled(value: $issue) || filled($response) || filled($year) || filled($month) || filled($date))
<span class="mx-1">
<a href="{{route('dashboard.issue.managements.index')}}" 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-white btn-dim btn-outline-light" 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>
<li>
<div>
<a href="javascript: void(0);" class="btn btn-info" data-bs-toggle="modal" data-bs-target="#modalExport"><em class="d-none d-sm-inline icon ni ni-upload"></em><span><span class="d-none d-md-inline">Export</a>
</div>
</li>
<li class="nk-block-tools-opt"><a href="{{route('dashboard.media.monitorings.create')}}" class="btn btn-primary"><em class="icon ni ni-plus"></em><span>Tambah</span></a></li>
</ul>
</div>
</div>
</div> --}}
</div>
</div><!-- .nk-block-between -->
</div><!-- .nk-block-head -->
<div class="nk-block nk-block-lg">
@ -61,6 +65,244 @@
</div>
</div>
</div>
<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.issue.managements.filter')}}" class="form-validate is-alter" method="post">
@csrf
<div class="modal-body">
<div class="form-group">
<label class="form-label">Lokus</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="location">
<option value="all" @selected(isset($location) && $location == 'all') selected disabled>Semua</option>
@foreach ($locations as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($location) && $location == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Sub Lokus</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="sub_location">
<option value="all" @selected(isset($sub_location) && $sub_location == 'all') selected disabled>Semua</option>
@foreach ($sub_locations as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($sub_location) && $sub_location == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Klasifikasi</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="classification">
<option value="all" @selected(isset($classification) && $classification == 'all') selected disabled>Semua</option>
@foreach ($classifications as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($classification) && $classification == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Sub Klasifikasi</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="sub_classification">
<option value="all" @selected(isset($sub_classification) && $sub_classification == 'all') selected disabled>Semua</option>
@foreach ($sub_classifications as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($sub_classification) && $sub_classification == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Dinas/OPD</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="government_agency">
<option value="all" @selected(isset($government_agency) && $government_agency == 'all') selected disabled>Semua</option>
@foreach ($government_agencies as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($government_agency) && $government_agency == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Isu</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="issue">
<option value="all" @selected(isset($issue) && $issue == 'all') selected disabled>Semua</option>
<option value="positive" @selected(isset($issue) && $issue == 'positive')>Positif</option>
<option value="negative" @selected(isset($issue) && $issue == 'negative')>Negatif</option>
<option value="neutral" @selected(isset($issue) && $issue == 'neutral')>Netral</option>
<option value="crisis" @selected(isset($issue) && $issue == 'crisis')>Krisis</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Tanggapan</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="response">
<option value="all" @selected(isset($response) && $response == 'all') selected disabled>Semua</option>
<option value="positive" @selected(isset($response) && $response == 'positive')>Positif</option>
<option value="negative" @selected(isset($response) && $response == 'negative')>Negatif</option>
<option value="neutral" @selected(isset($response) && $response == 'neutral')>Netral</option>
<option value="crisis" @selected(isset($response) && $response == 'crisis')>Krisis</option>
</select>
</div>
</div>
<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="Data isu pada tahun" name="year" value="{{ old('year', $year ?? '') }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="month">Bulan</label>
<div class="form-control-wrap">
<input type="month" class="form-control" id="month" placeholder="Data berita pada bulan dan tahun" name="month" value="{{ old('month', $month ?? '') }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="date">Tanggal</label>
<div class="form-control-wrap">
<input type="date" class="form-control" id="date" placeholder="Data berita pada bulan dan tahun" name="date" value="{{ old('date', $date ?? '') }}">
</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="modalExport">
<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.issue.managements.export')}}" class="form-validate is-alter" method="post">
@csrf
<div class="modal-body">
<div class="form-group">
<label class="form-label">Lokus</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="location">
<option value="all" @selected(isset($location) && $location == 'all') selected disabled>Semua</option>
@foreach ($locations as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($location) && $location == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Sub Lokus</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="sub_location">
<option value="all" @selected(isset($sub_location) && $sub_location == 'all') selected disabled>Semua</option>
@foreach ($sub_locations as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($sub_location) && $sub_location == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Klasifikasi</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="classification">
<option value="all" @selected(isset($classification) && $classification == 'all') selected disabled>Semua</option>
@foreach ($classifications as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($classification) && $classification == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Sub Klasifikasi</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="sub_classification">
<option value="all" @selected(isset($sub_classification) && $sub_classification == 'all') selected disabled>Semua</option>
@foreach ($sub_classifications as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($sub_classification) && $sub_classification == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Dinas/OPD</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="government_agency">
<option value="all" @selected(isset($government_agency) && $government_agency == 'all') selected disabled>Semua</option>
@foreach ($government_agencies as $item)
<option value="{{ encrypt_id($item->id) }}" @selected(isset($government_agency) && $government_agency == encrypt_id($item->id))>{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Isu</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="issue">
<option value="all" @selected(isset($issue) && $issue == 'all') selected disabled>Semua</option>
<option value="positive" @selected(isset($issue) && $issue == 'positive')>Positif</option>
<option value="negative" @selected(isset($issue) && $issue == 'negative')>Negatif</option>
<option value="neutral" @selected(isset($issue) && $issue == 'neutral')>Netral</option>
<option value="crisis" @selected(isset($issue) && $issue == 'crisis')>Krisis</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Tanggapan</label>
<div class="form-control-wrap">
<select class="form-select js-select2" name="response">
<option value="all" @selected(isset($response) && $response == 'all') selected disabled>Semua</option>
<option value="positive" @selected(isset($response) && $response == 'positive')>Positif</option>
<option value="negative" @selected(isset($response) && $response == 'negative')>Negatif</option>
<option value="neutral" @selected(isset($response) && $response == 'neutral')>Netral</option>
<option value="crisis" @selected(isset($response) && $response == 'crisis')>Krisis</option>
</select>
</div>
</div>
<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="Data isu pada tahun" name="year" value="{{ old('year', $year ?? '') }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="month">Bulan</label>
<div class="form-control-wrap">
<input type="month" class="form-control" id="month" placeholder="Data berita pada bulan dan tahun" name="month" value="{{ old('month', $month ?? '') }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="date">Tanggal</label>
<div class="form-control-wrap">
<input type="date" class="form-control" id="date" placeholder="Data berita pada bulan dan tahun" name="date" value="{{ old('date', $date ?? '') }}">
</div>
</div>
</div>
<div class="modal-footer bg-light">
<span class="sub-text">
<button type="submit" class="btn btn-sm btn-primary">Export</button>
</span>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -8,21 +8,16 @@
<div class="container d-flex align-items-center justify-content-center h-100">
<div class="row align-items-center justify-content-center w-100">
<div class="col-xl-7 col-lg-8 col-md-10 text-white text-center">
<div class="fs-100 fw-600 mb-20px">
<div class="fs-110 fw-600 mb-20px">
<div class="d-inline-block">
Simedkom
</div>
</div>
<div class="fs-20 fw-300 mb-30px w-80 mx-auto opacity-6">
<div class="fs-20 fw-400 mb-30px w-80 mx-auto opacity-7">
Sistem Media Komunikasi Kabupaten Purwakarta
</div>
<div class="overflow-hidden pt-5px">
<a href="{{route('login')}}" class="btn btn-large btn-rounded btn-box-shadow btn-switch-text d-inline-block me-15px xs-m-10px align-middle fw-600" data-anime='{ "translateY": [100, 0], "easing": "easeOutCubic", "duration": 900, "delay": 500 }' style="background-color: #F7F7F7; color: black;">
<span>
<span class="btn-double-text" data-text="Masuk">Masuk</span>
<span><i class="feather icon-feather-arrow-right"></i></span>
</span>
</a>
<div class="overflow-hidden pt-30px">
<a href="{{route('login')}}" class="btn btn-extra-large fw-600 btn-rounded with-rounded btn-white btn-box-shadow d-table d-lg-inline-block lg-mb-15px md-mx-auto">Masuk<span class="text-white" style="background-color: #3572EF;"><i class="fa-solid fa-arrow-right"></i></span></a>
</div>
</div>
</div>
@ -42,7 +37,7 @@
</div>
</div>
<div class="col-xl-5 col-lg-6 offset-lg-1" data-anime='{ "el": "childs", "translateY": [30, 0], "opacity": [0,1], "duration": 600, "delay":0, "staggervalue": 300, "easing": "easeOutQuad" }'>
<span class="ps-25px pe-25px mb-20px text-uppercase text-base-color fs-12 lh-40 fw-700 border-radius-100px bg-gradient-very-light-gray-transparent d-inline-flex"><i class="bi bi-award fs-16 me-5px"></i>Tentang Kami</span>
<span class="ps-25px pe-25px mb-20px text-uppercase text-base-color fs-12 lh-40 fw-700 border-radius-100px bg-gradient-very-light-gray-transparent d-inline-flex"><i class="bi bi-info-circle fs-16 me-5px"></i>Tentang Kami</span>
<h3 class="text-dark-gray fs-50 fw-700 ls-minus-2px">Simedkom</h3>
<p class="mb-40px sm-mb-25px">{{strip_tags($app->about_us)}}</p>
</div>

View File

@ -1091,7 +1091,23 @@
$('#issueManagementsTable').DataTable({
processing: true,
serverSide: true,
ajax: '{{ route('dashboard.issue.managements.data', ["classification" => $classification, "sub_classification" => $sub_classification, "location" => $location, "sub_location" => $sub_location, "government_agency" => $government_agency]) }}',
ajax: {
url: '{{ route('dashboard.issue.managements.data') }}',
type: 'GET',
data: function(d) {
d.classification = '{{ $classification }}';
d.sub_classification = '{{ $sub_classification }}';
d.location = '{{ $location }}';
d.sub_location = '{{ $sub_location }}';
d.government_agency = '{{ $government_agency }}';
d.media_monitoring = '{{ $media_monitoring }}';
d.issue = '{{ $issue }}';
d.response = '{{ $response }}';
d.year = '{{ $year }}';
d.month = '{{ $month }}';
d.date = '{{ $date }}';
}
},
columns: [
{ data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false },
{ data: 'code', name: 'code' },

View File

@ -530,7 +530,8 @@
Route::controller(IssueManagementController::class)->group(function(){
Route::get('/', 'index')->name('index');
Route::get('/create', 'create')->name('create');
Route::post('/{media_monitoring_id}', 'store')->name('store');
Route::post('/create/{media_monitoring_id}', 'store')->name('store');
Route::get('/{id}/show', 'show')->name('show');
Route::get('/{id}/edit', 'edit')->name('edit');
Route::put('/{id}', 'update')->name('update');
@ -539,6 +540,10 @@
// AJAX
Route::get('/get-sub-locations/{location_id}', 'getSubLocations')->name('get.sub.locations');
Route::get('/get-sub-classifications/{classification_id}', 'getSubClassifications')->name('get.sub.classifications');
// AJAX END
Route::post('/filter', 'filter')->name('filter');
Route::post('/export', 'export')->name('export');
});
Route::get('/data', [DatatableController::class, 'issueManagement'])->name('data');