update
parent
f5de3a1756
commit
3c9ff00996
|
|
@ -35,8 +35,19 @@ class HomeController extends Controller
|
||||||
return view('home');
|
return view('home');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function session()
|
||||||
|
{
|
||||||
|
$key = request('key');
|
||||||
|
$val = request('val');
|
||||||
|
session([$key => $val]);
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'success'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function dashboard()
|
public function dashboard()
|
||||||
{
|
{
|
||||||
|
// dd(date('Y'));
|
||||||
$data['title'] = 'Dashboard';
|
$data['title'] = 'Dashboard';
|
||||||
$data['group'] = session('group_alias');
|
$data['group'] = session('group_alias');
|
||||||
if(session('group_alias') == 'sekolah'){
|
if(session('group_alias') == 'sekolah'){
|
||||||
|
|
@ -144,6 +155,7 @@ class HomeController extends Controller
|
||||||
'npsn' => @$row->sekolah->npsn,
|
'npsn' => @$row->sekolah->npsn,
|
||||||
'kab' => @$row->sekolah->kabupaten->name,
|
'kab' => @$row->sekolah->kabupaten->name,
|
||||||
'kecamatan' => @$row->sekolah->kecamatan->name,
|
'kecamatan' => @$row->sekolah->kecamatan->name,
|
||||||
|
'tahun' => @$row->tahun,
|
||||||
'usulan_sebelumnya' => @$usulanAwal,
|
'usulan_sebelumnya' => @$usulanAwal,
|
||||||
'pengajuan_usulan' => @$jenis_usulan,
|
'pengajuan_usulan' => @$jenis_usulan,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,14 @@ class AdministrasiController extends Controller
|
||||||
public function grid(Request $request)
|
public function grid(Request $request)
|
||||||
{
|
{
|
||||||
if(session('group_alias') == 'sekolah'){
|
if(session('group_alias') == 'sekolah'){
|
||||||
$kuesioner = Kuesioner::where('ms_sekolah_id',session('sekolah_id'))->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
$kuesioner = Kuesioner::where('ms_sekolah_id',session('sekolah_id'))->orderBy('created_at','DESC')->get();
|
||||||
}else{
|
}else{
|
||||||
if(session('kabupaten_id') != ''){
|
if(session('kabupaten_id') != ''){
|
||||||
$kuesioner = Kuesioner::whereHas('sekolah',function($query){
|
$kuesioner = Kuesioner::whereHas('sekolah',function($query){
|
||||||
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
||||||
})->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
})->orderBy('created_at','DESC')->get();
|
||||||
}else{
|
}else{
|
||||||
$kuesioner = Kuesioner::where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
$kuesioner = Kuesioner::orderBy('created_at','DESC')->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,9 @@ class CSAKController extends Controller
|
||||||
if(session('kabupaten_id') != ''){
|
if(session('kabupaten_id') != ''){
|
||||||
$kuesioner = Kuesioner::where('level',0)->whereHas('sekolah',function($query){
|
$kuesioner = Kuesioner::where('level',0)->whereHas('sekolah',function($query){
|
||||||
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
||||||
})->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
})->orderBy('created_at','DESC')->get();
|
||||||
}else{
|
}else{
|
||||||
$kuesioner = Kuesioner::where('level',0)->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
$kuesioner = Kuesioner::where('level',0)->orderBy('created_at','DESC')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($kuesioner as $key => $row) {
|
foreach ($kuesioner as $key => $row) {
|
||||||
|
|
@ -134,6 +134,7 @@ class CSAKController extends Controller
|
||||||
'no' => $key+1,
|
'no' => $key+1,
|
||||||
'id' => encode_id($row->id),
|
'id' => encode_id($row->id),
|
||||||
'npsn' => $row->sekolah->npsn,
|
'npsn' => $row->sekolah->npsn,
|
||||||
|
'tahun' => @$row->tahun,
|
||||||
'nama' => $sekolah,
|
'nama' => $sekolah,
|
||||||
'status_level' => '<span style="width:100%" class="badge bg-secondary text-secondary">Level '.levelAdiwiyata($row->npsn).'</span>',
|
'status_level' => '<span style="width:100%" class="badge bg-secondary text-secondary">Level '.levelAdiwiyata($row->npsn).'</span>',
|
||||||
'wilayah' => $row->sekolah->kabupaten->name,
|
'wilayah' => $row->sekolah->kabupaten->name,
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,9 @@ class CSAPController extends Controller
|
||||||
if(session('kabupaten_id') != ''){
|
if(session('kabupaten_id') != ''){
|
||||||
$kuesioner = Kuesioner::where('level',1)->whereHas('sekolah',function($query){
|
$kuesioner = Kuesioner::where('level',1)->whereHas('sekolah',function($query){
|
||||||
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
$query->where('ms_kabupaten_id',session('kabupaten_id'));
|
||||||
})->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
})->orderBy('created_at','DESC')->get();
|
||||||
}else{
|
}else{
|
||||||
$kuesioner = Kuesioner::where('level',1)->where('tahun',date('Y'))->orderBy('created_at','DESC')->get();
|
$kuesioner = Kuesioner::where('level',1)->orderBy('created_at','DESC')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($kuesioner as $key => $row) {
|
foreach ($kuesioner as $key => $row) {
|
||||||
|
|
@ -138,6 +138,7 @@ class CSAPController extends Controller
|
||||||
'no' => $key+1,
|
'no' => $key+1,
|
||||||
'id' => encode_id($row->id),
|
'id' => encode_id($row->id),
|
||||||
'npsn' => $row->sekolah->npsn,
|
'npsn' => $row->sekolah->npsn,
|
||||||
|
'tahun' => @$row->tahun,
|
||||||
'nama' => $sekolah,
|
'nama' => $sekolah,
|
||||||
'wilayah' => $row->sekolah->kabupaten->name,
|
'wilayah' => $row->sekolah->kabupaten->name,
|
||||||
'kecamatan' => $row->sekolah->kecamatan->name,
|
'kecamatan' => $row->sekolah->kecamatan->name,
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class SKController extends Controller
|
||||||
|
|
||||||
public function grid(Request $request)
|
public function grid(Request $request)
|
||||||
{
|
{
|
||||||
$usulan = SK::where('tahun',date('Y'))->get();
|
$usulan = SK::all();
|
||||||
$_data = [];
|
$_data = [];
|
||||||
foreach ($usulan as $key => $row) {
|
foreach ($usulan as $key => $row) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
<div class="page-logo">
|
<div class="page-logo">
|
||||||
<a href="#" class="page-logo-link press-scale-down d-flex align-items-center position-relative" data-toggle="modal" data-target="#modal-shortcut">
|
<a href="#" class="page-logo-link press-scale-down d-flex align-items-center position-relative" data-toggle="modal" data-target="#modal-shortcut">
|
||||||
<img src="https://banksampah.jakarta.go.id/images/logo-dinas.ico" alt="SmartAdmin WebApp" aria-roledescription="logo">
|
<img src="https://banksampah.jakarta.go.id/images/logo-dinas.ico" alt="SmartAdmin WebApp" aria-roledescription="logo">
|
||||||
<span class="page-logo-text mr-1">SmartAdmin WebApp</span>
|
|
||||||
<span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
|
<span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
|
||||||
<i class="fal fa-angle-down d-inline-block ml-1 fs-lg color-primary-300"></i>
|
<i class="fal fa-angle-down d-inline-block ml-1 fs-lg color-primary-300"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -16,8 +15,15 @@
|
||||||
<i class="ni ni-menu"></i>
|
<i class="ni ni-menu"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w-1/5 hidden">
|
||||||
|
<select name="year" class="form-control" id="changeYear">
|
||||||
|
@for ($i = date('Y')-3; date('Y') >= $i; $i++)
|
||||||
|
<option {{ $i == date('Y') ? 'selected' : '' }} value="{{$i}}">{{$i}}</option>
|
||||||
|
@endfor
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="ml-auto d-flex">
|
<div class="ml-auto d-flex">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="#" data-toggle="dropdown" class="header-icon d-flex align-items-center justify-content-center">
|
<a href="#" data-toggle="dropdown" class="header-icon d-flex align-items-center justify-content-center">
|
||||||
<div class="rounded-circle bg-fusion-50 width-3 height-3 d-inline-block d-flex align-items-center justify-content-center">
|
<div class="rounded-circle bg-fusion-50 width-3 height-3 d-inline-block d-flex align-items-center justify-content-center">
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,24 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#changeYear').on('change',function(){
|
||||||
|
var key = 'currYear';
|
||||||
|
var val = $(this).val();
|
||||||
|
$.ajax({
|
||||||
|
url: "{{route('modules.dashboard.session')}}", // replace with your URL endpoint
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
_token:'{{csrf_token()}}',
|
||||||
|
key: key,
|
||||||
|
val: val
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
window.location.reload()
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
@if (Session::get('message_type')=='invalid')
|
@if (Session::get('message_type')=='invalid')
|
||||||
toastr.error("{{ Session::get('message') }}", 'Error!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
toastr.error("{{ Session::get('message') }}", 'Error!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<h5 class="fw-500">Usulan Adiwiyata Tahun {{date('Y')}}</h5>
|
<h5 class="fw-500">Usulan Adiwiyata</h5>
|
||||||
</div>
|
</div>
|
||||||
<table class="table w-100"
|
<table class="table w-100"
|
||||||
data-search="true"
|
data-search="true"
|
||||||
|
|
@ -180,6 +180,7 @@
|
||||||
<th data-field="nama_sekolah">Nama Sekolah</th>
|
<th data-field="nama_sekolah">Nama Sekolah</th>
|
||||||
<th data-field="kab">Kab/Kota</th>
|
<th data-field="kab">Kab/Kota</th>
|
||||||
<th data-field="kecamatan">Kecamatan</th>
|
<th data-field="kecamatan">Kecamatan</th>
|
||||||
|
<th data-field="tahun">Tahun</th>
|
||||||
<th data-field="usulan_sebelumnya">Usulan Sebelumnya</th>
|
<th data-field="usulan_sebelumnya">Usulan Sebelumnya</th>
|
||||||
<th data-field="pengajuan_usulan">Pengajuan Usulan</th>
|
<th data-field="pengajuan_usulan">Pengajuan Usulan</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="action">#</th>
|
<th data-field="action">#</th>
|
||||||
<th data-field="no">No</th>
|
<th data-field="no">No</th>
|
||||||
|
<th data-field="tahun">Tahun</th>
|
||||||
<th data-field="npsn">NPSN</th>
|
<th data-field="npsn">NPSN</th>
|
||||||
<th data-field="nama">Nama Sekolah</th>
|
<th data-field="nama">Nama Sekolah</th>
|
||||||
<th data-field="wilayah">Wilayah</th>
|
<th data-field="wilayah">Wilayah</th>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="action">#</th>
|
<th data-field="action">#</th>
|
||||||
<th data-field="no">No</th>
|
<th data-field="no">No</th>
|
||||||
|
<th data-field="tahun">Tahun</th>
|
||||||
<th data-field="npsn">NPSN</th>
|
<th data-field="npsn">NPSN</th>
|
||||||
<th data-field="nama">Nama Sekolah</th>
|
<th data-field="nama">Nama Sekolah</th>
|
||||||
<th data-field="wilayah">Wilayah</th>
|
<th data-field="wilayah">Wilayah</th>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="action">#</th>
|
<th data-field="action">#</th>
|
||||||
<th data-field="no">No</th>
|
<th data-field="no">No</th>
|
||||||
|
<th data-field="tahun">Tahun</th>
|
||||||
<th data-field="npsn">NPSN</th>
|
<th data-field="npsn">NPSN</th>
|
||||||
<th data-field="nama">Nama Sekolah</th>
|
<th data-field="nama">Nama Sekolah</th>
|
||||||
<th data-field="wilayah">Wilayah</th>
|
<th data-field="wilayah">Wilayah</th>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="action">#</th>
|
<th data-field="action">#</th>
|
||||||
<th data-field="no">No</th>
|
<th data-field="no">No</th>
|
||||||
|
<th data-field="tahun">Tahun</th>
|
||||||
<th data-field="npsn">NPSN</th>
|
<th data-field="npsn">NPSN</th>
|
||||||
<th data-field="nama">Nama Sekolah</th>
|
<th data-field="nama">Nama Sekolah</th>
|
||||||
<th data-field="wilayah">Wilayah</th>
|
<th data-field="wilayah">Wilayah</th>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ use App\Http\Controllers\Modules\Konten\GaleriController;
|
||||||
use App\Http\Controllers\Modules\Konten\KegiatanController;
|
use App\Http\Controllers\Modules\Konten\KegiatanController;
|
||||||
|
|
||||||
Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard');
|
Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard');
|
||||||
|
Route::post('session', [HomeController::class, 'session'])->name('dashboard.session');
|
||||||
Route::get('dashboard/gridUsulan',[HomeController::class,'gridUsulan'])->name('gridUsulan');
|
Route::get('dashboard/gridUsulan',[HomeController::class,'gridUsulan'])->name('gridUsulan');
|
||||||
Route::get('profile',[ProfileController::class,'profile'])->name('profile');
|
Route::get('profile',[ProfileController::class,'profile'])->name('profile');
|
||||||
Route::post('profile-store',[ProfileController::class,'profileStore'])->name('profileStore');
|
Route::post('profile-store',[ProfileController::class,'profileStore'])->name('profileStore');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue