* chore: added a boolean field in notification list * chore: notification filters changed * chore: handled inbox notification and typo on the card items * chore: handled notification count increment and decrement * chore: typos and ui updates --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
24 lines
648 B
Python
24 lines
648 B
Python
# Module imports
|
|
from .base import BaseSerializer
|
|
from .user import UserLiteSerializer
|
|
from plane.db.models import Notification, UserNotificationPreference
|
|
|
|
# Third Party imports
|
|
from rest_framework import serializers
|
|
|
|
|
|
class NotificationSerializer(BaseSerializer):
|
|
triggered_by_details = UserLiteSerializer(
|
|
read_only=True, source="triggered_by"
|
|
)
|
|
is_inbox_issue = serializers.BooleanField(read_only=True)
|
|
|
|
class Meta:
|
|
model = Notification
|
|
fields = "__all__"
|
|
|
|
|
|
class UserNotificationPreferenceSerializer(BaseSerializer):
|
|
class Meta:
|
|
model = UserNotificationPreference
|
|
fields = "__all__"
|