{% macro notification_overview(unread_count, recent_notifications) %}
Notifications
View All
{% if recent_notifications %}
{% for notification in recent_notifications %}
{% if notification.notif_type == 'account_created' %} Account Created {% elif notification.notif_type == 'room_invite' %} Room Invitation {% elif notification.notif_type == 'room_invite_removed' %} Room Invitation Removed {% elif notification.notif_type == 'conversation_invite' %} Conversation Invitation {% elif notification.notif_type == 'conversation_invite_removed' %} Conversation Invitation Removed {% elif notification.notif_type == 'conversation_message' %} New Message {% else %} {{ notification.notif_type|replace('_', ' ')|title }} {% endif %}
{% if notification.notif_type == 'account_created' %} Welcome to DocuPulse! Your account has been created successfully. {% elif notification.notif_type == 'room_invite' and notification.sender and notification.details %} {{ notification.sender.username }} {{ notification.sender.last_name }} invited you to join room "{{ notification.details.room_name }}" {% elif notification.notif_type == 'room_invite_removed' and notification.sender and notification.details %} {{ notification.sender.username }} {{ notification.sender.last_name }} removed your invitation to room "{{ notification.details.room_name }}" {% elif notification.notif_type == 'conversation_invite' and notification.sender and notification.details %} {{ notification.sender.username }} {{ notification.sender.last_name }} invited you to conversation "{{ notification.details.conversation_name }}" {% elif notification.notif_type == 'conversation_invite_removed' and notification.sender and notification.details %} {{ notification.sender.username }} {{ notification.sender.last_name }} removed your invitation to conversation "{{ notification.details.conversation_name }}" {% elif notification.notif_type == 'conversation_message' and notification.sender and notification.details %} {{ notification.sender.username }} {{ notification.sender.last_name }} sent a message in conversation "{{ notification.details.conversation_name }}" {% elif notification.details and notification.details.message %} {{ notification.details.message }} {% endif %}
{{ notification.timestamp.strftime('%Y-%m-%d %H:%M') }}
{% if notification.notif_type in ['room_invite', 'room_invite_removed'] and notification.details and notification.details.room_id %} {% elif notification.notif_type in ['conversation_invite', 'conversation_invite_removed', 'conversation_message'] and notification.details and notification.details.conversation_id %} {% endif %}
{% endfor %}
{% else %}

No recent notifications

{% endif %}
{% endmacro %}