Add BuyingMessages page

This commit is contained in:
Faris Ansari
2018-08-20 18:33:46 +05:30
parent 8de6380648
commit d17aedb719
7 changed files with 159 additions and 19 deletions

View File

@@ -16,13 +16,6 @@ erpnext.hub.Messages = class Messages extends SubPage {
res.then(([buying_items, selling_items]) => {
this.empty();
if (buying_items.length) {
buying_items.map(item => {
item.route = `marketplace/buy/${item.hub_item_code}`
})
this.render(buying_items, __('Buying'));
}
if (selling_items.length) {
// selling_items.map(item => {
// item.route = `marketplace/sell/${item.hub_item_code}/${}`
@@ -30,6 +23,13 @@ erpnext.hub.Messages = class Messages extends SubPage {
this.render(selling_items, __('Selling'));
}
if (buying_items.length) {
buying_items.map(item => {
item.route = `marketplace/buy/${item.hub_item_code}`
})
this.render(buying_items, __('Buying'));
}
if (!buying_items.length && !selling_items.length) {
this.render_empty_state();
}