From d573d56a357e51e49f8661c3cd3564bceee9db9d Mon Sep 17 00:00:00 2001 From: abutalib-kiwi Date: Tue, 22 Aug 2023 16:01:08 +0530 Subject: [PATCH] minor changes --- celerybeat-schedule | Bin 16384 -> 16384 bytes junior/serializers.py | 2 +- notifications/admin.py | 1 - notifications/constants.py | 10 +++++++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/celerybeat-schedule b/celerybeat-schedule index cc8251c7500206755f61cdf0ff0b24e019ea84c5..68297a7db074145de61828e2a94f36b892493ec5 100644 GIT binary patch delta 470 zcmYk2!Aiq07{?p!+~zEbP7jW;DTvNPTorwR;X!(vdht@)F51wp9c?CVFziW0a*=-C zckl&dkKn@ydjXG{(g+5U{QmiW-^ZUM2}%+)ZFUPvzLw;@)6PMYT9JBH>V2uX)SjNh zTsCYSzv|mFzxl3e-_ojxit4Ps_ftZRSsizfrpX}-!dXxIN7D^9PSm%eoXHojuR4%6 z+q;JPj7h*EN@C$xQC=_szCs=bG$K8dS+NJa;t-!iBWx3k0oN`am-L1{ITx)XNa4Um zyp_JRTaUm?J&O@W`{X~S&{-~il{S~_1@)5)#~xCj(I5t1yd%tFED~dQX&eTG2DhQW z8-W)YiubZP3gl{;n)f7%X&9KM_>1!2UlmUA3DyCB=yUBC>S={~ delta 390 zcmX|5F;Buk7`>w)?Lk4om4uKOsRPo%!I_w--Kr*yOVb{wTqrGHdl)exb|MZsnEn9< zHz&i7@+Uaz5gNa5crWkey}UHVX^L0vP62IC&k^;vM5}G_$9y+0*FpQEsOz~^kxqTx zI`~!b=epG!VEr(6Hf4G?IbJng_kqO;k3!c?6{jTildRqEoGULq7K)g&BvlrGx=vME z>~YFtHgtuTi~&>10v6AEKJx^*q9Zn(1?)_Q<^&4e5q1n2$=>?LGbnWE2`2c2k$(ck z0V#j0jS4bU(}5E8XFL!*OvpVGo)9sC9r_f7jE8p-xs~K%L!j(vve%u3Q%=VL19b_S z4a8BTdUHL1iiMX@wLxD(&4#*#=xIJQ$u}m1#!)CdpTKU{LKbqc%pSqsNWOrE4b27Y O`^EyYvHALCYPCNqqGy2s 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."