fix: Sub-Categpry Routing in Item Group Page Listing pills
- Use absolute route even 3-4 sub-category levels down - Remove scroll from category pills due to accessibility issues - Arrange sub-category pills alphabetically
This commit is contained in:
parent
b03b9ac99f
commit
8264d6b0bc
@ -495,7 +495,7 @@ erpnext.ProductView = class {
|
|||||||
|
|
||||||
categories.forEach(category => {
|
categories.forEach(category => {
|
||||||
sub_group_html += `
|
sub_group_html += `
|
||||||
<a href="${ category.route || '#' }" style="text-decoration: none;">
|
<a href="/${ category.route || '#' }" style="text-decoration: none;">
|
||||||
<div class="category-pill">
|
<div class="category-pill">
|
||||||
${ category.name }
|
${ category.name }
|
||||||
</div>
|
</div>
|
||||||
|
@ -569,15 +569,12 @@ body.product-page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scroll-categories {
|
.scroll-categories {
|
||||||
white-space: nowrap;
|
|
||||||
overflow-x: auto;
|
|
||||||
|
|
||||||
.category-pill {
|
.category-pill {
|
||||||
margin: 0px 4px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 6px 12px;
|
|
||||||
background-color: #ecf5fe;
|
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
padding: 6px 12px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
background-color: #ecf5fe;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
color: var(--blue-500);
|
color: var(--blue-500);
|
||||||
|
@ -132,7 +132,8 @@ def get_child_groups_for_website(item_group_name, immediate=False, include_self=
|
|||||||
return frappe.get_all(
|
return frappe.get_all(
|
||||||
"Item Group",
|
"Item Group",
|
||||||
filters=filters,
|
filters=filters,
|
||||||
fields=["name", "route"]
|
fields=["name", "route"],
|
||||||
|
order_by="name"
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_child_item_groups(item_group_name):
|
def get_child_item_groups(item_group_name):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user