fix: User profle page load

This commit is contained in:
Suraj Shetty 2020-12-18 18:19:23 +05:30
parent f75b2c98bc
commit b8fdcdaa20
2 changed files with 6 additions and 7 deletions

View file

@ -1,12 +1,6 @@
frappe.pages['user-profile'].on_page_load = function (wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
});
frappe.require('assets/js/user_profile_controller.min.js', () => {
let user_profile = new frappe.ui.UserProfile(wrapper);
user_profile.show();
$(wrapper).bind('show', () => {
user_profile.show();
});
});
};

View file

@ -4,9 +4,14 @@ frappe.provide('frappe.energy_points');
class UserProfile {
constructor(wrapper) {
this.wrapper = $(wrapper);
this.page = wrapper.page;
this.page = frappe.ui.make_app_page({
parent: wrapper,
});
this.sidebar = this.wrapper.find('.layout-side-section');
this.main_section = this.wrapper.find('.layout-main-section');
this.wrapper.bind('show', () => {
this.show();
});
}
show() {