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