[JITERA] Add Book Management Form Component
Created by: chi-jitera
Overview
This pull request introduces a new component for managing books in the application. The BookManagementForm allows users to create new book entries by submitting relevant data to the backend.
Changes
-
Created
src/components/BookManagementForm.js:- Implemented a basic HTML form with fields for:
- Title
- Author
- Published Year
- Genre
- Availability
- Added JavaScript functionality to handle form submission.
- The form makes a POST request to the
/api/booksendpoint to create a new book entry.
- Implemented a basic HTML form with fields for:
-
Form Submission Logic:
- Included event handling to capture form data and send it to the backend.
- Utilized
fetchAPI to handle the POST request and manage responses.
-
Future Enhancements:
- The form is designed to be easily expandable for additional functionalities such as updating and deleting books by integrating with existing API endpoints.
This component will enhance the user experience by providing a straightforward interface for book management.