Templates/Loyalty

Templates. Templates/Loyalty

Members

(static, constant) backButton

Source:
Author:
  • Htin Linn Aung

RedeemForm for promotion redeeming in loyalty rewards section

Methods

(static) CreditBased()

Source:
Author:
  • Htin Linn Aung

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)

Source:
Author:
  • Htin Linn Aung

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)

Source:
Author:
  • Shuai Wang

Renders available loyalty, a progress bar until the next reward & 'until next reward' number

Parameters:
Name Type Description
props

React props

Properties
Name Type Description
style object

injected by withTemplate HOC using theme file

loyaltyData object

Loyalty Data fetched from the backend for the user for that restaurant

(async, static) fetchLoyalty()

Source:
Author:
  • Htin Linn Aung

Fetch loyalty data from '/loyalty' endpoint and set component states

(static) Loyalty(props) → {React.Element}

Source:
Author:
  • Htin Linn Aung

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)

Source:
Author:
  • Htin Linn Aung

Render all available loyalty sections

Parameters:
Name Type Description
location object

Memory Router location

history object

Memory Router history

(static) RewardCardSelector(props)

Source:
Author:
  • Mohammad Afzal
Parameters:
Name Type Description
props

(static) RewardCardType1(props)

Source:
Author:
  • Htin Linn Aung

Render rewards stubs

Parameters:
Name Type Description
props object
Properties
Name Type Description
type object

Cell Type used to style the card

name string

Name of the Reward

description string

Reward description

callToAction string

CTA provided by the backend

onClick function

Callback fired when a reward card is clicked

(static) Rewards(props)

Source:
Author:
  • Htin Linn Aung

WalletBased's Rewards section selector for future flexibility

Parameters:
Name Type Description
props object
Properties
Name Type Description
loyaltyData object

fetched data from Loyalty.jsx

(static) selectSection(section, location, history)

Source:
Author:
  • Htin Linn Aung

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>}

Source:
Author:
  • Htin Linn Aung

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)

Source:
Author:
  • Htin Linn Aung

WalletBased loyalty system section selector for future flexibility - work in progress

Parameters:
Name Type Description
props object

(static) WalletRewardType1(props)

Source:
Author:
  • Htin Linn Aung

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)

Source:
Author:
  • Mohammad Afzal
Parameters:
Name Type Description
Component