mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
switch year
This commit is contained in:
@@ -9,6 +9,11 @@ use Livewire\Component;
|
||||
class BitcoinEventTable extends Component
|
||||
{
|
||||
public Country $country;
|
||||
|
||||
public ?int $year = null;
|
||||
|
||||
protected $queryString = ['year'];
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.bitcoin-event.bitcoin-event-table', [
|
||||
@@ -27,7 +32,9 @@ class BitcoinEventTable extends Component
|
||||
public function popover($content, $ids)
|
||||
{
|
||||
return to_route('bitcoinEvent.table.bitcoinEvent', [
|
||||
'country' => $this->country->code, 'table' => [
|
||||
'country' => $this->country->code,
|
||||
'year' => $this->year,
|
||||
'table' => [
|
||||
'filters' => [
|
||||
'byid' => $ids,
|
||||
]
|
||||
|
||||
@@ -74,7 +74,8 @@ class BitcoinEventTable extends DataTableComponent
|
||||
public function builder(): Builder
|
||||
{
|
||||
return BitcoinEvent::query()
|
||||
->where(fn($query) => $query->whereHas('venue.city.country',
|
||||
->where(fn($query) => $query
|
||||
->whereHas('venue.city.country',
|
||||
fn($query) => $query->where('code', $this->country))
|
||||
->orWhere('show_worldwide', true));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"php": "^8.2",
|
||||
"akuechler/laravel-geoly": "^1.0",
|
||||
"archtechx/enums": "^0.3.1",
|
||||
"ebess/advanced-nova-media-library": "dev-master#2d7151d8b2159d28e1d73fcc7fe23992e327b7df",
|
||||
|
||||
@@ -44,7 +44,11 @@
|
||||
new Calendar(this.$refs.calendar, {
|
||||
style: 'background',
|
||||
language: 'de',
|
||||
startYear: {{ $year }},
|
||||
dataSource: events,
|
||||
yearChanged: function(e) {
|
||||
@this.set('year', e.currentYear);
|
||||
},
|
||||
clickDay: function(e) {
|
||||
if(e.events.length > 0) {
|
||||
var content = '';
|
||||
|
||||
Reference in New Issue
Block a user