feat: ability home page option.

This commit is contained in:
elforjani13
2021-11-24 14:09:24 +02:00
parent aef8eb7907
commit 553334f063

View File

@@ -1,5 +1,20 @@
import React from 'react'; import React from 'react';
import { FormattedMessage as T } from 'components'; 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 = [ export const accountsReceivable = [
{ {
@@ -9,21 +24,29 @@ export const accountsReceivable = [
title: <T id={'sales_invoices'} />, title: <T id={'sales_invoices'} />,
description: <T id={'tracking_sales_invoices_with_your_customers'} />, description: <T id={'tracking_sales_invoices_with_your_customers'} />,
link: '/invoices', link: '/invoices',
subject: AbilitySubject.Invoice,
ability: Invoice_Abilities.View,
}, },
{ {
title: <T id={'sales_estimates'} />, title: <T id={'sales_estimates'} />,
description: <T id={'manage_your_sales_estimates_to_create_quotes'} />, description: <T id={'manage_your_sales_estimates_to_create_quotes'} />,
link: '/estimates', link: '/estimates',
subject: AbilitySubject.Estimate,
ability: Estimate_Abilities.View,
}, },
{ {
title: <T id={'sales_receipts'} />, title: <T id={'sales_receipts'} />,
description: <T id={'manage_sales_receipts_for_sales_that_get_paid'} />, description: <T id={'manage_sales_receipts_for_sales_that_get_paid'} />,
link: '/receipts', link: '/receipts',
subject: AbilitySubject.Receipt,
ability: Receipt_Abilities.View,
}, },
{ {
title: <T id={'customers'} />, title: <T id={'customers'} />,
description: <T id={'manage_the_customers_relations_with_customer'} />, description: <T id={'manage_the_customers_relations_with_customer'} />,
link: '/customers', link: '/customers',
subject: AbilitySubject.Customer,
ability: Customer_Abilities.View,
}, },
{ {
title: <T id={'customers_payments'} />, title: <T id={'customers_payments'} />,
@@ -31,6 +54,8 @@ export const accountsReceivable = [
<T id={'manage_payment_transactions_from_your_customers'} /> <T id={'manage_payment_transactions_from_your_customers'} />
), ),
link: '/payment-receives', link: '/payment-receives',
subject: AbilitySubject.PaymentReceive,
ability: Payment_Receive_Abilities.View,
}, },
], ],
}, },
@@ -46,6 +71,8 @@ export const accountsPayable = [
<T id={'manage_the_purchase_invoices_with_your_vendors'} /> <T id={'manage_the_purchase_invoices_with_your_vendors'} />
), ),
link: '/bills', link: '/bills',
subject: AbilitySubject.Bill,
ability: Bill_Abilities.View,
}, },
{ {
title: <T id={'vendors'} />, title: <T id={'vendors'} />,
@@ -53,11 +80,15 @@ export const accountsPayable = [
<T id={'manage_the_vendors_relations_with_vendor_relations'} /> <T id={'manage_the_vendors_relations_with_vendor_relations'} />
), ),
link: '/vendors', link: '/vendors',
subject: AbilitySubject.Vendor,
ability: Vendor_Abilities.View,
}, },
{ {
title: <T id={'vendors_payments'} />, title: <T id={'vendors_payments'} />,
description: <T id={'manage_payments_transactions_to_your_vendors'} />, description: <T id={'manage_payments_transactions_to_your_vendors'} />,
link: '/payment-mades', link: '/payment-mades',
subject: AbilitySubject.PaymentMade,
ability: Payment_Made_Abilities.View,
}, },
], ],
}, },
@@ -77,20 +108,32 @@ export const financialAccounting = [
/> />
), ),
link: '/accounts', link: '/accounts',
subject: AbilitySubject.Account,
ability: Account_Abilities.View,
}, },
{ {
title: <T id={'manual_journal'}/>, title: <T id={'manual_journal'} />,
description:<T id={'manage_manual_journal_transactions_on_accounts'}/>, description: (
<T id={'manage_manual_journal_transactions_on_accounts'} />
),
link: '/manual-journals', link: '/manual-journals',
subject: AbilitySubject.ManualJournal,
ability: Manual_Journal_Abilities.View,
}, },
{ {
title: <T id={'expenses'}/>, title: <T id={'expenses'} />,
description:<T id={'track_your_indirect_expenses_under_specific_categories'}/>, description: (
<T id={'track_your_indirect_expenses_under_specific_categories'} />
),
link: '/expenses', link: '/expenses',
subject: AbilitySubject.Expense,
ability: Expense_Abilities.View,
}, },
{ {
title: <T id={'financial_statements'}/>, title: <T id={'financial_statements'} />,
description:<T id={'show_financial_reports_about_your_organization'}/>, description: (
<T id={'show_financial_reports_about_your_organization'} />
),
link: '/financial-reports', link: '/financial-reports',
}, },
], ],
@@ -102,19 +145,27 @@ export const productsServices = [
sectionTitle: <T id={'products_services_inventory'} />, sectionTitle: <T id={'products_services_inventory'} />,
shortcuts: [ shortcuts: [
{ {
title: <T id={'products_services'}/>, title: <T id={'products_services'} />,
description:<T id={'manage_your_products_inventory_or_non_inventory'}/>, description: (
<T id={'manage_your_products_inventory_or_non_inventory'} />
),
link: '/items', link: '/items',
subject: AbilitySubject.Item,
ability: Item_Abilities.View,
}, },
{ {
title: <T id={'products_services_categories'}/>, title: <T id={'products_services_categories'} />,
description:<T id={'group_your_products_and_service'}/>, description: <T id={'group_your_products_and_service'} />,
link: 'items/categories', link: 'items/categories',
}, },
{ {
title: <T id={'inventory_adjustments'}/>, title: <T id={'inventory_adjustments'} />,
description: <T id={'manage_your_inventory_adjustment_of_inventory_items'}/>, description: (
<T id={'manage_your_inventory_adjustment_of_inventory_items'} />
),
link: '/inventory-adjustments', link: '/inventory-adjustments',
subject: AbilitySubject.Inventory_Adjustment,
ability: Invoice_Abilities.View,
}, },
], ],
}, },