codacy fixes
This commit is contained in:
parent
715780b78b
commit
9505ea93cf
@ -6,7 +6,7 @@ frappe.ui.form.on(cur_frm.doctype, {
|
|||||||
"status": "Active"
|
"status": "Active"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
onload: function(frm){
|
onload: function(frm){
|
||||||
if(frm.doc.__islocal){
|
if(frm.doc.__islocal){
|
||||||
@ -27,7 +27,7 @@ frappe.ui.form.on(cur_frm.doctype, {
|
|||||||
}else if (frm.doctype == "Employee Transfer") {
|
}else if (frm.doctype == "Employee Transfer") {
|
||||||
table = "transfer_details"
|
table = "transfer_details"
|
||||||
}
|
}
|
||||||
if(!table){return}
|
if(!table){return};
|
||||||
cur_frm.fields_dict[table].grid.wrapper.find('.grid-add-row').hide();
|
cur_frm.fields_dict[table].grid.wrapper.find('.grid-add-row').hide();
|
||||||
cur_frm.fields_dict[table].grid.add_custom_button(__('Add Row'), () => {
|
cur_frm.fields_dict[table].grid.add_custom_button(__('Add Row'), () => {
|
||||||
if(!frm.doc.employee){
|
if(!frm.doc.employee){
|
||||||
@ -84,7 +84,7 @@ var show_dialog = function(frm, table, field_labels) {
|
|||||||
d.get_primary_btn().attr('disabled', true);
|
d.get_primary_btn().attr('disabled', true);
|
||||||
d.data = {};
|
d.data = {};
|
||||||
d.show();
|
d.show();
|
||||||
}
|
};
|
||||||
|
|
||||||
var render_dynamic_field = function(d, fieldtype, options, fieldname) {
|
var render_dynamic_field = function(d, fieldtype, options, fieldname) {
|
||||||
d.data.new = null;
|
d.data.new = null;
|
||||||
@ -104,7 +104,7 @@ var render_dynamic_field = function(d, fieldtype, options, fieldname) {
|
|||||||
}).on("awesomplete-close", function(e) {
|
}).on("awesomplete-close", function(e) {
|
||||||
d.data.new = e.target.value;
|
d.data.new = e.target.value;
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var add_to_details = function(frm, d, table) {
|
var add_to_details = function(frm, d, table) {
|
||||||
let data = d.data;
|
let data = d.data;
|
||||||
@ -133,7 +133,7 @@ var add_to_details = function(frm, d, table) {
|
|||||||
}else {
|
}else {
|
||||||
frappe.show_alert({message:__("Value missing"),indicator:'red'});
|
frappe.show_alert({message:__("Value missing"),indicator:'red'});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
var validate_duplicate = function(frm, table, fieldname){
|
var validate_duplicate = function(frm, table, fieldname){
|
||||||
let duplicate = false;
|
let duplicate = false;
|
||||||
@ -144,4 +144,4 @@ var validate_duplicate = function(frm, table, fieldname){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return duplicate;
|
return duplicate;
|
||||||
}
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user