8
8
use Filament \Forms \Components \Textarea ;
9
9
use Filament \Forms \Components \TextInput ;
10
10
use Filament \Forms \Form ;
11
- use Filament \Infolists \Components \TextEntry ;
12
11
use Filament \Resources \Resource ;
13
- use Filament \Tables \Actions \Action ;
14
12
use Filament \Tables \Actions \ActionGroup ;
15
13
use Filament \Tables \Actions \DeleteAction ;
16
14
use Filament \Tables \Actions \DeleteBulkAction ;
19
17
use Filament \Tables \Actions \ForceDeleteBulkAction ;
20
18
use Filament \Tables \Actions \RestoreAction ;
21
19
use Filament \Tables \Actions \RestoreBulkAction ;
22
- use Filament \Tables \Actions \ViewAction ;
23
20
use Filament \Tables \Columns \ImageColumn ;
24
21
use Filament \Tables \Columns \Layout \Split ;
25
22
use Filament \Tables \Columns \Layout \Stack ;
26
23
use Filament \Tables \Columns \TextColumn ;
27
- use Filament \Tables \Columns \ViewColumn ;
28
24
use Filament \Tables \Filters \SelectFilter ;
29
25
use Filament \Tables \Filters \TrashedFilter ;
30
26
use Filament \Tables \Table ;
@@ -109,13 +105,12 @@ public static function form(Form $form): Form
109
105
->label (__ ('department ' ))
110
106
->options (WindPlugin::get ()->getDepartmentModel ()::pluck ('name ' , 'id ' ))
111
107
->required ()
112
- ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ()),
108
+ ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ()),
113
109
TextInput::make ('status ' )
114
110
->label (__ ('status ' ))
115
111
->required ()
116
112
->maxLength (255 ),
117
113
118
-
119
114
TextInput::make ('reply_title ' )
120
115
->label (__ ('reply_title ' ))
121
116
->required ()
@@ -136,8 +131,9 @@ public static function table(Table $table): Table
136
131
->columns ([
137
132
Split::make ([
138
133
ImageColumn::make ('avatar ' )
139
- ->getStateUsing (fn ($ record
140
- ) => 'https://ui-avatars.com/api/?name= ' .urlencode ($ record ->name ).'&color=FFFFFF&background=111827 ' )
134
+ ->getStateUsing (fn (
135
+ $ record
136
+ ) => 'https://ui-avatars.com/api/?name= ' . urlencode ($ record ->name ) . '&color=FFFFFF&background=111827 ' )
141
137
->toggleable ()
142
138
->circular ()
143
139
->grow (false ),
@@ -162,7 +158,7 @@ public static function table(Table $table): Table
162
158
->badge ()
163
159
->searchable ()
164
160
->toggleable ()
165
- ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ())
161
+ ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ())
166
162
->label (__ ('department ' )),
167
163
]),
168
164
@@ -174,7 +170,7 @@ public static function table(Table $table): Table
174
170
->dateTime ()
175
171
->label (__ ('sent at ' )),
176
172
TextColumn::make ('status ' )
177
- ->formatStateUsing (fn (string $ state ): string => __ ("status_ {$ state }" ))
173
+ ->formatStateUsing (fn (string $ state ): string => __ ("status_ {$ state }" ))
178
174
->label (__ ('status ' ))
179
175
->sortable ()
180
176
->searchable ()
@@ -211,7 +207,7 @@ public static function table(Table $table): Table
211
207
])
212
208
->label (__ ('status ' )),
213
209
SelectFilter::make ('department_id ' )
214
- ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ())
210
+ ->visible (fn (): bool => WindPlugin::get ()->hasDepartmentResource ())
215
211
->options (WindPlugin::get ()->getDepartmentModel ()::pluck ('name ' , 'id ' ))
216
212
->label (__ ('department ' )),
217
213
])
0 commit comments