fix: sider and translations issues

This commit is contained in:
Rucha Mahabal 2020-05-13 19:17:51 +05:30
parent 8933e71d90
commit 5a47f2da7f
3 changed files with 4 additions and 8 deletions

View file

@ -17,7 +17,7 @@ context('Control Duration', () => {
}
it('should set duration', () => {
get_dialog_with_duration().as('dialog')
get_dialog_with_duration().as('dialog');
cy.get('.frappe-control[data-fieldname=duration] input')
.first()
.click();

View file

@ -142,10 +142,7 @@ frappe.form.formatters = {
},
DateRange: function(value) {
if($.isArray(value)) {
return __("{0} to {1}", [
frappe.datetime.str_to_user(value[0]),
frappe.datetime.str_to_user(value[1])
]);
return __("{0} to {1}", [frappe.datetime.str_to_user(value[0]), frappe.datetime.str_to_user(value[1])]);
} else {
return value || "";
}
@ -188,7 +185,7 @@ frappe.form.formatters = {
return value || "";
},
Duration: function(value, docfield, doc) {
Duration: function(value, docfield) {
if (value) {
let duration_options = frappe.meta.get_duration_options(docfield);
value = frappe.utils.get_formatted_duration(value, duration_options);

View file

@ -161,8 +161,7 @@ $.extend(frappe.meta, {
if(!out) {
// eslint-disable-next-line
console.log(__('Warning: Unable to find {0} in any table related to {1}', [
key, __(doctype)]));
console.log(__('Warning: Unable to find {0} in any table related to {1}', [key, __(doctype)]));
}
}
return out;