Fix admin menu icon placeholder: load CSS globally

- Created view/adminhtml/layout/default.xml to load vendor-report.css on all admin pages
- Updated menu.xml formatting and added dependsOnModule attribute
- This ensures the CSS rules that hide the menu icon placeholder are applied globally

The rectangle/box appearing next to the menu item was caused by the CSS
not being loaded on the admin menu navigation. The default.xml layout file
ensures the CSS loads everywhere in the admin, properly hiding the icon.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shopkeeperdev
2025-11-04 19:55:08 -05:00
parent 5cddfe2bca
commit 92b301883f
2 changed files with 14 additions and 7 deletions

View File

@@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu> <menu>
<add id="Shopkeeper_VendorSalesReport::report" <add id="Shopkeeper_VendorSalesReport::report"
title="Vendor Sales Report" title="Vendor Sales Report"
module="Shopkeeper_VendorSalesReport" module="Shopkeeper_VendorSalesReport"
sortOrder="999" sortOrder="999"
parent="Magento_Reports::report_salesroot" parent="Magento_Reports::report_salesroot"
action="vendorsalesreport/report/index" action="vendorsalesreport/report/index"
resource="Shopkeeper_VendorSalesReport::report"/> resource="Shopkeeper_VendorSalesReport::report"
dependsOnModule="Shopkeeper_VendorSalesReport"/>
</menu> </menu>
</config> </config>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Shopkeeper_VendorSalesReport::css/vendor-report.css"/>
</head>
</page>