Add notification scenario check for Beneficiary role

This commit is contained in:
nisha
2025-05-20 18:35:41 +05:30
parent d1dcc5cf7b
commit ad4e5483b4
3 changed files with 24 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -87,7 +88,10 @@ public class ApplicationEvaluationScheduler {
evaluation.setStatus(ApplicationEvaluationStatusTypeEnum.EXPIRED.getValue());
evaluation = applicationEvaluationRepository.save(evaluation);
Map<String, String> placeHolders = notificationDao.sendNotificationToBeneficiary(application, NotificationTypeEnum.EVALUATION_EXPIRED);
// Map<String, String> placeHolders = notificationDao.sendNotificationToBeneficiary(application, NotificationTypeEnum.EVALUATION_EXPIRED);
Map<String, String> placeHolders = new HashMap<>();
placeHolders.put("{{call_name}}", application.getCall().getName());
placeHolders.put("{{protocol_number}}", String.valueOf(application.getProtocol().getProtocolNumber()));
notificationDao.sendNotificationToSuperUser(application,placeHolders,NotificationTypeEnum.EVALUATION_EXPIRED);
notificationDao.sendNotificationToInstructor(placeHolders,evaluation,NotificationTypeEnum.EVALUATION_EXPIRED);
notificationDao.sendNotificationToInstructorManager(placeHolders,evaluation,NotificationTypeEnum.EVALUATION_EXPIRED);