Updated styles and Added storageManager.
- Dark/White-mode support - Collapsible navs - Renamed items template. - StorageBuilding's are now StorageUnit's - Formatting, general cleanup, some bug fixing.
This commit is contained in:
@ -5,20 +5,18 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">SKU</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">SKU</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% it.items.forEach(function(user){ %>
|
||||
<tr>
|
||||
<th scope="row"><%= user.id %></th>
|
||||
<td><%= user.SKU %></td>
|
||||
<td><%= user.name %></td>
|
||||
<td><span class="badge text-bg-success"><%= user.status %></span></td>
|
||||
<td><%= user.SKU %></td>
|
||||
<td><a href="#" class="btn btn-primary">Edit</a></td>
|
||||
</tr>
|
||||
<% }) %>
|
75
src/frontend/manage/storageManager.eta.html
Normal file
75
src/frontend/manage/storageManager.eta.html
Normal file
@ -0,0 +1,75 @@
|
||||
<%~ E.includeFile("../partials/head.eta.html", {"title": "Settings - Storage Manager"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "SETT_STORE"}) %>
|
||||
|
||||
<h1>Storages</h1>
|
||||
<ul class="nav nav-underline" id="storageTabList" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button
|
||||
class="nav-link active"
|
||||
id="storage-loc-tab"
|
||||
data-bs-toggle="tab"
|
||||
data-bs-target="#storage-loc-tab-pane"
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-controls="storage-loc-tab-pane"
|
||||
aria-selected="true">
|
||||
<i class="bi bi-bookshelf"></i> Storage Location
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button
|
||||
class="nav-link"
|
||||
id="storage-unit-tab"
|
||||
data-bs-toggle="tab"
|
||||
data-bs-target="#storage-unit-tab-pane"
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-controls="storage-unit-tab-pane"
|
||||
aria-selected="false">
|
||||
<i class="bi bi-buildings"></i> Storage Unit
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="storageTabListContent">
|
||||
<div class="tab-pane fade show active" id="storage-loc-tab-pane" role="tabpanel" aria-labelledby="storage-loc-tab-pane" tabindex="0">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="/settings/category/new" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#createNewStorageLocationModal"><i class="bi bi-plus-lg"></i> Create new Location</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">LocId</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Storage Unit</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="storage-unit-tab-pane" role="tabpanel" aria-labelledby="storage-unit-tab-pane" tabindex="0">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="/settings/category/new" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#createNewStorageUnitModal"><i class="bi bi-building-add"></i> Create new unit</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Address</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/editStorages.js"></script>
|
||||
|
||||
<%~ E.includeFile("../partials/controlsFoot.eta.html") %> <%~ E.includeFile("../partials/foot.eta.html") %>
|
@ -10,12 +10,9 @@
|
||||
aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<input class="form-control form-control-dark w-100 bg-secondary" type="text" placeholder="Search" aria-label="Search" id="SearchBox" />
|
||||
<div class="autocomplete-items bg-secondary w-75 border-primary me-5 p-2" id="autocomplete-items" style="left: 16.7%">
|
||||
|
||||
</div>
|
||||
|
||||
<input class="form-control form-control-dark w-100 bg-secondary" type="text" placeholder="Search" aria-label="Search" id="SearchBox" />
|
||||
<div class="autocomplete-items bg-secondary w-75 border-primary me-5 p-2" id="autocomplete-items" style="left: 16.7%"></div>
|
||||
|
||||
<div class="navbar-nav">
|
||||
<div class="nav-item text-nowrap">
|
||||
@ -24,60 +21,59 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<div class="toast-container position-fixed bottom-0 end-0 p-3 ">
|
||||
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
||||
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
<strong class="me-auto">Notification</strong>
|
||||
<small>Just now</small>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="toast-body" id="toastText">
|
||||
The button you just pressed is very useless.
|
||||
</div>
|
||||
<div class="toast-body" id="toastText">The button you just pressed is very useless.</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
let texti = 0;
|
||||
alltexts = ["Nope, still useless", "Stop pressing me!", "There are NO USERS!", "Please stop.", "PLEASE!"];
|
||||
const toastLiveExample = document.getElementById('liveToast')
|
||||
const logoutButton = document.getElementById('logoutButton')
|
||||
alltexts = ['Nope, still useless', 'Stop pressing me!', 'There are NO USERS!', 'Please stop.', 'PLEASE!'];
|
||||
const toastLiveExample = document.getElementById('liveToast');
|
||||
const logoutButton = document.getElementById('logoutButton');
|
||||
logoutButton.addEventListener('click', () => {
|
||||
toastFunction();
|
||||
texti++;
|
||||
if(texti >= alltexts.length) texti = 0;
|
||||
})
|
||||
if (texti >= alltexts.length) texti = 0;
|
||||
});
|
||||
|
||||
function toastFunction() {
|
||||
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample)
|
||||
toastBootstrap.show()
|
||||
setTimeout(function(){ toastBootstrap.hide(); document.getElementById("toastText").innerHTML = alltexts[texti] }, 3000);
|
||||
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample);
|
||||
toastBootstrap.show();
|
||||
setTimeout(function () {
|
||||
toastBootstrap.hide();
|
||||
document.getElementById('toastText').innerHTML = alltexts[texti];
|
||||
}, 3000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
|
||||
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block sidebar collapse">
|
||||
<div class="position-sticky pt-3">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'Dashboard' ? 'active' : ''%>" aria-current="page" href="/"> <i class="bi bi-house"></i> Dashboard </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'AllItems' ? 'active' : ''%>"" href="/items"> <i class="bi bi-list-ul"></i> All Items </a>
|
||||
<a class="nav-link <%= it.active == 'AllItems' ? 'active' : ''%>" href="/items"> <i class="bi bi-list-ul"></i> All Items </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>"" href="#"> Products </a>
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>" href="#"> Products </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>"" href="#"> Customers </a>
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>" href="#"> Customers </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>"" href="#"> Reports </a>
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>" href="#"> Reports </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>"" href="#"> Integrations </a>
|
||||
<a class="nav-link <%= it.active == 'placeholder' ? 'active' : ''%>" href="#"> Integrations </a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -96,12 +92,39 @@
|
||||
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Settings</span>
|
||||
</h6>
|
||||
|
||||
<!--
|
||||
<ul class="nav flex-column mb-4"></ul>
|
||||
-->
|
||||
|
||||
<ul class="nav flex-column mb-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'SETT_CAT' ? 'active' : ''%>" href="/manage/categories"><i class="bi bi-tag"></i> Manage categories </a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="nav-link <%= it.active == 'SETT_STORE' ? 'active' : ''%>" href="/manage/storages"
|
||||
><i class="bi bi-box-seam"></i> Manage storages
|
||||
<span
|
||||
class="<%= it.active == 'SETT_STORE' ? 'active' : ''%>"
|
||||
type="button"
|
||||
onclick="return false"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapseSettingsStorages"
|
||||
aria-expanded="<%= it.active == 'SETT_STORE' ? 'true' : 'false'%>"
|
||||
aria-controls="collapseSettingsStorages">
|
||||
<i class="bi bi-caret-down-fill"></i>
|
||||
<!-- TODO: This little triangle does not care if it is collapsed or not. But it should so -->
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="collapse <%= it.active == 'SETT_STORE' ? 'show' : ''%>" id="collapseSettingsStorages">
|
||||
<a class="nav-link ms-4" href="/manage/storages#storage-loc-tab"><i class="bi bi-bookshelf"></i> Manage locations </a>
|
||||
<a class="nav-link ms-4" href="/manage/storages#storage-unit-tab"><i class="bi bi-buildings"></i> Manage units </a>
|
||||
</div>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= it.active == 'SETT_CAT' ? 'active' : ''%>" href="/manage/categories"><i class="bi bi-tag"></i> Manage categories </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4" style="min-height: 100%;">
|
||||
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4" style="min-height: 100%">
|
||||
<!-- The main tag needs to be left open! -->
|
||||
|
@ -1,5 +1,3 @@
|
||||
<script src="/static/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/static/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -12,9 +12,34 @@
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
|
||||
<script src="/static/jquery/dist/jquery.min.js"></script>
|
||||
<link href="/static/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||
<link href="/css/dashboard.css" rel="stylesheet">
|
||||
|
||||
<link href="/static/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="/static/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet" />
|
||||
<link href="/css/dashboard.css" rel="stylesheet" />
|
||||
<script src="/static/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/static/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||
<script>
|
||||
// Listen for changes in the prefers-color-scheme media query and update the "data-bs-theme" attribute on the <html> element.
|
||||
|
||||
(function () {
|
||||
const currentTheme = localStorage.getItem('bs.theme') ?? 'auto';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const isLight = currentTheme === 'light';
|
||||
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const prefersLight = window.matchMedia('(prefers-color-scheme: light)').matches;
|
||||
|
||||
if (currentTheme === 'auto') {
|
||||
if (prefersDark) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
} else if (prefersLight) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light');
|
||||
}
|
||||
} else if (isDark) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
} else if (isLight) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user