From b9e3d7e4b3f1234c31ec5ced13624536932cb6c6 Mon Sep 17 00:00:00 2001 From: enggar_ganteng Date: Thu, 3 Jan 2019 00:39:48 +0700 Subject: [PATCH] search change --- src/common/pages/Hotel/HotelSearch.js | 42 +++++++++++++++++++++++++-- src/common/pages/Hotel/index.js | 33 +-------------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/src/common/pages/Hotel/HotelSearch.js b/src/common/pages/Hotel/HotelSearch.js index 831273f..69a81eb 100644 --- a/src/common/pages/Hotel/HotelSearch.js +++ b/src/common/pages/Hotel/HotelSearch.js @@ -1,15 +1,17 @@ import React from 'react'; import {inject, observer} from 'mobx-react'; import { - RaisedButton + FlatButton } from 'material-ui'; -import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox } from 'antd'; +import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox ,Divider } 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'; @inject('appstate') @observer @@ -21,6 +23,7 @@ export default class HotelSearch extends React.Component { value: 1, valueMinimal: 0, valueMaximal: 0, + changeSearch:false, }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; @@ -48,6 +51,18 @@ export default class HotelSearch extends React.Component { console.log('focus'); } + handleChangeSearch = () => { + this.setState({ + changeSearch : true + }) + } + + handleChangeSearchFalse = () => { + this.setState({ + changeSearch : false + }) + } + render() { @@ -88,6 +103,29 @@ export default class HotelSearch extends React.Component {
+
+ this.props.history.goBack()} + label="Back" + primary={true} + icon={} + /> + +
+ {(this.state.changeSearch == true) ? ( + +
+ ini form search +
+
+ ) : ( +
+ )} + + diff --git a/src/common/pages/Hotel/index.js b/src/common/pages/Hotel/index.js index ec4910a..af5a6c3 100644 --- a/src/common/pages/Hotel/index.js +++ b/src/common/pages/Hotel/index.js @@ -40,26 +40,11 @@ import './style.scss'; @inject('appstate') @observer -export default class CheckSchedule extends React.Component { +export default class HotelComponent extends React.Component { constructor(props) { super(props); this.props = props; this.state = { - maskapai: "", - returnDateDisabled: true, - depatureAirport: '', - destinationAirport: '', - adult: 1, - children: 0, - baby: 0, - value: 0, - searchTimeoutId: false, - errorMessageDialog: false, - errorMessage: "", - errorDepature: "", - errorDestination: "", - searchTextArrival: '', - searchTextDeparture: '' }; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; @@ -155,13 +140,6 @@ export default class CheckSchedule extends React.Component {
-
- -
- - -
-
@@ -170,15 +148,6 @@ export default class CheckSchedule extends React.Component { this.props.history.push(LINKS.HOTEL_SEARCH); console.log('hotel'); }} icon="search">Search - {/* { - this.props.history.push(LINKS.HOTEL_SEARCH); - console.log('hotel'); - }} - label="Find Schedule" - primary={true} - fullWidth={(window.innerWidth < 600) ? true : false} - icon={search}/> */}