Skip to content

Commit

Permalink
Merge pull request #305 from shreyas1434shinde/notification
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
itsvick authored Nov 10, 2024
2 parents 87019e7 + 05310d2 commit 08a7c4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/components/CommonUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ const CommonUserModal: React.FC<UserModalProps> = ({
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;
Expand Down
13 changes: 7 additions & 6 deletions src/components/ReassignCenterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ const ReassignCenterModal: React.FC<ReassignCohortModalProps> = ({
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"
Expand Down Expand Up @@ -294,13 +297,11 @@ const ReassignCenterModal: React.FC<ReassignCohortModalProps> = ({
"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,
Expand Down

0 comments on commit 08a7c4b

Please sign in to comment.