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

Earth - Sophie & Kal #32

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a925ca1
created routes with React Router, set up basic app
steve-messing Jan 19, 2021
2767c3d
created CustomerList component
steve-messing Jan 19, 2021
29843e2
Started CustomersList component
kashenafi Jan 20, 2021
318b033
fixed dependencies
steve-messing Jan 20, 2021
62375cb
can display list of videos from rails api
steve-messing Jan 20, 2021
ddc82fd
playing with react-select to display video library
steve-messing Jan 20, 2021
79da559
search or select
steve-messing Jan 20, 2021
fe59c0d
Merge pull request #1 from sophieemessing/video-library
steve-messing Jan 20, 2021
122053b
working on customer list display
kashenafi Jan 20, 2021
977d3f2
saving changes
steve-messing Jan 20, 2021
0f79fea
Merge pull request #2 from sophieemessing/CustomerListdisplay
kashenafi Jan 20, 2021
0db5bc1
merging
steve-messing Jan 20, 2021
8f23958
merge to master
steve-messing Jan 20, 2021
a69fd80
renaming folder
steve-messing Jan 20, 2021
808eb8d
renamed back to components
steve-messing Jan 20, 2021
2defe23
selected video states stored in app
steve-messing Jan 20, 2021
2518dea
user can serarch TMDB database for videos
steve-messing Jan 21, 2021
fe8cb30
added axios post for adding API videos to library
steve-messing Jan 21, 2021
69902cb
Customer display working & started checkout
kashenafi Jan 21, 2021
5a83dbf
merging changes
steve-messing Jan 21, 2021
2467c0f
Update App.js
steve-messing Jan 21, 2021
7d97ea8
Update CustomerList.js
steve-messing Jan 21, 2021
bf81c94
Update VideoLibrary.js
steve-messing Jan 21, 2021
d75eec6
Delete src/Components directory
steve-messing Jan 21, 2021
59d20d2
started adding bootstrap
steve-messing Jan 22, 2021
3124a5a
Checkout working, started customer details
kashenafi Jan 22, 2021
16a067e
Merge pull request #4 from sophieemessing/Jan21
kashenafi Jan 22, 2021
168064b
Merge pull request #3 from sophieemessing/bootstrap
kashenafi Jan 22, 2021
22cf53c
added checkout button to navbar
steve-messing Jan 22, 2021
06f1e99
customer shows customer, video shows video
steve-messing Jan 22, 2021
6f61a2b
frontend
steve-messing Jan 22, 2021
75873aa
styling is done
steve-messing Jan 22, 2021
5a194b5
Merged styling work, checkout & add confirmation
kashenafi Jan 22, 2021
acd7e69
Merge pull request #5 from sophieemessing/Jan22
steve-messing Jan 24, 2021
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
Prev Previous commit
Next Next commit
added checkout button to navbar
steve-messing committed Jan 22, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 22cf53c3d513cca7ab5289b410b264886134c466
26 changes: 20 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -75,15 +75,25 @@ const App = () => {
<Nav.Link>
<Link to="/library" exact={true}>Video Library</Link>
</Nav.Link>

<Nav.Link>
Selected Video: {selectedVideo &&(selectedVideo.title)}
</Nav.Link>

<Nav.Link>
Selected Customer: {selectedCustomer &&(selectedCustomer.name)}
</Nav.Link>

<Nav.Link>
{selectedVideo && selectedCustomer ?
<button className="customer-button" onClick={() => addRental()}>
Checkout
</button> : ''}
</Nav.Link>

</Nav>
</Navbar>

<SelectedVideo video={selectedVideo}/>
<SelectedCustomer customer={selectedCustomer}/>

{/* <VideoLibrary/> */}
{/* <SelectedVideo video={selectedVideo}/> */}


<Switch>
<Route exact={true} path="/">
@@ -103,6 +113,10 @@ const App = () => {
<Detail />
</Route>
</Switch>

<SelectedVideo video={selectedVideo}/>
<SelectedCustomer customer={selectedCustomer}/>

</Router>
</div>
);
4 changes: 4 additions & 0 deletions src/components/CustomerList.js
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
import Select from 'react-select';
import axios from 'axios'

import {Container} from 'react-bootstrap'

const CustomerList = (props) => {

const allCustomersURL = 'http://localhost:3000/customers'
@@ -26,6 +28,7 @@ const CustomerList = (props) => {

return (
<div>
<Container>
<h3>All Customers</h3>
<h4>Search or Select a Customer: </h4>

@@ -41,6 +44,7 @@ const CustomerList = (props) => {
};
})}
/>
</Container>
</div>
)
}
15 changes: 3 additions & 12 deletions src/components/VideoLibrary.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import {React, useState, useEffect} from 'react'
import Select from 'react-select'
import PropTypes from 'prop-types'
import axios from 'axios';

import {Container} from 'react-bootstrap'


const VideoLibrary = (props) => {
@@ -34,6 +34,7 @@ const VideoLibrary = (props) => {

return (
<div>
<Container>
<h3>Video Library</h3>
<h4>Search or Select a Video: </h4>
<Select
@@ -48,17 +49,7 @@ const VideoLibrary = (props) => {
};
})}
/>
{props.selectedVideo && props.selectedCustomer ?
<button
className="customer-button"
onClick={() => props.addRental()}

>
{''}
Checkout
</button>
: ''
}
</Container>
</div>
)
}