Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
6a563e1f
Commit
6a563e1f
authored
May 28, 2019
by
Vijay Akula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added oauth credentials:
parent
50f731ef
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
34 deletions
+36
-34
EmployeeController.java
.../java/com/nisum/myteam/controller/EmployeeController.java
+3
-2
LeaveNotificationScheduler.java
...om/nisum/myteam/schedular/LeaveNotificationScheduler.java
+11
-11
ProjectEndDateScheduler.java
...a/com/nisum/myteam/schedular/ProjectEndDateScheduler.java
+6
-5
application.properties
src/main/resources/application.properties
+8
-8
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+1
-1
app.js
src/main/webapp/WEB-INF/js/app.js
+2
-4
login.html
src/main/webapp/WEB-INF/templates/login.html
+5
-3
No files found.
src/main/java/com/nisum/myteam/controller/EmployeeController.java
View file @
6a563e1f
...
...
@@ -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
)
{
...
...
src/main/java/com/nisum/myteam/schedular/LeaveNotificationScheduler.java
View file @
6a563e1f
...
...
@@ -53,7 +53,7 @@ public class LeaveNotificationScheduler {
//@Scheduled(cron = "0 * * * * ?")
//@Scheduled(cron = "00 5
0 15 * * 1-5")
@Scheduled
(
cron
=
"00 0
0 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
);
}
...
...
src/main/java/com/nisum/myteam/schedular/ProjectEndDateScheduler.java
View file @
6a563e1f
...
...
@@ -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 5
0 15 * * 1-5")
@Scheduled
(
cron
=
"00 0
0 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
);
}
...
...
src/main/resources/application.properties
View file @
6a563e1f
...
...
@@ -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=myteam
db
#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
=
mytime
db
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 * ? *
...
...
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
6a563e1f
...
...
@@ -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
){
...
...
src/main/webapp/WEB-INF/js/app.js
View file @
6a563e1f
...
...
@@ -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
,
...
...
src/main/webapp/WEB-INF/templates/login.html
View file @
6a563e1f
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment