mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
Hide review option for unregistered user
This commit is contained in:
@@ -62,7 +62,9 @@ function get_local_item_card_html(item) {
|
||||
if (rating > 0) {
|
||||
subtitle.push(rating + `<i class='fa fa-fw fa-star-o'></i>`)
|
||||
}
|
||||
if(company_name) {
|
||||
subtitle.push(company_name);
|
||||
}
|
||||
|
||||
let dot_spacer = '<span aria-hidden="true"> · </span>';
|
||||
subtitle = subtitle.join(dot_spacer);
|
||||
@@ -77,7 +79,7 @@ function get_local_item_card_html(item) {
|
||||
<div class="col-md-3 col-sm-4 col-xs-6 hub-card-container">
|
||||
<div class="hub-card is-local ${is_active ? 'active' : ''}" data-id="${id}">
|
||||
<div class="hub-card-header flex">
|
||||
<div>
|
||||
<div class="ellipsis">
|
||||
<div class="hub-card-title ellipsis bold">${title}</div>
|
||||
<div class="hub-card-subtitle ellipsis text-muted">${subtitle}</div>
|
||||
</div>
|
||||
|
||||
@@ -254,8 +254,7 @@ erpnext.hub.Marketplace = class Marketplace {
|
||||
register_seller(form_values) {
|
||||
frappe.call({
|
||||
method: 'erpnext.hub_node.doctype.hub_settings.hub_settings.register_seller',
|
||||
args: form_values,
|
||||
btn: $(e.currentTarget)
|
||||
args: form_values
|
||||
}).then(() => {
|
||||
this.register_dialog.hide();
|
||||
frappe.set_route('marketplace', 'publish');
|
||||
|
||||
@@ -57,7 +57,7 @@ erpnext.hub.Item = class Item extends SubPage {
|
||||
|
||||
|
||||
unpublish_item() {
|
||||
if(!this.unpublish_dialog) {
|
||||
if (!this.unpublish_dialog) {
|
||||
this.unpublish_dialog = new frappe.ui.Dialog({
|
||||
title: "Edit Your Product",
|
||||
fields: []
|
||||
@@ -124,11 +124,19 @@ erpnext.hub.Item = class Item extends SubPage {
|
||||
|
||||
|
||||
make_review_area() {
|
||||
if (hub.settings.registered) {
|
||||
this.comment_area = new frappe.ui.ReviewArea({
|
||||
parent: this.$wrapper.find('.timeline-head').empty(),
|
||||
mentions: [],
|
||||
on_submit: this.on_submit_review.bind(this)
|
||||
});
|
||||
} else {
|
||||
//TODO: fix UI
|
||||
this.comment_area = this.$wrapper
|
||||
.find('.timeline-head')
|
||||
.empty()
|
||||
.append('<div></div>');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user