Skip to content

Lending System

Ilyes BEN BRIK edited this page Jul 18, 2026 · 1 revision

Lending System

Track which books you've lent to friends and when they're due back.

Lending a Book

  1. Go to 🤝 Lending📤 Lend a Book
  2. Fill in:
    • Book ID — paste the book's UUID (find it in the book detail page URL)
    • Borrower Name — who you're lending to
    • Contact Info — phone or email (optional)
    • Due Date — when you expect it back (must be in the future)
    • Notes — optional
  3. Click Confirm Lending

💡 Tip: You can also find the book ID by viewing the book details — it's in the URL bar.

Tracking Lending

The lending page shows:

  • Overdue alert — red banner showing overdue books with borrower names
  • All records — table with book, borrower, dates, and status

Filtering Records

Filter Shows
All Records Everything
Active Currently lent out
Overdue Past due date
Returned Already returned

Returning a Book

  1. Find the lending record in the table
  2. Click ✅ Return
  3. Confirm — the record is marked as returned with today's date

Overdue Detection

The system automatically marks books as overdue when:

  • Status is "active" AND due date is in the past
  • This check runs every time the lending page is loaded

Lending History per Book

Each book's detail page shows its complete lending history:

  • Who borrowed it
  • When it was lent
  • Due date
  • When returned (or if still out)

Rules

  • A book can only be lent to one person at a time
  • You cannot lend a book that's already lent out (returns error)
  • Due date must be in the future
  • Any authenticated user can create lending records

Next: User Management

Clone this wiki locally