Hello, ERPNext World!
In erpnext, each employee activity is shown on the employee page (below comments area)
In my project, I make some fast testing in Leave Application doctype by this user. Then I delete it.
My question is how can I delete this information(timeline items) from employee page
Thanks all
1 Like
@OmarJaber
You cannot delete the activities. But you can hide that particular âToolsâ module for your users.
Sorry, Its not working
It still there !
@OmarJaber
This is not possible as of now. Can you please create a GitHub issue for this?
1 Like
rogger
December 11, 2019, 3:13am
5
Is there any guide available to hide this timeline activity from Employees?
rogger
December 11, 2019, 10:05pm
7
Is there any custom script to hide it?
yes, yo can include any js file in hook
app_icon = "fa fa-barcode"
app_color = "#800000"
app_email = "support@mntechnique.com"
app_license = "GPL v3"
# Includes in <head>
# ------------------
# include js, css files in header of desk.html
app_include_css = "/assets/css/jmi.min.css"
app_include_js = "/assets/js/jmi.min.js"
# include js, css files in header of web template
# web_include_css = "/assets/jmi_erpnext/css/jmi_erpnext.css"
# web_include_js = "/assets/jmi_erpnext/js/jmi_erpnext.js"
# include js in page
page_js = {
"pos" : "public/js/pos_page_js.js",
"point-of-sale" : "public/js/pos_page_js.js"
}
then add this jqueary code inside the js file
$(".timeline").hide()
rogger
December 12, 2019, 9:53am
9
awesome @OmarJaber How can I disable this script for site admin only? Currently, I put this inside the custom script.
frappe.ui.form.on(âEmployeeâ, {
refresh(frm) {
// your $(function() {
$(â.timelineâ).hide(); // or .remove();
}
})
you can check if current session user is admin then pass
rogger
December 24, 2019, 2:05am
11
Hi @OmarJaber . Thanks for reply. Where do I have to check this option?