Skip to content

Commit

Permalink
chore: format employee_property_update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal committed Apr 22, 2022
1 parent ed04241 commit b2528b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions erpnext/hr/employee_property_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ frappe.ui.form.on(cur_frm.doctype, {
});
},

onload: function(frm){
onload: function(frm) {
if (frm.doc.__islocal) {
if (frm.doctype == "Employee Promotion") {
frm.clear_table("promotion_details");
Expand All @@ -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) {
Expand Down Expand Up @@ -59,7 +59,7 @@ frappe.ui.form.on(cur_frm.doctype, {
}
});

show_dialog(frm, table, allowed_fields)
show_dialog(frm, table, allowed_fields);
});
});
}
Expand Down Expand Up @@ -91,7 +91,7 @@ var show_dialog = function(frm, table, field_labels) {
method: 'erpnext.hr.utils.get_employee_field_property',
args: {employee: frm.doc.employee, fieldname: property},
callback: function(r) {
if(r.message){
if (r.message) {
d.data.current = r.message.value;
d.data.property = r.message.label;

Expand Down Expand Up @@ -126,13 +126,13 @@ var render_dynamic_field = function(d, fieldtype, options, fieldname) {
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'});
if (validate_duplicate(frm, table, data.fieldname)) {
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);
if (data.current == data.new) {
frappe.show_alert({message: __("Nothing to change"), indicator: "orange"});
d.get_primary_btn().attr("disabled", false);
return false;
}
frm.add_child(table, {
Expand Down

0 comments on commit b2528b5

Please sign in to comment.