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
659e2d68
Commit
659e2d68
authored
Dec 29, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DOL in Manage Employees and added mobile no as a mandatory field in add or update employee
parent
efb45684
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
29 deletions
+67
-29
Employee.java
src/main/java/com/nisum/myteam/model/dao/Employee.java
+2
-2
EmployeeEffortsService.java
...com/nisum/myteam/service/impl/EmployeeEffortsService.java
+2
-5
EmployeeService.java
...n/java/com/nisum/myteam/service/impl/EmployeeService.java
+1
-0
application-development.properties
src/main/resources/application-development.properties
+11
-11
application-production.properties
src/main/resources/application-production.properties
+1
-1
application.properties
src/main/resources/application.properties
+1
-1
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+41
-8
OpenPoolController.js
src/main/webapp/WEB-INF/controllers/OpenPoolController.js
+1
-0
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+7
-1
No files found.
src/main/java/com/nisum/myteam/model/dao/Employee.java
View file @
659e2d68
...
...
@@ -74,7 +74,7 @@ public class Employee implements Serializable {
private
String
technologyKnown
;
@Pattern
(
regexp
=
"(^$|[0-9]{10})"
,
message
=
"Invalid mobile number"
)
//
@Pattern(regexp="(^$|[0-9]{10})",message="Invalid mobile number")
@ExcelCellName
(
"Primary Mobile"
)
private
String
mobileNumber
;
...
...
src/main/java/com/nisum/myteam/service/impl/EmployeeEffortsService.java
View file @
659e2d68
...
...
@@ -73,11 +73,8 @@ public class EmployeeEffortsService implements IEmployeeEffortsService {
employeeEfforts
.
setEmployeeId
(
resultSet
.
getString
(
"EmployeeCode"
));
employeeEfforts
.
setEmployeeName
(
resultSet
.
getString
(
"FirstName"
));
employeeEfforts
.
setTotalHoursSpentInWeek
(
resultSet
.
getString
(
"TotalHoursInWeek"
)
+
':'
+
resultSet
.
getString
(
"TotalMinutesInWeek"
));
List
<
Resource
>
resourceList
=
resourceService
.
getResourcesByEmployeeId
(
employeeEfforts
.
getEmployeeId
()).
stream
().
filter
(
r
->
(
resourceService
.
isAllocationActiveToday
(
r
))
).
collect
(
Collectors
.
toList
());
if
(!
resourceList
.
isEmpty
())
{
Resource
resource
=
resourceList
.
get
(
0
);
Resource
resource
=
resourceService
.
getCurrentAllocation
(
employeeEfforts
.
getEmployeeId
());
if
(
null
!=
resource
)
{
Project
project
=
projectService
.
getProjectByProjectId
(
resource
.
getProjectId
());
Account
account
=
accountService
.
getAccountById
(
project
.
getAccountId
());
employeeEfforts
.
setProjectName
(
project
.
getProjectName
());
...
...
src/main/java/com/nisum/myteam/service/impl/EmployeeService.java
View file @
659e2d68
...
...
@@ -171,6 +171,7 @@ public class EmployeeService implements IEmployeeService {
Query
query
=
new
Query
(
Criteria
.
where
(
"employeeId"
).
is
(
employeeReq
.
getEmployeeId
()));
Update
update
=
new
Update
();
update
.
set
(
"employeeName"
,
employeeReq
.
getEmployeeName
());
update
.
set
(
"mobileNumber"
,
employeeReq
.
getMobileNumber
());
update
.
set
(
"emailId"
,
employeeReq
.
getEmailId
());
update
.
set
(
"role"
,
employeeReq
.
getRole
());
update
.
set
(
"gender"
,
employeeReq
.
getGender
());
...
...
src/main/resources/application-development.properties
View file @
659e2d68
...
...
@@ -20,13 +20,13 @@ myteam.remote.connection=smb://MyTime:nisum@192.168.15.67/eTimeTrackLite/
myteam.localFile.directory
=
/home/nisum/Documents/
#Mail configuration
spring.mail.host
=
smtp.gmail.com
spring.mail.port
=
587
spring.mail.username
=
mytime.nisum@gmail.com
spring.mail.password
=
nisum@123
spring.mail.properties.mail.smtp.auth
=
true
spring.mail.properties.mail.smtp.starttls.enable
=
true
spring.mail.properties.mail.smtp.starttls.required
=
true
#
spring.mail.host=smtp.gmail.com
#
spring.mail.port=587
#
spring.mail.username=mytime.nisum@gmail.com
#
spring.mail.password=nisum@123
#
spring.mail.properties.mail.smtp.auth=true
#
spring.mail.properties.mail.smtp.starttls.enable=true
#
spring.mail.properties.mail.smtp.starttls.required=true
#Spring boot favicon related
spring.mvc.favicon.enabled
=
false
...
...
@@ -39,9 +39,9 @@ myTeam.data.mssqldb.password=admin@123
#email.leave.notification.template.name=thymeleaf/absentMailTemplate
#email.leave.notification.template.name=absentMailTemplate
email.leave.notification.template.file.path
=
email/absentMailTemplate.html
email.leave.notification.from
=
mytime.nisum@gmail.com
email.leave.notification.subject
=
Employee Leave Email Notification
#
email.leave.notification.template.file.path=email/absentMailTemplate.html
#
email.leave.notification.from=mytime.nisum@gmail.com
#
email.leave.notification.subject=Employee Leave Email Notification
#0 * * * * ?===>for every minute
...
...
@@ -54,7 +54,7 @@ email.leave.notification.subject=Employee Leave Email Notification
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/*
#spring.thymeleaf.view-names:thymeleaf/*
nisummyteam@123
spring.thymeleaf.view-names
:
thymeleaf/*
...
...
src/main/resources/application-production.properties
View file @
659e2d68
...
...
@@ -25,7 +25,7 @@ myteam.localFile.directory=/home/nisum/Documents/
spring.mail.host
=
smtp.gmail.com
spring.mail.port
=
587
spring.mail.username
=
mytime.nisum@gmail.com
spring.mail.password
=
nisum@123
spring.mail.password
=
nisum
myteam
@123
spring.mail.properties.mail.smtp.auth
=
true
spring.mail.properties.mail.smtp.starttls.enable
=
true
spring.mail.properties.mail.smtp.starttls.required
=
true
...
...
src/main/resources/application.properties
View file @
659e2d68
...
...
@@ -24,7 +24,7 @@ myteam.localFile.directory=/home/nisum/Documents/
spring.mail.host
=
smtp.gmail.com
spring.mail.port
=
587
spring.mail.username
=
mytime.nisum@gmail.com
spring.mail.password
=
nisum@123
spring.mail.password
=
nisum
myteam
@123
spring.mail.properties.mail.smtp.auth
=
true
spring.mail.properties.mail.smtp.starttls.enable
=
true
spring.mail.properties.mail.smtp.starttls.required
=
true
...
...
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
659e2d68
...
...
@@ -49,6 +49,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
,
width
:
'*'
},
{
field
:
'functionalGroup'
,
displayName
:
'Func. Org'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
,
cellClass
:
'grid-align'
},
{
field
:
'dateOfJoining'
,
displayName
:
'DOJ'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
,
cellClass
:
'grid-align'
},
{
field
:
'endDate'
,
displayName
:
'DOL'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
,
cellClass
:
'grid-align'
},
{
name
:
'Actions'
,
displayName
:
'Actions'
,
cellTemplate
:
getCellTemplate
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
}
]
};
...
...
@@ -77,6 +78,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
parentData
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
gender
=
row
.
entity
.
gender
;
$scope
.
parentData
.
mobileNumber
=
row
.
entity
.
mobileNumber
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
$scope
.
parentData
.
role
=
row
.
entity
.
role
;
$scope
.
parentData
.
empLocation
=
row
.
entity
.
empLocation
;
...
...
@@ -139,10 +141,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
if
(
$scope
.
status
==
"In Active"
){
$scope
.
gridOptions
.
columnDefs
[
6
].
visible
=
false
;
$scope
.
gridOptions
.
columnDefs
[
10
].
visible
=
true
;
$scope
.
gridOptions
.
columnDefs
[
8
].
visible
=
false
;
}
else
{
$scope
.
gridOptions
.
columnDefs
[
6
].
visible
=
true
;
$scope
.
gridOptions
.
columnDefs
[
10
].
visible
=
false
;
$scope
.
gridOptions
.
columnDefs
[
8
].
visible
=
true
;
}
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
...
...
@@ -263,6 +267,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
empEmail
=
""
;
$scope
.
functionalGroup
;
$scope
.
empStatus
;
$scope
.
empMobileNo
=
""
;
$scope
.
empSubStatus
;
$scope
.
employmentType
;
$scope
.
designation
;
...
...
@@ -286,6 +291,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
empName
=
dataToPass
.
employeeName
;
$scope
.
gender
=
dataToPass
.
gender
;
$scope
.
empRole
=
dataToPass
.
role
;
$scope
.
empMobileNo
=
dataToPass
.
mobileNumber
;
$scope
.
empEmail
=
dataToPass
.
emailId
;
$scope
.
empLocation
=
dataToPass
.
empLocation
;
$scope
.
functionalGroup
=
dataToPass
.
functionalGroup
;
...
...
@@ -398,6 +404,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
validateMessage
=
function
(
type
)
{
var
emailId
=
$scope
.
empEmail
;
var
mobileNumber
=
$scope
.
empMobileNo
;
if
(
type
===
'email'
)
{
if
(
emailId
!=
""
&&
!
validateEmail
(
emailId
))
{
// $scope.alertMsg = "Please enter a valid
...
...
@@ -409,7 +416,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
// $scope.alertMsg = "";
$scope
.
errorMessage
=
false
;
}
}
else
{
}
else
{
$scope
.
errorMessage
=
false
;
}
}
...
...
@@ -424,6 +432,24 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
alertMsg
=
""
;
}
}
$scope
.
validateMobileNumber
=
function
(){
var
empMobileNo
=
$scope
.
empMobileNo
;
if
(
checkMobileNoValue
(
empMobileNo
))
{
$scope
.
alertMsg
=
""
;
document
.
getElementById
(
'empMobileNo'
).
focus
();
}
else
{
$scope
.
alertMsg
=
""
;
}
}
function
checkMobileNoValue
(
empMobileNo
)
{
var
re
=
/^
[
6-9
][
0-9
]{9}
$/
;
if
(
re
.
test
(
empMobileNo
)
&&
empMobileNo
!=
""
)
{
return
false
;
}
else
{
return
true
;
}
}
$scope
.
validateEmailId
=
function
(){
var
emailId
=
$scope
.
empEmail
;
...
...
@@ -511,6 +537,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var
gender
=
$scope
.
gender
;
var
empRole
=
$scope
.
empRole
;
var
empEmail
=
$scope
.
empEmail
;
var
empMobileNo
=
$scope
.
empMobileNo
;
var
designation
=
$scope
.
designation
;
var
empLocation
=
$scope
.
empLocation
;
var
employmentType
=
$scope
.
employmentType
;
...
...
@@ -555,6 +582,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
else
if
(
gender
==
""
)
{
$scope
.
alertMsg
=
"Gender is mandatory"
;
document
.
getElementById
(
'gender'
).
focus
();
}
else
if
(
empMobileNo
==
""
)
{
$scope
.
alertMsg
=
"Mobile Number is mandatory"
;
document
.
getElementById
(
'empMobileNo'
).
focus
();
}
else
if
(
checkMobileNoValue
(
empMobileNo
)){
$scope
.
alertMsg
=
"Please enter a valid ten digit mobile number"
;
document
.
getElementById
(
'empMobileNo'
).
focus
();
}
else
if
(
empEmail
==
""
)
{
$scope
.
alertMsg
=
"Email ID is mandatory"
;
document
.
getElementById
(
'empEmail'
).
focus
();
...
...
@@ -631,7 +664,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
alertMsg
=
"Start date should not be greater than end date"
;
}
else
{
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"
mobileNumber"
:
$scope
.
empMobileNo
,
"
emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
,
"empLocation"
:
$scope
.
empLocation
,
"designation"
:
$scope
.
designation
,
"functionalGroup"
:
$scope
.
functionalGroup
,
"empStatus"
:
$scope
.
empStatus
,
"employmentType"
:
$scope
.
employmentType
,
"dateOfJoining"
:
$scope
.
dateOfJoining
,
"dateOfBirth"
:
$scope
.
dateOfBirth
,
"hasPassort"
:
$scope
.
hasPassort
,
"hasB1"
:
$scope
.
hasB1
,
"passportExpiryDate"
:
$scope
.
passportExpiryDate
,
...
...
@@ -642,7 +675,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
500
);
}
else
{
var
recordFromDb
=
{
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"emailId"
:
dataToPass
.
emailId
,
var
recordFromDb
=
{
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"
mobileNumber"
:
dataToPass
.
mobileNumber
,
"
emailId"
:
dataToPass
.
emailId
,
"role"
:
dataToPass
.
role
,
"empLocation"
:
dataToPass
.
empLocation
,
"designation"
:
dataToPass
.
designation
,
"functionalGroup"
:
dataToPass
.
functionalGroup
,
"empStatus"
:
dataToPass
.
empStatus
,
"empSubStatus"
:
dataToPass
.
empSubStatus
,
"employmentType"
:
dataToPass
.
employmentType
,
"dateOfJoining"
:
new
Date
(
dataToPass
.
dateOfJoining
),
"dateOfBirth"
:
new
Date
(
dataToPass
.
dateOfBirth
),
"hasPassort"
:
dataToPass
.
hasPassort
,
"hasB1"
:
dataToPass
.
hasB1
,
"passportExpiryDate"
:
new
Date
(
dataToPass
.
passportExpiryDate
),
...
...
@@ -711,14 +744,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
toDate
:
(
dataToPass
.
subStatusEndDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
subStatusEndDate
)
};
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"
mobileNumber"
:
$scope
.
empMobileNo
,
"
emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
,
"empLocation"
:
$scope
.
empLocation
,
"designation"
:
$scope
.
designation
,
"functionalGroup"
:
$scope
.
functionalGroup
,
"empStatus"
:
$scope
.
empStatus
,
"empSubStatus"
:
$scope
.
empSubStatus
,
"employmentType"
:
$scope
.
employmentType
,
"dateOfJoining"
:
$scope
.
dateOfJoining
,
"dateOfBirth"
:
$scope
.
dateOfBirth
,
"hasPassort"
:
$scope
.
hasPassort
,
"hasB1"
:
$scope
.
hasB1
,
"passportExpiryDate"
:
$scope
.
passportExpiryDate
,
"b1ExpiryDate"
:
$scope
.
b1ExpiryDate
,
"endDate"
:
$scope
.
exitDate
,
"empSubStatus"
:
empSubStatusObj
};
var
recordFromDb
=
{
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"emailId"
:
dataToPass
.
emailId
,
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"
mobileNumber"
:
dataToPass
.
mobileNumber
,
"
emailId"
:
dataToPass
.
emailId
,
"role"
:
dataToPass
.
role
,
"empLocation"
:
dataToPass
.
empLocation
,
"designation"
:
dataToPass
.
designation
,
"functionalGroup"
:
dataToPass
.
functionalGroup
,
"empStatus"
:
dataToPass
.
empStatus
,
"empSubStatus"
:
dataToPass
.
empSubStatus
,
"employmentType"
:
dataToPass
.
employmentType
,
"dateOfJoining"
:
new
Date
(
dataToPass
.
dateOfJoining
),
"dateOfBirth"
:
new
Date
(
dataToPass
.
dateOfBirth
),
"hasPassort"
:
dataToPass
.
hasPassort
,
"hasB1"
:
dataToPass
.
hasB1
,
"passportExpiryDate"
:
new
Date
(
dataToPass
.
passportExpiryDate
),
...
...
src/main/webapp/WEB-INF/controllers/OpenPoolController.js
View file @
659e2d68
...
...
@@ -87,6 +87,7 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
$mdDialog
.
hide
();
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
...
...
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
659e2d68
...
...
@@ -39,7 +39,13 @@
<md-option
ng-model=
"gender"
value=
"Male"
>
Male
</md-option>
<md-option
ng-model=
"gender"
value=
"Female"
>
Female
</md-option></md-optgroup>
</md-select></td>
</tr>
<tr>
<td
colspan=
"4"
><b>
Mobile No:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"empMobileNo"
name=
"mobileNo"
ng-model=
"empMobileNo"
placeholder=
"Mobile No"
ng-blur=
"validateMobileNumber()"
style=
"text-transform: lowercase;"
/>
</tr>
<tr>
<td
colspan=
"4"
><b>
Email:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
...
...
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