import SubPage from './base_page'; import { get_rating_html } from '../helpers'; erpnext.hub.Item = class Item extends SubPage { make_wrapper() { super.make_wrapper(); this.setup_events(); } refresh() { this.show_skeleton(); this.hub_item_code = frappe.get_route()[2]; this.own_item = false; this.get_item(this.hub_item_code) .then(item => { this.own_item = item.hub_seller === hub.settings.company_email; this.item = item; this.render(item); }); } show_skeleton() { const skeleton = `
Details
Ratings
Desc
Desc
${where}${dot_spacer}${when}
${rating_html} (${rating_count})
${description}
` : `${__('No description')}
` }
${rating_html}
${data.content}