2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

Added filter to hide gst reports for countries other then India

This commit is contained in:
Piyush Singhania 2021-12-12 17:37:17 +05:30 committed by Alan
parent d652ee800d
commit 65c4faf135

View File

@ -114,6 +114,7 @@ export default {
},
async mounted() {
this.companyName = await sidebarConfig.getTitle();
const { country } = await frappe.getSingle('AccountingSettings');
this.groups = sidebarConfig.groups.filter((group) => {
if (
group.route === '/get-started' &&
@ -124,6 +125,16 @@ export default {
return true;
});
if (country !== 'India') {
this.groups.forEach((group) => {
if (group.title === 'Reports') {
group.items = group.items.filter(
(item) => !item.label.toLowerCase().includes('gst')
);
}
});
}
this.setActiveGroup();
router.afterEach(() => {
this.setActiveGroup();