Skip to content

Commit

Permalink
Fixed date range filter conversion. Updated screnshots. Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcogermani87 committed Aug 30, 2024
1 parent 3565e9d commit 3ac0417
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,23 @@ composer test

### E-mail list

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/table.png)
<img src="https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/table.png" style="border-radius:2%"/>

### Advanced filters

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/filters.png)
<img src="https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/filters.png" style="border-radius:2%"/>

### Resend e-mail

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/resend.png)
<img src="https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/resend.png" style="border-radius:2%"/>

### Update addresses and resend e-mail

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/update-and-resend.png)
<img src="https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/update-and-resend.png" style="border-radius:2%"/>

### E-mail view with attachments

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/view.png)
<img src="https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/view.png" style="border-radius:2%"/>

## Credits

Expand Down
5 changes: 0 additions & 5 deletions config/filament-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
'default_sort_column' => 'created_at',
'default_sort_direction' => 'desc',
'datetime_format' => 'Y-m-d H:i:s',
'filters' => [
'created_at' => [
'date_format' => 'Y-m-d',
],
],
'table_search_fields' => [
'subject',
'from',
Expand Down
Binary file modified screenshots/filters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/resend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/update-and-resend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/Filament/Resources/EmailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ public static function table(Table $table): Table
->when(
$data['created_at'],
function (Builder $query, $value): Builder {
$format = config('filament-email.resource.filters.created_at.date_format');
[$start, $end] = explode(' - ', $value);

$start = str_replace('/', '-', $start);
$end = str_replace('/', '-', $end);
return $query->whereBetween('created_at', [
Carbon::createFromFormat($format, $start)
Carbon::createFromTimestamp(strtotime($start))
->format('Y-m-d'),
Carbon::createFromFormat($format, $end)
Carbon::createFromTimestamp(strtotime($end))
->format('Y-m-d'),
]);
}
Expand Down

0 comments on commit 3ac0417

Please sign in to comment.