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
7a6fdf36
Commit
7a6fdf36
authored
Jan 17, 2020
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Utilization Reports Enhancements
parent
2dae5af4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
28 deletions
+37
-28
EmployeeService.java
...n/java/com/nisum/myteam/service/impl/EmployeeService.java
+2
-3
ResourceService.java
...n/java/com/nisum/myteam/service/impl/ResourceService.java
+9
-8
ChartsController.js
src/main/webapp/WEB-INF/controllers/ChartsController.js
+16
-5
custom-theme.css
src/main/webapp/WEB-INF/css/custom-theme.css
+7
-9
charts.html
src/main/webapp/WEB-INF/templates/charts.html
+3
-3
No files found.
src/main/java/com/nisum/myteam/service/impl/EmployeeService.java
View file @
7a6fdf36
...
...
@@ -165,9 +165,8 @@ public class EmployeeService implements IEmployeeService {
// }
@Override
@Transactional
public
Employee
updateEmployee
(
Employee
employeeReq
,
String
loginEmpId
)
throws
ParseException
{
response
.
put
(
"messege"
,
"Employee has been updated"
);
// update all emp details to inactive if employee is inactive
Query
query
=
new
Query
(
Criteria
.
where
(
"employeeId"
).
is
(
employeeReq
.
getEmployeeId
()));
Update
update
=
new
Update
();
...
...
@@ -245,7 +244,7 @@ public class EmployeeService implements IEmployeeService {
if
(
employeeReq
.
getEmpStatus
().
equals
(
"In Active"
)){
resourceService
.
makeResourceInactive
(
employeeReq
.
getEmployeeId
(),
employeeReq
.
getEndDate
());
}
response
.
put
(
"messege"
,
"Employee has been updated"
);
return
employeeUpdated
;
}
...
...
src/main/java/com/nisum/myteam/service/impl/ResourceService.java
View file @
7a6fdf36
...
...
@@ -1142,15 +1142,16 @@ public class ResourceService implements IResourceService {
@Override
public
Resource
makeResourceInactive
(
String
employeeId
,
Date
endDate
){
Resource
latestAllocation
=
this
.
getLatestResourceByEmpId
(
employeeId
);
Resource
currentAllocation
=
this
.
getCurrentAllocationIfNotReturnNull
(
employeeId
);
if
(
Objects
.
nonNull
(
latestAllocation
)
&&
latestAllocation
.
getBillingStartDate
().
compareTo
(
new
Date
())>
0
){
resourceRepo
.
delete
(
latestAllocation
);
Resource
futureAllocation
=
resourceRepo
.
findOneByEmployeeIdAndStatus
(
employeeId
,
MyTeamUtils
.
STATUS_PROPOSED
);
Resource
currentAllocation
=
resourceRepo
.
findOneByEmployeeIdAndStatus
(
employeeId
,
MyTeamUtils
.
STATUS_ENGAGED
);
if
(
Objects
.
nonNull
(
futureAllocation
)){
resourceRepo
.
delete
(
futureAllocation
);
}
if
(
Objects
.
nonNull
(
currentAllocation
))
{
currentAllocation
.
setBillingEndDate
(
endDate
);
currentAllocation
.
setStatus
(
MyTeamUtils
.
STATUS_RELEASED
);
resourceRepo
.
save
(
currentAllocation
);
}
currentAllocation
.
setBillingEndDate
(
endDate
);
latestAllocation
.
setBillingEndDate
(
endDate
);
resourceRepo
.
save
(
currentAllocation
);
resourceRepo
.
save
(
latestAllocation
);
return
null
;
}
}
\ No newline at end of file
src/main/webapp/WEB-INF/controllers/ChartsController.js
View file @
7a6fdf36
...
...
@@ -16,7 +16,7 @@ myApp.directive('hcPieChart', function () {
if
(
reportType
&&
searchedDate
)
{
scope
.
errorMessage
=
false
;
if
(
reportType
==
"Monthly Trends"
){
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/getBillabilityDetailsByMonth'
,
'line'
,
element
,
"
Billability Monthly Trends"
);
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/getBillabilityDetailsByMonth'
,
'line'
,
element
,
"Billability Monthly Trends"
);
}
else
{
if
(
reportType
==
'I&A'
){
...
...
@@ -54,7 +54,8 @@ myApp.directive('hcPieChart', function () {
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"functionalGroups/getAllFunctionalGroups"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
reportTypeList
=
$scope
.
reportTypeList
.
concat
(
response
.
data
.
records
);
let
functionalGrpsList
=
$scope
.
reportTypeList
.
concat
(
response
.
data
.
records
);
$scope
.
reportTypeList
=
functionalGrpsList
.
filter
(
e
=>
e
!==
'Delivery Org'
&&
e
!==
'Global Mobility'
);
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -126,7 +127,8 @@ myApp.directive('hcPieChart', function () {
$scope
.
getMyTeamDetails
=
function
(
seriesName
,
category
,
optionName
,
title
){
let
searchedDate
=
getFormattedDate
(
$scope
.
searchedReportDate
);
if
(
title
.
trim
()
==
'Billability For All Functional Group'
){
if
(
title
.
trim
()
==
'Billability For All Functional Group On '
+
searchedDate
||
title
.
trim
()
==
'Billability For All Functional Group On Today'
){
if
(
category
==
'I&A'
){
category
=
'I%26A'
;
}
...
...
@@ -145,7 +147,8 @@ myApp.directive('hcPieChart', function () {
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
}
else
if
(
title
.
trim
()
==
'Billability For Account'
){
}
else
if
(
title
.
trim
()
==
'Billability For Account On '
+
searchedDate
||
title
.
trim
()
==
'Billability For Account On Today'
){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"reports/fetchEmployeeDetailsByAccountBillability?account="
+
category
+
"&billabilityStatus="
+
seriesName
+
"&onDate="
+
searchedDate
...
...
@@ -284,6 +287,14 @@ myApp.directive('hcPieChart', function () {
function
getEmployeeDetails
(
scope
,
uri
,
chart
,
element
,
title
){
var
result
=
[];
var
categoriesList
=
[];
let
displayTitle
=
''
;
if
(
title
===
'Billability Monthly Trends'
)
{
displayTitle
=
title
;
}
else
{
displayTitle
=
getFormattedDate
(
scope
.
searchedReportDate
)
==
getFormattedDate
(
new
Date
())
?
title
+
" On Today"
:
title
+
" On "
+
getFormattedDate
(
scope
.
searchedReportDate
);
}
Highcharts
.
ajax
({
url
:
uri
,
success
:
function
(
data
)
{
...
...
@@ -294,7 +305,7 @@ var categoriesList = [];
result
=
data
;
categoriesList
=
data
;
}
scope
.
drawChart
(
element
,
chart
,
result
,
t
itle
,
categoriesList
);
scope
.
drawChart
(
element
,
chart
,
result
,
displayT
itle
,
categoriesList
);
}
});
}
...
...
src/main/webapp/WEB-INF/css/custom-theme.css
View file @
7a6fdf36
...
...
@@ -715,14 +715,17 @@ cursor: pointer;
.manage-open-pool
{
height
:
calc
(
100vh
-
239px
)
!important
;
}
.add-space
{
margin
:
20px
0
10px
0
;
.select-report-date-container
{
margin
:
20px
0
10px
0
;
}
.select-report-date-container
>
div
{
margin
:
25px
0
10px
0
;
}
.search-report-date
{
padding-left
:
0
;
}
.search-report-date
.md-datepicker-input-container
{
width
:
7
4
%
;
width
:
7
2
%
;
margin
:
0
;
}
...
...
@@ -732,18 +735,13 @@ margin: 20px 0 10px 0;
.report-type-selectbox
{
padding-right
:
0
;
}
.date-container
{
margin-top
:
25px
;
}
.select-report-type
md-select
{
margin
:
0
;
}
.report-type-label
{
padding-right
:
0
;
}
.report-search-date-label
{
padding
:
0
0
0
8px
;
}
.search-report-btn
{
margin-left
:
15px
;
padding
:
4px
;
...
...
src/main/webapp/WEB-INF/templates/charts.html
View file @
7a6fdf36
...
...
@@ -8,7 +8,7 @@
<div
class =
"col-lg-6 col-md-6"
>
<hc-pie-chart
title=
"Browser usage"
data=
"pieData"
options=
"chartOptions"
>
Placeholder for pie chart
</hc-pie-chart>
</div>
<div
class=
"col-lg-6 col-md-6
add-space
"
>
<div
class=
"col-lg-6 col-md-6
select-report-date-container
"
>
<div
class=
"row add-space"
>
<div
class=
"col-lg-4 col-md-4"
></div>
<div
class=
"col-lg-8 col-md-8"
>
...
...
@@ -22,7 +22,7 @@
</div>
</div>
</div>
<div
class=
"row
date-container
"
>
<div
class=
"row"
>
<div
class=
"col-lg-4 col-md-4"
></div>
<div
class=
"col-lg-8 col-md-8 select-report-type"
>
<div
class=
"row"
>
...
...
@@ -38,7 +38,7 @@
</div>
</div>
</div>
<div
class=
"row
date-container
"
>
<div
class=
"row"
>
<div
class=
"col-lg-4 col-md-4"
></div>
<div
class=
"col-lg-8 col-md-3"
>
<div
class=
"row"
>
...
...
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