Skip to content

Commit f025911

Browse files
committed
fixes slideovers
1 parent 11cca95 commit f025911

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

src/Resources/EventResource.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class EventResource extends Resource
2424

2525
protected static bool $shouldRegisterNavigation = true;
2626

27+
public function getTitle(): string
28+
{
29+
return __('Events');
30+
}
31+
2732
public static function getNavigationParentItem(): ?string
2833
{
2934
return __('Mails');
@@ -41,7 +46,7 @@ public static function getNavigationLabel(): string
4146

4247
public static function getLabel(): ?string
4348
{
44-
return __('Events');
49+
return __('Event');
4550
}
4651

4752
public static function getPluralModelLabel(): string
@@ -54,11 +59,6 @@ public static function getNavigationIcon(): string
5459
return 'heroicon-o-calendar';
5560
}
5661

57-
public function getTitle(): string
58-
{
59-
return __('Events');
60-
}
61-
6262
public static function infolist(Infolist $infolist): Infolist
6363
{
6464
return $infolist
@@ -214,10 +214,6 @@ public static function table(Table $table): Table
214214
})
215215
->searchable(),
216216
Tables\Columns\TextColumn::make('mail.subject')
217-
->url(fn (MailEvent $record) => route('filament.' . filament()->getCurrentPanel()?->getId() . '.resources.mails.view', [
218-
'record' => $record->mail,
219-
'tenant' => filament()->getTenant()?->id,
220-
]))
221217
->label(__('Subject'))
222218
->searchable(['subject', 'payload']),
223219
Tables\Columns\TextColumn::make('occurred_at')
@@ -233,6 +229,8 @@ public static function table(Table $table): Table
233229
])
234230
->actions([
235231
Tables\Actions\ViewAction::make()
232+
->url(null)
233+
->modal()
236234
->slideOver()
237235
->label(__('View'))
238236
->hiddenLabel()

src/Resources/EventResource/Pages/ListEvents.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public function getTabs(): array
5454
->badge(MailEvent::where('type', EventType::OPENED)->count())
5555
->modifyQueryUsing(fn (Builder $query) => $query->where('type', EventType::OPENED)),
5656

57+
'soft_bounce' => Tab::make()
58+
->label(__('Soft Bounce'))
59+
->icon('heroicon-o-x-circle')
60+
->badge(MailEvent::where('type', EventType::SOFT_BOUNCED)->count())
61+
->modifyQueryUsing(fn (Builder $query) => $query->where('type', EventType::SOFT_BOUNCED)),
62+
5763
'bounced' => Tab::make()
5864
->label(__('Bounced'))
5965
->badgeColor('danger')

src/Resources/MailResource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ public static function table(Table $table): Table
346346
])
347347
->actions([
348348
Tables\Actions\ViewAction::make()
349+
->url(null)
350+
->modal()
349351
->slideOver()
350352
->label(__('View'))
351353
->hiddenLabel()

0 commit comments

Comments
 (0)