mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
meetup-events map
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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 = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user