import SubPage from './subpage'; erpnext.hub.Seller = class Seller extends SubPage { make_wrapper() { super.make_wrapper(); } refresh() { this.show_skeleton(); this.company = frappe.get_route()[2]; this.get_hub_seller_profile() .then(this.render.bind(this)); } get_hub_seller_profile() { return hub.call('get_hub_seller_profile', { company: this.company }); } // get_hub_seller_items(profile) { // this.profile = profile; // console.log(profile); // return hub.call('get_items', { hub_seller: profile.user }); // } show_skeleton() { const skeleton = `

Name

Details

Ratings


Desc

Desc

`; this.$wrapper.html(skeleton); } render(profile) { const p = profile; const profile_html = `

${p.company}

${p.country}

${p.site_name}

${__(`Joined ${comment_when(p.creation)}`)}


${'description' ? `

${p.company_description}

` : `

__('No description')

`; this.$wrapper.html(profile_html); } }