From 30620376652871b9ddfea7a84ffba5f9c5d0e64b Mon Sep 17 00:00:00 2001 From: ttpl-rt-217 Date: Sun, 10 Nov 2024 15:25:39 +0530 Subject: [PATCH] Issue #PS-2407 fix: When an admin reassigns a TL to a different block, the TL should receive a notification informing them about the change. --- src/components/CommonUserModal.tsx | 8 ++++---- src/components/ReassignCenterModal.tsx | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/CommonUserModal.tsx b/src/components/CommonUserModal.tsx index 3581c6ac..f8fc23e1 100644 --- a/src/components/CommonUserModal.tsx +++ b/src/components/CommonUserModal.tsx @@ -382,10 +382,10 @@ const CommonUserModal: React.FC = ({ if( userType === FormContextType.TEACHER){ getNotification(userId, "FACILITATOR_PROFILE_UPDATE"); } - // if( userType === FormContextType.STUDENT){ - // getNotification(userId, "pending TO STUDENDT"); - // getNotification(userId, "pending TO TEACHER"); - // } + if( userType === FormContextType.STUDENT){ + getNotification(userId, "LEARNER_PROFILE_UPDATE_ALERT"); + getNotification(userId, "LEARNER_PROFILE_UPDATE_BY_ADMIN_TL_FC"); + } const windowUrl = window.location.pathname; diff --git a/src/components/ReassignCenterModal.tsx b/src/components/ReassignCenterModal.tsx index 58ec04ee..561b71ed 100644 --- a/src/components/ReassignCenterModal.tsx +++ b/src/components/ReassignCenterModal.tsx @@ -236,6 +236,9 @@ const ReassignCenterModal: React.FC = ({ if(userType === Role.FACILITATORS){ getNotification(selectedTLUserID, "FACILITATOR_BLOCK_UPDATE"); + + console.log(selectedTLUserID ,"FACILITATOR_BLOCK_UPDATE"); + } const blockField = userDetails?.userData?.customFields.find( (field: any) => field.label === "BLOCKS" @@ -294,13 +297,11 @@ const ReassignCenterModal: React.FC = ({ "success" ); if( userType === Role.FACILITATORS) { - getNotification(selectedTLUserID, "FACILITATOR_CENTER_REASSIGNMENT"); - + getNotification(userId, "FACILITATOR_CENTER_REASSIGNMENT"); + } + if(userType === Role.LEARNERS) { + getNotification(selectedTLUserID, "LEARNER_REASSIGNMENT_NOTIFICATION"); } - // if(userType === Role.LEARNERS) { - // getNotification(selectedTLUserID, "LEARNER_CENTER_REASSIGNMENT"); - // // LINE NO 12 OF THIS FILE - // } } else { const reassignBlockObject = { limit: 0,