chore: format employee_property_update.js

This commit is contained in:
Rucha Mahabal 2022-04-22 17:25:37 +05:30
parent ed04241cf4
commit 788e0a1c6c

View File

@ -31,7 +31,7 @@ frappe.ui.form.on(cur_frm.doctype, {
return;
frm.fields_dict[table].grid.wrapper.find(".grid-add-row").hide();
frm.events.setup_employee_property_button(frm, table)
frm.events.setup_employee_property_button(frm, table);
},
setup_employee_property_button: function(frm, table) {
@ -59,7 +59,7 @@ frappe.ui.form.on(cur_frm.doctype, {
}
});
show_dialog(frm, table, allowed_fields)
show_dialog(frm, table, allowed_fields);
});
});
}
@ -127,12 +127,12 @@ var add_to_details = function(frm, d, table) {
let data = d.data;
if (data.fieldname) {
if (validate_duplicate(frm, table, data.fieldname)) {
frappe.show_alert({message:__("Property already added"), indicator:'orange'});
frappe.show_alert({message: __("Property already added"), indicator: "orange"});
return false;
}
if (data.current == data.new) {
frappe.show_alert({message:__("Nothing to change"), indicator:'orange'});
d.get_primary_btn().attr('disabled', false);
frappe.show_alert({message: __("Nothing to change"), indicator: "orange"});
d.get_primary_btn().attr("disabled", false);
return false;
}
frm.add_child(table, {
@ -148,10 +148,10 @@ var add_to_details = function(frm, d, table) {
d.fields_dict.new_value.$wrapper.html("");
d.set_value("property", "");
d.set_value("current", "");
frappe.show_alert({message:__("Added to details"), indicator:'green'});
frappe.show_alert({message: __("Added to details"), indicator: "green"});
d.data = {};
} else {
frappe.show_alert({message:__("Value missing"),indicator:'red'});
frappe.show_alert({message: __("Value missing"), indicator: "red"});
}
};