import React from 'react'; import {inject, observer} from 'mobx-react'; import { Divider } from '@material-ui/core'; import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox , DatePicker, Alert, Input ,Avatar} from 'antd'; import {startCase} from 'lodash'; import './style.scss'; import { withStyles } from '@material-ui/core/styles'; import get from 'lodash.get'; import MediaQuery from 'react-responsive'; const styles = theme => ({ button: { margin: theme.spacing.unit, }, divider: { marginBottom: 10, marginTop: 10, } }); @inject('appstate') @observer export class CheckoutVouchers extends React.Component { constructor(props) { super(props); this.props = props; this.state = { value: 1, }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; this.authStore = props.appstate.auth; this.globalUI = props.appstate.globalUI; this.vouchersStore = props.appstate.vouchers; } componentDidMount() { console.log(this.vouchersStore) // console.log("skuid",this.vouchersStore.skuId); // console.log("skuName",this.vouchersStore.skuName); // console.log("skuPrice",this.vouchersStore.skuPrice); // console.log("data",this.vouchersStore.dataItems); } render() { const {classes} = this.props; const logoUrl = (this.props.vouchersStore.dataItems.images.logo) ? get(this.vouchersStore.dataItems, 'images.logo', '') : 'http://lorempixel.com/400/200'; let image = logoUrl; if (!image.includes('http')) { image = this.http.appendImagePath(image); } return (

Detail Pembelian

{/* */}

Jenis Layanan

:

{this.props.vouchersStore.dataItems.name} - {this.props.vouchersStore.skuName}

Point

:

{(+this.props.vouchersStore.skuPrice || 0).toFixed(0)} Points

Point

{this.props.appstate.wallet.data.point || 0} Points

Total Pembayaran Point

{(+this.props.vouchersStore.skuPrice || 0).toFixed(0)} Points

{this.props.button()}
) } } export default withStyles(styles)(CheckoutVouchers);