diff --git a/src/common/homepageOptions.js b/src/common/homepageOptions.js index 82972db3a..6f61b7172 100644 --- a/src/common/homepageOptions.js +++ b/src/common/homepageOptions.js @@ -1,5 +1,20 @@ import React from 'react'; import { FormattedMessage as T } from 'components'; +import { + Invoice_Abilities, + Estimate_Abilities, + AbilitySubject, + Receipt_Abilities, + Customer_Abilities, + Payment_Receive_Abilities, + Bill_Abilities, + Vendor_Abilities, + Payment_Made_Abilities, + Account_Abilities, + Manual_Journal_Abilities, + Expense_Abilities, + Item_Abilities, +} from '../common/abilityOption'; export const accountsReceivable = [ { @@ -9,21 +24,29 @@ export const accountsReceivable = [ title: , description: , link: '/invoices', + subject: AbilitySubject.Invoice, + ability: Invoice_Abilities.View, }, { title: , description: , link: '/estimates', + subject: AbilitySubject.Estimate, + ability: Estimate_Abilities.View, }, { title: , description: , link: '/receipts', + subject: AbilitySubject.Receipt, + ability: Receipt_Abilities.View, }, { title: , description: , link: '/customers', + subject: AbilitySubject.Customer, + ability: Customer_Abilities.View, }, { title: , @@ -31,6 +54,8 @@ export const accountsReceivable = [ ), link: '/payment-receives', + subject: AbilitySubject.PaymentReceive, + ability: Payment_Receive_Abilities.View, }, ], }, @@ -46,6 +71,8 @@ export const accountsPayable = [ ), link: '/bills', + subject: AbilitySubject.Bill, + ability: Bill_Abilities.View, }, { title: , @@ -53,11 +80,15 @@ export const accountsPayable = [ ), link: '/vendors', + subject: AbilitySubject.Vendor, + ability: Vendor_Abilities.View, }, { title: , description: , link: '/payment-mades', + subject: AbilitySubject.PaymentMade, + ability: Payment_Made_Abilities.View, }, ], }, @@ -77,20 +108,32 @@ export const financialAccounting = [ /> ), link: '/accounts', + subject: AbilitySubject.Account, + ability: Account_Abilities.View, }, { - title: , - description:, + title: , + description: ( + + ), link: '/manual-journals', + subject: AbilitySubject.ManualJournal, + ability: Manual_Journal_Abilities.View, }, { - title: , - description:, + title: , + description: ( + + ), link: '/expenses', + subject: AbilitySubject.Expense, + ability: Expense_Abilities.View, }, { - title: , - description:, + title: , + description: ( + + ), link: '/financial-reports', }, ], @@ -102,19 +145,27 @@ export const productsServices = [ sectionTitle: , shortcuts: [ { - title: , - description:, + title: , + description: ( + + ), link: '/items', + subject: AbilitySubject.Item, + ability: Item_Abilities.View, }, { - title: , - description:, + title: , + description: , link: 'items/categories', }, { - title: , - description: , + title: , + description: ( + + ), link: '/inventory-adjustments', + subject: AbilitySubject.Inventory_Adjustment, + ability: Invoice_Abilities.View, }, ], },