2
2
3
3
namespace Vormkracht10 \FilamentMails \Resources ;
4
4
5
- use Filament \Tables ;
6
- use Filament \Tables \Table ;
7
- use Filament \Infolists \Infolist ;
8
- use Filament \Resources \Resource ;
9
- use Filament \Resources \Pages \Page ;
10
5
use Filament \Infolists \Components \Grid ;
11
- use Filament \Infolists \Components \Tabs ;
12
6
use Filament \Infolists \Components \Section ;
7
+ use Filament \Infolists \Components \Tabs ;
13
8
use Filament \Infolists \Components \Tabs \Tab ;
14
- use Vormkracht10 \FilamentMails \Models \Mail ;
15
9
use Filament \Infolists \Components \TextEntry ;
10
+ use Filament \Infolists \Infolist ;
11
+ use Filament \Resources \Resource ;
12
+ use Filament \Tables ;
13
+ use Filament \Tables \Table ;
14
+ use Vormkracht10 \FilamentMails \Models \Mail ;
16
15
use Vormkracht10 \FilamentMails \Resources \MailResource \Pages \ListMails ;
17
- use Vormkracht10 \FilamentMails \Resources \MailResource \Pages \ListEvents ;
18
16
19
17
class MailResource extends Resource
20
18
{
@@ -62,22 +60,22 @@ public static function infolist(Infolist $infolist): Infolist
62
60
->label (__ ('Subject ' )),
63
61
TextEntry::make ('from ' )
64
62
->label (__ ('From ' ))
65
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
63
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
66
64
TextEntry::make ('to ' )
67
65
->label (__ ('Recipient ' ))
68
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
66
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
69
67
TextEntry::make ('cc ' )
70
68
->label (__ ('CC ' ))
71
69
->default ('- ' )
72
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
70
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
73
71
TextEntry::make ('bcc ' )
74
72
->label (__ ('BCC ' ))
75
73
->default ('- ' )
76
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
74
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
77
75
TextEntry::make ('reply_to ' )
78
76
->default ('- ' )
79
77
->label (__ ('Reply To ' ))
80
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
78
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddress ($ state )),
81
79
]),
82
80
]),
83
81
Section::make ('Content ' )
@@ -167,7 +165,7 @@ public static function table(Table $table): Table
167
165
->label (__ ('Status ' ))
168
166
->sortable ()
169
167
->badge ()
170
- ->color (fn (string $ state ): string => match ($ state ) {
168
+ ->color (fn (string $ state ): string => match ($ state ) {
171
169
'Hard Bounced ' => 'danger ' ,
172
170
'Soft Bounced ' => 'warning ' ,
173
171
'Complained ' => 'danger ' ,
@@ -186,7 +184,7 @@ public static function table(Table $table): Table
186
184
->searchable (),
187
185
Tables \Columns \TextColumn::make ('to ' )
188
186
->label (__ ('Recipient ' ))
189
- ->formatStateUsing (fn ($ state ) => self ::formatEmailAddressForTable ($ state ))
187
+ ->formatStateUsing (fn ($ state ) => self ::formatEmailAddressForTable ($ state ))
190
188
->sortable ()
191
189
->searchable (),
192
190
Tables \Columns \TextColumn::make ('sent_at ' )
0 commit comments