style: Linting fixes

This commit is contained in:
Aditya Hase 2019-01-16 21:52:10 +05:30
parent 4c436b97f9
commit f805a2f4bb
6 changed files with 8 additions and 13 deletions

View file

@ -9,7 +9,7 @@ frappe.pages['dashboard'].on_page_load = function(wrapper) {
$(wrapper).bind('show', function() {
frappe.dashboard.show();
});
}
};
class Dashboard {
constructor(wrapper) {
@ -45,7 +45,7 @@ class Dashboard {
let dashboard_chart = new DashboardChart(chart_doc, chart_container);
dashboard_chart.show();
});
})
});
}
get_dashboard_doc() {
@ -103,11 +103,11 @@ class DashboardChart {
this.update_chart_object();
this.data = data;
this.render();
})
});
});
}
d.hide();
}
};
this.filter_fields.map(field => field.onchange = e => {
if(e) {
@ -124,10 +124,10 @@ class DashboardChart {
this.update_chart_object();
this.data = data;
this.render();
})
});
}
}
]
];
this.chart_actions = $(`<div class="chart-actions btn-group dropdown pull-right">
<a class="dropdown-toggle" data-toggle="dropdown"
@ -171,8 +171,7 @@ class DashboardChart {
};
if(!this.chart) {
this.chart = new Chart(this.chart_container.find(".chart-wrapper")[0], chart_args);
}
else {
} else {
this.chart.update(this.data);
}
}

View file

@ -3,6 +3,6 @@
frappe.ui.form.on('Dashboard', {
refresh: function(frm) {
frm.add_custom_button(__("Show Dashboard"), () => frappe.set_route('dashboard', frm.doc.name))
frm.add_custom_button(__("Show Dashboard"), () => frappe.set_route('dashboard', frm.doc.name));
}
});

View file

@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Dashboard(Document):

View file

@ -3,7 +3,6 @@
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestDashboard(unittest.TestCase):

View file

@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class DashboardChart(Document):

View file

@ -3,7 +3,6 @@
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestDashboardChart(unittest.TestCase):