From d3da401ef4b21356a58b5646aec22132ba819a0b Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Mon, 6 Aug 2018 18:31:26 +0530 Subject: [PATCH] Home: Category-wise Items --- erpnext/public/js/hub/pages/home.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/hub/pages/home.js b/erpnext/public/js/hub/pages/home.js index 6a49f6265b..b8e6f01fd7 100644 --- a/erpnext/public/js/hub/pages/home.js +++ b/erpnext/public/js/hub/pages/home.js @@ -37,5 +37,15 @@ erpnext.hub.Home = class Home extends SubPage { html = get_item_card_container_html(data.items_by_country, __('Near you')); this.$wrapper.append(html); } + + const category_items = data.category_items; + + if (category_items) { + Object.keys(category_items).map(category => { + const items = category_items[category]; + html = get_item_card_container_html(items, __(category)); + this.$wrapper.append(html); + }); + } } -} \ No newline at end of file +}