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
7847d4ec
Commit
7847d4ec
authored
May 06, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added_Employee_SubStatus
parent
cc066d2d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
83 additions
and
14 deletions
+83
-14
Employee.java
src/main/java/com/nisum/myteam/model/dao/Employee.java
+3
-0
EmployeeRepo.java
src/main/java/com/nisum/myteam/repository/EmployeeRepo.java
+2
-0
EmployeeService.java
...n/java/com/nisum/myteam/service/impl/EmployeeService.java
+14
-5
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+30
-8
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+1
-0
custom-theme.css
src/main/webapp/WEB-INF/css/custom-theme.css
+21
-0
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+9
-0
roles.html
src/main/webapp/WEB-INF/templates/roles.html
+3
-1
No files found.
src/main/java/com/nisum/myteam/model/dao/Employee.java
View file @
7847d4ec
...
...
@@ -91,6 +91,9 @@ public class Employee implements Serializable {
@ExcelCellName
(
"Employment Status"
)
private
String
empStatus
;
@ExcelCellName
(
"Employment Sub Status"
)
private
String
empSubStatus
;
@ExcelCellName
(
"Employment Type"
)
private
String
employmentType
;
...
...
src/main/java/com/nisum/myteam/repository/EmployeeRepo.java
View file @
7847d4ec
...
...
@@ -25,5 +25,7 @@ public interface EmployeeRepo
List
<
Employee
>
findByEmployeeIdIn
(
Set
<
String
>
empIdsSet
);
List
<
Employee
>
findByEmpSubStatusOrderByEmployeeNameAsc
(
String
subStatus
);
}
src/main/java/com/nisum/myteam/service/impl/EmployeeService.java
View file @
7847d4ec
...
...
@@ -77,6 +77,7 @@ public class EmployeeService implements IEmployeeService {
update
.
set
(
"gender"
,
employeeReq
.
getGender
());
update
.
set
(
"functionalGroup"
,
employeeReq
.
getFunctionalGroup
());
update
.
set
(
"empStatus"
,
employeeReq
.
getEmpStatus
());
update
.
set
(
"empSubStatus"
,
employeeReq
.
getEmpSubStatus
());
update
.
set
(
"employmentType"
,
employeeReq
.
getEmploymentType
());
update
.
set
(
"empLocation"
,
employeeReq
.
getEmpLocation
());
update
.
set
(
"domain"
,
employeeReq
.
getDomain
());
...
...
@@ -213,11 +214,19 @@ public class EmployeeService implements IEmployeeService {
@Override
public
List
<
Employee
>
getEmployeesByStatus
(
String
status
)
{
if
(
status
.
equals
(
"both"
))
{
return
employeeRepo
.
findAll
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"employeeName"
));
}
else
{
return
employeeRepo
.
findByEmpStatusOrderByEmployeeNameAsc
(
status
);
}
if
(
status
.
equals
(
"all"
))
{
return
employeeRepo
.
findAll
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"employeeName"
));
}
else
if
(
status
.
equals
(
"Vacation"
))
{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"empSubStatus"
).
ne
(
"Resigned"
).
andOperator
(
Criteria
.
where
(
"empSubStatus"
).
ne
(
null
)));
return
mongoTemplate
.
find
(
query
,
Employee
.
class
);
}
else
if
(
status
.
equals
(
"Resigned"
))
{
return
employeeRepo
.
findByEmpSubStatusOrderByEmployeeNameAsc
(
"Resigned"
);
}
else
{
return
employeeRepo
.
findByEmpStatus
(
status
);
}
}
@Override
...
...
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
7847d4ec
...
...
@@ -22,9 +22,25 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
enableFiltering
:
true
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Employee ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
,
cellClass
:
'grid-align'
},
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
},
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
,
width
:
130
},
{
field
:
'mobileNumber'
,
displayName
:
'Mobile'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellClass
:
'grid-align'
},
{
field
:
'emailId'
,
displayName
:
'Email'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
},
{
field
:
'empStatus'
,
displayName
:
'Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
80
},
{
field
:
'empSubStatus'
,
displayName
:
'Sub Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
,
cellClass
:
function
(
grid
,
row
,
col
){
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Maternity Leave'
)
{
return
'blue'
;
}
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Onsite Travel'
)
{
return
'green'
;
}
else
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Long Leave'
)
{
return
'orange'
;
}
else
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Resigned'
)
{
return
'red'
;
}
}},
{
field
:
'emailId'
,
displayName
:
'Email'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
,
width
:
140
},
{
field
:
'baseTechnology'
,
displayName
:
'Skill'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellClass
:
'grid-align'
},
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
false
,
cellClass
:
'grid-align'
},
{
name
:
'Actions'
,
displayName
:
'Actions'
,
cellTemplate
:
getCellTemplate
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
,
cellClass
:
'grid-align'
}
...
...
@@ -58,7 +74,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
parentData
.
empLocation
=
row
.
entity
.
empLocation
;
$scope
.
parentData
.
designation
=
row
.
entity
.
designation
;
$scope
.
parentData
.
functionalGroup
=
row
.
entity
.
functionalGroup
;
$scope
.
parentData
.
empStatus
=
row
.
entity
.
empStatus
;
$scope
.
parentData
.
empStatus
=
row
.
entity
.
empStatus
;
$scope
.
parentData
.
empSubStatus
=
row
.
entity
.
empSubStatus
;
$scope
.
parentData
.
employmentType
=
row
.
entity
.
employmentType
;
$scope
.
parentData
.
domain
=
row
.
entity
.
domain
;
$scope
.
parentData
.
dateOfJoining
=
row
.
entity
.
dateOfJoining
;
...
...
@@ -112,9 +129,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
if
(
$scope
.
status
==
"In Active"
){
$scope
.
gridOptions
.
columnDefs
[
6
].
visible
=
false
;
$scope
.
gridOptions
.
columnDefs
[
8
].
visible
=
false
;
}
else
{
$scope
.
gridOptions
.
columnDefs
[
6
].
visible
=
true
;
$scope
.
gridOptions
.
columnDefs
[
8
].
visible
=
true
;
}
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
},
function
myError
(
response
)
{
...
...
@@ -226,9 +245,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
gender
=
""
;
$scope
.
empRole
;
$scope
.
empEmail
=
""
;
$scope
.
functionalGroup
;
$scope
.
empStatus
;
$scope
.
empSubStatus
;
$scope
.
employmentType
;
$scope
.
designation
;
$scope
.
empLocation
;
...
...
@@ -246,6 +265,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
empLocation
=
dataToPass
.
empLocation
;
$scope
.
functionalGroup
=
dataToPass
.
functionalGroup
;
$scope
.
empStatus
=
dataToPass
.
empStatus
;
$scope
.
empSubStatus
=
dataToPass
.
empSubStatus
;
$scope
.
employmentType
=
dataToPass
.
employmentType
;
$scope
.
domain
=
dataToPass
.
domain
;
$scope
.
designation
=
dataToPass
.
designation
;
...
...
@@ -265,6 +285,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
functionalGroups
=
myFactory
.
getFunctionalgroups
();
$scope
.
employmentTypes
=
myFactory
.
getEmployementTypes
();
$scope
.
empStatuses
=
myFactory
.
getEmployeeStatus
();
$scope
.
empSubStatuses
=
myFactory
.
getEmployeeSubStatus
();
$scope
.
getSelectedRole
=
function
(){
if
(
$scope
.
empRole
!==
undefined
)
{
return
$scope
.
empRole
;
...
...
@@ -423,6 +444,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var
hasPassort
=
$scope
.
hasPassort
;
var
hasB1
=
$scope
.
hasB1
;
var
empStatus
=
$scope
.
empStatus
;
var
empSubStatus
=
$scope
.
empSubStatus
;
var
dateOfJoining
=
$scope
.
dateOfJoining
;
var
dateOfBirth
=
$scope
.
dateOfBirth
;
var
b1ExpiryDate
=
$scope
.
b1ExpiryDate
;
...
...
@@ -511,7 +533,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
,
"empLocation"
:
$scope
.
empLocation
,
"designation"
:
$scope
.
designation
,
"functionalGroup"
:
$scope
.
functionalGroup
,
"empStatus"
:
$scope
.
empStatus
,
"employmentType"
:
$scope
.
employmentType
,
"dateOfJoining"
:
$scope
.
dateOfJoining
,
"empStatus"
:
$scope
.
empStatus
,
"emp
SubStatus"
:
$scope
.
empSubStatus
,
"emp
loymentType"
:
$scope
.
employmentType
,
"dateOfJoining"
:
$scope
.
dateOfJoining
,
"dateOfBirth"
:
$scope
.
dateOfBirth
,
"hasPassort"
:
$scope
.
hasPassort
,
"hasB1"
:
$scope
.
hasB1
,
"passportExpiryDate"
:
$scope
.
passportExpiryDate
,
"b1ExpiryDate"
:
$scope
.
b1ExpiryDate
,
"endDate"
:
$scope
.
exitDate
};
...
...
@@ -522,7 +544,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
else
{
var
recordFromDb
=
{
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"emailId"
:
dataToPass
.
emailId
,
"role"
:
dataToPass
.
role
,
"empLocation"
:
dataToPass
.
empLocation
,
"designation"
:
dataToPass
.
designation
,
"functionalGroup"
:
dataToPass
.
functionalGroup
,
"empStatus"
:
dataToPass
.
empStatus
,
"employmentType"
:
dataToPass
.
employmentType
,
"dateOfJoining"
:
new
Date
(
dataToPass
.
dateOfJoining
),
"empStatus"
:
dataToPass
.
empStatus
,
"emp
SubStatus"
:
dataToPass
.
empSubStatus
,
"emp
loymentType"
:
dataToPass
.
employmentType
,
"dateOfJoining"
:
new
Date
(
dataToPass
.
dateOfJoining
),
"dateOfBirth"
:
new
Date
(
dataToPass
.
dateOfBirth
),
"hasPassort"
:
dataToPass
.
hasPassort
,
"hasB1"
:
dataToPass
.
hasB1
,
"passportExpiryDate"
:
new
Date
(
dataToPass
.
passportExpiryDate
),
"b1ExpiryDate"
:
new
Date
(
dataToPass
.
b1ExpiryDate
),
"endDate"
:
new
Date
(
dataToPass
.
endDate
)
};
...
...
@@ -579,14 +601,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
,
"empLocation"
:
$scope
.
empLocation
,
"designation"
:
$scope
.
designation
,
"functionalGroup"
:
$scope
.
functionalGroup
,
"empStatus"
:
$scope
.
empStatus
,
"employmentType"
:
$scope
.
employmentType
,
"dateOfJoining"
:
$scope
.
dateOfJoining
,
"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
};
var
recordFromDb
=
{
"employeeId"
:
dataToPass
.
employeeId
,
"employeeName"
:
dataToPass
.
employeeName
,
"gender"
:
dataToPass
.
gender
,
"emailId"
:
dataToPass
.
emailId
,
"role"
:
dataToPass
.
role
,
"empLocation"
:
dataToPass
.
empLocation
,
"designation"
:
dataToPass
.
designation
,
"functionalGroup"
:
dataToPass
.
functionalGroup
,
"empStatus"
:
dataToPass
.
empStatus
,
"employmentType"
:
dataToPass
.
employmentType
,
"dateOfJoining"
:
new
Date
(
dataToPass
.
dateOfJoining
),
"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
),
"b1ExpiryDate"
:
new
Date
(
dataToPass
.
b1ExpiryDate
),
"endDate"
:
new
Date
(
dataToPass
.
endDate
)
};
...
...
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
7847d4ec
...
...
@@ -66,6 +66,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
myFactory
.
setEmployementTypes
(
response
.
data
[
'EmpType'
]);
myFactory
.
setFunctionalgroups
(
response
.
data
[
'FunctionalGrp'
])
myFactory
.
setEmployeeStatus
(
response
.
data
[
'EmployeeStatus'
]);
myFactory
.
setEmployeeSubStatus
(
response
.
data
[
'EmployeeSubStatus'
]);
myFactory
.
setRoles
(
response
.
data
[
'roles'
]);
myFactory
.
setShifts
(
response
.
data
[
'shifts'
]);
myFactory
.
setDomains
(
response
.
data
[
'domains'
]);
...
...
src/main/webapp/WEB-INF/css/custom-theme.css
View file @
7847d4ec
...
...
@@ -525,4 +525,25 @@ top: 22px;
.md-datepicker-is-showing
.md-scroll-mask
{
position
:
fixed
;
z-index
:
inherit
;
}
.red
{
background-color
:
red
!important
;
color
:
white
;
font-weight
:
bold
;
}
.orange
{
background-color
:
orange
!important
;
color
:
white
;
font-weight
:
bold
;
}
.blue
{
background-color
:
blue
!important
;
color
:
white
;
font-weight
:
bold
;
}
.green
{
background-color
:
green
!important
;
color
:
white
;
font-weight
:
bold
;
}
\ No newline at end of file
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
7847d4ec
...
...
@@ -72,6 +72,15 @@
ng-value=
"status"
ng-repeat=
"status in empStatuses"
>
{{status}}
</md-option>
</md-optgroup>
</md-select></td>
</tr>
<tr
ng-show=
"empStatus == 'Active'"
>
<td
colspan=
"4"
><b>
Select Sub Status :
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"empSubStatus"
name =
"empSubStatus"
ng-model =
"empSubStatus"
placeholder =
"Select a Status Type"
id=
"empSubStatus"
>
<md-optgroup
label=
"Sub Status Type"
>
<md-option
ng-value =
"None"
>
None
</md-option>
<md-option
ng-value=
"status"
ng-repeat=
"status in empSubStatuses"
>
{{status}}
</md-option>
</md-optgroup>
</md-select></td>
</tr>
<tr
ng-show=
"empStatus == 'In Active'"
>
<td
colspan=
"4"
><b>
Employee Exit Date:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-datepicker
ng-model=
"exitDate"
name=
"endDate"
...
...
src/main/webapp/WEB-INF/templates/roles.html
View file @
7847d4ec
...
...
@@ -9,7 +9,9 @@
<span>
<input
type=
"radio"
ng-model=
"status"
value=
"Active"
ng-click=
"getUserRoles()"
>
Active
<input
type=
"radio"
ng-model=
"status"
value=
"In Active"
ng-click=
"getUserRoles()"
>
Inactive
<input
type=
"radio"
ng-model=
"status"
value=
"both"
ng-click=
"getUserRoles()"
>
Both
<input
type=
"radio"
ng-model=
"status"
value=
"Vacation"
ng-click=
"getUserRoles()"
>
Vacation
<input
type=
"radio"
ng-model=
"status"
value=
"Resigned"
ng-click=
"getUserRoles()"
>
Resigned
<input
type=
"radio"
ng-model=
"status"
value=
"all"
ng-click=
"getUserRoles()"
>
All
</span>
<label
class=
""
for=
"submitBtn"
>
</label>
<md-button
...
...
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