feat: Implement loan management features including fetching, creating, and deleting loans
- Added database functions for managing loans: getLoans, getUserLoans, deleteLoan, and createLoan. - Updated frontend to include new Form4 for displaying user loans and handling loan deletions. - Replaced Form3 with Form4 in App component. - Enhanced Form1 to set borrowing dates and fetch available items. - Improved Form2 to display borrowable items and allow selection for loans. - Introduced utility functions for handling loan creation and deletion in userHandler. - Added event listeners for local storage updates to keep UI in sync. - Updated fetchData utility to retrieve loans and user loans from the backend.
This commit is contained in:
@@ -7,12 +7,9 @@ type ObjectProps = {
|
||||
|
||||
const Object: React.FC<ObjectProps> = ({ title, description }) => {
|
||||
return (
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="shrink-0 w-3 h-3 mt-1.5 rounded-full bg-green-400" />
|
||||
<div>
|
||||
<h3 className="text-sm font-semibold text-blue-800">{title}</h3>
|
||||
<p className="text-xs text-blue-500/80 line-clamp-2">{description}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-sm font-semibold text-blue-800">{title}</h3>
|
||||
<p className="text-xs text-blue-500/80 line-clamp-2">{description}</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user