fix: translations and route fixes
This commit is contained in:
parent
4bea44b9c9
commit
7a5b9a7bbe
@ -138,7 +138,7 @@ def publish_selected_items(items_to_publish):
|
|||||||
items_to_update.append(item)
|
items_to_update.append(item)
|
||||||
hub_tracked_item = frappe.get_doc('Hub Tracked Item', item_code)
|
hub_tracked_item = frappe.get_doc('Hub Tracked Item', item_code)
|
||||||
hub_tracked_item.update(hub_dict)
|
hub_tracked_item.update(hub_dict)
|
||||||
hub_tracked_items.save()
|
hub_tracked_item.save()
|
||||||
else:
|
else:
|
||||||
frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True)
|
frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True)
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
frappe.route.on('change', () => {
|
frappe.route.on('change', () => {
|
||||||
|
if (frappe.get_route_str() === 'marketplace/home') {
|
||||||
this.get_items();
|
this.get_items();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -205,9 +205,7 @@ export default {
|
|||||||
hub_user: frappe.session.user
|
hub_user: frappe.session.user
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const saved_items_link = `<b><a href="#marketplace/saved-items">${__(
|
const saved_items_link = `<b><a href="#marketplace/saved-items">${__('Saved')}</a></b>`;
|
||||||
'Saved'
|
|
||||||
)}</a></b>`;
|
|
||||||
frappe.show_alert(saved_items_link);
|
frappe.show_alert(saved_items_link);
|
||||||
erpnext.hub.trigger('action:item_save');
|
erpnext.hub.trigger('action:item_save');
|
||||||
})
|
})
|
||||||
@ -223,9 +221,7 @@ export default {
|
|||||||
hub_user: frappe.session.user
|
hub_user: frappe.session.user
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const featured_items_link = `<b><a href="#marketplace/featured-items">${__(
|
const featured_items_link = `<b><a href="#marketplace/featured-items">${__('Added to Featured Items')}</a></b>`;
|
||||||
'Added to Featured Items'
|
|
||||||
)}</a></b>`;
|
|
||||||
frappe.show_alert(featured_items_link);
|
frappe.show_alert(featured_items_link);
|
||||||
erpnext.hub.trigger('action:item_feature');
|
erpnext.hub.trigger('action:item_feature');
|
||||||
})
|
})
|
||||||
@ -309,7 +305,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
unpublish_item() {
|
unpublish_item() {
|
||||||
frappe.confirm(__(`Unpublish ${this.item.item_name}?`), () => {
|
frappe.confirm(__(`Unpublish {0}?`, [this.item.item_name]), () => {
|
||||||
frappe
|
frappe
|
||||||
.call('erpnext.hub_node.api.unpublish_item', {
|
.call('erpnext.hub_node.api.unpublish_item', {
|
||||||
item_code: this.item.item_code,
|
item_code: this.item.item_code,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user