meetup-events map

This commit is contained in:
Benjamin Takats
2022-12-15 20:31:32 +01:00
parent 1dde4dc544
commit ce0c12ac9e
2 changed files with 28 additions and 0 deletions

View File

@@ -13,6 +13,17 @@ class MeetupEventTable extends Component
public Country $country; public Country $country;
public ?int $year = null;
protected $queryString = ['year'];
public function mount()
{
if (!$this->year) {
$this->year = now()->year;
}
}
public function render() public function render()
{ {
return view('livewire.meetup.meetup-event-table', [ return view('livewire.meetup.meetup-event-table', [
@@ -39,6 +50,19 @@ class MeetupEventTable extends Component
]), ]),
]); ]);
} }
public function filterByMarker($id)
{
return to_route('meetup.table.meetupEvent', [
'country' => $this->country->code,
'year' => $this->year,
'table' => [
'filters' => [
'byid' => $id,
],
]
]);
}
public function popover($content, $ids) public function popover($content, $ids)
{ {

View File

@@ -45,7 +45,11 @@
new Calendar(this.$refs.calendar, { new Calendar(this.$refs.calendar, {
style: 'background', style: 'background',
language: 'de', language: 'de',
startYear: {{ $year }},
dataSource: events, dataSource: events,
yearChanged: function(e) {
@this.set('year', e.currentYear);
},
clickDay: function(e) { clickDay: function(e) {
if(e.events.length > 0) { if(e.events.length > 0) {
var content = ''; var content = '';