Skip to content

Commit

Permalink
Merge branch 'main' of github.com:vormkracht10/filament-mails
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Aug 30, 2024
2 parents adc87ac + 0c92739 commit 8854ee9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Vormkracht10\FilamentMails\Resources;

use Filament\Tables;
use Filament\Tables\Table;
use Filament\Infolists\Infolist;
use Filament\Resources\Resource;
use Filament\Infolists\Components\Grid;
use Filament\Infolists\Components\Tabs;
use Filament\Infolists\Components\Section;
use Filament\Infolists\Components\Tabs;
use Filament\Infolists\Components\Tabs\Tab;
use Vormkracht10\FilamentMails\Models\Mail;
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Vormkracht10\FilamentMails\Models\Mail;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ListMails;

class MailResource extends Resource
Expand Down Expand Up @@ -68,22 +68,22 @@ public static function infolist(Infolist $infolist): Infolist
->label(__('Subject')),
TextEntry::make('from')
->label(__('From'))
->formatStateUsing(fn($state) => self::formatEmailAddress($state)),
->formatStateUsing(fn ($state) => self::formatEmailAddress($state)),
TextEntry::make('to')
->label(__('Recipient'))
->formatStateUsing(fn($state) => self::formatEmailAddress($state)),
->formatStateUsing(fn ($state) => self::formatEmailAddress($state)),
TextEntry::make('cc')
->label(__('CC'))
->default('-')
->formatStateUsing(fn($state) => self::formatEmailAddress($state)),
->formatStateUsing(fn ($state) => self::formatEmailAddress($state)),
TextEntry::make('bcc')
->label(__('BCC'))
->default('-')
->formatStateUsing(fn($state) => self::formatEmailAddress($state)),
->formatStateUsing(fn ($state) => self::formatEmailAddress($state)),
TextEntry::make('reply_to')
->default('-')
->label(__('Reply To'))
->formatStateUsing(fn($state) => self::formatEmailAddress($state)),
->formatStateUsing(fn ($state) => self::formatEmailAddress($state)),
]),
]),
Section::make('Content')
Expand Down Expand Up @@ -173,7 +173,7 @@ public static function table(Table $table): Table
->label(__('Status'))
->sortable()
->badge()
->color(fn(string $state): string => match ($state) {
->color(fn (string $state): string => match ($state) {
'Hard Bounced' => 'danger',
'Soft Bounced' => 'warning',
'Complained' => 'danger',
Expand All @@ -192,7 +192,7 @@ public static function table(Table $table): Table
->searchable(),
Tables\Columns\TextColumn::make('to')
->label(__('Recipient'))
->formatStateUsing(fn($state) => self::formatEmailAddressForTable($state))
->formatStateUsing(fn ($state) => self::formatEmailAddressForTable($state))
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('sent_at')
Expand All @@ -202,7 +202,7 @@ public static function table(Table $table): Table
->searchable(),
])
->filters([
//
//
])
->actions([
Tables\Actions\ViewAction::make()
Expand Down Expand Up @@ -250,7 +250,7 @@ private static function formatEmailAddressForTable($state): string

$data = json_decode($state, true);

if (!is_array($data)) {
if (! is_array($data)) {
return (string) $state;
}

Expand Down

0 comments on commit 8854ee9

Please sign in to comment.