Skip to content

Feature/angular front end#2

Open
Semilore317 wants to merge 16 commits into
masterfrom
feature/angular-front-end
Open

Feature/angular front end#2
Semilore317 wants to merge 16 commits into
masterfrom
feature/angular-front-end

Conversation

@Semilore317
Copy link
Copy Markdown
Owner

Implemented the basic features needed for a frontend in Angular.

Backend
- Loan: add @transient getStatus() returning ACTIVE/OVERDUE/RETURNED
- Loan + BookInstance: add @JsonIgnoreProperties to break Jackson circular
  reference on serialization
- Book: add coverImageUrl column (String, nullable) for future Supabase integration
- Member: add phoneNumber column
- BookRequestDTO/BookResponseDTO: add coverImageUrl field
- MemberRequestDTO/MemberResponseDTO: add phoneNumber; ResponseDTO adds fullName
- MemberMapper: map phoneNumber and compute fullName from first+last
- BookMapper: map coverImageUrl in both directions
- BookService + BookServiceImpl: add updateBook() and deleteBook()
- BookController: add PUT /{id} and DELETE /{id} endpoints
- SecurityConfig: remove comment noise; add explicit ROLE_LIBRARIAN rules
  for PUT/DELETE /api/v1/books/**

Frontend
- book.ts: add coverImageUrl, genre, publicationYear fields; add updateBook()
  and deleteBook() service methods
- member.ts: add firstName, lastName, phoneNumber fields; add updateMember()
- book-catalog: fix category→genre bug in add-book form; add genre <select>
  dropdown, publicationYear input, and ToastService feedback; add cover image
  placeholder to catalog cards
- book-detail: add cover image display with fallback placeholder; add toast
  to addCopies() success and error paths; remove stale comment
- loan-management: replace confirm() with inline confirmation banner; add
  status filter tabs (All / Active / Overdue / Returned) using computed signal
- member-management: replace confirm()/alert() with in-app confirmation;
  implement functional Add Member slide-over form with registration fields;
  implement inline edit rows per member
- my-reservations: new component with reservation table, status badges, and
  cancel hold flow with in-app confirmation
- app.routes.ts: add /reservations lazy route
- sidebar: add My Reservations nav link for ROLE_MEMBER users

Docs
- README: full rewrite with Tech Stack table and Getting Started guide
  covering Docker-first and manual setup paths; default credentials table
@Semilore317
Copy link
Copy Markdown
Owner Author

Pull Request: Angular Frontend + System Fixes

Summary

This PR closes out the feature branch with two categories of work: correctness fixes for known backend and frontend bugs, and missing feature implementations that complete the core user flows. A book cover image field has also been scaffolded ahead of Supabase Storage integration in a future PR.


Bug Fixes

Backend

  • Loan circular serialization — Added @JsonIgnoreProperties on bookInstance and member associations. Previously caused Jackson stack overflows on serialization.
  • Loan missing status — Added @Transient getStatus() computing ACTIVE / OVERDUE / RETURNED from timestamps. No schema change required.
  • book-catalog genre/category mismatch — The add-book form was sending category but the backend entity and DB column are genre (enum). Fixed field name, added a typed <select> dropdown with all BookGenre enum values.
  • MemberMapper missing fullName — Frontend displayed undefined for member names. Mapper now computes fullName = firstName + " " + lastName and maps phoneNumber.
  • addCopies() silent failure — Success/error paths now surface toast notifications instead of silently failing or logging to console.
  • confirm() / alert() usage — Replaced all native browser dialogs in loan-management and member-management with in-app confirmation banners, consistent with the design system.

Other Changes

  • SecurityConfig — Removed ~30 lines of stale comment noise left in the filter chain. Added explicit PUT/DELETE method-level rules for book endpoints.
  • Member entity — Added phoneNumber column. MemberResponseDTO now includes phoneNumber and fullName.
  • README — Full rewrite: added Tech Stack table, Docker-first Getting Started guide, manual setup path, and default credentials table.

Not In This PR (Next Steps)

  • Supabase Storage integration — PATCH /api/v1/books/{id}/cover upload endpoint + Angular file picker
  • publicationYear display on the book detail page (field is in the DB and DTO, not yet rendered in the detail template)
  • Loan management publicationYear sort/display

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant