Campsite Controller
Controller for Campsite-related operations.
Properties
Link copied to clipboard
The repository for Campsite.
Link copied to clipboard
Campsites available after applying Explore filters.
Link copied to clipboard
The current filtering error, or null if none exists.
Link copied to clipboard
Whether Explore filters are currently applied.
Link copied to clipboard
Whether campsite filtering is in progress.
Link copied to clipboard
The current campsite search query.
Functions
Link copied to clipboard
Adds a campsite to the repository.
Link copied to clipboard
fun applyFilters(startDate: Timestamp?, endDate: Timestamp?, location: String, minGuests: Int, maxGuests: Int, minRating: Double?)
Applies filters to the campsite list in the Explore screen.
Link copied to clipboard
Clears all applied filters from the Explore screen.
Link copied to clipboard
Gets a Campsite given its campsiteId.
Link copied to clipboard
Gets a list Campsite made by a user.
Link copied to clipboard
Gets the campsites that match the current search query. The query is matched with the campsite name, address, and tags (ignores case).
Link copied to clipboard
Saves the query to the searchQuery variable. An empty query means no search (show all).