dashboard and patch for lesson

This commit is contained in:
Jannat Patel
2022-03-14 19:07:02 +05:30
34 changed files with 389 additions and 218 deletions

View File

@@ -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"));
}
};