notification changes

This commit is contained in:
abutalib-kiwi
2023-08-21 20:07:39 +05:30
parent dfff643c71
commit 95dad86b12
4 changed files with 63 additions and 39 deletions

View File

@ -1,19 +1,22 @@
"""
notification constants file
"""
from base.constants import NUMBER
REGISTRATION = NUMBER['one']
TASK_ASSIGNED = NUMBER['two']
INVITED_GUARDIAN = NUMBER['three']
APPROVED_JUNIOR = NUMBER['four']
REFERRAL_POINTS = NUMBER['five']
TASK_POINTS = NUMBER['six']
TASK_REJECTED = NUMBER['seven']
SKIPPED_PROFILE_SETUP = NUMBER['eight']
TASK_SUBMITTED = NUMBER['nine']
TASK_ACTION = NUMBER['ten']
LEADERBOARD_RANKING = NUMBER['eleven']
REMOVE_JUNIOR = NUMBER['twelve']
REGISTRATION = 1
INVITATION = 2
ASSOCIATE_REQUEST = 3
REFERRAL_POINTS = 4
SKIPPED_PROFILE_SETUP = 5
TASK_ASSIGNED = 6
TASK_SUBMITTED = 7
TASK_ACTION = 8
TASK_REJECTED = 9
TASK_APPROVED = 10
TASK_POINTS = 11
LEADERBOARD_RANKING = 12
REMOVE_JUNIOR = 13
TEST_NOTIFICATION = 99
NOTIFICATION_DICT = {
@ -21,41 +24,46 @@ NOTIFICATION_DICT = {
"title": "Successfully registered!",
"body": "You have registered successfully. Now login and complete your profile."
},
TASK_ASSIGNED: {
"title": "New task assigned !!",
"body": "{from_user} has assigned you a new task."
INVITATION: {
"title": "Invitation sent!",
"body": "Invitation has been successfully sent."
},
INVITED_GUARDIAN: {
"title": "Invite guardian",
"body": "Invite guardian successfully"
},
APPROVED_JUNIOR: {
"title": "Approve junior !",
ASSOCIATE_REQUEST: {
"title": "Associate request!",
"body": "You have request from {from_user} to associate with you."
},
REFERRAL_POINTS: {
"title": "Earn Referral points",
"title": "Earn Referral points!",
"body": "You earn 5 points for referral."
},
TASK_POINTS: {
"title": "Earn Task points!",
"body": "You earn 5 points for task."
},
TASK_REJECTED: {
"title": "Task rejected!",
"body": "Your task has been rejected."
},
# notification once any custodian adds junior in their account
SKIPPED_PROFILE_SETUP: {
"title": "Skipped profile setup!",
"body": "Your guardian {from_user} has setup your profile."
"title": "Profile already setup!",
"body": "Your guardian has already setup your profile."
},
TASK_ASSIGNED: {
"title": "New task assigned!",
"body": "{from_user} has assigned you a new task."
},
TASK_SUBMITTED: {
"title": "Task submitted!",
"body": "Your task has been submitted successfully."
"body": "Your task has been submitted for approval."
},
TASK_ACTION: {
"title": "Task completion approval!",
"body": "You have request from {from_user} for task approval."
"body": "You have request from {from_user} for task completion."
},
TASK_REJECTED: {
"title": "Task completion rejected!",
"body": "Your task completion request has been rejected by {from_user}."
},
TASK_APPROVED: {
"title": "Task completion approved!",
"body": "Your task completion request has been approved by {from_user}."
},
TASK_POINTS: {
"title": "Earned Task points!",
"body": "You earn 5 points for task."
},
LEADERBOARD_RANKING: {
"title": "Leader board rank!",
@ -63,7 +71,7 @@ NOTIFICATION_DICT = {
},
REMOVE_JUNIOR: {
"title": "Disassociate by guardian!",
"body": "Your guardian disassociate you ."
"body": "Your guardian has disassociated you."
},
TEST_NOTIFICATION: {
"title": "Test Notification",