mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: Sider and Tests
This commit is contained in:
@@ -26,7 +26,6 @@ $(() => {
|
||||
{fieldname: "comment", fieldtype: "Small Text", label: "Your Review"}
|
||||
],
|
||||
primary_action: function() {
|
||||
let me = this;
|
||||
let data = d.get_values();
|
||||
frappe.call({
|
||||
method: "erpnext.e_commerce.doctype.item_review.item_review.add_item_review",
|
||||
@@ -39,7 +38,7 @@ $(() => {
|
||||
freeze: true,
|
||||
freeze_message: __("Submitting Review ..."),
|
||||
callback: (r) => {
|
||||
if(!r.exc) {
|
||||
if (!r.exc) {
|
||||
frappe.msgprint({
|
||||
message: __("Thank you for submitting your review"),
|
||||
title: __("Review Submitted"),
|
||||
@@ -74,7 +73,7 @@ $(() => {
|
||||
end: me.page_length
|
||||
},
|
||||
callback: (result) => {
|
||||
if(result.message) {
|
||||
if (result.message) {
|
||||
let res = result.message;
|
||||
me.get_user_review_html(res.reviews);
|
||||
|
||||
@@ -85,7 +84,7 @@ $(() => {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
@@ -121,7 +120,7 @@ $(() => {
|
||||
|
||||
get_review_stars(rating) {
|
||||
let stars = ``;
|
||||
for(let i = 1; i < 6; i++) {
|
||||
for (let i = 1; i < 6; i++) {
|
||||
let fill_class = i <= rating ? 'star-click' : '';
|
||||
stars += `<svg class="icon icon-md ${fill_class}">
|
||||
<use href="#icon-star"></use>
|
||||
|
||||
@@ -19,7 +19,7 @@ def get_context(context):
|
||||
"warehouse": item.get("warehouse")
|
||||
},
|
||||
"actual_qty")
|
||||
)
|
||||
)
|
||||
item.available = True if stock_qty else False
|
||||
|
||||
context.items = items
|
||||
@@ -34,5 +34,5 @@ def get_wishlist_items():
|
||||
from
|
||||
`tabWishlist Items`
|
||||
where
|
||||
parent=%(user)s"""%{"user": frappe.db.escape(frappe.session.user)}, as_dict=1)
|
||||
parent=%(user)s""" % {"user": frappe.db.escape(frappe.session.user)}, as_dict=1)
|
||||
return
|
||||
Reference in New Issue
Block a user