john
Ilham Wara Nugroho 2025-11-18 14:40:00 +07:00
parent 963faf52be
commit e415904bae
73 changed files with 5221 additions and 291 deletions

View File

@ -216,54 +216,53 @@ if (!function_exists('renderMenu')) {
$child2 = Menu::where('status',true)->where('menu_type','sidebar')->where('parent_id',$p1->MsMenuId)->orderBy('ordering','ASC')->get();
$access1 = permission('is_read', $p1->MsMenuId, 'menu', true);
$ch1 = count($child2) > 0 ? '' : '';
$link1 = count($child2) > 0 ? '' : 'nav-link';
$collapse1 = count($child2) > 0 ? 'href="#parent'.$a.'" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="parent'.$a.'"' : '';
$active = activeMenuClass($p1->module) ? 'active' : '';
$ch1 = count($child2) > 0 ? 'has-arrow' : '';
$link1 = count($child2) > 0 ? '' : '';
$collapse1 = count($child2) > 0 ? 'href="javascript: void(0);"' : '';
$active = activeMenuClass($p1->module) ? 'mm-active' : '';
// dd($p1->route);
if ($access1) {
$active1 = activeMenuClass($p1->module) ? 'active' : '';
$active1 = activeMenuClass($p1->module) ? 'mm-active' : '';
$html .= '<li class=" nav-item ' . $ch1 . '">
<a '.$collapse1.' class=" nav-link '.$active1.'" href="' . url($p1->url) . '">
<i class="' . $p1->menu_icons . '"></i>
$html .= '<li class="'.$active.'">
<a '.$collapse1.' class="'.$ch1.' '.$active1.'" href="' . url($p1->url) . '">
<i class="' . $p1->menu_icons . ' icon nav-icon"></i>
<span>'.@$p1->title.'</span>';
if (count($child2) > 0) {
$html .= '<span class="menu-arrow"></span>';
$html .= '</a>';
$html .= '<div class="collapse " id="parent'.$a.'">';
$html .= '<ul class="nav flex-column">';
$html .= '<ul class="sub-menu" aria-expanded="false">';
foreach ($child2 as $b => $p2) {
$child3 = Menu::where('status',true)->where('menu_type','sidebar')->where('parent_id',$p2->MsMenuId)->get();
$access2 = permission('is_read', $p2->MsMenuId, 'menu', true);
$ch2 = count($child3) > 0 ? '' : '';
$collapse2 = count($child3) > 0 ? 'href="#subparent'.$b.'" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="parent'.$a.'"' : '';
$link2 = count($child3) > 0 ? '' : 'nav-link';
$link2 = count($child3) > 0 ? '' : '';
if ($access2) {
$active2 = activeMenuClass($p2->module) ? 'active' : '';
$html .= '<li class=" nav-item ' . $ch2 . '"><a '.$collapse2.' class="nav-link '.$active2.'" href="' . url($p2->url) . '"><i class="' . $p2->menu_icons . '"></i> <span>' . @$p2->title.'<span>';
$active2 = activeMenuClass($p2->module) ? 'mm-active' : '';
$html .= '<li class=" nav-item ' . $ch2 . '"><a '.$collapse2.' class=" '.$active2.'" href="' . url($p2->url) . '"><i class="' . $p2->menu_icons . ' icon nav-icon"></i> <span>' . @$p2->title.'<span>';
if (count($child3) > 0) {
$html .= '<span class="menu-arrow"></span>';
$html .= '</a>';
$html .= '<div class="collapse " id="subparent'.$b.'">';
$html .= '<ul class="nav flex-column">';
$html .= '<ul class="sub-menu">';
foreach ($child3 as $p3) {
$child4 = Menu::where('status',true)->where('menu_type','sidebar')->where('parent_id',$p3->MsMenuId)->get();
$access3 = permission('is_read', $p3->MsMenuId, 'menu', true);
$collapse3 = count($child4) > 0 ? 'data-fc-type="collapse"' : '';
$ch3 = count($child4) > 0 ? '' : '';
$link3 = count($child4) > 0 ? '' : 'nav-link';
$link3 = count($child4) > 0 ? '' : '';
if ($access3) {
$active3 = activeMenuClass($p3->module) ? 'active' : '';
$active3 = activeMenuClass($p3->module) ? 'mm-active' : '';
// $active3 = $active ? ' ' . null : null;
$html .= '<li class=" nav-item ' . $ch3 .'"><a '.$collapse3.' class="nav-link '.$active3.'" href="' . url($p3->url) . '"> <span>' . @$p3->title.'</span>';
$html .= '<li class=" nav-item ' . $ch3 .'"><a '.$collapse3.' class=" '.$active3.'" href="' . url($p3->url) . '"> <span>' . @$p3->title.'</span>';
if (count($child4) > 0) {
$html .= '<span class="menu-arrow"></span>';
$html .= '</a>';
$html .= '<ul class="nav flex-column">';
$html .= '<ul class="sub-menu">';
foreach ($child4 as $p4) {
$html .= '<li class=" ' . null . '"><a class="nav-link" href="' . url($p4->url) . '"> <span>' . @$p4->title.'<span>';
$html .= '<li class=" ' . null . '"><a class="" href="' . url($p4->url) . '"> <span>' . @$p4->title.'<span>';
}
$html .= '</ul>';
} else {
@ -281,7 +280,6 @@ if (!function_exists('renderMenu')) {
}
}
$html .= '</ul>';
$html .= '</div>';
} else {
$html .= '</a>';
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardAdaptasiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardInventoryController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardMitigasiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class BahanBakarListrikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class EmisiBatuBaraController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class EmisiMigasController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class EnergiLainnyaController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class IndustriManufakturController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KomersialController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ListrikPlnController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PembangkitListrikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PengunaanListrikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PenyulinganController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class RumahTanggaController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class TransmisiDistribusiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Energi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class TransportasiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KarbonatKacaController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KarbonatKeramikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KarbonatLainnyaController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KarbonatMakananController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KarbonatPulpController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PelumasParafinController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PenggunaAcController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\IPPU;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ProduksiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class CRFController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class GCOMController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class GPCController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class HitungProdusenController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KalkulasiEmisiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KunciAktifitasController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SalinAktifitasController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Kalkulasi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class WorksheetController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DistribusiSampahDomestikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KependudukanController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KomposisiSampahDomestikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class LimbahCairIndustriController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SaranaAirLimbahDomestikController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Limbah;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class TimbulanSampahController 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)
{
//
}
}

View File

@ -0,0 +1,340 @@
<?php
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Master\AccessMenu;
use App\Models\Master\Menu;
use App\Models\Master\Group;
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 = Menu::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 = Group::find(intval($id));
if ($merged) {
$current = AccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id',intval($id))->get();
$insert = null;
if ($current->count() > 0) {
$deletedRows = AccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id',intval($id))->delete();
if ($deletedRows) {
foreach ($result as $val) {
$insert = AccessMenu::create($val);
}
}
} else {
foreach ($result as $val) {
$insert = AccessMenu::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 = AccessMenu::where('menu_group',$request->input('menu_group'))->where('ms_group_id', intval($id))->count();
if ($current > 0) {
AccessMenu::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'] = Group::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['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 Menu::where('parent_id', '=', $id)
->where('menu_type', '=', $type)
->whereIn('status', $active)
->orderBy('ordering')
->get();
}
public function getParentByType($type)
{
return Menu::where('parent_id', '=', 0)
->where('menu_type', '=', $type)
->orderBy('ordering')
->get();
}
public function getMenuByParent($id, $active = [1])
{
return Menu::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 Menu::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 Menu::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 Menu::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 = AccessMenu::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 = AccessMenu::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 = AccessMenu::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 = AccessMenu::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 = AccessMenu::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

@ -0,0 +1,120 @@
<?php
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Master\Group;
class RoleController extends Controller
{
protected $title = 'Hak Akses Pengguna';
protected $template = 'modules.management.role';
protected $route = 'modules.management.role';
/**
* Display a listing of the resource.
*/
public function index()
{
permission('is_read', $this->route, 'module',true);
$data['breadcrumbs'] = [
['name' => 'Dashboard','url' => url('dashboard')],
['name' => 'Management & Akses Role'],
['name' => 'Hak Akses Pengguna','active' => true],
];
$data['title'] = $this->title;
$data['route'] = $this->route;
return view($this->template.'.index',$data);
}
public function grid(Request $request)
{
$data = Group::where('MsGroupId','!=',1)->orderBy('MsGroupId','DESC')->get();
$_data = [];
foreach ($data as $key => $row) {
$action = '';
$action .= '<div class="d-flex gap-1">';
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->MsGroupId)).'/edit" data-toggle="tooltip" title="Edit Hak Akses Role" class="btn btn-sm btn-primary"><i class="mdi mdi-account-check text-white"></i></a>';
$action .= '<a href="'.url('/management/role/update/'.encode_id($row->MsGroupId)).'" data-toggle="tooltip" title="Edit Data" class="btn btn-sm btn-success"><i class="mdi mdi-pencil text-white"></i></a>';
}
$action .= '</div>';
$_data[] = [
'no' => $key+1,
'id' => encode_id($row->id),
'name' => @$row->name,
'action' => @$action,
];
}
// return response()->json($_data); // Return the data as a JSON response
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($id = null)
{
$data['breadcrumbs'] = [
['name' => 'Dashboard','url' => url('dashboard')],
['name' => 'Management & Akses Role'],
['name' => 'Hak Akses Pengguna','active' => true],
];
$keyId = decode_id($id);
$data['title'] = $this->title;
$data['route'] = $this->route;
$data['keyId'] = $id;
$data['item'] = Group::find($keyId);
return view($this->template.'.form',$data);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
}

View File

@ -0,0 +1,245 @@
<?php
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use App\Models\Master\Group;
class UserController extends Controller
{
protected $title = 'User';
protected $template = 'modules.management.user';
protected $route = 'modules.management.user';
/**
* Display a listing of the resource.
*/
public function index()
{
permission('is_read', $this->route, 'module',true);
$data['breadcrumbs'] = [
['name' => 'Dashboard','url' => url('dashboard')],
['name' => 'User & Hak Akses'],
['name' => 'Data User','active' => true],
];
$data['title'] = $this->title;
$data['route'] = $this->route;
return view($this->template.'.index',$data);
}
public function grid(Request $request)
{
$data = User::with(['group'])->where('ms_group_id','!=',2)->where('id','!=',auth()->user()->id)->orderBy('id','DESC')->get();
$_data = [];
foreach ($data as $key => $row) {
$action = '';
$action .= '<div class="d-flex gap-1">';
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
$action .= '<a href="'.url('management/user/update/'.encode_id($row->id)).'" data-toggle="tooltip" title="Edit Data" class="btn btn-sm btn-block btn-primary"><i class="mdi mdi-pencil text-white"></i></a>';
if(session('group_id') == 1){
$action .= '<a href="#" data-href="'.url('management/user/forcelogin/'.encode_id($row->id)).'" data-toggle="tooltip" title="Force Login" class="forcelogin btn btn-sm btn-block btn-success"><i class="mdi mdi-account-check text-white"></i></a>';
$action .= '<a href="#" data-href="'.url('management/user/delete/'.encode_id($row->id)).'" data-toggle="tooltip" title="Edit Data" class="remove_data btn btn-sm btn-block btn-danger"><i class="mdi mdi-delete text-white"></i></a>';
}
}
$action .= '</div>';
$_data[] = [
'no' => $key+1,
'id' => encode_id($row->id),
'name' => @$row->name,
'role' => @$row->group->name,
'username' => @$row->username,
'email' => @$row->email,
'created_at' => dateTime(@$row->created_at),
'action' => @$action,
];
}
// return response()->json($_data); // Return the data as a JSON response
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)
{
try {
$keyId = decode_id($request->secure_id);
if(@$keyId){
Validator::make($request->all(), [
'email' => 'required|unique:users,email,'.$keyId.'|email',
'name' => 'required|max:50',
'group' => 'required',
'username' => 'required|unique:users,username,'.$keyId,
'password' => 'nullable|min:8|regex:/[a-z]/|regex:/[A-Z]/|regex:/[0-9]/|regex:/[@$!%*#?&]/', //min 8 char, maks 15 char, min 1 symbol, min 1 uppercase, min 1 lowercase, 1 number
],[
'password.min' => 'password Minimal 8 Karakter',
'password.max' => 'password Maksimal 15 Karakter',
'password.regex' => 'Format Kata Sandi harus mengandung minimal Huruf Besar, Huruf Kecil, Angka, Spesial Karakter',
])->validate();
$user = User::find($keyId);
$user->email = $request->email;
$user->username = $request->username;
$user->ms_group_id = decode_id($request->group);
if(@$request->password){
$user->password = Hash::make($request->password);
}
$user->name = $request->name;
$user->save();
}else{
Validator::make($request->all(), [
'email' => 'required|unique:users,email|email',
'name' => 'required|max:50',
'group' => 'required',
'username' => 'required|unique:users,username',
'password' => 'required|min:8|regex:/[a-z]/|regex:/[A-Z]/|regex:/[0-9]/|regex:/[@$!%*#?&]/', //min 8 char, maks 15 char, min 1 symbol, min 1 uppercase, min 1 lowercase, 1 number
],[
'password.min' => 'password Minimal 8 Karakter',
'password.max' => 'password Maksimal 15 Karakter',
'password.regex' => 'Format Kata Sandi harus mengandung minimal Huruf Besar, Huruf Kecil, Angka, Spesial Karakter',
])->validate();
$user = new User;
$user->email = $request->email;
$user->username = $request->username;
$user->ms_group_id = decode_id($request->group);
if(@$request->password){
$user->password = Hash::make($request->password);
}
$user->name = $request->name;
$user->save();
}
return redirect()->back()->with([
'message' => 'Berhasil update data',
'type' => 'success',
]);
} catch (Exception $e) {
return redirect()->back()->with([
'message' => $e->getMessage(),
'type' => "error"
]);
}
}
/**
* 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($id = null)
{
$data['breadcrumbs'] = [
['name' => 'Dashboard','url' => url('dashboard')],
['name' => 'User & Hak Akses'],
['name' => 'Data User','active' => true],
];
$keyId = decode_id($id);
$data['title'] = $this->title;
$data['route'] = $this->route;
$data['keyId'] = $id;
$data['item'] = User::where('id',$keyId)->first();
$data['group'] = Group::where('MsGroupId','!=',1)->get();
return view($this->template.'.form',$data);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
public function delete($id)
{
$keyId = decode_id($id);
$user = User::where('id',$keyId)->delete();
return response()->json(['success' => true,'message' => 'Berhasil update data','type' => 'success']);
}
public function forcelogin($id = null)
{
//dd($id);
if (!$id) {
return response()->json(['success' => false,'message' => 'Data Tidak Temukan','type' => 'error']);
}
$id = decode_id($id);
$user = User::find($id);
if (!$user) {
return response()->json(['success' => false,'message' => 'Data Tidak Temukan','type' => 'error']);
} else {
if ($user->username && $user->password) {
if (Auth::loginUsingId($id)) {
$session = [
'username' => $user->username,
'name' => $user->name,
'email' => $user->email,
'currYear' => date('Y'),
'group_id' => @$user->ms_group_id,
'group_alias' => @$user->group->alias,
'group_name' => @$user->group->name,
];
// $this->repository->updateById($user->user_id,['last_login' => Carbon::now(), 'is_online' => session_id()]);
session($session);
// logActivity($request, __('strings.backend.logs.login_success',['name' => $user->username]));
return response()->json(['status' => true,'message' => 'Selamat datang kembali','type' => 'success']);
}
else {
return response()->json(['status' => false,'message' => 'Maaf Terjadi Kesalahan','type' => 'error']);
}
} else {
return response()->json(['status' => false,'message' => 'Maaf Terjadi Kesalahan','type' => 'error']);
}
}
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Master;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AgencyController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ARController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class EFController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class GWPController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PengumumanController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SumberDataEFController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class UnitController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class UnitKonversiController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pengaturan;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class UploadAktifitasController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class HortikulturaController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KehilanganKayuController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KonsumsiPupukController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class KotoranTernakController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class LahanPemukimanController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PengairanSawahController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PopulasiTernakController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SawahController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SistemAirController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class TanamanPanganController 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)
{
//
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Pertanian;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class TransisiController 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)
{
//
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,264 +34,7 @@
<div id="sidebar-menu">
<!-- Left Menu Start -->
<ul class="metismenu list-unstyled" id="side-menu">
<li class="menu-title"> <span data-key="t-dashboard"><?php echo $lang["t-dashboards"]; ?></span></li>
<li>
<a href="javascript: void(0);">
<i class="bx bx-home-alt icon nav-icon"></i>
<span class="menu-item" data-key="t-dashboard"><?php echo $lang["t-dashboards"]; ?></span>
<span class="badge rounded-pill bg-primary">2</span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="index.php" data-key="t-ecommerce"><?php echo $lang["t-ecommerce"]; ?></a></li>
<li><a href="dashboard-sales.php" data-key="t-sales"><?php echo $lang["t-sales"]; ?></a></li>
</ul>
</li>
<li class="menu-title" data-key="t-applications"><?php echo $lang["t-applications"]; ?></li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-envelope icon nav-icon"></i>
<span class="menu-item" data-key="t-email"><?php echo $lang["t-email"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="email-inbox.php" data-key="t-inbox"><?php echo $lang["t-inbox"]; ?></a></li>
<li><a href="email-read.php" data-key="t-read-email"><?php echo $lang["t-read-email"]; ?></a></li>
</ul>
</li>
<li>
<a href="apps-calendar.php">
<i class="bx bx-calendar-event icon nav-icon"></i>
<span class="menu-item" data-key="t-calendar"><?php echo $lang["t-calendar"]; ?></span>
</a>
</li>
<li>
<a href="apps-todo.php">
<i class="bx bx-check-square icon nav-icon"></i>
<span class="menu-item" data-key="t-todo"><?php echo $lang["t-todo"]; ?></span>
<span class="badge rounded-pill bg-success" data-key="t-new"><?php echo $lang["t-new"]; ?></span>
</a>
</li>
<li>
<a href="apps-file-manager.php">
<i class="bx bx-file-find icon nav-icon"></i>
<span class="menu-item" data-key="t-filemanager"><?php echo $lang["t-filemanager"]; ?></span>
</a>
</li>
<li>
<a href="apps-chat.php">
<i class="bx bx-chat icon nav-icon"></i>
<span class="menu-item" data-key="t-chat"><?php echo $lang["t-chat"]; ?></span>
<span class="badge rounded-pill bg-danger" data-key="t-hot"><?php echo $lang["t-hot"]; ?></span>
</a>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-store icon nav-icon"></i>
<span class="menu-item" data-key="t-ecommerce"><?php echo $lang["t-ecommerce"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="ecommerce-products.php" data-key="t-products"><?php echo $lang["t-products"]; ?></a></li>
<li><a href="ecommerce-product-detail.php" data-key="t-product-detail"><?php echo $lang["t-product-detail"]; ?></a></li>
<li><a href="ecommerce-orders.php" data-key="t-orders"><?php echo $lang["t-orders"]; ?></a></li>
<li><a href="ecommerce-customers.php" data-key="t-customers"><?php echo $lang["t-customers"]; ?></a></li>
<li><a href="ecommerce-cart.php" data-key="t-cart"><?php echo $lang["t-cart"]; ?></a></li>
<li><a href="ecommerce-checkout.php" data-key="t-checkout"><?php echo $lang["t-checkout"]; ?></a></li>
<li><a href="ecommerce-shops.php" data-key="t-shops"><?php echo $lang["t-shops"]; ?></a></li>
<li><a href="ecommerce-add-product.php" data-key="t-add-product"><?php echo $lang["t-add-product"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-receipt icon nav-icon"></i>
<span class="menu-item" data-key="t-invoices"><?php echo $lang["t-invoices"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="invoices-list.php" data-key="t-invoice-list"><?php echo $lang["t-invoice-list"]; ?></a></li>
<li><a href="invoices-detail.php" data-key="t-invoice-detail"><?php echo $lang["t-invoice-detail"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-user-circle icon nav-icon"></i>
<span class="menu-item" data-key="t-contacts"><?php echo $lang["t-contacts"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="contacts-grid.php" data-key="t-user-grid"><?php echo $lang["t-user-grid"]; ?></a></li>
<li><a href="contacts-list.php" data-key="t-user-list"><?php echo $lang["t-user-list"]; ?></a></li>
<li><a href="contacts-profile.php" data-key="t-user-profile"><?php echo $lang["t-user-profile"]; ?></a></li>
</ul>
</li>
<li class="menu-title" data-key="t-layouts"><?php echo $lang["t-layouts"]; ?></li>
<li>
<a href="layouts-horizontal.php">
<i class="bx bx-layout icon nav-icon"></i>
<span class="menu-item" data-key="t-horizontal"><?php echo $lang["t-horizontal"]; ?></span>
</a>
</li>
<li class="menu-title" data-key="t-components"><?php echo $lang["t-components"]; ?></li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-cube icon nav-icon"></i>
<span class="menu-item" data-key="t-ui-elements"><?php echo $lang["t-ui-elements"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="ui-alerts.php" data-key="t-alerts"><?php echo $lang["t-alerts"]; ?></a></li>
<li><a href="ui-buttons.php" data-key="t-buttons"><?php echo $lang["t-buttons"]; ?></a></li>
<li><a href="ui-cards.php" data-key="t-cards"><?php echo $lang["t-cards"]; ?></a></li>
<li><a href="ui-carousel.php" data-key="t-carousel"><?php echo $lang["t-carousel"]; ?></a></li>
<li><a href="ui-dropdowns.php" data-key="t-dropdowns"><?php echo $lang["t-dropdowns"]; ?></a></li>
<li><a href="ui-grid.php" data-key="t-grid"><?php echo $lang["t-grid"]; ?></a></li>
<li><a href="ui-images.php" data-key="t-images"><?php echo $lang["t-images"]; ?></a></li>
<li><a href="ui-lightbox.php" data-key="t-lightbox"><?php echo $lang["t-lightbox"]; ?></a></li>
<li><a href="ui-modals.php" data-key="t-modals"><?php echo $lang["t-modals"]; ?></a></li>
<li><a href="ui-offcanvas.php" data-key="t-offcanvas"><?php echo $lang["t-offcanvas"]; ?></a></li>
<li><a href="ui-rangeslider.php" data-key="t-range-slider"><?php echo $lang["t-range-slider"]; ?></a></li>
<li><a href="ui-progressbars.php" data-key="t-progress-bars"><?php echo $lang["t-progress-bars"]; ?></a></li>
<li><a href="ui-sweet-alert.php" data-key="t-sweet-alert"><?php echo $lang["t-sweet-alert"]; ?></a></li>
<li><a href="ui-tabs-accordions.php" data-key="t-tabs-accordions"><?php echo $lang["t-tabs-accordions"]; ?></a></li>
<li><a href="ui-typography.php" data-key="t-typography"><?php echo $lang["t-typography"]; ?></a></li>
<li><a href="ui-video.php" data-key="t-video"><?php echo $lang["t-Video"]; ?></a></li>
<li><a href="ui-general.php" data-key="t-general"><?php echo $lang["t-general"]; ?></a></li>
<li><a href="ui-colors.php" data-key="t-colors"><?php echo $lang["t-colors"]; ?></a></li>
<li><a href="ui-rating.php" data-key="t-rating"><?php echo $lang["t-rating"]; ?></a></li>
<li><a href="ui-notifications.php" data-key="t-notifications"><?php echo $lang["t-notifications"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-layout icon nav-icon"></i>
<span class="menu-item" data-key="t-forms"><?php echo $lang["t-forms"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="form-elements.php" data-key="t-form-elements"><?php echo $lang["t-form-elements"]; ?></a></li>
<li><a href="form-layouts.php" data-key="t-form-layouts"><?php echo $lang["t-form-layouts"]; ?></a></li>
<li><a href="form-validation.php" data-key="t-form-validation"><?php echo $lang["t-form-validation"]; ?></a></li>
<li><a href="form-advanced.php" data-key="t-form-advanced"><?php echo $lang["t-form-advanced"]; ?></a></li>
<li><a href="form-editors.php" data-key="t-form-editors"><?php echo $lang["t-form-editors"]; ?></a></li>
<li><a href="form-uploads.php" data-key="t-form-upload"><?php echo $lang["t-form-upload"]; ?></a></li>
<li><a href="form-wizard.php" data-key="t-form-wizard"><?php echo $lang["t-form-wizard"]; ?></a></li>
<li><a href="form-mask.php" data-key="t-form-mask"><?php echo $lang["t-form-mask"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-table icon nav-icon"></i>
<span class="menu-item" data-key="t-tables"><?php echo $lang["t-tables"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="tables-basic.php" data-key="t-basic-tables"><?php echo $lang["t-basic-tables"]; ?></a></li>
<li><a href="tables-advanced.php" data-key="t-advanced-tables"><?php echo $lang["t-advanced-tables"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-pie-chart-alt-2 icon nav-icon"></i>
<span class="menu-item" data-key="t-charts"><?php echo $lang["t-charts"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="charts-apex.php" data-key="t-apex-charts"><?php echo $lang["t-apex-charts"]; ?></a></li>
<li><a href="charts-chartjs.php" data-key="t-chartjs-charts"><?php echo $lang["t-chartjs-charts"]; ?></a></li>
<li><a href="charts-tui.php" data-key="t-ui-charts"><?php echo $lang["t-ui-charts"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-cuboid icon nav-icon"></i>
<span class="menu-item" data-key="t-icons"><?php echo $lang["t-icons"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="icons-evaicons.php" data-key="t-evaicons"><?php echo $lang["t-evaicons"]; ?></a></li>
<li><a href="icons-boxicons.php" data-key="t-boxicons"><?php echo $lang["t-boxicons"]; ?></a></li>
<li><a href="icons-materialdesign.php" data-key="t-material-design"><?php echo $lang["t-material-design"]; ?></a></li>
<li><a href="icons-fontawesome.php" data-key="t-font-awesome"><?php echo $lang["t-font-awesome"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-map-alt icon nav-icon"></i>
<span class="menu-item" data-key="t-maps"><?php echo $lang["t-maps"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="maps-google.php" data-key="t-google"><?php echo $lang["t-google"]; ?></a></li>
<li><a href="maps-vector.php" data-key="t-vector"><?php echo $lang["t-vector"]; ?></a></li>
<li><a href="maps-leaflet.php" data-key="t-leaflet"><?php echo $lang["t-leaflet"]; ?></a></li>
</ul>
</li>
<li class="menu-title" data-key="t-pages"><?php echo $lang["t-pages"]; ?></li>
<li>
<a href="javascript: void(0);">
<i class="bx bx-user-pin icon nav-icon"></i>
<span class="menu-item" data-key="t-authentication"><?php echo $lang["t-authentication"]; ?></span>
<span class="badge rounded-pill bg-info">8</span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="auth-login.php" data-key="t-login"><?php echo $lang["t-login"]; ?></a></li>
<li><a href="auth-register.php" data-key="t-register"><?php echo $lang["t-register"]; ?></a></li>
<li><a href="auth-recoverpw.php" data-key="t-recover-password"><?php echo $lang["t-recover-password"]; ?></a></li>
<li><a href="auth-lock-screen.php" data-key="t-lock-screen"><?php echo $lang["t-lock-screen"]; ?></a></li>
<li><a href="auth-logout.php" data-key="t-logout"><?php echo $lang["t-logout"]; ?></a></li>
<li><a href="auth-confirm-mail.php" data-key="t-confirm-mail"><?php echo $lang["t-confirm-mail"]; ?></a></li>
<li><a href="auth-email-verification.php" data-key="t-email-verification"><?php echo $lang["t-email-verification"]; ?></a></li>
<li><a href="auth-two-step-verification.php" data-key="t-two-step-verification"><?php echo $lang["t-two-step-verification"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-file icon nav-icon"></i>
<span class="menu-item" data-key="t-utility"><?php echo $lang["t-utility"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="pages-starter.php" data-key="t-starter-page"><?php echo $lang["t-starter-page"]; ?></a></li>
<li><a href="pages-maintenance.php" data-key="t-maintenance"><?php echo $lang["t-maintenance"]; ?></a></li>
<li><a href="pages-comingsoon.php" data-key="t-coming-soon"><?php echo $lang["t-coming-soon"]; ?></a></li>
<li><a href="pages-timeline.php" data-key="t-timeline"><?php echo $lang["t-timeline"]; ?></a></li>
<li><a href="pages-faqs.php" data-key="t-faqs"><?php echo $lang["t-faqs"]; ?></a></li>
<li><a href="pages-pricing.php" data-key="t-pricing"><?php echo $lang["t-pricing"]; ?></a></li>
<li><a href="pages-404.php" data-key="t-error-404"><?php echo $lang["t-error-404"]; ?></a></li>
<li><a href="pages-500.php" data-key="t-error-500"><?php echo $lang["t-error-500"]; ?></a></li>
</ul>
</li>
<li>
<a href="javascript: void(0);" class="has-arrow">
<i class="bx bx-share-alt icon nav-icon"></i>
<span class="menu-item" data-key="t-multi-level"><?php echo $lang["t-multi-level"]; ?></span>
</a>
<ul class="sub-menu" aria-expanded="true">
<li class="disabled"><a href="#" data-key="t-disabled-item"><?php echo $lang["t-disabled-item"]; ?></a></li>
<li><a href="javascript: void(0);" data-key="t-level-1.1"><?php echo $lang["t-level-1.1"]; ?></a></li>
<li><a href="javascript: void(0);" class="has-arrow" data-key="t-level-1.2"><?php echo $lang["t-level-1.2"]; ?></a>
<ul class="sub-menu" aria-expanded="true">
<li><a href="javascript: void(0);" data-key="t-level-2.1"><?php echo $lang["t-level-2.1"]; ?></a></li>
<li><a href="javascript: void(0);" data-key="t-level-2.2"><?php echo $lang["t-level-2.2"]; ?></a></li>
</ul>
</li>
</ul>
</li>
{!! renderMenu() !!}
</ul>
</div>
<!-- Sidebar -->

View File

@ -36,7 +36,7 @@
<div class="d-flex">
<?php /*
<div class="dropdown d-inline-block">
<button type="button" class="btn header-item noti-icon" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-search icon-sm align-middle"></i>
@ -52,8 +52,9 @@
</form>
</div>
</div>
<div class="dropdown d-inline-block">
*/?>
<?php /*
<div class="dropdown d-inline-block d-none">
<button type="button" class="btn header-item noti-icon" id="page-header-notifications-dropdown-v"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-bell icon-sm align-middle"></i>
@ -142,11 +143,12 @@
</div>
</div>
</div>
*/?>
<div class="dropdown d-inline-block">
<button type="button" class="btn header-item user text-start d-flex align-items-center" id="page-header-user-dropdown-v"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="rounded-circle header-profile-user" src="assets/images/users/avatar-3.jpg"
<img class="rounded-circle header-profile-user" src="{{ asset('assets/images/users/avatar-3.jpg') }}"
alt="Header Avatar">
<span class="d-none d-xl-inline-block ms-2 fw-medium font-size-15">{{ \Str::title(auth()->user()->name) }}</span>
</button>
@ -155,13 +157,11 @@
<h6 class="mb-0">{{ \Str::title(auth()->user()->name) }}</h6>
<p class="mb-0 font-size-11 text-muted">{{ auth()->user()->email }}</p>
</div>
<a class="dropdown-item" href="contacts-profile.php"><i class="mdi mdi-account-circle text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Profile</span></a>
<a class="dropdown-item" href="apps-chat.php"><i class="mdi mdi-message-text-outline text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Messages</span></a>
<a class="dropdown-item" href="pages-faqs.php"><i class="mdi mdi-lifebuoy text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Help</span></a>
<a class="dropdown-item d-flex align-items-center" href="#"><i class="mdi mdi-cog-outline text-muted font-size-16 align-middle me-2"></i> <span class="align-middle me-3">Settings</span><span class="badge badge-soft-success ms-auto">New</span></a>
<a class="dropdown-item" href="auth-lock-screen.php"><i class="mdi mdi-lock text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Lock screen</span></a>
<a class="dropdown-item" href="{{ url('profile') }}"><i class="mdi mdi-account-circle text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Profile</span></a>
<a class="dropdown-item" href="{{ url('ubah-password') }}"><i class="mdi mdi-key text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Ubah Kata Sandi</span></a>
<a class="dropdown-item" href="{{ url('user-manual') }}"><i class="mdi mdi-book text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Manual Book</span></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="auth-logout.php"><i class="mdi mdi-logout text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Logout</span></a>
<a class="dropdown-item" href="{{ url('logout') }}"><i class="mdi mdi-logout text-muted font-size-16 align-middle me-2"></i> <span class="align-middle">Logout</span></a>
</div>
</div>
</div>

View File

@ -17,6 +17,14 @@
<link href="{{asset('assets/css/icons.min.css')}}" rel="stylesheet" type="text/css" />
<!-- App Css-->
<link href="{{asset('assets/css/app.min.css')}}" id="app-style" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{{asset('assets/css/bootstrap-table.min.css')}}">
<link href="{{ asset('assets/libs/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" />
<!-- alertifyjs Css -->
<link href="{{ asset('assets/libs/alertifyjs/build/css/alertify.min.css') }}" rel="stylesheet" type="text/css" />
<!-- alertifyjs default themes Css -->
<link href="{{ asset('assets/libs/alertifyjs/build/css/themes/default.min.css') }}" rel="stylesheet" type="text/css" />
@yield('css')
</head>
<body>
@ -31,11 +39,11 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<script>document.write(new Date().getFullYear())</script> © webadmin.
<script>document.write(new Date().getFullYear())</script> © SIGD.
</div>
<div class="col-sm-6">
<div class="text-sm-end d-none d-sm-block">
Crafted with <i class="mdi mdi-heart text-danger"></i> by <a href="https://Themesdesign.com/" target="_blank" class="text-reset">Themesdesign</a>
<a href="https://Themesdesign.com/" target="_blank" class="text-reset">Dinas Lingkungan Hidup Provinsi DKI Jakarta</a>
</div>
</div>
</div>
@ -58,6 +66,21 @@
<script src="{{ asset('assets/js/app.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
<script src="{{ asset('assets/libs/alertifyjs/build/alertify.min.js') }}"></script>
<script>
@if (Session::get('type')=='invalid')
alertify.error("{{ Session::get('message') }}");
@endif
@if (Session::get('type')=='success')
alertify.success("{{ Session::get('message') }}");
@endif
@if (Session::get('type')=='warning')
alertify.warning("{{ Session::get('message') }}");
@endif
</script>
@yield('js')
</body>

View File

@ -0,0 +1,263 @@
@extends('layouts.master')
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<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="mdi mdi-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="mdi mdi-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="mdi mdi-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="mdi mdi-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="mdi mdi-cancel"></i> Batal</a>
<button type="submit" class="btn btn-success"><i class="mdi mdi-content-save-outline"></i> Simpan</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('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('mdi mdi-plus').addClass('mdi mdi-minus');
} else {
$(this).attr('data-status', '1');
$(".parent_" + id).hide('falt');
$("#parent" + id).removeClass('mdi mdi-minus').addClass('mdi mdi-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);
});
});
</script>
@endsection

View File

@ -0,0 +1,59 @@
@extends('layouts.master')
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<i class="mdi mdi-account"></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">
<input type="hidden" name="secure_id" value="{{@$keyId}}">
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="fname">Nama</label>
<div class="col-12 ">
<input type="text" value="{{@$item->name ? @$item->name : old('name')}}" name="name" class="form-control @error('name') is-invalid @enderror" placeholder="Masukan Nama Sekolah" required>
@error('name')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label">Alias</label>
<div class="col-12 ">
<input type="text" value="{{@$item->alias ? @$item->alias : old('alias')}}" name="alias" class="form-control @error('alias') is-invalid @enderror" placeholder="Masukan Nama Sekolah" required>
@error('alias')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12 text-right">
<a href="{{route($route.'.index')}}" class="btn btn-danger"><i class="mdi mdi-cancel"></i> Batal</a>
<button type="submit" class="btn btn-success"><i class="mdi mdi-content-save-outline"></i> Simpan</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
@endsection

View File

@ -0,0 +1,47 @@
@extends('layouts.master')
@section('page-css')
@endsection
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div id="toolbar">
<a href="{{route($route.'.update')}}" id="btn-add" class="btn btn-primary">
<i class="mdi mdi-plus"></i> Tambah Data
</a>
</div>
<table class="table w-100"
data-search="true"
data-toggle="table"
data-pagination="true"
data-toolbar="#toolbar"
data-show-refresh="false"
data-url="{{route($route.'.grid')}}"
data-ajax-options='{"xhrFields": {"withCredentials": true}}'
data-sort-name="ids"
data-sort-order="desc"
data-page-size="10"
data-id-field="id"
id="grid-data">
<thead class="table-primary text-primary">
<tr>
<th data-width="50" data-field="action">#</th>
<th data-width="50" data-field="no">No</th>
<th data-field="name">Name</th>
</tr>
</thead>
<tbody></tbody>
</table>
<!-- datatable end -->
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,127 @@
@extends('layouts.master')
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<i class="mdi mdi-account"></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">
<input type="hidden" name="secure_id" value="{{@$keyId}}">
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="fname">Username</label>
<div class="col-12 ">
<input type="text" readonly value="{{@$item->username ? @$item->username : old('username')}}" name="username" class="form-control bg-secondary @error('username') is-invalid @enderror" placeholder="Masukan username Sekolah" required>
@error('username')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="emailverify">Email</label>
<div class="col-12 ">
<input type="email" name="email" readonly value="{{@$item->email ? @$item->email : old('email')}}" id="emailverify" class="form-control bg-secondary @error('email') is-invalid @enderror" placeholder="Masukan Email Aktif" required>
@error('email')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
<small class="text-primary">* Pastikan email benar dan aktif, akses aplikasi akan dikirim ke email yang didaftarkan.</small>
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="fname">Nama</label>
<div class="col-12 ">
<input type="text" value="{{@$item->name ? @$item->name : old('name')}}" name="name" class="form-control @error('name') is-invalid @enderror" placeholder="Masukan Nama Sekolah" required>
@error('name')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="fname">Role User</label>
<div class="col-12 ">
<select name="group" class="form-control @error('group') is-invalid @enderror" required>
<option value="">-Pilih Role User-</option>
@foreach($group as $data_group)
<option {{@$item->ms_group_id == $data_group->MsGroupId ? 'selected' : ''}} value="{{encode_id($data_group->MsGroupId)}}">{{$data_group->name}}</option>
@endforeach
</select>
@error('group')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label">Password Baru</label>
<div class="col-12 ">
<div class="input-group">
<input type="password" id="password" autocomplete="new-password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Masukan Password Minimm 8 characters">
<div class="input-group-text">
<button class="btn btn-default waves-effect waves-themed" type="button" id="togglePassword"><i class="mdi mdi-eye"></i></button>
</div>
</div>
@error('password')
<span class="text-danger" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
<div class="help-block">
Kata Sandi harus mengandung Minimal 8 karakter, maksimal 15 karakter, <br>setidaknya 1 huruf kecil dan huruf besar, angka dan simbol
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12 text-right">
<a href="{{route($route.'.index')}}" class="btn btn-danger"><i class="mdi mdi-cancel"></i> Batal</a>
<button type="submit" class="btn btn-success"><i class="mdi mdi-content-save-outline"></i> Simpan</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script type="text/javascript">
$(document).ready(function() {
$('.numberInput').on('input', function() {
this.value = this.value.replace(/[^0-9]/g, ''); // Hanya angka 0-9
});
$('#togglePassword').on('click', function() {
let passwordField = $('#password');
let icon = $(this).find('i');
// Cek apakah input saat ini bertipe password
if (passwordField.attr('type') === 'password') {
passwordField.attr('type', 'text'); // Ubah ke teks
icon.removeClass('mdi-eye').addClass('mdi-eye-off'); // Ganti ikon
} else {
passwordField.attr('type', 'password'); // Ubah ke password
icon.removeClass('mdi-eye-off').addClass('mdi-eye'); // Kembalikan ikon
}
});
});
</script>
@endsection

View File

@ -0,0 +1,148 @@
@extends('layouts.master')
@section('css')
@endsection
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div id="toolbar">
<a href="{{route($route.'.update')}}" id="btn-add" class="btn btn-primary">
<i class="mdi mdi-plus"></i> Tambah Data
</a>
</div>
<table class="table w-100"
data-search="true"
data-toggle="table"
data-pagination="true"
data-toolbar="#toolbar"
data-show-refresh="false"
data-url="{{route($route.'.grid')}}"
data-ajax-options='{"xhrFields": {"withCredentials": true}}'
data-sort-name="ids"
data-sort-order="desc"
data-page-size="10"
data-id-field="id"
id="grid-data">
<thead class="table-primary text-primary">
<tr>
<th data-field="action">#</th>
<th data-field="no">No</th>
<th data-field="role">Role</th>
<th data-field="email">Email</th>
<th data-field="name">Name</th>
<th data-field="created_at">Created At</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script type="text/javascript">
$("#grid-data").on("click", ".forcelogin", function() {
var base_url = $(this).attr('data-href');
var id = $(this).attr('data-id');
Swal.fire({
title: "Force Login!",
text: "Apa anda yakin ingin login sebagai akun ini ?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3F7D58",
confirmButtonText: "Ya Masuk Sekarang",
cancelButtonText: "Tidak",
closeOnConfirm: true,
closeOnCancel: true
},
function(isConfirm) {
if(isConfirm){
request = $.ajax({
url: base_url,
type: "GET",
xhrFields: {
withCredentials: true
}
});
// Callback handler that will be called on success
request.done(function(response, textStatus, jqXHR){
console.log(response);
if(response.status == true){
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
console.log(response);
window.location.href = '{{url("/dashboard")}}';
history.pushState(null, null, location.href);
window.onpopstate = function () {
history.go(1);
};
}else{
toastr.error("Maaf Terjadi Kesalahan", 'Gagal!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
console.log(response);
}
});
// Callback handler that will be called on failure
request.fail(function (jqXHR, textStatus, errorThrown){
toastr.error(
"Gagal "+textStatus, errorThrown
);
});
}
});
return false;
});
$("#grid-data").on("click", ".remove_data", function() {
var base_url = $(this).attr('data-href');
var id = $(this).attr('data-id');
Swal.fire({
title: "Hapus Data!",
text: "Apa anda yakin ingin menghapus data ini ?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Ya Hapus Sekarang",
cancelButtonText: "Tidak",
closeOnConfirm: true,
closeOnCancel: true
},
function(isConfirm) {
if(isConfirm){
request = $.ajax({
url: base_url,
xhrFields: {
withCredentials: true
},
type: "GET",
});
// Callback handler that will be called on success
request.done(function(response, textStatus, jqXHR){
console.log(response);
toastr.success("Berhasil Menhapus Data", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
$('#grid-data').bootstrapTable('refresh');
});
// Callback handler that will be called on failure
request.fail(function (jqXHR, textStatus, errorThrown){
toastr.error(
"Gagal "+textStatus, errorThrown
);
});
}
});
return false;
});
</script>
@endsection

View File

@ -2,6 +2,33 @@
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\Management\UserController;
use App\Http\Controllers\Management\UserSekolahController;
use App\Http\Controllers\Management\RoleController;
use App\Http\Controllers\Management\AksesController;
Route::get('dashboard',[HomeController::class,'index'])->name('index');
Route::name('management.')->prefix('management')->group(function () {
Route::name('user.')->prefix('user')->group(function () {
Route::resource('/',UserController::class);
Route::get('grid',[UserController::class,'grid'])->name('grid');
Route::get('update/{id?}',[UserController::class,'update'])->name('update');
Route::get('delete/{id?}',[UserController::class,'delete'])->name('delete');
Route::get('forcelogin/{id?}',[UserController::class,'forcelogin'])->name('forcelogin');
});
Route::name('role.')->prefix('role')->group(function () {
Route::resource('/',RoleController::class);
Route::get('grid',[RoleController::class,'grid'])->name('grid');
Route::get('update/{id?}',[RoleController::class,'update'])->name('update');
Route::name('akses.')->prefix('akses')->group(function () {
Route::resource('/',AksesController::class);
Route::get('{id}/edit',[AksesController::class,'edit'])->name('edit');
});
});
});