fix(employee): js error if user does not have write permission for date field (backport #55312) (#55314)

Co-authored-by: Himanshu Jain <118419692+trufurs@users.noreply.github.com>
fix(employee): js error if user does not have write permission for date field (#55312)
This commit is contained in:
mergify[bot]
2026-05-27 01:58:49 +05:30
committed by GitHub
parent 1781893c3c
commit 4dff5a7820

View File

@@ -44,7 +44,7 @@ frappe.ui.form.on("Employee", {
}, },
refresh: function (frm) { refresh: function (frm) {
frm.fields_dict.date_of_birth.datepicker.update({ maxDate: new Date() }); frm.fields_dict.date_of_birth.datepicker?.update({ maxDate: new Date() });
if (!frm.is_new() && !frm.doc.user_id) { if (!frm.is_new() && !frm.doc.user_id) {
frm.add_custom_button(__("Create User"), () => { frm.add_custom_button(__("Create User"), () => {