import React from 'react'; import {inject, observer} from 'mobx-react'; import {Link, withRouter} from 'react-router'; import { Modal, Button, Alert, Select } from 'antd'; import './style.scss'; import { Route } from 'react-router-dom' import {LINKS} from "../../../routes"; import NumberFormat from 'react-number-format'; import get from 'lodash.get'; const Option = Select.Option; @withRouter @inject('appstate') @observer export default class ModalVouchersComponent extends React.Component { constructor(props) { super(props); this.props = props; this.state = { selectedOption: '', hidden:'inline', skuName:'', skuPrice:'0', buttonDisbaled:true }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; this.vouchersStore = props.appstate.vouchers; } componentDidMount() { const {item} = this.props.appstate; item.getDetail(this.props.data.id); } render() { const {item} = this.props.appstate; const {data = {}, isVisible = false, onOk = () => {}, onCancel = () => {}, title='Modal'} = this.props; let image = get(data, 'images.logo', ''); if (!image.includes('http')) { image = this.http.appendImagePath(image); } // console.log(item.selectedData); const additional_data = get(data, 'additional_data', {}) || {}; return (

{data.name}

{data.description}

{(additional_data.information != null) &&

Information

{additional_data.information}

} type="success" />}

Points

( )} />
) } }