update
parent
ff118b0a53
commit
b5605141fe
|
@ -37,14 +37,67 @@ class HomeController extends Controller
|
|||
$data['title'] = 'Dashboard';
|
||||
$data['group'] = session('group_alias');
|
||||
if(session('group_alias') == 'sekolah'){
|
||||
$data['usulan'] = Kuesioner::where('ms_sekolah_id',session('sekolah_id'))->where('tahun',date('Y'))->first();
|
||||
$data['kuesioner'] = Kuesioner::where('ms_sekolah_id',session('sekolah_id'))->where('tahun',date('Y'))->first();
|
||||
$data['profile'] = ProfileSekolah::where('ms_sekolah_id',session('sekolah_id'))->first();
|
||||
$data['page'] = FormKriteria::select('page_number')->groupBy('page_number')->orderBy('page_number','ASC')->pluck('page_number')->count();
|
||||
$data['penilaian'] = Penilaian::select('page_number')->groupBy('page_number')->orderBy('page_number','ASC')->pluck('page_number')->count();
|
||||
|
||||
return view($this->template.'.sekolah', $data);
|
||||
}else{
|
||||
$data['usulan'] = Kuesioner::where('tahun',date('Y'))->get();
|
||||
$data['total_usulan_kab'] = Kuesioner::where('tahun',date('Y'))->where('level',0)->count();
|
||||
$data['total_usulan_prov'] = Kuesioner::where('tahun',date('Y'))->where('level',1)->count();
|
||||
$data['total_usulan_nasional'] = Kuesioner::where('tahun',date('Y'))->where('level',2)->count();
|
||||
$data['total_usulan_mandiri'] = Kuesioner::where('tahun',date('Y'))->where('level',3)->count();
|
||||
$data['route'] = 'modules';
|
||||
return view($this->template.'.admin', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function gridUsulan(Request $request)
|
||||
{
|
||||
$usulan = Kuesioner::where('tahun',date('Y'))->get();
|
||||
$_data = [];
|
||||
foreach ($usulan as $key => $row) {
|
||||
$action = '';
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary">'.@$row->profile->status_sekolah.'</span> ';
|
||||
|
||||
if(($row->level+1) == 1){
|
||||
$jenis_usulan = 'Adiwiyata Kab/Kota';
|
||||
}elseif(($row->level+1) == 2){
|
||||
$jenis_usulan = 'Adiwiyata Provinsi';
|
||||
}elseif(($row->level+1) == 3){
|
||||
$jenis_usulan = 'Adiwiyata Nasional';
|
||||
}elseif(($row->level+1) == 4){
|
||||
$jenis_usulan = 'Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$usulanAwal = 'Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$usulanAwal = 'Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$usulanAwal = 'Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$usulanAwal = 'Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$usulanAwal = 'Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'nama_sekolah' => @$sekolah,
|
||||
'npsn' => @$row->sekolah->npsn,
|
||||
'kab' => @$row->sekolah->kabupaten->name,
|
||||
'usulan_sebelumnya' => @$usulanAwal,
|
||||
'pengajuan_usulan' => @$jenis_usulan,
|
||||
];
|
||||
}
|
||||
return response()->json($_data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,9 @@ class KuesionerController extends Controller
|
|||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<a href="'.url('kuesioner/update/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="View Data" class="btn btn-xs btn-block btn-primary"><i class="fal fa-eye text-white"></i></a>';
|
||||
if(session('group_alias') != 'sekolah'){
|
||||
$action .= '<a href="#" data-href="'.url('kuesioner/veirikasi/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="Verifikasi Data" class="btn btn-xs btn-block btn-success verifikasi"><i class="fal fa-check text-white"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
|
@ -65,11 +68,24 @@ class KuesionerController extends Controller
|
|||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$status = '';
|
||||
if($row->status == 0){
|
||||
$status = '<span class="badge badge-danger">Belum Diverifikasi</span>';
|
||||
}else{
|
||||
$status = '<span class="badge badge-success">Sudah Diverifikasi</span>';
|
||||
}
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary mt-1">'.@$row->profile->status_sekolah.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-secondary text-left mt-1">'.@$row->profile->alamat_sekolah.'</span> ';
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
'npsn' => $row->sekolah->npsn,
|
||||
'nama' => $row->sekolah->nama_sekolah,
|
||||
'nama' => $sekolah,
|
||||
'status_level' => '<span style="width:100%" class="badge badge-secondary">Level '.levelAdiwiyata($row->npsn).'</span>',
|
||||
'wilayah' => $row->sekolah->kabupaten->name,
|
||||
'alamat_sekolah' => $row->sekolah->alamat_sekolah,
|
||||
|
@ -77,6 +93,7 @@ class KuesionerController extends Controller
|
|||
'status_sekolah' => $row->sekolah->status,
|
||||
'alamat_sekolah' => $row->profile->alamat_sekolah,
|
||||
'penghargaan' => $penghargaan,
|
||||
'status' => $status,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modules\Usulan;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Master\Provinsi;
|
||||
use App\Models\Kuesioner;
|
||||
|
||||
class CSAKController extends Controller
|
||||
{
|
||||
private $template = 'modules.usulan.csak';
|
||||
private $route = 'modules.usulan.csak';
|
||||
private $title = 'Usulan CSAK';
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['route'] = $this->route;
|
||||
$data['title'] = $this->title;
|
||||
$data['provinsi'] = Provinsi::where('kode_wilayah','010000')->get();
|
||||
|
||||
return view($this->template.'.index',$data);
|
||||
}
|
||||
|
||||
public function grid(Request $request)
|
||||
{
|
||||
$kuesioner = Kuesioner::where('level',0)->orderBy('created_at','DESC')->get();
|
||||
foreach ($kuesioner as $key => $row) {
|
||||
|
||||
$action = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<a href="'.url('kuesioner/update/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="View Data" class="btn btn-xs btn-block btn-primary"><i class="fal fa-eye text-white"></i></a>';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary">'.@$row->profile->status_sekolah.'</span> ';
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
'npsn' => $row->sekolah->npsn,
|
||||
'nama' => $sekolah,
|
||||
'status_level' => '<span style="width:100%" class="badge badge-secondary">Level '.levelAdiwiyata($row->npsn).'</span>',
|
||||
'wilayah' => $row->sekolah->kabupaten->name,
|
||||
'penghargaan' => $penghargaan,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
return response()->json($_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modules\Usulan;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Master\Provinsi;
|
||||
use App\Models\Kuesioner;
|
||||
|
||||
class CSAMController extends Controller
|
||||
{
|
||||
private $template = 'modules.usulan.csam';
|
||||
private $route = 'modules.usulan.csam';
|
||||
private $title = 'Usulan CSAM';
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['route'] = $this->route;
|
||||
$data['title'] = $this->title;
|
||||
$data['provinsi'] = Provinsi::where('kode_wilayah','010000')->get();
|
||||
|
||||
return view($this->template.'.index',$data);
|
||||
}
|
||||
|
||||
public function grid(Request $request)
|
||||
{
|
||||
$kuesioner = Kuesioner::where('level',3)->orderBy('created_at','DESC')->get();
|
||||
foreach ($kuesioner as $key => $row) {
|
||||
|
||||
$action = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<a href="'.url('kuesioner/update/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="Resume" class="btn btn-xs btn-block btn-primary"><i class="fal fa-eye text-white"></i></a>';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary">'.@$row->profile->status_sekolah.'</span> ';
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
'npsn' => $row->sekolah->npsn,
|
||||
'nama' => $sekolah,
|
||||
'wilayah' => $row->sekolah->kabupaten->name,
|
||||
'penghargaan' => $penghargaan,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
return response()->json($_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modules\Usulan;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Master\Provinsi;
|
||||
use App\Models\Kuesioner;
|
||||
|
||||
class CSANController extends Controller
|
||||
{
|
||||
private $template = 'modules.usulan.csan';
|
||||
private $route = 'modules.usulan.csan';
|
||||
private $title = 'Usulan CSAN';
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['route'] = $this->route;
|
||||
$data['title'] = $this->title;
|
||||
$data['provinsi'] = Provinsi::where('kode_wilayah','010000')->get();
|
||||
|
||||
return view($this->template.'.index',$data);
|
||||
}
|
||||
|
||||
public function grid(Request $request)
|
||||
{
|
||||
$kuesioner = Kuesioner::where('level',2)->orderBy('created_at','DESC')->get();
|
||||
foreach ($kuesioner as $key => $row) {
|
||||
|
||||
$action = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<a href="'.url('kuesioner/update/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="Resume" class="btn btn-xs btn-block btn-primary"><i class="fal fa-eye text-white"></i></a>';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary">'.@$row->profile->status_sekolah.'</span> ';
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
'npsn' => $row->sekolah->npsn,
|
||||
'nama' => $sekolah,
|
||||
'wilayah' => $row->sekolah->kabupaten->name,
|
||||
'penghargaan' => $penghargaan,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
return response()->json($_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modules\Usulan;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Master\Provinsi;
|
||||
use App\Models\Kuesioner;
|
||||
|
||||
class CSAPController extends Controller
|
||||
{
|
||||
private $template = 'modules.usulan.csap';
|
||||
private $route = 'modules.usulan.csap';
|
||||
private $title = 'Usulan CSAP';
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['route'] = $this->route;
|
||||
$data['title'] = $this->title;
|
||||
$data['provinsi'] = Provinsi::where('kode_wilayah','010000')->get();
|
||||
|
||||
return view($this->template.'.index',$data);
|
||||
}
|
||||
|
||||
public function grid(Request $request)
|
||||
{
|
||||
$kuesioner = Kuesioner::where('level',1)->orderBy('created_at','DESC')->get();
|
||||
foreach ($kuesioner as $key => $row) {
|
||||
|
||||
$action = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<a href="'.url('kuesioner/update/'.encode_id($row->ms_sekolah_id)).'" data-toggle="tooltip" title="Resume" class="btn btn-xs btn-block btn-primary"><i class="fal fa-eye text-white"></i></a>';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$sekolah = '';
|
||||
$sekolah .= @$row->sekolah->nama_sekolah.'<br>';
|
||||
$sekolah .= '<span class="badge badge-success">'.@$row->profile->tingkat->name.'</span> ';
|
||||
$sekolah .= '<span class="badge badge-primary">'.@$row->profile->status_sekolah.'</span> ';
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
'npsn' => $row->sekolah->npsn,
|
||||
'nama' => $sekolah,
|
||||
'wilayah' => $row->sekolah->kabupaten->name,
|
||||
'penghargaan' => $penghargaan,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
return response()->json($_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -25,6 +25,13 @@ class KriteriaController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
if(Kuesioner::where('ms_sekolah_id',session('sekolah_id'))->where('tahun',date('Y'))->value('status') == 0){
|
||||
return redirect('kuesioner/update/'.encode_id(session('sekolah_id')))->with([
|
||||
'message' => 'Maaf usulan anda belum diverifikasi oleh Dinas',
|
||||
'type' => 'error',
|
||||
]);
|
||||
}
|
||||
|
||||
$data['title'] = $this->title;
|
||||
$data['route'] = $this->route;
|
||||
$data['page'] = FormKriteria::select('page_number')->groupBy('page_number')->orderBy('page_number','ASC')->pluck('page_number')->toArray();
|
||||
|
@ -119,7 +126,6 @@ class KriteriaController extends Controller
|
|||
'page_number' => decode_id($data['key']),
|
||||
'key' => str_replace('input_','',$key),
|
||||
],[
|
||||
'user_id' => auth()->user()->id,
|
||||
'ms_sekolah_id' => session('sekolah_id'),
|
||||
'npsn' => session('npsn'),
|
||||
'page_number' => decode_id($data['key']),
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modules\Usulan;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SuratController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -64,6 +64,18 @@ class ProfileController extends Controller
|
|||
$action .= '<a href="'.url('profile-sekolah/update/'.encode_id($row->id)).'" data-toggle="tooltip" title="Edit Data" class="btn btn-xs btn-block btn-primary"><i class="fal fa-pencil text-white"></i></a>';
|
||||
}
|
||||
|
||||
if($row->level == 0){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||
}elseif($row->level == 1){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Kab/Kota';
|
||||
}elseif($row->level == 2){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Provinsi';
|
||||
}elseif($row->level == 3){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Nasional';
|
||||
}elseif($row->level == 4){
|
||||
$penghargaan = '<i class="fal fa-trophy"></i> Adiwiyata Mandiri';
|
||||
}
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'id' => encode_id($row->id),
|
||||
|
@ -72,7 +84,7 @@ class ProfileController extends Controller
|
|||
'status_level' => '<span class="badge badge-success">Level '.levelAdiwiyata($row->npsn).'</span>',
|
||||
'wilayah' => $row->kabupaten->name,
|
||||
'tanggal_level' => '-',
|
||||
'penghargaan' => '',
|
||||
'penghargaan' => $penghargaan,
|
||||
'dok' => '',
|
||||
'kriteria' => '',
|
||||
'jenis_usulan' => 'Nasional',
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
color: #333!important;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.wrap th,
|
||||
.wrap td {
|
||||
max-width: 100%; /* Sesuaikan max-width kolom */
|
||||
}
|
||||
.wrap td span {
|
||||
white-space: normal !important; /* Pastikan teks bisa wrap */
|
||||
word-wrap: break-word; /* Bungkus kata yang panjang */
|
||||
}
|
||||
</style>
|
||||
@yield('page-css')
|
||||
</head>
|
||||
|
|
|
@ -14,44 +14,44 @@
|
|||
<div class="p-3 bg-primary-300 rounded overflow-hidden position-relative text-white mb-g">
|
||||
<div class="">
|
||||
<h3 class="display-4 d-block l-h-n m-0 fw-500">
|
||||
21
|
||||
{{$total_usulan_kab}}
|
||||
</h3>
|
||||
<span class="m-0 l-h-n">Total Usulan Adiwiyata Kota</span>
|
||||
</div>
|
||||
<i class="fal fa-user position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n1" style="font-size:6rem"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n1" style="font-size:6rem"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="p-3 bg-warning-300 rounded overflow-hidden position-relative text-white mb-g">
|
||||
<div class="">
|
||||
<h3 class="display-4 d-block l-h-n m-0 fw-500">
|
||||
21
|
||||
{{$total_usulan_prov}}
|
||||
</h3>
|
||||
<span class="m-0 l-h-n">Total Usulan Adiwiyata Provinsi</span>
|
||||
</div>
|
||||
<i class="fal fa-gem position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="p-3 bg-success-200 rounded overflow-hidden position-relative text-white mb-g">
|
||||
<div class="">
|
||||
<h3 class="display-4 d-block l-h-n m-0 fw-500">
|
||||
99
|
||||
{{$total_usulan_nasional}}
|
||||
</h3>
|
||||
<span class="m-0 l-h-n">Total Usulan Adiwiyata Nasional</span>
|
||||
</div>
|
||||
<i class="fal fa-lightbulb position-absolute pos-right pos-bottom opacity-15 mb-n5 mr-n6" style="font-size: 8rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n5 mr-n6" style="font-size: 8rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="p-3 bg-info-200 rounded overflow-hidden position-relative text-white mb-g">
|
||||
<div class="">
|
||||
<h3 class="display-4 d-block l-h-n m-0 fw-500">
|
||||
20
|
||||
{{$total_usulan_mandiri}}
|
||||
</h3>
|
||||
<span class="m-0 l-h-n">Total Usulan Adiwiyata Mandiri</span>
|
||||
</div>
|
||||
<i class="fal fa-globe position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</h3>
|
||||
<span class="m-0 l-h-n">Total Sekolah Adiwiyata Kota</span>
|
||||
</div>
|
||||
<i class="fal fa-user position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n1" style="font-size:6rem"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n1" style="font-size:6rem"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
|
@ -75,7 +75,7 @@
|
|||
</h3>
|
||||
<span class="m-0 l-h-n">Total Sekolah Adiwiyata Provinsi</span>
|
||||
</div>
|
||||
<i class="fal fa-gem position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
|
@ -86,7 +86,7 @@
|
|||
</h3>
|
||||
<span class="m-0 l-h-n">Total Sekolah Adiwiyata Nasional</span>
|
||||
</div>
|
||||
<i class="fal fa-lightbulb position-absolute pos-right pos-bottom opacity-15 mb-n5 mr-n6" style="font-size: 8rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n5 mr-n6" style="font-size: 8rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
|
@ -97,7 +97,7 @@
|
|||
</h3>
|
||||
<span class="m-0 l-h-n">Total Sekolah Adiwiyata Mandiri</span>
|
||||
</div>
|
||||
<i class="fal fa-globe position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
<i class="fal fa-trophy position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -106,49 +106,35 @@
|
|||
<div class="col-lg-12">
|
||||
<div id="panel-4" class="panel">
|
||||
<div class="panel-hdr">
|
||||
<h2>Usulan Adiwiyata Tahun 2024</h2>
|
||||
<h2>Usulan Adiwiyata Tahun {{date('Y')}}</h2>
|
||||
</div>
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div class="table-responsive">
|
||||
<table id="dt-basic-example" class="table table-bordered table-hover table-striped w-100">
|
||||
<thead class="bg-warning-200">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>NPSN</th>
|
||||
<th>Nama Sekolah</th>
|
||||
<th>Tahun</th>
|
||||
<th>Tingkat Sekolah</th>
|
||||
<th>Status Sekolah</th>
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.gridUsulan')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead>
|
||||
<tr class="table-primary text-white">
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama_sekolah">Nama Sekolah</th>
|
||||
<th data-field="kab">Kab/Kota</th>
|
||||
<th data-field="usulan_sebelumnya">Usulan Sebelumnya</th>
|
||||
<th data-field="pengajuan_usulan">Pengajuan Usulan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>312344</td>
|
||||
<td>SDN 01 Makasar</td>
|
||||
<td>2024</td>
|
||||
<td>SD</td>
|
||||
<td>Negeri</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>8872638</td>
|
||||
<td>SDN 02 Makasar</td>
|
||||
<td>2024</td>
|
||||
<td>SD</td>
|
||||
<td>Negeri</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>912377</td>
|
||||
<td>SMA 14 Jakarta</td>
|
||||
<td>2024</td>
|
||||
<td>SD</td>
|
||||
<td>Negeri</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div class="panel-content">
|
||||
<div id="toolbar"></div>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
<table class="table table-bordered table-hover table-striped w-100 wrap"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
|
@ -142,10 +142,8 @@
|
|||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
<th data-field="wilayah">Wilayah</th>
|
||||
<th data-field="tingkat_sekolah">Tingkat Sekolah</th>
|
||||
<th data-field="status_sekolah">Status Sekolah</th>
|
||||
<th data-field="alamat_sekolah">Alamat</th>
|
||||
<th data-field="penghargaan">Penghargaan Terakhir</th>
|
||||
<th data-field="status">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
@ -156,11 +154,73 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="fal fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe src="" class="linkIframe" style="width:100%; height: 800px;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{{asset('assets/js/datagrid/datatables/datatables.bundle.js')}}"></script>
|
||||
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
$("#grid-data").on("click", ".verifikasi", function() {
|
||||
var base_url = $(this).attr('data-href');
|
||||
var id = $(this).attr('data-id');
|
||||
swal({
|
||||
title: "Verifikasi Kuesioner!",
|
||||
text: "Apa anda yakin ingin verifikasi kuesioner ini ?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3F7D58",
|
||||
confirmButtonText: "Approve",
|
||||
cancelButtonText: "Tolak",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function(isConfirm) {
|
||||
if(isConfirm){
|
||||
|
||||
request = $.ajax({
|
||||
url: base_url,
|
||||
type: "GET",
|
||||
});
|
||||
|
||||
// Callback handler that will be called on success
|
||||
request.done(function(response, textStatus, jqXHR){
|
||||
console.log(response);
|
||||
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
||||
window.location.href = '{{url("/kuesioner")}}';
|
||||
history.pushState(null, null, location.href);
|
||||
window.onpopstate = function () {
|
||||
history.go(1);
|
||||
};
|
||||
});
|
||||
|
||||
// Callback handler that will be called on failure
|
||||
request.fail(function (jqXHR, textStatus, errorThrown){
|
||||
toastr.error(
|
||||
"Gagal "+textStatus, errorThrown
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('select').on("select2:selecting", function(e) {
|
||||
var selectorOrigin = this.id;
|
||||
var id = e.params.args.data.id;
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
id="grid-data">
|
||||
<thead class="text-white">
|
||||
<tr class="table-primary">
|
||||
<th data-field="action">#</th>
|
||||
<!-- <th data-field="action">#</th> -->
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
|
|
|
@ -0,0 +1,269 @@
|
|||
@extends('layouts.master')
|
||||
@section('page-css')
|
||||
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap-table.min.css')}}">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="subheader">
|
||||
<h1 class="subheader-title">
|
||||
<i class='subheader-icon fal fa-building'></i> {{$title}}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
<i class="fal fa-filter"></i> Filter
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH TINGKAT --</option>
|
||||
<option value="1">SD</option>
|
||||
<option value="2">SMP</option>
|
||||
<option value="3">SMA</option>
|
||||
<option value="4">SMK</option>
|
||||
<option value="5">MI</option>
|
||||
<option value="6">MTs</option>
|
||||
<option value="7">MA</option>
|
||||
<option value="8">SD LB</option>
|
||||
<option value="9">SMP LB</option>
|
||||
<option value="10">SMA LM</option>
|
||||
<option value="11">SLB Khusus</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH STATUS --</option>
|
||||
<option value="Negeri">Negeri</option>
|
||||
<option value="Swasta">Swasta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH LEVEL --</option>
|
||||
<option value="1"> LEVEL 1</option>
|
||||
<option value="2"> LEVEL 2</option>
|
||||
<option value="3"> LEVEL 3</option>
|
||||
<option value="4"> LEVEL 4</option>
|
||||
<option value="5"> LEVEL 5</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH JENIS USULAN --</option>
|
||||
<option value="1">Kab/Kota</option>
|
||||
<option value="2">Provinsi</option>
|
||||
<option value="3">Nasional</option>
|
||||
<option value="4">Mandiri</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="provinsi" class="form-control select2" id="provinsi">
|
||||
<option value="0">- PILIH PROVINSI -</option>
|
||||
@foreach($provinsi as $datProv)
|
||||
<option value="{{encode_id($datProv->MsProvinsiId)}}">{{$datProv->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kabupaten" class="form-control select2" id="kabupaten">
|
||||
<option value="0">- PILIH KABUPATEN/KOTA -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kecamatan" class="form-control select2" id="kecamatan" required>
|
||||
<option value="0">- PILIH KECAMATAN -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-warning btn-block"><i class="fal fa-search"></i> Cari Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panel-4" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div id="toolbar"></div>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="text-white">
|
||||
<tr class="table-primary">
|
||||
<th data-field="action">#</th>
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
<th data-field="wilayah">Wilayah</th>
|
||||
<th data-field="tingkat_sekolah">Dokumen Administrasi</th>
|
||||
<th data-field="tingkat_sekolah">Pemenuhan Kriteria</th>
|
||||
<th data-field="tingkat_sekolah">Progress</th>
|
||||
<th data-field="tingkat_sekolah">SK</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<!-- datatable end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{{asset('assets/js/datagrid/datatables/datatables.bundle.js')}}"></script>
|
||||
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
$('select').on("select2:selecting", function(e) {
|
||||
var selectorOrigin = this.id;
|
||||
var id = e.params.args.data.id;
|
||||
|
||||
|
||||
if(selectorOrigin=='provinsi'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kabupaten');
|
||||
selector = 'kabupaten';
|
||||
url_to = 'kabupaten';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
|
||||
if(selectorOrigin=='kabupaten'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kecamatan');
|
||||
selector = 'kecamatan';
|
||||
url_to = 'kecamatan';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
if(selectorOrigin=='kecamatan'){
|
||||
$('#loading-spinner').show();
|
||||
clear('sekolah');
|
||||
selector = 'sekolah';
|
||||
url_to = 'sekolah';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
});
|
||||
|
||||
function clear(elementId) {
|
||||
$('#' + elementId).empty();
|
||||
$('#' + elementId).select2();
|
||||
}
|
||||
|
||||
function getSelect(id, selectTo, urlTo, selected = "") {
|
||||
id = id;
|
||||
var base_url = "{{url('/')}}";
|
||||
//alert(id);
|
||||
destino = "#" + selectTo;
|
||||
valor = $('#' + id).find(":selected").val();
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: base_url + "/get/" + urlTo,
|
||||
data: {
|
||||
_token: '{{csrf_token()}}',
|
||||
id: id
|
||||
}
|
||||
}).done(function(msg) {
|
||||
obj = msg.data;
|
||||
|
||||
if (obj.length > 0) {
|
||||
//Clear the current options
|
||||
$(destino).empty();
|
||||
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).append('<option value="">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
|
||||
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).append('<option value="">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if(selectTo=='provinsi'){
|
||||
$(destino).empty().append('<option value="0">-PILIH PROVINSI-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
}
|
||||
|
||||
}
|
||||
$('#loading-spinner').hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
|
@ -0,0 +1,269 @@
|
|||
@extends('layouts.master')
|
||||
@section('page-css')
|
||||
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap-table.min.css')}}">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="subheader">
|
||||
<h1 class="subheader-title">
|
||||
<i class='subheader-icon fal fa-building'></i> {{$title}}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
<i class="fal fa-filter"></i> Filter
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH TINGKAT --</option>
|
||||
<option value="1">SD</option>
|
||||
<option value="2">SMP</option>
|
||||
<option value="3">SMA</option>
|
||||
<option value="4">SMK</option>
|
||||
<option value="5">MI</option>
|
||||
<option value="6">MTs</option>
|
||||
<option value="7">MA</option>
|
||||
<option value="8">SD LB</option>
|
||||
<option value="9">SMP LB</option>
|
||||
<option value="10">SMA LM</option>
|
||||
<option value="11">SLB Khusus</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH STATUS --</option>
|
||||
<option value="Negeri">Negeri</option>
|
||||
<option value="Swasta">Swasta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH LEVEL --</option>
|
||||
<option value="1"> LEVEL 1</option>
|
||||
<option value="2"> LEVEL 2</option>
|
||||
<option value="3"> LEVEL 3</option>
|
||||
<option value="4"> LEVEL 4</option>
|
||||
<option value="5"> LEVEL 5</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH JENIS USULAN --</option>
|
||||
<option value="1">Kab/Kota</option>
|
||||
<option value="2">Provinsi</option>
|
||||
<option value="3">Nasional</option>
|
||||
<option value="4">Mandiri</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="provinsi" class="form-control select2" id="provinsi">
|
||||
<option value="0">- PILIH PROVINSI -</option>
|
||||
@foreach($provinsi as $datProv)
|
||||
<option value="{{encode_id($datProv->MsProvinsiId)}}">{{$datProv->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kabupaten" class="form-control select2" id="kabupaten">
|
||||
<option value="0">- PILIH KABUPATEN/KOTA -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kecamatan" class="form-control select2" id="kecamatan" required>
|
||||
<option value="0">- PILIH KECAMATAN -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-warning btn-block"><i class="fal fa-search"></i> Cari Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panel-4" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div id="toolbar"></div>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="text-white">
|
||||
<tr class="table-primary">
|
||||
<th data-field="action">#</th>
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
<th data-field="wilayah">Wilayah</th>
|
||||
<th data-field="tingkat_sekolah">Dokumen Administrasi</th>
|
||||
<th data-field="tingkat_sekolah">Pemenuhan Kriteria</th>
|
||||
<th data-field="tingkat_sekolah">Progress</th>
|
||||
<th data-field="tingkat_sekolah">SK</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<!-- datatable end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{{asset('assets/js/datagrid/datatables/datatables.bundle.js')}}"></script>
|
||||
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
$('select').on("select2:selecting", function(e) {
|
||||
var selectorOrigin = this.id;
|
||||
var id = e.params.args.data.id;
|
||||
|
||||
|
||||
if(selectorOrigin=='provinsi'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kabupaten');
|
||||
selector = 'kabupaten';
|
||||
url_to = 'kabupaten';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
|
||||
if(selectorOrigin=='kabupaten'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kecamatan');
|
||||
selector = 'kecamatan';
|
||||
url_to = 'kecamatan';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
if(selectorOrigin=='kecamatan'){
|
||||
$('#loading-spinner').show();
|
||||
clear('sekolah');
|
||||
selector = 'sekolah';
|
||||
url_to = 'sekolah';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
});
|
||||
|
||||
function clear(elementId) {
|
||||
$('#' + elementId).empty();
|
||||
$('#' + elementId).select2();
|
||||
}
|
||||
|
||||
function getSelect(id, selectTo, urlTo, selected = "") {
|
||||
id = id;
|
||||
var base_url = "{{url('/')}}";
|
||||
//alert(id);
|
||||
destino = "#" + selectTo;
|
||||
valor = $('#' + id).find(":selected").val();
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: base_url + "/get/" + urlTo,
|
||||
data: {
|
||||
_token: '{{csrf_token()}}',
|
||||
id: id
|
||||
}
|
||||
}).done(function(msg) {
|
||||
obj = msg.data;
|
||||
|
||||
if (obj.length > 0) {
|
||||
//Clear the current options
|
||||
$(destino).empty();
|
||||
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).append('<option value="">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
|
||||
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).append('<option value="">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if(selectTo=='provinsi'){
|
||||
$(destino).empty().append('<option value="0">-PILIH PROVINSI-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
}
|
||||
|
||||
}
|
||||
$('#loading-spinner').hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
|
@ -0,0 +1,269 @@
|
|||
@extends('layouts.master')
|
||||
@section('page-css')
|
||||
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap-table.min.css')}}">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="subheader">
|
||||
<h1 class="subheader-title">
|
||||
<i class='subheader-icon fal fa-building'></i> {{$title}}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
<i class="fal fa-filter"></i> Filter
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH TINGKAT --</option>
|
||||
<option value="1">SD</option>
|
||||
<option value="2">SMP</option>
|
||||
<option value="3">SMA</option>
|
||||
<option value="4">SMK</option>
|
||||
<option value="5">MI</option>
|
||||
<option value="6">MTs</option>
|
||||
<option value="7">MA</option>
|
||||
<option value="8">SD LB</option>
|
||||
<option value="9">SMP LB</option>
|
||||
<option value="10">SMA LM</option>
|
||||
<option value="11">SLB Khusus</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH STATUS --</option>
|
||||
<option value="Negeri">Negeri</option>
|
||||
<option value="Swasta">Swasta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH LEVEL --</option>
|
||||
<option value="1"> LEVEL 1</option>
|
||||
<option value="2"> LEVEL 2</option>
|
||||
<option value="3"> LEVEL 3</option>
|
||||
<option value="4"> LEVEL 4</option>
|
||||
<option value="5"> LEVEL 5</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH JENIS USULAN --</option>
|
||||
<option value="1">Kab/Kota</option>
|
||||
<option value="2">Provinsi</option>
|
||||
<option value="3">Nasional</option>
|
||||
<option value="4">Mandiri</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="provinsi" class="form-control select2" id="provinsi">
|
||||
<option value="0">- PILIH PROVINSI -</option>
|
||||
@foreach($provinsi as $datProv)
|
||||
<option value="{{encode_id($datProv->MsProvinsiId)}}">{{$datProv->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kabupaten" class="form-control select2" id="kabupaten">
|
||||
<option value="0">- PILIH KABUPATEN/KOTA -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kecamatan" class="form-control select2" id="kecamatan" required>
|
||||
<option value="0">- PILIH KECAMATAN -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-warning btn-block"><i class="fal fa-search"></i> Cari Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panel-4" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div id="toolbar"></div>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="text-white">
|
||||
<tr class="table-primary">
|
||||
<th data-field="action">#</th>
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
<th data-field="wilayah">Wilayah</th>
|
||||
<th data-field="tingkat_sekolah">Dokumen Administrasi</th>
|
||||
<th data-field="tingkat_sekolah">Pemenuhan Kriteria</th>
|
||||
<th data-field="tingkat_sekolah">Progress</th>
|
||||
<th data-field="tingkat_sekolah">SK</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<!-- datatable end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{{asset('assets/js/datagrid/datatables/datatables.bundle.js')}}"></script>
|
||||
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
$('select').on("select2:selecting", function(e) {
|
||||
var selectorOrigin = this.id;
|
||||
var id = e.params.args.data.id;
|
||||
|
||||
|
||||
if(selectorOrigin=='provinsi'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kabupaten');
|
||||
selector = 'kabupaten';
|
||||
url_to = 'kabupaten';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
|
||||
if(selectorOrigin=='kabupaten'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kecamatan');
|
||||
selector = 'kecamatan';
|
||||
url_to = 'kecamatan';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
if(selectorOrigin=='kecamatan'){
|
||||
$('#loading-spinner').show();
|
||||
clear('sekolah');
|
||||
selector = 'sekolah';
|
||||
url_to = 'sekolah';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
});
|
||||
|
||||
function clear(elementId) {
|
||||
$('#' + elementId).empty();
|
||||
$('#' + elementId).select2();
|
||||
}
|
||||
|
||||
function getSelect(id, selectTo, urlTo, selected = "") {
|
||||
id = id;
|
||||
var base_url = "{{url('/')}}";
|
||||
//alert(id);
|
||||
destino = "#" + selectTo;
|
||||
valor = $('#' + id).find(":selected").val();
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: base_url + "/get/" + urlTo,
|
||||
data: {
|
||||
_token: '{{csrf_token()}}',
|
||||
id: id
|
||||
}
|
||||
}).done(function(msg) {
|
||||
obj = msg.data;
|
||||
|
||||
if (obj.length > 0) {
|
||||
//Clear the current options
|
||||
$(destino).empty();
|
||||
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).append('<option value="">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
|
||||
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).append('<option value="">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if(selectTo=='provinsi'){
|
||||
$(destino).empty().append('<option value="0">-PILIH PROVINSI-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
}
|
||||
|
||||
}
|
||||
$('#loading-spinner').hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
|
@ -0,0 +1,269 @@
|
|||
@extends('layouts.master')
|
||||
@section('page-css')
|
||||
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap-table.min.css')}}">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="subheader">
|
||||
<h1 class="subheader-title">
|
||||
<i class='subheader-icon fal fa-building'></i> {{$title}}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
<i class="fal fa-filter"></i> Filter
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH TINGKAT --</option>
|
||||
<option value="1">SD</option>
|
||||
<option value="2">SMP</option>
|
||||
<option value="3">SMA</option>
|
||||
<option value="4">SMK</option>
|
||||
<option value="5">MI</option>
|
||||
<option value="6">MTs</option>
|
||||
<option value="7">MA</option>
|
||||
<option value="8">SD LB</option>
|
||||
<option value="9">SMP LB</option>
|
||||
<option value="10">SMA LM</option>
|
||||
<option value="11">SLB Khusus</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH STATUS --</option>
|
||||
<option value="Negeri">Negeri</option>
|
||||
<option value="Swasta">Swasta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH LEVEL --</option>
|
||||
<option value="1"> LEVEL 1</option>
|
||||
<option value="2"> LEVEL 2</option>
|
||||
<option value="3"> LEVEL 3</option>
|
||||
<option value="4"> LEVEL 4</option>
|
||||
<option value="5"> LEVEL 5</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control select2">
|
||||
<option value="">-- PILIH JENIS USULAN --</option>
|
||||
<option value="1">Kab/Kota</option>
|
||||
<option value="2">Provinsi</option>
|
||||
<option value="3">Nasional</option>
|
||||
<option value="4">Mandiri</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="provinsi" class="form-control select2" id="provinsi">
|
||||
<option value="0">- PILIH PROVINSI -</option>
|
||||
@foreach($provinsi as $datProv)
|
||||
<option value="{{encode_id($datProv->MsProvinsiId)}}">{{$datProv->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kabupaten" class="form-control select2" id="kabupaten">
|
||||
<option value="0">- PILIH KABUPATEN/KOTA -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select name="kecamatan" class="form-control select2" id="kecamatan" required>
|
||||
<option value="0">- PILIH KECAMATAN -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-warning btn-block"><i class="fal fa-search"></i> Cari Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panel-4" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div id="toolbar"></div>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="text-white">
|
||||
<tr class="table-primary">
|
||||
<th data-field="action">#</th>
|
||||
<th data-field="no">No</th>
|
||||
<th data-field="npsn">NPSN</th>
|
||||
<th data-field="nama">Nama Sekolah</th>
|
||||
<th data-field="wilayah">Wilayah</th>
|
||||
<th data-field="tingkat_sekolah">Dokumen Administrasi</th>
|
||||
<th data-field="tingkat_sekolah">Pemenuhan Kriteria</th>
|
||||
<th data-field="tingkat_sekolah">Progress</th>
|
||||
<th data-field="tingkat_sekolah">SK</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<!-- datatable end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{{asset('assets/js/datagrid/datatables/datatables.bundle.js')}}"></script>
|
||||
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
$('select').on("select2:selecting", function(e) {
|
||||
var selectorOrigin = this.id;
|
||||
var id = e.params.args.data.id;
|
||||
|
||||
|
||||
if(selectorOrigin=='provinsi'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kabupaten');
|
||||
selector = 'kabupaten';
|
||||
url_to = 'kabupaten';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
|
||||
if(selectorOrigin=='kabupaten'){
|
||||
$('#loading-spinner').show();
|
||||
clear('kecamatan');
|
||||
selector = 'kecamatan';
|
||||
url_to = 'kecamatan';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
if(selectorOrigin=='kecamatan'){
|
||||
$('#loading-spinner').show();
|
||||
clear('sekolah');
|
||||
selector = 'sekolah';
|
||||
url_to = 'sekolah';
|
||||
getSelect(id, selector, url_to);
|
||||
}
|
||||
});
|
||||
|
||||
function clear(elementId) {
|
||||
$('#' + elementId).empty();
|
||||
$('#' + elementId).select2();
|
||||
}
|
||||
|
||||
function getSelect(id, selectTo, urlTo, selected = "") {
|
||||
id = id;
|
||||
var base_url = "{{url('/')}}";
|
||||
//alert(id);
|
||||
destino = "#" + selectTo;
|
||||
valor = $('#' + id).find(":selected").val();
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: base_url + "/get/" + urlTo,
|
||||
data: {
|
||||
_token: '{{csrf_token()}}',
|
||||
id: id
|
||||
}
|
||||
}).done(function(msg) {
|
||||
obj = msg.data;
|
||||
|
||||
if (obj.length > 0) {
|
||||
//Clear the current options
|
||||
$(destino).empty();
|
||||
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).append('<option value="">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
|
||||
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).append('<option value="">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
|
||||
$.each(obj, function(index) {
|
||||
value = obj[index].id;
|
||||
text = obj[index].name;
|
||||
$(destino).append('<option value=' + value + '>' + text + '</option>');
|
||||
});
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
$(destino).val(selected).trigger('change');
|
||||
selected = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if(selectTo=='provinsi'){
|
||||
$(destino).empty().append('<option value="0">-PILIH PROVINSI-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kabupaten'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KABUPATEN/KOTA-</option>').select2("val", "0");
|
||||
}
|
||||
if(selectTo=='kecamatan'){
|
||||
$(destino).empty().append('<option value="0">-PILIH KECAMATAN-</option>').select2("val", "0");
|
||||
}
|
||||
|
||||
}
|
||||
$('#loading-spinner').hide();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
|
@ -17,8 +17,14 @@ use App\Http\Controllers\Modules\Usulan\AdministrasiController;
|
|||
use App\Http\Controllers\Modules\Usulan\KriteriaController;
|
||||
use App\Http\Controllers\Modules\Usulan\ProgressController;
|
||||
use App\Http\Controllers\Modules\Usulan\SekolahBinaanController;
|
||||
use App\Http\Controllers\Modules\Usulan\CSAKController;
|
||||
use App\Http\Controllers\Modules\Usulan\CSAPController;
|
||||
use App\Http\Controllers\Modules\Usulan\CSAMController;
|
||||
use App\Http\Controllers\Modules\Usulan\CSANController;
|
||||
use App\Http\Controllers\Modules\Usulan\SuratController;
|
||||
|
||||
Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard');
|
||||
Route::get('dashboard/gridUsulan',[HomeController::class,'gridUsulan'])->name('gridUsulan');
|
||||
Route::get('profile-sekolah',[ProfileController::class,'index'])->name('profile.index');
|
||||
Route::get('profile-sekolah/grid',[ProfileController::class,'grid'])->name('profile.grid');
|
||||
Route::post('profile-sekolah',[ProfileController::class,'store'])->name('profile.store');
|
||||
|
@ -52,6 +58,31 @@ Route::name('usulan.')->prefix('usulan')->group(function () {
|
|||
Route::post('/store',[KriteriaController::class,'store'])->name('store');
|
||||
});
|
||||
|
||||
Route::name('csak.')->prefix('csak')->group(function () {
|
||||
Route::resource('/',CSAKController::class);
|
||||
Route::get('/grid',[CSAKController::class,'grid'])->name('grid');
|
||||
});
|
||||
|
||||
Route::name('csap.')->prefix('csap')->group(function () {
|
||||
Route::resource('/',CSAPController::class);
|
||||
Route::get('/grid',[CSAPController::class,'grid'])->name('grid');
|
||||
});
|
||||
|
||||
Route::name('csam.')->prefix('csam')->group(function () {
|
||||
Route::resource('/',CSAMController::class);
|
||||
Route::get('/grid',[CSAMController::class,'grid'])->name('grid');
|
||||
});
|
||||
|
||||
Route::name('csan.')->prefix('csan')->group(function () {
|
||||
Route::resource('/',CSANController::class);
|
||||
Route::get('/grid',[CSANController::class,'grid'])->name('grid');
|
||||
});
|
||||
|
||||
Route::name('surat.')->prefix('surat')->group(function () {
|
||||
Route::resource('/',SuratController::class);
|
||||
Route::get('/grid',[SuratController::class,'grid'])->name('grid');
|
||||
});
|
||||
|
||||
Route::name('administrasi.')->prefix('administrasi')->group(function () {
|
||||
Route::get('/',[AdministrasiController::class,'index'])->name('index');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue