Events System Overview

This is a complex system designed to handle golf event registration with multiple attendee types, profile management, and accommodation preferences, with both user-facing and administrative interfaces.

Core Components

1. Post Types

  • jc_event: Main event posts
  • jc_entry_form: Entry/registration forms
  • jc_event_profile: Profile forms for attendees
  • jc_players_room: Event venue/room details
  • jc_lodging: Accommodation details

2. Database Models

  • JE_Entry: Stores user entry form submissions
  • JE_Profile: Stores attendee profile information
  • JE_Attendee: Links profiles to events with roles (lead, playing partner, guest)
  • JE_Stay_Play: Additional details for accommodation and transportation

3. Database Tables

  • je_entries: Form submissions
  • je_profiles: Attendee profiles
  • je_attendees: Event attendance records
  • je_stay_play: Accommodation preferences

Registration Flow

1. Event Creation

  • Admin creates an Event post
  • Creates associated Entry Form
  • Creates Event Profile Form
  • Optionally creates Players Room and Lodging posts

2. Registration Process

  • User fills out Entry Form
    • Provides their details
    • Can add playing partners
    • Can add non-playing guests
    • Specifies room preferences
    • Saved in je_entries table

3. Profile Collection

  • After acceptance, users fill out Event Profile Form
    • Detailed personal info
    • Playing preferences
    • Accommodation needs
    • Saved in je_profiles table

4. Attendee Management

  • System creates JE_Attendee records linking profiles to events
  • Types: lead, playing_partner, non_playing_guest
  • Tracks relationships between lead bookers and their guests

5. Admin Features

  • DataTables for managing attendees
  • CSV exports of entries and attendees
  • Ability to edit/update attendee details
  • Ballot status management (open, closed, waitlist)

Key Files

1. Admin Interface

  • admin-event-attendees.php: Attendee management UI
  • admin-event-attendees-front.js: DataTable handling
  • Various sidebar files for post type settings

2. Public Forms

  • form-entry.php: Entry form template
  • form-event-profile.php: Profile form template
  • form-handler.js: Frontend form submissions

3. Data Management

  • DataStore classes for each model
  • REST API endpoints for CRUD operations
  • CSV generation for exports

Table of contents