Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katrina-Sigrid-Pushpa-EDGES #8

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2ff6a36
added Dashboard, Home, Library, Movies, and Customers component, and …
pushpaagr Dec 18, 2018
f464901
added logic in Movies component class that passes props to Movie comp…
pushpaagr Dec 18, 2018
c49ea5d
added minor css
pushpaagr Dec 18, 2018
bf5f6bf
movie response data working with query
kaganon Dec 18, 2018
9317f77
Merge branch 'pushpa_library' of https://github.com/pushpaagr/video-s…
kaganon Dec 18, 2018
904d29a
added more css for movie images
pushpaagr Dec 18, 2018
539bd70
committing to pull from branch
kaganon Dec 18, 2018
7c40e16
Merge branch 'pushpa_library' of https://github.com/pushpaagr/video-s…
kaganon Dec 18, 2018
56c9f46
List of customers showing on page.
sdbenezra Dec 18, 2018
a945b36
added more css
pushpaagr Dec 18, 2018
9d3622b
merging movies
kaganon Dec 18, 2018
540d3cb
added background color
pushpaagr Dec 18, 2018
807f2c7
Merge branch 'pushpa_library' of https://github.com/pushpaagr/video-s…
kaganon Dec 18, 2018
d30e497
added spread operator
pushpaagr Dec 18, 2018
c203169
search movies displaying all movies
kaganon Dec 18, 2018
4a01ff7
Merge branch 'pushpa_library' of https://github.com/pushpaagr/video-s…
kaganon Dec 18, 2018
f88ccd9
Add number of movies checked out to customer list.
sdbenezra Dec 18, 2018
d97c672
Merge branch 'master' into customers
sdbenezra Dec 18, 2018
684d1fd
added callbackfunction for movie/props
pushpaagr Dec 18, 2018
a274d07
merging
pushpaagr Dec 18, 2018
bb55554
added closure function to Movie that is used to update the current mo…
pushpaagr Dec 19, 2018
831d9c1
Hook up add customer to rental button
sdbenezra Dec 19, 2018
5c1cd2b
Merge branch 'master' into pushpa_library
pushpaagr Dec 19, 2018
341685a
add backend post request for API
kaganon Dec 19, 2018
fc52e39
Merge branch 'master' of https://github.com/pushpaagr/video-store-con…
kaganon Dec 19, 2018
6d3b7dc
Tweak css on customer list
sdbenezra Dec 19, 2018
f480b88
Merge branch 'master' into customers
sdbenezra Dec 19, 2018
daec112
Refactor addCustomerName function in dashboard and callback line in c…
sdbenezra Dec 19, 2018
6c74bdc
Add status bar to customers page. Change styling of app header.
sdbenezra Dec 19, 2018
6168673
Move status bar to dashboard page.
sdbenezra Dec 19, 2018
2756ebc
Add status for library listing
sdbenezra Dec 19, 2018
44d2ca3
Add customer name and movie to rental status message. Actual rental c…
sdbenezra Dec 19, 2018
8e3c232
Rental checkout button working with hard coded due date.
sdbenezra Dec 19, 2018
fcd874b
Clean up js errors and unused code.
sdbenezra Dec 19, 2018
a286bc4
Rental checkout working with calculated due date
sdbenezra Dec 19, 2018
3aea485
add post request to front end
kaganon Dec 19, 2018
886583e
Merge branch 'master' of https://github.com/pushpaagr/video-store-con…
kaganon Dec 19, 2018
bfafb82
add post request with status messages
kaganon Dec 19, 2018
e97283d
Add error message for clicking rental with missing customer and or movie
sdbenezra Dec 19, 2018
05a4d4b
Merge branch 'master' into header-styling
sdbenezra Dec 19, 2018
28550fa
update imageurl link to show image in library
kaganon Dec 19, 2018
200978a
Small cleanup of unused items.
sdbenezra Dec 19, 2018
ca4228a
change backend imageurl
kaganon Dec 19, 2018
439f1f2
front end working with image url
kaganon Dec 20, 2018
2448747
add conditional button message
kaganon Dec 20, 2018
3f1b1f4
CSS changes, fix small syntax items.
sdbenezra Dec 20, 2018
95def56
Fix merge conflicts
sdbenezra Dec 20, 2018
a022354
Fix error message bar for rentals.
sdbenezra Dec 20, 2018
4b506d9
CSS styling. Minor code cleanup.
sdbenezra Dec 20, 2018
227b228
Merge branch 'master' into header-styling
sdbenezra Dec 20, 2018
db46fc3
update styling on pages
kaganon Dec 21, 2018
d1b759b
update dashboard css
kaganon Dec 21, 2018
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
4,675 changes: 2,378 additions & 2,297 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.4"
},
"scripts": {
Expand All @@ -13,4 +15,4 @@
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
}
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
27 changes: 9 additions & 18 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
.App {
text-align: center;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
font-family: 'Oswald', sans-serif;
background-color: black;
}

.App-header {
background-color: #222;
height: 150px;
background-color: black;
height: 10vh;
padding: 20px;
color: white;
color: red;
margin-bottom: 2rem;
}

.App-title {
font-size: 1.5em;
}

.App-intro {
font-size: large;
}

@keyframes App-logo-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
font-size: 3rem;
display: flex;
justify-content: center;
}
12 changes: 6 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Dashboard from './components/Dashboard';


class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
<h1 className="App-title">Videoflix</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
<main>
<Dashboard className="Dashboard"/>
</main>
</div>
);
}
Expand Down
56 changes: 56 additions & 0 deletions src/components/Customer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.customer {
display: grid;
grid-template-columns: 4fr 1fr;
}

.item {
border: 1px solid #000;
border-radius: 1em;
overflow: hidden;
margin: 2em;
background-color: #e9e9e9;
}

.item__button {
background-color: #cfcfcf;
font-size: 18px;
}

.status-bar {
border: 1px solid #000;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: justify;
justify-content: space-between;
}

.status-bar--success {
background-color: rgb(180,213,180);
}

.status-bar--hide {
display: none;
}

.status-bar__text {
margin: .4em;
}

.status-bar__button {
background-color: inherit;
border: none;
cursor: pointer;
}

p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}

.customer-container {
margin-left: 10rem;
margin-right: 10rem;
}
28 changes: 28 additions & 0 deletions src/components/Customer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import "./Customer.css"

const Customer = (props) => {
const { customerCallback } = props;
return (
<div className="customer-container">
<div className="customer item">
<div className="item__details">
<h2>{props.name}</h2>
<p></p>
<p>{`${props.movies_checked_out_count} movies checked out`}</p>
</div>
<button className="item__button" onClick={() => customerCallback()}>Select for Rental</button>
</div>
</div>

)
}

Customer.propTypes = {
name: PropTypes.string,
movies_checked_out_count: PropTypes.number,
customerCallback: PropTypes.func,
};

export default Customer;
1 change: 1 addition & 0 deletions src/components/Customers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

54 changes: 54 additions & 0 deletions src/components/Customers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React, { Component } from 'react';
import axios from 'axios';
import Customer from './Customer';
import './Customers.css';

class Customers extends Component {
constructor(props) {
super(props);

this.state = {
customers: [],
message: 'Loading customers...',
showStatus: true,
}
}

componentDidMount() {
console.log("Component has mounted");
const CUSTOMERS = "http://localhost:3000/customers";

axios.get(CUSTOMERS)
.then((response) => {
this.setState({
customers: response.data,
});
this.props.customerCount(this.state.customers.length);
})
.catch((error) => {
this.setState({
error: error.message
});
});
}

render(){
const customerList = this.state.customers.map((customer, i) => {
return <Customer
key={i}
{...customer}
customerCallback={() => this.props.customerCallback(customer)}
/>
});

return(
<div>
<div className="item-list_container">
{customerList}
</div>
</div>
);
}
}

export default Customers;
55 changes: 55 additions & 0 deletions src/components/Dashboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
a.dashboard-link {
text-decoration: none;
color: white;
}

.dashboard-item {
display: inline-block;
border-radius: 5px;
margin: 3px;
font-size: 20px;
background-color: red;
color: white;
border-color: red;
}


.label {
background-color: lightgray;
display: inline-block;
}

.movie-customer-label {
background-color: red;
display: inline-block;
font-size: 1rem;
padding: .1rem;
color: white;
}

.selected-movie-customer {
font-size: 1rem;
background-color: white;
height: 2rem;
color: black;
padding: 1rem;
}

.nav-list_container {
display: flex;
justify-content: center;
}

.container-selected-item {
margin-top: 1rem;
margin-bottom: 1rem;

}

.selected-container {
display: flex;
justify-content: space-between;
margin-left: 35%;
margin-right: 35%;
align-items: center
}
Loading