mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-21 10:26:30 +00:00
[hub][fix] Category page api call
This commit is contained in:
@@ -5,15 +5,14 @@ erpnext.hub.Category = class Category extends SubPage {
|
||||
refresh() {
|
||||
this.category = frappe.get_route()[2];
|
||||
this.get_items_for_category(this.category)
|
||||
.then(r => {
|
||||
this.render(r.message);
|
||||
.then(items => {
|
||||
this.render(items);
|
||||
});
|
||||
}
|
||||
|
||||
get_items_for_category(category) {
|
||||
this.$wrapper.find('.hub-card-container').empty();
|
||||
return frappe.call('erpnext.hub_node.api.get_list', {
|
||||
doctype: 'Hub Item',
|
||||
return hub.call('get_items', {
|
||||
filters: {
|
||||
hub_category: category
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user