Skip to content
Snippets Groups Projects
Commit 1d2feda3 authored by Alifioditya's avatar Alifioditya
Browse files

fix: top nav for admin

parent 6af0a9c8
No related merge requests found
// Change the topnav-page-text to the current page
document.getElementById("topnav-page-text").innerHTML = "Catalogue";
const admin_info = document.getElementById("is-admin");
let is_admin = false;
if (admin_info) {
is_admin = (admin_info.innerText == 1);
}
if (is_admin) {
document.getElementById("topnav-page-text").innerHTML = "Catalogue Control";
} else {
document.getElementById("topnav-page-text").innerHTML = "Catalogue";
}
// Change the topnav-page-icon to the current page, delete the old icon classes and add the new icon classes
let topnavPageIcon = document.getElementById("topnav-page-icon");
......
......@@ -17,8 +17,6 @@ if (adminInfo) {
isAdmin = (adminInfo.innerText == 1);
}
console.log(isAdmin);
// Initialize variables to store selected filter values
let queryValue = searchBar.value.trim();
let selectedCategory = "All Categories";
......
// Change the topnav-page-text to the current page
document.getElementById("topnav-page-text").innerHTML = "User List";
document.getElementById("topnav-page-text").innerHTML = "User Control";
// Change the topnav-page-icon to the current page, delete the old icon classes and add the new icon classes
let topnavPageIcon = document.getElementById("topnav-page-icon");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment