選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

account-transactions.blade.php 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @php
  2. use App\Models\Accounting\Bill;
  3. use App\Filament\Company\Resources\Accounting\TransactionResource;
  4. use App\Filament\Company\Resources\Purchases\BillResource\Pages\ViewBill;
  5. use App\Filament\Company\Resources\Sales\InvoiceResource\Pages\ViewInvoice;
  6. $iconPosition = \Filament\Support\Enums\IconPosition::After;
  7. @endphp
  8. <table class="w-full table-auto min-w-[50rem] divide-y divide-gray-200 dark:divide-white/5">
  9. <x-company.tables.header :headers="$report->getHeaders()" :alignmentClass="[$report, 'getAlignmentClass']"/>
  10. @foreach($report->getCategories() as $categoryIndex => $category)
  11. <tbody class="divide-y divide-gray-200 dark:divide-white/5">
  12. <!-- Category Header -->
  13. <tr class="bg-gray-50 dark:bg-white/5">
  14. <x-filament-tables::cell tag="th" colspan="{{ count($report->getHeaders()) }}" class="text-left">
  15. <div class="px-3 py-3.5">
  16. @foreach ($category->header as $headerRow)
  17. <div
  18. class="text-sm {{ $loop->first ? 'font-semibold text-gray-950 dark:text-white' : 'font-normal text-gray-500 dark:text-white/50' }}">
  19. @foreach ($headerRow as $headerValue)
  20. @if (!empty($headerValue))
  21. {{ $headerValue }}
  22. @endif
  23. @endforeach
  24. </div>
  25. @endforeach
  26. </div>
  27. </x-filament-tables::cell>
  28. </tr>
  29. <!-- Transactions Data -->
  30. @foreach($category->data as $dataIndex => $transaction)
  31. <tr
  32. @class([
  33. 'bg-gray-50 dark:bg-white/5' => $loop->first || $loop->last || $loop->remaining === 1,
  34. ])
  35. >
  36. @foreach($transaction as $cellIndex => $cell)
  37. <x-filament-tables::cell
  38. @class([
  39. $report->getAlignmentClass($cellIndex),
  40. 'whitespace-normal' => $cellIndex === 1,
  41. ])
  42. >
  43. <div
  44. @class([
  45. 'px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white',
  46. 'font-semibold' => $loop->parent->first || $loop->parent->last || $loop->parent->remaining === 1,
  47. ])
  48. >
  49. @if(is_array($cell) && isset($cell['description']))
  50. @if(isset($cell['id']) && isset($cell['url']))
  51. <x-filament::link
  52. :href="$cell['url']"
  53. target="_blank"
  54. color="primary"
  55. icon="heroicon-o-arrow-top-right-on-square"
  56. :icon-position="$iconPosition"
  57. icon-size="w-4 h-4 min-w-4 min-h-4"
  58. >
  59. {{ $cell['description'] }}
  60. </x-filament::link>
  61. @else
  62. {{ $cell['description'] }}
  63. @endif
  64. @else
  65. {{ $cell }}
  66. @endif
  67. </div>
  68. </x-filament-tables::cell>
  69. @endforeach
  70. </tr>
  71. @endforeach
  72. <!-- Spacer Row -->
  73. @unless($loop->last)
  74. <tr>
  75. <td colspan="{{ count($report->getHeaders()) }}">
  76. <div class="min-h-12"></div>
  77. </td>
  78. </tr>
  79. @endunless
  80. </tbody>
  81. @endforeach
  82. </table>