mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
add media stuff
This commit is contained in:
@@ -13,6 +13,10 @@ class EventTable extends DataTableComponent
|
||||
|
||||
protected $model = Event::class;
|
||||
|
||||
public bool $viewingModal = false;
|
||||
|
||||
public $currentModal;
|
||||
|
||||
public function configure(): void
|
||||
{
|
||||
$this
|
||||
@@ -51,6 +55,10 @@ class EventTable extends DataTableComponent
|
||||
->sortable(),
|
||||
Column::make("Kurs", "course.name")
|
||||
->sortable(),
|
||||
Column::make("Art")
|
||||
->label(
|
||||
fn($row, Column $column) => view('columns.events.categories')->withRow($row)
|
||||
),
|
||||
Column::make("Von", "from")
|
||||
->format(
|
||||
fn($value, $row, Column $column) => $value->asDateTime()
|
||||
@@ -83,4 +91,20 @@ class EventTable extends DataTableComponent
|
||||
->whereHas('venue.city.country',
|
||||
fn($query) => $query->where('countries.code', $this->country));
|
||||
}
|
||||
|
||||
public function viewHistoryModal($modelId): void
|
||||
{
|
||||
$this->viewingModal = true;
|
||||
$this->currentModal = Event::findOrFail($modelId);
|
||||
}
|
||||
|
||||
public function resetModal(): void
|
||||
{
|
||||
$this->reset('viewingModal', 'currentModal');
|
||||
}
|
||||
|
||||
public function customView(): string
|
||||
{
|
||||
return 'modals.events.register';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user