Andrew Wallo 1 anno fa
parent
commit
8d3f95aa99

+ 4
- 2
app/Filament/Company/Pages/Reports/AccountTransactions.php Vedi File

@@ -14,6 +14,7 @@ use Filament\Forms\Form;
14 14
 use Filament\Support\Enums\Alignment;
15 15
 use Guava\FilamentClusters\Forms\Cluster;
16 16
 use Illuminate\Support\Collection;
17
+use Livewire\Attributes\Session;
17 18
 use Symfony\Component\HttpFoundation\StreamedResponse;
18 19
 
19 20
 class AccountTransactions extends BaseReportPage
@@ -28,6 +29,7 @@ class AccountTransactions extends BaseReportPage
28 29
 
29 30
     protected ExportService $exportService;
30 31
 
32
+    #[Session]
31 33
     public ?string $account_id = 'all';
32 34
 
33 35
     public function boot(ReportService $reportService, ExportService $exportService): void
@@ -69,8 +71,8 @@ class AccountTransactions extends BaseReportPage
69 71
                 Select::make('account_id')
70 72
                     ->label('Account')
71 73
                     ->options($this->getAccountOptions())
72
-                    ->searchable()
73
-                    ->required(),
74
+                    ->selectablePlaceholder(false)
75
+                    ->searchable(),
74 76
                 $this->getDateRangeFormComponent(),
75 77
                 Cluster::make([
76 78
                     $this->getStartDateFormComponent(),

+ 3
- 77
app/Listeners/ConfigureChartOfAccounts.php Vedi File

@@ -2,14 +2,8 @@
2 2
 
3 3
 namespace App\Listeners;
4 4
 
5
-use App\Enums\Accounting\AccountType;
6
-use App\Enums\Banking\BankAccountType;
7 5
 use App\Events\CompanyGenerated;
8
-use App\Models\Accounting\Account;
9
-use App\Models\Accounting\AccountSubtype;
10
-use App\Models\Banking\BankAccount;
11
-use App\Models\Company;
12
-use App\Utilities\Currency\CurrencyAccessor;
6
+use App\Services\ChartOfAccountsService;
13 7
 
14 8
 class ConfigureChartOfAccounts
15 9
 {
@@ -28,76 +22,8 @@ class ConfigureChartOfAccounts
28 22
     {
29 23
         $company = $event->company;
30 24
 
31
-        $this->createChartOfAccounts($company);
32
-    }
33
-
34
-    public function createChartOfAccounts(Company $company): void
35
-    {
36
-        $chartOfAccounts = config('chart-of-accounts.default');
37
-
38
-        foreach ($chartOfAccounts as $type => $subtypes) {
39
-            foreach ($subtypes as $subtypeName => $subtypeConfig) {
40
-                $subtype = AccountSubtype::create([
41
-                    'company_id' => $company->id,
42
-                    'multi_currency' => $subtypeConfig['multi_currency'] ?? false,
43
-                    'category' => AccountType::from($type)->getCategory()->value,
44
-                    'type' => $type,
45
-                    'name' => $subtypeName,
46
-                    'description' => $subtypeConfig['description'] ?? 'No description available.',
47
-                ]);
48
-
49
-                $this->createDefaultAccounts($company, $subtype, $subtypeConfig);
50
-            }
51
-        }
52
-    }
53
-
54
-    private function createDefaultAccounts(Company $company, AccountSubtype $subtype, array $subtypeConfig): void
55
-    {
56
-        if (isset($subtypeConfig['accounts']) && is_array($subtypeConfig['accounts'])) {
57
-            $baseCode = $subtypeConfig['base_code'];
58
-
59
-            foreach ($subtypeConfig['accounts'] as $accountName => $accountDetails) {
60
-                $bankAccount = null;
61
-
62
-                if ($subtypeConfig['multi_currency'] && isset($subtypeConfig['bank_account_type'])) {
63
-                    $bankAccount = $this->createBankAccountForMultiCurrency($company, $subtypeConfig['bank_account_type']);
64
-                }
65
-
66
-                $account = Account::create([
67
-                    'company_id' => $company->id,
68
-                    'subtype_id' => $subtype->id,
69
-                    'category' => $subtype->type->getCategory()->value,
70
-                    'type' => $subtype->type->value,
71
-                    'code' => $baseCode++,
72
-                    'name' => $accountName,
73
-                    'currency_code' => CurrencyAccessor::getDefaultCurrency(),
74
-                    'description' => $accountDetails['description'] ?? 'No description available.',
75
-                    'default' => true,
76
-                    'created_by' => $company->owner->id,
77
-                    'updated_by' => $company->owner->id,
78
-                ]);
79
-
80
-                if ($bankAccount) {
81
-                    $account->bankAccount()->associate($bankAccount);
82
-                }
83
-
84
-                $account->save();
85
-            }
86
-        }
87
-    }
88
-
89
-    private function createBankAccountForMultiCurrency(Company $company, string $bankAccountType): BankAccount
90
-    {
91
-        $bankAccountType = BankAccountType::from($bankAccountType) ?? BankAccountType::Other;
25
+        $chartOfAccountsService = new ChartOfAccountsService();
92 26
 
93
-        return BankAccount::create([
94
-            'company_id' => $company->id,
95
-            'institution_id' => null,
96
-            'type' => $bankAccountType,
97
-            'number' => null,
98
-            'enabled' => BankAccount::where('company_id', $company->id)->where('enabled', true)->doesntExist(),
99
-            'created_by' => $company->owner->id,
100
-            'updated_by' => $company->owner->id,
101
-        ]);
27
+        $chartOfAccountsService->createChartOfAccounts($company);
102 28
     }
103 29
 }

+ 84
- 0
app/Services/ChartOfAccountsService.php Vedi File

@@ -0,0 +1,84 @@
1
+<?php
2
+
3
+namespace App\Services;
4
+
5
+use App\Enums\Accounting\AccountType;
6
+use App\Enums\Banking\BankAccountType;
7
+use App\Models\Accounting\Account;
8
+use App\Models\Accounting\AccountSubtype;
9
+use App\Models\Banking\BankAccount;
10
+use App\Models\Company;
11
+use App\Utilities\Currency\CurrencyAccessor;
12
+
13
+class ChartOfAccountsService
14
+{
15
+    public function createChartOfAccounts(Company $company): void
16
+    {
17
+        $chartOfAccounts = config('chart-of-accounts.default');
18
+
19
+        foreach ($chartOfAccounts as $type => $subtypes) {
20
+            foreach ($subtypes as $subtypeName => $subtypeConfig) {
21
+                $subtype = AccountSubtype::create([
22
+                    'company_id' => $company->id,
23
+                    'multi_currency' => $subtypeConfig['multi_currency'] ?? false,
24
+                    'category' => AccountType::from($type)->getCategory()->value,
25
+                    'type' => $type,
26
+                    'name' => $subtypeName,
27
+                    'description' => $subtypeConfig['description'] ?? 'No description available.',
28
+                ]);
29
+
30
+                $this->createDefaultAccounts($company, $subtype, $subtypeConfig);
31
+            }
32
+        }
33
+    }
34
+
35
+    private function createDefaultAccounts(Company $company, AccountSubtype $subtype, array $subtypeConfig): void
36
+    {
37
+        if (isset($subtypeConfig['accounts']) && is_array($subtypeConfig['accounts'])) {
38
+            $baseCode = $subtypeConfig['base_code'];
39
+
40
+            foreach ($subtypeConfig['accounts'] as $accountName => $accountDetails) {
41
+                $bankAccount = null;
42
+
43
+                if ($subtypeConfig['multi_currency'] && isset($subtypeConfig['bank_account_type'])) {
44
+                    $bankAccount = $this->createBankAccountForMultiCurrency($company, $subtypeConfig['bank_account_type']);
45
+                }
46
+
47
+                $account = Account::create([
48
+                    'company_id' => $company->id,
49
+                    'subtype_id' => $subtype->id,
50
+                    'category' => $subtype->type->getCategory()->value,
51
+                    'type' => $subtype->type->value,
52
+                    'code' => $baseCode++,
53
+                    'name' => $accountName,
54
+                    'currency_code' => CurrencyAccessor::getDefaultCurrency(),
55
+                    'description' => $accountDetails['description'] ?? 'No description available.',
56
+                    'default' => true,
57
+                    'created_by' => $company->owner->id,
58
+                    'updated_by' => $company->owner->id,
59
+                ]);
60
+
61
+                if ($bankAccount) {
62
+                    $account->bankAccount()->associate($bankAccount);
63
+                }
64
+
65
+                $account->save();
66
+            }
67
+        }
68
+    }
69
+
70
+    private function createBankAccountForMultiCurrency(Company $company, string $bankAccountType): BankAccount
71
+    {
72
+        $bankAccountType = BankAccountType::from($bankAccountType) ?? BankAccountType::Other;
73
+
74
+        return BankAccount::create([
75
+            'company_id' => $company->id,
76
+            'institution_id' => null,
77
+            'type' => $bankAccountType,
78
+            'number' => null,
79
+            'enabled' => BankAccount::where('company_id', $company->id)->where('enabled', true)->doesntExist(),
80
+            'created_by' => $company->owner->id,
81
+            'updated_by' => $company->owner->id,
82
+        ]);
83
+    }
84
+}

+ 0
- 1
app/Services/ReportService.php Vedi File

@@ -146,7 +146,6 @@ class ReportService
146 146
                 $totalDebit += $journalEntry->total_debit;
147 147
                 $totalCredit += $journalEntry->total_credit;
148 148
 
149
-                // Adjust balance
150 149
                 $currentBalance += $journalEntry->total_debit;
151 150
                 $currentBalance -= $journalEntry->total_credit;
152 151
 

+ 5
- 1
app/Utilities/Currency/CurrencyAccessor.php Vedi File

@@ -53,9 +53,13 @@ class CurrencyAccessor
53 53
 
54 54
     public static function getDefaultCurrency(): ?string
55 55
     {
56
-        $companyId = auth()->user()->currentCompany->id;
56
+        $companyId = auth()->user()?->currentCompany?->id;
57 57
         $cacheKey = "default_currency_{$companyId}";
58 58
 
59
+        if ($companyId === null) {
60
+            return 'USD';
61
+        }
62
+
59 63
         return Cache::rememberForever($cacheKey, function () {
60 64
             return Currency::query()
61 65
                 ->where('enabled', true)

+ 12
- 12
composer.lock Vedi File

@@ -77,16 +77,16 @@
77 77
         },
78 78
         {
79 79
             "name": "andrewdwallo/filament-companies",
80
-            "version": "v4.0.2",
80
+            "version": "v4.0.3",
81 81
             "source": {
82 82
                 "type": "git",
83 83
                 "url": "https://github.com/andrewdwallo/filament-companies.git",
84
-                "reference": "2320fe95d32f90c09e17dd23aba6e99086d609e1"
84
+                "reference": "47d74b9930b7f55d3c70bafbe5351b450ed5292a"
85 85
             },
86 86
             "dist": {
87 87
                 "type": "zip",
88
-                "url": "https://api.github.com/repos/andrewdwallo/filament-companies/zipball/2320fe95d32f90c09e17dd23aba6e99086d609e1",
89
-                "reference": "2320fe95d32f90c09e17dd23aba6e99086d609e1",
88
+                "url": "https://api.github.com/repos/andrewdwallo/filament-companies/zipball/47d74b9930b7f55d3c70bafbe5351b450ed5292a",
89
+                "reference": "47d74b9930b7f55d3c70bafbe5351b450ed5292a",
90 90
                 "shasum": ""
91 91
             },
92 92
             "require": {
@@ -150,9 +150,9 @@
150 150
             ],
151 151
             "support": {
152 152
                 "issues": "https://github.com/andrewdwallo/filament-companies/issues",
153
-                "source": "https://github.com/andrewdwallo/filament-companies/tree/v4.0.2"
153
+                "source": "https://github.com/andrewdwallo/filament-companies/tree/v4.0.3"
154 154
             },
155
-            "time": "2024-04-05T21:36:19+00:00"
155
+            "time": "2024-07-05T19:09:23+00:00"
156 156
         },
157 157
         {
158 158
             "name": "andrewdwallo/filament-selectify",
@@ -497,16 +497,16 @@
497 497
         },
498 498
         {
499 499
             "name": "aws/aws-sdk-php",
500
-            "version": "3.315.5",
500
+            "version": "3.315.6",
501 501
             "source": {
502 502
                 "type": "git",
503 503
                 "url": "https://github.com/aws/aws-sdk-php.git",
504
-                "reference": "3e6d619d45d8e1a8681dd58de61ddfe90e8341e6"
504
+                "reference": "69e19f7b083c5b5a06677b026e23dae517825c8b"
505 505
             },
506 506
             "dist": {
507 507
                 "type": "zip",
508
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3e6d619d45d8e1a8681dd58de61ddfe90e8341e6",
509
-                "reference": "3e6d619d45d8e1a8681dd58de61ddfe90e8341e6",
508
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/69e19f7b083c5b5a06677b026e23dae517825c8b",
509
+                "reference": "69e19f7b083c5b5a06677b026e23dae517825c8b",
510 510
                 "shasum": ""
511 511
             },
512 512
             "require": {
@@ -586,9 +586,9 @@
586 586
             "support": {
587 587
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
588 588
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
589
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.315.5"
589
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.315.6"
590 590
             },
591
-            "time": "2024-07-03T18:12:51+00:00"
591
+            "time": "2024-07-05T18:07:22+00:00"
592 592
         },
593 593
         {
594 594
             "name": "aws/aws-sdk-php-laravel",

+ 0
- 1
config/snappy.php Vedi File

@@ -39,7 +39,6 @@ return [
39 39
         'timeout' => false,
40 40
         'options' => [
41 41
             'no-pdf-compression' => true,
42
-            'disable-smart-shrinking' => true,
43 42
             'disable-javascript' => true,
44 43
             'margin-top' => '10mm',
45 44
             'margin-right' => '7.5mm',

+ 37
- 1
database/factories/Accounting/TransactionFactory.php Vedi File

@@ -2,7 +2,10 @@
2 2
 
3 3
 namespace Database\Factories\Accounting;
4 4
 
5
+use App\Models\Accounting\Account;
5 6
 use App\Models\Accounting\Transaction;
7
+use App\Models\Banking\BankAccount;
8
+use App\Models\Company;
6 9
 use Illuminate\Database\Eloquent\Factories\Factory;
7 10
 
8 11
 /**
@@ -10,6 +13,11 @@ use Illuminate\Database\Eloquent\Factories\Factory;
10 13
  */
11 14
 class TransactionFactory extends Factory
12 15
 {
16
+    /**
17
+     * The name of the factory's corresponding model.
18
+     */
19
+    protected $model = Transaction::class;
20
+
13 21
     /**
14 22
      * Define the model's default state.
15 23
      *
@@ -19,8 +27,8 @@ class TransactionFactory extends Factory
19 27
     {
20 28
         return [
21 29
             'company_id' => 1,
22
-            'account_id' => $this->faker->numberBetween(1, 30),
23 30
             'bank_account_id' => 1,
31
+            'account_id' => $this->faker->numberBetween(2, 30),
24 32
             'type' => $this->faker->randomElement(['deposit', 'withdrawal', 'journal']),
25 33
             'payment_channel' => $this->faker->randomElement(['online', 'in store', 'other']),
26 34
             'description' => $this->faker->sentence,
@@ -69,4 +77,32 @@ class TransactionFactory extends Factory
69 77
             ]);
70 78
         });
71 79
     }
80
+
81
+    public function forCompanyAndBankAccount(Company $company, BankAccount $bankAccount): static
82
+    {
83
+        return $this->state(function (array $attributes) use ($bankAccount, $company) {
84
+            $type = $this->faker->randomElement(['deposit', 'withdrawal', 'journal']);
85
+
86
+            $associatedAccountTypes = match ($type) {
87
+                'deposit' => ['asset', 'liability', 'equity', 'revenue'],
88
+                'withdrawal' => ['asset', 'liability', 'equity', 'expense'],
89
+                default => ['asset', 'liability', 'equity', 'revenue', 'expense'],
90
+            };
91
+
92
+            $accountIdForBankAccount = $bankAccount->account->id;
93
+
94
+            $account = Account::where('category', $this->faker->randomElement($associatedAccountTypes))
95
+                ->where('company_id', $company->id)
96
+                ->where('id', '<>', $accountIdForBankAccount)
97
+                ->inRandomOrder()
98
+                ->firstOrFail();
99
+
100
+            return [
101
+                'company_id' => $company->id,
102
+                'bank_account_id' => $bankAccount->id,
103
+                'account_id' => $account->id,
104
+                'type' => $type,
105
+            ];
106
+        });
107
+    }
72 108
 }

+ 29
- 22
database/factories/UserFactory.php Vedi File

@@ -2,12 +2,14 @@
2 2
 
3 3
 namespace Database\Factories;
4 4
 
5
-use App\Events\CompanyGenerated;
6 5
 use App\Models\Company;
7 6
 use App\Models\Setting\CompanyProfile;
8 7
 use App\Models\User;
8
+use App\Services\ChartOfAccountsService;
9
+use App\Services\CompanyDefaultService;
9 10
 use Database\Factories\Accounting\TransactionFactory;
10 11
 use Illuminate\Database\Eloquent\Factories\Factory;
12
+use Illuminate\Support\Facades\DB;
11 13
 use Illuminate\Support\Facades\Hash;
12 14
 use Illuminate\Support\Str;
13 15
 use Wallo\FilamentCompanies\FilamentCompanies;
@@ -69,34 +71,39 @@ class UserFactory extends Factory
69 71
             Company::factory()
70 72
                 ->has(CompanyProfile::factory()->withCountry($countryCode), 'profile')
71 73
                 ->afterCreating(function (Company $company) use ($user, $countryCode) {
72
-                    CompanyGenerated::dispatch($user, $company, $countryCode);
74
+                    DB::transaction(function () use ($company, $user, $countryCode) {
75
+                        $companyDefaultService = app()->make(CompanyDefaultService::class);
76
+                        $companyDefaultService->createCompanyDefaults($company, $user, 'USD', $countryCode, 'en');
73 77
 
74
-                    $defaultBankAccount = $company->bankAccounts()->where('enabled', true)->first();
75
-                    $defaultCurrency = $company->currencies()->where('enabled', true)->first();
76
-                    $defaultSalesTax = $company->taxes()->where('type', 'sales')->where('enabled', true)->first();
77
-                    $defaultPurchaseTax = $company->taxes()->where('type', 'purchase')->where('enabled', true)->first();
78
-                    $defaultSalesDiscount = $company->discounts()->where('type', 'sales')->where('enabled', true)->first();
79
-                    $defaultPurchaseDiscount = $company->discounts()->where('type', 'purchase')->where('enabled', true)->first();
78
+                        $chartOfAccountsService = app()->make(ChartOfAccountsService::class);
79
+                        $chartOfAccountsService->createChartOfAccounts($company);
80 80
 
81
-                    $company->default()->create([
82
-                        'bank_account_id' => $defaultBankAccount?->id,
83
-                        'currency_code' => $defaultCurrency?->code,
84
-                        'sales_tax_id' => $defaultSalesTax?->id,
85
-                        'purchase_tax_id' => $defaultPurchaseTax?->id,
86
-                        'sales_discount_id' => $defaultSalesDiscount?->id,
87
-                        'purchase_discount_id' => $defaultPurchaseDiscount?->id,
88
-                        'created_by' => $user->id,
89
-                        'updated_by' => $user->id,
90
-                    ]);
81
+                        $defaultBankAccount = $company->bankAccounts()->where('enabled', true)->first();
82
+                        $defaultCurrency = $company->currencies()->where('enabled', true)->first();
83
+                        $defaultSalesTax = $company->taxes()->where('type', 'sales')->where('enabled', true)->first();
84
+                        $defaultPurchaseTax = $company->taxes()->where('type', 'purchase')->where('enabled', true)->first();
85
+                        $defaultSalesDiscount = $company->discounts()->where('type', 'sales')->where('enabled', true)->first();
86
+                        $defaultPurchaseDiscount = $company->discounts()->where('type', 'purchase')->where('enabled', true)->first();
91 87
 
92
-                    TransactionFactory::new()
93
-                        ->count(2000)
94
-                        ->createQuietly([
95
-                            'company_id' => $company->id,
88
+                        $company->default()->create([
96 89
                             'bank_account_id' => $defaultBankAccount?->id,
90
+                            'currency_code' => $defaultCurrency?->code,
91
+                            'sales_tax_id' => $defaultSalesTax?->id,
92
+                            'purchase_tax_id' => $defaultPurchaseTax?->id,
93
+                            'sales_discount_id' => $defaultSalesDiscount?->id,
94
+                            'purchase_discount_id' => $defaultPurchaseDiscount?->id,
97 95
                             'created_by' => $user->id,
98 96
                             'updated_by' => $user->id,
99 97
                         ]);
98
+
99
+                        TransactionFactory::new()
100
+                            ->forCompanyAndBankAccount($company, $defaultBankAccount)
101
+                            ->count(2000)
102
+                            ->createQuietly([
103
+                                'created_by' => $user->id,
104
+                                'updated_by' => $user->id,
105
+                            ]);
106
+                    });
100 107
                 })
101 108
                 ->create([
102 109
                     'name' => $user->name . '\'s Company',

+ 3
- 3
package-lock.json Vedi File

@@ -1079,9 +1079,9 @@
1079 1079
             "dev": true
1080 1080
         },
1081 1081
         "node_modules/electron-to-chromium": {
1082
-            "version": "1.4.816",
1083
-            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.816.tgz",
1084
-            "integrity": "sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==",
1082
+            "version": "1.4.817",
1083
+            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.817.tgz",
1084
+            "integrity": "sha512-3znu+lZMIbTe8ZOs360OMJvVroVF2NpNI8T5jfLnDetVvj0uNmIucZzQVYMSJfsu9f47Ssox1Gt46PR+R+1JUg==",
1085 1085
             "dev": true
1086 1086
         },
1087 1087
         "node_modules/emoji-regex": {

+ 9
- 6
resources/views/components/company/reports/account-transactions-report-pdf.blade.php Vedi File

@@ -5,11 +5,6 @@
5 5
     <meta name="viewport" content="width=device-width, initial-scale=1">
6 6
     <title>{{ $report->getTitle() }}</title>
7 7
     <style>
8
-        @page {
9
-            size: auto;
10
-            margin: 10mm 7.5mm;
11
-        }
12
-
13 8
         .header {
14 9
             color: #374151;
15 10
             margin-bottom: 1rem;
@@ -66,6 +61,14 @@
66 61
             border-bottom: 1px solid #d1d5db; /* Gray border for all rows */
67 62
         }
68 63
 
64
+        .whitespace-normal {
65
+            white-space: normal;
66
+        }
67
+
68
+        .whitespace-nowrap {
69
+            white-space: nowrap;
70
+        }
71
+
69 72
         .category-header-row > td {
70 73
             background-color: #f3f4f6; /* Gray background for category names */
71 74
             font-weight: 600;
@@ -125,7 +128,7 @@
125 128
                     'category-header-row' => $loop->first || $loop->last || $loop->remaining === 1,
126 129
                 ])>
127 130
                 @foreach($transaction as $cellIndex => $cell)
128
-                    <td class="{{ $report->getAlignmentClass($cellIndex) }}">
131
+                    <td class="{{ $report->getAlignmentClass($cellIndex) }} {{ $cellIndex === 1 ? 'whitespace-normal' : 'whitespace-nowrap' }}">
129 132
                         {{ $cell }}
130 133
                     </td>
131 134
                 @endforeach

+ 11
- 3
resources/views/components/company/tables/reports/account-transactions.blade.php Vedi File

@@ -33,14 +33,22 @@
33 33
                 <tr wire:key="category-{{ $categoryIndex }}-data-{{ $dataIndex }}"
34 34
                     @class([
35 35
                         'bg-gray-50 dark:bg-white/5' => $loop->first || $loop->last || $loop->remaining === 1,
36
-                    ])>
36
+                    ])
37
+                >
37 38
                     @foreach($transaction as $cellIndex => $cell)
38
-                        <x-filament-tables::cell wire:key="category-{{ $categoryIndex }}-data-{{ $dataIndex }}-cell-{{ $cellIndex }}" class="{{ $report->getAlignmentClass($cellIndex) }}">
39
+                        <x-filament-tables::cell
40
+                            wire:key="category-{{ $categoryIndex }}-data-{{ $dataIndex }}-cell-{{ $cellIndex }}"
41
+                             @class([
42
+                                $report->getAlignmentClass($cellIndex),
43
+                                'whitespace-normal' => $cellIndex === 1,
44
+                            ])
45
+                        >
39 46
                             <div
40 47
                                 @class([
41 48
                                     'px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white',
42 49
                                     'font-semibold' => $loop->parent->first || $loop->parent->last || $loop->parent->remaining === 1,
43
-                                ])>
50
+                                ])
51
+                            >
44 52
                                 {{ $cell }}
45 53
                             </div>
46 54
                         </x-filament-tables::cell>

Loading…
Annulla
Salva