* chore: mention notification boolean field * chore: handled mentions and all notification mutation and UI fix on the app sidebar notification badge and Back redirection button on inbox issue resposiveness * chore: Moved everthing to chip * chore: cleaning up the selection when we unmount the page * chore: resolved build error --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
25 lines
721 B
Python
25 lines
721 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)
|
|
is_mentioned_notification = serializers.BooleanField(read_only=True)
|
|
|
|
class Meta:
|
|
model = Notification
|
|
fields = "__all__"
|
|
|
|
|
|
class UserNotificationPreferenceSerializer(BaseSerializer):
|
|
class Meta:
|
|
model = UserNotificationPreference
|
|
fields = "__all__"
|