mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 13:49:13 +00:00
codacy fixes
This commit is contained in:
committed by
Rushabh Mehta
parent
94c6b7409b
commit
e92b4737e3
@@ -19,8 +19,8 @@ QUnit.test("test: Training Event", function (assert) {
|
|||||||
() => cur_frm.set_value("send_email", 0),
|
() => cur_frm.set_value("send_email", 0),
|
||||||
() => frappe.click_button('Add Row'),
|
() => frappe.click_button('Add Row'),
|
||||||
() => {
|
() => {
|
||||||
cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
|
cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
|
||||||
},
|
},
|
||||||
() => frappe.click_button('Save'),
|
() => frappe.click_button('Save'),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => frappe.click_button('Submit'),
|
() => frappe.click_button('Submit'),
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ frappe.ui.form.on('Training Event', {
|
|||||||
var params = getSearchParameters();
|
var params = getSearchParameters();
|
||||||
if (params.hasOwnProperty('employee') && params.hasOwnProperty('status')) {
|
if (params.hasOwnProperty('employee') && params.hasOwnProperty('status')) {
|
||||||
var newTemp = frm.doc.employees.filter(function(obj) {
|
var newTemp = frm.doc.employees.filter(function(obj) {
|
||||||
return obj.name == params.employee
|
return obj.name == params.employee;
|
||||||
});
|
});
|
||||||
if (newTemp) {
|
if (newTemp) {
|
||||||
newTemp[0].status = params.status;
|
newTemp[0].status = params.status;
|
||||||
@@ -42,12 +42,12 @@ function getSearchParameters() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function transformToAssocArray( prmstr ) {
|
function transformToAssocArray( prmstr ) {
|
||||||
var params = {};
|
var params = {};
|
||||||
var prmarr = prmstr.split("&");
|
var prmarr = prmstr.split("&");
|
||||||
for ( var i = 0; i < prmarr.length; i++) {
|
for ( var i = 0; i < prmarr.length; i++) {
|
||||||
var tmparr = prmarr[i].split("=");
|
var tmparr = prmarr[i].split("=");
|
||||||
params[tmparr[0]] = tmparr[1];
|
params[tmparr[0]] = tmparr[1];
|
||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class TrainingEvent(Document):
|
|||||||
if email:
|
if email:
|
||||||
make(subject = subject, content=message,recipients=email,
|
make(subject = subject, content=message,recipients=email,
|
||||||
sender=sender,attachments = attachments, send_email=True,
|
sender=sender,attachments = attachments, send_email=True,
|
||||||
doctype=self.doctype, name=self.name)["name"]
|
doctype=self.doctype, name=self.name)
|
||||||
frappe.msgprint(_("Email sent to {0}").format(data.employee_name))
|
frappe.msgprint(_("Email sent to {0}").format(data.employee_name))
|
||||||
|
|
||||||
def get_attachments(self):
|
def get_attachments(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user