Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…h2018 into ViewEventDetail
  • Loading branch information
Melinda Schmitz committed Sep 23, 2018
2 parents e3ca857 + b2b6706 commit cce12bc
Show file tree
Hide file tree
Showing 22 changed files with 541 additions and 444 deletions.
20 changes: 10 additions & 10 deletions .firebase/hosting.Y2xpZW50XGJ1aWxk.cache
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
asset-manifest.json,1537722543937,444958e1144c4a7250aba21cb82af4c90bf41c6786a5b57491a6d3e270fe97df
index.html,1537722543934,e47134aa0538bb539df93f71b61096f1e321ae4e8867bbbb85acc37649c9c2ee
favicon.ico,1537722526249,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9
manifest.json,1537722526251,65d4aa66cd0b8963e88196705111adfccad2e8b80725b6a7a82ca8a9a0de8889
service-worker.js,1537722544092,7f9e52f46c148953ecbce2663166e5163c495c4b909b503f876d5e795c7eddf9
static/css/main.92381bc7.css,1537722543988,d21a5eef18cc28a1c724e22f8b80a9d74a571abe410a0335ff2d698e9c63a6d7
static/media/profilepic.f7f63b88.png,1537722543988,0a9d7a0037b51e9a5bc3d7d76fe4e36f0808f32960c0430fb86554a734f3b8a5
static/css/main.92381bc7.css.map,1537722543990,b7f18cddbb3be51529ab58d7dac0c3903016c574a5cae8aadd4d1ce6452287d0
static/js/main.9eccd006.js,1537722543990,bf4c640135f3bc3d2d5727adc7f727e80b245a301facac2b23435f653c8fbf00
static/js/main.9eccd006.js.map,1537722543992,208917158d78d2370c428da106b6aecc108e9dbaccde2fe003d5cc87df229af4
asset-manifest.json,1537732730536,612c78b65821425fd0a6104cdb20234ea30344ba1ecf4647734078f99b394983
index.html,1537732730538,47538efa4037e4eb340bc19072628d2ebb453628d71a8c2bc84e9c61ad5f53b8
manifest.json,1537732714142,65d4aa66cd0b8963e88196705111adfccad2e8b80725b6a7a82ca8a9a0de8889
favicon.ico,1537732714140,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9
service-worker.js,1537732730703,3619f2eef63077ffb185885bf55a9781c49736ca10a3c9f38c9adc8024e8641b
static/css/main.edf78ce3.css,1537732730584,7e0cc15dd432698defc16bdd9762cac15af47515351966550e414be4a3a3cccb
static/media/profilepic.f7f63b88.png,1537732730559,0a9d7a0037b51e9a5bc3d7d76fe4e36f0808f32960c0430fb86554a734f3b8a5
static/css/main.edf78ce3.css.map,1537732730585,839fc976419b66f5650c7807bf955cd4c7bc3b4a1705c38a8f0f2151e1e701b7
static/js/main.3bbb433a.js,1537732730584,3b0c8bff785013954a60e493c6bb12f7d1be5ae376cc8508699f24c913f54e9e
static/js/main.3bbb433a.js.map,1537732730598,71b5c8f54210ed4c0fd227650d66cd9e6c06b4ecc5466c8d63310f4d2a3daeb2
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"firebase": "^5.5.1",
"primereact": "^2.0.0-beta.7",
"react": "^16.5.2",
"react-day-picker": "^7.2.4",
"react-dom": "^16.5.2",
"react-event-calendar": "^0.3.0",
"react-router-dom": "^4.3.1",
Expand Down
8 changes: 7 additions & 1 deletion client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ a {
}

.sub-title {
font-size: 30,
font-size: 20px;
}

/* Google */
Expand Down Expand Up @@ -88,4 +88,10 @@ a {
left: 0;
width: 34px;
height: 100%;
}

.logo {
background-size: cover;
width: 450px;
height: 450px;
}
8 changes: 8 additions & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import AddEvent from './containers/AddEvent';
import Login from './containers/Login';
// Import Landing page
import Landing from './containers/Landing';
// Import Help page
import Help from './containers/Help';
// Import Foooter component
import Footer from './components/Footer';
// Import Event Details component
Expand All @@ -32,6 +34,8 @@ import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
// import css styling for material ui components.
import { withStyles } from '@material-ui/core/styles';
// import Logo
import logo from './images/edue_logo.png';

const styles = {
card: {
Expand Down Expand Up @@ -120,6 +124,7 @@ class App extends Component {
<Route exact path="/profile" render={props => <Profile
{...props} name={user.displayName} email={user.email} photo={user.photoURL} uid={user.uid}></Profile>} />
<Route exact path="/add" component={AddEvent} />
<Route exact path="/help" component={Help} />
<Route exact path="/login" component={Login} />
</Switch>
</div>
Expand All @@ -128,6 +133,9 @@ class App extends Component {
: (
<div className="main-content-section">
<Grid container spacing={16} justify="center" className="login-page">
<Grid item xs={12} sm={12} md={6}>
<img src={logo} alt="team logo" className="logo"></img>
</Grid>
<Grid item xs={12} sm={12} md={6}>
<Typography variant="display1" className="app-title">
Welcome to EduVents
Expand Down
71 changes: 49 additions & 22 deletions client/src/containers/Events/Events.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,60 @@
// import React
import React, { Component } from 'react'
import React, { Component } from 'react';
// Import NavBar component
import NavBar from '../../components/NavBar';
import Grid from '@material-ui/core/Grid';
import UpcomingEvents from '../Landing/UpcomingEvents';
import MyEventCard from './MyEventCard';
// import Firebase
import firebase from '../../firebase-config';

class Events extends Component {
render() {
return (
<div>
<div className="main-content-section">
<Grid container spacing={16}>
<Grid item xs={12} sm={12} md={8}>
<h1>My Events For Today</h1>
<MyEventCard />
<MyEventCard />
<MyEventCard />
<MyEventCard />
</Grid>
<Grid item xs={12} sm={12} md={4}>
<h1>Upcoming Events</h1>
<UpcomingEvents />
</Grid>
</Grid>
</div>
</div>
)
}
constructor(props) {
super(props);
this.state = {
name: '',
eventsRef: firebase.database().ref('events'),
events: []
};
}

componentDidMount() {
/* Create reference to messages in Firebase Database */
const eventsRef = firebase.database().ref('events');
eventsRef.on('value', snapshot => {
const events = snapshot.val();
console.log(events);
const newState = [];
for (const event in events) {
newState.push({
name: events[event].name
});
}
this.setState({
events: newState
});
console.log('EVENTS: ' + this.state.events);
});
}

render() {
return (
<div>
<div className="main-content-section">
<Grid container spacing={16}>
<Grid item xs={12} sm={12} md={8}>
<h1>My Events For Today</h1>
<MyEventCard />
</Grid>
<Grid item xs={12} sm={12} md={4}>
<h1>Upcoming Events</h1>
<UpcomingEvents />
</Grid>
</Grid>
</div>
</div>
);
}
}

export default Events;
51 changes: 29 additions & 22 deletions client/src/containers/Events/MyEventCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
// Import Css
import './Events.css';
import activities from '../../data/todaytEvents.json';

const styles = {
card: {
Expand All @@ -29,32 +30,38 @@ const styles = {
class MyEventCard extends Component {
render() {
const { classes } = this.props;

return (
<Card className={classes.card}>
<CardContent>
<Typography component="p" className={classes.eventInfo}>
Event: Reading Buddies
</Typography>
<Typography component="p" className={classes.eventInfo}>
Location: Arlington Hills Library
</Typography>
<Typography component="p" className={classes.eventInfo}>
Date: September 23, 2018
</Typography>
<Typography component="p" className={classes.eventInfo}>
Time: 3:30 PM
</Typography>
</CardContent>
<CardActions>
<Grid container justify="flex-end">
// console.log(activities);
// return null;
return(
activities.map(item => {
return (
<Card className={classes.card} key={item.id}>
<CardContent>
<Typography component="p" className={classes.eventInfo}>
Event: {item.name}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Location: {item.location}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Date: {item.date}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Time: {item.time}
</Typography>
</CardContent>
<CardActions>
<Grid container justify="flex-end">
<Button className="app-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>View Details</span><i className="far fa-arrow-alt-circle-right"></i></Button>
<Button className="app-btn delete-event save-event-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>Delete Event</span><i className="fas fa-trash"></i></Button>
</Grid>
</CardActions>
</Card >
</Grid>
</CardActions>
</Card >
)
})
)
}
}


export default withStyles(styles)(MyEventCard);
Empty file.
18 changes: 18 additions & 0 deletions client/src/containers/Help/Help.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React, { Component } from 'react'
import Grid from '@material-ui/core/Grid';

class Help extends Component {
render() {
return (
<div className="main-content-section">
<h1>Help</h1>
<Grid container spacing={16}>
<Grid item xs={12} sm={12} md={8}>
</Grid>
</Grid>
</div>
)
}
}

export default Help;
1 change: 1 addition & 0 deletions client/src/containers/Help/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Help';
50 changes: 29 additions & 21 deletions client/src/containers/Landing/EventCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Typography from '@material-ui/core/Typography';
import { withStyles } from '@material-ui/core/styles';
// import css file
import './Landing.css';
import activities from '../../data/todaytEvents.json';
import Grid from '@material-ui/core/Grid';

const styles = {
card: {
Expand All @@ -30,27 +32,33 @@ class EventCard extends Component {
render() {
const { classes } = this.props;

return (
<Card className={classes.card}>
<CardContent>
<Typography component="p" className={classes.eventInfo}>
Event: Homework Help
</Typography>
<Typography component="p" className={classes.eventInfo}>
Location: Arlington Hills Library
</Typography>
<Typography component="p" className={classes.eventInfo}>
Date: September 23, 2018
</Typography>
<Typography component="p" className={classes.eventInfo}>
Time: 3:30 PM
</Typography>
</CardContent>
<CardActions>
<Button className="app-btn view-details-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>View Details</span><i className="far fa-arrow-alt-circle-right fa-2x"></i></Button>
<Button className="app-btn save-event-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>Save Event</span><i className="far fa-save fa-2x"></i></Button>
</CardActions>
</Card >
return(
activities.map(item => {
return (
<Card className={classes.card} key={item.id}>
<CardContent>
<Typography component="p" className={classes.eventInfo}>
Event: {item.name}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Location: {item.location}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Date: {item.date}
</Typography>
<Typography component="p" className={classes.eventInfo}>
Time: {item.time}
</Typography>
</CardContent>
<CardActions>
<Grid container justify="flex-end">
<Button className="app-btn view-details-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>View Details</span><i className="far fa-arrow-alt-circle-right fa-2x"></i></Button>
<Button className="app-btn delete-event-btn" variant="contained" color="primary" size="small"><span className={classes.btnText}>Delete Event</span><i className="fas fa-trash"></i></Button>
</Grid>
</CardActions>
</Card >
)
})
)
}
}
Expand Down
11 changes: 7 additions & 4 deletions client/src/containers/Landing/Landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import Grid from '@material-ui/core/Grid';
import EventCard from './EventCard';
import UpcomingEvents from './UpcomingEvents';
import Button from '@material-ui/core/Button';
import DayPicker from 'react-day-picker';

// Or import the input component
import DayPickerInput from 'react-day-picker/DayPickerInput';

import 'react-day-picker/lib/style.css';


class Landing extends Component {
Expand All @@ -17,12 +23,9 @@ class Landing extends Component {
<Grid item xs={12} sm={12} md={8}>
<h1>Today's Events</h1>
<EventCard />
<EventCard />
<EventCard />
<EventCard />
<EventCard />
</Grid>
<Grid item xs={12} sm={12} md={4}>
<DayPicker />
<h1>Upcoming Events</h1>
<UpcomingEvents />
</Grid>
Expand Down
Loading

0 comments on commit cce12bc

Please sign in to comment.