mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +00:00
feat: hide loyalty program in sidebar when not enabled
This commit is contained in:
parent
9bfcbbfc5e
commit
4ba91f0f20
@ -18,6 +18,7 @@ export class AccountingSettings extends Doc {
|
||||
enableLead?: boolean;
|
||||
enableFormCustomization?: boolean;
|
||||
enableInvoiceReturns?: boolean;
|
||||
enableLoyaltyProgram?: boolean;
|
||||
enablePricingRule?: boolean;
|
||||
|
||||
static filters: FiltersMap = {
|
||||
@ -56,6 +57,9 @@ export class AccountingSettings extends Doc {
|
||||
enableInvoiceReturns: () => {
|
||||
return !!this.enableInvoiceReturns;
|
||||
},
|
||||
enableLoyaltyProgram: () => {
|
||||
return !!this.enableLoyaltyProgram;
|
||||
},
|
||||
};
|
||||
|
||||
override hidden: HiddenMap = {
|
||||
|
@ -202,6 +202,13 @@ function getCompleteSidebar(): SidebarConfig {
|
||||
schemaName: 'Item',
|
||||
filters: routeFilters.SalesItems,
|
||||
},
|
||||
{
|
||||
label: t`Loyalty Program`,
|
||||
name: 'loyalty-program',
|
||||
route: '/list/LoyaltyProgram',
|
||||
schemaName: 'LoyaltyProgram',
|
||||
hidden: () => !fyo.singles.AccountingSettings?.enableLoyaltyProgram,
|
||||
},
|
||||
{
|
||||
label: t`Lead`,
|
||||
name: 'lead',
|
||||
|
Loading…
Reference in New Issue
Block a user