refactoring into clusters
This commit is contained in:
1 parent
042a5a8b58
commit
48deb69379
97 files changed
+186
-198
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Newsletter\MailVersands\Tables;
|
||||
|
||||
use App\Actions\SendMail\SendNewsletter;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\SelectColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class MailVersandsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')->label('Benennung'),
|
||||
SelectColumn::make('mail_gruppen_id')
|
||||
->optionsRelationship(name: 'mail_gruppen', titleAttribute: 'name')
|
||||
->label('Versand an Gruppe'),
|
||||
SelectColumn::make('mail_vorlage_id')
|
||||
->optionsRelationship(name: 'mail_vorlage', titleAttribute: 'titel')
|
||||
->label('Vorlage'),
|
||||
// TextColumn::make('sende_zeitpunkt')
|
||||
// ->alignCenter()
|
||||
// ->since()
|
||||
// ->badge()
|
||||
// ->dateTimeTooltip()
|
||||
// ->label('Sende Zeitpunkt'),
|
||||
// TextColumn::make('versand_am')
|
||||
// ->alignCenter()
|
||||
// ->since()
|
||||
// ->badge()
|
||||
// ->dateTimeTooltip(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
->tooltip('Newsletter Einstellungen'),
|
||||
Action::make('sendmail')
|
||||
->tooltip('Sende Jetzt')
|
||||
->modalHeading('Newsletter Versand')
|
||||
->icon('heroicon-o-paper-airplane')
|
||||
->modalDescription('E-Mails werden gelisted und zum gewählten Datum versandt.')
|
||||
->requiresConfirmation()
|
||||
->modalSubmitActionLabel('Senden')
|
||||
->iconButton()
|
||||
->modalIcon('heroicon-o-paper-airplane')
|
||||
->action(fn ($record) => SendNewsletter::mailit($record)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user