Andrew Wallo 1年前
父节点
当前提交
ecb1b314cc

+ 0
- 25
app/Contracts/AccountHandler.php 查看文件

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-namespace App\Contracts;
4
-
5
-use App\Models\Accounting\Account;
6
-use App\ValueObjects\Money;
7
-
8
-interface AccountHandler
9
-{
10
-    public function getDebitBalance(Account $account, string $startDate, string $endDate): Money;
11
-
12
-    public function getCreditBalance(Account $account, string $startDate, string $endDate): Money;
13
-
14
-    public function getNetMovement(Account $account, string $startDate, string $endDate): Money;
15
-
16
-    public function getStartingBalance(Account $account, string $startDate): ?Money;
17
-
18
-    public function getEndingBalance(Account $account, string $startDate, string $endDate): ?Money;
19
-
20
-    public function getBalances(Account $account, string $startDate, string $endDate, array $fields): array;
21
-
22
-    public function getTotalBalanceForAllBankAccounts(string $startDate, string $endDate): Money;
23
-
24
-    public function getEarliestTransactionDate(): string;
25
-}

+ 0
- 12
app/Contracts/DocumentNumber.php 查看文件

@@ -1,12 +0,0 @@
1
-<?php
2
-
3
-namespace App\Contracts;
4
-
5
-use Illuminate\Database\Eloquent\Model;
6
-
7
-interface DocumentNumber
8
-{
9
-    public function getNextNumber(?Model $model, ?string $type, int | string $number, string $prefix, int | string $digits, ?bool $padded = true): string;
10
-
11
-    public function incrementNumber(Model $model, string $type): void;
12
-}

+ 1
- 1
app/Enums/Accounting/AccountCategory.php 查看文件

@@ -75,7 +75,7 @@ enum AccountCategory: string implements HasLabel
75 75
     /**
76 76
      * Determines if the account is a real account.
77 77
      *
78
-     * In accounting, real accounts are permanent accounts that retain their balances across accounting periods.
78
+     * In accounting, assets, liabilities, and equity are real accounts which are permanent accounts that retain their balances across accounting periods.
79 79
      * They are not closed at the end of each accounting period.
80 80
      */
81 81
     public function isReal(): bool

+ 2
- 16
app/Facades/Accounting.php 查看文件

@@ -2,27 +2,13 @@
2 2
 
3 3
 namespace App\Facades;
4 4
 
5
-use App\Contracts\AccountHandler;
6
-use App\Models\Accounting\Account;
7
-use App\ValueObjects\Money;
5
+use App\Services\AccountService;
8 6
 use Illuminate\Support\Facades\Facade;
9 7
 
10
-/**
11
- * @method static Money getDebitBalance(Account $account, string $startDate, string $endDate)
12
- * @method static Money getCreditBalance(Account $account, string $startDate, string $endDate)
13
- * @method static Money getNetMovement(Account $account, string $startDate, string $endDate)
14
- * @method static Money|null getStartingBalance(Account $account, string $startDate)
15
- * @method static Money|null getEndingBalance(Account $account, string $startDate, string $endDate)
16
- * @method static array getBalances(Account $account, string $startDate, string $endDate, array $fields)
17
- * @method static Money getTotalBalanceForAllBankAccounts(string $startDate, string $endDate)
18
- * @method static string getEarliestTransactionDate()
19
- *
20
- * @see AccountHandler
21
- */
22 8
 class Accounting extends Facade
23 9
 {
24 10
     protected static function getFacadeAccessor(): string
25 11
     {
26
-        return AccountHandler::class;
12
+        return AccountService::class;
27 13
     }
28 14
 }

+ 14
- 0
app/Facades/Reporting.php 查看文件

@@ -0,0 +1,14 @@
1
+<?php
2
+
3
+namespace App\Facades;
4
+
5
+use App\Services\ReportService;
6
+use Illuminate\Support\Facades\Facade;
7
+
8
+class Reporting extends Facade
9
+{
10
+    protected static function getFacadeAccessor(): string
11
+    {
12
+        return ReportService::class;
13
+    }
14
+}

+ 1
- 1
app/Filament/Company/Clusters/Settings/Pages/CompanyProfile.php 查看文件

@@ -183,7 +183,7 @@ class CompanyProfile extends Page
183 183
                     ->imageResizeMode('contain')
184 184
                     ->imageCropAspectRatio('1:1')
185 185
                     ->panelAspectRatio('1:1')
186
-                    ->panelLayout('compact')
186
+                    ->panelLayout('integrated')
187 187
                     ->removeUploadedFileButtonPosition('center bottom')
188 188
                     ->uploadButtonPosition('center bottom')
189 189
                     ->uploadProgressIndicatorPosition('center bottom')

+ 5
- 3
app/Filament/Company/Clusters/Settings/Pages/Invoice.php 查看文件

@@ -137,13 +137,15 @@ class Invoice extends Page
137 137
                 TextInput::make('number_next')
138 138
                     ->softRequired()
139 139
                     ->localizeLabel()
140
-                    ->maxLength(static fn (Get $get) => $get('number_digits'))
141
-                    ->hint(static function (Get $get, $state) {
140
+                    ->mask(static function (Get $get) {
141
+                        return str_repeat('9', $get('number_digits'));
142
+                    })
143
+                    ->hint(function (Get $get, $state) {
142 144
                         $number_prefix = $get('number_prefix');
143 145
                         $number_digits = $get('number_digits');
144 146
                         $number_next = $state;
145 147
 
146
-                        return InvoiceModel::getNumberNext(true, true, $number_prefix, $number_digits, $number_next);
148
+                        return $this->record->getNumberNext(true, true, $number_prefix, $number_digits, $number_next);
147 149
                     }),
148 150
                 Select::make('payment_terms')
149 151
                     ->softRequired()

+ 13
- 34
app/Models/Setting/DocumentDefault.php 查看文件

@@ -93,53 +93,32 @@ class DocumentDefault extends Model
93 93
         return array_combine(range(1, 20), range(1, 20));
94 94
     }
95 95
 
96
-    public static function getNumberNext(?bool $padded = null, ?bool $format = null, ?string $prefix = null, int | string | null $digits = null, int | string | null $next = null, ?string $type = null): string
96
+    public function getNumberNext(?bool $padded = null, ?bool $format = null, ?string $prefix = null, int | string | null $digits = null, int | string | null $next = null): string
97 97
     {
98
-        $initializeAttributes = new static;
98
+        [$number_prefix, $number_digits, $number_next] = $this->initializeAttributes($prefix, $digits, $next);
99 99
 
100
-        [$number_prefix, $number_digits, $number_next] = $initializeAttributes->initializeAttributes($prefix, $digits, $next, $type);
101
-
102
-        if ($format) {
103
-            return $number_prefix . static::getPaddedNumberNext($number_next, $number_digits);
104
-        }
105
-
106
-        if ($padded) {
107
-            return static::getPaddedNumberNext($number_next, $number_digits);
108
-        }
109
-
110
-        return $number_next;
100
+        return match (true) {
101
+            $format && $padded => $number_prefix . $this->getPaddedNumberNext($number_next, $number_digits),
102
+            $format => $number_prefix . $number_next,
103
+            $padded => $this->getPaddedNumberNext($number_next, $number_digits),
104
+            default => $number_next,
105
+        };
111 106
     }
112 107
 
113
-    public function initializeAttributes(?string $prefix, int | string | null $digits, int | string | null $next, ?string $type): array
108
+    public function initializeAttributes(?string $prefix, int | string | null $digits, int | string | null $next): array
114 109
     {
115
-        $number_prefix = $prefix ?? $this->getAttributeFromArray('number_prefix');
116
-        $number_digits = $digits ?? $this->getAttributeFromArray('number_digits');
117
-        $number_next = $next ?? $this->getAttributeFromArray('number_next');
118
-
119
-        if ($type) {
120
-            $attributes = static::getAttributesByType($type);
121
-
122
-            $number_prefix = $attributes['number_prefix'] ?? $number_prefix;
123
-            $number_digits = $attributes['number_digits'] ?? $number_digits;
124
-            $number_next = $attributes['number_next'] ?? $number_next;
125
-        }
110
+        $number_prefix = $prefix ?? $this->number_prefix;
111
+        $number_digits = $digits ?? $this->number_digits;
112
+        $number_next = $next ?? $this->number_next;
126 113
 
127 114
         return [$number_prefix, $number_digits, $number_next];
128 115
     }
129 116
 
130
-    public static function getAttributesByType(?string $type): array
131
-    {
132
-        $model = new static;
133
-        $attributes = $model->newQuery()->type($type)->first();
134
-
135
-        return $attributes ? $attributes->toArray() : [];
136
-    }
137
-
138 117
     /**
139 118
      * Get the next number with padding for dynamic display purposes.
140 119
      * Even if number_next is a string, it will be cast to an integer.
141 120
      */
142
-    public static function getPaddedNumberNext(int | string | null $number_next, int | string | null $number_digits): string
121
+    public function getPaddedNumberNext(int | string | null $number_next, int | string | null $number_digits): string
143 122
     {
144 123
         return str_pad($number_next, $number_digits, '0', STR_PAD_LEFT);
145 124
     }

+ 0
- 9
app/Providers/AppServiceProvider.php 查看文件

@@ -2,8 +2,6 @@
2 2
 
3 3
 namespace App\Providers;
4 4
 
5
-use App\Contracts\AccountHandler;
6
-use App\Services\AccountService;
7 5
 use App\Services\DateRangeService;
8 6
 use BezhanSalleh\PanelSwitch\PanelSwitch;
9 7
 use Filament\Notifications\Livewire\Notifications;
@@ -14,13 +12,6 @@ use Illuminate\Support\ServiceProvider;
14 12
 
15 13
 class AppServiceProvider extends ServiceProvider
16 14
 {
17
-    /**
18
-     * All of the container bindings that should be registered.
19
-     */
20
-    public array $bindings = [
21
-        AccountHandler::class => AccountService::class,
22
-    ];
23
-
24 15
     /**
25 16
      * Register any application services.
26 17
      */

+ 49
- 64
app/Services/AccountService.php 查看文件

@@ -2,7 +2,6 @@
2 2
 
3 3
 namespace App\Services;
4 4
 
5
-use App\Contracts\AccountHandler;
6 5
 use App\Enums\Accounting\AccountCategory;
7 6
 use App\Models\Accounting\Account;
8 7
 use App\Models\Accounting\Transaction;
@@ -14,7 +13,7 @@ use Illuminate\Database\Eloquent\Builder;
14 13
 use Illuminate\Database\Query\JoinClause;
15 14
 use Illuminate\Support\Facades\DB;
16 15
 
17
-class AccountService implements AccountHandler
16
+class AccountService
18 17
 {
19 18
     public function __construct(
20 19
         protected JournalEntryRepository $journalEntryRepository
@@ -22,107 +21,93 @@ class AccountService implements AccountHandler
22 21
 
23 22
     public function getDebitBalance(Account $account, string $startDate, string $endDate): Money
24 23
     {
25
-        $amount = $this->journalEntryRepository->sumDebitAmounts($account, $startDate, $endDate);
24
+        $query = $this->getAccountBalances($startDate, $endDate, [$account->id])->first();
26 25
 
27
-        return new Money($amount, $account->currency_code);
26
+        return new Money($query->total_debit, $account->currency_code);
28 27
     }
29 28
 
30 29
     public function getCreditBalance(Account $account, string $startDate, string $endDate): Money
31 30
     {
32
-        $amount = $this->journalEntryRepository->sumCreditAmounts($account, $startDate, $endDate);
31
+        $query = $this->getAccountBalances($startDate, $endDate, [$account->id])->first();
33 32
 
34
-        return new Money($amount, $account->currency_code);
33
+        return new Money($query->total_credit, $account->currency_code);
35 34
     }
36 35
 
37 36
     public function getNetMovement(Account $account, string $startDate, string $endDate): Money
38 37
     {
39
-        $balances = $this->calculateBalances($account, $startDate, $endDate);
38
+        $query = $this->getAccountBalances($startDate, $endDate, [$account->id])->first();
40 39
 
41
-        return new Money($balances['net_movement'], $account->currency_code);
40
+        $netMovement = $this->calculateNetMovementByCategory(
41
+            $account->category,
42
+            $query->total_debit ?? 0,
43
+            $query->total_credit ?? 0
44
+        );
45
+
46
+        return new Money($netMovement, $account->currency_code);
42 47
     }
43 48
 
44 49
     public function getStartingBalance(Account $account, string $startDate, bool $override = false): ?Money
45 50
     {
46
-        if ($override === false && in_array($account->category, [AccountCategory::Expense, AccountCategory::Revenue], true)) {
51
+        if ($override === false && $account->category->isNominal()) {
47 52
             return null;
48 53
         }
49 54
 
50
-        $balances = $this->calculateStartingBalances($account, $startDate);
55
+        $query = $this->getAccountBalances($startDate, $startDate, [$account->id])->first();
51 56
 
52
-        return new Money($balances['starting_balance'], $account->currency_code);
57
+        return new Money($query->starting_balance ?? 0, $account->currency_code);
53 58
     }
54 59
 
55 60
     public function getEndingBalance(Account $account, string $startDate, string $endDate): ?Money
56 61
     {
57
-        $calculatedBalances = $this->calculateBalances($account, $startDate, $endDate);
58
-        $startingBalances = $this->calculateStartingBalances($account, $startDate);
62
+        $query = $this->getAccountBalances($startDate, $endDate, [$account->id])->first();
59 63
 
60
-        $netMovement = $calculatedBalances['net_movement'];
64
+        $netMovement = $this->calculateNetMovementByCategory(
65
+            $account->category,
66
+            $query->total_debit ?? 0,
67
+            $query->total_credit ?? 0
68
+        );
61 69
 
62
-        if (in_array($account->category, [AccountCategory::Expense, AccountCategory::Revenue], true)) {
70
+        if ($account->category->isNominal()) {
63 71
             return new Money($netMovement, $account->currency_code);
64 72
         }
65 73
 
66
-        $endingBalance = $startingBalances['starting_balance'] + $netMovement;
74
+        $endingBalance = ($query->starting_balance ?? 0) + $netMovement;
67 75
 
68 76
         return new Money($endingBalance, $account->currency_code);
69 77
     }
70 78
 
71 79
     private function calculateNetMovementByCategory(AccountCategory $category, int $debitBalance, int $creditBalance): int
72 80
     {
73
-        return match ($category) {
74
-            AccountCategory::Asset, AccountCategory::Expense => $debitBalance - $creditBalance,
75
-            AccountCategory::Liability, AccountCategory::Equity, AccountCategory::Revenue => $creditBalance - $debitBalance,
76
-        };
77
-    }
78
-
79
-    private function calculateBalances(Account $account, string $startDate, string $endDate): array
80
-    {
81
-        $debitBalance = $this->journalEntryRepository->sumDebitAmounts($account, $startDate, $endDate);
82
-        $creditBalance = $this->journalEntryRepository->sumCreditAmounts($account, $startDate, $endDate);
83
-
84
-        return [
85
-            'debit_balance' => $debitBalance,
86
-            'credit_balance' => $creditBalance,
87
-            'net_movement' => $this->calculateNetMovementByCategory($account->category, $debitBalance, $creditBalance),
88
-        ];
81
+        if ($category->isNormalDebitBalance()) {
82
+            return $debitBalance - $creditBalance;
83
+        } else {
84
+            return $creditBalance - $debitBalance;
85
+        }
89 86
     }
90 87
 
91
-    private function calculateStartingBalances(Account $account, string $startDate): array
88
+    public function getBalances(Account $account, string $startDate, string $endDate): array
92 89
     {
93
-        $debitBalanceBefore = $this->journalEntryRepository->sumDebitAmounts($account, $startDate);
94
-        $creditBalanceBefore = $this->journalEntryRepository->sumCreditAmounts($account, $startDate);
95
-
96
-        return [
97
-            'debit_balance_before' => $debitBalanceBefore,
98
-            'credit_balance_before' => $creditBalanceBefore,
99
-            'starting_balance' => $this->calculateNetMovementByCategory($account->category, $debitBalanceBefore, $creditBalanceBefore),
90
+        $query = $this->getAccountBalances($startDate, $endDate, [$account->id])->first();
91
+
92
+        $needStartingBalances = $account->category->isReal();
93
+
94
+        $netMovement = $this->calculateNetMovementByCategory(
95
+            $account->category,
96
+            $query->total_debit ?? 0,
97
+            $query->total_credit ?? 0
98
+        );
99
+
100
+        $balances = [
101
+            'debit_balance' => $query->total_debit,
102
+            'credit_balance' => $query->total_credit,
103
+            'net_movement' => $netMovement,
104
+            'starting_balance' => $needStartingBalances ? ($query->starting_balance ?? 0) : null,
105
+            'ending_balance' => $needStartingBalances
106
+                ? ($query->starting_balance ?? 0) + $netMovement
107
+                : $netMovement, // For nominal accounts, ending balance is just the net movement
100 108
         ];
101
-    }
102
-
103
-    public function getBalances(Account $account, string $startDate, string $endDate, array $fields): array
104
-    {
105
-        $balances = [];
106
-        $calculatedBalances = $this->calculateBalances($account, $startDate, $endDate);
107
-
108
-        // Calculate starting balances only if needed
109
-        $startingBalances = null;
110
-        $needStartingBalances = ! in_array($account->category, [AccountCategory::Expense, AccountCategory::Revenue], true)
111
-                                && (in_array('starting_balance', $fields) || in_array('ending_balance', $fields));
112
-
113
-        if ($needStartingBalances) {
114
-            $startingBalances = $this->calculateStartingBalances($account, $startDate);
115
-        }
116
-
117
-        foreach ($fields as $field) {
118
-            $balances[$field] = match ($field) {
119
-                'debit_balance', 'credit_balance', 'net_movement' => $calculatedBalances[$field],
120
-                'starting_balance' => $needStartingBalances ? $startingBalances['starting_balance'] : null,
121
-                'ending_balance' => $needStartingBalances ? $startingBalances['starting_balance'] + $calculatedBalances['net_movement'] : null,
122
-                default => null,
123
-            };
124
-        }
125 109
 
110
+        // Return balances, filtering out any null values
126 111
         return array_filter($balances, static fn ($value) => $value !== null);
127 112
     }
128 113
 

+ 16
- 2
app/Services/ReportService.php 查看文件

@@ -261,7 +261,7 @@ class ReportService
261 261
 
262 262
                 $endingBalance = $accountBalances['ending_balance'] ?? $accountBalances['net_movement'];
263 263
 
264
-                $trialBalance = $this->calculateTrialBalance($account->category, $endingBalance);
264
+                $trialBalance = $this->calculateTrialBalances($account->category, $endingBalance);
265 265
 
266 266
                 foreach ($trialBalance as $balanceType => $balance) {
267 267
                     $categorySummaryBalances[$balanceType] += $balance;
@@ -315,7 +315,21 @@ class ReportService
315 315
         return new ReportDTO($accountCategories, $formattedReportTotalBalances, $columns);
316 316
     }
317 317
 
318
-    public function calculateTrialBalance(AccountCategory $category, int $endingBalance): array
318
+    public function getRetainedEarningsBalances(string $startDate, string $endDate): AccountBalanceDTO
319
+    {
320
+        $retainedEarningsAmount = $this->calculateRetainedEarnings($startDate, $endDate)->getAmount();
321
+
322
+        $isCredit = $retainedEarningsAmount >= 0;
323
+        $retainedEarningsDebitAmount = $isCredit ? 0 : abs($retainedEarningsAmount);
324
+        $retainedEarningsCreditAmount = $isCredit ? $retainedEarningsAmount : 0;
325
+
326
+        return $this->formatBalances([
327
+            'debit_balance' => $retainedEarningsDebitAmount,
328
+            'credit_balance' => $retainedEarningsCreditAmount,
329
+        ]);
330
+    }
331
+
332
+    public function calculateTrialBalances(AccountCategory $category, int $endingBalance): array
319 333
     {
320 334
         if ($category->isNormalDebitBalance()) {
321 335
             if ($endingBalance >= 0) {

+ 0
- 33
app/Utilities/DocumentNumber.php 查看文件

@@ -1,33 +0,0 @@
1
-<?php
2
-
3
-namespace App\Utilities;
4
-
5
-use App\Contracts\DocumentNumber as DocumentNumberInterface;
6
-use Illuminate\Database\Eloquent\Model;
7
-
8
-class DocumentNumber implements DocumentNumberInterface
9
-{
10
-    public function getNextNumber(?Model $model, ?string $type, int | string $number, string $prefix, int | string $digits, ?bool $padded = false): string
11
-    {
12
-        if ($model) {
13
-            $numberNext = $model?->newQuery()
14
-                ->where('type', $type)
15
-                ->value($number);
16
-        } else {
17
-            $numberNext = $number;
18
-        }
19
-
20
-        if ($padded) {
21
-            return $prefix . str_pad($numberNext, $digits, '0', STR_PAD_LEFT);
22
-        }
23
-
24
-        return $numberNext;
25
-    }
26
-
27
-    public function incrementNumber(Model $model, string $type): void
28
-    {
29
-        $model->newQuery()
30
-            ->where('type', $type)
31
-            ->increment('number_next');
32
-    }
33
-}

+ 1
- 1
app/View/Models/InvoiceViewModel.php 查看文件

@@ -80,7 +80,7 @@ class InvoiceViewModel
80 80
 
81 81
     public function invoice_number(): string
82 82
     {
83
-        return DocumentDefault::getNumberNext(padded: true, format: true, prefix: $this->number_prefix(), digits: $this->number_digits(), next: $this->number_next());
83
+        return $this->invoice->getNumberNext(padded: true, format: true, prefix: $this->number_prefix(), digits: $this->number_digits(), next: $this->number_next());
84 84
     }
85 85
 
86 86
     // Invoice date related methods

+ 1
- 1
composer.json 查看文件

@@ -18,7 +18,7 @@
18 18
         "awcodes/filament-table-repeater": "^3.0",
19 19
         "barryvdh/laravel-snappy": "^1.0",
20 20
         "bezhansalleh/filament-panel-switch": "^1.0",
21
-        "filament/filament": "^3.2.29",
21
+        "filament/filament": "^3.2.115",
22 22
         "guava/filament-clusters": "^1.1",
23 23
         "guzzlehttp/guzzle": "^7.8",
24 24
         "laravel/framework": "^11.0",

+ 65
- 65
composer.lock 查看文件

@@ -4,7 +4,7 @@
4 4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5
         "This file is @generated automatically"
6 6
     ],
7
-    "content-hash": "3e716d3001ed070af71b1104b265f4fd",
7
+    "content-hash": "a745e09991b771592a6638bed644713c",
8 8
     "packages": [
9 9
         {
10 10
             "name": "akaunting/laravel-money",
@@ -497,16 +497,16 @@
497 497
         },
498 498
         {
499 499
             "name": "aws/aws-sdk-php",
500
-            "version": "3.322.5",
500
+            "version": "3.322.7",
501 501
             "source": {
502 502
                 "type": "git",
503 503
                 "url": "https://github.com/aws/aws-sdk-php.git",
504
-                "reference": "968fe51da0854eac0e0aeac6ec8b86856c6bd83e"
504
+                "reference": "ea3563a7f10fa562796f712fa306c1dca41a45d7"
505 505
             },
506 506
             "dist": {
507 507
                 "type": "zip",
508
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/968fe51da0854eac0e0aeac6ec8b86856c6bd83e",
509
-                "reference": "968fe51da0854eac0e0aeac6ec8b86856c6bd83e",
508
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ea3563a7f10fa562796f712fa306c1dca41a45d7",
509
+                "reference": "ea3563a7f10fa562796f712fa306c1dca41a45d7",
510 510
                 "shasum": ""
511 511
             },
512 512
             "require": {
@@ -589,9 +589,9 @@
589 589
             "support": {
590 590
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
591 591
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
592
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.322.5"
592
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.322.7"
593 593
             },
594
-            "time": "2024-09-25T18:14:27+00:00"
594
+            "time": "2024-09-27T18:34:08+00:00"
595 595
         },
596 596
         {
597 597
             "name": "aws/aws-sdk-php-laravel",
@@ -1738,16 +1738,16 @@
1738 1738
         },
1739 1739
         {
1740 1740
             "name": "filament/actions",
1741
-            "version": "v3.2.114",
1741
+            "version": "v3.2.115",
1742 1742
             "source": {
1743 1743
                 "type": "git",
1744 1744
                 "url": "https://github.com/filamentphp/actions.git",
1745
-                "reference": "4cf93bf9ff04a76a9256ce6df88216583aeccb15"
1745
+                "reference": "38c6eb00c7e3265907b37482c2dfd411c6f910c9"
1746 1746
             },
1747 1747
             "dist": {
1748 1748
                 "type": "zip",
1749
-                "url": "https://api.github.com/repos/filamentphp/actions/zipball/4cf93bf9ff04a76a9256ce6df88216583aeccb15",
1750
-                "reference": "4cf93bf9ff04a76a9256ce6df88216583aeccb15",
1749
+                "url": "https://api.github.com/repos/filamentphp/actions/zipball/38c6eb00c7e3265907b37482c2dfd411c6f910c9",
1750
+                "reference": "38c6eb00c7e3265907b37482c2dfd411c6f910c9",
1751 1751
                 "shasum": ""
1752 1752
             },
1753 1753
             "require": {
@@ -1787,20 +1787,20 @@
1787 1787
                 "issues": "https://github.com/filamentphp/filament/issues",
1788 1788
                 "source": "https://github.com/filamentphp/filament"
1789 1789
             },
1790
-            "time": "2024-09-17T08:30:20+00:00"
1790
+            "time": "2024-09-27T13:16:08+00:00"
1791 1791
         },
1792 1792
         {
1793 1793
             "name": "filament/filament",
1794
-            "version": "v3.2.114",
1794
+            "version": "v3.2.115",
1795 1795
             "source": {
1796 1796
                 "type": "git",
1797 1797
                 "url": "https://github.com/filamentphp/panels.git",
1798
-                "reference": "8d28c9756a341349a5d7a0694a66be7cc2c986c3"
1798
+                "reference": "8d0f0e7101c14fe2f00490172452767f16b39f02"
1799 1799
             },
1800 1800
             "dist": {
1801 1801
                 "type": "zip",
1802
-                "url": "https://api.github.com/repos/filamentphp/panels/zipball/8d28c9756a341349a5d7a0694a66be7cc2c986c3",
1803
-                "reference": "8d28c9756a341349a5d7a0694a66be7cc2c986c3",
1802
+                "url": "https://api.github.com/repos/filamentphp/panels/zipball/8d0f0e7101c14fe2f00490172452767f16b39f02",
1803
+                "reference": "8d0f0e7101c14fe2f00490172452767f16b39f02",
1804 1804
                 "shasum": ""
1805 1805
             },
1806 1806
             "require": {
@@ -1852,20 +1852,20 @@
1852 1852
                 "issues": "https://github.com/filamentphp/filament/issues",
1853 1853
                 "source": "https://github.com/filamentphp/filament"
1854 1854
             },
1855
-            "time": "2024-09-23T14:09:56+00:00"
1855
+            "time": "2024-09-27T13:16:11+00:00"
1856 1856
         },
1857 1857
         {
1858 1858
             "name": "filament/forms",
1859
-            "version": "v3.2.114",
1859
+            "version": "v3.2.115",
1860 1860
             "source": {
1861 1861
                 "type": "git",
1862 1862
                 "url": "https://github.com/filamentphp/forms.git",
1863
-                "reference": "46a42dbc18f9273a3a59c54e94222fa62855c702"
1863
+                "reference": "ffa33043ea0ee67a4eed58535687f87311e4256b"
1864 1864
             },
1865 1865
             "dist": {
1866 1866
                 "type": "zip",
1867
-                "url": "https://api.github.com/repos/filamentphp/forms/zipball/46a42dbc18f9273a3a59c54e94222fa62855c702",
1868
-                "reference": "46a42dbc18f9273a3a59c54e94222fa62855c702",
1867
+                "url": "https://api.github.com/repos/filamentphp/forms/zipball/ffa33043ea0ee67a4eed58535687f87311e4256b",
1868
+                "reference": "ffa33043ea0ee67a4eed58535687f87311e4256b",
1869 1869
                 "shasum": ""
1870 1870
             },
1871 1871
             "require": {
@@ -1908,20 +1908,20 @@
1908 1908
                 "issues": "https://github.com/filamentphp/filament/issues",
1909 1909
                 "source": "https://github.com/filamentphp/filament"
1910 1910
             },
1911
-            "time": "2024-09-17T08:30:15+00:00"
1911
+            "time": "2024-09-27T13:16:04+00:00"
1912 1912
         },
1913 1913
         {
1914 1914
             "name": "filament/infolists",
1915
-            "version": "v3.2.114",
1915
+            "version": "v3.2.115",
1916 1916
             "source": {
1917 1917
                 "type": "git",
1918 1918
                 "url": "https://github.com/filamentphp/infolists.git",
1919
-                "reference": "dd6e2319aea92c5444c52792c750edfeb057f62a"
1919
+                "reference": "d4d3030644e3617aed252a5df3c385145ada0ec6"
1920 1920
             },
1921 1921
             "dist": {
1922 1922
                 "type": "zip",
1923
-                "url": "https://api.github.com/repos/filamentphp/infolists/zipball/dd6e2319aea92c5444c52792c750edfeb057f62a",
1924
-                "reference": "dd6e2319aea92c5444c52792c750edfeb057f62a",
1923
+                "url": "https://api.github.com/repos/filamentphp/infolists/zipball/d4d3030644e3617aed252a5df3c385145ada0ec6",
1924
+                "reference": "d4d3030644e3617aed252a5df3c385145ada0ec6",
1925 1925
                 "shasum": ""
1926 1926
             },
1927 1927
             "require": {
@@ -1959,20 +1959,20 @@
1959 1959
                 "issues": "https://github.com/filamentphp/filament/issues",
1960 1960
                 "source": "https://github.com/filamentphp/filament"
1961 1961
             },
1962
-            "time": "2024-09-17T08:30:15+00:00"
1962
+            "time": "2024-09-27T13:16:10+00:00"
1963 1963
         },
1964 1964
         {
1965 1965
             "name": "filament/notifications",
1966
-            "version": "v3.2.114",
1966
+            "version": "v3.2.115",
1967 1967
             "source": {
1968 1968
                 "type": "git",
1969 1969
                 "url": "https://github.com/filamentphp/notifications.git",
1970
-                "reference": "03ea56e0729c98c65831ab0215285a7cb1c4117f"
1970
+                "reference": "0272612e1d54e0520f8717b24c71b9b70f198c8f"
1971 1971
             },
1972 1972
             "dist": {
1973 1973
                 "type": "zip",
1974
-                "url": "https://api.github.com/repos/filamentphp/notifications/zipball/03ea56e0729c98c65831ab0215285a7cb1c4117f",
1975
-                "reference": "03ea56e0729c98c65831ab0215285a7cb1c4117f",
1974
+                "url": "https://api.github.com/repos/filamentphp/notifications/zipball/0272612e1d54e0520f8717b24c71b9b70f198c8f",
1975
+                "reference": "0272612e1d54e0520f8717b24c71b9b70f198c8f",
1976 1976
                 "shasum": ""
1977 1977
             },
1978 1978
             "require": {
@@ -2011,20 +2011,20 @@
2011 2011
                 "issues": "https://github.com/filamentphp/filament/issues",
2012 2012
                 "source": "https://github.com/filamentphp/filament"
2013 2013
             },
2014
-            "time": "2024-07-31T11:53:11+00:00"
2014
+            "time": "2024-09-27T13:16:07+00:00"
2015 2015
         },
2016 2016
         {
2017 2017
             "name": "filament/support",
2018
-            "version": "v3.2.114",
2018
+            "version": "v3.2.115",
2019 2019
             "source": {
2020 2020
                 "type": "git",
2021 2021
                 "url": "https://github.com/filamentphp/support.git",
2022
-                "reference": "2183eb1149ef9ab742256155adf2afedda322e6d"
2022
+                "reference": "6dba51efd6f2a32db21bc8684cd663915ab0e4d7"
2023 2023
             },
2024 2024
             "dist": {
2025 2025
                 "type": "zip",
2026
-                "url": "https://api.github.com/repos/filamentphp/support/zipball/2183eb1149ef9ab742256155adf2afedda322e6d",
2027
-                "reference": "2183eb1149ef9ab742256155adf2afedda322e6d",
2026
+                "url": "https://api.github.com/repos/filamentphp/support/zipball/6dba51efd6f2a32db21bc8684cd663915ab0e4d7",
2027
+                "reference": "6dba51efd6f2a32db21bc8684cd663915ab0e4d7",
2028 2028
                 "shasum": ""
2029 2029
             },
2030 2030
             "require": {
@@ -2070,20 +2070,20 @@
2070 2070
                 "issues": "https://github.com/filamentphp/filament/issues",
2071 2071
                 "source": "https://github.com/filamentphp/filament"
2072 2072
             },
2073
-            "time": "2024-09-23T14:10:13+00:00"
2073
+            "time": "2024-09-27T13:16:20+00:00"
2074 2074
         },
2075 2075
         {
2076 2076
             "name": "filament/tables",
2077
-            "version": "v3.2.114",
2077
+            "version": "v3.2.115",
2078 2078
             "source": {
2079 2079
                 "type": "git",
2080 2080
                 "url": "https://github.com/filamentphp/tables.git",
2081
-                "reference": "75acf6f38a8ccfded57dc62bc3af0dd0bb04069d"
2081
+                "reference": "07226fcd080f0f547aac31cf5117bfab192ea770"
2082 2082
             },
2083 2083
             "dist": {
2084 2084
                 "type": "zip",
2085
-                "url": "https://api.github.com/repos/filamentphp/tables/zipball/75acf6f38a8ccfded57dc62bc3af0dd0bb04069d",
2086
-                "reference": "75acf6f38a8ccfded57dc62bc3af0dd0bb04069d",
2085
+                "url": "https://api.github.com/repos/filamentphp/tables/zipball/07226fcd080f0f547aac31cf5117bfab192ea770",
2086
+                "reference": "07226fcd080f0f547aac31cf5117bfab192ea770",
2087 2087
                 "shasum": ""
2088 2088
             },
2089 2089
             "require": {
@@ -2122,11 +2122,11 @@
2122 2122
                 "issues": "https://github.com/filamentphp/filament/issues",
2123 2123
                 "source": "https://github.com/filamentphp/filament"
2124 2124
             },
2125
-            "time": "2024-09-17T08:30:46+00:00"
2125
+            "time": "2024-09-27T13:16:23+00:00"
2126 2126
         },
2127 2127
         {
2128 2128
             "name": "filament/widgets",
2129
-            "version": "v3.2.114",
2129
+            "version": "v3.2.115",
2130 2130
             "source": {
2131 2131
                 "type": "git",
2132 2132
                 "url": "https://github.com/filamentphp/widgets.git",
@@ -2981,16 +2981,16 @@
2981 2981
         },
2982 2982
         {
2983 2983
             "name": "laravel/framework",
2984
-            "version": "v11.24.1",
2984
+            "version": "v11.25.0",
2985 2985
             "source": {
2986 2986
                 "type": "git",
2987 2987
                 "url": "https://github.com/laravel/framework.git",
2988
-                "reference": "e063fa80ac5818099f45a3a57dd803476c8f3a2a"
2988
+                "reference": "b487a9089c0b1c71ac63bb6bc44fb4b00dc6da2e"
2989 2989
             },
2990 2990
             "dist": {
2991 2991
                 "type": "zip",
2992
-                "url": "https://api.github.com/repos/laravel/framework/zipball/e063fa80ac5818099f45a3a57dd803476c8f3a2a",
2993
-                "reference": "e063fa80ac5818099f45a3a57dd803476c8f3a2a",
2992
+                "url": "https://api.github.com/repos/laravel/framework/zipball/b487a9089c0b1c71ac63bb6bc44fb4b00dc6da2e",
2993
+                "reference": "b487a9089c0b1c71ac63bb6bc44fb4b00dc6da2e",
2994 2994
                 "shasum": ""
2995 2995
             },
2996 2996
             "require": {
@@ -3186,7 +3186,7 @@
3186 3186
                 "issues": "https://github.com/laravel/framework/issues",
3187 3187
                 "source": "https://github.com/laravel/framework"
3188 3188
             },
3189
-            "time": "2024-09-25T07:21:24+00:00"
3189
+            "time": "2024-09-26T11:21:58+00:00"
3190 3190
         },
3191 3191
         {
3192 3192
             "name": "laravel/prompts",
@@ -10000,16 +10000,16 @@
10000 10000
         },
10001 10001
         {
10002 10002
             "name": "pestphp/pest",
10003
-            "version": "v3.2.3",
10003
+            "version": "v3.2.4",
10004 10004
             "source": {
10005 10005
                 "type": "git",
10006 10006
                 "url": "https://github.com/pestphp/pest.git",
10007
-                "reference": "4e2987d438a3c3b2f291d2c991049544ab2f52bb"
10007
+                "reference": "5fe79d9c18a674e9cce2f36f365516c26ae87b49"
10008 10008
             },
10009 10009
             "dist": {
10010 10010
                 "type": "zip",
10011
-                "url": "https://api.github.com/repos/pestphp/pest/zipball/4e2987d438a3c3b2f291d2c991049544ab2f52bb",
10012
-                "reference": "4e2987d438a3c3b2f291d2c991049544ab2f52bb",
10011
+                "url": "https://api.github.com/repos/pestphp/pest/zipball/5fe79d9c18a674e9cce2f36f365516c26ae87b49",
10012
+                "reference": "5fe79d9c18a674e9cce2f36f365516c26ae87b49",
10013 10013
                 "shasum": ""
10014 10014
             },
10015 10015
             "require": {
@@ -10095,7 +10095,7 @@
10095 10095
             ],
10096 10096
             "support": {
10097 10097
                 "issues": "https://github.com/pestphp/pest/issues",
10098
-                "source": "https://github.com/pestphp/pest/tree/v3.2.3"
10098
+                "source": "https://github.com/pestphp/pest/tree/v3.2.4"
10099 10099
             },
10100 10100
             "funding": [
10101 10101
                 {
@@ -10107,7 +10107,7 @@
10107 10107
                     "type": "github"
10108 10108
                 }
10109 10109
             ],
10110
-            "time": "2024-09-25T15:19:39+00:00"
10110
+            "time": "2024-09-26T22:53:39+00:00"
10111 10111
         },
10112 10112
         {
10113 10113
             "name": "pestphp/pest-plugin",
@@ -10810,16 +10810,16 @@
10810 10810
         },
10811 10811
         {
10812 10812
             "name": "phpstan/phpdoc-parser",
10813
-            "version": "1.31.0",
10813
+            "version": "1.32.0",
10814 10814
             "source": {
10815 10815
                 "type": "git",
10816 10816
                 "url": "https://github.com/phpstan/phpdoc-parser.git",
10817
-                "reference": "249f15fb843bf240cf058372dad29e100cee6c17"
10817
+                "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4"
10818 10818
             },
10819 10819
             "dist": {
10820 10820
                 "type": "zip",
10821
-                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17",
10822
-                "reference": "249f15fb843bf240cf058372dad29e100cee6c17",
10821
+                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
10822
+                "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
10823 10823
                 "shasum": ""
10824 10824
             },
10825 10825
             "require": {
@@ -10851,22 +10851,22 @@
10851 10851
             "description": "PHPDoc parser with support for nullable, intersection and generic types",
10852 10852
             "support": {
10853 10853
                 "issues": "https://github.com/phpstan/phpdoc-parser/issues",
10854
-                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0"
10854
+                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.32.0"
10855 10855
             },
10856
-            "time": "2024-09-22T11:32:18+00:00"
10856
+            "time": "2024-09-26T07:23:32+00:00"
10857 10857
         },
10858 10858
         {
10859 10859
             "name": "phpstan/phpstan",
10860
-            "version": "1.12.4",
10860
+            "version": "1.12.5",
10861 10861
             "source": {
10862 10862
                 "type": "git",
10863 10863
                 "url": "https://github.com/phpstan/phpstan.git",
10864
-                "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd"
10864
+                "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17"
10865 10865
             },
10866 10866
             "dist": {
10867 10867
                 "type": "zip",
10868
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa517cb918591b93acc9b95c0bebdcd0e4538bd",
10869
-                "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd",
10868
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
10869
+                "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
10870 10870
                 "shasum": ""
10871 10871
             },
10872 10872
             "require": {
@@ -10911,7 +10911,7 @@
10911 10911
                     "type": "github"
10912 10912
                 }
10913 10913
             ],
10914
-            "time": "2024-09-19T07:58:01+00:00"
10914
+            "time": "2024-09-26T12:45:22+00:00"
10915 10915
         },
10916 10916
         {
10917 10917
             "name": "phpunit/php-code-coverage",

+ 103
- 103
package-lock.json 查看文件

@@ -5,15 +5,15 @@
5 5
     "packages": {
6 6
         "": {
7 7
             "devDependencies": {
8
-                "@tailwindcss/forms": "^0.5.7",
9
-                "@tailwindcss/typography": "^0.5.13",
10
-                "autoprefixer": "^10.4.19",
11
-                "axios": "^1.7.2",
8
+                "@tailwindcss/forms": "^0.5.9",
9
+                "@tailwindcss/typography": "^0.5.15",
10
+                "autoprefixer": "^10.4.20",
11
+                "axios": "^1.7.7",
12 12
                 "laravel-vite-plugin": "^1.0",
13
-                "postcss": "^8.4.38",
14
-                "postcss-nesting": "^12.1.5",
15
-                "tailwindcss": "^3.4.4",
16
-                "vite": "^5.3"
13
+                "postcss": "^8.4.47",
14
+                "postcss-nesting": "^13.0.0",
15
+                "tailwindcss": "^3.4.13",
16
+                "vite": "^5.4"
17 17
             }
18 18
         },
19 19
         "node_modules/@alloc/quick-lru": {
@@ -541,9 +541,9 @@
541 541
             }
542 542
         },
543 543
         "node_modules/@rollup/rollup-android-arm-eabi": {
544
-            "version": "4.22.4",
545
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz",
546
-            "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==",
544
+            "version": "4.22.5",
545
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz",
546
+            "integrity": "sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==",
547 547
             "cpu": [
548 548
                 "arm"
549 549
             ],
@@ -555,9 +555,9 @@
555 555
             ]
556 556
         },
557 557
         "node_modules/@rollup/rollup-android-arm64": {
558
-            "version": "4.22.4",
559
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz",
560
-            "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==",
558
+            "version": "4.22.5",
559
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.5.tgz",
560
+            "integrity": "sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==",
561 561
             "cpu": [
562 562
                 "arm64"
563 563
             ],
@@ -569,9 +569,9 @@
569 569
             ]
570 570
         },
571 571
         "node_modules/@rollup/rollup-darwin-arm64": {
572
-            "version": "4.22.4",
573
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz",
574
-            "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==",
572
+            "version": "4.22.5",
573
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.5.tgz",
574
+            "integrity": "sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==",
575 575
             "cpu": [
576 576
                 "arm64"
577 577
             ],
@@ -583,9 +583,9 @@
583 583
             ]
584 584
         },
585 585
         "node_modules/@rollup/rollup-darwin-x64": {
586
-            "version": "4.22.4",
587
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz",
588
-            "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==",
586
+            "version": "4.22.5",
587
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.5.tgz",
588
+            "integrity": "sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==",
589 589
             "cpu": [
590 590
                 "x64"
591 591
             ],
@@ -597,9 +597,9 @@
597 597
             ]
598 598
         },
599 599
         "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
600
-            "version": "4.22.4",
601
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz",
602
-            "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==",
600
+            "version": "4.22.5",
601
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.5.tgz",
602
+            "integrity": "sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==",
603 603
             "cpu": [
604 604
                 "arm"
605 605
             ],
@@ -611,9 +611,9 @@
611 611
             ]
612 612
         },
613 613
         "node_modules/@rollup/rollup-linux-arm-musleabihf": {
614
-            "version": "4.22.4",
615
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz",
616
-            "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==",
614
+            "version": "4.22.5",
615
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.5.tgz",
616
+            "integrity": "sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==",
617 617
             "cpu": [
618 618
                 "arm"
619 619
             ],
@@ -625,9 +625,9 @@
625 625
             ]
626 626
         },
627 627
         "node_modules/@rollup/rollup-linux-arm64-gnu": {
628
-            "version": "4.22.4",
629
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz",
630
-            "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==",
628
+            "version": "4.22.5",
629
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.5.tgz",
630
+            "integrity": "sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==",
631 631
             "cpu": [
632 632
                 "arm64"
633 633
             ],
@@ -639,9 +639,9 @@
639 639
             ]
640 640
         },
641 641
         "node_modules/@rollup/rollup-linux-arm64-musl": {
642
-            "version": "4.22.4",
643
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz",
644
-            "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==",
642
+            "version": "4.22.5",
643
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.5.tgz",
644
+            "integrity": "sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==",
645 645
             "cpu": [
646 646
                 "arm64"
647 647
             ],
@@ -653,9 +653,9 @@
653 653
             ]
654 654
         },
655 655
         "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
656
-            "version": "4.22.4",
657
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz",
658
-            "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==",
656
+            "version": "4.22.5",
657
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.5.tgz",
658
+            "integrity": "sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==",
659 659
             "cpu": [
660 660
                 "ppc64"
661 661
             ],
@@ -667,9 +667,9 @@
667 667
             ]
668 668
         },
669 669
         "node_modules/@rollup/rollup-linux-riscv64-gnu": {
670
-            "version": "4.22.4",
671
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz",
672
-            "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==",
670
+            "version": "4.22.5",
671
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.5.tgz",
672
+            "integrity": "sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==",
673 673
             "cpu": [
674 674
                 "riscv64"
675 675
             ],
@@ -681,9 +681,9 @@
681 681
             ]
682 682
         },
683 683
         "node_modules/@rollup/rollup-linux-s390x-gnu": {
684
-            "version": "4.22.4",
685
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz",
686
-            "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==",
684
+            "version": "4.22.5",
685
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.5.tgz",
686
+            "integrity": "sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==",
687 687
             "cpu": [
688 688
                 "s390x"
689 689
             ],
@@ -695,9 +695,9 @@
695 695
             ]
696 696
         },
697 697
         "node_modules/@rollup/rollup-linux-x64-gnu": {
698
-            "version": "4.22.4",
699
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz",
700
-            "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==",
698
+            "version": "4.22.5",
699
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.5.tgz",
700
+            "integrity": "sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==",
701 701
             "cpu": [
702 702
                 "x64"
703 703
             ],
@@ -709,9 +709,9 @@
709 709
             ]
710 710
         },
711 711
         "node_modules/@rollup/rollup-linux-x64-musl": {
712
-            "version": "4.22.4",
713
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz",
714
-            "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==",
712
+            "version": "4.22.5",
713
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.5.tgz",
714
+            "integrity": "sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==",
715 715
             "cpu": [
716 716
                 "x64"
717 717
             ],
@@ -723,9 +723,9 @@
723 723
             ]
724 724
         },
725 725
         "node_modules/@rollup/rollup-win32-arm64-msvc": {
726
-            "version": "4.22.4",
727
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz",
728
-            "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==",
726
+            "version": "4.22.5",
727
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.5.tgz",
728
+            "integrity": "sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==",
729 729
             "cpu": [
730 730
                 "arm64"
731 731
             ],
@@ -737,9 +737,9 @@
737 737
             ]
738 738
         },
739 739
         "node_modules/@rollup/rollup-win32-ia32-msvc": {
740
-            "version": "4.22.4",
741
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz",
742
-            "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==",
740
+            "version": "4.22.5",
741
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.5.tgz",
742
+            "integrity": "sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==",
743 743
             "cpu": [
744 744
                 "ia32"
745 745
             ],
@@ -751,9 +751,9 @@
751 751
             ]
752 752
         },
753 753
         "node_modules/@rollup/rollup-win32-x64-msvc": {
754
-            "version": "4.22.4",
755
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz",
756
-            "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==",
754
+            "version": "4.22.5",
755
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.5.tgz",
756
+            "integrity": "sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==",
757 757
             "cpu": [
758 758
                 "x64"
759 759
             ],
@@ -794,9 +794,9 @@
794 794
             }
795 795
         },
796 796
         "node_modules/@types/estree": {
797
-            "version": "1.0.5",
798
-            "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
799
-            "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
797
+            "version": "1.0.6",
798
+            "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
799
+            "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
800 800
             "dev": true,
801 801
             "license": "MIT"
802 802
         },
@@ -1745,9 +1745,9 @@
1745 1745
             }
1746 1746
         },
1747 1747
         "node_modules/package-json-from-dist": {
1748
-            "version": "1.0.0",
1749
-            "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
1750
-            "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==",
1748
+            "version": "1.0.1",
1749
+            "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
1750
+            "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
1751 1751
             "dev": true,
1752 1752
             "license": "BlueOak-1.0.0"
1753 1753
         },
@@ -1982,9 +1982,9 @@
1982 1982
             }
1983 1983
         },
1984 1984
         "node_modules/postcss-nesting": {
1985
-            "version": "12.1.5",
1986
-            "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.1.5.tgz",
1987
-            "integrity": "sha512-N1NgI1PDCiAGWPTYrwqm8wpjv0bgDmkYHH72pNsqTCv9CObxjxftdYu6AKtGN+pnJa7FQjMm3v4sp8QJbFsYdQ==",
1985
+            "version": "13.0.0",
1986
+            "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-13.0.0.tgz",
1987
+            "integrity": "sha512-TCGQOizyqvEkdeTPM+t6NYwJ3EJszYE/8t8ILxw/YoeUvz2rz7aM8XTAmBWh9/DJjfaaabL88fWrsVHSPF2zgA==",
1988 1988
             "dev": true,
1989 1989
             "funding": [
1990 1990
                 {
@@ -1998,21 +1998,21 @@
1998 1998
             ],
1999 1999
             "license": "MIT-0",
2000 2000
             "dependencies": {
2001
-                "@csstools/selector-resolve-nested": "^1.1.0",
2002
-                "@csstools/selector-specificity": "^3.1.1",
2001
+                "@csstools/selector-resolve-nested": "^2.0.0",
2002
+                "@csstools/selector-specificity": "^4.0.0",
2003 2003
                 "postcss-selector-parser": "^6.1.0"
2004 2004
             },
2005 2005
             "engines": {
2006
-                "node": "^14 || ^16 || >=18"
2006
+                "node": ">=18"
2007 2007
             },
2008 2008
             "peerDependencies": {
2009 2009
                 "postcss": "^8.4"
2010 2010
             }
2011 2011
         },
2012 2012
         "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": {
2013
-            "version": "1.1.0",
2014
-            "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz",
2015
-            "integrity": "sha512-uWvSaeRcHyeNenKg8tp17EVDRkpflmdyvbE0DHo6D/GdBb6PDnCYYU6gRpXhtICMGMcahQmj2zGxwFM/WC8hCg==",
2013
+            "version": "2.0.0",
2014
+            "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-2.0.0.tgz",
2015
+            "integrity": "sha512-oklSrRvOxNeeOW1yARd4WNCs/D09cQjunGZUgSq6vM8GpzFswN+8rBZyJA29YFZhOTQ6GFzxgLDNtVbt9wPZMA==",
2016 2016
             "dev": true,
2017 2017
             "funding": [
2018 2018
                 {
@@ -2026,16 +2026,16 @@
2026 2026
             ],
2027 2027
             "license": "MIT-0",
2028 2028
             "engines": {
2029
-                "node": "^14 || ^16 || >=18"
2029
+                "node": ">=18"
2030 2030
             },
2031 2031
             "peerDependencies": {
2032
-                "postcss-selector-parser": "^6.0.13"
2032
+                "postcss-selector-parser": "^6.1.0"
2033 2033
             }
2034 2034
         },
2035 2035
         "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": {
2036
-            "version": "3.1.1",
2037
-            "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz",
2038
-            "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==",
2036
+            "version": "4.0.0",
2037
+            "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz",
2038
+            "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==",
2039 2039
             "dev": true,
2040 2040
             "funding": [
2041 2041
                 {
@@ -2049,10 +2049,10 @@
2049 2049
             ],
2050 2050
             "license": "MIT-0",
2051 2051
             "engines": {
2052
-                "node": "^14 || ^16 || >=18"
2052
+                "node": ">=18"
2053 2053
             },
2054 2054
             "peerDependencies": {
2055
-                "postcss-selector-parser": "^6.0.13"
2055
+                "postcss-selector-parser": "^6.1.0"
2056 2056
             }
2057 2057
         },
2058 2058
         "node_modules/postcss-nesting/node_modules/postcss-selector-parser": {
@@ -2171,13 +2171,13 @@
2171 2171
             }
2172 2172
         },
2173 2173
         "node_modules/rollup": {
2174
-            "version": "4.22.4",
2175
-            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz",
2176
-            "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==",
2174
+            "version": "4.22.5",
2175
+            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.5.tgz",
2176
+            "integrity": "sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==",
2177 2177
             "dev": true,
2178 2178
             "license": "MIT",
2179 2179
             "dependencies": {
2180
-                "@types/estree": "1.0.5"
2180
+                "@types/estree": "1.0.6"
2181 2181
             },
2182 2182
             "bin": {
2183 2183
                 "rollup": "dist/bin/rollup"
@@ -2187,22 +2187,22 @@
2187 2187
                 "npm": ">=8.0.0"
2188 2188
             },
2189 2189
             "optionalDependencies": {
2190
-                "@rollup/rollup-android-arm-eabi": "4.22.4",
2191
-                "@rollup/rollup-android-arm64": "4.22.4",
2192
-                "@rollup/rollup-darwin-arm64": "4.22.4",
2193
-                "@rollup/rollup-darwin-x64": "4.22.4",
2194
-                "@rollup/rollup-linux-arm-gnueabihf": "4.22.4",
2195
-                "@rollup/rollup-linux-arm-musleabihf": "4.22.4",
2196
-                "@rollup/rollup-linux-arm64-gnu": "4.22.4",
2197
-                "@rollup/rollup-linux-arm64-musl": "4.22.4",
2198
-                "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4",
2199
-                "@rollup/rollup-linux-riscv64-gnu": "4.22.4",
2200
-                "@rollup/rollup-linux-s390x-gnu": "4.22.4",
2201
-                "@rollup/rollup-linux-x64-gnu": "4.22.4",
2202
-                "@rollup/rollup-linux-x64-musl": "4.22.4",
2203
-                "@rollup/rollup-win32-arm64-msvc": "4.22.4",
2204
-                "@rollup/rollup-win32-ia32-msvc": "4.22.4",
2205
-                "@rollup/rollup-win32-x64-msvc": "4.22.4",
2190
+                "@rollup/rollup-android-arm-eabi": "4.22.5",
2191
+                "@rollup/rollup-android-arm64": "4.22.5",
2192
+                "@rollup/rollup-darwin-arm64": "4.22.5",
2193
+                "@rollup/rollup-darwin-x64": "4.22.5",
2194
+                "@rollup/rollup-linux-arm-gnueabihf": "4.22.5",
2195
+                "@rollup/rollup-linux-arm-musleabihf": "4.22.5",
2196
+                "@rollup/rollup-linux-arm64-gnu": "4.22.5",
2197
+                "@rollup/rollup-linux-arm64-musl": "4.22.5",
2198
+                "@rollup/rollup-linux-powerpc64le-gnu": "4.22.5",
2199
+                "@rollup/rollup-linux-riscv64-gnu": "4.22.5",
2200
+                "@rollup/rollup-linux-s390x-gnu": "4.22.5",
2201
+                "@rollup/rollup-linux-x64-gnu": "4.22.5",
2202
+                "@rollup/rollup-linux-x64-musl": "4.22.5",
2203
+                "@rollup/rollup-win32-arm64-msvc": "4.22.5",
2204
+                "@rollup/rollup-win32-ia32-msvc": "4.22.5",
2205
+                "@rollup/rollup-win32-x64-msvc": "4.22.5",
2206 2206
                 "fsevents": "~2.3.2"
2207 2207
             }
2208 2208
         },
@@ -2512,9 +2512,9 @@
2512 2512
             "license": "Apache-2.0"
2513 2513
         },
2514 2514
         "node_modules/update-browserslist-db": {
2515
-            "version": "1.1.0",
2516
-            "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz",
2517
-            "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==",
2515
+            "version": "1.1.1",
2516
+            "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
2517
+            "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
2518 2518
             "dev": true,
2519 2519
             "funding": [
2520 2520
                 {
@@ -2532,8 +2532,8 @@
2532 2532
             ],
2533 2533
             "license": "MIT",
2534 2534
             "dependencies": {
2535
-                "escalade": "^3.1.2",
2536
-                "picocolors": "^1.0.1"
2535
+                "escalade": "^3.2.0",
2536
+                "picocolors": "^1.1.0"
2537 2537
             },
2538 2538
             "bin": {
2539 2539
                 "update-browserslist-db": "cli.js"

+ 8
- 8
package.json 查看文件

@@ -6,14 +6,14 @@
6 6
         "build": "vite build"
7 7
     },
8 8
     "devDependencies": {
9
-        "@tailwindcss/forms": "^0.5.7",
10
-        "@tailwindcss/typography": "^0.5.13",
11
-        "autoprefixer": "^10.4.19",
12
-        "axios": "^1.7.2",
9
+        "@tailwindcss/forms": "^0.5.9",
10
+        "@tailwindcss/typography": "^0.5.15",
11
+        "autoprefixer": "^10.4.20",
12
+        "axios": "^1.7.7",
13 13
         "laravel-vite-plugin": "^1.0",
14
-        "postcss": "^8.4.38",
15
-        "postcss-nesting": "^12.1.5",
16
-        "tailwindcss": "^3.4.4",
17
-        "vite": "^5.3"
14
+        "postcss": "^8.4.47",
15
+        "postcss-nesting": "^13.0.0",
16
+        "tailwindcss": "^3.4.13",
17
+        "vite": "^5.4"
18 18
     }
19 19
 }

+ 3
- 8
tests/Feature/Reports/AccountBalancesReportTest.php 查看文件

@@ -1,6 +1,7 @@
1 1
 <?php
2 2
 
3 3
 use App\Facades\Accounting;
4
+use App\Facades\Reporting;
4 5
 use App\Factories\ReportDateFactory;
5 6
 use App\Filament\Company\Pages\Reports\AccountBalances;
6 7
 use App\Models\Accounting\Transaction;
@@ -42,16 +43,13 @@ it('correctly builds an account balances report for the current fiscal year', fu
42 43
 
43 44
     $defaultBankAccountAccount = $testCompany->default->bankAccount->account;
44 45
 
45
-    $fields = $defaultBankAccountAccount->category->getRelevantBalanceFields();
46
-
47 46
     $expectedBalances = Accounting::getBalances(
48 47
         $defaultBankAccountAccount,
49 48
         $defaultStartDate->toDateString(),
50 49
         $defaultEndDate->toDateString(),
51
-        $fields
52 50
     );
53 51
 
54
-    $formattedExpectedBalances = formatReportBalances($expectedBalances);
52
+    $formattedExpectedBalances = Reporting::formatBalances($expectedBalances);
55 53
 
56 54
     livewire(AccountBalances::class)
57 55
         ->assertFormSet([
@@ -111,16 +109,13 @@ it('correctly builds an account balances report for the previous fiscal year', f
111 109
 
112 110
     $defaultBankAccountAccount = $testCompany->default->bankAccount->account;
113 111
 
114
-    $fields = $defaultBankAccountAccount->category->getRelevantBalanceFields();
115
-
116 112
     $expectedBalancesSubYear = Accounting::getBalances(
117 113
         $defaultBankAccountAccount,
118 114
         $defaultStartDate->subYear()->startOfYear()->toDateString(),
119 115
         $defaultEndDate->subYear()->endOfYear()->toDateString(),
120
-        $fields
121 116
     );
122 117
 
123
-    $formattedExpectedBalancesSubYear = formatReportBalances($expectedBalancesSubYear);
118
+    $formattedExpectedBalancesSubYear = Reporting::formatBalances($expectedBalancesSubYear);
124 119
 
125 120
     livewire(AccountBalances::class)
126 121
         ->assertFormSet([

+ 31
- 21
tests/Feature/Reports/TrialBalanceReportTest.php 查看文件

@@ -1,11 +1,10 @@
1 1
 <?php
2 2
 
3 3
 use App\Facades\Accounting;
4
+use App\Facades\Reporting;
4 5
 use App\Factories\ReportDateFactory;
5 6
 use App\Filament\Company\Pages\Reports\TrialBalance;
6 7
 use App\Models\Accounting\Transaction;
7
-use App\Services\AccountService;
8
-use App\Services\ReportService;
9 8
 
10 9
 use function Pest\Livewire\livewire;
11 10
 
@@ -47,18 +46,15 @@ it('correctly builds a standard trial balance report', function () {
47 46
     $defaultBankAccountAccount = $testCompany->default->bankAccount->account;
48 47
     $earliestTransactionDate = $reportDates->refresh()->earliestTransactionDate;
49 48
 
50
-    $fields = $defaultBankAccountAccount->category->getRelevantBalanceFields();
51
-
52 49
     $expectedBalances = Accounting::getBalances(
53 50
         $defaultBankAccountAccount,
54 51
         $earliestTransactionDate->toDateString(),
55 52
         $defaultEndDate->toDateString(),
56
-        $fields
57 53
     );
58 54
 
59
-    $calculatedTrialBalances = calculateTrialBalances($defaultBankAccountAccount->category, $expectedBalances['ending_balance']);
55
+    $calculatedTrialBalances = Reporting::calculateTrialBalances($defaultBankAccountAccount->category, $expectedBalances['ending_balance']);
60 56
 
61
-    $formattedExpectedBalances = formatReportBalances($calculatedTrialBalances);
57
+    $formattedExpectedBalances = Reporting::formatBalances($calculatedTrialBalances);
62 58
 
63 59
     livewire(TrialBalance::class)
64 60
         ->assertFormSet([
@@ -74,6 +70,7 @@ it('correctly builds a standard trial balance report', function () {
74 70
         ->call('applyFilters')
75 71
         ->assertDontSeeText('Retained Earnings')
76 72
         ->assertSeeTextInOrder([
73
+            $defaultBankAccountAccount->code,
77 74
             $defaultBankAccountAccount->name,
78 75
             $formattedExpectedBalances->debitBalance,
79 76
             $formattedExpectedBalances->creditBalance,
@@ -117,23 +114,19 @@ it('correctly builds a post-closing trial balance report', function () {
117 114
         ->create();
118 115
 
119 116
     $defaultBankAccountAccount = $testCompany->default->bankAccount->account;
120
-    $earliestTransactionDate = $reportDates->refresh()->earliestTransactionDate->toImmutable();
121
-
122
-    $fields = $defaultBankAccountAccount->category->getRelevantBalanceFields();
123
-
124
-    $accountService = app(AccountService::class);
125
-
126
-    $balances = $accountService->getAccountBalances($earliestTransactionDate->toDateTimeString(), $defaultEndDate->toDateTimeString(), [$defaultBankAccountAccount->id]);
127
-
128
-    $account = $balances->find($defaultBankAccountAccount->id);
117
+    $earliestTransactionDate = $reportDates->refresh()->earliestTransactionDate;
129 118
 
130
-    $reportService = app(ReportService::class);
119
+    $expectedBalances = Accounting::getBalances(
120
+        $defaultBankAccountAccount,
121
+        $earliestTransactionDate->toDateString(),
122
+        $defaultEndDate->toDateString(),
123
+    );
131 124
 
132
-    $calculatedBalances = $reportService->calculateAccountBalances($account, $account->category);
125
+    $calculatedTrialBalances = Reporting::calculateTrialBalances($defaultBankAccountAccount->category, $expectedBalances['ending_balance']);
133 126
 
134
-    $calculatedTrialBalances = calculateTrialBalances($defaultBankAccountAccount->category, $calculatedBalances['ending_balance']);
127
+    $formattedExpectedBalances = Reporting::formatBalances($calculatedTrialBalances);
135 128
 
136
-    $formattedExpectedBalances = formatReportBalances($calculatedTrialBalances);
129
+    $formattedRetainedEarningsBalances = Reporting::getRetainedEarningsBalances($earliestTransactionDate->toDateTimeString(), $defaultEndDate->toDateTimeString());
137 130
 
138 131
     // Use Livewire to assert the report's filters and displayed data
139 132
     livewire(TrialBalance::class)
@@ -149,11 +142,28 @@ it('correctly builds a post-closing trial balance report', function () {
149 142
             'dateRange' => $defaultDateRange,
150 143
             'asOfDate' => $defaultEndDate->toDateString(),
151 144
         ])
152
-        ->assertSeeText('Retained Earnings')
153 145
         ->assertSeeTextInOrder([
146
+            $defaultBankAccountAccount->code,
154 147
             $defaultBankAccountAccount->name,
155 148
             $formattedExpectedBalances->debitBalance,
156 149
             $formattedExpectedBalances->creditBalance,
157 150
         ])
151
+        ->assertSeeText('Retained Earnings')
152
+        ->assertSeeTextInOrder([
153
+            'RE',
154
+            'Retained Earnings',
155
+            $formattedRetainedEarningsBalances->debitBalance,
156
+            $formattedRetainedEarningsBalances->creditBalance,
157
+        ])
158
+        ->assertSeeTextInOrder([
159
+            'Total Revenue',
160
+            '$0.00',
161
+            '$0.00',
162
+        ])
163
+        ->assertSeeTextInOrder([
164
+            'Total Expenses',
165
+            '$0.00',
166
+            '$0.00',
167
+        ])
158 168
         ->assertReportTableData();
159 169
 });

+ 0
- 31
tests/Helpers/helpers.php 查看文件

@@ -1,11 +1,8 @@
1 1
 <?php
2 2
 
3
-use App\DTO\AccountBalanceDTO;
4
-use App\Enums\Accounting\AccountCategory;
5 3
 use App\Enums\Setting\EntityType;
6 4
 use App\Filament\Company\Pages\CreateCompany;
7 5
 use App\Models\Company;
8
-use App\Services\ReportService;
9 6
 
10 7
 use function Pest\Livewire\livewire;
11 8
 
@@ -25,31 +22,3 @@ function createCompany(string $name): Company
25 22
 
26 23
     return auth()->user()->currentCompany;
27 24
 }
28
-
29
-function calculateRetainedEarningsBalances(ReportService $reportService, $startDate, $endDate): AccountBalanceDTO
30
-{
31
-    $retainedEarningsAmount = $reportService->calculateRetainedEarnings($startDate, $endDate)->getAmount();
32
-
33
-    $isCredit = $retainedEarningsAmount >= 0;
34
-    $retainedEarningsDebitAmount = $isCredit ? 0 : abs($retainedEarningsAmount);
35
-    $retainedEarningsCreditAmount = $isCredit ? $retainedEarningsAmount : 0;
36
-
37
-    return $reportService->formatBalances([
38
-        'debit_balance' => $retainedEarningsDebitAmount,
39
-        'credit_balance' => $retainedEarningsCreditAmount,
40
-    ]);
41
-}
42
-
43
-function formatReportBalances(array $balances): AccountBalanceDTO
44
-{
45
-    $reportService = app(ReportService::class);
46
-
47
-    return $reportService->formatBalances($balances);
48
-}
49
-
50
-function calculateTrialBalances(AccountCategory $accountCategory, int $endingBalance): array
51
-{
52
-    $reportService = app(ReportService::class);
53
-
54
-    return $reportService->calculateTrialBalance($accountCategory, $endingBalance);
55
-}

正在加载...
取消
保存