321 lines
17 KiB
PHP
321 lines
17 KiB
PHP
<!Doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
|
|
<title>CMS-Laravel</title>
|
|
|
|
<!-- CSS Dependencies -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.7/css/dataTables.bootstrap5.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="{{ asset('css/custom.css') }}">
|
|
<link rel="icon" type="image/png" href="{{ asset('img/favicon_unioil.ico') }}">
|
|
|
|
@stack('styles')
|
|
</head>
|
|
|
|
<body>
|
|
<div class="wrapper">
|
|
<div class="body-overlay"></div>
|
|
|
|
@php
|
|
$memberManagement = ['card-member', 'locked-accounts'];
|
|
$homePage = ['photo-slider'];
|
|
$aboutUs = ['card-types', 'terms-and-privacy'];
|
|
$reports = ['registration-report', 'top-up-usage-report', 'mobile-usage-report', 'station-rating-report'];
|
|
$stationLocator = ['branches', 'stations', 'fuels'];
|
|
$fuelPriceUpdate = ['fuel-price-on-demand', 'fuel-price-schedule', 'fuel-price-update-logs'];
|
|
@endphp
|
|
|
|
<!-- Sidebar -->
|
|
<nav id="sidebar">
|
|
<div class="sidebar-header">
|
|
<h3><img src="img/logo.png" class="img-fluid" /><span></span></h3>
|
|
</div>
|
|
|
|
<ul class="list-unstyled components">
|
|
<!-- Static Items -->
|
|
<li class="{{ Request::is('user-management') ? 'active' : '' }}">
|
|
<a href="{{ route('user.management') }}" class="dashboard" style="display:flex">
|
|
<i class="fa-solid fa-users" style="padding-top:3px"></i><span>User Management</span>
|
|
</a>
|
|
</li>
|
|
<li class="{{ Request::is('notification') ? 'active' : '' }}">
|
|
<a href="{{ route('notification') }}" class="dashboard" style="display:flex">
|
|
<i class="fa-solid fa-bell" style="padding-top:3px"></i><span>Notifications</span>
|
|
</a>
|
|
</li>
|
|
|
|
<!-- Member Management -->
|
|
<li class="dropdown {{ in_array(Request::path(), $memberManagement) ? 'active' : '' }}">
|
|
<a href="#homeSubmenu1" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $memberManagement) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-users-gear" style="padding-top:3px"></i><span>Member Management</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $memberManagement) ? 'show' : '' }}"
|
|
id="homeSubmenu1">
|
|
<li class="{{ Request::is('card-member') ? 'active' : '' }}">
|
|
<a href="{{ route('card-member') }}">Card Member</a>
|
|
</li>
|
|
<li class="{{ Request::is('locked-accounts') ? 'active' : '' }}">
|
|
<a href="{{ route('locked-accounts') }}">Locked Accounts</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Home Page -->
|
|
<li class="dropdown {{ in_array(Request::path(), $homePage) ? 'active' : '' }}">
|
|
<a href="#pageSubmenu2" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $homePage) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-mobile-screen" style="padding-top:3px"></i><span>Home Page (Mobile)</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $homePage) ? 'show' : '' }}"
|
|
id="pageSubmenu2">
|
|
<li class="{{ Request::is('photo-slider') ? 'active' : '' }}">
|
|
<a href="{{ route('photo-slider') }}">Photo Slider</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Static -->
|
|
<li class="{{ Request::is('promotions') ? 'active' : '' }}">
|
|
<a href="{{ route('promotions') }}" class="dashboard" style="display:flex">
|
|
<i class="fa-solid fa-tag" style="padding-top:3px"></i><span>Promotions</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="{{ Request::is('top-up') ? 'active' : '' }}">
|
|
<a href="{{ route('top-up') }}" class="dashboard" style="display:flex">
|
|
<i class="fa-solid fa-wallet" style="padding-top:3px"></i><span>Top-Up</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="{{ Request::is('top-up-settings') ? 'active' : '' }}">
|
|
<a href="{{ route('top-up-settings') }}" class="dashboard" style="display:flex">
|
|
<i class="fa-solid fa-cog" style="padding-top:3px"></i><span>Top Up Settings</span>
|
|
</a>
|
|
</li>
|
|
|
|
<!-- About Us -->
|
|
<li class="dropdown {{ in_array(Request::path(), $aboutUs) ? 'active' : '' }}">
|
|
<a href="#pageSubmenu3" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $aboutUs) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-circle-info" style="padding-top:3px"></i><span>About Us</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $aboutUs) ? 'show' : '' }}"
|
|
id="pageSubmenu3">
|
|
<li class="{{ Request::is('card-types') ? 'active' : '' }}">
|
|
<a href="{{ route('card-types') }}">Card Types</a>
|
|
</li>
|
|
<li class="{{ Request::is('terms-and-privacy') ? 'active' : '' }}">
|
|
<a href="{{ route('terms-and-privacy') }}">Terms & Privacy</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Reports -->
|
|
<li class="dropdown {{ in_array(Request::path(), $reports) ? 'active' : '' }}">
|
|
<a href="#pageSubmenu4" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $reports) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-chart-column" style="padding-top:3px"></i><span>Reports</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $reports) ? 'show' : '' }}"
|
|
id="pageSubmenu4">
|
|
<li class="{{ Request::is('registration-report') ? 'active' : '' }}">
|
|
<a href="{{ route('registration-report') }}">Registration Report</a>
|
|
</li>
|
|
<li class="{{ Request::is('top-up-usage-report') ? 'active' : '' }}">
|
|
<a href="{{ route('top-up-usage-report') }}">Top-Up Usage Report</a>
|
|
</li>
|
|
<li class="{{ Request::is('mobile-usage-report') ? 'active' : '' }}">
|
|
<a href="{{ route('mobile-usage-report') }}">Mobile Usage Report</a>
|
|
</li>
|
|
<li class="{{ Request::is('station-rating-report') ? 'active' : '' }}">
|
|
<a href="{{ route('station-rating-report') }}">Station Rating Report</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Static -->
|
|
<li class="{{ Request::is('system-parameters') ? 'active' : '' }}">
|
|
<a href="{{ route('system-parameters') }}" style="display:flex">
|
|
<i class="fa-solid fa-sliders" style="padding-top:3px"></i><span>System Parameters</span>
|
|
</a>
|
|
</li>
|
|
|
|
<!-- Fuel Price Update -->
|
|
<li class="dropdown {{ in_array(Request::path(), $fuelPriceUpdate) ? 'active' : '' }}">
|
|
<a href="#pageSubmenu6" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $fuelPriceUpdate) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-gas-pump" style="padding-top:3px"></i><span>Fuel Price Update</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $fuelPriceUpdate) ? 'show' : '' }}"
|
|
id="pageSubmenu6">
|
|
<li class="{{ Request::is('fuel-price-on-demand') ? 'active' : '' }}">
|
|
<a href="{{ route('fuel-price-on-demand') }}">On-Demand</a>
|
|
</li>
|
|
<li class="{{ Request::is('fuel-price-schedule') ? 'active' : '' }}">
|
|
<a href="{{ route('fuel-price-schedule') }}">Schedule</a>
|
|
</li>
|
|
<li class="{{ Request::is('fuel-price-update-logs') ? 'active' : '' }}">
|
|
<a href="{{ route('fuel-price-update-logs') }}">Update Logs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<!-- Station Locator -->
|
|
<li class="dropdown {{ in_array(Request::path(), $stationLocator) ? 'active' : '' }}">
|
|
<a href="#pageSubmenu5" data-toggle="collapse"
|
|
aria-expanded="{{ in_array(Request::path(), $stationLocator) ? 'true' : 'false' }}"
|
|
class="dropdown-toggle" style="display:flex">
|
|
<i class="fa-solid fa-location-dot" style="padding-top:3px"></i><span>Station Locator</span>
|
|
</a>
|
|
<ul class="collapse list-unstyled menu {{ in_array(Request::path(), $stationLocator) ? 'show' : '' }}"
|
|
id="pageSubmenu5">
|
|
<li class="{{ Request::is('branches') ? 'active' : '' }}">
|
|
<a href="{{ route('branches') }}">Branches</a>
|
|
</li>
|
|
<li class="{{ Request::is('stations') ? 'active' : '' }}">
|
|
<a href="{{ route('stations') }}">Stations</a>
|
|
</li>
|
|
<li class="{{ Request::is('fuels') ? 'active' : '' }}">
|
|
<a href="{{ route('fuels') }}">Fuels</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<!-- Page Content -->
|
|
<div id="content">
|
|
<div class="top-navbar">
|
|
<nav class="navbar navbar-expand-lg" style="background-color:rgba(231, 70, 16, 0.84)">
|
|
<div class="container-fluid">
|
|
<button type="button" id="sidebarCollapse" class="d-xl-block d-lg-block d-md-none d-none">
|
|
<span class="fa-solid fa-arrow-left"></span>
|
|
</button>
|
|
<button class="d-inline-block d-lg-none ml-auto more-button" type="button"
|
|
data-toggle="collapse" data-target="#navbarSupportedContent"
|
|
aria-controls="navbarSupportedContent" aria-expanded="false"
|
|
aria-label="Toggle navigation">
|
|
<i class="fas fa-ellipsis-v"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse d-lg-block d-xl-block d-sm-none d-md-none d-none"
|
|
id="navbarSupportedContent">
|
|
<ul class="nav navbar-nav ml-auto">
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle d-flex align-items-center gap-2" href="#"
|
|
role="button" data-toggle="dropdown">
|
|
<span style="margin-right:5px">{{ $user['admin']['username'] ?? 'Guest' }}</span>
|
|
<i class="fa-solid fa-user-circle" style="padding-right:5px"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-sm">
|
|
<li style="margin-right:5px">
|
|
<a class="dropdown-item d-flex align-items-center gap-2"
|
|
href="{{ route('my-profile') }}">
|
|
<i class="fa-solid fa-user" style="font-size:16px; color:gray;"></i>
|
|
<span style="margin-left:5px">My Profile</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<form action="{{ route('logout') }}" method="POST">
|
|
@csrf
|
|
<button type="submit" class="dropdown-item d-flex align-items-center gap-2 logout-btn">
|
|
<i class="fa-solid fa-right-from-bracket" style="font-size:16px; color:gray;"></i>
|
|
<span style="margin-left:5px;color:black">Logout</span>
|
|
</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
<div class="main-content container-xxl">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card" style="min-height: 500px;">
|
|
<div class="card-header">
|
|
@yield('content')
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Footer -->
|
|
<footer class="bg-light py-3 mt-4">
|
|
<div class="container text-center">
|
|
<p class="mb-0 text-muted" style="font-family: 'Roboto', sans-serif; font-size: 0.9rem;">
|
|
All Rights Reserved © {{ date('Y') }} Unioil CMS
|
|
</p>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- JavaScript Dependencies -->
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.13.7/js/dataTables.bootstrap5.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.20.0/dist/jquery.validate.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
|
|
|
<!-- Initialize global settings -->
|
|
<script>
|
|
// Set up CSRF token for all AJAX requests
|
|
$.ajaxSetup({
|
|
headers: {
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
}
|
|
});
|
|
|
|
// Configure toastr notifications
|
|
toastr.options = {
|
|
closeButton: true,
|
|
progressBar: true,
|
|
positionClass: 'toast-top-right',
|
|
timeOut: 3000
|
|
};
|
|
|
|
// Initialize Bootstrap tooltips and popovers
|
|
$(function () {
|
|
$('[data-bs-toggle="tooltip"]').tooltip();
|
|
$('[data-bs-toggle="popover"]').popover();
|
|
});
|
|
|
|
// Sidebar toggle functionality
|
|
$(document).ready(function() {
|
|
$('#sidebarCollapse').on('click', function() {
|
|
$('#sidebar').toggleClass('active');
|
|
$('#content').toggleClass('active');
|
|
});
|
|
|
|
$('.more-button,.body-overlay').on('click', function() {
|
|
$('#sidebar,.body-overlay').toggleClass('show-nav');
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@stack('scripts')
|
|
</body>
|
|
</html> |