mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
update the hidden property for sidebar gstr reports
This commit is contained in:
parent
3f8e058066
commit
3bdbdbb73a
@ -131,7 +131,8 @@ export default {
|
||||
if (group.items) {
|
||||
group.items = await group.items.reduce(async (acc, item) => {
|
||||
if (item.hidden) {
|
||||
const hidden = await item.hidden();
|
||||
// async methods can also be used in future
|
||||
const hidden = item.hidden();
|
||||
if (hidden) {
|
||||
return acc;
|
||||
} else {
|
||||
|
@ -98,18 +98,12 @@ const config = {
|
||||
{
|
||||
label: _('GSTR1'),
|
||||
route: '/report/gstr-1',
|
||||
hidden: async () => {
|
||||
const { country } = await frappe.getSingle('AccountingSettings');
|
||||
return country !== 'India';
|
||||
},
|
||||
hidden: () => frappe.AccountingSettings.country !== 'India',
|
||||
},
|
||||
{
|
||||
label: _('GSTR2'),
|
||||
route: '/report/gstr-2',
|
||||
hidden: async () => {
|
||||
const { country } = await frappe.getSingle('AccountingSettings');
|
||||
return country !== 'India';
|
||||
},
|
||||
hidden: () => frappe.AccountingSettings.country !== 'India',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user