Skip to main content
Version: 3.0.0

sodexo-bookings-template

The sodexo-bookings-template component displays all user transactions and booking history.

Properties

PropertyHTML AttributeTypeDefaultDescription
calendarEventUrlcalendar-event-urlstring-A link included in the description of the created calendar event

Events

EventTypeDescription
downloadFileCustomEvent<DownloadFileData>Emitted when user wants to add an event to calendar. Provides base64 data for native mobile apps. Note: Listen on window object, not the component

Event Details

DownloadFileData

interface DownloadFileData {
data: string; // Base64 encoded file data (data URI format)
fileName: string; // Suggested filename (e.g., "booking-12345.ics")
mimeType: string; // MIME type: "text/calendar"
}
Web Applications

No implementation required. The component handles calendar file downloads automatically using standard browser APIs.

Mobile Apps Only

The downloadFile event is specifically designed for native mobile applications (Android/iOS) where WebViews don't support file downloads natively.

For native app implementation details, see File Download Handling.

Usage

<!DOCTYPE html>
<html>
<sodexo-bookings-template calendar-event-url="http://event-url"></sodexo-bookings-template>
</html>

Property Naming Convention

Naming Syntax

When using properties:

  • In HTML: Use kebab-case (e.g., api-key, token)
  • In JavaScript: Use camelCase (e.g., apiKey, token)