1
0
Files
bigcapital/packages/webapp/src/constants/abilityOption.tsx
T
Ahmed Bouhuolia b6a2c97f9f feat(assets): implement asset management with depreciation
Add comprehensive asset management system with depreciation tracking similar to Xero.

Features:
- Create and manage fixed assets with purchase details
- Calculate depreciation using straight-line and declining balance methods
- Track asset book value and accumulated depreciation
- Dispose/sell assets with gain/loss calculations
- Automatic depreciation schedule generation
- Integration with chart of accounts for depreciation entries

Database:
- Add assets table with purchase and depreciation fields
- Add asset_depreciation_entries table for schedule tracking
- Add accumulated depreciation account to seed data

Server-side:
- Assets module with CRUD operations
- Depreciation calculation service
- Asset disposal service with gain/loss tracking
- REST API endpoints with permission guards

Frontend:
- Assets list page with data table
- Asset form with purchase and depreciation sections
- React Query hooks for API integration
- Sidebar navigation under Accounting

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 20:09:14 +02:00

213 lines
4.3 KiB
TypeScript

// @ts-nocheck
export const AbilitySubject = {
Item: 'Item',
InventoryAdjustment: 'InventoryAdjustment',
Estimate: 'SaleEstimate',
Invoice: 'SaleInvoice',
Receipt: 'SaleReceipt',
PaymentReceive: 'PaymentReceive',
Bill: 'Bill',
PaymentMade: 'PaymentMade',
Customer: 'Customer',
Vendor: 'Vendor',
Account: 'Account',
ManualJournal: 'ManualJournal',
Expense: 'Expense',
Cashflow: 'Cashflow',
Report: 'Report',
Preferences: 'Preferences',
ExchangeRate: 'ExchangeRate',
SubscriptionBilling: 'SubscriptionBilling',
CreditNote: 'CreditNote',
VendorCredit: 'VendorCredit',
Project: 'Project',
TaxRate: 'TaxRate',
BankRule: 'BankRule',
Asset: 'Asset',
};
export const ItemAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const InventoryAdjustmentAction = {
Create: 'Create',
Edit: 'Edit',
View: 'View',
Delete: 'Delete',
};
export const SaleEstimateAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const SaleInvoiceAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Writeoff: 'bad-debt',
NotifyBySms: 'NotifyBySms',
};
export const SaleReceiptAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const PaymentReceiveAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const CreditNoteAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Refund: 'Refund',
};
export const VendorCreditAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Refund: 'Refund',
};
export const BillAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const PaymentMadeAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const CustomerAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const VendorAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const AccountAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
TransactionsLocking: 'TransactionsLocking',
};
export const ManualJournalAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
TransactionLocking: 'TransactionLocking',
};
export const ExpenseAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const CashflowAction = {
View: 'View',
Create: 'Create',
Delete: 'Delete',
};
export const ProjectAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const ReportsAction = {
ALL: 'all',
READ_BALANCE_SHEET: 'read-balance-sheet',
READ_TRIAL_BALANCE_SHEET: 'read-trial-balance-sheet',
READ_PROFIT_LOSS: 'read-profit-loss',
READ_JOURNAL: 'read-journal',
READ_GENERAL_LEDGET: 'read-general-ledger',
READ_CASHFLOW: 'read-cashflow',
READ_AR_AGING_SUMMARY: 'read-ar-aging-summary',
READ_AP_AGING_SUMMARY: 'read-ap-aging-summary',
READ_PURCHASES_BY_ITEMS: 'read-purchases-by-items',
READ_SALES_BY_ITEMS: 'read-sales-by-items',
READ_CUSTOMERS_TRANSACTIONS: 'read-customers-transactions',
READ_VENDORS_TRANSACTIONS: 'read-vendors-transactions',
READ_CUSTOMERS_SUMMARY_BALANCE: 'read-customers-summary-balance',
READ_VENDORS_SUMMARY_BALANCE: 'read-vendors-summary-balance',
READ_INVENTORY_VALUATION_SUMMARY: 'read-inventory-valuation-summary',
READ_INVENTORY_ITEM_DETAILS: 'read-inventory-item-details',
READ_CASHFLOW_ACCOUNT_TRANSACTION: 'read-cashflow-account-transactions',
READ_SALES_TAX_LIABILITY_SUMMARY: 'read-sales-tax-liability-summary',
};
export const PreferencesAbility = {
Mutate: 'Mutate',
};
export const ExchangeRateAbility = {
View: 'view',
Create: 'create',
Delete: 'delete',
};
export const SubscriptionBillingAbility = {
View: 'view',
Payment: 'payment',
};
export const TaxRateAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const BankRuleAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const AssetAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};