GatheringsCalendarController

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()

Source:

Methods

attachQuickViewCloseHandler()

Description:
  • Bootstrap close button in modal header does not delegate to frame-loaded markup.

Source:

connect()

Description:
  • Connect event - setup Bootstrap modal

Source:

disconnect()

Description:
  • Disconnect event - cleanup

Source:

getCsrfToken() → {string}

Description:
  • Get CSRF token from meta tag or form

Source:
Returns:

CSRF token

Type
string

initialize()

Description:
  • Initialize the calendar controller

Source:

(async) markAttendance(event)

Description:
  • Mark attendance for a gathering from quick view

Source:
Parameters:
Name Type Description
event Event

Click event

scrollTodayIntoView()

Description:
  • Reveal today's marker without moving keyboard focus away from the toolbar.

Source:

(async) showAttendanceModal(event)

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

Source:
Parameters:
Name Type Description
event Event

Click event

showLocation(event)

Description:
  • Show location map for a gathering

Source:
Parameters:
Name Type Description
event Event

Click event

showQuickView(event)

Description:
  • Show quick view modal for a gathering

Source:
Parameters:
Name Type Description
event Event

Click event

showToast(title, message, type)

Description:
  • Show toast notification

Source:
Parameters:
Name Type Default Description
title string

Toast title

message string

Toast message

type string info

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

(async) toggleAttendance(event)

Description:
  • Toggle attendance for a gathering (legacy method for list view)

Source:
Parameters:
Name Type Description
event Event

Click event

(async) updateAttendance(event)

Description:
  • Update attendance for a gathering from quick view

Source:
Parameters:
Name Type Description
event Event

Click event

updateFeedUrl()

Description:
  • Rebuild the subscribe feed URL from current browser URL filter params

Source:

updateViewMode()

Description:
  • Keep the static toolbar aligned with the successfully rendered frame.

Source: