diff --git a/erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py b/erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py index 0b6b2bc8a8..e981b2dc45 100644 --- a/erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py +++ b/erpnext/hub_node/data_migration_mapping/item_to_hub_item/__init__.py @@ -2,18 +2,18 @@ import frappe, io, base64, urllib, os def pre_process(doc): - # file_path = doc.image - # file_name = os.path.basename(file_path) + file_path = doc.image + file_name = os.path.basename(file_path) - # if file_path.startswith('http'): - # url = file_path - # file_path = os.path.join('/tmp', file_name) - # urllib.urlretrieve(url, file_path) + if file_path.startswith('http'): + url = file_path + file_path = os.path.join('/tmp', file_name) + urllib.urlretrieve(url, file_path) - # with io.open(file_path, 'rb') as f: - # doc.image = base64.b64encode(f.read()) + with io.open(file_path, 'rb') as f: + doc.image = base64.b64encode(f.read()) - # doc.image_file_name = file_name + doc.image_file_name = file_name cached_details = frappe.get_doc('Hub Tracked Item', doc.item_code) diff --git a/erpnext/public/js/hub/pages/profile.js b/erpnext/public/js/hub/pages/profile.js index a57bc7ceec..9bfa85d7a6 100644 --- a/erpnext/public/js/hub/pages/profile.js +++ b/erpnext/public/js/hub/pages/profile.js @@ -102,6 +102,8 @@ erpnext.hub.Profile = class Profile extends SubPage { on_submit: this.update_profile.bind(this) } ); + + this.edit_profile_dialog.set_df_property('company_email', 'read_only', 1); } edit_profile() { diff --git a/erpnext/public/js/hub/pages/publish.js b/erpnext/public/js/hub/pages/publish.js index 98b0a61845..9c5fc24c5b 100644 --- a/erpnext/public/js/hub/pages/publish.js +++ b/erpnext/public/js/hub/pages/publish.js @@ -13,9 +13,6 @@ erpnext.hub.Publish = class Publish extends SubPage { this.fetched_items = []; this.fetched_items_dict = {}; - this.cache = erpnext.hub.cache.items_to_publish; - this.cache = []; - frappe.realtime.on("items-sync", (data) => { this.$wrapper.find('.progress-bar').css('width', data.progress_percent+'%'); @@ -110,6 +107,7 @@ erpnext.hub.Publish = class Publish extends SubPage { } update_items_data_to_publish(values) { + // Add item additional data this.items_data_to_publish[values.item_code] = values; } @@ -249,6 +247,7 @@ erpnext.hub.Publish = class Publish extends SubPage { item_codes_to_publish.push($(this).attr("data-id")); }); + // Retrieve item data const items_data_to_publish = item_codes_to_publish.map(item_code => this.items_data_to_publish[item_code]) return frappe.call( diff --git a/erpnext/public/less/hub.less b/erpnext/public/less/hub.less index 88076c0593..286e3be10f 100644 --- a/erpnext/public/less/hub.less +++ b/erpnext/public/less/hub.less @@ -50,6 +50,7 @@ body[data-route^="marketplace/"] { margin-top: 0px; margin-bottom: 15px; background-color: #f9fbf7; + border-radius: 4px; justify-content: space-between; } @@ -131,6 +132,8 @@ body[data-route^="marketplace/"] { .hub-card-overlay-button { position: absolute; + right: 15px; + bottom: 15px; } .hub-card-image { @@ -215,6 +218,7 @@ body[data-route^="marketplace/"] { height: 80px; border-radius: 4px; border: 1px solid @border-color; + border-style: dashed; margin: 15px 0px; }