Members
(static, constant) backButton
RedeemForm for promotion redeeming in loyalty rewards section
Methods
(static) CreditBased()
CreditBased loyalty system section selector for future flexibility - work in progress
Parameters:
Name | Type | Description |
---|---|---|
props.loyaltyData.loyaltyData |
||
props.loyaltyData.loyaltyLayout |
||
props.loyaltyData.loyaltyData.loyaltyData |
||
props.loyaltyData.loyaltyData.loyaltyLayout |
||
props.loyaltyData |
object | fetched data from Loyalty component |
(static) CreditRewardType1(style, loyaltyData)
Renders available loyalty, a progress bar until the next reward & 'until next reward' number
Parameters:
Name | Type | Description |
---|---|---|
style.style |
||
style.loyaltyData |
||
style |
object | injected by withTemplate HOC using theme file |
loyaltyData |
object | prop from Loyalty parent component |
(static) CreditRewardType2(props)
Renders available loyalty, a progress bar until the next reward & 'until next reward' number
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
React props Properties
|
(async, static) fetchLoyalty()
Fetch loyalty data from '/loyalty' endpoint and set component states
(static) Loyalty(props) → {React.Element}
Fetch loyalty data from '/loyalty' endpoint & returns Loyalty component
Parameters:
Name | Type | Description |
---|---|---|
props |
object | |
prop.style |
object | Theme - Theme value from template provider |
props.style |
||
props.walletProps |
object | props just for wallet configuration |
props.sections |
object | Config - Loyalty Section to render |
Returns:
- Fetch loyalty data from '/loyalty' endpoint & returns Loyalty component
- Type
- React.Element
(static) renderLoyalty(location, history)
Render all available loyalty sections
Parameters:
Name | Type | Description |
---|---|---|
location |
object | Memory Router location |
history |
object | Memory Router history |
(static) RewardCardSelector(props)
Parameters:
Name | Type | Description |
---|---|---|
props |
(static) RewardCardType1(props)
Render rewards stubs
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
(static) Rewards(props)
WalletBased's Rewards section selector for future flexibility
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
(static) selectSection(section, location, history)
Loyalty section selector
Parameters:
Name | Type | Description |
---|---|---|
section |
object | |
location |
object | Memory Router location |
history |
object | Memory Router history |
(async, static) verifyPromoCode(values, actions) → {Promise.<string>}
Verify Promo Code Input from the user
Parameters:
Name | Type | Description |
---|---|---|
values |
object | |
actions |
object |
Returns:
The success/failure from promo redeeming
- Type
- Promise.<string>
(static) WalletBased(props)
WalletBased loyalty system section selector for future flexibility - work in progress
Parameters:
Name | Type | Description |
---|---|---|
props |
object |
(static) WalletRewardType1(props)
Renders Your Rewards section in Your Rewards under Profile
Parameters:
Name | Type | Description |
---|---|---|
props |
object | |
prop.style |
object | Theme - Theme value from template provider |
props.showRedeem |
boolean | To decide whether to show redeem indicator |
props.onClickReward |
function | Callback for when a reward card rendered by this component is clicked |
props.style |
||
props.onClickRedeem |
||
props.history |
object | Memory Router history - from Loyalty.jsx |
props.loyaltyData |
object | Loyalty data fetched by parent to this component |
(static) withRewardCard(Component)
Parameters:
Name | Type | Description |
---|---|---|
Component |