sodexo-orders-template
The sodexo-orders-template component displays all user orders with detailed tracking and management features. This template includes built-in API integration, i18n, cart management, and theme provider.
Authentication Required
This template requires a valid authentication token to access order data.
Properties
| Property | HTML Attribute | Type | Default | Description |
|---|---|---|---|---|
theme | theme | Theme | Default Sodexo theme | Customization variables for Sodexo components theme |
apiKey | api-key | string | - | X-API-key for Sodexo API |
token | token | string | - | Authentication token for Sodexo API |
Usage
- HTML
<!DOCTYPE html>
<html>
<body>
<sodexo-orders-template
api-key="your-api-key"
token="user-auth-token"
></sodexo-orders-template>
<script>
const element = document.querySelector('sodexo-orders-template');
// Apply custom theme
element.theme = {
'--sodexo-primary-color': '#283897',
'--sodexo-primary-text-color': '#283897',
'--sodexo-primary-background-color': '#f7f8ff',
'--sodexo-font-family': 'Open Sans',
};
</script>
</body>
</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)