diff --git a/models/baseModels/AccountingSettings/AccountingSettings.ts b/models/baseModels/AccountingSettings/AccountingSettings.ts index 8e32ad4e..a600f35b 100644 --- a/models/baseModels/AccountingSettings/AccountingSettings.ts +++ b/models/baseModels/AccountingSettings/AccountingSettings.ts @@ -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 = { diff --git a/src/utils/sidebarConfig.ts b/src/utils/sidebarConfig.ts index 7bf43400..64738381 100644 --- a/src/utils/sidebarConfig.ts +++ b/src/utils/sidebarConfig.ts @@ -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',