Andrew Wallo 1 year ago
parent
commit
3f085ee230

+ 1
- 4
app/Filament/Company/Pages/Reports/AccountBalances.php View File

@@ -71,10 +71,7 @@ class AccountBalances extends BaseReportPage
71 71
     {
72 72
         return $form
73 73
             ->inlineLabel()
74
-            ->columns([
75
-                'lg' => 1,
76
-                '2xl' => 2,
77
-            ])
74
+            ->columns()
78 75
             ->live()
79 76
             ->schema([
80 77
                 $this->getDateRangeFormComponent(),

+ 8
- 1
app/Filament/Company/Pages/Reports/AccountTransactions.php View File

@@ -9,6 +9,7 @@ use App\Services\ExportService;
9 9
 use App\Services\ReportService;
10 10
 use App\Support\Column;
11 11
 use App\Transformers\AccountTransactionReportTransformer;
12
+use Filament\Forms\Components\Actions;
12 13
 use Filament\Forms\Components\Select;
13 14
 use Filament\Forms\Form;
14 15
 use Filament\Support\Enums\Alignment;
@@ -65,7 +66,7 @@ class AccountTransactions extends BaseReportPage
65 66
     public function form(Form $form): Form
66 67
     {
67 68
         return $form
68
-            ->columns(3)
69
+            ->columns(4)
69 70
             ->live()
70 71
             ->schema([
71 72
                 Select::make('account_id')
@@ -78,6 +79,12 @@ class AccountTransactions extends BaseReportPage
78 79
                     $this->getStartDateFormComponent(),
79 80
                     $this->getEndDateFormComponent(),
80 81
                 ])->label("\u{200B}"), // its too bad hiddenLabel removes spacing of the label
82
+                Actions::make([
83
+                    Actions\Action::make('loadReportData')
84
+                        ->label('Update Report')
85
+                        ->submit('loadReportData')
86
+                        ->keyBindings(['mod+s']),
87
+                ])->alignEnd()->verticallyAlignEnd(),
81 88
             ]);
82 89
     }
83 90
 

+ 11
- 3
resources/css/filament/company/theme.css View File

@@ -18,7 +18,15 @@
18 18
 }
19 19
 
20 20
 .choices[data-type="select-one"] .choices__inner {
21
-    height: 2.25rem;
21
+    line-height: 1.5;
22
+    display: flex;
23
+    align-items: center;
24
+    min-height: 2.25rem;
25
+    box-sizing: border-box;
26
+}
27
+
28
+.choices__item {
29
+    cursor: pointer;
22 30
 }
23 31
 
24 32
 .table-repeater-container {
@@ -135,7 +143,7 @@
135 143
 
136 144
 .fi-body::before {
137 145
     content: '';
138
-    position: absolute;
146
+    position: fixed;
139 147
     top: 0;
140 148
     left: 0;
141 149
     width: 100%;
@@ -159,7 +167,7 @@
159 167
 
160 168
 :is(.dark .fi-body)::before {
161 169
     content: '';
162
-    position: absolute;
170
+    position: fixed;
163 171
     top: 0;
164 172
     right: 0;
165 173
     background-image: radial-gradient(

+ 16
- 32
resources/views/filament/company/pages/reports/account-transactions.blade.php View File

@@ -1,37 +1,21 @@
1 1
 <x-filament-panels::page>
2
-    <div class="flex flex-col gap-y-6">
3
-        <x-filament-tables::container>
4
-            <div class="p-6 divide-y divide-gray-200 dark:divide-white/5">
5
-                <form wire:submit.prevent="loadReportData">
6
-                    <div class="flex flex-col lg:flex-row items-start lg:items-center justify-center gap-4 lg:gap-12">
7
-                        {{ $this->form }}
8
-                        @if($this->hasToggleableColumns())
9
-                            <x-filament-tables::column-toggle.dropdown
10
-                                class="my-auto"
11
-                                :form="$this->toggleTableColumnForm"
12
-                                :trigger-action="$this->toggleColumnsAction"
13
-                            />
14
-                        @endif
15
-                        <x-filament::button type="submit" class="flex-shrink-0 mt-6">
16
-                            Update Report
17
-                        </x-filament::button>
18
-                    </div>
19
-                </form>
20
-            </div>
21
-            <div class="divide-y divide-gray-200 overflow-x-auto overflow-y-hidden dark:divide-white/10 dark:border-t-white/10">
22
-                <div wire:init="loadReportData" class="flex items-center justify-center">
23
-                    <div wire:loading.delay wire:target="loadReportData">
24
-                        <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300" />
25
-                    </div>
2
+    <x-filament-tables::container>
3
+        <form wire:submit="loadReportData" class="p-6">
4
+            {{ $this->form }}
5
+        </form>
6
+        <div class="divide-y divide-gray-200 overflow-x-auto overflow-y-hidden dark:divide-white/10 dark:border-t-white/10">
7
+            <div wire:init="loadReportData" class="flex items-center justify-center">
8
+                <div wire:loading.delay wire:target="loadReportData">
9
+                    <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300" />
26 10
                 </div>
11
+            </div>
27 12
 
28
-                <div wire:loading.remove wire:target="loadReportData">
29
-                    @if($this->report)
30
-                        <x-company.tables.reports.account-transactions :report="$this->report" />
31
-                    @endif
32
-                </div>
13
+            <div wire:loading.remove wire:target="loadReportData">
14
+                @if($this->report)
15
+                    <x-company.tables.reports.account-transactions :report="$this->report" />
16
+                @endif
33 17
             </div>
34
-            <div class="es-table__footer-ctn border-t border-gray-200"></div>
35
-        </x-filament-tables::container>
36
-    </div>
18
+        </div>
19
+        <div class="es-table__footer-ctn border-t border-gray-200"></div>
20
+    </x-filament-tables::container>
37 21
 </x-filament-panels::page>

+ 29
- 32
resources/views/filament/company/pages/reports/detailed-report.blade.php View File

@@ -1,37 +1,34 @@
1 1
 <x-filament-panels::page>
2
-    <div class="flex flex-col gap-y-6">
3
-        <x-filament-tables::container>
4
-            <div class="p-6 divide-y divide-gray-200 dark:divide-white/5">
5
-                <form wire:submit.prevent="loadReportData">
6
-                    <div class="flex flex-col lg:flex-row items-start lg:items-center justify-center gap-4 lg:gap-12">
7
-                        {{ $this->form }}
8
-                        @if($this->hasToggleableColumns())
9
-                            <x-filament-tables::column-toggle.dropdown
10
-                                class="my-auto"
11
-                                :form="$this->toggleTableColumnForm"
12
-                                :trigger-action="$this->toggleColumnsAction"
13
-                            />
14
-                        @endif
15
-                        <x-filament::button type="submit" class="flex-shrink-0">
16
-                            Update Report
17
-                        </x-filament::button>
18
-                    </div>
19
-                </form>
20
-            </div>
21
-            <div class="divide-y divide-gray-200 overflow-x-auto overflow-y-hidden dark:divide-white/10 dark:border-t-white/10">
22
-                <div wire:init="loadReportData" class="flex items-center justify-center">
23
-                    <div wire:loading.delay wire:target="loadReportData">
24
-                        <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300" />
25
-                    </div>
26
-                </div>
27
-
28
-                <div wire:loading.remove wire:target="loadReportData">
29
-                    @if($this->report)
30
-                        <x-company.tables.reports.detailed-report :report="$this->report" />
2
+    <x-filament-tables::container>
3
+        <div class="p-6 divide-y divide-gray-200 dark:divide-white/5">
4
+            <form wire:submit="loadReportData">
5
+                <div class="flex flex-col md:flex-row items-start md:items-center justify-center gap-4 md:gap-12">
6
+                    {{ $this->form }}
7
+                    @if($this->hasToggleableColumns())
8
+                        <x-filament-tables::column-toggle.dropdown
9
+                            :form="$this->toggleTableColumnForm"
10
+                            :trigger-action="$this->toggleColumnsAction"
11
+                        />
31 12
                     @endif
13
+                    <x-filament::button type="submit" wire:target="loadReportData" class="flex-shrink-0">
14
+                        Update Report
15
+                    </x-filament::button>
32 16
                 </div>
17
+            </form>
18
+        </div>
19
+        <div class="divide-y divide-gray-200 overflow-x-auto overflow-y-hidden dark:divide-white/10 dark:border-t-white/10">
20
+            <div wire:init="loadReportData" class="flex items-center justify-center">
21
+                <div wire:loading.delay wire:target="loadReportData">
22
+                    <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300" />
23
+                </div>
24
+            </div>
25
+
26
+            <div wire:loading.remove wire:target="loadReportData">
27
+                @if($this->report)
28
+                    <x-company.tables.reports.detailed-report :report="$this->report" />
29
+                @endif
33 30
             </div>
34
-            <div class="es-table__footer-ctn border-t border-gray-200"></div>
35
-        </x-filament-tables::container>
36
-    </div>
31
+        </div>
32
+        <div class="es-table__footer-ctn border-t border-gray-200"></div>
33
+    </x-filament-tables::container>
37 34
 </x-filament-panels::page>

+ 0
- 0
resources/views/vendor/filament-clusters/.gitkeep View File


+ 24
- 0
resources/views/vendor/filament-clusters/cluster.blade.php View File

@@ -0,0 +1,24 @@
1
+<x-dynamic-component
2
+    :component="$getFieldWrapperView()"
3
+    :field="$field"
4
+>
5
+    <x-filament::input.wrapper
6
+        @class([
7
+            "guava-fi-cl-cluster",
8
+            ...$field->getResponsiveClasses(),
9
+        ])
10
+    >
11
+        {{ $getChildComponentContainer() }}
12
+    </x-filament::input.wrapper>
13
+
14
+
15
+    @foreach($field->getChildComponents() as $child)
16
+        @if ($childStatePath = $child->getStatePath())
17
+            @if($errors->has($childStatePath) )
18
+                <x-filament-forms::field-wrapper.error-message>
19
+                    {{ $errors->first($childStatePath) }}
20
+                </x-filament-forms::field-wrapper.error-message>
21
+            @endif
22
+        @endif
23
+    @endforeach
24
+</x-dynamic-component>

+ 3
- 0
resources/views/vendor/filament-clusters/components/field-wrapper.blade.php View File

@@ -0,0 +1,3 @@
1
+<div>
2
+    {{ $slot }}
3
+</div>

Loading…
Cancel
Save