Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
221e4c2
Merge branch 'master' of https://github.com/Software5E/sw_project
Dec 1, 2019
2b3def4
resolved merge conflicts
Dec 1, 2019
0cadaae
Merge branch 'master' into gaya_sara
xarielx Dec 1, 2019
3d276ca
now I think I've resolved the merge conflicts
Dec 1, 2019
3c897af
finished About Us page
Dec 1, 2019
061e017
added code to signup form that clears entry on submit
Dec 1, 2019
39ae31a
going to merge w/ local master
Dec 2, 2019
7b0f8de
Merge branch 'master' of https://github.com/Software5E/sw_project
Dec 2, 2019
deb828c
added zingchart to make graphs
Dec 2, 2019
a89b423
changed color scheme for about us page
Dec 3, 2019
15d2365
Merge branch 'master' of https://github.com/Software5E/sw_project
Dec 3, 2019
52a94b5
made changes to resolve conflict
Dec 3, 2019
18d4d75
switching to master
Dec 3, 2019
f0ea913
trying to find why db connection won't work
Dec 3, 2019
7acf853
fixed post issue and created graph to show user subscription data
Dec 3, 2019
7499aae
removed localhost proxy from package.json
Dec 3, 2019
8eaf748
Revert "removed localhost proxy from package.json"
Dec 3, 2019
12b6de5
fixed toolbar size on my local branch
Dec 3, 2019
e18c688
no test poisoning
Dec 3, 2019
8218066
fixed local conflicts
Dec 3, 2019
251f948
fixing conflicts w merge to master
Dec 3, 2019
7333b88
display emails on admin page
Dec 3, 2019
d55815d
Merge branch 'master' of https://github.com/Software5E/sw_project
Dec 3, 2019
34e3282
Merge branch 'master' into gaya_sara
Dec 3, 2019
4badb80
fixed styling
Dec 3, 2019
e99c829
Merge branch 'master' of https://github.com/Software5E/sw_project
Dec 9, 2019
da86ca1
Merge branch 'master' into gaya_sara
Dec 9, 2019
7ede30b
added commentary for my part
Dec 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/src/components/AboutUs/AboutUs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class AboutUs extends React.Component {
</div>
<span></span>
<div>
{
//inluded Timeline component from Timeline.js}
}
<Timeline />
</div>
<div class="Facer-Comparison">
Expand Down
8 changes: 5 additions & 3 deletions client/src/components/SignUp/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ class FormPage extends React.Component {
handleSubmit = () => alert("Thank you for Subscribing!");

onSubmit(e) {
//prevents page from refreshing and losing form data
e.preventDefault();

//object to hold form fields
let user = {};
user.name = e.target[0].value;
user.email = e.target[1].value;
//user.timestamp = new Date();


console.log("username: ", user.name);
console.log("useremail: ", user.email);
//console.log("date added: ", user.timestamp);


//axios used to post the information to the database
axios
.post("/signup", user)
.then(res => {
Expand Down
140 changes: 69 additions & 71 deletions client/src/components/Timeline/Timeline.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,81 @@
import React from 'react'
import './Timeline.css'
import { VerticalTimeline, VerticalTimelineElement } from 'react-vertical-timeline-component';
//import 'react-vertical-timeline-component/style.min.css';

class Timeline extends React.Component {

class Timeline extends React.Component {
//timeline component used from react-vertical-timeline
render() {
return (
<VerticalTimeline contentStyle={{ background: '#000'}}>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#A9A9A9', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #A9A9A9' }}
/*date="2011 - present"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/

>
<h3 className="vertical-timeline-element-title block-title">Tumbler Lock</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1778</h4>
<p className="block-text">
uses pins of varying lengths to prevent the lock from opening without the correct key
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#A9A9A9', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #A9A9A9' }}
/*date="2010 - 2011"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">Flat Key</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1851</h4>
<p className="block-text">
key with serrated edges as well as pins of varying lengths within the lock itself
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#808080', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #808080' }}
/*date="2008 - 2010"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/

>
<h3 className="vertical-timeline-element-title block-title">Electronic Locks</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1970s</h4>
<p className="block-text">
lock or unlock with the assistance of an electrical current
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#808080', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #808080' }}
/*date="2006 - 2008"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">Smart Lock</h3>
<h4 className="vertical-timeline-element-subtitle block-text">2014</h4>
<p className="block-text">
opens wirelessly with authorized user authentication
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--education"
contentStyle={{ background: '#FF0000', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #FF0000' }}
/*date="April 2013"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">FaceR</h3>
<h4 className="vertical-timeline-element-subtitle block-text">2020</h4>
<p className="block-text">
uses facial recognition as a form of user authentication to unlock
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#A9A9A9', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #A9A9A9' }}
/*date="2011 - present"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">Tumbler Lock</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1778</h4>
<p className="block-text">
uses pins of varying lengths to prevent the lock from opening without the correct key
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#A9A9A9', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #A9A9A9' }}
/*date="2010 - 2011"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">Flat Key</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1851</h4>
<p className="block-text">
key with serrated edges as well as pins of varying lengths within the lock itself
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#808080', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #808080' }}
/*date="2008 - 2010"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/

</VerticalTimeline>
)
>
<h3 className="vertical-timeline-element-title block-title">Electronic Locks</h3>
<h4 className="vertical-timeline-element-subtitle block-text">1970s</h4>
<p className="block-text">
lock or unlock with the assistance of an electrical current
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--work"
contentStyle={{ background: '#808080', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #808080' }}
/*date="2006 - 2008"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">Smart Lock</h3>
<h4 className="vertical-timeline-element-subtitle block-text">2014</h4>
<p className="block-text">
opens wirelessly with authorized user authentication
</p>
</VerticalTimelineElement>
<VerticalTimelineElement
className="vertical-timeline-element--education"
contentStyle={{ background: '#FF0000', color: '#fff' }}
contentArrowStyle={{ borderRight: '7px solid #FF0000' }}
/*date="April 2013"*/
/*iconStyle={{ background: '#000', color: '#fff' }}*/
>
<h3 className="vertical-timeline-element-title block-title">FaceR</h3>
<h4 className="vertical-timeline-element-subtitle block-text">2020</h4>
<p className="block-text">
uses facial recognition as a form of user authentication to unlock
</p>
</VerticalTimelineElement>
</VerticalTimeline>
)
}

}
Expand Down
9 changes: 4 additions & 5 deletions client/src/views/AdminList/AdminList.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,30 @@ class AdminList extends React.Component {
};
}

//function gets database information and stores it in the usersCollection array
componentDidMount() {
axios.get('/signup')
.then(res => {
this.setState({ usersCollection: res.data });
//console.log(res.data[1].created_at);
//console.log(new Date(res.data[1].created_at).getMonth());

})
.catch(function (err) {
console.log(err);
})
}

render() {
//array starts with zero users for each month
let usersPerMonth = [0,0,0,0,0,0,0,0,0,0,0,0];
let emails = [];
this.state.usersCollection.forEach((item) => {
console.log(item.name);
emails.push(item.email);
//gets the month from the date and iincrements the corresponding month
var index = new Date(item.created_at).getMonth();
usersPerMonth[index]++;
});
console.log(usersPerMonth);
console.log(emails);

//zingchart bar graph configuration
let graphConfig = {
type: 'bar',
title: {
Expand Down