dashboard and patch for lesson
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
frappe.ready(() => {
|
||||
hide_profile_for_guest_users();
|
||||
hide_profile_and_dashboard_for_guest_users();
|
||||
});
|
||||
|
||||
const hide_profile_for_guest_users = () => {
|
||||
const hide_profile_and_dashboard_for_guest_users = () => {
|
||||
if (frappe.session.user == "Guest") {
|
||||
var link_array = $('.nav-link').filter((i, elem) => $(elem).text().trim() === "My Profile");
|
||||
link_array.length && $(link_array[0]).addClass("hide");
|
||||
let links = $('.nav-link').filter((i, elem) => $(elem).text().trim() === "My Profile" || $(elem).text().trim() === "Dashboard");
|
||||
links.length && links.each((i, elem) => $(elem).addClass("hide"));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user