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.

account-transactions.blade.php 3.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <table class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5">
  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 wire:key="header-{{ $index }}" 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 wire:key="category-{{ $categoryIndex }}" class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  15. <!-- Category Header -->
  16. <tr class="bg-gray-50 dark:bg-white/5">
  17. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}" class="text-left">
  18. <div class="px-3 py-2">
  19. <div class="text-sm font-semibold text-gray-950 dark:text-white">
  20. {{ $category->header[0]['value'] }}
  21. </div>
  22. <div class="text-sm text-gray-700 dark:text-gray-300">
  23. {{ $category->header[1]['value'] }}
  24. </div>
  25. </div>
  26. </x-filament-tables::cell>
  27. </tr>
  28. <!-- Transactions Data -->
  29. @foreach($category->data as $dataIndex => $transaction)
  30. <tr wire:key="category-{{ $categoryIndex }}-data-{{ $dataIndex }}"
  31. @class([
  32. 'bg-gray-50 dark:bg-white/5' => $loop->first || $loop->last || $loop->remaining === 1,
  33. ])>
  34. @foreach($transaction as $cellIndex => $cell)
  35. <x-filament-tables::cell wire:key="category-{{ $categoryIndex }}-data-{{ $dataIndex }}-cell-{{ $cellIndex }}" class="{{ $report->getAlignmentClass($cellIndex) }}">
  36. <div
  37. @class([
  38. 'px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white',
  39. 'font-semibold' => $loop->parent->first || $loop->parent->last || $loop->parent->remaining === 1,
  40. ])>
  41. {{ $cell }}
  42. </div>
  43. </x-filament-tables::cell>
  44. @endforeach
  45. </tr>
  46. @endforeach
  47. <!-- Spacer Row -->
  48. @unless($loop->last)
  49. <tr wire:key="category-{{ $categoryIndex }}-spacer">
  50. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
  51. <div class="px-3 py-2 leading-6 invisible">Hidden Text</div>
  52. </x-filament-tables::cell>
  53. </tr>
  54. @endunless
  55. </tbody>
  56. @endforeach
  57. @if (filled($report->getOverallTotals()))
  58. <tfoot>
  59. <tr class="bg-gray-50 dark:bg-white/5">
  60. @foreach($report->getOverallTotals() as $index => $total)
  61. <x-filament-tables::cell wire:key="footer-total-{{ $index }}" class="{{ $report->getAlignmentClass($index) }}">
  62. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  63. {{ $total }}
  64. </div>
  65. </x-filament-tables::cell>
  66. @endforeach
  67. </tr>
  68. </tfoot>
  69. @endif
  70. </table>