From e7012b3382e2463894839c503a8f78f1d46c3391 Mon Sep 17 00:00:00 2001 From: enggar_ganteng Date: Thu, 3 Jan 2019 18:44:27 +0700 Subject: [PATCH] checkout page --- src/common/pages/App/routes.js | 2 + src/common/pages/Vouchers/Checkout/index.js | 114 ++++++++++++++++++++ src/common/pages/Vouchers/Verify/index.js | 37 +------ src/common/routes.js | 1 + 4 files changed, 122 insertions(+), 32 deletions(-) diff --git a/src/common/pages/App/routes.js b/src/common/pages/App/routes.js index c917b35..b52a227 100644 --- a/src/common/pages/App/routes.js +++ b/src/common/pages/App/routes.js @@ -12,6 +12,7 @@ import WalletComponent from '../Wallet'; import ItemsComponent from '../Items/index'; import VouchersComponent from '../Vouchers/index'; import VerifyVouchers from '../Vouchers/Verify'; +import CheckoutVouchers from '../Vouchers/Checkout'; import FormItems from "../Items/FormItems/FormItems"; import FormItemAdmin from "../Items/FormItems/FormItemAdmin"; import FormPromotion from "../Items/FormItems/FormPromotion"; @@ -85,6 +86,7 @@ export default class ComponentName extends React.Component { + diff --git a/src/common/pages/Vouchers/Checkout/index.js b/src/common/pages/Vouchers/Checkout/index.js index e69de29..c61d8dc 100644 --- a/src/common/pages/Vouchers/Checkout/index.js +++ b/src/common/pages/Vouchers/Checkout/index.js @@ -0,0 +1,114 @@ +import React from 'react'; +import {inject, observer} from 'mobx-react'; +import { + FlatButton +} from 'material-ui'; +import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox ,Divider, DatePicker, Alert, Input ,Avatar} from 'antd'; +import {startCase} from 'lodash'; +import LoadingDialog from "../../LoadingDialog"; +import Loader from 'react-loader-advanced'; +// import './style.scss'; +import {DIALOG} from "../../../stores/global_ui"; +import EmptyComponent from '../../EmptyComponent'; +import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; +import Search from 'material-ui/svg-icons/action/search'; +import Timer from 'react-compound-timer'; + +@inject('appstate') +@observer +export default 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; + } + + componentDidMount() { + + } + + render() { + + return ( +
+
+
+
+
+ this.props.history.goBack()} + label="Back" + primary={true} + icon={} + /> + + +

+ Detail Pembelian +

+
}> +
+
+
+ +
+
+
+
+
+
+

Jenis Layanan

+
+
+

: KFC Rp.50.000,00

+
+
+
+
+

Point

+
+
+

: 150,000

+
+
+
+
+
+ +
+
+ +
+
+

Poin

+

150,000

+
+
+ +
+
+

Total Pembayaran Poin

+

150,000

+
+
+
+ +
+
+
+
+
+
+
+ ) + } +} diff --git a/src/common/pages/Vouchers/Verify/index.js b/src/common/pages/Vouchers/Verify/index.js index ca9ed31..a99a169 100644 --- a/src/common/pages/Vouchers/Verify/index.js +++ b/src/common/pages/Vouchers/Verify/index.js @@ -13,6 +13,7 @@ import EmptyComponent from '../../EmptyComponent'; import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; import Search from 'material-ui/svg-icons/action/search'; import Timer from 'react-compound-timer'; +import {LINKS} from "../../../routes"; @inject('appstate') @observer @@ -22,9 +23,6 @@ export default class VerifyVouchers extends React.Component { this.props = props; this.state = { value: 1, - valueMinimal: 0, - valueMaximal: 0, - changeSearch:false, }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; @@ -36,38 +34,10 @@ export default class VerifyVouchers extends React.Component { } - handleChangeMinimal = (valueMinimal) => { - this.setState({ valueMinimal }); - }; - - handleChangeMaximal = (valueMaximal) => { - this.setState({ valueMaximal }); - }; - - handleBlur = () => { - console.log('blur'); - } - - handleFocus = () => { - console.log('focus'); - } - - handleChangeSearch = () => { - this.setState({ - changeSearch : true - }) - } - - handleChangeSearchFalse = () => { - this.setState({ - changeSearch : false - }) - } render() { - const { valueMinimal, valueMaximal } = this.state; return (
@@ -109,7 +79,10 @@ export default class VerifyVouchers extends React.Component {
- +
diff --git a/src/common/routes.js b/src/common/routes.js index 22034bb..12dff0e 100644 --- a/src/common/routes.js +++ b/src/common/routes.js @@ -112,6 +112,7 @@ export const LINKS = { CAR_SEARCH:'/app/car/search', VOUCHERS: '/app/vouchers', VERIFY_VOUCHERS: '/app/vouchers/verify', + CHECKOUT_VOUCHERS: '/app/vouchers/checkout', CART_DETAIL: '/app/cart', };