fix: Sider and Patches

- Sider fixes
- Deleted patches that worked as per old schema
- Cleared instances of web fields linked to Item master
This commit is contained in:
marination
2021-05-17 21:27:42 +05:30
parent 6a802f354b
commit a0bbe7fea7
14 changed files with 23 additions and 105 deletions

View File

@@ -27,7 +27,7 @@ erpnext.ProductGrid = class {
html += me.get_image_html(item, title);
html += me.get_card_body_html(item, title, me.settings);
html += `</div></div>`;
})
});
let $product_wrapper = this.products_section;
$product_wrapper.append(html);
@@ -36,7 +36,7 @@ erpnext.ProductGrid = class {
get_image_html(item, title) {
let image = item.website_image || item.image;
if(image) {
if (image) {
return `
<div class="card-img-container">
<a href="/${ item.route || '#' }" style="text-decoration: none;">
@@ -85,11 +85,11 @@ erpnext.ProductGrid = class {
<div class="product-title">
${ title || '' }
`;
if (item.in_stock) {
if (item.in_stock && settings.show_stock_availability) {
title_html += `<span class="indicator ${ item.in_stock } card-indicator"></span>`;
}
title_html += `</div></a>`;
return title_html
return title_html;
}
get_wishlist_icon(item) {
@@ -145,4 +145,4 @@ erpnext.ProductGrid = class {
`;
}
}
}
};