Преглед изворни кода

add deferred filter logic

3.x
Andrew Wallo пре 1 година
родитељ
комит
bb17776829

+ 1
- 2
app/Filament/Company/Pages/Reports/AccountBalances.php Прегледај датотеку

@@ -67,12 +67,11 @@ class AccountBalances extends BaseReportPage
67 67
         ];
68 68
     }
69 69
 
70
-    public function form(Form $form): Form
70
+    public function filtersForm(Form $form): Form
71 71
     {
72 72
         return $form
73 73
             ->inlineLabel()
74 74
             ->columns()
75
-            ->live()
76 75
             ->schema([
77 76
                 $this->getDateRangeFormComponent(),
78 77
                 Cluster::make([

+ 13
- 9
app/Filament/Company/Pages/Reports/AccountTransactions.php Прегледај датотеку

@@ -18,7 +18,6 @@ use Filament\Tables\Actions\Action;
18 18
 use Guava\FilamentClusters\Forms\Cluster;
19 19
 use Illuminate\Contracts\Support\Htmlable;
20 20
 use Illuminate\Support\Collection;
21
-use Livewire\Attributes\Url;
22 21
 use Symfony\Component\HttpFoundation\StreamedResponse;
23 22
 
24 23
 class AccountTransactions extends BaseReportPage
@@ -33,15 +32,19 @@ class AccountTransactions extends BaseReportPage
33 32
 
34 33
     protected ExportService $exportService;
35 34
 
36
-    #[Url]
37
-    public ?string $selectedAccount = 'all';
38
-
39 35
     public function boot(ReportService $reportService, ExportService $exportService): void
40 36
     {
41 37
         $this->reportService = $reportService;
42 38
         $this->exportService = $exportService;
43 39
     }
44 40
 
41
+    protected function initializeDefaultFilters(): void
42
+    {
43
+        if (! $this->getFilterState('selectedAccount')) {
44
+            $this->setFilterState('selectedAccount', 'all');
45
+        }
46
+    }
47
+
45 48
     /**
46 49
      * @return array<Column>
47 50
      */
@@ -67,7 +70,7 @@ class AccountTransactions extends BaseReportPage
67 70
         ];
68 71
     }
69 72
 
70
-    public function form(Form $form): Form
73
+    public function filtersForm(Form $form): Form
71 74
     {
72 75
         return $form
73 76
             ->columns(4)
@@ -83,10 +86,11 @@ class AccountTransactions extends BaseReportPage
83 86
                     $this->getEndDateFormComponent(),
84 87
                 ])->label("\u{200B}"), // its too bad hiddenLabel removes spacing of the label
85 88
                 Actions::make([
86
-                    Actions\Action::make('loadReportData')
89
+                    Actions\Action::make('applyFilters')
87 90
                         ->label('Update Report')
88
-                        ->submit('loadReportData')
89
-                        ->keyBindings(['mod+s']),
91
+                        ->action('applyFilters')
92
+                        ->keyBindings(['mod+s'])
93
+                        ->button(),
90 94
                 ])->alignEnd()->verticallyAlignEnd(),
91 95
             ]);
92 96
     }
@@ -108,7 +112,7 @@ class AccountTransactions extends BaseReportPage
108 112
 
109 113
     protected function buildReport(array $columns): ReportDTO
110 114
     {
111
-        return $this->reportService->buildAccountTransactionsReport($this->getFormattedStartDate(), $this->getFormattedEndDate(), $columns, $this->selectedAccount);
115
+        return $this->reportService->buildAccountTransactionsReport($this->getFormattedStartDate(), $this->getFormattedEndDate(), $columns, $this->getFilterState('selectedAccount'));
112 116
     }
113 117
 
114 118
     protected function getTransformer(ReportDTO $reportDTO): ExportableReport

+ 54
- 27
app/Filament/Company/Pages/Reports/BaseReportPage.php Прегледај датотеку

@@ -6,6 +6,7 @@ use App\Contracts\ExportableReport;
6 6
 use App\DTO\ReportDTO;
7 7
 use App\Filament\Forms\Components\DateRangeSelect;
8 8
 use App\Models\Company;
9
+use App\Services\DateRangeService;
9 10
 use App\Support\Column;
10 11
 use Filament\Actions\Action;
11 12
 use Filament\Actions\ActionGroup;
@@ -39,9 +40,9 @@ abstract class BaseReportPage extends Page
39 40
      */
40 41
     public ?array $deferredFilters = null;
41 42
 
42
-    public string $fiscalYearStartDate = '';
43
+    public string $fiscalYearStartDate;
43 44
 
44
-    public string $fiscalYearEndDate = '';
45
+    public string $fiscalYearEndDate;
45 46
 
46 47
     public Company $company;
47 48
 
@@ -69,20 +70,46 @@ abstract class BaseReportPage extends Page
69 70
 
70 71
         $this->loadDefaultDateRange();
71 72
 
73
+        $this->initializeDefaultFilters();
74
+
72 75
         $this->initializeFilters();
73 76
 
74 77
         $this->loadDefaultTableColumnToggleState();
75 78
     }
76 79
 
80
+    protected function initializeDefaultFilters(): void
81
+    {
82
+        //
83
+    }
84
+
77 85
     public function initializeFilters(): void
78 86
     {
79 87
         if (! count($this->filters ?? [])) {
80 88
             $this->filters = null;
81 89
         }
82 90
 
83
-        $this->getFiltersForm()->fill($this->filters);
91
+        $filtersForForm = $this->filters !== null
92
+            ? $this->convertDatesToDateTimeString($this->filters)
93
+            : [];
94
+
95
+        $this->getFiltersForm()->fill($filtersForForm);
96
+
97
+        if ($this->filters !== null) {
98
+            $this->filters = $this->normalizeFilters($this->filters);
99
+        }
100
+    }
101
+
102
+    protected function convertDatesToDateTimeString(array $filters): array
103
+    {
104
+        if (isset($filters['startDate'])) {
105
+            $filters['startDate'] = Carbon::parse($filters['startDate'])->startOfDay()->toDateTimeString();
106
+        }
107
+
108
+        if (isset($filters['endDate'])) {
109
+            $filters['endDate'] = Carbon::parse($filters['endDate'])->endOfDay()->toDateTimeString();
110
+        }
84 111
 
85
-        $this->applyFilters();
112
+        return $filters;
86 113
     }
87 114
 
88 115
     protected function getForms(): array
@@ -123,33 +150,32 @@ abstract class BaseReportPage extends Page
123 150
 
124 151
     public function applyFilters(): void
125 152
     {
126
-        $normalizedFilters = $this->deferredFilters;
127
-
128
-        $this->normalizeFilters($normalizedFilters);
129
-
130
-        $this->filters = $normalizedFilters;
153
+        $this->filters = $this->normalizeFilters($this->deferredFilters);
131 154
 
132 155
         $this->handleFilterUpdates();
133 156
 
134 157
         $this->loadReportData();
135 158
     }
136 159
 
137
-    protected function normalizeFilters(array &$filters): void
160
+    protected function normalizeFilters(array $filters): array
138 161
     {
139 162
         foreach ($filters as $name => &$value) {
140 163
             if ($name === 'dateRange') {
141 164
                 unset($filters[$name]);
142 165
             } elseif ($this->isValidDate($value)) {
143
-                $filters[$name] = Carbon::parse($value)->toDateString();
166
+                $value = Carbon::parse($value)->toDateString();
144 167
             }
145 168
         }
169
+
170
+        return $filters;
146 171
     }
147 172
 
148 173
     public function getFiltersApplyAction(): Action
149 174
     {
150 175
         return Action::make('applyFilters')
151
-            ->label(__('filament-tables::table.filters.actions.apply.label'))
176
+            ->label('Update Report')
152 177
             ->action('applyFilters')
178
+            ->keyBindings(['mod+s'])
153 179
             ->button();
154 180
     }
155 181
 
@@ -182,7 +208,13 @@ abstract class BaseReportPage extends Page
182 208
 
183 209
     protected function loadDefaultDateRange(): void
184 210
     {
185
-        if (! $this->getDeferredFilterState('dateRange')) {
211
+        $startDate = $this->getFilterState('startDate');
212
+        $endDate = $this->getFilterState('endDate');
213
+
214
+        if ($this->isValidDate($startDate) && $this->isValidDate($endDate)) {
215
+            $matchingDateRange = app(DateRangeService::class)->getMatchingDateRangeOption(Carbon::parse($startDate), Carbon::parse($endDate));
216
+            $this->setFilterState('dateRange', $matchingDateRange);
217
+        } else {
186 218
             $this->setFilterState('dateRange', $this->getDefaultDateRange());
187 219
             $this->setDateRange(Carbon::parse($this->fiscalYearStartDate), Carbon::parse($this->fiscalYearEndDate));
188 220
         }
@@ -191,6 +223,7 @@ abstract class BaseReportPage extends Page
191 223
     public function loadReportData(): void
192 224
     {
193 225
         unset($this->report);
226
+
194 227
         $this->reportLoaded = true;
195 228
     }
196 229
 
@@ -198,27 +231,21 @@ abstract class BaseReportPage extends Page
198 231
     {
199 232
         $tableColumns = $this->getTable();
200 233
 
201
-        if (empty($this->toggledTableColumns)) {
202
-            foreach ($tableColumns as $column) {
234
+        foreach ($tableColumns as $column) {
235
+            $columnName = $column->getName();
236
+
237
+            if (empty($this->toggledTableColumns)) {
203 238
                 if ($column->isToggleable()) {
204
-                    if ($column->isToggledHiddenByDefault()) {
205
-                        $this->toggledTableColumns[$column->getName()] = false;
206
-                    } else {
207
-                        $this->toggledTableColumns[$column->getName()] = true;
208
-                    }
239
+                    $this->toggledTableColumns[$columnName] = ! $column->isToggledHiddenByDefault();
209 240
                 } else {
210
-                    $this->toggledTableColumns[$column->getName()] = true;
241
+                    $this->toggledTableColumns[$columnName] = true;
211 242
                 }
212 243
             }
213
-        }
214 244
 
215
-        foreach ($tableColumns as $column) {
216
-            $columnName = $column->getName();
245
+            // Handle cases where the toggle state needs to be reset
217 246
             if (! $column->isToggleable()) {
218 247
                 $this->toggledTableColumns[$columnName] = true;
219
-            }
220
-
221
-            if ($column->isToggleable() && $column->isToggledHiddenByDefault() && isset($this->toggledTableColumns[$columnName]) && $this->toggledTableColumns[$columnName]) {
248
+            } elseif ($column->isToggleable() && $column->isToggledHiddenByDefault() && isset($this->toggledTableColumns[$columnName]) && $this->toggledTableColumns[$columnName]) {
222 249
                 $this->toggledTableColumns[$columnName] = false;
223 250
             }
224 251
         }

+ 2
- 6
app/Filament/Company/Pages/Reports/TrialBalance.php Прегледај датотеку

@@ -50,15 +50,11 @@ class TrialBalance extends BaseReportPage
50 50
         ];
51 51
     }
52 52
 
53
-    public function form(Form $form): Form
53
+    public function filtersForm(Form $form): Form
54 54
     {
55 55
         return $form
56 56
             ->inlineLabel()
57
-            ->columns([
58
-                'lg' => 1,
59
-                '2xl' => 2,
60
-            ])
61
-            ->live()
57
+            ->columns()
62 58
             ->schema([
63 59
                 $this->getDateRangeFormComponent(),
64 60
                 Cluster::make([

+ 12
- 62
app/Filament/Forms/Components/DateRangeSelect.php Прегледај датотеку

@@ -2,37 +2,35 @@
2 2
 
3 3
 namespace App\Filament\Forms\Components;
4 4
 
5
-use App\Facades\Accounting;
6
-use App\Models\Company;
7
-use Carbon\CarbonPeriod;
5
+use App\Services\DateRangeService;
8 6
 use Filament\Forms\Components\Select;
9 7
 use Filament\Forms\Set;
10 8
 use Illuminate\Support\Carbon;
11 9
 
12 10
 class DateRangeSelect extends Select
13 11
 {
14
-    public string $fiscalYearStartDate = '';
12
+    public string $fiscalYearStartDate;
15 13
 
16
-    public string $fiscalYearEndDate = '';
14
+    public string $fiscalYearEndDate;
17 15
 
18
-    public string $startDateField = '';
16
+    public ?string $startDateField = null;
19 17
 
20
-    public string $endDateField = '';
21
-
22
-    public Company $company;
18
+    public ?string $endDateField = null;
23 19
 
24 20
     protected function setUp(): void
25 21
     {
26 22
         parent::setUp();
27 23
 
28
-        $this->company = auth()->user()->currentCompany;
29
-        $this->fiscalYearStartDate = $this->company->locale->fiscalYearStartDate();
30
-        $this->fiscalYearEndDate = $this->company->locale->fiscalYearEndDate();
24
+        $company = auth()->user()->currentCompany;
25
+        $this->fiscalYearStartDate = $company->locale->fiscalYearStartDate();
26
+        $this->fiscalYearEndDate = $company->locale->fiscalYearEndDate();
31 27
 
32
-        $this->options($this->getDateRangeOptions())
28
+        $this->options(app(DateRangeService::class)->getDateRangeOptions())
33 29
             ->live()
34 30
             ->afterStateUpdated(function ($state, Set $set) {
35
-                $this->updateDateRange($state, $set);
31
+                if ($this->startDateField && $this->endDateField) {
32
+                    $this->updateDateRange($state, $set);
33
+                }
36 34
             });
37 35
     }
38 36
 
@@ -50,54 +48,6 @@ class DateRangeSelect extends Select
50 48
         return $this;
51 49
     }
52 50
 
53
-    public function getDateRangeOptions(): array
54
-    {
55
-        $earliestDate = Carbon::parse(Accounting::getEarliestTransactionDate());
56
-        $currentDate = now();
57
-        $fiscalYearStartCurrent = Carbon::parse($this->fiscalYearStartDate);
58
-
59
-        $options = [
60
-            'Fiscal Year' => [],
61
-            'Fiscal Quarter' => [],
62
-            'Calendar Year' => [],
63
-            'Calendar Quarter' => [],
64
-            'Month' => [],
65
-            'Custom' => [],
66
-        ];
67
-
68
-        $period = CarbonPeriod::create($earliestDate, '1 month', $currentDate);
69
-
70
-        foreach ($period as $date) {
71
-            $options['Fiscal Year']['FY-' . $date->year] = $date->year;
72
-
73
-            $fiscalYearStart = $fiscalYearStartCurrent->copy()->subYears($currentDate->year - $date->year);
74
-
75
-            for ($i = 0; $i < 4; $i++) {
76
-                $quarterNumber = $i + 1;
77
-                $quarterStart = $fiscalYearStart->copy()->addMonths(($quarterNumber - 1) * 3);
78
-                $quarterEnd = $quarterStart->copy()->addMonths(3)->subDay();
79
-
80
-                if ($quarterStart->lessThanOrEqualTo($currentDate) && $quarterEnd->greaterThanOrEqualTo($earliestDate)) {
81
-                    $options['Fiscal Quarter']['FQ-' . $quarterNumber . '-' . $date->year] = 'Q' . $quarterNumber . ' ' . $date->year;
82
-                }
83
-            }
84
-
85
-            $options['Calendar Year']['Y-' . $date->year] = $date->year;
86
-            $quarterKey = 'Q-' . $date->quarter . '-' . $date->year;
87
-            $options['Calendar Quarter'][$quarterKey] = 'Q' . $date->quarter . ' ' . $date->year;
88
-            $options['Month']['M-' . $date->format('Y-m')] = $date->format('F Y');
89
-            $options['Custom']['Custom'] = 'Custom';
90
-        }
91
-
92
-        $options['Fiscal Year'] = array_reverse($options['Fiscal Year'], true);
93
-        $options['Fiscal Quarter'] = array_reverse($options['Fiscal Quarter'], true);
94
-        $options['Calendar Year'] = array_reverse($options['Calendar Year'], true);
95
-        $options['Calendar Quarter'] = array_reverse($options['Calendar Quarter'], true);
96
-        $options['Month'] = array_reverse($options['Month'], true);
97
-
98
-        return $options;
99
-    }
100
-
101 51
     public function updateDateRange($state, Set $set): void
102 52
     {
103 53
         if ($state === null) {

+ 11
- 7
app/Models/Setting/Localization.php Прегледај датотеку

@@ -83,19 +83,23 @@ class Localization extends Model
83 83
 
84 84
     public function fiscalYearStartDate(): string
85 85
     {
86
-        return Carbon::parse($this->fiscalYearEndDate())->subYear()->addDay()->toDateString();
86
+        return once(function () {
87
+            return Carbon::parse($this->fiscalYearEndDate())->subYear()->addDay()->toDateString();
88
+        });
87 89
     }
88 90
 
89 91
     public function fiscalYearEndDate(): string
90 92
     {
91
-        $today = now();
92
-        $fiscalYearEndThisYear = Carbon::createFromDate($today->year, $this->fiscal_year_end_month, $this->fiscal_year_end_day);
93
+        return once(function () {
94
+            $today = now();
95
+            $fiscalYearEndThisYear = Carbon::createFromDate($today->year, $this->fiscal_year_end_month, $this->fiscal_year_end_day);
93 96
 
94
-        if ($today->gt($fiscalYearEndThisYear)) {
95
-            return $fiscalYearEndThisYear->copy()->addYear()->toDateString();
96
-        }
97
+            if ($today->gt($fiscalYearEndThisYear)) {
98
+                return $fiscalYearEndThisYear->copy()->addYear()->toDateString();
99
+            }
97 100
 
98
-        return $fiscalYearEndThisYear->toDateString();
101
+            return $fiscalYearEndThisYear->toDateString();
102
+        });
99 103
     }
100 104
 
101 105
     public function getDateTimeFormatAttribute(): string

+ 2
- 1
app/Providers/AppServiceProvider.php Прегледај датотеку

@@ -4,6 +4,7 @@ namespace App\Providers;
4 4
 
5 5
 use App\Contracts\AccountHandler;
6 6
 use App\Services\AccountService;
7
+use App\Services\DateRangeService;
7 8
 use BezhanSalleh\PanelSwitch\PanelSwitch;
8 9
 use Filament\Notifications\Livewire\Notifications;
9 10
 use Filament\Support\Assets\Js;
@@ -25,7 +26,7 @@ class AppServiceProvider extends ServiceProvider
25 26
      */
26 27
     public function register(): void
27 28
     {
28
-        //
29
+        $this->app->singleton(DateRangeService::class);
29 30
     }
30 31
 
31 32
     /**

+ 145
- 0
app/Services/DateRangeService.php Прегледај датотеку

@@ -0,0 +1,145 @@
1
+<?php
2
+
3
+namespace App\Services;
4
+
5
+use App\Facades\Accounting;
6
+use Carbon\CarbonPeriod;
7
+use Illuminate\Support\Carbon;
8
+
9
+class DateRangeService
10
+{
11
+    protected string $fiscalYearStartDate = '';
12
+
13
+    protected string $fiscalYearEndDate = '';
14
+
15
+    public function __construct()
16
+    {
17
+        $company = auth()->user()->currentCompany;
18
+        $this->fiscalYearStartDate = $company->locale->fiscalYearStartDate();
19
+        $this->fiscalYearEndDate = $company->locale->fiscalYearEndDate();
20
+    }
21
+
22
+    public function getDateRangeOptions(): array
23
+    {
24
+        return once(function () {
25
+            return $this->generateDateRangeOptions();
26
+        });
27
+    }
28
+
29
+    private function generateDateRangeOptions(): array
30
+    {
31
+        $earliestDate = Carbon::parse(Accounting::getEarliestTransactionDate());
32
+        $currentDate = now();
33
+        $fiscalYearStartCurrent = Carbon::parse($this->fiscalYearStartDate);
34
+
35
+        $options = [
36
+            'Fiscal Year' => [],
37
+            'Fiscal Quarter' => [],
38
+            'Calendar Year' => [],
39
+            'Calendar Quarter' => [],
40
+            'Month' => [],
41
+            'Custom' => [],
42
+        ];
43
+
44
+        $period = CarbonPeriod::create($earliestDate, '1 month', $currentDate);
45
+
46
+        foreach ($period as $date) {
47
+            $options['Fiscal Year']['FY-' . $date->year] = $date->year;
48
+
49
+            $fiscalYearStart = $fiscalYearStartCurrent->copy()->subYears($currentDate->year - $date->year);
50
+
51
+            for ($i = 0; $i < 4; $i++) {
52
+                $quarterNumber = $i + 1;
53
+                $quarterStart = $fiscalYearStart->copy()->addMonths(($quarterNumber - 1) * 3);
54
+                $quarterEnd = $quarterStart->copy()->addMonths(3)->subDay();
55
+
56
+                if ($quarterStart->lessThanOrEqualTo($currentDate) && $quarterEnd->greaterThanOrEqualTo($earliestDate)) {
57
+                    $options['Fiscal Quarter']['FQ-' . $quarterNumber . '-' . $date->year] = 'Q' . $quarterNumber . ' ' . $date->year;
58
+                }
59
+            }
60
+
61
+            $options['Calendar Year']['Y-' . $date->year] = $date->year;
62
+            $quarterKey = 'Q-' . $date->quarter . '-' . $date->year;
63
+            $options['Calendar Quarter'][$quarterKey] = 'Q' . $date->quarter . ' ' . $date->year;
64
+            $options['Month']['M-' . $date->format('Y-m')] = $date->format('F Y');
65
+            $options['Custom']['Custom'] = 'Custom';
66
+        }
67
+
68
+        $options['Fiscal Year'] = array_reverse($options['Fiscal Year'], true);
69
+        $options['Fiscal Quarter'] = array_reverse($options['Fiscal Quarter'], true);
70
+        $options['Calendar Year'] = array_reverse($options['Calendar Year'], true);
71
+        $options['Calendar Quarter'] = array_reverse($options['Calendar Quarter'], true);
72
+        $options['Month'] = array_reverse($options['Month'], true);
73
+
74
+        return $options;
75
+    }
76
+
77
+    public function getMatchingDateRangeOption(Carbon $startDate, Carbon $endDate): string
78
+    {
79
+        $options = $this->getDateRangeOptions();
80
+
81
+        foreach ($options as $type => $ranges) {
82
+            foreach ($ranges as $key => $label) {
83
+                [$expectedStart, $expectedEnd] = $this->getExpectedDateRange($type, $key);
84
+
85
+                if ($expectedStart === null || $expectedEnd === null) {
86
+                    continue;
87
+                }
88
+
89
+                $expectedEnd = $expectedEnd->isFuture() ? now()->startOfDay() : $expectedEnd;
90
+
91
+                if ($startDate->eq($expectedStart) && $endDate->eq($expectedEnd)) {
92
+                    return $key; // Return the matching range key (e.g., "FY-2024")
93
+                }
94
+            }
95
+        }
96
+
97
+        return 'Custom'; // Return "Custom" if no matching range is found
98
+    }
99
+
100
+    private function getExpectedDateRange(string $type, string $key): array
101
+    {
102
+        switch ($type) {
103
+            case 'Fiscal Year':
104
+                $year = (int) substr($key, 3);
105
+                $start = Carbon::parse($this->fiscalYearStartDate)->subYears(now()->year - $year)->startOfDay();
106
+                $end = Carbon::parse($this->fiscalYearEndDate)->subYears(now()->year - $year)->startOfDay();
107
+
108
+                break;
109
+
110
+            case 'Fiscal Quarter':
111
+                [$quarter, $year] = explode('-', substr($key, 3));
112
+                $start = Carbon::parse($this->fiscalYearStartDate)->subYears(now()->year - $year)->addMonths(($quarter - 1) * 3)->startOfDay();
113
+                $end = $start->copy()->addMonths(3)->subDay()->startOfDay();
114
+
115
+                break;
116
+
117
+            case 'Calendar Year':
118
+                $year = (int) substr($key, 2);
119
+                $start = Carbon::createFromDate($year)->startOfYear()->startOfDay();
120
+                $end = Carbon::createFromDate($year)->endOfYear()->startOfDay();
121
+
122
+                break;
123
+
124
+            case 'Calendar Quarter':
125
+                [$quarter, $year] = explode('-', substr($key, 2));
126
+                $month = ($quarter - 1) * 3 + 1;
127
+                $start = Carbon::createFromDate($year, $month, 1)->startOfDay();
128
+                $end = $start->copy()->endOfQuarter()->startOfDay();
129
+
130
+                break;
131
+
132
+            case 'Month':
133
+                $yearMonth = substr($key, 2);
134
+                $start = Carbon::parse($yearMonth)->startOfMonth()->startOfDay();
135
+                $end = Carbon::parse($yearMonth)->endOfMonth()->startOfDay();
136
+
137
+                break;
138
+
139
+            default:
140
+                return [null, null];
141
+        }
142
+
143
+        return [$start, $end];
144
+    }
145
+}

+ 57
- 57
composer.lock Прегледај датотеку

@@ -497,16 +497,16 @@
497 497
         },
498 498
         {
499 499
             "name": "aws/aws-sdk-php",
500
-            "version": "3.321.2",
500
+            "version": "3.321.4",
501 501
             "source": {
502 502
                 "type": "git",
503 503
                 "url": "https://github.com/aws/aws-sdk-php.git",
504
-                "reference": "c04f8f30891cee8480c132778cd4cc486467e77a"
504
+                "reference": "986326efde1d0598ec9fc1b185716550be8ef522"
505 505
             },
506 506
             "dist": {
507 507
                 "type": "zip",
508
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c04f8f30891cee8480c132778cd4cc486467e77a",
509
-                "reference": "c04f8f30891cee8480c132778cd4cc486467e77a",
508
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/986326efde1d0598ec9fc1b185716550be8ef522",
509
+                "reference": "986326efde1d0598ec9fc1b185716550be8ef522",
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.321.2"
592
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.321.4"
593 593
             },
594
-            "time": "2024-08-30T18:14:40+00:00"
594
+            "time": "2024-09-04T18:09:31+00:00"
595 595
         },
596 596
         {
597 597
             "name": "aws/aws-sdk-php-laravel",
@@ -1287,16 +1287,16 @@
1287 1287
         },
1288 1288
         {
1289 1289
             "name": "doctrine/dbal",
1290
-            "version": "4.1.0",
1290
+            "version": "4.1.1",
1291 1291
             "source": {
1292 1292
                 "type": "git",
1293 1293
                 "url": "https://github.com/doctrine/dbal.git",
1294
-                "reference": "2377cd41609aa51bee822c8d207317a3f363a558"
1294
+                "reference": "7a8252418689feb860ea8dfeab66d64a56a64df8"
1295 1295
             },
1296 1296
             "dist": {
1297 1297
                 "type": "zip",
1298
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/2377cd41609aa51bee822c8d207317a3f363a558",
1299
-                "reference": "2377cd41609aa51bee822c8d207317a3f363a558",
1298
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/7a8252418689feb860ea8dfeab66d64a56a64df8",
1299
+                "reference": "7a8252418689feb860ea8dfeab66d64a56a64df8",
1300 1300
                 "shasum": ""
1301 1301
             },
1302 1302
             "require": {
@@ -1309,16 +1309,16 @@
1309 1309
                 "doctrine/coding-standard": "12.0.0",
1310 1310
                 "fig/log-test": "^1",
1311 1311
                 "jetbrains/phpstorm-stubs": "2023.2",
1312
-                "phpstan/phpstan": "1.11.7",
1312
+                "phpstan/phpstan": "1.12.0",
1313 1313
                 "phpstan/phpstan-phpunit": "1.4.0",
1314 1314
                 "phpstan/phpstan-strict-rules": "^1.6",
1315
-                "phpunit/phpunit": "10.5.28",
1315
+                "phpunit/phpunit": "10.5.30",
1316 1316
                 "psalm/plugin-phpunit": "0.19.0",
1317 1317
                 "slevomat/coding-standard": "8.13.1",
1318 1318
                 "squizlabs/php_codesniffer": "3.10.2",
1319 1319
                 "symfony/cache": "^6.3.8|^7.0",
1320 1320
                 "symfony/console": "^5.4|^6.3|^7.0",
1321
-                "vimeo/psalm": "5.24.0"
1321
+                "vimeo/psalm": "5.25.0"
1322 1322
             },
1323 1323
             "suggest": {
1324 1324
                 "symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -1375,7 +1375,7 @@
1375 1375
             ],
1376 1376
             "support": {
1377 1377
                 "issues": "https://github.com/doctrine/dbal/issues",
1378
-                "source": "https://github.com/doctrine/dbal/tree/4.1.0"
1378
+                "source": "https://github.com/doctrine/dbal/tree/4.1.1"
1379 1379
             },
1380 1380
             "funding": [
1381 1381
                 {
@@ -1391,7 +1391,7 @@
1391 1391
                     "type": "tidelift"
1392 1392
                 }
1393 1393
             ],
1394
-            "time": "2024-08-15T07:37:07+00:00"
1394
+            "time": "2024-09-03T08:58:39+00:00"
1395 1395
         },
1396 1396
         {
1397 1397
             "name": "doctrine/deprecations",
@@ -2981,16 +2981,16 @@
2981 2981
         },
2982 2982
         {
2983 2983
             "name": "laravel/framework",
2984
-            "version": "v11.21.0",
2984
+            "version": "v11.22.0",
2985 2985
             "source": {
2986 2986
                 "type": "git",
2987 2987
                 "url": "https://github.com/laravel/framework.git",
2988
-                "reference": "9d9d36708d56665b12185493f684abce38ad2d30"
2988
+                "reference": "868c75beacc47d0f361b919bbc155c0b619bf3d5"
2989 2989
             },
2990 2990
             "dist": {
2991 2991
                 "type": "zip",
2992
-                "url": "https://api.github.com/repos/laravel/framework/zipball/9d9d36708d56665b12185493f684abce38ad2d30",
2993
-                "reference": "9d9d36708d56665b12185493f684abce38ad2d30",
2992
+                "url": "https://api.github.com/repos/laravel/framework/zipball/868c75beacc47d0f361b919bbc155c0b619bf3d5",
2993
+                "reference": "868c75beacc47d0f361b919bbc155c0b619bf3d5",
2994 2994
                 "shasum": ""
2995 2995
             },
2996 2996
             "require": {
@@ -3183,7 +3183,7 @@
3183 3183
                 "issues": "https://github.com/laravel/framework/issues",
3184 3184
                 "source": "https://github.com/laravel/framework"
3185 3185
             },
3186
-            "time": "2024-08-20T15:00:52+00:00"
3186
+            "time": "2024-09-03T15:27:15+00:00"
3187 3187
         },
3188 3188
         {
3189 3189
             "name": "laravel/prompts",
@@ -3370,16 +3370,16 @@
3370 3370
         },
3371 3371
         {
3372 3372
             "name": "laravel/socialite",
3373
-            "version": "v5.15.1",
3373
+            "version": "v5.16.0",
3374 3374
             "source": {
3375 3375
                 "type": "git",
3376 3376
                 "url": "https://github.com/laravel/socialite.git",
3377
-                "reference": "cc02625f0bd1f95dc3688eb041cce0f1e709d029"
3377
+                "reference": "40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf"
3378 3378
             },
3379 3379
             "dist": {
3380 3380
                 "type": "zip",
3381
-                "url": "https://api.github.com/repos/laravel/socialite/zipball/cc02625f0bd1f95dc3688eb041cce0f1e709d029",
3382
-                "reference": "cc02625f0bd1f95dc3688eb041cce0f1e709d029",
3381
+                "url": "https://api.github.com/repos/laravel/socialite/zipball/40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf",
3382
+                "reference": "40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf",
3383 3383
                 "shasum": ""
3384 3384
             },
3385 3385
             "require": {
@@ -3438,7 +3438,7 @@
3438 3438
                 "issues": "https://github.com/laravel/socialite/issues",
3439 3439
                 "source": "https://github.com/laravel/socialite"
3440 3440
             },
3441
-            "time": "2024-06-28T20:09:34+00:00"
3441
+            "time": "2024-09-03T09:46:57+00:00"
3442 3442
         },
3443 3443
         {
3444 3444
             "name": "laravel/tinker",
@@ -4535,16 +4535,16 @@
4535 4535
         },
4536 4536
         {
4537 4537
             "name": "mtdowling/jmespath.php",
4538
-            "version": "2.7.0",
4538
+            "version": "2.8.0",
4539 4539
             "source": {
4540 4540
                 "type": "git",
4541 4541
                 "url": "https://github.com/jmespath/jmespath.php.git",
4542
-                "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b"
4542
+                "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc"
4543 4543
             },
4544 4544
             "dist": {
4545 4545
                 "type": "zip",
4546
-                "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b",
4547
-                "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b",
4546
+                "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc",
4547
+                "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc",
4548 4548
                 "shasum": ""
4549 4549
             },
4550 4550
             "require": {
@@ -4561,7 +4561,7 @@
4561 4561
             "type": "library",
4562 4562
             "extra": {
4563 4563
                 "branch-alias": {
4564
-                    "dev-master": "2.7-dev"
4564
+                    "dev-master": "2.8-dev"
4565 4565
                 }
4566 4566
             },
4567 4567
             "autoload": {
@@ -4595,9 +4595,9 @@
4595 4595
             ],
4596 4596
             "support": {
4597 4597
                 "issues": "https://github.com/jmespath/jmespath.php/issues",
4598
-                "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0"
4598
+                "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0"
4599 4599
             },
4600
-            "time": "2023-08-25T10:54:48+00:00"
4600
+            "time": "2024-09-04T18:46:31+00:00"
4601 4601
         },
4602 4602
         {
4603 4603
             "name": "mustangostang/spyc",
@@ -9488,16 +9488,16 @@
9488 9488
         },
9489 9489
         {
9490 9490
             "name": "laravel/pint",
9491
-            "version": "v1.17.2",
9491
+            "version": "v1.17.3",
9492 9492
             "source": {
9493 9493
                 "type": "git",
9494 9494
                 "url": "https://github.com/laravel/pint.git",
9495
-                "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110"
9495
+                "reference": "9d77be916e145864f10788bb94531d03e1f7b482"
9496 9496
             },
9497 9497
             "dist": {
9498 9498
                 "type": "zip",
9499
-                "url": "https://api.github.com/repos/laravel/pint/zipball/e8a88130a25e3f9d4d5785e6a1afca98268ab110",
9500
-                "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110",
9499
+                "url": "https://api.github.com/repos/laravel/pint/zipball/9d77be916e145864f10788bb94531d03e1f7b482",
9500
+                "reference": "9d77be916e145864f10788bb94531d03e1f7b482",
9501 9501
                 "shasum": ""
9502 9502
             },
9503 9503
             "require": {
@@ -9508,13 +9508,13 @@
9508 9508
                 "php": "^8.1.0"
9509 9509
             },
9510 9510
             "require-dev": {
9511
-                "friendsofphp/php-cs-fixer": "^3.61.1",
9512
-                "illuminate/view": "^10.48.18",
9511
+                "friendsofphp/php-cs-fixer": "^3.64.0",
9512
+                "illuminate/view": "^10.48.20",
9513 9513
                 "larastan/larastan": "^2.9.8",
9514 9514
                 "laravel-zero/framework": "^10.4.0",
9515 9515
                 "mockery/mockery": "^1.6.12",
9516 9516
                 "nunomaduro/termwind": "^1.15.1",
9517
-                "pestphp/pest": "^2.35.0"
9517
+                "pestphp/pest": "^2.35.1"
9518 9518
             },
9519 9519
             "bin": [
9520 9520
                 "builds/pint"
@@ -9550,20 +9550,20 @@
9550 9550
                 "issues": "https://github.com/laravel/pint/issues",
9551 9551
                 "source": "https://github.com/laravel/pint"
9552 9552
             },
9553
-            "time": "2024-08-06T15:11:54+00:00"
9553
+            "time": "2024-09-03T15:00:28+00:00"
9554 9554
         },
9555 9555
         {
9556 9556
             "name": "laravel/sail",
9557
-            "version": "v1.31.1",
9557
+            "version": "v1.31.3",
9558 9558
             "source": {
9559 9559
                 "type": "git",
9560 9560
                 "url": "https://github.com/laravel/sail.git",
9561
-                "reference": "3d06dd18cee8059baa7b388af00ba47f6d96bd85"
9561
+                "reference": "0a7e2891a85eba2d448a9ffc6fc5ce367e924bc1"
9562 9562
             },
9563 9563
             "dist": {
9564 9564
                 "type": "zip",
9565
-                "url": "https://api.github.com/repos/laravel/sail/zipball/3d06dd18cee8059baa7b388af00ba47f6d96bd85",
9566
-                "reference": "3d06dd18cee8059baa7b388af00ba47f6d96bd85",
9565
+                "url": "https://api.github.com/repos/laravel/sail/zipball/0a7e2891a85eba2d448a9ffc6fc5ce367e924bc1",
9566
+                "reference": "0a7e2891a85eba2d448a9ffc6fc5ce367e924bc1",
9567 9567
                 "shasum": ""
9568 9568
             },
9569 9569
             "require": {
@@ -9613,7 +9613,7 @@
9613 9613
                 "issues": "https://github.com/laravel/sail/issues",
9614 9614
                 "source": "https://github.com/laravel/sail"
9615 9615
             },
9616
-            "time": "2024-08-02T07:45:47+00:00"
9616
+            "time": "2024-09-03T20:05:33+00:00"
9617 9617
         },
9618 9618
         {
9619 9619
             "name": "mockery/mockery",
@@ -10103,16 +10103,16 @@
10103 10103
         },
10104 10104
         {
10105 10105
             "name": "phpstan/phpstan",
10106
-            "version": "1.12.0",
10106
+            "version": "1.12.1",
10107 10107
             "source": {
10108 10108
                 "type": "git",
10109 10109
                 "url": "https://github.com/phpstan/phpstan.git",
10110
-                "reference": "384af967d35b2162f69526c7276acadce534d0e1"
10110
+                "reference": "d8ed7fffa66de1db0d2972267d8ed1d8fa0fe5a2"
10111 10111
             },
10112 10112
             "dist": {
10113 10113
                 "type": "zip",
10114
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1",
10115
-                "reference": "384af967d35b2162f69526c7276acadce534d0e1",
10114
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d8ed7fffa66de1db0d2972267d8ed1d8fa0fe5a2",
10115
+                "reference": "d8ed7fffa66de1db0d2972267d8ed1d8fa0fe5a2",
10116 10116
                 "shasum": ""
10117 10117
             },
10118 10118
             "require": {
@@ -10157,7 +10157,7 @@
10157 10157
                     "type": "github"
10158 10158
                 }
10159 10159
             ],
10160
-            "time": "2024-08-27T09:18:05+00:00"
10160
+            "time": "2024-09-03T19:55:22+00:00"
10161 10161
         },
10162 10162
         {
10163 10163
             "name": "phpunit/php-code-coverage",
@@ -10482,16 +10482,16 @@
10482 10482
         },
10483 10483
         {
10484 10484
             "name": "phpunit/phpunit",
10485
-            "version": "10.5.30",
10485
+            "version": "10.5.32",
10486 10486
             "source": {
10487 10487
                 "type": "git",
10488 10488
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
10489
-                "reference": "b15524febac0153876b4ba9aab3326c2ee94c897"
10489
+                "reference": "f069f46840445d37a4e6f0de8c5879598f9c4327"
10490 10490
             },
10491 10491
             "dist": {
10492 10492
                 "type": "zip",
10493
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b15524febac0153876b4ba9aab3326c2ee94c897",
10494
-                "reference": "b15524febac0153876b4ba9aab3326c2ee94c897",
10493
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f069f46840445d37a4e6f0de8c5879598f9c4327",
10494
+                "reference": "f069f46840445d37a4e6f0de8c5879598f9c4327",
10495 10495
                 "shasum": ""
10496 10496
             },
10497 10497
             "require": {
@@ -10505,7 +10505,7 @@
10505 10505
                 "phar-io/manifest": "^2.0.4",
10506 10506
                 "phar-io/version": "^3.2.1",
10507 10507
                 "php": ">=8.1",
10508
-                "phpunit/php-code-coverage": "^10.1.15",
10508
+                "phpunit/php-code-coverage": "^10.1.16",
10509 10509
                 "phpunit/php-file-iterator": "^4.1.0",
10510 10510
                 "phpunit/php-invoker": "^4.0.0",
10511 10511
                 "phpunit/php-text-template": "^3.0.1",
@@ -10563,7 +10563,7 @@
10563 10563
             "support": {
10564 10564
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
10565 10565
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
10566
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.30"
10566
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.32"
10567 10567
             },
10568 10568
             "funding": [
10569 10569
                 {
@@ -10579,7 +10579,7 @@
10579 10579
                     "type": "tidelift"
10580 10580
                 }
10581 10581
             ],
10582
-            "time": "2024-08-13T06:09:37+00:00"
10582
+            "time": "2024-09-04T13:33:39+00:00"
10583 10583
         },
10584 10584
         {
10585 10585
             "name": "rector/rector",

+ 19
- 19
package-lock.json Прегледај датотеку

@@ -900,9 +900,9 @@
900 900
             }
901 901
         },
902 902
         "node_modules/axios": {
903
-            "version": "1.7.6",
904
-            "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.6.tgz",
905
-            "integrity": "sha512-Ekur6XDwhnJ5RgOCaxFnXyqlPALI3rVeukZMwOdfghW7/wGz784BYKiQq+QD8NPcr91KRo30KfHOchyijwWw7g==",
903
+            "version": "1.7.7",
904
+            "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
905
+            "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
906 906
             "dev": true,
907 907
             "license": "MIT",
908 908
             "dependencies": {
@@ -1275,9 +1275,9 @@
1275 1275
             }
1276 1276
         },
1277 1277
         "node_modules/follow-redirects": {
1278
-            "version": "1.15.6",
1279
-            "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
1280
-            "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
1278
+            "version": "1.15.8",
1279
+            "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.8.tgz",
1280
+            "integrity": "sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==",
1281 1281
             "dev": true,
1282 1282
             "funding": [
1283 1283
                 {
@@ -1786,9 +1786,9 @@
1786 1786
             }
1787 1787
         },
1788 1788
         "node_modules/picocolors": {
1789
-            "version": "1.0.1",
1790
-            "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
1791
-            "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
1789
+            "version": "1.1.0",
1790
+            "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
1791
+            "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
1792 1792
             "dev": true,
1793 1793
             "license": "ISC"
1794 1794
         },
@@ -1826,9 +1826,9 @@
1826 1826
             }
1827 1827
         },
1828 1828
         "node_modules/postcss": {
1829
-            "version": "8.4.42",
1830
-            "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.42.tgz",
1831
-            "integrity": "sha512-hywKUQB9Ra4dR1mGhldy5Aj1X3MWDSIA1cEi+Uy0CjheLvP6Ual5RlwMCh8i/X121yEDLDIKBsrCQ8ba3FDMfQ==",
1829
+            "version": "8.4.45",
1830
+            "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz",
1831
+            "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==",
1832 1832
             "dev": true,
1833 1833
             "funding": [
1834 1834
                 {
@@ -2550,14 +2550,14 @@
2550 2550
             "license": "MIT"
2551 2551
         },
2552 2552
         "node_modules/vite": {
2553
-            "version": "5.4.2",
2554
-            "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz",
2555
-            "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==",
2553
+            "version": "5.4.3",
2554
+            "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz",
2555
+            "integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==",
2556 2556
             "dev": true,
2557 2557
             "license": "MIT",
2558 2558
             "dependencies": {
2559 2559
                 "esbuild": "^0.21.3",
2560
-                "postcss": "^8.4.41",
2560
+                "postcss": "^8.4.43",
2561 2561
                 "rollup": "^4.20.0"
2562 2562
             },
2563 2563
             "bin": {
@@ -2735,9 +2735,9 @@
2735 2735
             }
2736 2736
         },
2737 2737
         "node_modules/yaml": {
2738
-            "version": "2.5.0",
2739
-            "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
2740
-            "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
2738
+            "version": "2.5.1",
2739
+            "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
2740
+            "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
2741 2741
             "dev": true,
2742 2742
             "license": "ISC",
2743 2743
             "bin": {

+ 4
- 6
resources/views/filament/company/pages/reports/account-transactions.blade.php Прегледај датотеку

@@ -1,22 +1,20 @@
1 1
 <x-filament-panels::page>
2 2
     <x-filament::section>
3
-        <form wire:submit="loadReportData">
4
-            {{ $this->form }}
5
-        </form>
3
+        {{ $this->getFiltersForm() }}
6 4
     </x-filament::section>
7 5
 
8 6
     <x-filament-tables::container>
9 7
         <div class="es-table__header-ctn"></div>
10 8
         <div
11 9
             class="relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10 min-h-64">
12
-            <div wire:init="loadReportData" class="flex items-center justify-center w-full h-full absolute">
13
-                <div wire:loading wire:target="loadReportData">
10
+            <div wire:init="applyFilters" class="flex items-center justify-center w-full h-full absolute">
11
+                <div wire:loading wire:target="applyFilters">
14 12
                     <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300"/>
15 13
                 </div>
16 14
             </div>
17 15
 
18 16
             @if($this->reportLoaded)
19
-                <div wire:loading.remove wire:target="loadReportData">
17
+                <div wire:loading.remove wire:target="applyFilters">
20 18
                     @if($this->report && !$this->tableHasEmptyState())
21 19
                         <x-company.tables.reports.account-transactions :report="$this->report"/>
22 20
                     @else

+ 18
- 20
resources/views/filament/company/pages/reports/detailed-report.blade.php Прегледај датотеку

@@ -1,38 +1,36 @@
1 1
 <x-filament-panels::page>
2 2
     <x-filament::section>
3
-        <form wire:submit="loadReportData">
4
-            <div class="flex flex-col md:flex-row items-start md:items-center justify-between gap-4 md:gap-8">
5
-                <div class="flex-grow">
6
-                    {{ $this->form }}
7
-                </div>
3
+        <div class="flex flex-col md:flex-row items-start md:items-center justify-between gap-4 md:gap-8">
4
+            <!-- Form Container -->
5
+            <div class="flex-grow">
6
+                {{ $this->getFiltersForm() }}
7
+            </div>
8 8
 
9
-                <div class="flex flex-col md:flex-row items-start md:items-center gap-4 md:gap-8 flex-shrink-0">
10
-                    @if($this->hasToggleableColumns())
11
-                        <x-filament-tables::column-toggle.dropdown
12
-                            :form="$this->toggleTableColumnForm"
13
-                            :trigger-action="$this->toggleColumnsAction"
14
-                        />
15
-                    @endif
16
-                    <x-filament::button type="submit" wire:target="loadReportData" class="flex-shrink-0">
17
-                        Update Report
18
-                    </x-filament::button>
19
-                </div>
9
+            <!-- Grouping Button and Column Toggle -->
10
+            <div class="flex flex-col md:flex-row items-start md:items-center gap-4 md:gap-8 flex-shrink-0">
11
+                @if($this->hasToggleableColumns())
12
+                    <x-filament-tables::column-toggle.dropdown
13
+                        :form="$this->toggleTableColumnForm"
14
+                        :trigger-action="$this->toggleColumnsAction"
15
+                    />
16
+                @endif
17
+                {{ $this->getFiltersApplyAction() }}
20 18
             </div>
21
-        </form>
19
+        </div>
22 20
     </x-filament::section>
23 21
 
24 22
     <x-filament-tables::container>
25 23
         <div class="es-table__header-ctn"></div>
26 24
         <div
27 25
             class="relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10 min-h-64">
28
-            <div wire:init="loadReportData" class="flex items-center justify-center w-full h-full absolute">
29
-                <div wire:loading wire:target="loadReportData">
26
+            <div wire:init="applyFilters" class="flex items-center justify-center w-full h-full absolute">
27
+                <div wire:loading wire:target="applyFilters">
30 28
                     <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300"/>
31 29
                 </div>
32 30
             </div>
33 31
 
34 32
             @if($this->reportLoaded)
35
-                <div wire:loading.remove wire:target="loadReportData">
33
+                <div wire:loading.remove wire:target="applyFilters">
36 34
                     @if($this->report)
37 35
                         <x-company.tables.reports.detailed-report :report="$this->report"/>
38 36
                     @endif

+ 8
- 8
resources/views/filament/company/pages/reports/income-statement.blade.php Прегледај датотеку

@@ -59,20 +59,20 @@
59 59
 
60 60
     <x-filament-tables::container>
61 61
         <div class="es-table__header-ctn"></div>
62
-        <div wire:init="applyFilters"
63
-             class="relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10 min-h-64">
62
+        <div
63
+            class="relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10 min-h-64">
64
+            <div wire:init="applyFilters" class="flex items-center justify-center w-full h-full absolute">
65
+                <div wire:loading wire:target="applyFilters">
66
+                    <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300"/>
67
+                </div>
68
+            </div>
69
+
64 70
             @if($this->reportLoaded)
65 71
                 <div wire:loading.remove wire:target="applyFilters">
66 72
                     @if($this->report)
67 73
                         <x-company.tables.reports.detailed-report :report="$this->report"/>
68 74
                     @endif
69 75
                 </div>
70
-            @else
71
-                <div class="absolute inset-0 flex items-center justify-center">
72
-                    <div wire:loading wire:target="applyFilters">
73
-                        <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300"/>
74
-                    </div>
75
-                </div>
76 76
             @endif
77 77
         </div>
78 78
         <div class="es-table__footer-ctn border-t border-gray-200"></div>

Loading…
Откажи
Сачувај