Commit 6a563e1f authored by Vijay Akula's avatar Vijay Akula

Added oauth credentials:

parent 50f731ef
......@@ -117,8 +117,9 @@ public class EmployeeController {
return new ResponseEntity<ResponseDetails>(getRespDetails, HttpStatus.OK);
}
@RequestMapping(value = "/employees/emailId/{emailId:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> getEmployee(@PathVariable("emailId") String emailId, HttpServletRequest request)
///employees/emailId/{emailId:.+}
@RequestMapping(value = "/employees/emailId", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> getEmployee(@RequestParam("emailId") String emailId, HttpServletRequest request)
throws MyTeamException {
Employee employee = empService.getEmployeeByEmaillId(emailId);
if (employee == null) {
......
......@@ -53,7 +53,7 @@ public class LeaveNotificationScheduler {
//@Scheduled(cron = "0 * * * * ?")
//@Scheduled(cron = "00 50 15 * * 1-5")
@Scheduled(cron = "00 00 15 * * 1-5")
public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException {
//Shift 1(9:00 AM - 6:00 PM)
logger.info(Shifts.SHIFT1.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
......@@ -61,7 +61,7 @@ public class LeaveNotificationScheduler {
}
//@Scheduled(cron = "00 00 18 * * 1-5")
@Scheduled(cron = "00 00 18 * * 1-5")
public void scheduleLeaveMailForShift2Empls() throws IOException, MessagingException, MyTeamException {
//Shift-2(2:00 PM - 11:00 PM)--General Shift
logger.info(Shifts.SHIFT2.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
......@@ -69,7 +69,7 @@ public class LeaveNotificationScheduler {
}
//@Scheduled(cron = "00 00 02 * * 2-6")
@Scheduled(cron = "00 00 02 * * 2-6")
public void scheduleLeaveMailForShift3Empls() throws IOException, MessagingException, MyTeamException {
//Shift 3(10:00 PM - 6:00 AM)
logger.info(Shifts.SHIFT3.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
......@@ -77,7 +77,7 @@ public class LeaveNotificationScheduler {
}
//@Scheduled(cron = "00 30 11 * * 1-5")
@Scheduled(cron = "00 30 11 * * 1-5")
public void scheduleLeaveMailForShift4Empls() throws IOException, MessagingException, MyTeamException {
//Shift 4(7:30 AM - 3:30 PM)
logger.info(Shifts.SHIFT4.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
......@@ -85,7 +85,7 @@ public class LeaveNotificationScheduler {
}
//@Scheduled(cron = "00 30 15 * * 1-5")
@Scheduled(cron = "00 30 15 * * 1-5")
public void scheduleLeaveMailForShift5Empls() throws IOException, MessagingException, MyTeamException {
//Shift 5(11:30 AM - 7:30 PM)
logger.info(Shifts.SHIFT5.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
......@@ -123,15 +123,15 @@ public class LeaveNotificationScheduler {
!empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType()))) {
logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId());
//mail.setEmpName(absentee.getEmployeeName());
//mail.setTo(absentee.getEmailId());
mail.setEmpName(absentee.getEmployeeName());
mail.setTo(absentee.getEmailId());
mail.setEmpName("Prayas");
mail.setTo("pjain@nisum.com");
//mail.setEmpName("Prayas");
//mail.setTo("pjain@nisum.com");
functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup());
//mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()});
mail.setCc(new String[]{"prayasjain21@gmail.com"});
mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()});
//mail.setCc(new String[]{"prayasjain21@gmail.com"});
mailService.sendLeaveNotification(mail);
}
......
......@@ -12,6 +12,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.mail.MessagingException;
import java.io.IOException;
......@@ -39,7 +40,7 @@ public class ProjectEndDateScheduler {
private Environment environment;
//@Scheduled(cron = "00 50 15 * * 1-5")
@Scheduled(cron = "00 00 15 * * 1-5")
//@Scheduled(cron = "0 * * * * ?")
private void sendMailToDls() throws IOException, MessagingException {
......@@ -65,11 +66,11 @@ public class ProjectEndDateScheduler {
List<String> dlIds = activeProject.getDeliveryLeadIds();
for (String dlId : dlIds) {
Employee employee = empService.getEmployeeById(dlId);
// mail.setEmpName(employee.getEmployeeName());
//mail.setTo(employee.getEmailId());
mail.setEmpName(employee.getEmployeeName());
mail.setTo(employee.getEmailId());
mail.setEmpName("Vijay");
mail.setTo("vakula@nisum.com");
//mail.setEmpName("Vijay");
// mail.setTo("vakula@nisum.com");
logger.info("Mail Notification is sending to:" + employee.getEmployeeName() + "::" + employee.getEmailId());
mailService.sendProjectNotification(mail);
}
......
......@@ -2,16 +2,16 @@ server.port=8080
server.context-path=/myTeam/
#Production configuration
#spring.data.mongodb.host=10.3.45.127
#spring.data.mongodb.port=27017
#spring.data.mongodb.database=myteamdb
#spring.data.mongodb.username=myteam
#spring.data.mongodb.password=myteam
spring.data.mongodb.host=10.3.45.11
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytimedb
spring.data.mongodb.username=mytime
spring.data.mongodb.password=nisum@123
#Local Database configuration
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytime
#spring.data.mongodb.host=localhost
#spring.data.mongodb.port=27017
#spring.data.mongodb.database=myTeamDB
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
......
......@@ -31,7 +31,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
function getUserRole(profile){
$http({
method : "GET",
url : appConfig.appUri + "employees/emailId/"+profile.getEmail()
url : appConfig.appUri + "employees/emailId?emailId="+profile.getEmail()
}).then(function mySuccess(response) {
var result = response.data.records;
if(result == "" || result.length == 0){
......
......@@ -17,10 +17,8 @@ function($mdDateLocaleProvider) {
myApp.constant('appConfig', {
appName: "MyTime",
//appUri: "http://10.3.45.11:8080/myTeam/",
appUri: "http://localhost:8080/myTeam/",
appUri: "http://10.3.45.11:8080/myTeam/",
//appUri: "http://localhost:8080/myTeam/",
version:"1.0",
empStartId:16001,
empEndId:99999,
......
......@@ -16,8 +16,7 @@
function renderButton() {
gapi.load('auth2', function () {
gapi.auth2.init({
client_id: "685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com",
//client_id: "10230597574-gv1bg8nehm0a63n9hh5mu9um563uqaq1.apps.googleusercontent.com",
client_id: "951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com",
hosted_domain: 'nisum.com'
});
});
......@@ -34,7 +33,10 @@
</script>
<script src="https://apis.google.com/js/platform.js?onload=renderButton"></script>
<!--<meta name="google-signin-client_id" content="10230597574-gv1bg8nehm0a63n9hh5mu9um563uqaq1.apps.googleusercontent.com">-->
<meta name="google-signin-client_id" content="685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com">
<!--<meta name="google-signin-client_id" content="685521475239-ujm7l2hkgrltk7loi8efl0ed702asm2r.apps.googleusercontent.com">-->
<meta name="google-signin-client_id" content="951338644595-32q4i4n2rv4jevvteq77m7jpcq9sbrec.apps.googleusercontent.com">
<link rel="stylesheet" href="css/login.css" />
</head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment