UPDATE
parent
ab54d69500
commit
cc7003752f
|
@ -0,0 +1,345 @@
|
|||
<?php
|
||||
use App\Models\Master\Menu;
|
||||
use App\Models\Master\MenuAccess;
|
||||
use App\Models\User;
|
||||
use App\Models\Master\Group;
|
||||
use App\Models\Log;
|
||||
|
||||
if (!function_exists('taskLabel')) {
|
||||
/**
|
||||
* @param $val
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function taskLabel($val)
|
||||
{
|
||||
if ($val == 'store') {
|
||||
$task = 'save';
|
||||
} elseif ($val == 'save_permission') {
|
||||
$task = 'save group access';
|
||||
} elseif ($val == 'destroy') {
|
||||
$task = 'delete';
|
||||
} elseif ($val == 'batch') {
|
||||
$task = 'delete';
|
||||
} else {
|
||||
$task = $val;
|
||||
}
|
||||
|
||||
return $task;
|
||||
}
|
||||
}
|
||||
if (!function_exists('logActivity')) {
|
||||
/**
|
||||
* @param $request
|
||||
* @param $note
|
||||
*/
|
||||
function logActivity($request, $note)
|
||||
{
|
||||
$repository = app(\App\Models\Log::class);
|
||||
$data = [
|
||||
'module' => $request->route()->getAction('prefix'),
|
||||
'task' => taskLabel($request->route()->getActionMethod()),
|
||||
'user_id' => session('uid'),
|
||||
'ipaddress' => $request->getClientIp(),
|
||||
'useragent' => $request->header('User-Agent'),
|
||||
'note' => $note,
|
||||
'created_at' => \Carbon\Carbon::now()
|
||||
];
|
||||
|
||||
if (session('superuser') == false)
|
||||
$repository->create($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('trimId')) {
|
||||
/**
|
||||
* @param $val
|
||||
* @return array
|
||||
*/
|
||||
function trimId($val)
|
||||
{
|
||||
$string = explode('+', $val);
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('dateTime')) {
|
||||
/**
|
||||
* make secure id
|
||||
*
|
||||
* @param string|null $val
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function dateTime($date)
|
||||
{
|
||||
return date('d-m-Y H:i:s',strtotime(@$date));
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('encode_id')) {
|
||||
/**
|
||||
* make secure id
|
||||
*
|
||||
* @param string|null $val
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function encode_id(?string $val = ''): string
|
||||
{
|
||||
$params = ['val' => $val];
|
||||
return rtrim(base64_encode(serialize($params)), "=");
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('decode_id')) {
|
||||
/**
|
||||
* @param string|null $val
|
||||
* ${STATIC}
|
||||
*
|
||||
* @return mixed|null
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 02/12/2023 4:28
|
||||
*
|
||||
*/
|
||||
function decode_id(?string $val = ''): mixed
|
||||
{
|
||||
$secure = unserialize(base64_decode($val));
|
||||
return $secure ? $secure['val'] : null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('permission')) {
|
||||
/**
|
||||
* @param $access
|
||||
* @param $key
|
||||
* @param string $method
|
||||
* @param bool $view
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function permission($access, $key, string $method = 'menu', bool $view = false): mixed
|
||||
{
|
||||
if (@session('group_id') != 1) {
|
||||
if ($method == 'module') {
|
||||
if (is_array($access)) {
|
||||
$model = MenuAccess::where('module', 'LIKE', "{$key}%")->where('ms_group_id', session('group_id'))->first();
|
||||
$query = count(array_intersect((array)$access, (array)$model->access));
|
||||
} else {
|
||||
$query = MenuAccess::where($access, true)->where('module', 'LIKE', $key.'%')->where('ms_group_id', session('group_id'))->count();
|
||||
if ($query > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return abort('401');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$query = MenuAccess::where($access, true)->where('ms_menu_id', $key)->where('ms_group_id', session('group_id'))->count();
|
||||
}
|
||||
|
||||
if ($query > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('access')) {
|
||||
/**
|
||||
* @param $access
|
||||
* @param $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function access($access, $key)
|
||||
{
|
||||
if (session('group_alias') != 'administrator') {
|
||||
$query = MenuAccess::where($access, 1)->where('module', $key)->where('ms_group_id', session('group_id'))->count();
|
||||
if ($query > 0) {
|
||||
return true;
|
||||
} else if (session('group_alias') == 'administrator') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('activeMenuClass')) {
|
||||
/**
|
||||
* Helper to grab the application version.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function activeMenuClass($route){
|
||||
// dd(request()->route()->getName());
|
||||
// if(request()->route()->getName() == $route){
|
||||
// return true;
|
||||
// }else{
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (\Str::is($route, request()->route()->getName())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!function_exists('renderMenu')) {
|
||||
|
||||
/**
|
||||
* Loops through a folder and requires all PHP files
|
||||
* Searches sub-directories as well.
|
||||
*
|
||||
* @param $folder
|
||||
*/
|
||||
function renderMenu()
|
||||
{
|
||||
|
||||
$parent = Menu::where('status',true)->where('menu_type','sidebar')->where('parent_id',0)->orderBy('ordering','ASC')->get();
|
||||
$html = '';
|
||||
foreach ($parent as $p1) {
|
||||
// echo $p1->MsMenuId.'<br>';
|
||||
$child2 = Menu::where('status',true)->where('menu_type','sidebar')->where('parent_id',$p1->MsMenuId)->get();
|
||||
$access1 = permission('is_read', $p1->MsMenuId, 'menu', true);
|
||||
|
||||
$ch1 = count($child2) > 0 ? '' : '';
|
||||
$link1 = count($child2) > 0 ? '' : 'nav-link menu-link';
|
||||
$collapse1 = count($child2) > 0 ? 'data-fc-type="collapse"' : '';
|
||||
$active = activeMenuClass($p1->module) ? 'active' : '';
|
||||
// dd($p1->route);
|
||||
|
||||
if ($access1) {
|
||||
$active1 = activeMenuClass($p1->module) ? 'active' : '';
|
||||
|
||||
if (count($child2) > 0) {
|
||||
$href1 = 'data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="'.$p1->MsMenuId.'" href="#key'.$p1->MsMenuId.'"';
|
||||
}else{
|
||||
$href1 = 'href="'.url($p1->url).'"';
|
||||
}
|
||||
|
||||
$html .= '<li class=" nav-item ' . $ch1 . '">
|
||||
<a '.$collapse1.' class=" nav-link menu-link '.$active1.'" '.$href1.'>
|
||||
<span class="menu-icon"><i class="' . $p1->menu_icons . '"></i></span>
|
||||
<span class="menu-text">' . @$p1->title.'</span>';
|
||||
if (count($child2) > 0) {
|
||||
$html .= '<span class="menu-arrow"></span>';
|
||||
$html .= '</a>';
|
||||
$html .= '<div class="collapse menu-dropdown" id="key'.$p1->MsMenuId.'">';
|
||||
$html .= '<ul class="nav nav-sm flex-column">';
|
||||
foreach ($child2 as $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 ? 'data-fc-type="collapse"' : '';
|
||||
$link2 = count($child3) > 0 ? '' : 'nav-link';
|
||||
if ($access2) {
|
||||
$active2 = activeMenuClass($p2->module) ? 'active' : '';
|
||||
|
||||
if (count($child3) > 0) {
|
||||
$href2 = 'data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="'.$p2->MsMenuId.'" href="#key'.$p2->MsMenuId.'"';
|
||||
}else{
|
||||
$href2 = 'href="'.url($p2->url).'"';
|
||||
}
|
||||
|
||||
$html .= '<li class=" nav-item ' . $ch2 . '"><a '.$collapse2.' class="nav-link '.$active2.'" '.$href2.'><span class="menu-icon"><i class="' . $p2->menu_icons . '"></i></span> <span class="menu-text">' . @$p2->title.'<span>';
|
||||
if (count($child3) > 0) {
|
||||
$html .= '<span class="menu-arrow"></span>';
|
||||
$html .= '</a>';
|
||||
$html .= '<div class="collapse menu-dropdown" id="key'.$p2->MsMenuId.'">';
|
||||
$html .= '<ul class="nav nav-sm flex-column">';
|
||||
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';
|
||||
if ($access3) {
|
||||
$active3 = activeMenuClass($p3->module) ? 'active' : '';
|
||||
// $active3 = $active ? ' ' . null : null;
|
||||
$html .= '<li class=" nav-item ' . $ch3 .'"><a '.$collapse3.' class="nav-link '.$active3.'" href="' . url($p3->url) . '"> <span class="menu-text">' . @$p3->title.'</span>';
|
||||
if (count($child4) > 0) {
|
||||
$html .= '<span class="menu-arrow"></span>';
|
||||
$html .= '</a>';
|
||||
$html .= '<ul class="nav nav-sm flex-column">';
|
||||
foreach ($child4 as $p4) {
|
||||
$html .= '<li class=" ' . null . '"><a class="nav-link" href="' . url($p4->url) . '"> <span class="menu-text">' . @$p4->title.'<span>';
|
||||
}
|
||||
$html .= '</ul>';
|
||||
} else {
|
||||
$html .= '</a>';
|
||||
}
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
} else {
|
||||
$html .= '</a>';
|
||||
}
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
} else {
|
||||
$html .= '</a>';
|
||||
}
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('include_route_files')) {
|
||||
/**
|
||||
* Loops through a folder and requires all PHP files
|
||||
* Searches sub-directories as well.
|
||||
*
|
||||
* @param $folder
|
||||
*/
|
||||
function include_route_files($folder)
|
||||
{
|
||||
include_files_in_folder($folder);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('include_files_in_folder')) {
|
||||
/**
|
||||
* Loops through a folder and requires all PHP files
|
||||
* Searches sub-directories as well.
|
||||
*
|
||||
* @param $folder
|
||||
*/
|
||||
function include_files_in_folder($folder)
|
||||
{
|
||||
try {
|
||||
$rdi = new RecursiveDirectoryIterator($folder);
|
||||
$it = new RecursiveIteratorIterator($rdi);
|
||||
|
||||
while ($it->valid()) {
|
||||
if (!$it->isDot() && $it->isFile() && $it->isReadable() && $it->current()->getExtension() === 'php') {
|
||||
require $it->key();
|
||||
}
|
||||
|
||||
$it->next();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
||||
|
||||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
*/
|
||||
|
||||
use ConfirmsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users when the intended url fails.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User;
|
||||
|
||||
class CustomLoginController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
if(Auth::check()){
|
||||
return redirect('dashboard');
|
||||
}
|
||||
return view('auth.login');
|
||||
}
|
||||
public function post_login(Request $request)
|
||||
{
|
||||
Validator::make($request->all(), [
|
||||
'email' => 'required',
|
||||
'password' => 'required',
|
||||
])->validate();
|
||||
|
||||
$credentials = array('email' => $request->email, 'password' => $request->password);
|
||||
|
||||
$user = User::where('email', $credentials['email'])->first();
|
||||
if(!@$user){
|
||||
$user = User::where('username', $credentials['email'])->first();
|
||||
|
||||
if ($user && Hash::check($credentials['password'], $user->password)) {
|
||||
// dd($user->group);
|
||||
Auth::attempt(['username' => $request->email, 'password' => $request->password]);
|
||||
|
||||
$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,
|
||||
];
|
||||
session($session);
|
||||
|
||||
return redirect('dashboard')->with([
|
||||
'message' => trans('Selamat datang kembali'),
|
||||
'type' => "success"
|
||||
]);
|
||||
|
||||
}else{
|
||||
return redirect('/login')
|
||||
->withInput()
|
||||
->with([
|
||||
'message' => trans('Akun anda tidak ditemukan'),
|
||||
'type' => "error"
|
||||
]);
|
||||
}
|
||||
}else{
|
||||
if ($user && Hash::check($credentials['password'], $user->password)) {
|
||||
Auth::attempt(['email' => $request->email, 'password' => $request->password]);
|
||||
|
||||
$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,
|
||||
];
|
||||
session($session);
|
||||
|
||||
return redirect('dashboard')->with([
|
||||
'message' => trans('Selamat datang kembali'),
|
||||
'type' => "success"
|
||||
]);
|
||||
|
||||
}else{
|
||||
return redirect('/login')
|
||||
->withInput()
|
||||
->with([
|
||||
'message' => trans('Akun anda tidak ditemukan'),
|
||||
'type' => "error"
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function logout()
|
||||
{
|
||||
Auth::logout();
|
||||
return redirect('/login')
|
||||
->withInput()
|
||||
->with([
|
||||
'message' => trans('Berhasil Keluar'),
|
||||
'type' => "success"
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User;
|
||||
|
||||
class CustomRegisterController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$data = [];
|
||||
return view('auth.register',$data);
|
||||
}
|
||||
|
||||
public function post_register(Request $request)
|
||||
{
|
||||
|
||||
// dd($request->all());
|
||||
try {
|
||||
Validator::make($request->all(), [
|
||||
'email' => 'required|unique:users|email',
|
||||
'username' => 'required|unique:users,username',
|
||||
'password' => 'required|min:8|max:15|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->password = Hash::make($request->password);
|
||||
$user->name = $request->name;
|
||||
$user->username = $request->username;
|
||||
$user->ms_group_id = 2;
|
||||
$user->save();
|
||||
|
||||
return redirect('/login')->with([
|
||||
'message' => 'Berhasil membuat akun baru, silahkan login',
|
||||
'type' => 'success',
|
||||
]);
|
||||
|
||||
|
||||
} catch (Exception $e) {
|
||||
return redirect('register')->with([
|
||||
'message' => $e->getMessage(),
|
||||
'type' => "error"
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles authenticating users for the application and
|
||||
| redirecting them to your home screen. The controller uses a trait
|
||||
| to conveniently provide its functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
use AuthenticatesUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
$this->middleware('auth')->only('logout');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles the registration of new users as well as their
|
||||
| validation and creation. By default this controller uses a trait to
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset requests
|
||||
| and uses a simple trait to include this behavior. You're free to
|
||||
| explore this trait and override any methods you wish to tweak.
|
||||
|
|
||||
*/
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||
|
||||
class VerificationController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Email Verification Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling email verification for any
|
||||
| user that recently registered with the application. Emails may also
|
||||
| be re-sent if the user didn't receive the original email message.
|
||||
|
|
||||
*/
|
||||
|
||||
use VerifiesEmails;
|
||||
|
||||
/**
|
||||
* Where to redirect users after verification.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
$this->middleware('signed')->only('verify');
|
||||
$this->middleware('throttle:6,1')->only('verify', 'resend');
|
||||
}
|
||||
}
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
abstract class Controller
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
//
|
||||
use AuthorizesRequests, ValidatesRequests;
|
||||
}
|
||||
|
|
|
@ -6,89 +6,24 @@ use Illuminate\Http\Request;
|
|||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
|
||||
public function home()
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
return view('landing-page.home');
|
||||
}
|
||||
|
||||
// public function index() {
|
||||
// return view('index');
|
||||
// }
|
||||
|
||||
public function login()
|
||||
{
|
||||
return view('login.login');
|
||||
}
|
||||
|
||||
public function register()
|
||||
{
|
||||
return view('login.register');
|
||||
}
|
||||
|
||||
public function tes()
|
||||
{
|
||||
return view('login.tes');
|
||||
}
|
||||
|
||||
public function backup()
|
||||
{
|
||||
return view('welcome');
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function dashboard()
|
||||
{
|
||||
return view('admin.dashboard-admin.dashboard');
|
||||
$data['title'] = 'Dashboard';
|
||||
return view('dashboard',$data);
|
||||
}
|
||||
|
||||
public function dashboard2()
|
||||
{
|
||||
return view('dashboard');
|
||||
}
|
||||
|
||||
public function admin()
|
||||
{
|
||||
return view('admin.admin');
|
||||
}
|
||||
|
||||
public function profile()
|
||||
{
|
||||
return view('admin.profile.profile');
|
||||
}
|
||||
|
||||
public function identitas_lokasi()
|
||||
{
|
||||
return view('admin.identitas_lokasi.identitas_lokasi');
|
||||
}
|
||||
|
||||
public function data_dasar()
|
||||
{
|
||||
return view('admin.data_dasar.data_dasar');
|
||||
}
|
||||
|
||||
public function informasi_perubahan()
|
||||
{
|
||||
return view('admin.informasi_perubahan.informasi_perubahan');
|
||||
}
|
||||
|
||||
public function adaptasi_perubahan()
|
||||
{
|
||||
return view('admin.adaptasi_perubahan.adaptasi_perubahan');
|
||||
}
|
||||
|
||||
|
||||
public function mitigasi_perubahan()
|
||||
{
|
||||
return view('admin.mitigasi.mitigasi_perubahan');
|
||||
}
|
||||
|
||||
public function kelembagaan_masyarakat()
|
||||
{
|
||||
return view('admin.kelembagaan_masyarakat.kelembagaan_masyarakat');
|
||||
}
|
||||
|
||||
// public function verifikasi_final()
|
||||
// {
|
||||
// return view('admin.verifikasi_final.verifikasi_final');
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,344 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Management;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
// use App\Exceptions\\GeneralException;
|
||||
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 {
|
||||
return redirect()->back()->with('message', __('Maaf Terjadi Kesalahan'))
|
||||
->with('type', 'invalid');
|
||||
}
|
||||
} 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 {
|
||||
return redirect()->back()->with('message', __('Maaf Terjadi Kesalahan'))
|
||||
->with('type', 'invalid');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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['groupMenus'] = Menu::where('status',true)->get();
|
||||
$data['menu'] = $this->getMenu($data['key'], $data['type']);
|
||||
$data['title'] = $this->title.' '.$data['group']->name;
|
||||
$data['route'] = $this->route;
|
||||
return view($this->template.'.form',$data);
|
||||
}
|
||||
|
||||
public function getMenuByParentPosition($id, $type, $active = [1])
|
||||
{
|
||||
return 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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -0,0 +1,174 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Management;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Master\Group;
|
||||
|
||||
class RoleController extends Controller
|
||||
{
|
||||
protected $title = 'Role';
|
||||
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' => 'Data Role User','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 = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<div class="flex gap-3 justify-center items-center flex-row">';
|
||||
$action .= '<a href="'.url('/management/role/akses/'.encode_id($row->MsGroupId)).'/edit" data-toggle="tooltip" title="Edit Hak Akses Role" class="btn btn-sm bg-primary"><i class="ri-list-settings-line 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 bg-success"><i class="ri-pencil-line text-white"></i></a>';
|
||||
// $action .= '<a data-toggle="tooltip" title="Hapus Data" class="btn btn-xs bg-danger"><i class="ri-trash-line text-white"></i></a>';
|
||||
$action .= '<a href="#" data-href="'.url('management/role/delete/'.encode_id($row->MsGroupId)).'" data-toggle="tooltip" title="Hapus Data" class="remove_data btn btn-sm btn-block bg-danger"><i class="ri-delete-bin-line 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()
|
||||
{
|
||||
$data['breadcrumbs'] = [
|
||||
['name' => 'Dashboard','url' => url('dashboard')],
|
||||
['name' => 'Management & Akses Role'],
|
||||
['name' => 'Data Role User','active' => true],
|
||||
];
|
||||
|
||||
$data['title'] = $this->title;
|
||||
$data['route'] = $this->route;
|
||||
return view($this->template.'.form',$data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
try {
|
||||
|
||||
$keyId = decode_id($request->secure_id);
|
||||
|
||||
Validator::make($request->all(), [
|
||||
'name' => 'required',
|
||||
'alias' => 'required',
|
||||
])->validate();
|
||||
|
||||
if(@$keyId){
|
||||
$group = Group::find($keyId);
|
||||
$group->name = $request->name;
|
||||
$group->alias = $request->alias;
|
||||
$group->save();
|
||||
}else{
|
||||
$group = new Group;
|
||||
$group->name = $request->name;
|
||||
$group->alias = $request->alias;
|
||||
$group->created_by = auth()->user()->id;
|
||||
$group->status = true;
|
||||
$group->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' => 'Management & Akses Role'],
|
||||
['name' => 'Data Role User','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)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$keyId = decode_id($id);
|
||||
|
||||
$group = Group::where('MsGroupId',$keyId)->delete();
|
||||
|
||||
return response()->json(['success' => true,'message' => 'Berhasil update data','type' => 'success']);
|
||||
}
|
||||
}
|
|
@ -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' => 'Management & Akses Role'],
|
||||
['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','!=',1)->where('id','!=',auth()->user()->id)->orderBy('id','DESC')->get();
|
||||
// $data = User::with(['group'])->orderBy('id','DESC')->get();
|
||||
$_data = [];
|
||||
|
||||
|
||||
foreach ($data as $key => $row) {
|
||||
|
||||
|
||||
$action = '';
|
||||
|
||||
if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
|
||||
$action .= '<div class="flex gap-3 justify-center items-center flex-row">';
|
||||
$action .= '<a href="'.url('management/user/update/'.encode_id($row->id)).'" data-toggle="tooltip" title="Edit Data" class="btn btn-sm btn-block bg-primary"><i class="ri-pencil-line 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 bg-success"><i class="ri-user-2-line text-white"></i></a>';
|
||||
$action .= '<a href="#" data-href="'.url('management/user/delete/'.encode_id($row->id)).'" data-toggle="tooltip" title="Hapus Data" class="remove_data btn btn-sm btn-block bg-danger"><i class="ri-delete-bin-line 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|max:15|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|max:15|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' => 'Management & Akses Role'],
|
||||
['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,
|
||||
];
|
||||
session($session);
|
||||
|
||||
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']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ManagementUserController 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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Auth;
|
||||
|
||||
class Session
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if(!Auth::check()){
|
||||
return redirect('/login')->with([
|
||||
'message' => 'Maaf anda harus login terlebih dahulu',
|
||||
'type' => "error"
|
||||
]);
|
||||
}
|
||||
return $next($request);
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Group extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Log extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'ms_log';
|
||||
protected $primaryKey = 'MsLogId';
|
||||
protected $fillable = ['module', 'task', 'user_id', 'ipaddress', 'useragent', 'note'];
|
||||
protected $guarded = ['created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\User','id','user_id');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Group extends Model
|
||||
{
|
||||
protected $table = 'ms_group';
|
||||
protected $primaryKey = 'MsGroupId';
|
||||
protected $guarded = [];
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Menu extends Model
|
||||
{
|
||||
// use HasFactory;
|
||||
protected $table = 'ms_menu';
|
||||
protected $primaryKey = 'MsMenuId';
|
||||
protected $guarded = [];
|
||||
|
||||
public function submenu()
|
||||
{
|
||||
return $this->hasMany(Menu::class,'parent_id','id');
|
||||
}
|
||||
|
||||
public static function coreMenus($type, array $status = [1]): mixed
|
||||
{
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->whereIn('status', $status);
|
||||
}
|
||||
|
||||
public static function coreMenusByParent($id, array $status = [1]): mixed
|
||||
{
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->whereIn('status', $status);
|
||||
}
|
||||
|
||||
public static function getMenuByParentPosition($id, $type, array $active = [1], int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->where('menu_type', '=', $type)
|
||||
->whereIn('status', $active)
|
||||
->union(Menu::coreMenus($type, $active))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:53
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getParentByType($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 18:07
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getMenuByYear($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:54
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getParentByTypeStatus($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:54
|
||||
*
|
||||
* @param $id
|
||||
* @param array $active
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getMenuByParent($id, array $active = [1], int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->union(Menu::coreMenusByParent($id, $active))
|
||||
->whereIn('status', $active)
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 14:54
|
||||
*
|
||||
* @param int $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function countMenuByYear(int $year): mixed
|
||||
{
|
||||
$model = Menu::where('status', '=', true);
|
||||
return $model->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:55
|
||||
*
|
||||
* @param $id
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getActiveById($id, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('id', '=', $id)
|
||||
->where('status', '=', true)
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:55
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getActiveByPosition($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MenuAccess extends Model
|
||||
{
|
||||
protected $table = 'ms_access_menu';
|
||||
protected $primaryKey = 'MsAccessMenuId';
|
||||
protected $guarded = [];
|
||||
}
|
|
@ -8,7 +8,8 @@
|
|||
"require": {
|
||||
"php": "^8.2",
|
||||
"laravel/framework": "^11.31",
|
||||
"laravel/tinker": "^2.9"
|
||||
"laravel/tinker": "^2.9",
|
||||
"laravel/ui": "^4.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.23",
|
||||
|
@ -29,7 +30,10 @@
|
|||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"app/Helpers/custom.php"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "626b9e7ddd47fb7eff9aaa53cce0c9ad",
|
||||
"content-hash": "a7159c5237c3c2e75dbd1d23c85e732c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
|
@ -1455,6 +1455,69 @@
|
|||
},
|
||||
"time": "2025-01-27T14:24:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/ui",
|
||||
"version": "v4.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/ui.git",
|
||||
"reference": "7d6ffa38d79f19c9b3e70a751a9af845e8f41d88"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/ui/zipball/7d6ffa38d79f19c9b3e70a751a9af845e8f41d88",
|
||||
"reference": "7d6ffa38d79f19c9b3e70a751a9af845e8f41d88",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^9.21|^10.0|^11.0|^12.0",
|
||||
"illuminate/filesystem": "^9.21|^10.0|^11.0|^12.0",
|
||||
"illuminate/support": "^9.21|^10.0|^11.0|^12.0",
|
||||
"illuminate/validation": "^9.21|^10.0|^11.0|^12.0",
|
||||
"php": "^8.0",
|
||||
"symfony/console": "^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^7.35|^8.15|^9.0|^10.0",
|
||||
"phpunit/phpunit": "^9.3|^10.4|^11.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Ui\\UiServiceProvider"
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Ui\\": "src/",
|
||||
"Illuminate\\Foundation\\Auth\\": "auth-backend/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel UI utilities and presets.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"ui"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/laravel/ui/tree/v4.6.1"
|
||||
},
|
||||
"time": "2025-01-28T15:15:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
"version": "2.6.1",
|
||||
|
@ -8065,12 +8128,12 @@
|
|||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.2"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ms_menu', function (Blueprint $table) {
|
||||
$table->id('MsMenuId');
|
||||
$table->foreignId('parent_id')->index()->default(0)->comment('idx menu_id');
|
||||
$table->string('title', 150);
|
||||
$table->string('module', 150)->nullable();
|
||||
$table->string('url', 150)->nullable();
|
||||
$table->string('menu_type', 50)->index()->nullable()->comment('tb_menu_group alias');
|
||||
$table->string('menu_icons', 50)->nullable();
|
||||
$table->tinyInteger('ordering')->default(0);
|
||||
$table->boolean('status')->default(true)->comment('True/False');
|
||||
$table->foreignId('created_by')->default(0);
|
||||
$table->foreignId('updated_by')->default(0)->nullable();
|
||||
$table->timestamps();
|
||||
$table->comment('Master menu aplikasi');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ms_menu');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ms_group', function (Blueprint $table) {
|
||||
$table->id('MsGroupId');
|
||||
$table->string('name', 50)->unique();
|
||||
$table->string('alias', 50)->unique();
|
||||
$table->boolean('status')->default(true)->comment('True/False');
|
||||
$table->foreignId('created_by')->default(0);
|
||||
$table->foreignId('updated_by')->default(0)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ms_group');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ms_access_menu', function (Blueprint $table) {
|
||||
$table->id('MsAccessMenuId');
|
||||
$table->foreignId('ms_group_id')->comment('FK ms group');
|
||||
$table->string('module', 150)->nullable();
|
||||
$table->foreignId('ms_menu_id')->comment('FK tb_menu');
|
||||
$table->string('menu_group', 20)->nullable()->default('adminsidebar');
|
||||
$table->boolean('is_create')->default(false);
|
||||
$table->boolean('is_read')->default(false);
|
||||
$table->boolean('is_update')->default(false);
|
||||
$table->boolean('is_delete')->default(false);
|
||||
$table->boolean('is_verify')->default(false);
|
||||
$table->boolean('is_approve')->default(false);
|
||||
$table->boolean('is_download')->default(false);
|
||||
$table->json('access')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreign('ms_menu_id')->references('MsMenuId')->on('ms_menu')->cascadeOnDelete();
|
||||
$table->foreign('ms_group_id')->references('MsGroupId')->on('ms_group')->cascadeOnDelete();
|
||||
$table->comment('Master hak akses role/group user');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ms_access_menu');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->integer('ms_group_id')->after('id');
|
||||
$table->foreign('ms_group_id')->references('MsGroupId')->on('ms_group')->cascade();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ms_log', function (Blueprint $table) {
|
||||
$table->bigIncrements('MsLogId');
|
||||
$table->string('module',200)->nullable();
|
||||
$table->string('task',100)->nullable();
|
||||
$table->unsignedBigInteger('user_id')->index()->nullable();
|
||||
$table->ipAddress('ipaddress')->nullable();
|
||||
$table->mediumText('useragent')->nullable();
|
||||
$table->mediumText('note')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ms_log');
|
||||
}
|
||||
};
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Hash;
|
||||
use App\Models\Master\Group;
|
||||
use App\Models\User;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
@ -13,11 +15,32 @@ class DatabaseSeeder extends Seeder
|
|||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
$group = [
|
||||
['name' => 'Administrator','alias' => 'administrator'],
|
||||
['name' => 'Dinas','alias' => 'dinas'],
|
||||
];
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
foreach($group as $valGroup){
|
||||
Group::updateOrCreate([
|
||||
'name' => $valGroup['name'],
|
||||
'alias' => $valGroup['alias'],
|
||||
],[
|
||||
'name' => $valGroup['name'],
|
||||
'alias' => $valGroup['alias'],
|
||||
'status' => 1,
|
||||
]);
|
||||
}
|
||||
|
||||
User::updateOrCreate([
|
||||
'name' => 'Administrator',
|
||||
// 'username' => 'administrator',
|
||||
'email' => 'adminproklim@dlh.go.id',
|
||||
],[
|
||||
'name' => 'Administrator',
|
||||
// 'username' => 'administrator',
|
||||
'email' => 'adminproklim@dlh.go.id',
|
||||
'ms_group_id' => '1',
|
||||
'password' => Hash::make('##proklim2025'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
"dev": "vite"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"axios": "^1.7.4",
|
||||
"bootstrap": "^5.2.3",
|
||||
"concurrently": "^9.0.1",
|
||||
"laravel-vite-plugin": "^1.2.0",
|
||||
"postcss": "^8.4.47",
|
||||
"sass": "^1.56.1",
|
||||
"tailwindcss": "^3.4.13",
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,34 @@
|
|||
import 'bootstrap';
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
window.axios = axios;
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// import Pusher from 'pusher-js';
|
||||
// window.Pusher = Pusher;
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
||||
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
||||
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||
// enabledTransports: ['ws', 'wss'],
|
||||
// });
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// Body
|
||||
$body-bg: #f8fafc;
|
||||
|
||||
// Typography
|
||||
$font-family-sans-serif: 'Nunito', sans-serif;
|
||||
$font-size-base: 0.9rem;
|
||||
$line-height-base: 1.6;
|
|
@ -0,0 +1,8 @@
|
|||
// Fonts
|
||||
@import url('https://fonts.bunny.net/css?family=Nunito');
|
||||
|
||||
// Variables
|
||||
@import 'variables';
|
||||
|
||||
// Bootstrap
|
||||
@import 'bootstrap/scss/bootstrap';
|
|
@ -1,27 +1,17 @@
|
|||
<div class="app-menu navbar-menu">
|
||||
<!-- LOGO -->
|
||||
<div class="navbar-brand-box">
|
||||
<div class="navbar-brand-box p-3">
|
||||
<!-- Dark Logo-->
|
||||
<a href="index.html" class="logo logo-dark">
|
||||
<span class="logo-sm">
|
||||
{{-- <img src="{{ asset('assets/images/logo-sm.png') }}" alt=""
|
||||
height="22"> --}}
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
{{-- <img src="{{ asset('assets/images/logo-dark.png') }}" alt=""
|
||||
height="17"> --}}
|
||||
</span>
|
||||
</a>
|
||||
<!-- Light Logo-->
|
||||
<a href="index.html" class="logo logo-light">
|
||||
<span class="logo-sm">
|
||||
{{-- <img src="{{ asset('assets/images/logo-sm.png') }}" alt=""
|
||||
height="22"> --}}
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
{{-- <img src="{{ asset('assets/images/logo-light.png') }}" alt=""
|
||||
height="17"> --}}
|
||||
</span>
|
||||
<a href="{{url('/')}}" class="logo">
|
||||
<div class="flex flex-row gap-2 justify-start items-center">
|
||||
<div>
|
||||
<img class="" src="https://lingkunganhidup.jakarta.go.id/dist/images/logo/logo-dlh-big.png" alt=""
|
||||
width="30">
|
||||
</div>
|
||||
<div>
|
||||
<span>Dinas Lingkungan Hidup</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover"
|
||||
id="vertical-hover">
|
||||
|
@ -35,83 +25,80 @@
|
|||
<ul class="navbar-nav" id="navbar-nav">
|
||||
<li class="menu-title"><span data-key="t-menu">Menu</span></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.profile.profile') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-dashboard-2-line"></i> <span data-key="t-widgets">Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.profile.profile') }}">
|
||||
<a class="nav-link menu-link" href="#sidebarDashboards" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebarDashboards">
|
||||
<i class="ri-dashboard-2-line"></i> <span data-key="t-dashboards">Profile</span>
|
||||
</a>
|
||||
<div class="collapse menu-dropdown" id="sidebarDashboards">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-analytics.html" class="nav-link" data-key="t-analytics"> Analytics </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-crm.html" class="nav-link" data-key="t-crm"> CRM </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="index.html" class="nav-link" data-key="t-ecommerce"> Ecommerce </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-crypto.html" class="nav-link" data-key="t-crypto"> Crypto </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-projects.html" class="nav-link" data-key="t-projects"> Projects </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-nft.html" class="nav-link" data-key="t-nft"> NFT</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="dashboard-job.html" class="nav-link"><span data-key="t-job">Job</span> <span class="badge badge-pill bg-success" data-key="t-new">New</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-account-circle-line"></i> <span data-key="t-widgets">Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.identitas_lokasi.identitas_lokasi') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-map-pin-3-line"></i> <span data-key="t-widgets">Identitas Lokasi</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.data_dasar.data_dasar') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-road-map-line"></i> <span data-key="t-widgets">Data Dasar Lokasi</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.informasi_perubahan.informasi_perubahan') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-leaf-line"></i> <span data-key="t-widgets">Informasi Perubahan Iklim</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.adaptasi_perubahan.adaptasi_perubahan') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-plant-line"></i> <span data-key="t-widgets">Adaptasi Perubahan Iklim</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.mitigasi.mitigasi_perubahan') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-recycle-line"></i> <span data-key="t-widgets">Mitigasi Perubahan Iklim</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.kelembagaan_masyarakat.kelembagaan_masyarakat') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-earth-line"></i> <span data-key="t-widgets">Data Kelembagaan Masyarakat dan Dukungan
|
||||
Keberlanjutan </span>
|
||||
</a>
|
||||
</li>
|
||||
{{-- <li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#sidebarDashboards" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="sidebarDashboards">
|
||||
<i class="ri-dashboard-2-line"></i> <span data-key="t-dashboards">Main Menu</span>
|
||||
</a>
|
||||
<div class="collapse menu-dropdown" id="sidebarDashboards">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.identitas_lokasi.identitas_lokasi') }}" class="nav-link"
|
||||
data-key="t-analytics"> Identitas Lokasi</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.data_dasar.data_dasar') }}" class="nav-link" data-key="t-crm">
|
||||
Data Dasar Lokasi </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.informasi_perubahan.informasi_perubahan') }}" class="nav-link"
|
||||
data-key="t-crm"> Informasi Perubahan Iklim </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.adaptasi_perubahan.adaptasi_perubahan') }}" class="nav-link"
|
||||
data-key="t-crm">Adaptasi Perubahan Iklim </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.mitigasi.mitigasi_perubahan') }}" class="nav-link"
|
||||
data-key="t-crm">Mitigasi Perubahan Iklim </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.kelembagaan_masyarakat.kelembagaan_masyarakat') }}" class="nav-link"
|
||||
data-key="t-crm">Data Kelembagaan Masyarakat dan Dukungan
|
||||
Keberlanjutan </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li> --}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="{{ route('admin.profile.profile') }}">
|
||||
<a class="nav-link menu-link" href="">
|
||||
<i class="ri-file-list-3-line"></i> <span data-key="t-widgets">Laporan</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -119,7 +106,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-background"></div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Proklim - Dinas Lingkungan Hidup
|
||||
</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"/>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gray-200 flex items-center justify-center min-h-screen">
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden max-w-4xl w-full md:flex">
|
||||
<div class="bg-gradient-to-b to-blue-700 text-white p-8 md:w-1/2 flex flex-col items-center justify-center" style="background:#67AE6E">
|
||||
<div class="text-center">
|
||||
<img alt="Rocket logo" class="mx-auto mb-4 p-1 " style="border-radius:100%;" src="https://lingkunganhidup.jakarta.go.id/dist/images/logo/logo-dlh-big.png"/>
|
||||
<h2 class="text-2xl font-bold mb-0">Dinas Lingkungan Hidup</h2>
|
||||
<h2 class="text-1xl mb-4">Kampung Proklim</h2>
|
||||
<p class="mb-8 muted">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque aliquam odio et faucibus.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-8 md:w-1/2 flex items-center justify-center">
|
||||
<div class="w-full max-w-md">
|
||||
<h2 class="text-2xl font-bold mb-6 text-center">
|
||||
Masuk
|
||||
</h2>
|
||||
<form action="{{url('login')}}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="email">
|
||||
Email
|
||||
</label>
|
||||
<input required class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="email" type="email" name="email" placeholder="Masukan email"/>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="password">
|
||||
Password
|
||||
</label>
|
||||
<input required class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="password" placeholder="Masukan password" type="password" name="password"/>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<button class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
|
||||
Sign In
|
||||
</button>
|
||||
<a href="{{url('register')}}" class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
|
||||
Daftar
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Confirm Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ __('Please confirm your password before continuing.') }}
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Confirm Password') }}
|
||||
</button>
|
||||
|
||||
@if (Route::has('password.request'))
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Your Password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -0,0 +1,47 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Send Password Reset Link') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -0,0 +1,65 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Reset Password') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -0,0 +1,86 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Spacer - Create Your Account
|
||||
</title>
|
||||
<script src="https://cdn.tailwindcss.com">
|
||||
</script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"/>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gray-200 flex items-center justify-center min-h-screen">
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden max-w-4xl w-full md:flex">
|
||||
<div class="bg-gradient-to-b from-blue-500 to-blue-700 text-white p-8 md:w-1/2 flex flex-col items-center justify-center">
|
||||
<div class="text-center">
|
||||
<h1 class="text-2xl font-bold mb-4">
|
||||
Welcome to
|
||||
</h1>
|
||||
<img alt="Rocket logo" class="mx-auto mb-4" src="https://placehold.co/100x100"/>
|
||||
<h2 class="text-3xl font-bold mb-4">
|
||||
Spacer
|
||||
</h2>
|
||||
<p class="mb-8">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque aliquam odio et faucibus.
|
||||
</p>
|
||||
<div class="flex justify-between w-full px-8">
|
||||
<a class="text-white underline" href="#">
|
||||
Contact Here
|
||||
</a>
|
||||
<a class="text-white underline" href="#">
|
||||
Location Here
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-8 md:w-1/2 flex items-center justify-center">
|
||||
<div class="w-full max-w-md">
|
||||
<h2 class="text-2xl font-bold mb-6 text-center">
|
||||
Create your account
|
||||
</h2>
|
||||
<form>
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="name">
|
||||
Name
|
||||
</label>
|
||||
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="name" placeholder="Enter your name" type="text"/>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="email">
|
||||
E-mail Address
|
||||
</label>
|
||||
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="email" placeholder="Enter your email" type="email"/>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="password">
|
||||
Password
|
||||
</label>
|
||||
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="password" placeholder="Enter your password" type="password"/>
|
||||
</div>
|
||||
<div class="flex items-center mb-4">
|
||||
<input class="mr-2 leading-tight" id="terms" type="checkbox"/>
|
||||
<label class="text-sm text-gray-700" for="terms">
|
||||
I agree with the
|
||||
<a class="text-blue-500 underline" href="#">
|
||||
Terms & Conditions
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button">
|
||||
Sign Up
|
||||
</button>
|
||||
<button class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button" onclick="window.location='{{ route('login.login') }}'">
|
||||
Sign In
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Verify Your Email Address') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('resent'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ __('A fresh verification link has been sent to your email address.') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('Before proceeding, please check your email for a verification link.') }}
|
||||
{{ __('If you did not receive the email') }},
|
||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,4 +1,4 @@
|
|||
@extends('layout.master')
|
||||
@extends('layouts.master')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('You are logged in!') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
File diff suppressed because it is too large
Load Diff
|
@ -1,91 +0,0 @@
|
|||
<footer id="newsletter">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 offset-lg-2">
|
||||
<div class="section-heading">
|
||||
<h4>Join our mailing list to receive the news & latest trends</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 offset-lg-3">
|
||||
<form id="search" action="#" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-sm-6">
|
||||
<fieldset>
|
||||
<input type="address" name="address" class="email" placeholder="Email Address..."
|
||||
autocomplete="on" required>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-6">
|
||||
<fieldset>
|
||||
<button type="submit" class="main-button">Subscribe Now <i
|
||||
class="fa fa-angle-right"></i></button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="footer-widget">
|
||||
<h4>Contact Us</h4>
|
||||
<p>Rio de Janeiro - RJ, 22795-008, Brazil</p>
|
||||
<p><a href="#">010-020-0340</a></p>
|
||||
<p><a href="#">info@company.co</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="footer-widget">
|
||||
<h4>About Us</h4>
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Services</a></li>
|
||||
<li><a href="#">About</a></li>
|
||||
<li><a href="#">Testimonials</a></li>
|
||||
<li><a href="#">Pricing</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="#">About</a></li>
|
||||
<li><a href="#">Testimonials</a></li>
|
||||
<li><a href="#">Pricing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="footer-widget">
|
||||
<h4>Useful Links</h4>
|
||||
<ul>
|
||||
<li><a href="#">Free Apps</a></li>
|
||||
<li><a href="#">App Engine</a></li>
|
||||
<li><a href="#">Programming</a></li>
|
||||
<li><a href="#">Development</a></li>
|
||||
<li><a href="#">App News</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="#">App Dev Team</a></li>
|
||||
<li><a href="#">Digital Web</a></li>
|
||||
<li><a href="#">Normal Apps</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="footer-widget">
|
||||
<h4>About Our Company</h4>
|
||||
<div class="logo">
|
||||
<img src="{{ asset('assets/images/white-logo.png') }}" alt="">
|
||||
</div>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
||||
labore et dolore.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="copyright-text">
|
||||
<p>Copyright © 2022 Chain App Dev Company. All Rights Reserved.
|
||||
<br>Design: <a href="https://templatemo.com/" target="_blank"
|
||||
title="css templates">TemplateMo</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -1,30 +0,0 @@
|
|||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
|
||||
<title>Program Kampung Iklim</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<!--
|
||||
|
||||
TemplateMo 570 Chain App Dev
|
||||
|
||||
https://templatemo.com/tm-570-chain-app-dev
|
||||
|
||||
-->
|
||||
|
||||
<!-- Additional CSS Files -->
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/templatemo-chain-app-dev.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/animated.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/owl.css') }}">
|
||||
|
||||
|
||||
</head>
|
|
@ -1,805 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en" data-layout="twocolumn" data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>Analytics | Velzon - Admin & Dashboard Template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
|
||||
<meta content="Themesbrand" name="author" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="assets/images/favicon.ico">
|
||||
|
||||
<!-- plugin css -->
|
||||
<link href="assets/libs/jsvectormap/css/jsvectormap.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Layout config Js -->
|
||||
<script src="assets/js/layout.js"></script>
|
||||
<!-- Bootstrap Css -->
|
||||
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- Icons Css -->
|
||||
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- App Css-->
|
||||
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- custom Css-->
|
||||
<link href="assets/css/custom.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="layout-wrapper">
|
||||
|
||||
@include('include.header')
|
||||
|
||||
<!-- removeNotificationModal -->
|
||||
<div id="removeNotificationModal" class="modal fade zoomIn" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" id="NotificationModalbtn-close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mt-2 text-center">
|
||||
<lord-icon src="https://cdn.lordicon.com/gsqxdxog.json" trigger="loop" colors="primary:#495057,secondary:#f06548" style="width:100px;height:100px"></lord-icon>
|
||||
<div class="mt-4 pt-2 fs-15 mx-4 mx-sm-5">
|
||||
<h4 class="fw-bold">Are you sure ?</h4>
|
||||
<p class="text-muted mx-4 mb-0">Are you sure you want to remove this Notification ?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 justify-content-center mt-4 mb-2">
|
||||
<button type="button" class="btn w-sm btn-light" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn w-sm btn-danger" id="delete-notification">Yes, Delete It!</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
@include('include.sidebar')
|
||||
<!-- Vertical Overlay-->
|
||||
<div class="vertical-overlay"></div>
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start right Content here -->
|
||||
<!-- ============================================================== -->
|
||||
<div class="main-content">
|
||||
|
||||
<div class="page-content">
|
||||
@yield('content')
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
<!-- End Page-content -->
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<script>document.write(new Date().getFullYear())</script> © Velzon.
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="text-sm-end d-none d-sm-block">
|
||||
Design & Develop by Themesbrand
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- end main content-->
|
||||
|
||||
</div>
|
||||
<!-- END layout-wrapper -->
|
||||
|
||||
|
||||
|
||||
<!--start back-to-top-->
|
||||
<button onclick="topFunction()" class="btn btn-danger btn-icon" id="back-to-top">
|
||||
<i class="ri-arrow-up-line"></i>
|
||||
</button>
|
||||
<!--end back-to-top-->
|
||||
|
||||
<!--preloader-->
|
||||
<div id="preloader">
|
||||
<div id="status">
|
||||
<div class="spinner-border text-primary avatar-sm" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="customizer-setting d-none d-md-block">
|
||||
<div class="btn-info btn-rounded shadow-lg btn btn-icon btn-lg p-2" data-bs-toggle="offcanvas" data-bs-target="#theme-settings-offcanvas" aria-controls="theme-settings-offcanvas">
|
||||
<i class='mdi mdi-spin mdi-cog-outline fs-22'></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Theme Settings -->
|
||||
<div class="offcanvas offcanvas-end border-0" tabindex="-1" id="theme-settings-offcanvas">
|
||||
<div class="d-flex align-items-center bg-primary bg-gradient p-3 offcanvas-header">
|
||||
<h5 class="m-0 me-2 text-white">Theme Customizer</h5>
|
||||
|
||||
<button type="button" class="btn-close btn-close-white ms-auto" id="customizerclose-btn" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body p-0">
|
||||
<div data-simplebar class="h-100">
|
||||
<div class="p-4">
|
||||
<h6 class="mb-0 fw-bold text-uppercase">Layout</h6>
|
||||
<p class="text-muted">Choose your layout</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input id="customizer-layout01" name="data-layout" type="radio" value="vertical" class="form-check-input">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="customizer-layout01">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Vertical</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input id="customizer-layout02" name="data-layout" type="radio" value="horizontal" class="form-check-input">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="customizer-layout02">
|
||||
<span class="d-flex h-100 flex-column gap-1">
|
||||
<span class="bg-light d-flex p-1 gap-1 align-items-center">
|
||||
<span class="d-block p-1 bg-soft-primary rounded me-1"></span>
|
||||
<span class="d-block p-1 pb-0 px-2 bg-soft-primary ms-auto"></span>
|
||||
<span class="d-block p-1 pb-0 px-2 bg-soft-primary"></span>
|
||||
</span>
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Horizontal</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input id="customizer-layout03" name="data-layout" type="radio" value="twocolumn" class="form-check-input">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="customizer-layout03">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1">
|
||||
<span class="d-block p-1 bg-soft-primary mb-2"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Two Column</h5>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Color Scheme</h6>
|
||||
<p class="text-muted">Choose Light or Dark Scheme.</p>
|
||||
|
||||
<div class="colorscheme-cardradio">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-layout-mode" id="layout-mode-light" value="light">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="layout-mode-light">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Light</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio dark">
|
||||
<input class="form-check-input" type="radio" name="data-layout-mode" id="layout-mode-dark" value="dark">
|
||||
<label class="form-check-label p-0 avatar-md w-100 bg-dark" for="layout-mode-dark">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-soft-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-light rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-soft-light d-block p-1"></span>
|
||||
<span class="bg-soft-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Dark</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="layout-width">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Layout Width</h6>
|
||||
<p class="text-muted">Choose Fluid or Boxed layout.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-layout-width" id="layout-width-fluid" value="fluid">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="layout-width-fluid">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Fluid</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-layout-width" id="layout-width-boxed" value="boxed">
|
||||
<label class="form-check-label p-0 avatar-md w-100 px-2" for="layout-width-boxed">
|
||||
<span class="d-flex gap-1 h-100 border-start border-end">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Boxed</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="layout-position">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Layout Position</h6>
|
||||
<p class="text-muted">Choose Fixed or Scrollable Layout Position.</p>
|
||||
|
||||
<div class="btn-group radio" role="group">
|
||||
<input type="radio" class="btn-check" name="data-layout-position" id="layout-position-fixed" value="fixed">
|
||||
<label class="btn btn-light w-sm" for="layout-position-fixed">Fixed</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="data-layout-position" id="layout-position-scrollable" value="scrollable">
|
||||
<label class="btn btn-light w-sm ms-0" for="layout-position-scrollable">Scrollable</label>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Topbar Color</h6>
|
||||
<p class="text-muted">Choose Light or Dark Topbar Color.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-topbar" id="topbar-color-light" value="light">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="topbar-color-light">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Light</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-topbar" id="topbar-color-dark" value="dark">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="topbar-color-dark">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-primary d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Dark</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sidebar-size">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Sidebar Size</h6>
|
||||
<p class="text-muted">Choose a size of Sidebar.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-size" id="sidebar-size-default" value="lg">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-size-default">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Default</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-size" id="sidebar-size-compact" value="md">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-size-compact">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Compact</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-size" id="sidebar-size-small" value="sm">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-size-small">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1">
|
||||
<span class="d-block p-1 bg-soft-primary mb-2"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Small (Icon View)</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-size" id="sidebar-size-small-hover" value="sm-hover">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-size-small-hover">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1">
|
||||
<span class="d-block p-1 bg-soft-primary mb-2"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Small Hover View</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sidebar-view">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Sidebar View</h6>
|
||||
<p class="text-muted">Choose Default or Detached Sidebar view.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-layout-style" id="sidebar-view-default" value="default">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-view-default">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Default</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-layout-style" id="sidebar-view-detached" value="detached">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-view-detached">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-flex p-1 gap-1 align-items-center px-2">
|
||||
<span class="d-block p-1 bg-soft-primary rounded me-1"></span>
|
||||
<span class="d-block p-1 pb-0 px-2 bg-soft-primary ms-auto"></span>
|
||||
<span class="d-block p-1 pb-0 px-2 bg-soft-primary"></span>
|
||||
</span>
|
||||
<span class="d-flex gap-1 h-100 p-1 px-2">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="bg-light d-block p-1 mt-auto px-2"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Detached</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebar-color">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Sidebar Color</h6>
|
||||
<p class="text-muted">Choose a color of Sidebar.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio" data-bs-toggle="collapse" data-bs-target="#collapseBgGradient.show">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-light" value="light">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-color-light">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-white border-end d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Light</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio" data-bs-toggle="collapse" data-bs-target="#collapseBgGradient.show">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-dark" value="dark">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="sidebar-color-dark">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-primary d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-light rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Dark</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-link avatar-md w-100 p-0 overflow-hidden border collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseBgGradient" aria-expanded="false" aria-controls="collapseBgGradient">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-vertical-gradient d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-light rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-light"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<h5 class="fs-13 text-center mt-2">Gradient</h5>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
<div class="collapse" id="collapseBgGradient">
|
||||
<div class="d-flex gap-2 flex-wrap img-switch p-2 px-3 bg-light rounded">
|
||||
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-gradient" value="gradient">
|
||||
<label class="form-check-label p-0 avatar-xs rounded-circle" for="sidebar-color-gradient">
|
||||
<span class="avatar-title rounded-circle bg-vertical-gradient"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-gradient-2" value="gradient-2">
|
||||
<label class="form-check-label p-0 avatar-xs rounded-circle" for="sidebar-color-gradient-2">
|
||||
<span class="avatar-title rounded-circle bg-vertical-gradient-2"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-gradient-3" value="gradient-3">
|
||||
<label class="form-check-label p-0 avatar-xs rounded-circle" for="sidebar-color-gradient-3">
|
||||
<span class="avatar-title rounded-circle bg-vertical-gradient-3"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar" id="sidebar-color-gradient-4" value="gradient-4">
|
||||
<label class="form-check-label p-0 avatar-xs rounded-circle" for="sidebar-color-gradient-4">
|
||||
<span class="avatar-title rounded-circle bg-vertical-gradient-4"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sidebar-img">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Sidebar Images</h6>
|
||||
<p class="text-muted">Choose a image of Sidebar.</p>
|
||||
|
||||
<div class="d-flex gap-2 flex-wrap img-switch">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-image" id="sidebarimg-none" value="none">
|
||||
<label class="form-check-label p-0 avatar-sm h-auto" for="sidebarimg-none">
|
||||
<span class="avatar-md w-auto bg-light d-flex align-items-center justify-content-center">
|
||||
<i class="ri-close-fill fs-20"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-image" id="sidebarimg-01" value="img-1">
|
||||
<label class="form-check-label p-0 avatar-sm h-auto" for="sidebarimg-01">
|
||||
<img src="assets/images/sidebar/img-1.jpg" alt="" class="avatar-md w-auto object-cover">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-image" id="sidebarimg-02" value="img-2">
|
||||
<label class="form-check-label p-0 avatar-sm h-auto" for="sidebarimg-02">
|
||||
<img src="assets/images/sidebar/img-2.jpg" alt="" class="avatar-md w-auto object-cover">
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-image" id="sidebarimg-03" value="img-3">
|
||||
<label class="form-check-label p-0 avatar-sm h-auto" for="sidebarimg-03">
|
||||
<img src="assets/images/sidebar/img-3.jpg" alt="" class="avatar-md w-auto object-cover">
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-sidebar-image" id="sidebarimg-04" value="img-4">
|
||||
<label class="form-check-label p-0 avatar-sm h-auto" for="sidebarimg-04">
|
||||
<img src="assets/images/sidebar/img-4.jpg" alt="" class="avatar-md w-auto object-cover">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="preloader-menu">
|
||||
<h6 class="mt-4 mb-0 fw-bold text-uppercase">Preloader</h6>
|
||||
<p class="text-muted">Choose a preloader.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-preloader" id="preloader-view-custom" value="enable">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="preloader-view-custom">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<!-- <div id="preloader"> -->
|
||||
<div id="status" class="d-flex align-items-center justify-content-center">
|
||||
<div class="spinner-border text-primary avatar-xxs m-auto" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Enable</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-check sidebar-setting card-radio">
|
||||
<input class="form-check-input" type="radio" name="data-preloader" id="preloader-view-none" value="disable">
|
||||
<label class="form-check-label p-0 avatar-md w-100" for="preloader-view-none">
|
||||
<span class="d-flex gap-1 h-100">
|
||||
<span class="flex-shrink-0">
|
||||
<span class="bg-light d-flex h-100 flex-column gap-1 p-1">
|
||||
<span class="d-block p-1 px-2 bg-soft-primary rounded mb-2"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
<span class="d-block p-1 px-2 pb-0 bg-soft-primary"></span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-grow-1">
|
||||
<span class="d-flex h-100 flex-column">
|
||||
<span class="bg-light d-block p-1"></span>
|
||||
<span class="bg-light d-block p-1 mt-auto"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<h5 class="fs-13 text-center mt-2">Disable</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end preloader-menu -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="offcanvas-footer border-top p-3 text-center">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-light w-100" id="reset-layout">Reset</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<a href="https://1.envato.market/velzon-admin" target="_blank" class="btn btn-primary w-100">Buy Now</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JAVASCRIPT -->
|
||||
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/libs/simplebar/simplebar.min.js"></script>
|
||||
<script src="assets/libs/node-waves/waves.min.js"></script>
|
||||
<script src="assets/libs/feather-icons/feather.min.js"></script>
|
||||
<script src="assets/js/pages/plugins/lord-icon-2.1.0.js"></script>
|
||||
<script src="assets/js/plugins.js"></script>
|
||||
|
||||
<!-- apexcharts -->
|
||||
<script src="assets/libs/apexcharts/apexcharts.min.js"></script>
|
||||
|
||||
<!-- Vector map-->
|
||||
<script src="assets/libs/jsvectormap/js/jsvectormap.min.js"></script>
|
||||
<script src="assets/libs/jsvectormap/maps/world-merc.js"></script>
|
||||
|
||||
<!-- Dashboard init -->
|
||||
<script src="assets/js/pages/dashboard-analytics.init.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="assets/js/app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
<!-- ***** Header Area Start ***** -->
|
||||
<header class="header-area header-sticky wow slideInDown" data-wow-duration="0.75s" data-wow-delay="0s">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<nav class="main-nav">
|
||||
<!-- ***** Logo Start ***** -->
|
||||
<a href="index.html" class="logo">
|
||||
<img src="{{ asset('assets/images/logo-dlh.png')}}" alt="Chain App Dev" style="width: 50px;
|
||||
height: 50px;">
|
||||
</a>
|
||||
<!-- ***** Logo End ***** -->
|
||||
<!-- ***** Menu Start ***** -->
|
||||
<ul class="nav">
|
||||
<li class="scroll-to-section"><a href="#top" class="active">Home</a></li>
|
||||
<li class="scroll-to-section"><a href="#cara-pendaftaran">Cara Pendaftaran</a></li>
|
||||
<li class="scroll-to-section"><a href="#">Slider</a></li>
|
||||
<li class="scroll-to-section"><a href="#Artikel">Artikel</a></li>
|
||||
<li class="scroll-to-section"><a href="#Apresiasi">Apresiasi</a></li>
|
||||
<li class="scroll-to-section"><a href="#pricing">Pricing</a></li>
|
||||
<li class="scroll-to-section"><a href="#newsletter">Newsletter</a></li>
|
||||
<li><div class="gradient-button"><a id="modal_trigger" href="{{ route('login.login') }}"><i class="fa fa-sign-in-alt"></i> Sign In Now</a></div></li>
|
||||
</ul>
|
||||
<a class='menu-trigger'>
|
||||
<span>Menu</span>
|
||||
</a>
|
||||
<!-- ***** Menu End ***** -->
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('style')
|
||||
</header>
|
||||
<!-- ***** Header Area End ***** -->
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('layout_home/vendor/jquery/jquery.min.js')}}"></script>
|
||||
<script src="{{ asset('layout_home/vendor/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
|
||||
<script src="{{ asset('layout_home/assets/js/owl-carousel.js') }}"></script>
|
||||
<script src="{{ asset('layout_home/assets/js/animation.js') }}"></script>
|
||||
<script src="{{ asset('layout_home/assets/js/imagesloaded.js') }}"></script>
|
||||
<script src="{{ asset('layout_home/assets/js/popup.js') }}"></script>
|
||||
<script src="{{ asset('layout_home/assets/js/custom.js') }}"></script>
|
||||
<script>
|
||||
// Daftar username dan password yang valid
|
||||
const users = {
|
||||
"user1": "password1",
|
||||
"user2": "password2",
|
||||
"user3": "password3",
|
||||
"drlantern@gotbootstrap.com": "Password123",
|
||||
"kadis": "124701",
|
||||
"sekdis": "119966",
|
||||
};
|
||||
|
||||
// Menangani proses login
|
||||
document.getElementById("loginForm").addEventListener("submit", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Mendapatkan nilai input
|
||||
const username = document.getElementById("username").value;
|
||||
const password = document.getElementById("password").value;
|
||||
|
||||
// Memeriksa apakah username dan password sesuai
|
||||
if (users[username] && users[username] === password) {
|
||||
// Arahkan ke halaman lain setelah login berhasil
|
||||
window.location.href = "{{ route('admin.dashboard-admin.dashboard') }}";
|
||||
} else {
|
||||
document.getElementById("error-message").textContent = "Username atau password salah.";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@stack('script')
|
|
@ -0,0 +1,80 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<!-- Left Side Of Navbar -->
|
||||
<ul class="navbar-nav me-auto">
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Right Side Of Navbar -->
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<!-- Authentication Links -->
|
||||
@guest
|
||||
@if (Route::has('login'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Route::has('register'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@else
|
||||
<li class="nav-item dropdown">
|
||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
||||
{{ Auth::user()->name }}
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="py-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,96 @@
|
|||
<!doctype html>
|
||||
<html lang="en" data-layout="twocolumn" data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>{{@$title}} - Proklim Dinas Lingkungan Hidup</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="" name="description" />
|
||||
<meta content="Dinas Lingkungan Hidup" name="author" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="assethttps://lingkunganhidup.jakarta.go.id/dist/images/logo/logo-dlh-big.png">
|
||||
|
||||
<!-- plugin css -->
|
||||
<link href="{{asset('assets/libs/jsvectormap/css/jsvectormap.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Layout config Js -->
|
||||
<script src="assets/js/layout.js"></script>
|
||||
<!-- Bootstrap Css -->
|
||||
<link href="{{asset('assets/css/bootstrap.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<!-- Icons Css -->
|
||||
<link href="{{asset('assets/css/icons.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<!-- App Css-->
|
||||
<link href="{{asset('assets/css/app.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<!-- custom Css-->
|
||||
<link href="{{asset('assets/css/custom.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
@yield('css')
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="layout-wrapper">
|
||||
|
||||
@include('include.header')
|
||||
|
||||
@include('include.sidebar')
|
||||
<!-- Vertical Overlay-->
|
||||
<div class="vertical-overlay"></div>
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start right Content here -->
|
||||
<!-- ============================================================== -->
|
||||
<div class="main-content">
|
||||
|
||||
<div class="page-content">
|
||||
@yield('content')
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
<!-- End Page-content -->
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<script>document.write(new Date().getFullYear())</script> © Velzon.
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="text-sm-end d-none d-sm-block">
|
||||
Copyright by Dinas Lingkungan Hidup Provinsi DKI Jakarta
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- end main content-->
|
||||
|
||||
</div>
|
||||
<!-- END layout-wrapper -->
|
||||
|
||||
<!-- JAVASCRIPT -->
|
||||
<script src="{{asset('assets/libs/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
|
||||
<script src="{{asset('assets/libs/simplebar/simplebar.min.js')}}"></script>
|
||||
<script src="{{asset('assets/libs/node-waves/waves.min.js')}}"></script>
|
||||
<script src="{{asset('assets/libs/feather-icons/feather.min.js')}}"></script>
|
||||
<script src="{{asset('assets/js/pages/plugins/lord-icon-2.1.0.js')}}"></script>
|
||||
<script src="{{asset('assets/js/plugins.js')}}"></script>
|
||||
|
||||
<!-- apexcharts -->
|
||||
<script src="{{asset('assets/libs/apexcharts/apexcharts.min.js')}}"></script>
|
||||
|
||||
<!-- Vector map-->
|
||||
<script src="{{asset('assets/libs/jsvectormap/js/jsvectormap.min.js')}}"></script>
|
||||
<script src="{{asset('assets/libs/jsvectormap/maps/world-merc.js')}}"></script>
|
||||
|
||||
<!-- Dashboard init -->
|
||||
<script src="{{asset('assets/js/pages/dashboard-analytics.init.js')}}"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="{{asset('assets/js/app.js')}}"></script>
|
||||
@yield('jss')
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,275 @@
|
|||
@extends('layouts.master')
|
||||
@section('content')
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="flex justify-between items-center">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{route($route.'.store')}}" method="POST" class="">
|
||||
{{csrf_field()}}
|
||||
<div class="p-6">
|
||||
<table class="gridjs-table"
|
||||
data-toggle="table"
|
||||
data-search="false"
|
||||
data-show-refresh ="false"
|
||||
data-page-size="700">
|
||||
<thead class="gridjs-thead">
|
||||
<tr class="gridjs-tr bg-secondary/10">
|
||||
<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 class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
@if(count($parent['level1']) > 0)
|
||||
<a href="javascript:;" class="show_detail" data-id="{{$parent['id']}}" data-status="1">
|
||||
<i id="parent{{$parent['id']}}" class="ri-subtract-line"></i>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">{{$parent['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]"
|
||||
value="is_read+{{$parent['id']}}" @if($parent['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_create[]"
|
||||
value="is_create+{{$parent['id']}}" @if($parent['checked']['is_create'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_update[]"
|
||||
value="is_update+{{$parent['id']}}" @if($parent['checked']['is_update'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_delete[]"
|
||||
value="is_delete+{{$parent['id']}}" @if($parent['checked']['is_delete'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-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 class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
@if(count($level1['level2']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level1['id']}}"
|
||||
data-status="1"><i
|
||||
id="parent{{$level1['id']}}"
|
||||
class="ri-subtract-line"></i></a>@endif
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500" style="text-indent:30px;">--- {{$level1['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]" value="is_read+{{$level1['id']}}" @if($level1['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_create[]" value="is_create+{{$level1['id']}}" @if($level1['checked']['is_create'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_update[]" value="is_update+{{$level1['id']}}" @if($level1['checked']['is_update'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level1['id']}}" @if($level1['checked']['is_delete'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-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 class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
@if(count($level2['level3']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level2['id']}}"
|
||||
data-status="1"><i
|
||||
id="parent{{$level2['id']}}"
|
||||
class="ri-subtract-line"></i></a>@endif
|
||||
</td>
|
||||
<td style="text-indent: 60px">------ {{$level2['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]" value="is_read+{{$level2['id']}}" @if($level2['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_create[]" value="is_create+{{$level2['id']}}" @if($level2['checked']['is_create'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_update[]" value="is_update+{{$level2['id']}}" @if($level2['checked']['is_update'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level2['id']}}" @if($level2['checked']['is_delete'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-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 class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
@if(count($level3['level4']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level3['id']}}"
|
||||
data-status="1"><i
|
||||
id="parent{{$level3['id']}}"
|
||||
class="ri-subtract-line"></i></a>@endif
|
||||
</td>
|
||||
<td style="text-indent: 90px;">--------- {{$level3['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]" value="is_read+{{$level3['id']}}" @if($level3['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_create[]" value="is_create+{{$level3['id']}}" @if($level3['checked']['is_create'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_update[]" value="is_update+{{$level3['id']}}" @if($level3['checked']['is_update'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level3['id']}}" @if($level3['checked']['is_delete'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-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 class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<span style="color: #7F8FA4">{{$level4['id']}}</span>
|
||||
</td>
|
||||
<td style="text-indent: 130px">------------ {{$level4['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]" value="is_read+{{$level4['id']}}" @if($level4['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_create[]" value="is_create+{{$level4['id']}}" @if($level4['checked']['is_create'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_update[]" value="is_update+{{$level4['id']}}" @if($level4['checked']['is_update'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_delete[]" value="is_delete+{{$level4['id']}}" @if($level4['checked']['is_delete'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-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 class="p-6">
|
||||
<a href="{{route('modules.management.role.index')}}" class="btn text-white bg-danger"><i class="ri-close-line"></i> Batal</a>
|
||||
<button class="btn text-white bg-success"><i class="ri-save-line"></i> Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</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('ri-subtract-line').addClass('ri-subtract-line');
|
||||
} else {
|
||||
$(this).attr('data-status', '1');
|
||||
$(".parent_" + id).hide('falt');
|
||||
$("#parent" + id).removeClass('ri-subtract-line').addClass('ri-subtract-line');
|
||||
}
|
||||
});
|
||||
|
||||
$('#menu_group').change(function () {
|
||||
window.location.href = "{{url('system/groups/access/'.encode_id(@$id))}}/" + this.value;
|
||||
});
|
||||
|
||||
$('.checkread').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_read[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkverify').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_verify[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkadd').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_create[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkedit').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_update[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkdel').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_delete[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkapprove').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_approve[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkdownload').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_download[]"]').prop('checked', checked);
|
||||
});
|
||||
|
||||
$('.checkbalaibesar').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_balaibesar[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checktipea').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_tipe_a[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checktipeb').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_tipe_b[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkloka').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_loka[]"]').prop('checked', checked);
|
||||
});
|
||||
$('.checkpusat').change(function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$('.table').find('input[name*="is_pusat[]"]').prop('checked', checked);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -0,0 +1,35 @@
|
|||
@extends('layouts.master')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
<form action="{{route($route.'.store')}}" method="POST" class="">
|
||||
{{csrf_field()}}
|
||||
<input type="hidden" name="secure_id" value="{{@$keyId}}">
|
||||
<div class="p-6">
|
||||
<div class="grid lg:grid-cols-2 gap-3">
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Role</label>
|
||||
<input type="text" value="{{@$item->name ? @$item->name : old('name')}}" name="name" class="form-input @error('name') is-invalid @enderror" placeholder="Masukan Nama Role" required>
|
||||
@error('name')
|
||||
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Alias</label>
|
||||
<input type="text" value="{{@$item->alias ? @$item->alias : old('alias')}}" name="alias" class="form-input @error('alias') is-invalid @enderror" placeholder="Masukan Alias Role" required>
|
||||
<small><i>Pastikan mengandung huruf kecil semua dan tidak ada "spasi" atau tanda baca "-"</i></small>
|
||||
@error('alias')
|
||||
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<a href="{{route($route.'.index')}}" class="btn bg-danger text-white"><i class="ri-close-line"></i> Batal</a>
|
||||
<button type="submit" class="btn bg-success text-white"><i class="ri-save-line"></i> Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
|
@ -0,0 +1,85 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('css')
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="flex justify-between items-center">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div id="toolbar">
|
||||
<a href="{{route($route.'.create')}}" class="btn bg-primary text-white">Tambah Data</a>
|
||||
</div>
|
||||
<table class="gridjs-table"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="gridjs-thead">
|
||||
<tr class="gridjs-tr bg-secondary/10">
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-width="10" data-field="action">#</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-width="10" data-field="no">No</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-field="name">Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="gridjs-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@section('js')
|
||||
<script type="text/javascript">
|
||||
$("#grid-data").on("click", ".remove_data", function() {
|
||||
var base_url = $(this).attr('data-href');
|
||||
var id = $(this).attr('data-id');
|
||||
swal({
|
||||
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,
|
||||
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
|
|
@ -0,0 +1,92 @@
|
|||
@extends('layouts.master')
|
||||
@section('content')
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="flex justify-between items-center">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{route($route.'.store')}}" method="POST" class="">
|
||||
{{csrf_field()}}
|
||||
<input type="hidden" name="secure_id" value="{{@$keyId}}">
|
||||
<div class="p-6">
|
||||
<div class="grid lg:grid-cols-2 gap-3">
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Username</label>
|
||||
<input type="text" value="{{@$item->username ? @$item->username : old('username')}}" name="username" class="form-input @error('username') is-invalid @enderror" placeholder="Masukan username" required>
|
||||
@error('username')
|
||||
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Nama</label>
|
||||
<input type="text" value="{{@$item->name ? @$item->name : old('name')}}" name="name" class="form-input @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 class="mb-3">
|
||||
<label class="mb-3">Email</label>
|
||||
<input type="email" name="email" value="{{@$item->email ? @$item->email : old('email')}}" id="emailverify" class="form-input @error('email') is-invalid @enderror" placeholder="Masukan Email Aktif" required>
|
||||
@error('name')
|
||||
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Role User</label>
|
||||
<select name="group" class="form-input @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 class="grid lg:grid-cols-1">
|
||||
<div class="mb-3">
|
||||
<label class="mb-3">Password Baru</label>
|
||||
<input type="password" id="password" autocomplete="new-password" name="password" class="form-input @error('password') is-invalid @enderror" placeholder="Masukan Password Minimm 8 characters">
|
||||
@error('password')
|
||||
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
|
||||
@enderror
|
||||
<button class="btn bg-secondary my-2 text-white" type="button" id="togglePassword"><i class="ri-eye-line"></i> Lihat Password</button>
|
||||
<p>
|
||||
Kata Sandi harus mengandung Minimal 8 karakter, maksimal 15 karakter, <br>setidaknya 1 huruf kecil dan huruf besar, angka dan simbol
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<a href="{{route($route.'.index')}}" class="btn bg-danger text-white"><i class="ri-close-line"></i> Batal</a>
|
||||
<button type="submit" class="btn bg-success text-white"><i class="ri-save-line"></i> Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('page-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('fa-eye').addClass('fa-eye-slash'); // Ganti ikon
|
||||
} else {
|
||||
passwordField.attr('type', 'password'); // Ubah ke password
|
||||
icon.removeClass('fa-eye-slash').addClass('fa-eye'); // Kembalikan ikon
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
|
@ -0,0 +1,128 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('css')
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="flex justify-between items-center">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<table class="gridjs-table"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="gridjs-thead">
|
||||
<tr class="gridjs-tr bg-secondary/10">
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-width="10" data-field="action">#</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-width="10" data-field="no">No</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-field="role">Role</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-field="email">Email</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-field="name">Name</th>
|
||||
<th class="gridjs-td gridjs-th text-sm text-gray-500" data-field="created_at">Created At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="gridjs-tbody"></tbody>
|
||||
</table>
|
||||
</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({
|
||||
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",
|
||||
});
|
||||
|
||||
// Callback handler that will be called on success
|
||||
request.done(function(response, textStatus, jqXHR){
|
||||
console.log(response);
|
||||
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
||||
window.location.href = '{{url("/dashboard")}}';
|
||||
history.pushState(null, null, location.href);
|
||||
window.onpopstate = function () {
|
||||
history.go(1);
|
||||
};
|
||||
});
|
||||
|
||||
// Callback handler that will be called on failure
|
||||
request.fail(function (jqXHR, textStatus, errorThrown){
|
||||
toastr.error(
|
||||
"Gagal "+textStatus, errorThrown
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$("#grid-data").on("click", ".remove_data", function() {
|
||||
var base_url = $(this).attr('data-href');
|
||||
var id = $(this).attr('data-id');
|
||||
swal({
|
||||
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,
|
||||
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
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\HomeController;
|
||||
use App\Http\Controllers\Management\UserController;
|
||||
use App\Http\Controllers\Management\RoleController;
|
||||
use App\Http\Controllers\Management\AksesController;
|
||||
|
||||
|
||||
Route::get('dashboard',[HomeController::class,'dashboard'])->name('dashboard');
|
||||
|
||||
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::get('delete/{id?}',[RoleController::class,'delete'])->name('delete');
|
||||
|
||||
Route::name('akses.')->prefix('akses')->group(function () {
|
||||
Route::resource('/',AksesController::class);
|
||||
Route::get('{id}/edit',[AksesController::class,'edit'])->name('edit');
|
||||
});
|
||||
});
|
||||
});
|
|
@ -2,23 +2,42 @@
|
|||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
|
||||
use App\Http\Controllers\HomeController;
|
||||
use App\Http\Middleware\Session;
|
||||
use App\Http\Controllers\Auth\CustomLoginController;
|
||||
use App\Http\Controllers\Auth\CustomRegisterController;
|
||||
|
||||
|
||||
Route::get('/', function () { return view('welcome'); });
|
||||
Route::get('/home2', function () { return view('home2'); });
|
||||
Route::get('/halaman_login', [HomeController::class, 'login'])->name('login.login');
|
||||
Route::get('/halaman_register', [HomeController::class, 'register'])->name('login.register');
|
||||
Route::get('/home', [HomeController::class, 'home'])->name('landing-page.home');
|
||||
Route::get('/dashboard-admin', [HomeController::class, 'dashboard'])->name('admin.dashboard-admin.dashboard');
|
||||
Route::get('/admin', [HomeController::class, 'admin'])->name('admin.admin');
|
||||
Route::get('/profile', [HomeController::class, 'profile'])->name('admin.profile.profile');
|
||||
Route::get('/identitas_lokasi', [HomeController::class, 'identitas_lokasi'])->name('admin.identitas_lokasi.identitas_lokasi');
|
||||
Route::get('/data_dasar', [HomeController::class, 'data_dasar'])->name('admin.data_dasar.data_dasar');
|
||||
Route::get('/informasi_perubahan', [HomeController::class, 'informasi_perubahan'])->name('admin.informasi_perubahan.informasi_perubahan');
|
||||
Route::get('/adaptasi_perubahan', [HomeController::class, 'adaptasi_perubahan'])->name('admin.adaptasi_perubahan.adaptasi_perubahan');
|
||||
Route::get('/mitigasi_perubahan', [HomeController::class, 'mitigasi_perubahan'])->name('admin.mitigasi.mitigasi_perubahan');
|
||||
Route::get('/kelembagaan_masyarakat', [HomeController::class, 'kelembagaan_masyarakat'])->name('admin.kelembagaan_masyarakat.kelembagaan_masyarakat');
|
||||
Route::get('/dashboard-admin2', [HomeController::class, 'dashboard2'])->name('admin.dashboard-admin.dashboard2');
|
||||
|
||||
// Route::get('/verifikasi_final', [HomeController::class, 'verifikasi_final'])->name('admin.verifikasi_final.verifikasi_final');
|
||||
Route::get('/login', [CustomLoginController::class,'index'])->name('login.login');
|
||||
Route::post('login',[CustomLoginController::class,'post_login'])->name('post_login');
|
||||
Route::get('register',[CustomRegisterController::class,'index'])->name('login.register');
|
||||
Route::post('register',[CustomRegisterController::class,'post_register'])->name('post_register');
|
||||
|
||||
Route::middleware(Session::class)->name('modules.')->group(function () {
|
||||
|
||||
include_route_files(__DIR__ . '/modules');
|
||||
|
||||
Route::get('logout',[CustomLoginController::class,'logout'])->name('logout');
|
||||
});
|
||||
|
||||
// Route::get('/home2', function () { return view('home2'); });
|
||||
// Route::get('/halaman_login', [HomeController::class, 'login'])->name('login.login');
|
||||
// Route::get('/halaman_register', [HomeController::class, 'register'])->name('login.register');
|
||||
// Route::get('/home', [HomeController::class, 'home'])->name('landing-page.home');
|
||||
// Route::get('/dashboard-admin', [HomeController::class, 'dashboard'])->name('admin.dashboard-admin.dashboard');
|
||||
// Route::get('/admin', [HomeController::class, 'admin'])->name('admin.admin');
|
||||
// Route::get('/profile', [HomeController::class, 'profile'])->name('admin.profile.profile');
|
||||
// Route::get('/identitas_lokasi', [HomeController::class, 'identitas_lokasi'])->name('admin.identitas_lokasi.identitas_lokasi');
|
||||
// Route::get('/data_dasar', [HomeController::class, 'data_dasar'])->name('admin.data_dasar.data_dasar');
|
||||
// Route::get('/informasi_perubahan', [HomeController::class, 'informasi_perubahan'])->name('admin.informasi_perubahan.informasi_perubahan');
|
||||
// Route::get('/adaptasi_perubahan', [HomeController::class, 'adaptasi_perubahan'])->name('admin.adaptasi_perubahan.adaptasi_perubahan');
|
||||
// Route::get('/mitigasi_perubahan', [HomeController::class, 'mitigasi_perubahan'])->name('admin.mitigasi.mitigasi_perubahan');
|
||||
// Route::get('/kelembagaan_masyarakat', [HomeController::class, 'kelembagaan_masyarakat'])->name('admin.kelembagaan_masyarakat.kelembagaan_masyarakat');
|
||||
// Route::get('/dashboard-admin2', [HomeController::class, 'dashboard2'])->name('admin.dashboard-admin.dashboard2');
|
||||
|
||||
// Route::get('/verifikasi_final', [HomeController::class, 'verifikasi_final'])->name('admin.verifikasi_final.verifikasi_final');
|
||||
// Auth::routes();
|
||||
// Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||
|
|
|
@ -4,7 +4,10 @@ import laravel from 'laravel-vite-plugin';
|
|||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel({
|
||||
input: ['resources/css/app.css', 'resources/js/app.js'],
|
||||
input: [
|
||||
'resources/sass/app.scss',
|
||||
'resources/js/app.js',
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue