Implement Google Books API integration for book updates and enhance library management features

- Added a new endpoint in `index.js` to update book data using the Google Books API, allowing for real-time updates based on ISBN.
- Introduced a `rebuild_book_entries` function in `libraryManager.py` to facilitate user-driven updates of book entries from the Google Books API.
- Enhanced error handling and user prompts for better interaction during book updates.
- Updated `public/index.html` and `public/script.js` to improve the user interface and support new functionalities.
- Modified styles in `public/styles.css` to enhance the layout and usability of the checkout button and location prompt.
This commit is contained in:
2024-12-12 10:32:20 -05:00
parent 370ad7c107
commit f4f227b24d
7 changed files with 255 additions and 61 deletions

View File

@@ -197,4 +197,49 @@ body.dark-mode #book-table-body tr:hover {
background-color: #444;
}
/* Center the checkout button and make it fill the cell */
#book-table td button {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}
/* Add more styles as needed for other elements */
#location-prompt {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
color: #000;
padding: 20px;
border: 2px solid #000;
z-index: 1000;
}
#location-prompt label {
display: block;
margin-bottom: 5px;
}
#location-prompt input {
width: 100%;
padding: 8px;
margin-bottom: 10px;
}
#location-prompt select {
width: 100%;
padding: 8px;
margin-bottom: 10px;
}
#location-prompt button {
padding: 8px 16px;
}