From 82b9508622ca30221524ca1eb2564ec9d753240e Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Tue, 7 Aug 2018 12:02:14 +0530 Subject: [PATCH] Add Products by Seller --- erpnext/public/js/hub/pages/seller.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/erpnext/public/js/hub/pages/seller.js b/erpnext/public/js/hub/pages/seller.js index 94e83414c7..27b39247ba 100644 --- a/erpnext/public/js/hub/pages/seller.js +++ b/erpnext/public/js/hub/pages/seller.js @@ -1,4 +1,5 @@ import SubPage from './subpage'; +import { get_item_card_container_html } from '../helpers'; erpnext.hub.Seller = class Seller extends SubPage { make_wrapper() { @@ -13,15 +14,9 @@ erpnext.hub.Seller = class Seller extends SubPage { } get_hub_seller_profile() { - return hub.call('get_hub_seller_profile', { company: this.company }); + return hub.call('get_hub_seller_page_info', { 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 = `
@@ -46,8 +41,8 @@ erpnext.hub.Seller = class Seller extends SubPage { this.$wrapper.html(skeleton); } - render(profile) { - const p = profile; + render(data) { + const p = data.profile; const profile_html = `
@@ -81,5 +76,8 @@ erpnext.hub.Seller = class Seller extends SubPage {
`; this.$wrapper.html(profile_html); + + let html = get_item_card_container_html(data.items, __('Products by ' + p.company)); + this.$wrapper.append(html); } }