Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
backup
config
.env
15,645 changes: 9,532 additions & 6,113 deletions client/package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"dependencies": {
"bootstrap": "^4.3.1",
"font-awesome": "^4.7.0",
"http-proxy-middleware": "^0.19.1",
"lodash": "^4.17.15",
"http-proxy-middleware": "^2.0.1",
"lodash": "^4.17.21",
"lodash.template": "^4.5.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-popper": "^1.3.3",
"react-redux": "^7.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-popper": "^2.2.5",
"react-redux": "^7.2.4",
"react-redux-form": "^1.16.14",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1",
"reactstrap": "^8.0.1",
"redux": "^4.0.4",
"react-router-dom": "^5.2.1",
"react-scripts": "^4.0.3",
"reactstrap": "^8.9.0",
"redux": "^4.1.1",
"redux-thunk": "^2.3.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion client/src/baseUrl.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const baseUrl="https://lib-manage.herokuapp.com/api/";
//export const baseUrl="http://localhost:5000/api/";
// export const baseUrl="http://localhost:5000/api/";
2 changes: 1 addition & 1 deletion client/src/components/IssueComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ render(){
else
{
const bookoptions= this.props.books.map((book,index)=>(<option
key={book.isb}>{book.isbn}</option>));
key={book.isbn}>{book.isbn}</option>));
const defaultBook=this.props.books[0];
// To just get list of the students (not the admins)
let useroptions=this.props.users.filter((user)=>(!user.admin));
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/LogComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ function RenderIssue ({issue,i}) {
{issue.student.roll}
</td>
<td>
<Link to={`/books/${issue.book._id}`}>
{issue.book==null ? "N/A":<Link to={`/books/${issue.book._id}`}>
{issue.book.name}
</Link>
</Link>}
</td>
<td>
{issue.book.isbn}
{issue.book==null ? "N/A":issue.book.isbn}
</td>
<td>
{new Intl.DateTimeFormat('en-US',{year: 'numeric', month: 'short', day: '2-digit'}).format(new Date( Date.parse(issue.createdAt)))}
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/ReturnComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ function RenderIssue ({issue,i,returnBook}) {
{issue.student.roll}
</td>
<td>
<Link to={`/books/${issue.book._id}`}>
{issue.book==null ? "N/A":<Link to={`/books/${issue.book._id}`}>
{issue.book.name}
</Link>
</Link>}
</td>
<td>
{issue.book.isbn}
{issue.book==null ? "N/A":issue.book.isbn}
</td>
<td>
{new Intl.DateTimeFormat('en-US',{year: 'numeric', month: 'short', day: '2-digit'}).format(new Date( Date.parse(issue.createdAt)))}
Expand Down Expand Up @@ -76,7 +76,7 @@ class Return extends Component {
}

render(){

console.log(this.props.issues);
if (this.props.issues.isLoading) {
return(
<div className="container">
Expand Down
Loading