From 18a681b6e00cfe43b691acf90a8e902453ad681b Mon Sep 17 00:00:00 2001 From: Ridwan Abadi Date: Tue, 29 Jan 2019 00:08:04 +0700 Subject: [PATCH] updates --- src/common/pages/Dashboard/index.js | 160 +++++++++++++++++----------- 1 file changed, 97 insertions(+), 63 deletions(-) diff --git a/src/common/pages/Dashboard/index.js b/src/common/pages/Dashboard/index.js index e9a9b2e..84b1db7 100644 --- a/src/common/pages/Dashboard/index.js +++ b/src/common/pages/Dashboard/index.js @@ -27,10 +27,16 @@ import { import Grid from '@material-ui/core/Grid'; import {default as MuiCard} from '@material-ui/core/Card' import {default as MuiCardContent} from '@material-ui/core/CardContent'; +import {default as MuiCardMedia} from '@material-ui/core/CardMedia'; import {default as MuiCardActions} from '@material-ui/core/CardActions'; +import {default as MuiCardActionArea} from '@material-ui/core/CardActionArea'; import {default as MuiCardButton} from '@material-ui/core/Button'; import {default as MuiGridList} from '@material-ui/core/GridList'; import {default as MuiGridListTile} from '@material-ui/core/GridListTile'; +import {default as MuiButton} from '@material-ui/core/Button'; +import {default as MuiDivider} from '@material-ui/core/Divider'; +import Hidden from '@material-ui/core/Hidden'; +import Chip from '@material-ui/core/Chip'; import {default as MuiGridListTileBar} from '@material-ui/core/GridListTileBar'; import ListSubheader from '@material-ui/core/ListSubheader'; import IconButton from '@material-ui/core/IconButton'; @@ -168,7 +174,7 @@ class DashboardComponent extends React.Component { spacing={24} style={{marginTop: 30}}> - + {this.props.appstate.wallet.data.wallet ? ( @@ -186,7 +192,7 @@ class DashboardComponent extends React.Component { ) : ''} - + {this.props.appstate.wallet.data.wallet ? ( @@ -204,7 +210,7 @@ class DashboardComponent extends React.Component { ) : ''} - + {this.props.appstate.wallet.data.wallet ? ( @@ -225,76 +231,104 @@ class DashboardComponent extends React.Component { - - - December - + + + Voucher & Gift Card + + + {(this.vouchersStore.list.length > 0) ? + this.vouchersStore.list.map((item, index) => { + let image = get(item, 'images.logo', ''); - {(this.vouchersStore.list.length > 0) ? - this.vouchersStore.list.map((item, index) => { - let image = get(item, 'images.logo', ''); - - if (!image.includes('http')) { - image = this.http.appendImagePath(image); - } - return ( - this.setState({isOpened: true, data: item})}> - {''}/ - by: {item.name}} - actionIcon={ - - - - } - /> - - ) - }) : () - } - + if (!image.includes('http')) { + image = this.http.appendImagePath(image); + } + return ( + + + + + + + {item.name} + + + Ind + + + From: 100 Point + + + + this.setState({isOpened: true, data: item})} + size="small"> + Redeem + + + + + ) + }) : () + } + + {/**/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*

*/} - {/*Voucher & Gift Card*/} - {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/*Voucher & Gift Card*/} + {/*

*/} - {/**/} - {/*{*/} - {/*(this.vouchersStore.list.length > 0) ?*/} - {/*this.vouchersStore.list.map((item, index) => {*/} - {/*return ( this.setState({isOpened: true, data: item})} key={index} span={6}>*/} - {/**/} - {/*)*/} - {/*})*/} - {/*: (*/} - {/**/} - {/*)*/} - {/*}*/} - {/**/} + {/**/} + {/*{*/} + {/*(this.vouchersStore.list.length > 0) ?*/} + {/*this.vouchersStore.list.map((item, index) => {*/} + {/*return ( this.setState({isOpened: true, data: item})} key={index} span={6}>*/} + {/**/} + {/*)*/} + {/*})*/} + {/*: (*/} + {/**/} + {/*)*/} + {/*}*/} + {/**/} - {/* this.setState({isOpened: false})}*/} - {/*onCancel={() => this.setState({isOpened: false})}*/} - {/*/>*/} - {/*
*/} - {/*
*/} - {/*
*/} + {/* this.setState({isOpened: false})}*/} + {/*onCancel={() => this.setState({isOpened: false})}*/} + {/*/>*/} + {/*
*/} + {/*
*/} + {/*
*/} {/*
*/}