Skip to content

Commit

Permalink
Merge branch 'allisonglittle:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyadam authored Dec 7, 2021
2 parents 9ce01ca + 32cd25a commit b1241a7
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 128 deletions.
6 changes: 1 addition & 5 deletions library-express/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,20 @@ app.get('/', function (req, res) {
});

app.use('/titles', require('./titles.js'));

app.use('/books', require('./books.js'));

app.use('/patrons', require('./patrons.js'));

app.use('/loan_items', require('./loanitems.js'));
app.use('/renew_loan', require('./renew_loan.js'));
app.use('/return_book', require('./return_book.js'));
app.use('/delete_loan', require('./delete_loan.js'));
app.use('/delete_loan_item', require('./delete_loan_item'));
app.use('/edit_loan', require('./edit_loan.js'));
app.use('/edit_loan_details', require('./edit_loan_details'));

app.use('/create_loan', require('./create_loan.js'));

app.use('/loan_status', require('./loanstatus.js'));
app.use('/delete_loan_status', require('./delete_loan_status'));


/*
LISTENER
*/
Expand Down
2 changes: 1 addition & 1 deletion library-express/create_loan.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function () {

/*Get loan information from database*/
function getLoanDetails(res, mysql, context, complete) {
mysql.pool.query("SELECT l.loanID, CONCAT(p.firstName, ' ', p.lastName) as 'patronName', DATE_FORMAT(l.loanDate, '%m/%d/%Y') as loanDate, count(li.bookID) as 'bookCount' FROM Loans l INNER JOIN Patrons p ON l.memberID = p.memberID INNER JOIN LoanItems li on l.loanID = li.loanID GROUP BY l.loanID", function (error, results, fields) {
mysql.pool.query("SELECT l.loanID, CONCAT(p.firstName, ' ', p.lastName) as 'patronName', DATE_FORMAT(l.loanDate, '%m/%d/%Y') as loanDate, count(li.bookID) as 'bookCount' FROM Loans l INNER JOIN Patrons p ON l.memberID = p.memberID LEFT JOIN LoanItems li on l.loanID = li.loanID GROUP BY l.loanID", function (error, results, fields) {
if (error) {
res.write(JSON.stringify(error));
res.end();
Expand Down
100 changes: 0 additions & 100 deletions library-express/public/css/App.css

This file was deleted.

3 changes: 2 additions & 1 deletion library-express/public/css/tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ table thead th{color:#FFFFFF; background-color:#666666; border:1px solid #CCCCCC
table tbody td{vertical-align:top; border-collapse:collapse; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC;}
table thead th, table tbody td{padding:5px; border-collapse:collapse;}
table tbody tr.light{color:#666666; background-color:#F7F7F7;}
table tbody tr.dark{color:#666666; background-color:#E8E8E8;}
table tbody tr.dark{color:#666666; background-color:#E8E8E8;}
table tbody tr{border-bottom: 1pt solid #CCCCCC;}
7 changes: 0 additions & 7 deletions library-express/public/searchpatrons.js

This file was deleted.

10 changes: 0 additions & 10 deletions library-express/public/updatePatron.js

This file was deleted.

3 changes: 1 addition & 2 deletions library-express/views/books.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
{{/each}}
</select>
<label for="purchaseDate">Purchase Date: </label>
<input type="date" name="purchaseDate" />
<input type="date" id="purchaseDate" name="purchaseDate" />
<button type="submit">Submit</button>
</form>
<br>
<div>
<table>
<caption>Titles</caption>
<thead>
<th>Book ID</th>
<th>ISBN</th>
Expand Down
1 change: 0 additions & 1 deletion library-express/views/loan_status.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<p><input type="submit" value="Create Status"></p>
</form>
<table>
<caption>Statuses</caption>
<thead>
<th>Status ID</th>
<th>Status Name</th>
Expand Down
1 change: 0 additions & 1 deletion library-express/views/titles.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</form>
</div>
<table>
<caption>Titles</caption>
<thead>
<th>ISBN</th>
<th>Title</th>
Expand Down

0 comments on commit b1241a7

Please sign in to comment.