From 4cb0a250a0045cb3e912237b57eb46f5c6c13cc3 Mon Sep 17 00:00:00 2001 From: karthikeyan5 Date: Thu, 24 Jan 2019 19:12:21 +0530 Subject: [PATCH] fix(marketplace): bug in filtering menu_items > UX improvment for incomplete feature --- erpnext/public/js/hub/pages/Item.vue | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/erpnext/public/js/hub/pages/Item.vue b/erpnext/public/js/hub/pages/Item.vue index 7735aa2337..8dbd397a8e 100644 --- a/erpnext/public/js/hub/pages/Item.vue +++ b/erpnext/public/js/hub/pages/Item.vue @@ -53,7 +53,20 @@ export default { image: null, sections: [], - menu_items: [ + }; + }, + computed: { + is_own_item() { + let is_own_item = false; + if(this.item) { + if(this.item.hub_seller === hub.settings.hub_seller_name) { + is_own_item = true; + } + } + return is_own_item; + }, + menu_items(){ + return [ { label: __('Save Item'), condition: hub.is_user_registered() && !this.is_own_item, @@ -75,17 +88,6 @@ export default { action: this.unpublish_item } ] - }; - }, - computed: { - is_own_item() { - let is_own_item = false; - if(this.item) { - if(this.item.hub_seller === hub.settings.hub_seller_name) { - is_own_item = true; - } - } - return is_own_item; }, item_subtitle() { @@ -272,11 +274,11 @@ export default { }, edit_details() { - // + frappe.msgprint(__('This feature is under development...')); }, unpublish_item() { - // + frappe.msgprint(__('This feature is under development...')); } } }