You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

detailed-report.blade.php 4.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <table class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5" x-data>
  2. <thead class="divide-y divide-gray-200 dark:divide-white/5">
  3. <tr class="bg-gray-50 dark:bg-white/5">
  4. @foreach($report->getHeaders() as $index => $header)
  5. <th class="px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 {{ $report->getAlignmentClass($index) }}">
  6. <span class="text-sm font-semibold text-gray-950 dark:text-white">
  7. {{ $header }}
  8. </span>
  9. </th>
  10. @endforeach
  11. </tr>
  12. </thead>
  13. @foreach($report->getCategories() as $categoryIndex => $category)
  14. <tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  15. <tr class="bg-gray-50 dark:bg-white/5">
  16. @foreach($category->header as $headerIndex => $header)
  17. <x-filament-tables::cell class="{{ $report->getAlignmentClass($headerIndex) }}">
  18. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  19. {{ $header }}
  20. </div>
  21. </x-filament-tables::cell>
  22. @endforeach
  23. </tr>
  24. @foreach($category->data as $dataIndex => $account)
  25. <tr>
  26. @foreach($account as $cellIndex => $cell)
  27. <x-filament-tables::cell class="{{ $report->getAlignmentClass($cellIndex) }}">
  28. <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
  29. @if(is_array($cell) && isset($cell['name']))
  30. @if(isset($cell['id']) && isset($cell['start_date']) && isset($cell['end_date']))
  31. <x-filament::link
  32. color="primary"
  33. target="_blank"
  34. icon="heroicon-o-arrow-top-right-on-square"
  35. :icon-position="\Filament\Support\Enums\IconPosition::After"
  36. :icon-size="\Filament\Support\Enums\IconSize::Small"
  37. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  38. 'filters[startDate]' => $cell['start_date'],
  39. 'filters[endDate]' => $cell['end_date'],
  40. 'filters[selectedAccount]' => $cell['id']
  41. ]) }}"
  42. >
  43. {{ $cell['name'] }}
  44. </x-filament::link>
  45. @else
  46. {{ $cell['name'] }}
  47. @endif
  48. @else
  49. {{ $cell }}
  50. @endif
  51. </div>
  52. </x-filament-tables::cell>
  53. @endforeach
  54. </tr>
  55. @endforeach
  56. <tr>
  57. @foreach($category->summary as $summaryIndex => $cell)
  58. <x-filament-tables::cell class="{{ $report->getAlignmentClass($summaryIndex) }}">
  59. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  60. {{ $cell }}
  61. </div>
  62. </x-filament-tables::cell>
  63. @endforeach
  64. </tr>
  65. <tr>
  66. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
  67. <div class="px-3 py-2 leading-6 invisible">Hidden Text</div>
  68. </x-filament-tables::cell>
  69. </tr>
  70. </tbody>
  71. @endforeach
  72. <tfoot>
  73. <tr class="bg-gray-50 dark:bg-white/5">
  74. @foreach($report->getOverallTotals() as $index => $total)
  75. <x-filament-tables::cell class="{{ $report->getAlignmentClass($index) }}">
  76. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  77. {{ $total }}
  78. </div>
  79. </x-filament-tables::cell>
  80. @endforeach
  81. </tr>
  82. </tfoot>
  83. </table>