feat: filter data
feat: export journalists
This commit is contained in:
parent
e84a7a287b
commit
9ce357c394
141
app/Exports/JournalistExport.php
Normal file
141
app/Exports/JournalistExport.php
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use App\Models\Journalist;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
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 JournalistExport implements FromCollection, WithHeadings, WithStyles, WithMapping
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Support\Collection
|
||||||
|
*/
|
||||||
|
|
||||||
|
protected $no = 1;
|
||||||
|
protected $media_ids;
|
||||||
|
protected $status;
|
||||||
|
protected $edit_status;
|
||||||
|
protected $register_year;
|
||||||
|
protected $register_month;
|
||||||
|
protected $register_date;
|
||||||
|
|
||||||
|
public function __construct($media_ids, $status, $edit_status, $register_year, $register_month, $register_date)
|
||||||
|
{
|
||||||
|
$this->media_ids = $media_ids;
|
||||||
|
$this->status = $status;
|
||||||
|
$this->edit_status = $edit_status;
|
||||||
|
$this->register_year = $register_year;
|
||||||
|
$this->register_month = $register_month;
|
||||||
|
$this->register_date = $register_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function collection()
|
||||||
|
{
|
||||||
|
$query = Journalist::with(['media' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
|
}, 'media.company' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
|
}, 'media.company.user' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
|
}])
|
||||||
|
->where('approved_status', '1')
|
||||||
|
->whereNull('deleted_at');
|
||||||
|
|
||||||
|
if (is_array($this->media_ids) && !in_array('all', $this->media_ids)) {
|
||||||
|
$query->whereIn('media_id', array_map('decrypt_id', $this->media_ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->status !== 'all') {
|
||||||
|
if ($this->status === 'waiting') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '0'); // Status waiting di User
|
||||||
|
});
|
||||||
|
} elseif ($this->status === 'accepted') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '1'); // Status accepted di User
|
||||||
|
});
|
||||||
|
} elseif ($this->status === 'rejected') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '2'); // Status rejected di User
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->edit_status !== 'all'){
|
||||||
|
if($this->edit_status === 'no-edit'){
|
||||||
|
$query->where('edit_status', '0');
|
||||||
|
}elseif($this->edit_status === 'waiting'){
|
||||||
|
$query->where('edit_status', '1');
|
||||||
|
}else if($this->edit_status === 'accepted'){
|
||||||
|
$query->where('edit_status', '2');
|
||||||
|
}else if($this->edit_status === 'rejected'){
|
||||||
|
$query->where('edit_status', '3');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->register_year) {
|
||||||
|
$query->whereYear('created_at', $this->register_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->register_month) {
|
||||||
|
$monthYear = Carbon::parse($this->register_month);
|
||||||
|
$query->whereYear('created_at', $monthYear->year)
|
||||||
|
->whereMonth('created_at', $monthYear->month);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->register_date) {
|
||||||
|
$query->whereDate('created_at', $this->register_date);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function map($journalist): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$this->no++,
|
||||||
|
$journalist->name,
|
||||||
|
$journalist->media->name,
|
||||||
|
$journalist->media->company->name,
|
||||||
|
$journalist->media->company->email,
|
||||||
|
get_user_status($journalist->media->company->user->status),
|
||||||
|
get_edit_status($journalist->edit_status),
|
||||||
|
Carbon::parse($journalist->created_at)->locale('id')->translatedFormat('l, d F Y'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['Data Jurnalis', '', '', '', '', '', '', ''],
|
||||||
|
['NO', 'Nama Jurnalis', 'Nama Media', 'Nama Perusahaan', 'Email', 'Status', 'Status Edit', 'Tanggal Daftar']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function styles(Worksheet $sheet)
|
||||||
|
{
|
||||||
|
$sheet->mergeCells('A1:H1'); // A1 sampai D1 digabung
|
||||||
|
|
||||||
|
// Set alignment untuk pusat horizontal dan vertikal
|
||||||
|
$sheet->getStyle('A1:H1')->getAlignment()->setHorizontal('center');
|
||||||
|
$sheet->getStyle('A1:H1')->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);
|
||||||
|
|
||||||
|
// Menambahkan gaya lain jika diperlukan
|
||||||
|
$sheet->getStyle('A1:H1')->getFont()->setBold(true);
|
||||||
|
$sheet->getStyle('A1:H1')->getFont()->setSize(14);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1002,16 +1002,76 @@ public function media(Request $request){
|
|||||||
public function journalist(Request $request){
|
public function journalist(Request $request){
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
|
|
||||||
$data = Journalist::with(['media' => function($query) {
|
$media_ids = $request->input('media_ids', null);
|
||||||
$query->withTrashed();
|
$media_ids_array = json_decode(rtrim($media_ids, ';'), true);
|
||||||
}, 'media.company' => function($query) {
|
$status = $request->input('status', null);
|
||||||
$query->withTrashed();
|
$edit_status = $request->input('edit_status', null);
|
||||||
}, 'media.company.user' => function($query) {
|
$address = $request->input('address', null);
|
||||||
$query->withTrashed();
|
$register_year = $request->input('register_year', null);
|
||||||
|
$register_month = $request->input('register_month', null);
|
||||||
|
$register_date = $request->input('register_date', null);
|
||||||
|
|
||||||
|
$query = Journalist::with(['media' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
|
}, 'media.company' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
|
}, 'media.company.user' => function($q) {
|
||||||
|
$q->withTrashed();
|
||||||
}])
|
}])
|
||||||
->where('approved_status', '1')
|
->where('approved_status', '1')
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at');
|
||||||
->get();
|
|
||||||
|
if (is_array($media_ids_array) && !in_array('all', $media_ids_array)) {
|
||||||
|
$query->whereIn('media_id', array_map('decrypt_id', $media_ids_array));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($status !== 'all') {
|
||||||
|
if ($status === 'waiting') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '0'); // Status waiting di User
|
||||||
|
});
|
||||||
|
} elseif ($status === 'accepted') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '1'); // Status accepted di User
|
||||||
|
});
|
||||||
|
} elseif ($status === 'rejected') {
|
||||||
|
$query->whereHas('media.company.user', function ($q) {
|
||||||
|
$q->where('status', '2'); // Status rejected di User
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($edit_status !== 'all'){
|
||||||
|
if($edit_status === 'no-edit'){
|
||||||
|
$query->where('edit_status', '0');
|
||||||
|
}elseif($edit_status === 'waiting'){
|
||||||
|
$query->where('edit_status', '1');
|
||||||
|
}else if($edit_status === 'accepted'){
|
||||||
|
$query->where('edit_status', '2');
|
||||||
|
}else if($edit_status === 'rejected'){
|
||||||
|
$query->where('edit_status', '3');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($address) {
|
||||||
|
$query->where('address', 'LIKE', '%'.$address.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($register_year) {
|
||||||
|
$query->whereYear('created_at', $register_year);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($register_month) {
|
||||||
|
$monthYear = Carbon::parse($register_month);
|
||||||
|
$query->whereYear('created_at', $monthYear->year)
|
||||||
|
->whereMonth('created_at', $monthYear->month);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($register_date) {
|
||||||
|
$query->whereDate('created_at', $register_date);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $query->get();
|
||||||
|
|
||||||
|
|
||||||
return DataTables::of($data)
|
return DataTables::of($data)
|
||||||
@ -1019,9 +1079,12 @@ public function journalist(Request $request){
|
|||||||
->addColumn('journalist_name', function ($data) {
|
->addColumn('journalist_name', function ($data) {
|
||||||
return $data->name;
|
return $data->name;
|
||||||
})
|
})
|
||||||
->addColumn('company_name', function ($data) {
|
->addColumn('company_name', function ($data) use ($media_ids_array) {
|
||||||
return $data->media->company->name;
|
return $data->media->company->name;
|
||||||
})
|
})
|
||||||
|
->addColumn('media_name', function ($data) use ($media_ids_array) {
|
||||||
|
return $data->media->name;
|
||||||
|
})
|
||||||
->addColumn('status', function ($data) {
|
->addColumn('status', function ($data) {
|
||||||
switch($data->media->company->user->status){
|
switch($data->media->company->user->status){
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@ -2,19 +2,35 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Dashboard;
|
namespace App\Http\Controllers\Dashboard;
|
||||||
|
|
||||||
|
use App\Exports\JournalistExport;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\JournalistRequest;
|
use App\Http\Requests\JournalistRequest;
|
||||||
use App\Models\Journalist;
|
use App\Models\Journalist;
|
||||||
|
use App\Models\Media;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
|
||||||
class JournalistController extends Controller
|
class JournalistController extends Controller
|
||||||
{
|
{
|
||||||
public function index(){
|
public function index(Request $request){
|
||||||
if(is_role(['1'])){
|
if(is_role(['1'])){
|
||||||
|
|
||||||
|
if($request->has('media_ids') && $request->input('media_ids') && count($request->input('media_ids')) > 10){
|
||||||
|
return redirect()->back()->with('failed-status', 'Hanya bisa memfilter 10 media');
|
||||||
|
}
|
||||||
|
|
||||||
return view('dashboard.journalists.admin.index',[
|
return view('dashboard.journalists.admin.index',[
|
||||||
'title' => 'Data Jurnalis'
|
'title' => 'Data Jurnalis',
|
||||||
|
'media' => Media::all(),
|
||||||
|
'media_ids' => $request->input('media_ids', null),
|
||||||
|
'status' => $request->input('status', null),
|
||||||
|
'edit_status' => $request->input('edit_status', null),
|
||||||
|
'register_year' => $request->input('register_year', null),
|
||||||
|
'register_month' => $request->input('register_month', null),
|
||||||
|
'register_date' => $request->input('register_date', null),
|
||||||
]);
|
]);
|
||||||
}else if(is_role(['3'])){
|
}else if(is_role(['3'])){
|
||||||
$user = User::with(['role', 'company.media.journalists'])->findOrFail(Auth::id());
|
$user = User::with(['role', 'company.media.journalists'])->findOrFail(Auth::id());
|
||||||
@ -291,4 +307,37 @@ public function destroy($id){
|
|||||||
return response()->json(['message' => 'Gagal menghapus jurnalis.'], 500);
|
return response()->json(['message' => 'Gagal menghapus jurnalis.'], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function export(Request $request)
|
||||||
|
{
|
||||||
|
$media_ids = $request->input('media_ids', null);
|
||||||
|
$status = $request->input('status', null);
|
||||||
|
$edit_status = $request->input('edit_status', null);
|
||||||
|
$register_year = $request->input('register_year', null);
|
||||||
|
$register_month = $request->input('register_month', null);
|
||||||
|
$register_date = $request->input('register_date', null);
|
||||||
|
|
||||||
|
$formattedNow = Carbon::parse(now())->locale('id')->translatedFormat('d-m-Y');
|
||||||
|
|
||||||
|
return Excel::download(new JournalistExport($media_ids, $status, $edit_status, $register_year, $register_month, $register_date), 'journalist-'.$formattedNow.'.xlsx');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function filter(Request $request)
|
||||||
|
{
|
||||||
|
$filteredRequest = $request->except('_token');
|
||||||
|
|
||||||
|
// Kalau "all" dipilih di media_ids, set ulang jadi hanya ["all"]
|
||||||
|
if (isset($filteredRequest['media_ids']) && in_array('all', $filteredRequest['media_ids'])) {
|
||||||
|
$filteredRequest['media_ids'] = ['all'];
|
||||||
|
} else {
|
||||||
|
// Buang media kosong
|
||||||
|
$filteredRequest['media_ids'] = array_filter($filteredRequest['media_ids'] ?? []);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter semua field yang terisi
|
||||||
|
$filterField = array_filter($filteredRequest, fn($val) => filled($val));
|
||||||
|
|
||||||
|
return redirect()->route('dashboard.journalists.index', $filterField);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,24 @@
|
|||||||
<a href="#" class="btn btn-icon btn-trigger toggle-expand me-n1" data-target="pageMenu"><em class="icon ni ni-more-v"></em></a>
|
<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">
|
<div class="toggle-expand-content" data-content="pageMenu">
|
||||||
<ul class="nk-block-tools g-3">
|
<ul class="nk-block-tools g-3">
|
||||||
<li class="nk-block-tools-opt"><a href="{{route('dashboard.journalists.submissions')}}" class="btn btn-info"><em class="icon ni ni-user-add"></em><span>Pengajuan Jurnalis</span></a></li>
|
<li>
|
||||||
|
@if (filled(value: $status) || filled($edit_status) || filled($register_year) || filled($register_month) || filled($register_date))
|
||||||
|
<span class="mx-1">
|
||||||
|
<a href="{{route('dashboard.journalists.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 class="drodown">
|
||||||
|
<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 class="drodown">
|
||||||
|
<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.journalists.submissions')}}" class="btn btn-success"><em class="icon ni ni-user-add"></em><span>Pengajuan Jurnalis</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,6 +50,7 @@
|
|||||||
<th style="width: 10% !important;">No</th>
|
<th style="width: 10% !important;">No</th>
|
||||||
<th>Nama Jurnalis</th>
|
<th>Nama Jurnalis</th>
|
||||||
<th>Perusahaan</th>
|
<th>Perusahaan</th>
|
||||||
|
<th>Media</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
<th>No Telepon</th>
|
<th>No Telepon</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
@ -45,6 +63,155 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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.journalists.filter')}}" class="form-validate is-alter" method="post">
|
||||||
|
@csrf
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Media</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" multiple="multiple" data-placeholder="Pilih media" name="media_ids[]" id="mediaSelect">
|
||||||
|
<option value="all">Semua Media</option>
|
||||||
|
@foreach ($media as $item)
|
||||||
|
<option value="{{encrypt_id($item->id)}}">{{$item->name}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Status</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" name="status">
|
||||||
|
<option value="all" @selected(isset($status) && $status == 'all')>Semua</option>
|
||||||
|
<option value="waiting" @selected(isset($status) && $status == 'waiting')>Menunggu</option>
|
||||||
|
<option value="accepted" @selected(isset($status) && $status == 'accepted')>Diterima</option>
|
||||||
|
<option value="rejected" @selected(isset($status) && $status == 'rejected')>Ditolak</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Status Edit</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" name="edit_status">
|
||||||
|
<option value="all" @selected(isset($edit_status) && $edit_status == 'all')>Semua</option>
|
||||||
|
<option value="no-edit" @selected(isset($edit_status) && $edit_status == 'no-edit')>Tidak Ada</option>
|
||||||
|
<option value="waiting" @selected(isset($edit_status) && $edit_status == 'waiting')>Menunggu</option>
|
||||||
|
<option value="accepted" @selected(isset($edit_status) && $edit_status == 'accepted')>Diterima</option>
|
||||||
|
<option value="rejected" @selected(isset($edit_status) && $edit_status == 'rejected')>Ditolak</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="register_year">Tahun Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="number" class="form-control" id="register_year" placeholder="Media yang mendaftar pada tahun" name="register_year" value="{{ old('register_year', $register_year ?? '') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="register_month">Bulan Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="month" class="form-control" id="register_month" placeholder="Media yang mendaftar pada bulan dan tahun" name="register_month" value="{{ old('register_month', $register_month ?? '') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="register_date">Tanggal Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="date" class="form-control" id="register_date" placeholder="Media yang mendaftar pada tanggal" name="register_date" value="{{ old('register_date', $register_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.journalists.export')}}" class="form-validate is-alter" method="post">
|
||||||
|
@csrf
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Media</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" multiple="multiple" data-placeholder="Pilih media" name="media_ids[]">
|
||||||
|
<option value="all">Semua Media</option>
|
||||||
|
@foreach ($media as $item)
|
||||||
|
<option value="{{encrypt_id($item->id)}}">{{$item->name}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Status</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" name="status">
|
||||||
|
<option value="all">Semua</option>
|
||||||
|
<option value="waiting">Menunggu</option>
|
||||||
|
<option value="accepted">Diterima</option>
|
||||||
|
<option value="rejected">Ditolak</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">Status Edit</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<select class="form-select js-select2" name="edit_status">
|
||||||
|
<option value="all">Semua</option>
|
||||||
|
<option value="no-edit">Tidak Ada</option>
|
||||||
|
<option value="waiting">Menunggu</option>
|
||||||
|
<option value="accepted">Diterima</option>
|
||||||
|
<option value="rejected">Ditolak</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="register_year">Tahun Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="number" class="form-control" id="register_year" placeholder="Media yang mendaftar pada tahun" name="register_year">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="register_month">Bulan Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="month" class="form-control" id="register_month" placeholder="Media yang mendaftar pada bulan dan tahun" name="register_month" value="{{ old('register_month', $register_month ?? '') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="regitser_date">Tanggal Daftar</label>
|
||||||
|
<div class="form-control-wrap">
|
||||||
|
<input type="date" class="form-control" id="regitser_date" placeholder="Media yang mendaftar pada tanggal" name="regitser_date" value="{{ old('regitser_date', $regitser_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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<a href="#" class="btn btn-icon btn-trigger toggle-expand me-n1" data-target="pageMenu"><em class="icon ni ni-more-v"></em></a>
|
<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">
|
<div class="toggle-expand-content" data-content="pageMenu">
|
||||||
<ul class="nk-block-tools g-3">
|
<ul class="nk-block-tools g-3">
|
||||||
<li class="nk-block-tools-opt"><a href="{{route('dashboard.journalists.submissions')}}" class="btn btn-info"><em class="icon ni ni-user-add"></em><span>Pengajuan Jurnalis</span></a></li>
|
<li class="nk-block-tools-opt"><a href="{{route('dashboard.journalists.submissions')}}" class="btn btn-success"><em class="icon ni ni-user-add"></em><span>Pengajuan Jurnalis</span></a></li>
|
||||||
<li class="nk-block-tools-opt"><a href="{{route('dashboard.journalists.create')}}" class="btn btn-primary"><em class="icon ni ni-plus"></em><span>Tambah</span></a></li>
|
<li class="nk-block-tools-opt"><a href="{{route('dashboard.journalists.create')}}" class="btn btn-primary"><em class="icon ni ni-plus"></em><span>Tambah</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [
|
order: [
|
||||||
[6, 'desc'],
|
[6, 'desc'],
|
||||||
@ -104,6 +105,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [
|
order: [
|
||||||
[6, 'desc']
|
[6, 'desc']
|
||||||
@ -151,6 +153,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -197,6 +200,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -238,6 +242,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[4, 'desc']],
|
order: [[4, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -292,6 +297,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -337,6 +343,7 @@
|
|||||||
{ targets: 4, width: '5%' }, // Kolom aksi
|
{ targets: 4, width: '5%' }, // Kolom aksi
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [
|
order: [
|
||||||
[5, 'desc']
|
[5, 'desc']
|
||||||
@ -386,6 +393,7 @@
|
|||||||
{ targets: 5, width: '5%' }, // Kolom aksi
|
{ targets: 5, width: '5%' }, // Kolom aksi
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [
|
order: [
|
||||||
[4, 'desc'],
|
[4, 'desc'],
|
||||||
@ -414,6 +422,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[3, 'desc']],
|
order: [[3, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -457,6 +466,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[10, 'desc']],
|
order: [[10, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -502,6 +512,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[10, 'desc']],
|
order: [[10, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -518,11 +529,23 @@
|
|||||||
$('#journalistsTable').DataTable({
|
$('#journalistsTable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: '{{ route('dashboard.journalists.data') }}',
|
ajax: {
|
||||||
|
url: '{{ route('dashboard.journalists.data') }}',
|
||||||
|
type: 'GET',
|
||||||
|
data: function(d) {
|
||||||
|
d.media_ids = '@json($media_ids);';
|
||||||
|
d.status = '{{ $status }}';
|
||||||
|
d.edit_status = '{{ $edit_status }}';
|
||||||
|
d.register_year = '{{ $register_year }}';
|
||||||
|
d.register_month = '{{ $register_month }}';
|
||||||
|
d.register_date = '{{ $register_date }}';
|
||||||
|
}
|
||||||
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false },
|
{ data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false },
|
||||||
{ data: 'journalist_name', name: 'journalist_name' },
|
{ data: 'journalist_name', name: 'journalist_name' },
|
||||||
{ data: 'company_name', name: 'company_name' },
|
{ data: 'company_name', name: 'company_name' },
|
||||||
|
{ data: 'media_name', name: 'media_name' },
|
||||||
{ data: 'email', name: 'email' },
|
{ data: 'email', name: 'email' },
|
||||||
{ data: 'phone_number', name: 'phone_number' },
|
{ data: 'phone_number', name: 'phone_number' },
|
||||||
{ data: 'status', name: 'status' },
|
{ data: 'status', name: 'status' },
|
||||||
@ -532,6 +555,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[8, 'desc']],
|
order: [[8, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -575,6 +599,7 @@
|
|||||||
],
|
],
|
||||||
@endif
|
@endif
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -605,6 +630,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -635,6 +661,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -663,6 +690,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -694,6 +722,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -723,6 +752,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[5, 'desc']],
|
order: [[5, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -754,6 +784,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -782,6 +813,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -809,6 +841,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[5, 'desc']],
|
order: [[5, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -837,6 +870,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -866,6 +900,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[7, 'desc']],
|
order: [[7, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -897,6 +932,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[9, 'desc']],
|
order: [[9, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -951,6 +987,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[3, 'desc']],
|
order: [[3, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -986,6 +1023,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[6, 'desc']],
|
order: [[6, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -1010,6 +1048,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[1, 'desc']],
|
order: [[1, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -1045,6 +1084,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[4, 'desc']],
|
order: [[4, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
@ -1081,6 +1121,7 @@
|
|||||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||||
],
|
],
|
||||||
language: datatableLanguage,
|
language: datatableLanguage,
|
||||||
|
responsive: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[4, 'desc']],
|
order: [[4, 'desc']],
|
||||||
pagingType: "simple",
|
pagingType: "simple",
|
||||||
|
|||||||
@ -131,6 +131,16 @@
|
|||||||
<script src="{{asset('assets/dashboard/js/libs/editors/tinymce.js?ver=3.0.3')}}"></script>
|
<script src="{{asset('assets/dashboard/js/libs/editors/tinymce.js?ver=3.0.3')}}"></script>
|
||||||
<script src="{{asset('assets/dashboard/js/editors.js?ver=3.0.3')}}"></script>
|
<script src="{{asset('assets/dashboard/js/editors.js?ver=3.0.3')}}"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#mediaSelect').select2({
|
||||||
|
maximumSelectionLength: 10
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -315,8 +315,11 @@
|
|||||||
Route::put('/{id}/process/{action}', 'processEditAction')->name('edit.process.action');
|
Route::put('/{id}/process/{action}', 'processEditAction')->name('edit.process.action');
|
||||||
|
|
||||||
Route::get('/{id}/edit', 'edit')->name('edit');
|
Route::get('/{id}/edit', 'edit')->name('edit');
|
||||||
Route::post('/{id}', 'update')->name('update');
|
Route::post('/{id}/edit', 'update')->name('update');
|
||||||
Route::delete('/{id}', 'destroy')->name('destroy');
|
Route::delete('/{id}', 'destroy')->name('destroy');
|
||||||
|
|
||||||
|
Route::post('/export', 'export')->name('export');
|
||||||
|
Route::post('/filter', 'filter')->name('filter');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/data', [DatatableController::class, 'journalist'])->name('data');
|
Route::get('/data', [DatatableController::class, 'journalist'])->name('data');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user