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.

chart.blade.php 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <x-filament-panels::page>
  2. <div class="flex flex-col gap-y-6">
  3. <x-filament::tabs>
  4. @foreach($this->categories as $categoryValue => $subtypes)
  5. <x-filament::tabs.item
  6. wire:key="tab-item-{{ $categoryValue }}"
  7. :active="$activeTab === $categoryValue"
  8. wire:click="$set('activeTab', '{{ $categoryValue }}')"
  9. :badge="$subtypes->sum('accounts_count')"
  10. >
  11. {{ $this->getCategoryLabel($categoryValue) }}
  12. </x-filament::tabs.item>
  13. @endforeach
  14. </x-filament::tabs>
  15. @foreach($this->categories as $categoryValue => $subtypes)
  16. @if($activeTab === $categoryValue)
  17. <div class="es-table__container overflow-hidden rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:divide-white/10 dark:bg-gray-900 dark:ring-white/10">
  18. <div class="es-table__header-ctn"></div>
  19. <div class="es-table__content overflow-x-auto">
  20. <table class="es-table table-fixed w-full divide-y divide-gray-200 text-start text-sm dark:divide-white/5">
  21. <colgroup>
  22. <col span="1" style="width: 12.5%;">
  23. <col span="1" style="width: 25%;">
  24. <col span="1" style="width: 40%;">
  25. <col span="1" style="width: 15%;">
  26. <col span="1" style="width: 7.5%;">
  27. </colgroup>
  28. @foreach($subtypes as $subtype)
  29. <tbody class="es-table__rowgroup divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  30. <!-- Subtype Name Header Row -->
  31. <tr class="es-table__row--header bg-gray-50 dark:bg-white/5">
  32. <td colspan="5" class="es-table__cell px-4 py-4">
  33. <div class="es-table__row-content flex items-center space-x-2">
  34. <span class="es-table__row-title text-gray-800 dark:text-gray-200 font-semibold tracking-wider">
  35. {{ $subtype->name }}
  36. </span>
  37. <x-tooltip
  38. text="{!! $subtype->description !!}"
  39. icon="heroicon-o-question-mark-circle"
  40. placement="right"
  41. maxWidth="300"
  42. />
  43. </div>
  44. </td>
  45. </tr>
  46. <!-- Chart Rows -->
  47. @forelse($subtype->accounts as $account)
  48. <tr class="es-table__row">
  49. <td colspan="1" class="es-table__cell px-4 py-4">{{ $account->code }}</td>
  50. <td colspan="1" class="es-table__cell px-4 py-4">{{ $account->name }}</td>
  51. <td colspan="1" class="es-table__cell px-4 py-4">{{ $account->description }}</td>
  52. <td colspan="1" class="es-table__cell px-4 py-4">@money($account->ending_balance, $account->currency_code, true)</td>
  53. <td colspan="1" class="es-table__cell px-4 py-4">
  54. <div>
  55. @if($account->default === false)
  56. {{ ($this->editChartAction)(['chart' => $account->id]) }}
  57. @endif
  58. </div>
  59. </td>
  60. </tr>
  61. @empty
  62. <!-- No Accounts Available Row -->
  63. <tr class="es-table__row">
  64. <td colspan="5" class="es-table__cell px-4 py-4 italic">
  65. {{ __("You haven't added any {$subtype->name} accounts yet.") }}
  66. </td>
  67. </tr>
  68. @endforelse
  69. <!-- Add New Account Row -->
  70. <tr class="es-table__row">
  71. <td colspan="5" class="es-table__cell px-4 py-4">
  72. {{ ($this->createChartAction)(['subtype' => $subtype->id]) }}
  73. </td>
  74. </tr>
  75. </tbody>
  76. @endforeach
  77. </table>
  78. </div>
  79. <div class="es-table__footer-ctn border-t border-gray-200"></div>
  80. </div>
  81. @endif
  82. @endforeach
  83. </div>
  84. </x-filament-panels::page>