update: Wallet Page
This commit is contained in:
parent
69571af6f7
commit
8d56451280
|
@ -39,7 +39,7 @@ export default class ItemList extends React.Component {
|
||||||
<p className={'nameText'}>{data.name}</p>
|
<p className={'nameText'}>{data.name}</p>
|
||||||
<div className={'childContainer'}>
|
<div className={'childContainer'}>
|
||||||
<p className={'childTitle'}>Price</p>
|
<p className={'childTitle'}>Price</p>
|
||||||
<p className={'childText'}>{(+data.price).toFixed(0)} Points</p>
|
<p className={'childText'}>{(+data.price).toFixed(0)} BTN Reward</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={'childContainer'}>
|
<div className={'childContainer'}>
|
||||||
<p className={'childTitle'}>Voucher Code</p>
|
<p className={'childTitle'}>Voucher Code</p>
|
||||||
|
|
|
@ -57,12 +57,12 @@ export default class WalletComponent extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.globalUI.openLoading();
|
// this.globalUI.openLoading();
|
||||||
this.transactionStore.getAll().then(res => {
|
// this.transactionStore.getAll().then(res => {
|
||||||
this.globalUI.closeLoading();
|
// this.globalUI.closeLoading();
|
||||||
});
|
// });
|
||||||
this.transactionStore.getAmount();
|
// this.transactionStore.getAmount();
|
||||||
this.bankStore.getByUserID('tesss');
|
// this.bankStore.getByUserID('tesss');
|
||||||
// this.globalUI.closeLoading();
|
// this.globalUI.closeLoading();
|
||||||
// this.authStore.getWallet();
|
// this.authStore.getWallet();
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@ export default class WalletComponent extends React.Component {
|
||||||
handleChange = (event, index, value) => this.setState({value});
|
handleChange = (event, index, value) => this.setState({value});
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const undeposit_fund = <NumberFormat value={new DC(this.transactionStore.wallet.pending_payment_to_wallet || 0).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '}/>;
|
const voucher = <NumberFormat value={(500000).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '}/>;
|
||||||
const balance = <NumberFormat value={new DC(this.transactionStore.wallet.balance || 0).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '}/>;
|
const points = <NumberFormat value={15000} displayType={'text'} thousandSeparator={true}/>;
|
||||||
|
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
@ -170,19 +170,22 @@ export default class WalletComponent extends React.Component {
|
||||||
<div>
|
<div>
|
||||||
<div className="col s6 m6">
|
<div className="col s6 m6">
|
||||||
<Card className="cardLite row">
|
<Card className="cardLite row">
|
||||||
<CardTitle title={undeposit_fund} subtitle="Undeposited Funds"/>
|
<CardTitle titleStyle={{color:'#6772e5'}} title={voucher} subtitle="Voucher"/>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<div className="col s6 m6">
|
<div className="col s6 m6">
|
||||||
<Card className="cardLite row">
|
<Card className="cardLite row">
|
||||||
<CardTitle titleStyle={{color:'#6772e5'}} title={balance} subtitle="Total Balance"/>
|
<CardTitle titleStyle={{color:'#6772e5'}} title={points} subtitle="Points"/>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<div className="col s12 m12">
|
<div className="col s12 m12">
|
||||||
<Card className="cardLite row">
|
<Card className="cardLite row">
|
||||||
<CardTitle title={balance} subtitle="Your Balance"/>
|
<CardTitle title={voucher} subtitle="Your Voucher"/>
|
||||||
|
</Card>
|
||||||
|
<Card className="cardLite row">
|
||||||
|
<CardTitle title={points} subtitle="Your Points"/>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -226,9 +229,9 @@ export default class WalletComponent extends React.Component {
|
||||||
{/*primary={true}/>*/}
|
{/*primary={true}/>*/}
|
||||||
<RaisedButton
|
<RaisedButton
|
||||||
className="ToolbarGroupLastButton"
|
className="ToolbarGroupLastButton"
|
||||||
icon={<ArchiveIcon/>}
|
icon={<UnarchiveIcon/>}
|
||||||
label="Withdraw"
|
label="Top Up"
|
||||||
onClick={() => this.globalUI.showDialog(DIALOG.WALLET.WITHDRAW)}
|
// onClick={() => this.globalUI.showDialog(DIALOG.WALLET.WITHDRAW)}
|
||||||
primary={true}/>
|
primary={true}/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user