Move the search box up so that it is in line (to the left) of the paragraph of ambassador text
This commit is contained in:
parent
23318a59e8
commit
8fbd72bb1a
3 changed files with 15 additions and 11 deletions
|
@ -42,7 +42,7 @@ const styles = theme => ({
|
||||||
class EnhancedSearch extends Component {
|
class EnhancedSearch extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {query, onUpdateQuery, onColumnChange} = this.props;
|
const {query, onUpdateQuery, onColumnChange, textComponent} = this.props;
|
||||||
const { classes } = this.props;
|
const { classes } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -62,6 +62,7 @@ class EnhancedSearch extends Component {
|
||||||
startAdornment: <InputAdornment position="start"><Search /></InputAdornment>,
|
startAdornment: <InputAdornment position="start"><Search /></InputAdornment>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{textComponent}
|
||||||
<br />
|
<br />
|
||||||
{this.props.showSearchColumns && this.props.columns.map(column => (
|
{this.props.showSearchColumns && this.props.columns.map(column => (
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
|
|
|
@ -57,6 +57,7 @@ const defaultProps = {
|
||||||
onEdit: () => {},
|
onEdit: () => {},
|
||||||
onDelete: () => {},
|
onDelete: () => {},
|
||||||
onMultipleDelete: () => {},
|
onMultipleDelete: () => {},
|
||||||
|
description: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,8 +82,6 @@ class EnhancedTable extends Component {
|
||||||
};
|
};
|
||||||
}).sort(sortBy('name'))
|
}).sort(sortBy('name'))
|
||||||
};
|
};
|
||||||
|
|
||||||
this.handleRequestSort('', this.props.orderBy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRequestSort = (event, property) => {
|
handleRequestSort = (event, property) => {
|
||||||
|
@ -254,6 +253,7 @@ class EnhancedTable extends Component {
|
||||||
return (
|
return (
|
||||||
<div style={styles.root}>
|
<div style={styles.root}>
|
||||||
<EnhancedSearch
|
<EnhancedSearch
|
||||||
|
textComponent={this.props.description}
|
||||||
query={searchQuery}
|
query={searchQuery}
|
||||||
columns={searchColumns}
|
columns={searchColumns}
|
||||||
showSearchColumns={showSearchColumns}
|
showSearchColumns={showSearchColumns}
|
||||||
|
|
|
@ -350,6 +350,16 @@ class AmbassadorsPage extends Component {
|
||||||
|
|
||||||
data = data.sort(sortBy('location.searchText'));
|
data = data.sort(sortBy('location.searchText'));
|
||||||
|
|
||||||
|
const textComponent = (
|
||||||
|
<span>
|
||||||
|
<FormattedHTMLMessage id="ambassadors.description1" />
|
||||||
|
<Link to="/merchants">
|
||||||
|
<FormattedMessage id="ambassadors.merchants_link_description" />
|
||||||
|
</Link>
|
||||||
|
<FormattedHTMLMessage id="ambassadors.description2" />
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
|
@ -367,14 +377,6 @@ class AmbassadorsPage extends Component {
|
||||||
<img src={LoadingGif} alt="Loading" style={loadingStyle} />
|
<img src={LoadingGif} alt="Loading" style={loadingStyle} />
|
||||||
): (
|
): (
|
||||||
<div>
|
<div>
|
||||||
<p style={{ textAlign: 'left', marginRight: 20 }}>
|
|
||||||
<FormattedHTMLMessage id="ambassadors.description1" />
|
|
||||||
<Link to="/merchants">
|
|
||||||
<FormattedMessage id="ambassadors.merchants_link_description" />
|
|
||||||
</Link>
|
|
||||||
<FormattedHTMLMessage id="ambassadors.description2" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={this.state.mapsModalIsOpen}
|
isOpen={this.state.mapsModalIsOpen}
|
||||||
onRequestClose={() => this.closeMapsModal()}
|
onRequestClose={() => this.closeMapsModal()}
|
||||||
|
@ -396,6 +398,7 @@ class AmbassadorsPage extends Component {
|
||||||
<div>
|
<div>
|
||||||
<br />
|
<br />
|
||||||
<EnhancedTable
|
<EnhancedTable
|
||||||
|
description={textComponent}
|
||||||
columnData={columnData}
|
columnData={columnData}
|
||||||
data={data}
|
data={data}
|
||||||
orderBy="Location"
|
orderBy="Location"
|
||||||
|
|
Loading…
Reference in a new issue