Welcome, Librarian!
This guide covers all daily operations for librarians in the SWL Library Management System. Learn how to approve requests, process returns, manage inventory, and handle overdue loans.Getting Started
Accessing the System
Auto-redirect to Dashboard
After successful login, you’ll automatically be redirected to the admin dashboard at
/dashboardAdmin Dashboard Overview
The admin dashboard (/dashboard) is your central hub for managing all loan operations.
Dashboard Features
Loan Statistics
- Pending requests count
- Active loans count
- Returned loans count
- Overdue loans count
Top Items
View the 5 most frequently borrowed items to understand usage patterns
Status Filtering
Filter loans by status: pendiente, activo, devuelto, or atrasado
Loan Details
Each loan displays:
- User information
- Item details
- Request and due dates
- Current status
- Actions available
Status Filter Navigation
Use the status filter tabs to quickly navigate between loan types:Processing Loan Requests
Approving Loan Requests
Review Request Details
For each request, verify:
- User information and eligibility
- Item requested and availability
- Environment (interno vs externo)
- User’s current active loans
Approve the Loan
Click the “Approve” button for the loan. The system will:
- Change status from ‘pendiente’ to ‘activo’
- Set the approval date to current timestamp
- Keep the item instance marked as ‘prestado’
- Automatically redirect you to active loans view
Route Reference: The approve action is handled at
/approve/<loan_id> (POST method)What Happens on Approval
When you approve a loan:- Status Change: Loan status changes from ‘pendiente’ → ‘activo’
- Timestamp:
approval_dateis set to current UTC time - Due Date: Already calculated (15 days from request)
- Item Status: Remains ‘prestado’ (was reserved when user submitted request)
- Database Commit: Changes are saved to the database
- Flash Message: Success confirmation displayed
Rejecting Loan Requests
If a request cannot be fulfilled:System Actions
The system automatically:
- Changes loan status to ‘rechazado’
- Adds observation: “Rechazado por el bibliotecario”
- Releases the reserved item (status: ‘prestado’ → ‘disponible’)
- Makes the item available for other users
Route Reference: Rejection is handled at
/reject/<loan_id> (POST method)Processing Returns
Returning Items
Process Return
Click the “Return” button. The system will:
- Freeze the current penalty amount (for books)
- Change loan status to ‘devuelto’
- Set return_date to current timestamp
- Release the item instance (status: ‘prestado’ → ‘disponible’)
- Make the item available for new requests
Route Reference: Returns are processed at
/loan/<loan_id>/return (POST method)Understanding the Return Process
The return operation performs critical inventory management:Managing Overdue Loans
Automated Overdue Detection
The system automatically checks for overdue loans using a background scheduler:- Automatic Process: Runs periodically to detect overdue items
- Status Update: Changes ‘activo’ loans to ‘atrasado’ when due_date passes
- No Manual Action Required: The scheduler handles detection automatically
Handling Overdue Items
Penalty Calculation:
- Only applies to books (category: ‘libro’)
- Default rate: $5,000 COP per day
- Calculated as:
days_overdue × penalty_rate - Frozen at return time in
final_penaltyfield
No Penalties for Equipment
Laptops and accessories do not accrue financial penalties. However, users with overdue equipment may face borrowing restrictions.
Catalog and Inventory Management
Librarians have full access to catalog and inventory management.Managing the Catalog
Add New Catalog Entry
Fill out the form:
- Title or Name
- Category (libro, computo, general)
- Author or Brand
Route Reference: Catalog management is at
/catalog with POST for creating new entriesDeleting Catalog Entries
To delete a catalog entry:- Navigate to
/catalog - Find the item with 0 instances
- Click delete button
- Route:
/catalog/delete/<catalog_id>(POST)
Managing Item Instances
Access Instance Management
From the catalog view, click on a catalog item to manage its instancesRoute:
/catalog/<catalog_id>/instancesAdd New Instance
Fill out the instance form:
- Unique Code: Serial number, barcode, or identifier (must be unique)
- Condition: Description (e.g., “New”, “Good”, “Fair”)
- Status: disponible, mantenimiento, perdido
Unique Codes: Each instance must have a unique identifier. The system prevents duplicate codes across the entire inventory.
Updating Instance Status
Change instance status for maintenance or lost items:Select New Status
Choose from:
- disponible: Ready to loan
- mantenimiento: Under repair/maintenance
- perdido: Lost or missing
Deleting Instances
Fast Loan Processing
Librarians can process walk-in requests using the fast loan feature:Select Item
Choose from available catalog items
- Premium users see specialized equipment
- General users see standard items
Configure Loan
- Item type (computing equipment limits quantity to 1)
- Quantity (if not computing)
- Environment (interno/externo)
Fast loan reserves instances transactionally and creates active loans in one step, bypassing the approval workflow.
Best Practices
Morning Routine
Morning Routine
Start each day by:
- Reviewing overdue loans (
/dashboard?status=atrasado) - Checking pending requests (
/dashboard?status=pendiente) - Contacting users with items due today
Approval Workflow
Approval Workflow
- Approve requests during business hours for same-day pickup
- Verify user eligibility before approving (check active loans)
- Batch-approve multiple requests from same user if appropriate
Return Processing
Return Processing
- Always inspect item condition before processing return
- Collect penalties immediately for overdue books
- Verify item unique code matches the loan record
Inventory Management
Inventory Management
- Use specific, consistent unique codes (e.g., “LAPTOP-001”, “BOOK-ISBN”)
- Update instance status promptly when items need maintenance
- Mark lost items immediately to prevent false availability
User Communication
User Communication
- Provide reasons when rejecting requests (call or email)
- Send reminders 1-2 days before due dates
- Follow up on overdue items daily
End of Day
End of Day
- Review statistics to identify trends
- Check for any pending actions
- Ensure all returns are processed
Understanding Role Access
As a librarian (bibliotecario role), you have access to:Allowed Actions:
- View and manage the admin dashboard
- Approve and reject loan requests
- Process loan returns
- Manage catalog (add, view, search, delete entries)
- Manage item instances (add, update status, delete)
- Access fast loan feature
- View all loan statistics and history
- Cannot create, edit, or delete users (admin only)
- Cannot modify system configuration
- Cannot access user management pages
Troubleshooting Common Issues
Approval Fails with Error
Approval Fails with Error
Cause: Loan may not be in ‘pendiente’ status or database issueSolution:
- Refresh the page
- Verify loan status is ‘pendiente’
- Check if item instance is still in ‘prestado’ status
- Contact admin if issue persists
Return Process Shows Error
Return Process Shows Error
Cause: Inventory release failureSolution:
- Transaction automatically rolls back
- Verify instance status in database
- Try return process again
- Contact admin if repeated failures
Cannot Delete Catalog Entry
Cannot Delete Catalog Entry
Cause: Catalog has registered instancesSolution:
- Navigate to instance management for that catalog
- Delete all instances first
- Return to catalog and delete entry
Duplicate Unique Code Error
Duplicate Unique Code Error
Cause: Instance with that unique code already existsSolution:
- Use a different, unique identifier
- Search inventory to find existing instance with that code
- Use sequential numbering to avoid conflicts
User Cannot Request Item
User Cannot Request Item
Cause: User may have exceeded limits or have overdue itemsSolution:
- Check user’s active loans in their dashboard
- Verify they don’t have:
- An active laptop (for laptop requests)
- 2 active accessories (for accessory requests)
- Overdue items affecting eligibility
Quick Reference: Key Routes
| Action | Route | Method |
|---|---|---|
| Admin Dashboard | /dashboard | GET |
| Filter by Status | /dashboard?status=<status> | GET |
| Approve Loan | /approve/<loan_id> | POST |
| Reject Loan | /reject/<loan_id> | POST |
| Process Return | /loan/<loan_id>/return | POST |
| Catalog Management | /catalog | GET/POST |
| Delete Catalog | /catalog/delete/<id> | POST |
| Manage Instances | /catalog/<catalog_id>/instances | GET/POST |
| Update Instance Status | /instance/update_status/<instance_id> | POST |
| Delete Instance | /instance/delete/<instance_id> | POST |
| Fast Loan | /fast_loan | GET/POST |
Need Help?
Technical Issues
Contact system administrators for:
- Database errors
- Permission problems
- System configuration issues
Policy Questions
Consult with senior librarians or administrators for:
- Penalty policy clarifications
- Special request handling
- User eligibility questions
You’re equipped to efficiently manage all daily librarian operations in the SWL Library Management System!