mirror of
https://github.com/frappe/books.git
synced 2024-12-24 11:55:46 +00:00
Added filter to hide gst reports for countries other then India
This commit is contained in:
parent
d652ee800d
commit
65c4faf135
@ -114,6 +114,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.companyName = await sidebarConfig.getTitle();
|
this.companyName = await sidebarConfig.getTitle();
|
||||||
|
const { country } = await frappe.getSingle('AccountingSettings');
|
||||||
this.groups = sidebarConfig.groups.filter((group) => {
|
this.groups = sidebarConfig.groups.filter((group) => {
|
||||||
if (
|
if (
|
||||||
group.route === '/get-started' &&
|
group.route === '/get-started' &&
|
||||||
@ -124,6 +125,16 @@ export default {
|
|||||||
return true;
|
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();
|
this.setActiveGroup();
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
this.setActiveGroup();
|
this.setActiveGroup();
|
||||||
|
Loading…
Reference in New Issue
Block a user