feat: add employee number to client user bootinfo (#38477)
This commit is contained in:
@@ -75,3 +75,11 @@ def update_page_info(bootinfo):
|
||||
"Sales Person Tree": {"title": "Sales Person Tree", "route": "Tree/Sales Person"},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def bootinfo(bootinfo):
|
||||
if bootinfo.get("user") and bootinfo["user"].get("name"):
|
||||
bootinfo["user"]["employee"] = ""
|
||||
employee = frappe.db.get_value("Employee", {"user_id": bootinfo["user"]["name"]}, "name", cache=True)
|
||||
if employee:
|
||||
bootinfo["user"]["employee"] = employee
|
||||
|
||||
Reference in New Issue
Block a user