fixed merge conflicts

This commit is contained in:
Al Duncanson 2018-11-02 14:49:00 -04:00
commit b4f7c0a4cb
2 changed files with 489 additions and 450 deletions

View File

@ -68,7 +68,7 @@ const styles = theme => ({
class ResponsiveDrawer extends React.Component {
state = {
mobileOpen: false,
key: '',
key: 'Home',
open: false
};

View File

@ -11,6 +11,8 @@ import CloseIcon from '@material-ui/icons/Close';
import Button from '@material-ui/core/Button';
import firebase from '../firebase.js';
import GoogleMap from '../components/ReportMap';
import Modal from '@material-ui/core/Modal';
import Typography from '@material-ui/core/Typography';
/**
* Styles that the different
@ -51,6 +53,13 @@ const styles = theme => ({
menu: {
width: 200,
},
paper: {
position: 'absolute',
width: theme.spacing.unit * 50,
backgroundColor: theme.palette.background.paper,
boxShadow: theme.shadows[5],
padding: theme.spacing.unit * 4,
}
});
/**
@ -255,9 +264,25 @@ getMonth = date => {
desc: '',
lat: '',
lng: '',
open: false
open: false,
openModal: false,
hasModalOpened: false
};
handleModalOpen = () => !this.state.hasModalOpened ? this.setState({ openModal: true, hasModalOpened: true }) : null;
handleModalClose = () => {
this.setState({ openModal: false });
};
getModalStyle = () => {
return {
top: `25%`,
left: `75%`,
transform: `translate(-25%, -75%)`,
};
}
/**
* Handles state change in form
* components.
@ -266,7 +291,7 @@ getMonth = date => {
this.setState({
[name]: event.target.value,
});
}
};
/**
* Handles closing the toast.
@ -277,7 +302,7 @@ getMonth = date => {
}
this.setState({ open: false });
}
};
/*
* Get the coordinates
@ -323,7 +348,7 @@ getMonth = date => {
lng: '',
open: true
});
}
};
/**
@ -474,7 +499,6 @@ getMonth = date => {
}}
/>
</Grid>
<Grid item xs={12}>
<Button variant="contained" type="submit" color="primary" className={classes.button}>
Submit
@ -482,8 +506,23 @@ getMonth = date => {
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={6}>
<Grid item xs={12} md={6} onMouseEnter={this.handleModalOpen}>
<GoogleMap onClick={this.getCoordinates}/>
<Modal
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
open={this.state.openModal}
onClose={this.handleModalClose}
>
<div style={this.getModalStyle()} className={classes.paper}>
<Typography variant="title" id="modal-title">
Need a little help?
</Typography>
<Typography variant="subheading" id="simple-modal-description">
Click on the map to drop a pin!
</Typography>
</div>
</Modal>
</Grid>
</Grid>
</form>