diff --git a/celerybeat-schedule b/celerybeat-schedule index cc8251c..68297a7 100644 Binary files a/celerybeat-schedule and b/celerybeat-schedule differ diff --git a/junior/serializers.py b/junior/serializers.py index 1ca98e4..abb0ded 100644 --- a/junior/serializers.py +++ b/junior/serializers.py @@ -98,7 +98,7 @@ class CreateJuniorSerializer(serializers.ModelSerializer): JuniorGuardianRelationship.objects.get_or_create(guardian=guardian_data, junior=junior) junior.guardian_code_status = str(NUMBER['three']) junior_approval_mail(user.email, user.first_name) - send_notification_to_guardian.delay(APPROVED_JUNIOR, junior.auth.id, guardian_data.user.id, {}) + send_notification_to_guardian.delay(ASSOCIATE_REQUEST, junior.auth.id, guardian_data.user.id, {}) junior.dob = validated_data.get('dob', junior.dob) junior.passcode = validated_data.get('passcode', junior.passcode) junior.country_name = validated_data.get('country_name', junior.country_name) diff --git a/notifications/admin.py b/notifications/admin.py index aa57aac..c7cc895 100644 --- a/notifications/admin.py +++ b/notifications/admin.py @@ -11,4 +11,3 @@ class NotificationAdmin(admin.ModelAdmin): """Notification Admin""" list_display = ['id', 'notification_type', 'notification_to', 'data', 'is_read'] list_filter = ['notification_type'] - \ No newline at end of file diff --git a/notifications/constants.py b/notifications/constants.py index f4f8b86..8bb6a6d 100644 --- a/notifications/constants.py +++ b/notifications/constants.py @@ -32,15 +32,17 @@ NOTIFICATION_DICT = { "title": "Associate request!", "body": "You have request from {from_user} to associate with you." }, + # Juniors will receive Notifications for every Points earned by referrals REFERRAL_POINTS: { "title": "Earn Referral points!", "body": "You earn 5 points for referral." }, - # notification once any custodian adds junior in their account + # Juniors will receive notification once any custodians add them in their account SKIPPED_PROFILE_SETUP: { "title": "Profile already setup!", "body": "Your guardian has already setup your profile." }, + # Juniors will receive Notification for every Task Assign by Custodians TASK_ASSIGNED: { "title": "New task assigned!", "body": "{from_user} has assigned you a new task." @@ -49,10 +51,12 @@ NOTIFICATION_DICT = { "title": "Task submitted!", "body": "Your task has been submitted for approval." }, + # Guardian will receive notification as soon as junior send task for approval TASK_ACTION: { "title": "Task completion approval!", "body": "You have request from {from_user} for task completion." }, + # Juniors will receive notification as soon as their task is approved or reject by custodians TASK_REJECTED: { "title": "Task completion rejected!", "body": "Your task completion request has been rejected by {from_user}." @@ -61,14 +65,18 @@ NOTIFICATION_DICT = { "title": "Task completion approved!", "body": "Your task completion request has been approved by {from_user}." }, + # Juniors will receive Notifications for every Points earned either by Task completion + # Juniors will receive notification as soon as their task is approved or reject by custodians TASK_POINTS: { "title": "Earned Task points!", "body": "You earn 5 points for task." }, + # Juniors will receive Notification related to Leaderboard progress LEADERBOARD_RANKING: { "title": "Leader board rank!", "body": "Your rank is ." }, + # Juniors will receive notification as soon as their custodians remove them from account REMOVE_JUNIOR: { "title": "Disassociate by guardian!", "body": "Your guardian has disassociated you."