Add last login tracking, batch date auto-fill, and bug fixes
- Track last_login_at on User model, updated on every successful login - Show last login date in admin panel user table - Fix admin/garden date display (datetime strings already contain T separator) - Fix My Garden Internal Server Error (MySQL does not support NULLS LAST syntax) - Fix Log Batch infinite loop when user has zero varieties - Auto-fill batch dates from today when creating a new batch, calculated from selected variety's week offsets (germination, greenhouse, garden) - Update README with new features and batch date auto-fill formula table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ def list_users(db: Session = Depends(get_db), _: User = Depends(get_admin_user))
|
||||
return [
|
||||
AdminUserOut(
|
||||
id=u.id, email=u.email, is_admin=u.is_admin, is_disabled=u.is_disabled,
|
||||
created_at=u.created_at, **_user_stats(db, u.id)
|
||||
created_at=u.created_at, last_login_at=u.last_login_at, **_user_stats(db, u.id)
|
||||
)
|
||||
for u in users
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user