Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple enhanchment (Table, Update and resend, translations and others) #46

Merged
merged 45 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4ff0ef2
Autoload custom Resource from config
marcogermani87 Apr 16, 2024
684ebb3
Autoload custom Resource from config
marcogermani87 Apr 16, 2024
ce65dc9
Update composer.json
marcogermani87 Apr 16, 2024
e1c92a9
Update README.md
marcogermani87 Apr 16, 2024
8191bf7
Re-worked list table. Added support to translations.
Apr 16, 2024
99566c2
Added support for custom datetime format from config
Apr 16, 2024
c3d56c3
Added translations (EN/IT)
Apr 16, 2024
e3c3b9c
Fixed config and test namespace
Apr 16, 2024
ea39cc7
Added support for load plugin from make() method. Enhanched e-mail vi…
Apr 16, 2024
ed6349f
Enhanched list filters with from/to/subject like search. Added advanc…
marcogermani87 Apr 16, 2024
7ba83ae
Fix styling
marcogermani87 Apr 16, 2024
51158fb
Fixed applySearch for ListEmails page. Updated README and screenshots.
marcogermani87 Apr 16, 2024
971886e
Merge branch 'main' of https://github.com/marcogermani87/filament-email
marcogermani87 Apr 16, 2024
f3bad96
Fixed EmailResource for correct EmailModelTest case.
marcogermani87 Apr 16, 2024
e9b4fc2
Update run-tests.yml
marcogermani87 Apr 16, 2024
5896ce7
Fixed issue https://github.com/RickDBCN/filament-email/issues/35. Add…
Apr 17, 2024
34781fd
Fix styling
marcogermani87 Apr 17, 2024
da85ffd
By default no roles needed to access e-mail log section
Apr 17, 2024
7836d3a
Merge branch 'main' of https://github.com/marcogermani87/filament-email
Apr 17, 2024
4524595
Fix styling
marcogermani87 Apr 17, 2024
8fb09e0
Added actingAs User for Test
Apr 17, 2024
337b8ae
Merge branch 'main' of https://github.com/marcogermani87/filament-email
Apr 17, 2024
d3f19e6
Added actingAs User for Test
Apr 17, 2024
6d70018
Fix styling
marcogermani87 Apr 17, 2024
3398d30
Added user factory for test
Apr 17, 2024
a9d30dd
Merge branch 'main' of https://github.com/marcogermani87/filament-email
Apr 17, 2024
e84020d
Fix styling
marcogermani87 Apr 17, 2024
7d3b967
Fixed missing namespace
Apr 17, 2024
695ea21
Added User factory
Apr 17, 2024
3f37efe
Fix styling
marcogermani87 Apr 17, 2024
14bda03
Update UserFactory.php
marcogermani87 Apr 17, 2024
53ff63e
Fixed user factory
Apr 17, 2024
6381e20
Fixed user factory
Apr 17, 2024
e7648fe
Fix styling
marcogermani87 Apr 17, 2024
4d3c92e
Updated screenshots
Apr 17, 2024
2d56e85
Fixed screenshots and translations
Apr 17, 2024
cdbe322
Added ability to resend e-mail and update to, cc(multiple) and bcc(mu…
marcogermani87 Apr 17, 2024
e2aa29e
Fix styling
marcogermani87 Apr 17, 2024
336427b
Fixed modalWidth call
marcogermani87 Apr 17, 2024
5e40c86
Merge branch 'main' of https://github.com/marcogermani87/filament-email
marcogermani87 Apr 17, 2024
4437f66
Fixed modalWidth using string
marcogermani87 Apr 17, 2024
ecbb858
Updated screenshots
marcogermani87 Apr 17, 2024
cd67c1f
Merge branch 'main' into main
marcogermani87 Apr 17, 2024
49133dc
Moved to original namespace RickDBCN
marcogermani87 Apr 17, 2024
dec2dce
Fix styling
marcogermani87 Apr 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
php: [8.3, 8.2, 8.1]
laravel: [10.*]
stability: [prefer-stable]
include:
Expand Down
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<p class="filament-hidden">
<img src="https://banners.beyondco.de/filament-email.png?theme=light&packageManager=composer+require&packageName=rickdbcn%2Ffilament-email&pattern=architect&style=style_1&description=Log+emails+in+your+Filament+project&md=1&showWatermark=0&fontSize=100px&images=https%3A%2F%2Flaravel.com%2Fimg%2Flogomark.min.svg" class="filament-hidden">
</p>

[![Latest Version on Packagist](https://img.shields.io/packagist/v/rickdbcn/filament-email.svg?style=flat-square)](https://packagist.org/packages/rickdbcn/filament-email)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/rickdbcn/filament-email/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/rickdbcn/filament-email/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/rickdbcn/filament-email/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/rickdbcn/filament-email/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/rickdbcn/filament-email.svg?style=flat-square)](https://packagist.org/packages/rickdbcn/filament-email)

Log all outgoing emails in your Laravel project within your Filament panel. You can also resend emails with 1-click in case your recipient hasn't received your email.

## Installation

You can install the package via composer:
Expand All @@ -31,8 +28,7 @@ php artisan vendor:publish --tag="filament-email-config"

Register the plugin through your panel service provider:
```php
// add this within return $panel:
->plugin(new \RickDBCN\FilamentEmail\FilamentEmail())
->plugin(new \RickDBCN\FilamentEmail\FilamentEmail::make())
```


Expand All @@ -41,13 +37,30 @@ Register the plugin through your panel service provider:
```bash
composer test
```

## Screenshots
![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/tableview.png)

### E-mail list

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/table.png)

### Advanced filters

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/filters.png)

### Resend e-mail

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/resend.png)

### Update addresses and resend e-mail

![](https://raw.githubusercontent.com/RickDBCN/filament-email/main/screenshots/update-and-resend.png)

## Credits

- [Rick de Boer](https://github.com/RickDBCN)
- [Ramnzys](https://github.com/ramnzys/filament-email-log)
- [Marco Germani](https://github.com/marcogermani87)
- [All Contributors](../../contributors)

## License
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"keywords": [
"RickDBCN",
"laravel",
"filament-email"
"filament-email",
"marcogermani87"
],
"homepage": "https://github.com/rickdbcn/filament-email",
"license": "MIT",
Expand Down
7 changes: 6 additions & 1 deletion config/filament-email.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

// config for RickDBCN/FilamentEmail
use RickDBCN\FilamentEmail\Filament\Resources\EmailResource;
use RickDBCN\FilamentEmail\Models\Email;

Expand All @@ -13,8 +12,14 @@
'sort' => null,
'default_sort_column' => 'created_at',
'default_sort_direction' => 'desc',
'datetime_format' => 'Y-m-d H:i:s',
'filter_date_format' => 'Y-m-d',
],

'keep_email_for_days' => 60,
'label' => null,

'can_access' => [
'role' => [],
],
];
19 changes: 19 additions & 0 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace RickDBCN\FilamentEmail\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use RickDBCN\FilamentEmail\Tests\Models\User;

class UserFactory extends Factory
{
protected $model = User::class;

public function definition(): array
{
return [
'name' => $this->faker->name,
'email' => $this->faker->unique()->safeEmail,
];
}
}
27 changes: 27 additions & 0 deletions resources/lang/en/filament-email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

return [
'created_at' => 'Created at',
'sent_at' => 'Sent at',
'html' => 'HTML',
'text' => 'Text',
'raw' => 'Raw',
'debug_info' => 'Debug info',
'cc' => 'CC',
'to' => 'To',
'from' => 'From',
'header' => 'Headers',
'resend_email_heading' => 'Resend e-mail',
'resend_email_description' => 'Are you sure you want to resend this e-mail?',
'resend_email_success' => 'The e-mail was sent with success',
'resend_email_error' => 'Unable to send e-mail, internal error',
'email_log' => 'E-mail Log',
'subject' => 'Subject',
'from_filter' => 'From',
'to_filter' => 'To',
'navigation_label' => 'E-mail Log',
'navigation_group' => 'Admin',
'bcc' => 'BCC',
'insert_multiple_email_placelholder' => 'Insert one or more e-mail',
'update_and_resend_email_heading' => 'Update and resend e-mail',
];
27 changes: 27 additions & 0 deletions resources/lang/it/filament-email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

return [
'created_at' => 'Creato il',
'sent_at' => 'Data di invio',
'html' => 'HTML',
'text' => 'Testo',
'raw' => 'Raw',
'debug_info' => 'Info di debug',
'cc' => 'CC',
'to' => 'A',
'from' => 'Da',
'header' => 'Intestazione',
'resend_email_heading' => 'Re-invia e-mail',
'resend_email_description' => 'Sei sicuro di voler re-inviare questa e-mail?',
'resend_email_success' => "L'e-mail è stata inviata con successo",
'resend_email_error' => "Impossibile inviare l'email, errore interno",
'email_log' => 'E-mail Log',
'subject' => 'Oggetto',
'from_filter' => 'Dal',
'to_filter' => 'Al',
'navigation_label' => 'E-mail Log',
'navigation_group' => 'Admin',
'bcc' => 'BCC',
'insert_multiple_email_placelholder' => 'Inserisci una o più e-mail',
'update_and_resend_email_heading' => 'Modifica and re-invia e-mail',
];
Binary file added 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 added 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 added 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 removed screenshots/tableview.jpg
Binary file not shown.
Binary file removed screenshots/tableview.png
Binary file not shown.
Binary file added 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.
Loading