Created
August 17, 2020 16:16
-
-
Save inuvalogic/48b0fe1b9f249eb8584341e9aac35821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"> | |
<title>KSP - Koperasi Simpan Pinjam</title> | |
<link rel="icon" type="image/x-icon" href="/assets/img/favicon.ico"/> | |
<link href="/assets/css/loader.css" rel="stylesheet" type="text/css" /> | |
<script src="/assets/js/loader.js"></script> | |
<!-- BEGIN GLOBAL MANDATORY STYLES --> | |
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap" rel="stylesheet"> | |
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<link href="/assets/css/plugins.css" rel="stylesheet" type="text/css" /> | |
<link href="/assets/css/structure.css" rel="stylesheet" type="text/css" class="structure" /> | |
<script src="/plugins/sweetalerts/promise-polyfill.js"></script> | |
<link href="/plugins/sweetalerts/sweetalert2.min.css" rel="stylesheet" type="text/css" /> | |
<link href="/plugins/sweetalerts/sweetalert.css" rel="stylesheet" type="text/css" /> | |
<link href="/assets/css/components/custom-sweetalert.css" rel="stylesheet" type="text/css" /> | |
<link rel="stylesheet" type="text/css" href="/plugins/table/datatable/datatables.css"> | |
<link rel="stylesheet" type="text/css" href="/assets/css/forms/theme-checkbox-radio.css"> | |
<link rel="stylesheet" type="text/css" href="/plugins/table/datatable/dt-global_style.css"> | |
<link rel="stylesheet" type="text/css" href="/plugins/table/datatable/custom_dt_custom.css"> | |
<!-- END GLOBAL MANDATORY STYLES --> | |
<!-- BEGIN PAGE LEVEL PLUGINS/CUSTOM STYLES --> | |
@yield('customcss') | |
<!-- END PAGE LEVEL PLUGINS/CUSTOM STYLES --> | |
</head> | |
<body class="dashboard-analytics"> | |
<!-- BEGIN LOADER --> | |
<div id="load_screen"> <div class="loader"> <div class="loader-content"> | |
<div class="spinner-grow align-self-center"></div> | |
</div></div></div> | |
<!-- END LOADER --> | |
<!-- BEGIN NAVBAR --> | |
<div class="header-container fixed-top"> | |
<header class="header navbar navbar-expand-sm"> | |
<ul class="navbar-item flex-row"> | |
<li class="nav-item theme-logo"> | |
<a href="/"> | |
<img src="/assets/img/90x90.jpg" class="navbar-logo" alt="logo"> | |
</a> | |
</li> | |
</ul> | |
<a href="javascript:void(0);" class="sidebarCollapse" data-placement="bottom"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3" y2="6"></line><line x1="3" y1="12" x2="3" y2="12"></line><line x1="3" y1="18" x2="3" y2="18"></line></svg></a> | |
<ul class="navbar-item flex-row search-ul"> | |
<li class="nav-item align-self-center search-animated"> | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search toggle-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> | |
<form class="form-inline search-full form-inline search" role="search"> | |
<div class="search-bar"> | |
<input type="text" class="form-control search-form-control ml-lg-auto" placeholder="Search..."> | |
</div> | |
</form> | |
</li> | |
</ul> | |
<ul class="navbar-item flex-row navbar-dropdown"> | |
<li class="nav-item dropdown notification-dropdown"> | |
<a href="javascript:void(0);" class="nav-link dropdown-toggle" id="notificationDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg><span class="badge badge-success"></span> | |
</a> | |
<div class="dropdown-menu position-absolute animated fadeInUp" aria-labelledby="notificationDropdown"> | |
<div class="notification-scroll"> | |
</div> | |
</div> | |
</li> | |
<li class="nav-item dropdown user-profile-dropdown order-lg-0 order-1"> | |
<a href="javascript:void(0);" class="nav-link dropdown-toggle user" id="userProfileDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
<img src="/assets/img/90x90.jpg" alt="admin-profile" class="img-fluid"> | |
</a> | |
<div class="dropdown-menu position-absolute animated fadeInUp" aria-labelledby="userProfileDropdown"> | |
<div class="user-profile-section"> | |
<div class="media mx-auto"> | |
<img src="/assets/img/90x90.jpg" class="img-fluid mr-2" alt="avatar"> | |
<div class="media-body"> | |
<h5>Admin</h5> | |
<p>Administrator</p> | |
</div> | |
</div> | |
</div> | |
<div class="dropdown-item"> | |
<a href="/users/profile"> | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg> <span>My Profile</span> | |
</a> | |
</div> | |
<div class="dropdown-item"> | |
<a href="/users/change-password"> | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> <span>Change Password</span> | |
</a> | |
</div> | |
<div class="dropdown-item"> | |
<a id="logout-btn" href="#"> | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg> <span>Log Out</span> | |
</a> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</header> | |
</div> | |
<!-- END NAVBAR --> | |
<!-- BEGIN MAIN CONTAINER --> | |
<div class="main-container" id="container"> | |
<div class="overlay"></div> | |
<div class="search-overlay"></div> | |
@include('layouts.sidebar') | |
<!-- BEGIN CONTENT AREA --> | |
<div id="content" class="main-content"> | |
<div class="layout-px-spacing"> | |
@yield('content') | |
</div> | |
<div class="footer-wrapper"> | |
<div class="footer-section f-section-1"> | |
<p class="">Copyright © 2020. KSP. All rights reserved.</p> | |
</div> | |
<div class="footer-section f-section-2"> | |
</div> | |
</div> | |
</div> | |
<!-- END CONTENT AREA --> | |
</div> | |
<!-- END MAIN CONTAINER --> | |
<!-- BEGIN GLOBAL MANDATORY SCRIPTS --> | |
<script src="/assets/js/libs/jquery-3.1.1.min.js"></script> | |
<script src="/bootstrap/js/popper.min.js"></script> | |
<script src="/bootstrap/js/bootstrap.min.js"></script> | |
<script src="/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script> | |
<script src="/plugins/sweetalerts/sweetalert2.min.js"></script> | |
<script src="/plugins/sweetalerts/custom-sweetalert.js"></script> | |
<script src="/plugins/table/datatable/datatables.js"></script> | |
<script src="/assets/js/app.js"></script> | |
<script src="/assets/js/custom.js"></script> | |
<script> | |
let KSP_API_URL = '{{ env('KSP_API_URL') }}'; | |
$(document).ready(function() { | |
App.init(); | |
let access_token = getToken(); | |
if (access_token=='' || access_token==null){ | |
window.location.href = '/'; | |
} | |
}); | |
</script> | |
<!-- END GLOBAL MANDATORY SCRIPTS --> | |
<!-- BEGIN PAGE LEVEL PLUGINS/CUSTOM SCRIPTS --> | |
@yield('customjs') | |
<!-- BEGIN PAGE LEVEL PLUGINS/CUSTOM SCRIPTS --> | |
<script> | |
$(document).ready(function (){ | |
let access_token = getToken(); | |
if (access_token!=''){ | |
$.ajax({ | |
url: KSP_API_URL + "/api/notifications/list", | |
method: "GET", | |
beforeSend: function (xhr) { | |
xhr.setRequestHeader('Authorization', 'Bearer '+access_token); | |
}, | |
success: function (json, msg) { | |
let el = $(".notification-scroll"); | |
let html = ''; | |
for (let i = 0; i < json.data.length; i++) { | |
let row = json.data[i]; | |
html += '<div class="dropdown-item">' + | |
'<div class="media">' + | |
'<div class="media-body">' + | |
'<div class="data-info">' + | |
'<h6 class="">' + json.data.message + '</h6>' + | |
'<p class="">' + json.data.sent_time + '</p>' + | |
'</div>' + | |
'<div class="icon-status">' + | |
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>' + | |
'</div>' + | |
'</div>' + | |
'</div>' + | |
'</div>'; | |
} | |
el.html(html); | |
}, | |
error: function(){ | |
swal({ | |
type: 'error', | |
title: 'Oops...', | |
text: 'server error', | |
}) | |
} | |
}); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment