Hello,
In the holiday list doctype, there is a grid table in which the last column is for edit and settings. Employees are able to edit the total number of columns that are displayed. I want to hide whether globally or for a specific role doesn’t matter. Are there any solutions to this?
Thanks
NCP
March 30, 2022, 11:55am
#2
Hi @erpnxt_user ,
So apply Role Permission Manager for Holiday list and set only system manager can Read, Write, Create and Delete it.
And for all Employee or another user for set like:
Thank You!
1 Like
NCP
March 30, 2022, 12:17pm
#3
And using script for hidden some button like:
frappe.ui.form.on('Holiday List', {
refresh:function(frm, cdt, cdn){
cur_frm.fields_dict['holidays'].grid.wrapper.find('.grid-remove-rows').hide();
cur_frm.fields_dict['holidays'].grid.wrapper.find('.grid-add-row').hide();
cur_frm.fields_dict['holidays'].grid.wrapper.find('.btn-open-row').hide();
cur_frm.fields_dict['holidays'].grid.wrapper.find('.grid-pagination').hide();
}
});
Thank You!
1 Like
Hi @NCP
Thanks everything works great but my main problem was this box:
I’ve already set permission but employees are still able to change this by clicking on that setting button.
Thanks
NCP
March 31, 2022, 5:10am
#7
Hi @erpnxt_user ,
Please check it.
frappe.ui.form.on('Holiday List', {
refresh:function(frm, cdt, cdn) {
cur_frm.fields_dict['holidays'].grid.wrapper.find('div.d-flex').css({'visibility':'hidden'});
}
});
Thank You!
1 Like