Class: BookingsController

BookingsController()

BookingsController handles the management, viewing, and exporting of gym bookings.

Constructor

new BookingsController()

Source:

Members

formValidation :Array.<express.RequestHandler>

Validation for the booking management form. Field rules run for create and update only.

Type:
  • Array.<express.RequestHandler>
Source:

routes :express.Router

Type:
  • express.Router
Source:

Methods

(async, static) create()

Source:

(async, static) delete()

Source:

(async, static) exportBookingsXml()

Source:

(async, static) getById()

Source:

(static) handleBookingManagement()

Creates, updates or deletes a booking from the validated management form.

Source:

(async, static) list()

Source:

(async, static) update()

Source:

(static) viewBookingManagement()

Renders the booking management page. Admins and trainers see all bookings; members see only their own. Loads the booking in the URL into the edit form.

Source: