notifications on dashboard
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,9 @@ def init_routes(main_bp):
|
||||
active_count = User.query.filter_by(is_active=True).count()
|
||||
inactive_count = User.query.filter_by(is_active=False).count()
|
||||
|
||||
# Get recent notifications
|
||||
recent_notifications = Notif.query.filter_by(user_id=current_user.id).order_by(Notif.timestamp.desc()).limit(5).all()
|
||||
|
||||
# Get recent events (last 7)
|
||||
if current_user.is_admin:
|
||||
recent_events = Event.query.order_by(Event.timestamp.desc()).limit(7).all()
|
||||
@@ -314,7 +317,8 @@ def init_routes(main_bp):
|
||||
message_count=message_count,
|
||||
attachment_count=attachment_count,
|
||||
conversation_total_size=conversation_total_size, # Conversation storage size
|
||||
recent_conversations=recent_conversations)
|
||||
recent_conversations=recent_conversations,
|
||||
recent_notifications=recent_notifications)
|
||||
|
||||
UPLOAD_FOLDER = os.path.join(os.getcwd(), 'uploads', 'profile_pics')
|
||||
if not os.path.exists(UPLOAD_FOLDER):
|
||||
|
||||
Reference in New Issue
Block a user