Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Reports.php 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace App\Filament\Company\Pages;
  3. use App\Filament\Company\Pages\Reports\AccountBalances;
  4. use App\Filament\Company\Pages\Reports\AccountTransactions;
  5. use App\Filament\Company\Pages\Reports\BalanceSheet;
  6. use App\Filament\Company\Pages\Reports\CashFlowStatement;
  7. use App\Filament\Company\Pages\Reports\IncomeStatement;
  8. use App\Filament\Company\Pages\Reports\TrialBalance;
  9. use App\Infolists\Components\ReportEntry;
  10. use Filament\Infolists\Components\Section;
  11. use Filament\Infolists\Infolist;
  12. use Filament\Pages\Page;
  13. use Filament\Support\Colors\Color;
  14. class Reports extends Page
  15. {
  16. protected static ?string $navigationIcon = 'heroicon-o-document-chart-bar';
  17. protected static string $view = 'filament.company.pages.reports';
  18. public function reportsInfolist(Infolist $infolist): Infolist
  19. {
  20. return $infolist
  21. ->state([])
  22. ->schema([
  23. Section::make('Financial Statements')
  24. ->aside()
  25. ->description('Key financial statements that provide a snapshot of your company’s financial health.')
  26. ->extraAttributes(['class' => 'es-report-card'])
  27. ->schema([
  28. ReportEntry::make('income_statement')
  29. ->hiddenLabel()
  30. ->heading('Income Statement')
  31. ->description('Tracks revenue and expenses to show profit or loss over a specific period of time.')
  32. ->icon('heroicon-o-chart-bar')
  33. ->iconColor(Color::Indigo)
  34. ->url(IncomeStatement::getUrl()),
  35. ReportEntry::make('balance_sheet')
  36. ->hiddenLabel()
  37. ->heading('Balance Sheet')
  38. ->description('Snapshot of assets, liabilities, and equity at a specific point in time.')
  39. ->icon('heroicon-o-clipboard-document-list')
  40. ->iconColor(Color::Emerald)
  41. ->url(BalanceSheet::getUrl()),
  42. ReportEntry::make('cash_flow_statement')
  43. ->hiddenLabel()
  44. ->heading('Cash Flow Statement')
  45. ->description('Shows cash inflows and outflows over a specific period of time.')
  46. ->icon('heroicon-o-document-currency-dollar')
  47. ->iconColor(Color::Cyan)
  48. ->url(CashFlowStatement::getUrl()),
  49. ]),
  50. Section::make('Detailed Reports')
  51. ->aside()
  52. ->description('Dig into the details of your company’s transactions, balances, and accounts.')
  53. ->extraAttributes(['class' => 'es-report-card'])
  54. ->schema([
  55. ReportEntry::make('account_balances')
  56. ->hiddenLabel()
  57. ->heading('Account Balances')
  58. ->description('Summary view of balances and activity for all accounts.')
  59. ->icon('heroicon-o-currency-dollar')
  60. ->iconColor(Color::Teal)
  61. ->url(AccountBalances::getUrl()),
  62. ReportEntry::make('trial_balance')
  63. ->hiddenLabel()
  64. ->heading('Trial Balance')
  65. ->description('The sum of all debit and credit balances for all accounts on a single day. This helps to ensure that the books are in balance.')
  66. ->icon('heroicon-o-scale')
  67. ->iconColor(Color::Sky)
  68. ->url(TrialBalance::getUrl()),
  69. ReportEntry::make('account_transactions')
  70. ->hiddenLabel()
  71. ->heading('Account Transactions')
  72. ->description('A record of all transactions for a company. The general ledger is the core of a company\'s financial records.')
  73. ->icon('heroicon-o-adjustments-horizontal')
  74. ->iconColor(Color::Amber)
  75. ->url(AccountTransactions::getUrl()),
  76. ]),
  77. ]);
  78. }
  79. }