From d249d4c94789416ad6999af7c95906ec983146b7 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Mon, 9 Dec 2019 15:44:31 +0530 Subject: [PATCH] style: change formatting --- .../js/hub/components/item_publish_dialog.js | 42 ++--- erpnext/public/js/hub/pages/Item.vue | 169 +++++++++--------- 2 files changed, 106 insertions(+), 105 deletions(-) diff --git a/erpnext/public/js/hub/components/item_publish_dialog.js b/erpnext/public/js/hub/components/item_publish_dialog.js index 05eaffd1c5..08de5b30b6 100644 --- a/erpnext/public/js/hub/components/item_publish_dialog.js +++ b/erpnext/public/js/hub/components/item_publish_dialog.js @@ -3,24 +3,24 @@ function ItemPublishDialog(primary_action, secondary_action) { title: __('Edit Publishing Details'), fields: [ { - "label": "Item Code", - "fieldname": "item_code", - "fieldtype": "Data", - "read_only": 1 + label: __('Item Code'), + fieldname: 'item_code', + fieldtype: 'Data', + read_only: 1 }, { - "label": "Hub Category", - "fieldname": "hub_category", - "fieldtype": "Autocomplete", - "options": [], - "reqd": 1 + label: __('Hub Category'), + fieldname: 'hub_category', + fieldtype: 'Autocomplete', + options: [], + reqd: 1 }, { - "label": "Images", - "fieldname": "image_list", - "fieldtype": "MultiSelect", - "options": [], - "reqd": 1 + label: __('Images'), + fieldname: 'image_list', + fieldtype: 'MultiSelect', + options: [], + reqd: 1 } ], primary_action_label: primary_action.label || __('Set Details'), @@ -28,16 +28,12 @@ function ItemPublishDialog(primary_action, secondary_action) { secondary_action: secondary_action.fn }); - hub.call('get_categories') - .then(categories => { - categories = categories.map(d => d.name); - dialog.fields_dict.hub_category.df.options = categories; - dialog.fields_dict.hub_category.set_options(); - }); + hub.call('get_categories').then(categories => { + categories = categories.map(d => d.name); + dialog.fields_dict.hub_category.set_data(categories); + }); return dialog; } -export { - ItemPublishDialog -} +export { ItemPublishDialog }; diff --git a/erpnext/public/js/hub/pages/Item.vue b/erpnext/public/js/hub/pages/Item.vue index 285f696926..e4b0eeaecb 100644 --- a/erpnext/public/js/hub/pages/Item.vue +++ b/erpnext/public/js/hub/pages/Item.vue @@ -1,10 +1,5 @@