-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
roberto.rodriguez
committed
Jun 22, 2019
1 parent
0c28c2a
commit a11995d
Showing
32 changed files
with
426 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ export const logoutAction = data => ({ | |
type: "LOG_OUT", | ||
data | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
export const initConfigsAction = configs => ({ | ||
type: "INIT_CONFIGS", | ||
data: { configs } | ||
}); | ||
}); | ||
|
||
export const updateDepartureCitiesAction = departureCities => ({ | ||
type: "UPDATE_DEPARTURE_CITIES", | ||
data: departureCities | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React from "react"; | ||
import SelectOrigin from "../auth/register/cmp/origin/SelectOrigin"; | ||
import * as configActions from "../../actions/ConfigActions"; | ||
import Header from "../../cmp/header/Header"; | ||
import { connect } from "react-redux"; | ||
import PropTypes from "prop-types"; | ||
|
||
class DepartureCities extends React.Component { | ||
render() { | ||
var { | ||
departureCities, | ||
updateDepartureCities, | ||
cities, | ||
history | ||
} = this.props; | ||
|
||
var cityObjList = departureCities.map(c => ({ | ||
name: cities[c].name, | ||
code: c | ||
})); | ||
|
||
return ( | ||
<div> | ||
<Header /> | ||
<br /> | ||
<div> | ||
<h5 className={"text-center h-margin-20 hr-title"}> | ||
<span className="float-left" onClick={history.goBack}> | ||
<a | ||
className="cursor-pointer bold-text pink-text" | ||
style={{ fontSize: 16 }} | ||
> | ||
Back | ||
</a> | ||
<i className="fa fa-long-arrow-left float-left bold-text pink-text margin-right-10 margin-top-3" /> | ||
</span> | ||
{"Select up to 4 Departure Cities"} | ||
</h5> | ||
</div> | ||
<SelectOrigin | ||
departureCities={cityObjList} | ||
onUpdate={updateDepartureCities} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
DepartureCities.propTypes = { | ||
updateDepartureCities: PropTypes.func, | ||
history: PropTypes.any, | ||
cities: PropTypes.any, | ||
departureCities: PropTypes.any | ||
}; | ||
|
||
const mapStateToProps = ({ authReducer, configReducer }) => ({ | ||
departureCities: authReducer.departureCities | ||
? authReducer.departureCities.split("|") | ||
: [], | ||
cities: configReducer.cities | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
configActions | ||
)(DepartureCities); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ | |
} | ||
} | ||
|
||
.cities-panel-container { | ||
margin-bottom: 0px!important; | ||
} | ||
|
||
|
||
.selected-city{ | ||
margin-right: 15px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.