fix: translations and route fixes

This commit is contained in:
Mangesh-Khairnar 2019-12-24 17:39:15 +05:30
parent 4bea44b9c9
commit 7a5b9a7bbe
3 changed files with 7 additions and 9 deletions

View File

@ -138,7 +138,7 @@ def publish_selected_items(items_to_publish):
items_to_update.append(item)
hub_tracked_item = frappe.get_doc('Hub Tracked Item', item_code)
hub_tracked_item.update(hub_dict)
hub_tracked_items.save()
hub_tracked_item.save()
else:
frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True)

View File

@ -60,7 +60,9 @@ export default {
},
mounted() {
frappe.route.on('change', () => {
this.get_items();
if (frappe.get_route_str() === 'marketplace/home') {
this.get_items();
}
})
},
methods: {

View File

@ -205,9 +205,7 @@ export default {
hub_user: frappe.session.user
})
.then(() => {
const saved_items_link = `<b><a href="#marketplace/saved-items">${__(
'Saved'
)}</a></b>`;
const saved_items_link = `<b><a href="#marketplace/saved-items">${__('Saved')}</a></b>`;
frappe.show_alert(saved_items_link);
erpnext.hub.trigger('action:item_save');
})
@ -223,9 +221,7 @@ export default {
hub_user: frappe.session.user
})
.then(() => {
const featured_items_link = `<b><a href="#marketplace/featured-items">${__(
'Added to Featured Items'
)}</a></b>`;
const featured_items_link = `<b><a href="#marketplace/featured-items">${__('Added to Featured Items')}</a></b>`;
frappe.show_alert(featured_items_link);
erpnext.hub.trigger('action:item_feature');
})
@ -309,7 +305,7 @@ export default {
},
unpublish_item() {
frappe.confirm(__(`Unpublish ${this.item.item_name}?`), () => {
frappe.confirm(__(`Unpublish {0}?`, [this.item.item_name]), () => {
frappe
.call('erpnext.hub_node.api.unpublish_item', {
item_code: this.item.item_code,