main
ilhamwara 2025-02-20 16:02:01 +07:00
parent 1f870158c0
commit 59f0760e98
27 changed files with 1279 additions and 73 deletions

View File

@ -3,6 +3,68 @@
use App\Models\Master\MasterMenu; use App\Models\Master\MasterMenu;
use App\Models\Master\MasterAccessMenu; use App\Models\Master\MasterAccessMenu;
if (!function_exists('taskLabel')) {
/**
* @param $val
*
* @return string
*/
function taskLabel($val)
{
if ($val == 'store') {
$task = 'save';
} elseif ($val == 'save_permission') {
$task = 'save group access';
} elseif ($val == 'destroy') {
$task = 'delete';
} elseif ($val == 'batch') {
$task = 'delete';
} else {
$task = $val;
}
return $task;
}
}
if (!function_exists('logActivity')) {
/**
* @param $request
* @param $note
*/
function logActivity($request, $note)
{
$repository = app(\App\Models\Log::class);
$data = [
'module' => $request->route()->getAction('prefix'),
'task' => taskLabel($request->route()->getActionMethod()),
'user_id' => session('uid'),
'ipaddress' => $request->getClientIp(),
'useragent' => $request->header('User-Agent'),
'note' => $note,
'created_at' => \Carbon\Carbon::now()
];
if (session('superuser') == false)
$repository->create($data);
}
}
if (!function_exists('trimId')) {
/**
* @param $val
* @return array
*/
function trimId($val)
{
$string = explode('+', $val);
return $string;
}
}
if (!function_exists('dateTime')) { if (!function_exists('dateTime')) {
/** /**
* make secure id * make secure id
@ -112,7 +174,7 @@ if (!function_exists('renderMenu')) {
function renderMenu() function renderMenu()
{ {
$parent = MasterMenu::where('status',true)->where('menu_type','sidebar')->where('parent_id',0)->get(); $parent = MasterMenu::where('status',true)->where('menu_type','sidebar')->where('parent_id',0)->orderBy('ordering','ASC')->get();
$html = ''; $html = '';
foreach ($parent as $p1) { foreach ($parent as $p1) {
// echo $p1->MsMenuId.'<br>'; // echo $p1->MsMenuId.'<br>';

View File

@ -30,6 +30,7 @@ class CustomLoginController extends Controller
$user = User::where('username', $credentials['email'])->first(); $user = User::where('username', $credentials['email'])->first();
if ($user && Hash::check($credentials['password'], $user->password)) { if ($user && Hash::check($credentials['password'], $user->password)) {
// dd($user->group);
Auth::attempt(['username' => $request->email, 'password' => $request->password]); Auth::attempt(['username' => $request->email, 'password' => $request->password]);
$session = [ $session = [
@ -37,13 +38,15 @@ class CustomLoginController extends Controller
'name' => $user->name, 'name' => $user->name,
'email' => $user->email, 'email' => $user->email,
'npsn' => @$user->sekolah->npsn, 'npsn' => @$user->sekolah->npsn,
'ms_tingkat_sekolah_id' => @$user->sekolah->ms_tingkat_sekolah_id, 'tingkat_sekolah' => @$user->sekolah->tingkat->name,
'status_sekolah' => @$user->sekolah->status_sekolah, 'status_sekolah' => @$user->sekolah->status_sekolah,
'alamat_sekolah' => @$user->sekolah->alamat_sekolah, 'alamat_sekolah' => @$user->sekolah->alamat_sekolah,
'kontak_person' => @$user->sekolah->kontak_person, 'kontak_person' => @$user->sekolah->kontak_person,
'telp' => @$user->sekolah->telp, 'telp' => @$user->sekolah->telp,
'currYear' => date('Y'), 'currYear' => date('Y'),
'group_id' => @$user->ms_group_id, 'group_id' => @$user->ms_group_id,
'group_alias' => @$user->group->alias,
'group_name' => @$user->group->name,
]; ];
session($session); session($session);
@ -69,13 +72,15 @@ class CustomLoginController extends Controller
'name' => $user->name, 'name' => $user->name,
'email' => $user->email, 'email' => $user->email,
'npsn' => @$user->sekolah->npsn, 'npsn' => @$user->sekolah->npsn,
'ms_tingkat_sekolah_id' => @$user->sekolah->ms_tingkat_sekolah_id, 'tingkat_sekolah' => @$user->sekolah->tingkat->name,
'status_sekolah' => @$user->sekolah->status_sekolah, 'status_sekolah' => @$user->sekolah->status_sekolah,
'alamat_sekolah' => @$user->sekolah->alamat_sekolah, 'alamat_sekolah' => @$user->sekolah->alamat_sekolah,
'kontak_person' => @$user->sekolah->kontak_person, 'kontak_person' => @$user->sekolah->kontak_person,
'telp' => @$user->sekolah->telp, 'telp' => @$user->sekolah->telp,
'currYear' => date('Y'), 'currYear' => date('Y'),
'group_id' => @$user->ms_group_id, 'group_id' => @$user->ms_group_id,
'group_alias' => @$user->group->alias,
'group_name' => @$user->group->name,
]; ];
session($session); session($session);

View File

@ -6,6 +6,8 @@ use Illuminate\Http\Request;
class HomeController extends Controller class HomeController extends Controller
{ {
protected $template = 'modules.dashboard';
/** /**
* Create a new controller instance. * Create a new controller instance.
* *
@ -29,6 +31,11 @@ class HomeController extends Controller
public function dashboard() public function dashboard()
{ {
$data['title'] = 'Dashboard'; $data['title'] = 'Dashboard';
return view('home',$data); $data['group'] = session('group_alias');
if(session('group_alias') == 'sekolah'){
return view($this->template.'.sekolah', $data);
}else{
return view($this->template.'.admin', $data);
}
} }
} }

View File

@ -0,0 +1,341 @@
<?php
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Master\MasterAccessMenu;
use App\Models\Master\MasterMenu;
use App\Models\Master\MasterGroup;
class AksesController extends Controller
{
protected $title = 'Hak Akses User';
protected $template = 'modules.management.role.akses';
protected $route = 'modules.management.role.akses';
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
public function getRoute($prefix = '*'): string
{
return $this->route.'.'.$prefix;
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
permission('is_update', $this->getRoute(), false, 'module');
$id = decode_id($request->group_id);
// dd($id);
$_read = [];
if ($request->has('is_read')) {
foreach ($request->input('is_read') as $val) {
$_read[] = ['ms_menu_id' => $val];
}
}
$_create = [];
if ($request->has('is_create')) {
foreach ($request->input('is_create') as $val) {
$_create[] = ['ms_menu_id' => $val];
}
}
$_update = [];
if ($request->has('is_update')) {
foreach ($request->input('is_update') as $val) {
$_update[] = ['ms_menu_id' => $val];
}
}
$_delete = [];
if ($request->has('is_delete')) {
foreach ($request->input('is_delete') as $val) {
$_delete[] = ['ms_menu_id' => $val];
}
}
$_download = [];
if ($request->has('is_download')) {
foreach ($request->input('is_download') as $val) {
$_download[] = ['ms_menu_id' => $val];
}
}
$merged = array_merge($_read, $_create, $_update, $_delete, $_download);
$result = [];
foreach ($merged as $key => $data) {
$access = trimId($data['ms_menu_id']);
$module = MasterMenu::find($access[1]);
if (isset($result[$access[1]])) {
$result[$access[1]][$access[0]] = 1;
} else {
$result[$access[1]] = ['ms_menu_id' => intval($access[1]), $access[0] => 1, 'ms_group_id' => intval($id), 'module' => $module->module, 'menu_group' => $request->input('menu_group')];
}
}
/**
* Merge all privileges into json
*/
$group = MasterGroup::find(intval($id));
if ($merged) {
$current = MasterAccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id',intval($id))->get();
$insert = null;
if ($current->count() > 0) {
$deletedRows = MasterAccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id',intval($id))->delete();
if ($deletedRows) {
foreach ($result as $val) {
$insert = MasterAccessMenu::create($val);
}
}
} else {
foreach ($result as $val) {
$insert = MasterAccessMenu::create($val);
}
}
if ($insert) {
logActivity($request, __('Edit',['val' => strtolower(__('module.group.access.title',['val' => $group->name]))]));
return redirect('management/role/')->with('message', __('Berhasil Update Data'))
->with('type', 'success');
} else {
throw new GeneralException(__('Maaf Terjadi Kesalahan'));
}
} else {
$current = MasterAccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id', intval($id))->count();
if ($current > 0) {
MasterAccessMenu::where('menu_group', $request->input('menu_group'))->where('ms_group_id', intval($id))->delete();
logActivity($request, __('Delete',['val' => strtolower(__('Title',['val' => $group->name]))]));
return redirect('management/role/')->with('message', __('Berhasil Update Data'))
->with('type', 'success');
} else {
throw new GeneralException(__('Maaf Terjadi Kesalahan'));
}
}
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$data['key'] = decode_id($id);
$data['id'] = decode_id($id);
$data['group'] = MasterGroup::where('MsGroupId',decode_id($id))->first();
$data['breadcrumbs'] = [
['name' => 'Dashboard','url' => url('dashboard')],
['name' => 'Management & Akses Role'],
['name' => 'Data Role','url' => url('management/role/')],
['name' => 'Role '.$data['group']->name,'active' => true],
];
$data['type'] = 'sidebar';
// $data['groupMenus'] = MasterMenu::where('status',true)->get();
$data['menu'] = $this->getMenu($data['key'], $data['type']);
$data['title'] = $this->title.' '.$data['group']->name;
$data['route'] = $this->route;
return view($this->template.'.form',$data);
}
public function getMenuByParentPosition($id, $type, $active = [1])
{
return MasterMenu::where('parent_id', '=', $id)
->where('menu_type', '=', $type)
->whereIn('status', $active)
->orderBy('ordering')
->get();
}
public function getParentByType($type)
{
return MasterMenu::where('parent_id', '=', 0)
->where('menu_type', '=', $type)
->orderBy('ordering')
->get();
}
public function getMenuByParent($id, $active = [1])
{
return MasterMenu::where('parent_id', '=', $id)
->whereIn('status', $active)
->orderBy('ordering')
->get();
}
/**
* @param $id
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|null|object
*/
public function getActiveById($id)
{
return MasterMenu::where('ms_menu_id', '=' , $id)
->where('status', '=' , true)
->first();
}
/**
* Get all active menu by menu position
*
* @param $type
* @return mixed
*/
public function getActiveByPosition($type)
{
return MasterMenu::where('menu_type', '=' , $type)
->where('status', '=' , true)
->orderBy('ordering')
->get();
}
/**
* @param $type
* @return \Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model[]
*/
public function getParentByTypeStatus($type)
{
return MasterMenu::where('parent_id', '=', 0)
->where('menu_type', '=', $type)
->where('status','=',true)
->orderBy('ordering')
->get();
}
public function getMenu($id, $type)
{
$parent = $this->getMenuByParentPosition(0,$type);
$_parent = [];
foreach ($parent as $row) {
$lev1 = $this->getMenuByParent($row->MsMenuId);
$_lev1 = [];
foreach ($lev1 as $l1) {
$lev2 = $this->getMenuByParent($l1->MsMenuId);
$_lev2 = [];
foreach ($lev2 as $l2) {
$lev3 = $this->getMenuByParent($l2->MsMenuId);
$_lev3 = [];
foreach ($lev3 as $l3) {
$lev4 = $this->getMenuByParent($l3->MsMenuId);
$_lev4 = [];
foreach ($lev4 as $l4) {
$lev4Access = MasterAccessMenu::where('ms_group_id', '=', $id)->where('ms_menu_id', '=', $l4->MsMenuId)->first();
$_lev4[] = [
'id' => $l4->MsMenuId,
'title' => $l4->title,
'ordering' => $l4->ordering,
'checked' => [
"is_create" => $lev4Access ? $lev4Access->is_create : 0,
"is_read" => $lev4Access ? $lev4Access->is_read : 0,
"is_update" => $lev4Access ? $lev4Access->is_update : 0,
"is_delete" => $lev4Access ? $lev4Access->is_delete : 0,
"is_download" => $lev4Access ? $lev4Access->is_download : 0,
]
];
}
$lev3Access = MasterAccessMenu::where('ms_group_id', '=', $id)->where('ms_menu_id', '=', $l3->MsMenuId)->first();
$_lev3[] = [
'id' => $l3->MsMenuId,
'title' => $l3->title . (!!$l3->meta_title?" ##Meta: ". $l3->meta_title:""),
'ordering' => $l3->ordering,
'level4' => $_lev4,
'checked' => [
"is_create" => $lev3Access ? $lev3Access->is_create : 0,
"is_read" => $lev3Access ? $lev3Access->is_read : 0,
"is_update" => $lev3Access ? $lev3Access->is_update : 0,
"is_delete" => $lev3Access ? $lev3Access->is_delete : 0,
"is_download" => $lev3Access ? $lev3Access->is_download : 0,
]
];
}
$lev2Access = MasterAccessMenu::where('ms_group_id', '=', $id)->where('ms_menu_id', '=', $l2->MsMenuId)->first();
$_lev2[] = [
'id' => $l2->MsMenuId,
'title' => $l2->title . " (".(!!$l2->meta_title?$l2->meta_title."@":""). "url:" . $l2->url.")",
'ordering' => $l2->ordering,
'level3' => $_lev3,
'checked' => [
"is_create" => $lev2Access ? $lev2Access->is_create : 0,
"is_read" => $lev2Access ? $lev2Access->is_read : 0,
"is_update" => $lev2Access ? $lev2Access->is_update : 0,
"is_delete" => $lev2Access ? $lev2Access->is_delete : 0,
"is_download" => $lev2Access ? $lev2Access->is_download : 0,
]
];
}
$lev1Access = MasterAccessMenu::where('ms_group_id', '=', $id)->where('ms_menu_id', '=', $l1->MsMenuId)->first();
$_lev1[] = [
'id' => $l1->MsMenuId,
'title' => $l1->title,
'ordering' => $l1->ordering,
'level2' => $_lev2,
'checked' => [
"is_create" => $lev1Access ? $lev1Access->is_create : 0,
"is_read" => $lev1Access ? $lev1Access->is_read : 0,
"is_update" => $lev1Access ? $lev1Access->is_update : 0,
"is_delete" => $lev1Access ? $lev1Access->is_delete : 0,
"is_download" => $lev1Access ? $lev1Access->is_download : 0,
]
];
}
$parentAccess = MasterAccessMenu::where('ms_group_id', '=', $id)->where('ms_menu_id', '=', $row->MsMenuId)->first();
$_parent[] = [
'id' => $row->MsMenuId,
'title' => $row->title,
'ordering' => $row->ordering,
'level1' => $_lev1,
'checked' => [
"is_create" => $parentAccess ? $parentAccess->is_create : 0,
"is_read" => $parentAccess ? $parentAccess->is_read : 0,
"is_update" => $parentAccess ? $parentAccess->is_update : 0,
"is_delete" => $parentAccess ? $parentAccess->is_delete : 0,
"is_download" => $parentAccess ? $parentAccess->is_download : 0,
]
];
}
return $_parent;
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
}

View File

@ -40,8 +40,8 @@ class RoleController extends Controller
$action = ''; $action = '';
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){ if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
$action .= '<a href="'.url('/management/role/akses/'.encode_id($row->id)).'" data-toggle="tooltip" title="Edit Hak Akses Role" class="btn btn-sm btn-block btn-primary"><i class="fal fa-users text-white"></i></a>'; $action .= '<a href="'.url('/management/role/akses/'.encode_id($row->MsGroupId)).'/edit" data-toggle="tooltip" title="Edit Hak Akses Role" class="btn btn-sm btn-block btn-primary"><i class="fal fa-users text-white"></i></a>';
$action .= '<a href="'.url('/management/role/'.encode_id($row->id).'/edit').'" data-toggle="tooltip" title="Edit Data" class="btn btn-sm btn-block btn-success"><i class="fal fa-pencil text-white"></i></a>'; $action .= '<a href="'.url('/management/role/'.encode_id($row->MsGroupId).'/edit').'" data-toggle="tooltip" title="Edit Data" class="btn btn-sm btn-block btn-success"><i class="fal fa-pencil text-white"></i></a>';
// $action .= '<a data-toggle="tooltip" title="Hapus Data" class="btn btn-xs btn-block btn-danger"><i class="fal fa-trash text-white"></i></a>'; // $action .= '<a data-toggle="tooltip" title="Hapus Data" class="btn btn-xs btn-block btn-danger"><i class="fal fa-trash text-white"></i></a>';
} }

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ProfileController extends Controller
{
protected $template = 'modules.profile';
public function index()
{
$data['title'] = 'Profile Sekolah';
if(session('group_alias') == 'sekolah'){
return view($this->template.'.sekolah', $data);
}else{
return view($this->template.'.admin', $data);
}
}
}

24
app/Models/Log.php 100644
View File

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Log extends Model
{
use HasFactory;
protected $table = 'ms_log';
protected $primaryKey = 'MsLogId';
protected $fillable = ['module', 'task', 'user_id', 'ipaddress', 'useragent', 'note'];
protected $guarded = ['created_at', 'updated_at'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo('App\Models\User','id','user_id');
}
}

View File

@ -20,4 +20,9 @@ class ProfileSekolah extends Model
'kontak_person', 'kontak_person',
'telp', 'telp',
]; ];
public function tingkat()
{
return $this->belongsTo(\App\Models\Master\MasterTingkatSekolah::class,'ms_tingkat_sekolah_id','MsTingkatSekolahId');
}
} }

View File

@ -49,4 +49,9 @@ class User extends Authenticatable
{ {
return $this->belongsTo(ProfileSekolah::class,'id','user_id'); return $this->belongsTo(ProfileSekolah::class,'id','user_id');
} }
public function group()
{
return $this->belongsTo(\App\Models\Master\MasterGroup::class,'ms_group_id','MsGroupId');
}
} }

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('ms_log', function (Blueprint $table) {
$table->bigIncrements('MsLogId');
$table->string('module',200)->nullable();
$table->string('task',100)->nullable();
$table->unsignedBigInteger('user_id')->index()->nullable();
$table->ipAddress('ipaddress')->nullable();
$table->mediumText('useragent')->nullable();
$table->mediumText('note')->nullable();
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('logs');
}
};

View File

@ -633,7 +633,7 @@ RESULT:
--theme-success-400: #21dfcb; --theme-success-400: #21dfcb;
--theme-success-500: #3A7D44; --theme-success-500: #3A7D44;
--theme-success-600: #1ab3a3; --theme-success-600: #1ab3a3;
--theme-success-700: #179c8e; --theme-success-700: #3A7D44;
--theme-success-800: #13867a; --theme-success-800: #13867a;
--theme-success-900: #107066; --theme-success-900: #107066;
--theme-info-50: #9acffa; --theme-info-50: #9acffa;
@ -2989,8 +2989,8 @@ html body {
box-shadow: 0 2px 6px 0 rgba(134, 142, 150, 0.5); } box-shadow: 0 2px 6px 0 rgba(134, 142, 150, 0.5); }
.btn-success { .btn-success {
-webkit-box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
-webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5); -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
@ -7198,7 +7198,7 @@ html:not(.root-text-sm):not(.root-text-lg):not(.root-text-xl) [data-class="root-
color: white; } color: white; }
.bg-success-700 { .bg-success-700 {
background-color: #179c8e; background-color: #3A7D44;
color: white; } color: white; }
.bg-success-700:hover { .bg-success-700:hover {
color: white; } color: white; }
@ -7237,7 +7237,7 @@ html:not(.root-text-sm):not(.root-text-lg):not(.root-text-xl) [data-class="root-
color: #1ab3a3; } color: #1ab3a3; }
.color-success-700 { .color-success-700 {
color: #179c8e; } color: #3A7D44; }
.color-success-800 { .color-success-800 {
color: #13867a; } color: #13867a; }

View File

@ -766,8 +766,8 @@ html body {
box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); } box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); }
.btn-success { .btn-success {
-webkit-box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
-webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5); -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
@ -1302,7 +1302,7 @@ code {
color: white; } color: white; }
.bg-success-700 { .bg-success-700 {
background-color: #179c8e; background-color: #3A7D44;
color: white; } color: white; }
.bg-success-700:hover { .bg-success-700:hover {
color: white; } color: white; }
@ -1341,7 +1341,7 @@ code {
color: #1ab3a3; } color: #1ab3a3; }
.color-success-700 { .color-success-700 {
color: #179c8e; } color: #3A7D44; }
.color-success-800 { .color-success-800 {
color: #13867a; } color: #13867a; }
@ -1795,11 +1795,11 @@ code {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); }
.btn-success:hover { .btn-success:hover {
color: #fff; color: #fff;
background-color: #18a899; background-color: #3A7D44;
border-color: #179c8e; } border-color: #3A7D44; }
.btn-success:focus, .btn-success.focus { .btn-success:focus, .btn-success.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-success.disabled, .btn-success:disabled { .btn-success.disabled, .btn-success:disabled {
color: #fff; color: #fff;
background-color: #3A7D44; background-color: #3A7D44;
@ -1807,12 +1807,12 @@ code {
.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle { .show > .btn-success.dropdown-toggle {
color: #fff; color: #fff;
background-color: #179c8e; background-color: #3A7D44;
border-color: #159184; } border-color: #159184; }
.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus { .show > .btn-success.dropdown-toggle:focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
color: #fff; color: #fff;

View File

@ -766,8 +766,8 @@ html body {
box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); } box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); }
.btn-success { .btn-success {
-webkit-box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
-webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5); -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
@ -1302,7 +1302,7 @@ code {
color: white; } color: white; }
.bg-success-700 { .bg-success-700 {
background-color: #179c8e; background-color: #3A7D44;
color: white; } color: white; }
.bg-success-700:hover { .bg-success-700:hover {
color: white; } color: white; }
@ -1341,7 +1341,7 @@ code {
color: #1ab3a3; } color: #1ab3a3; }
.color-success-700 { .color-success-700 {
color: #179c8e; } color: #3A7D44; }
.color-success-800 { .color-success-800 {
color: #13867a; } color: #13867a; }
@ -1795,11 +1795,11 @@ code {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); }
.btn-success:hover { .btn-success:hover {
color: #fff; color: #fff;
background-color: #18a899; background-color: #3A7D44;
border-color: #179c8e; } border-color: #3A7D44; }
.btn-success:focus, .btn-success.focus { .btn-success:focus, .btn-success.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-success.disabled, .btn-success:disabled { .btn-success.disabled, .btn-success:disabled {
color: #fff; color: #fff;
background-color: #3A7D44; background-color: #3A7D44;
@ -1807,12 +1807,12 @@ code {
.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle { .show > .btn-success.dropdown-toggle {
color: #fff; color: #fff;
background-color: #179c8e; background-color: #3A7D44;
border-color: #159184; } border-color: #159184; }
.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus { .show > .btn-success.dropdown-toggle:focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
color: #fff; color: #fff;

View File

@ -766,8 +766,8 @@ html body {
box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); } box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); }
.btn-success { .btn-success {
-webkit-box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
-webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5); -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
@ -1302,7 +1302,7 @@ code {
color: white; } color: white; }
.bg-success-700 { .bg-success-700 {
background-color: #179c8e; background-color: #3A7D44;
color: white; } color: white; }
.bg-success-700:hover { .bg-success-700:hover {
color: white; } color: white; }
@ -1341,7 +1341,7 @@ code {
color: #1ab3a3; } color: #1ab3a3; }
.color-success-700 { .color-success-700 {
color: #179c8e; } color: #3A7D44; }
.color-success-800 { .color-success-800 {
color: #13867a; } color: #13867a; }
@ -1795,11 +1795,11 @@ code {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); }
.btn-success:hover { .btn-success:hover {
color: #fff; color: #fff;
background-color: #18a899; background-color: #3A7D44;
border-color: #179c8e; } border-color: #3A7D44; }
.btn-success:focus, .btn-success.focus { .btn-success:focus, .btn-success.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-success.disabled, .btn-success:disabled { .btn-success.disabled, .btn-success:disabled {
color: #fff; color: #fff;
background-color: #3A7D44; background-color: #3A7D44;
@ -1807,12 +1807,12 @@ code {
.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle { .show > .btn-success.dropdown-toggle {
color: #fff; color: #fff;
background-color: #179c8e; background-color: #3A7D44;
border-color: #159184; } border-color: #159184; }
.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus { .show > .btn-success.dropdown-toggle:focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
color: #fff; color: #fff;

View File

@ -766,8 +766,8 @@ html body {
box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); } box-shadow: 0 2px 6px 0 rgba(108, 117, 125, 0.5); }
.btn-success { .btn-success {
-webkit-box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 2px 6px 0 rgba(29, 201, 183, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
-webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5); -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
@ -1302,7 +1302,7 @@ code {
color: white; } color: white; }
.bg-success-700 { .bg-success-700 {
background-color: #179c8e; background-color: #3A7D44;
color: white; } color: white; }
.bg-success-700:hover { .bg-success-700:hover {
color: white; } color: white; }
@ -1341,7 +1341,7 @@ code {
color: #1ab3a3; } color: #1ab3a3; }
.color-success-700 { .color-success-700 {
color: #179c8e; } color: #3A7D44; }
.color-success-800 { .color-success-800 {
color: #13867a; } color: #13867a; }
@ -1795,11 +1795,11 @@ code {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); }
.btn-success:hover { .btn-success:hover {
color: #fff; color: #fff;
background-color: #18a899; background-color: #3A7D44;
border-color: #179c8e; } border-color: #3A7D44; }
.btn-success:focus, .btn-success.focus { .btn-success:focus, .btn-success.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-success.disabled, .btn-success:disabled { .btn-success.disabled, .btn-success:disabled {
color: #fff; color: #fff;
background-color: #3A7D44; background-color: #3A7D44;
@ -1807,12 +1807,12 @@ code {
.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle { .show > .btn-success.dropdown-toggle {
color: #fff; color: #fff;
background-color: #179c8e; background-color: #3A7D44;
border-color: #159184; } border-color: #159184; }
.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus { .show > .btn-success.dropdown-toggle:focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
color: #fff; color: #fff;

View File

@ -2316,11 +2316,11 @@ fieldset:disabled a.btn {
border-color: #3A7D44; } border-color: #3A7D44; }
.btn-success:hover { .btn-success:hover {
color: #fff; color: #fff;
background-color: #18a899; background-color: #3A7D44;
border-color: #179c8e; } border-color: #3A7D44; }
.btn-success:focus, .btn-success.focus { .btn-success:focus, .btn-success.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-success.disabled, .btn-success:disabled { .btn-success.disabled, .btn-success:disabled {
color: #fff; color: #fff;
background-color: #3A7D44; background-color: #3A7D44;
@ -2328,12 +2328,12 @@ fieldset:disabled a.btn {
.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle { .show > .btn-success.dropdown-toggle {
color: #fff; color: #fff;
background-color: #179c8e; background-color: #3A7D44;
border-color: #159184; } border-color: #159184; }
.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus { .show > .btn-success.dropdown-toggle:focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); -webkit-box-shadow: #3A7D44;
box-shadow: 0 0 0 0.2rem rgba(63, 209, 194, 0.5); } box-shadow: #3A7D44; }
.btn-info { .btn-info {
color: #fff; color: #fff;
@ -4279,7 +4279,7 @@ input[type="button"].btn-block {
background-color: #3A7D44; } background-color: #3A7D44; }
a.badge-success:hover, a.badge-success:focus { a.badge-success:hover, a.badge-success:focus {
color: #fff; color: #fff;
background-color: #179c8e; } background-color: #3A7D44; }
a.badge-success:focus, a.badge-success.focus { a.badge-success:focus, a.badge-success.focus {
outline: 0; outline: 0;
-webkit-box-shadow: 0 0 0 0.2rem rgba(29, 201, 183, 0.5); -webkit-box-shadow: 0 0 0 0.2rem rgba(29, 201, 183, 0.5);
@ -5465,7 +5465,7 @@ button.bg-secondary:focus {
a.bg-success:hover, a.bg-success:focus, a.bg-success:hover, a.bg-success:focus,
button.bg-success:hover, button.bg-success:hover,
button.bg-success:focus { button.bg-success:focus {
background-color: #179c8e !important; } background-color: #3A7D44 !important; }
.bg-info { .bg-info {
background-color: #2196F3 !important; } background-color: #2196F3 !important; }

View File

@ -16,7 +16,7 @@ var myapp_get_color = {
success_400: '#21dfcb', success_400: '#21dfcb',
success_500: '#3A7D44', success_500: '#3A7D44',
success_600: '#1ab3a3', success_600: '#1ab3a3',
success_700: '#179c8e', success_700: '#3A7D44',
success_800: '#13867a', success_800: '#13867a',
success_900: '#107066', success_900: '#107066',
info_50: '#9acffa', info_50: '#9acffa',

View File

@ -114,7 +114,7 @@
</div> </div>
<div class="demo d-flex justify-content-center flex-wrap d-sm-block"> <div class="demo d-flex justify-content-center flex-wrap d-sm-block">
<div class="p-3 w-auto text-center d-inline-flex border-faded"> <div class="p-3 w-auto text-center d-inline-flex border-faded">
<span class="peity-line" data-peity='{ "fill": "#3A7D44", "stroke": "#179c8e", "height": 40, "width": "110" }'>5,3,2,-1,-3,-2,2,3,5,2</span> <span class="peity-line" data-peity='{ "fill": "#3A7D44", "stroke": "#3A7D44", "height": 40, "width": "110" }'>5,3,2,-1,-3,-2,2,3,5,2</span>
</div> </div>
<div class="p-3 w-auto text-center d-inline-flex border-faded"> <div class="p-3 w-auto text-center d-inline-flex border-faded">
<span class="peity-line" data-peity='{ "fill": "#fe6bb0", "stroke": "#B82132", "height": 40, "width": "110" }'>1,4,4,7,5,9,10,4,4,7,5,9,10</span> <span class="peity-line" data-peity='{ "fill": "#fe6bb0", "stroke": "#B82132", "height": 40, "width": "110" }'>1,4,4,7,5,9,10,4,4,7,5,9,10</span>

View File

@ -16,7 +16,7 @@ var myapp_get_color = {
success_400: '#21dfcb', success_400: '#21dfcb',
success_500: '#3A7D44', success_500: '#3A7D44',
success_600: '#1ab3a3', success_600: '#1ab3a3',
success_700: '#179c8e', success_700: '#3A7D44',
success_800: '#13867a', success_800: '#13867a',
success_900: '#107066', success_900: '#107066',
info_50: '#9acffa', info_50: '#9acffa',

View File

@ -103,6 +103,13 @@
<script src="{{asset('assets/js/vendors.bundle.js')}}"></script> <script src="{{asset('assets/js/vendors.bundle.js')}}"></script>
<script src="{{asset('assets/js/app.bundle.js')}}"></script> <script src="{{asset('assets/js/app.bundle.js')}}"></script>
<script type="text/javascript" src="{{asset('assets/js/bootstrap-table.min.js')}}"></script> <script type="text/javascript" src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
<script>
$(document).ready(function() {
$('.numberInput').on('input', function() {
this.value = this.value.replace(/[^0-9]/g, ''); // Hanya angka 0-9
});
});
</script>
@yield('page-js') @yield('page-js')
</body> </body>
</html> </html>

View File

@ -0,0 +1,146 @@
@extends('layouts.master')
@section('page-css')
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
<style type="text/css">
.listItem{
list-style: none;
margin: 0;
padding: 0;
}
.listItem > li{
display: inline-block;
padding: 10px;
margin: 3px;
border: 1px solid #ddd;
}
.listItem > li:hover{
cursor: pointer;
}
.listItem > li .number{
font-size: 13px;
/* color: #333;*/
/* background: #0ba360 !important;*/
/* padding: 10px;*/
border-radius: 10%;
}
.level{
float: right;
color: #fff;
text-align: center;
width: 100px;
}
</style>
@endsection
@section('content')
<div class="subheader">
<h1 class="subheader-title">
<i class='subheader-icon fal fa-chart-area'></i> Dashboard
</h1>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-12 p-0">
<ul class="listItem">
<li>
<h6><div class="rounded-circle bg-fusion-50 width-1 height-1 text-center d-inline-block bg-success"><i class="mt-1 fal fa-check text-white"></i></div>&nbsp;Registrasi Akun</h6>
</li>
<li class="profile">
<h6><div class="rounded-circle bg-fusion-50 width-1 height-1 text-center d-inline-block bg-success"><i class="mt-1 fal fa-check text-white"></i></div>&nbsp;Melengkapi Data Profile</h6>
</li>
<li class="kuesioner">
<h6><div class="rounded-circle bg-fusion-50 width-1 height-1 text-center d-inline-block bg-success"><i class="mt-1 fal fa-check text-white"></i></div>&nbsp;Mengisi Kuesioner Leveling</h6>
</li>
<li>
<h6><div class="rounded-circle bg-fusion-50 width-1 height-1 text-center d-inline-block bg-success"><i class="mt-1 fal fa-check text-white"></i></div>&nbsp;Menunggu Diusulkan CSA</h6>
</li>
<li>
<h6><div class="rounded-circle bg-fusion-50 width-1 height-1 text-center d-inline-block bg-success"><i class="mt-1 fal fa-check text-white"></i></div>&nbsp;Melengkapi Data CSA</h6>
</li>
</ul>
</div>
<div class="col-md-4 mt-3">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-3 col-md-3 text-left">
<i class="fal fa-building fa-5x"></i>
</div>
<div class="col-9 col-md-9">
<div class="level rounded-plus bg-fusion-50 width-1 height-1 d-inline-block bg-success">
<h4>Level 4</h4>
</div>
</div>
</div>
<h4 class="mt-5"><b>{{session('name')}}</b></h4>
<h5 class="text-success">NPSN: {{session('npsn')}}</h5>
<span class="badge badge-primary">{{session('tingkat_sekolah')}}</span>
<span class="badge badge-success">{{session('status_sekolah')}}</span>
<div class="row">
<div class="col-md-12 text-left">
<h5 class="mt-2"><b>ALAMAT</b></h5>
</div>
<div class="col-md-12 text-left">
<p>{{session('alamat_sekolah')}}</p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-left">
<h5 class="mt-2"><b>KONTAK</b></h5>
</div>
<div class="col-md-2 text-left mb-2">
<i class="fal fa-mobile fa-2x"></i>
</div>
<div class="col-md-10 text-left">
<span class="text-muted">{{session('kontak_person')}}</span> <br>
<span class="text-muted">{{session('telp')}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8 mt-3">
<div class="card">
<div class="card-body">
<div class="card mb-2">
<div class="card-body">
<h4><b>Status Usulan</b></h4>
<p>Sekolah diusulan untuk menjadi CSA (Calon Sekolah Adiwiyata) Nasional</p>
<span class="text-danger">Silahkan lengkapi data pada menu Usulan Adiwiyata.</span>
</div>
</div>
<table class="table table-bordered">
<tr class="bg-success text-white">
<th colspan="2"><b>Penghargaan Terakhir</b></th>
<th><b>Tanggal Penetapan SK</b></th>
<th><b>Lampiran SK</b></th>
</tr>
<tr>
<td style="vertical-align: middle;">
<i class="fal fa-trophy"></i>
</td>
<td style="vertical-align: middle;">
<h5><b>Adiwiyata Provinsi</b></h5>
<span>SK Gubernur DKI Nomor 276 Tahun 2023 </span>
</td>
<td style="vertical-align: middle;">2023-04-13 </td>
<td style="vertical-align: middle;">--</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
@endsection

View File

@ -0,0 +1,296 @@
@extends('layouts.master')
@section('breadcrumbs')
<ol class="breadcrumb page-breadcrumb">
@foreach($breadcrumbs as $dataBread)
<li class="breadcrumb-item {{@$dataBread['active'] == true ? 'active' : ''}}">
@if(@$dataBread['url'])
<a href="{{@$dataBread['url']}}">{{$dataBread['name']}}</a>
@else
{{$dataBread['name']}}
@endif
</li>
@endforeach
</ol>
@endsection
@section('content')
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<i class="fal fa-align-justify"></i> {{$title}}
</div>
<form action="{{route($route.'.store')}}" method="POST" class="">
{{csrf_field()}}
<div class="card-body">
<div class="row">
<div class="col-md-12">
<table class="table table-responsive-sm table-striped table-hover table-header-center table-row-top text-nowrap"
data-toggle="table"
data-search="false"
data-show-refresh ="false"
data-page-size="700">
<thead>
<tr>
<th width="20">#</th>
<th>Menu</th>
<th width="100"><label><input type="checkbox" class="checkread"> Read</label></th>
<th width="100"><label><input type="checkbox" class="checkadd"> Create</label></th>
<th width="100"><label><input type="checkbox" class="checkedit"> Update</label></th>
<th width="100"><label><input type="checkbox" class="checkdel"> Delete</label></th>
<th width="100"><label><input type="checkbox" class="checkdownload"> Download</label></th>
</tr>
</thead>
<tbody>
@foreach($menu as $key1 => $parent)
<tr>
<td>
@if(count($parent['level1']) > 0)
<a href="javascript:;" class="show_detail" data-id="{{$parent['id']}}" data-status="1">
<i id="parent{{$parent['id']}}" class="fal fa-minus"></i>
</a>
@endif
</td>
<td>{{$parent['title']}}</td>
<td align="center">
<input type="checkbox" name="is_read[]"
value="is_read+{{$parent['id']}}" @if($parent['checked']['is_read'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_create[]"
value="is_create+{{$parent['id']}}" @if($parent['checked']['is_create'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_update[]"
value="is_update+{{$parent['id']}}" @if($parent['checked']['is_update'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_delete[]"
value="is_delete+{{$parent['id']}}" @if($parent['checked']['is_delete'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_download[]"
value="is_download+{{$parent['id']}}" @if($parent['checked']['is_download'] == 1) {{'checked'}} @endif>
</td>
</tr>
@if($parent['level1'])
@foreach($parent['level1'] as $key2 => $level1)
<tr class="parent_{{$parent['id']}} hide_child">
<td>
@if(count($level1['level2']) > 0)<a href="javascript:;"
class="show_detail"
data-id="{{$level1['id']}}"
data-status="1"><i
id="parent{{$level1['id']}}"
class="fal fa-minus"></i></a>@endif
</td>
<td style="text-indent:30px;">--- {{$level1['title']}}</td>
<td align="center">
<input type="checkbox" name="is_read[]" value="is_read+{{$level1['id']}}" @if($level1['checked']['is_read'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_create[]" value="is_create+{{$level1['id']}}" @if($level1['checked']['is_create'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_update[]" value="is_update+{{$level1['id']}}" @if($level1['checked']['is_update'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level1['id']}}" @if($level1['checked']['is_delete'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_download[]" value="is_download+{{$level1['id']}}" @if($level1['checked']['is_download'] == 1) {{'checked'}} @endif>
</td>
</tr>
@if($level1['level2'])
@foreach($level1['level2'] as $key3 => $level2)
<tr class="parent_{{$level1['id']}} hide_child">
<td>
@if(count($level2['level3']) > 0)<a href="javascript:;"
class="show_detail"
data-id="{{$level2['id']}}"
data-status="1"><i
id="parent{{$level2['id']}}"
class="fal fa-minus"></i></a>@endif
</td>
<td style="text-indent: 60px">------ {{$level2['title']}}</td>
<td align="center">
<input type="checkbox" name="is_read[]" value="is_read+{{$level2['id']}}" @if($level2['checked']['is_read'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_create[]" value="is_create+{{$level2['id']}}" @if($level2['checked']['is_create'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_update[]" value="is_update+{{$level2['id']}}" @if($level2['checked']['is_update'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level2['id']}}" @if($level2['checked']['is_delete'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_download[]" value="is_download+{{$level2['id']}}" @if($level2['checked']['is_download'] == 1) {{'checked'}} @endif>
</td>
</tr>
@if($level2['level3'])
@foreach($level2['level3'] as $key4 => $level3)
<tr class="parent_{{$level2['id']}} hide_child">
<td>
@if(count($level3['level4']) > 0)<a href="javascript:;"
class="show_detail"
data-id="{{$level3['id']}}"
data-status="1"><i
id="parent{{$level3['id']}}"
class="fal fa-minus"></i></a>@endif
</td>
<td style="text-indent: 90px;">--------- {{$level3['title']}}</td>
<td align="center">
<input type="checkbox" name="is_read[]" value="is_read+{{$level3['id']}}" @if($level3['checked']['is_read'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_create[]" value="is_create+{{$level3['id']}}" @if($level3['checked']['is_create'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_update[]" value="is_update+{{$level3['id']}}" @if($level3['checked']['is_update'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level3['id']}}" @if($level3['checked']['is_delete'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_download[]" value="is_download+{{$level3['id']}}" @if($level3['checked']['is_download'] == 1) {{'checked'}} @endif>
</td>
</tr>
@if($level3['level4'])
@foreach($level3['level4'] as $key5 => $level4)
<tr class="parent_{{$level3['id']}} hide_child">
<td>
<span style="color: #7F8FA4">{{$level4['id']}}</span>
</td>
<td style="text-indent: 130px">------------ {{$level4['title']}}</td>
<td align="center">
<input type="checkbox" name="is_read[]" value="is_read+{{$level4['id']}}" @if($level4['checked']['is_read'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_create[]" value="is_create+{{$level4['id']}}" @if($level4['checked']['is_create'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_update[]" value="is_update+{{$level4['id']}}" @if($level4['checked']['is_update'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level4['id']}}" @if($level4['checked']['is_delete'] == 1) {{'checked'}} @endif>
</td>
<td align="center">
<input type="checkbox" name="is_download[]" value="is_download+{{$level4['id']}}" @if($level4['checked']['is_download'] == 1) {{'checked'}} @endif>
</td>
</tr>
@endforeach
@endif
@endforeach
@endif
@endforeach
@endif
@endforeach
@endif
@endforeach
</tbody>
</table>
<input type="hidden" name="group_id" value="{{encode_id(@$id)}}">
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12 text-right">
<a href="{{route('modules.management.role.index')}}" class="btn btn-danger"><i class="fal fa-times"></i> Batal</a>
<button type="submit" class="btn btn-success"><i class="fal fa-save"></i> Simpan</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
@section('page-js')
<script type="text/javascript">
function toggle(toggle) {
toggle == 'undefined' ? toggle = 0 : toggle = toggle;
if (toggle == 0) {
$('.show_detail').attr('data-status', '1');
$('.show_detail').click();
} else {
$('.show_detail').attr('data-status', '0');
$('.show_detail').click();
}
}
$(document).ready(function () {
$('.hide_child').show();
$('.show_detail').click(function () {
var id = $(this).attr('data-id');
var status = $(this).attr('data-status');
if (status == 1) {
$(this).attr('data-status', '0');
$(".parent_" + id).show('falt');
$("#parent" + id).removeClass('fal fa-plus').addClass('fal fa-minus');
} else {
$(this).attr('data-status', '1');
$(".parent_" + id).hide('falt');
$("#parent" + id).removeClass('fal fa-minus').addClass('fal fa-plus');
}
});
$('#menu_group').change(function () {
window.location.href = "{{url('system/groups/access/'.encode_id(@$id))}}/" + this.value;
});
$('.checkread').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_read[]"]').prop('checked', checked);
});
$('.checkverify').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_verify[]"]').prop('checked', checked);
});
$('.checkadd').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_create[]"]').prop('checked', checked);
});
$('.checkedit').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_update[]"]').prop('checked', checked);
});
$('.checkdel').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_delete[]"]').prop('checked', checked);
});
$('.checkapprove').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_approve[]"]').prop('checked', checked);
});
$('.checkdownload').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_download[]"]').prop('checked', checked);
});
$('.checkbalaibesar').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_balaibesar[]"]').prop('checked', checked);
});
$('.checktipea').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_tipe_a[]"]').prop('checked', checked);
});
$('.checktipeb').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_tipe_b[]"]').prop('checked', checked);
});
$('.checkloka').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_loka[]"]').prop('checked', checked);
});
$('.checkpusat').change(function () {
var checked = $(this).prop('checked');
$('.table').find('input[name*="is_pusat[]"]').prop('checked', checked);
});
});
</script>
@endsection

View File

@ -45,7 +45,7 @@
data-id-field="id" data-id-field="id"
id="grid-data"> id="grid-data">
<thead> <thead>
<tr class="table-success"> <tr class="table-primary text-white">
<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="name">Name</th> <th data-field="name">Name</th>

View File

@ -0,0 +1,250 @@
@extends('layouts.master')
@section('page-css')
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
<style type="text/css">
.listItem{
list-style: none;
margin: 0;
padding: 0;
}
.listItem > li{
display: inline-block;
margin: 10px;
}
.listItem > li:hover{
cursor: pointer;
}
.listItem > li .number{
font-size: 14px;
color: #fff;
background: #0ba360 !important;
padding: 10px;
border-radius: 10%;
}
.level{
float: right;
color: #fff;
text-align: center;
width: 100px;
}
.nav-link{
border-radius: 0px!important;
}
</style>
@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="card">
<div class="card-body">
<div class="row">
<div class="col-md-4 mt-3">
<div class="row">
<div class="col-3 col-md-3 text-left">
<i class="fal fa-building fa-5x"></i>
</div>
<div class="col-9 col-md-9">
<div class="level rounded-plus bg-fusion-50 width-1 height-1 d-inline-block bg-success">
<h4>Level 4</h4>
</div>
</div>
</div>
<h4 class="mt-5"><b>{{session('name')}}</b></h4>
<h5 class="text-success">NPSN: {{session('npsn')}}</h5>
<span class="badge badge-primary">{{session('tingkat_sekolah')}}</span>
<span class="badge badge-success">{{session('status_sekolah')}}</span>
<div class="row">
<div class="col-md-12 text-left">
<h5 class="mt-2"><b>ALAMAT</b></h5>
</div>
<div class="col-md-12 text-left">
<p>{{session('alamat_sekolah')}}</p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-left">
<h5 class="mt-2"><b>KONTAK</b></h5>
</div>
<div class="col-md-2 text-left mb-2">
<i class="fal fa-mobile fa-2x"></i>
</div>
<div class="col-md-10 text-left">
<span class="text-muted">{{session('kontak_person')}}</span> <br>
<span class="text-muted">{{session('telp')}}</span>
</div>
</div>
</div>
<div class="col-md-8 mt-3">
<form id="form" action="#" method="POST">
{{csrf_field()}}
<div id="panel-1" class="card">
<div class="card-body show">
<div class="panel-content">
<ul class="nav nav-tabs badge-primary" role="tablist">
<li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#usulan" role="tab">Usulan</a></li>
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#jumlah" role="tab">Data Jumlah</a></li>
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#air" role="tab">Penghematan Air</a></li>
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#listrik" role="tab">Penghematan Listrik</a></li>
</ul>
<div class="tab-content pt-3">
<div class="tab-pane fade show active" id="usulan" role="tabpanel">
<table class="table table-bordered">
<tr class="bg-success text-white">
<th colspan="2"><b>Penghargaan Terakhir</b></th>
<th><b>Tanggal Penetapan SK</b></th>
<th><b>Lampiran SK</b></th>
</tr>
<tr>
<td style="vertical-align: middle;">
<i class="fal fa-trophy"></i>
</td>
<td style="vertical-align: middle;">
<h5><b>Adiwiyata Provinsi</b></h5>
<span>SK Gubernur DKI Nomor 276 Tahun 2023 </span>
</td>
<td style="vertical-align: middle;">2023-04-13 </td>
<td style="vertical-align: middle;">--</td>
</tr>
</table>
</div>
<div class="tab-pane fade" id="jumlah" role="tabpanel">
<table class="table">
<tbody>
<tr>
<td colspan="3" class="bg-success text-white">Data Jumlah</td>
</tr>
<tr>
<th scope="row"> Jumlah Peserta Didik</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah peserta didik">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Tenaga Pendidik</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah tenaga pendidik">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Tenaga kependidikan</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah tenaga kependidikan">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Warga Sekolah Lainnya</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah warga lainnya (cont:petugas kebersihan, petugas keamanan, petugas kantin, dll)">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Biopori</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah biopori">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Sumur Resapan</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah sumur resapan">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Pohon/Tanaman yang ditanam dan tumbuh</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jumlah pohon tanaman">
</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="air" role="tabpanel">
<table class="table">
<tbody>
<tr>
<td colspan="3" scope="row" class="bg-success text-white">Penghematan air sebelum dan setelah melaksanakan gerakan PBLHS :</td>
</tr>
<tr>
<th scope="row"> Sebelum melaksanakan gerakan PBLHS <br> <small class="text-info">(Meter Kubik/Bulan)</small></th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="rata-rata per bulan dalam meter kubik">
</td>
</tr>
<tr>
<th scope="row"> Setelah melaksanakan gerakan PBLHS <br> <small class="text-info">(Meter Kubik/Bulan dalam Tahun ajaran 2022/2023)</small></th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="rata-rata per bulan dalam meter kubik">
</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="listrik" role="tabpanel">
<table class="table">
<tbody>
<tr>
<td colspan="3" scope="row" class="bg-success text-white">Penghematan listrik sebelum dan setelah melaksanakan gerakan PBLHS :</td>
</tr>
<tr>
<th scope="row"> Sebelum melaksanakan gerakan PBLHS <br> <small class="text-info">(KWH/Bulan)</small><br> <small class="text-info"></small>
</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="rata-rata per bulan dalam kwh">
</td>
</tr>
<tr>
<th scope="row"> Setelah melaksanakan gerakan PBLHS <br> <small class="text-info">(KWH/Bulan dalam Tahun ajaran 2022/2023)</small></th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="rata-rata per bulan dalam kwh">
</td>
</tr>
<tr>
<th scope="row"> Luas ruangan ber AC</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="dalam satuan meter persegi">
</td>
</tr>
<tr>
<th scope="row"> Luas ruangan non AC</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="dalam satuan meter persegi">
</td>
</tr>
<tr>
<th scope="row"> Jumlah Kader</th>
<td>
<input required="" type="text" class="numberInput form-control form-control-sm" placeholder="jml kader yang dibentuk dan diberdayakan selama pelaksanaan gerakan PBLHS">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="form-group text-right">
<button class="btn btn-success"><i class="fal fa-save"></i>&nbsp;&nbsp;Simpan Perubahan</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('page-js')
@endsection

View File

@ -3,17 +3,15 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use App\Http\Middleware\Session; use App\Http\Middleware\Session;
use App\Http\Controllers\HomeController; use App\Http\Controllers\HomeController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\Master\IndikatorController; use App\Http\Controllers\Master\IndikatorController;
use App\Http\Controllers\Master\KomponenController; use App\Http\Controllers\Master\KomponenController;
use App\Http\Controllers\Management\UserController; use App\Http\Controllers\Management\UserController;
use App\Http\Controllers\Management\RoleController; use App\Http\Controllers\Management\RoleController;
use App\Http\Controllers\Management\AksesController;
Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard'); Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard');
Route::get('profile-sekolah',[ProfileController::class,'index'])->name('profile.index');
Route::get('/profile-sekolah', function () {
$data['title'] = 'Profile Sekolah';
return view('profile',$data);
})->name('profile.*');
Route::name('master.')->prefix('master')->group(function () { Route::name('master.')->prefix('master')->group(function () {
Route::resource('indikator',IndikatorController::class); Route::resource('indikator',IndikatorController::class);
@ -29,6 +27,11 @@ Route::name('management.')->prefix('management')->group(function () {
Route::name('role.')->prefix('role')->group(function () { Route::name('role.')->prefix('role')->group(function () {
Route::resource('/',RoleController::class); Route::resource('/',RoleController::class);
Route::get('grid',[RoleController::class,'grid'])->name('grid'); Route::get('grid',[RoleController::class,'grid'])->name('grid');
Route::name('akses.')->prefix('akses')->group(function () {
Route::resource('/',AksesController::class);
Route::get('{id}/edit',[AksesController::class,'edit'])->name('edit');
});
}); });