fix: User profle page load
This commit is contained in:
parent
f75b2c98bc
commit
b8fdcdaa20
2 changed files with 6 additions and 7 deletions
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue