GatheringsCalendarController

Gatherings Calendar Controller

Manages the interactive calendar view for gatherings across the kingdom.

Features:

  • Quick view modal for gathering details
  • Toggle attendance for gatherings
  • Location map integration
  • Real-time UI updates
  • Responsive calendar navigation

HTML Structure:

<div data-controller="gatherings-calendar"
     data-gatherings-calendar-year-value="2025"
     data-gatherings-calendar-month-value="10"
     data-gatherings-calendar-view-value="month">
  
  <!-- Calendar grid -->
  <div class="gathering-item"
       data-action="click->gatherings-calendar#showQuickView"
       data-gathering-id="123">
    Gathering Name
  </div>
</div>

Constructor

new GatheringsCalendarController()

Methods

connect()

Connect event - setup Bootstrap modal

disconnect()

Disconnect event - cleanup

getCsrfToken() → {string}

Get CSRF token from meta tag or form

Returns:

CSRF token

Type: 
string

initialize()

Initialize the calendar controller

(async) markAttendance(event)

Mark attendance for a gathering from quick view

Parameters:
NameTypeDescription
eventEvent

Click event

(async) showAttendanceModal(event)

Show attendance modal for marking or editing attendance Loads modal content dynamically from server to get full form UI

Parameters:
NameTypeDescription
eventEvent

Click event

showLocation(event)

Show location map for a gathering

Parameters:
NameTypeDescription
eventEvent

Click event

(async) showQuickView(event)

Show quick view modal for a gathering

Parameters:
NameTypeDescription
eventEvent

Click event

showToast(title, message, type)

Show toast notification

Parameters:
NameTypeDefaultDescription
titlestring

Toast title

messagestring

Toast message

typestringinfo

Bootstrap color type (success, danger, warning, info)

(async) toggleAttendance(event)

Toggle attendance for a gathering (legacy method for list view)

Parameters:
NameTypeDescription
eventEvent

Click event

(async) updateAttendance(event)

Update attendance for a gathering from quick view

Parameters:
NameTypeDescription
eventEvent

Click event

updateFeedUrl()

Rebuild the subscribe feed URL from current browser URL filter params