Merge pull request #14410 from pratu16x7/hub-fixes

Hub fixes
This commit is contained in:
Prateeksha Singh 2018-06-07 14:19:01 +05:30 committed by GitHub
commit 50ae6b891b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ erpnext.hub.HubDetailsPage = class HubDetailsPage extends frappe.views.BaseList
super.setup_defaults();
this.method = 'erpnext.hub_node.get_details';
const route = frappe.get_route();
this.page_name = route[2];
// this.page_name = route[2];
}
setup_fields() {
@ -325,7 +325,7 @@ erpnext.hub.ItemPage = class ItemPage extends erpnext.hub.HubDetailsPage {
}
setup_side_bar() {
this.setup_side_bar();
super.setup_side_bar();
this.attachFooter();
this.attachTimeline();
this.attachReviewArea();
@ -359,6 +359,11 @@ erpnext.hub.ItemPage = class ItemPage extends erpnext.hub.HubDetailsPage {
}, 'octicon octicon-plus');
}
prepare_data(r) {
super.prepare_data(r);
this.page.set_title(this.data["item_name"]);
}
make_rfq(item, supplier, btn) {
console.log(supplier);
return new Promise((resolve, reject) => {
@ -467,7 +472,6 @@ erpnext.hub.ItemPage = class ItemPage extends erpnext.hub.HubDetailsPage {
erpnext.hub.CompanyPage = class CompanyPage extends erpnext.hub.HubDetailsPage {
constructor(opts) {
super(opts);
this.show();
}
@ -477,6 +481,11 @@ erpnext.hub.CompanyPage = class CompanyPage extends erpnext.hub.HubDetailsPage {
this.image_field_name = 'company_logo';
}
prepare_data(r) {
super.prepare_data(r);
this.page.set_title(this.data["company_name"]);
}
getFormFields() {
let fieldnames = ['company_name', 'description', 'route', 'country', 'seller', 'site_name'];;
this.formFields = this.prepareFormFields(this.meta.fields, fieldnames);