229 lines
10 KiB
PHP
229 lines
10 KiB
PHP
<!DOCTYPE html>
|
|
<!--
|
|
Author: Keenthemes
|
|
Product Name: Metronic
|
|
Product Version: 8.2.0
|
|
Purchase: https://1.envato.market/EA4JP
|
|
Website: http://www.keenthemes.com
|
|
Contact: support@keenthemes.com
|
|
Follow: www.twitter.com/keenthemes
|
|
Dribbble: www.dribbble.com/keenthemes
|
|
Like: www.facebook.com/keenthemes
|
|
License: For each use you must have a valid license purchased only from above link in order to legally use the theme for your project.
|
|
-->
|
|
<html lang="en">
|
|
<!--begin::Head-->
|
|
|
|
<head>
|
|
<base href="" />
|
|
<title>{{ $title ?? 'SIM RS' }}</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="SIM RS" />
|
|
<meta name="keywords" content="SIM RS" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta property="og:locale" content="en_US" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="SIM RS" />
|
|
<meta property="og:url" content="" />
|
|
<meta property="og:site_name" content="Keenthemes | Metronic" />
|
|
<link rel="canonical" href="" />
|
|
<link rel="shortcut icon" href="assets/media/logos/favicon.ico" />
|
|
<!--begin::Fonts(mandatory for all pages)-->
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
|
|
<!--end::Fonts-->
|
|
<!--begin::Vendor Stylesheets(used for this page only)-->
|
|
<link href="{{ asset('metronic/assets/plugins/custom/fullcalendar/fullcalendar.bundle.css') }}" rel="stylesheet"
|
|
type="text/css" />
|
|
<link href="{{ asset('metronic/assets/plugins/custom/datatables/datatables.bundle.css') }}" rel="stylesheet"
|
|
type="text/css" />
|
|
<!--end::Vendor Stylesheets-->
|
|
<!--begin::Global Stylesheets Bundle(mandatory for all pages)-->
|
|
<link href="{{ asset('metronic/assets/plugins/global/plugins.bundle.css') }}" rel="stylesheet" type="text/css" />
|
|
<link href="{{ asset('metronic/assets/css/style.bundle.css') }}" rel="stylesheet" type="text/css" />
|
|
<!--end::Global Stylesheets Bundle-->
|
|
<script>
|
|
// Frame-busting to prevent site from being loaded within a frame without permission (click-jacking) if (window.top != window.self) { window.top.location.replace(window.self.location.href); }
|
|
</script>
|
|
</head>
|
|
<style>
|
|
nav {
|
|
font-size: 15px;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-size: 20px
|
|
}
|
|
</style>
|
|
<!--end::Head-->
|
|
<!--begin::Body-->
|
|
|
|
<body id="kt_app_body" data-kt-app-header-fixed="true" data-kt-app-header-fixed-mobile="true"
|
|
data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-push-toolbar="true"
|
|
data-kt-app-sidebar-push-footer="true" data-kt-app-sidebar-stacked="true"
|
|
data-kt-app-sidebar-secondary-enabled="true" class="app-default">
|
|
<!--begin::Theme mode setup on page load-->
|
|
<script>
|
|
var defaultThemeMode = "light";
|
|
var themeMode;
|
|
if (document.documentElement) {
|
|
if (document.documentElement.hasAttribute("data-bs-theme-mode")) {
|
|
themeMode = document.documentElement.getAttribute("data-bs-theme-mode");
|
|
} else {
|
|
if (localStorage.getItem("data-bs-theme") !== null) {
|
|
themeMode = localStorage.getItem("data-bs-theme");
|
|
} else {
|
|
themeMode = defaultThemeMode;
|
|
}
|
|
}
|
|
if (themeMode === "system") {
|
|
themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
}
|
|
document.documentElement.setAttribute("data-bs-theme", themeMode);
|
|
}
|
|
</script>
|
|
<!--end::Theme mode setup on page load-->
|
|
<!--begin::App-->
|
|
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="#">SIM RS</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">
|
|
<ul class="navbar-nav ms-auto mb-lg-0 py-3" id="navbar_div">
|
|
<div class="d-flex justify-content-center align-items-center">
|
|
<div class="spinner-border text-light" role="status">
|
|
<span class="visually-hidden">Loading...</span>
|
|
</div>
|
|
<span class="text-white ms-5">Loading</span>
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container-fluid">
|
|
<div class="mt-5">
|
|
@yield('content')
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--end::App-->
|
|
<!--begin::Javascript-->
|
|
<script>
|
|
var hostUrl = "assets/";
|
|
</script>
|
|
<!--begin::Global Javascript Bundle(mandatory for all pages)-->
|
|
<script src="{{ asset('metronic/assets/plugins/global/plugins.bundle.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/scripts.bundle.js') }}"></script>
|
|
<!--end::Global Javascript Bundle-->
|
|
<!--begin::Vendors Javascript(used for this page only)-->
|
|
<script src="{{ asset('metronic/assets/plugins/custom/fullcalendar/fullcalendar.bundle.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/plugins/custom/datatables/datatables.bundle.js') }}"></script>
|
|
<!--end::Vendors Javascript-->
|
|
<!--begin::Custom Javascript(used for this page only)-->
|
|
<script src="{{ asset('metronic/assets/js/widgets.bundle.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/widgets.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/apps/chat/chat.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/utilities/modals/upgrade-plan.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/utilities/modals/new-target.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/utilities/modals/new-address.js') }}"></script>
|
|
<script src="{{ asset('metronic/assets/js/custom/utilities/modals/users-search.js') }}"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
getModule();
|
|
});
|
|
|
|
function getModule() {
|
|
$.ajax({
|
|
url: "{{ url('/get_module') }}",
|
|
type: "GET",
|
|
dataType: 'JSON',
|
|
success: function(response) {
|
|
if (response.status) {
|
|
const module_navbar = response.data;
|
|
let str_navbar = `<li class="nav-item mx-2">
|
|
<a class="nav-link active" aria-current="page" href="{{url('/')}}"><i
|
|
class="bi bi-speedometer fs-1 ms-1 text-white"></i> Dashboard</a>
|
|
</li>`;
|
|
|
|
module_navbar.forEach(element => {
|
|
str_navbar += `<li class="nav-item dropdown mx-2">`
|
|
str_navbar += `<a class="nav-link active dropdown-toggle" href="#" id="navbarDropdown" role="button"
|
|
data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="${element.image} fs-1 ms-1 text-white"></i> ${element.module_name}
|
|
</a>`;
|
|
str_navbar += `<ul class="dropdown-menu" aria-labelledby="navbarDropdown">`;
|
|
element.child.forEach(e => {
|
|
str_navbar += `<li><a class="dropdown-item" href="{{ url('/${e.module_url}') }}">${e.module_name}</a></li>`;
|
|
});
|
|
str_navbar += `</ul>`;
|
|
str_navbar += `</li>`;
|
|
});
|
|
|
|
str_navbar += `<li class="nav-item dropdown mx-2">
|
|
<a class="nav-link active dropdown-toggle" href="#" id="navbarDropdown"
|
|
role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="bi bi-person-circle fs-1 ms-1 text-white"></i> {{ session('name') }}
|
|
</a>
|
|
<ul class="dropdown-menu" id="dropdown_user_nav" aria-labelledby="navbarDropdown"
|
|
aria-expanded="false">
|
|
<li>
|
|
<div type="button" class="dropdown-item text-danger" onclick="logout()">Logout
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>`;
|
|
|
|
$('#navbar_div').html(str_navbar);
|
|
}
|
|
},
|
|
error: function(xhr) {
|
|
var errorMessage = xhr.responseJSON ? xhr.responseJSON.msg : "Terjadi kesalahan!";
|
|
Swal.fire({
|
|
icon: "error",
|
|
text: errorMessage,
|
|
buttonsStyling: false,
|
|
confirmButtonText: "Close",
|
|
customClass: {
|
|
confirmButton: "btn btn-danger"
|
|
}
|
|
});
|
|
$('#navbar_div').html('<span class="text-white">Oops, failed get module, please reload this page</span>');
|
|
},
|
|
complete: function() {
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function logout() {
|
|
Swal.fire({
|
|
icon: "question",
|
|
title: "Do you want to save the changes?",
|
|
showCancelButton: true,
|
|
confirmButtonText: "Yes",
|
|
cancelButtonText: "No",
|
|
customClass: {
|
|
confirmButton: "btn btn-success",
|
|
cancelButton: "btn btn-danger"
|
|
}
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
window.location.href = "{{ url('/logout') }}";
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
@yield('custom_js')
|
|
<!--end::Custom Javascript-->
|
|
<!--end::Javascript-->
|
|
</body>
|
|
<!--end::Body-->
|
|
|
|
</html>
|