notification: change notification data
This commit is contained in:
@@ -72,7 +72,8 @@ class ExpenceCreateSerializer(serializers.ModelSerializer):
|
|||||||
expence.counterparty.save()
|
expence.counterparty.save()
|
||||||
body = f"""{user.full_name} {expence.price} {expence.currency.upper()}... \n screen: /monitoring"""
|
body = f"""{user.full_name} {expence.price} {expence.currency.upper()}... \n screen: /monitoring"""
|
||||||
data = {
|
data = {
|
||||||
"screen": "/monitoring"
|
"screen": "/monitoring",
|
||||||
|
"type": "expence",
|
||||||
}
|
}
|
||||||
notify_user(user=user, title="Tasdiqlang yoki rad eting", body=body, data=data)
|
notify_user(user=user, title="Tasdiqlang yoki rad eting", body=body, data=data)
|
||||||
cash_transaction.save()
|
cash_transaction.save()
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ class NotificationHistorySerializer(serializers.ModelSerializer):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = NotificationHistory
|
model = NotificationHistory
|
||||||
fields = [
|
fields = [
|
||||||
'id', 'title', 'body', 'data', 'is_read'
|
'id', 'title', 'body', 'data', 'is_read', 'created_at'
|
||||||
]
|
]
|
||||||
@@ -88,7 +88,8 @@ class MultipleOrderCreateSerializer(serializers.Serializer):
|
|||||||
body = f"""{user.full_name} {order.project_folder.name} uchun {order.wherehouse.name} ombor ga {order.quantity} {order.unity.value} {order.product.name} ga buyurtma berdi. Buyurtma yetkazish sanasi {common_date}
|
body = f"""{user.full_name} {order.project_folder.name} uchun {order.wherehouse.name} ombor ga {order.quantity} {order.unity.value} {order.product.name} ga buyurtma berdi. Buyurtma yetkazish sanasi {common_date}
|
||||||
"""
|
"""
|
||||||
data = {
|
data = {
|
||||||
"screen": "/supply"
|
"screen": "/supply",
|
||||||
|
"type": "order"
|
||||||
}
|
}
|
||||||
notify_user(user=user, title="Ta'minot",body=body, data=data)
|
notify_user(user=user, title="Ta'minot",body=body, data=data)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user