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
d40cd400
Commit
d40cd400
authored
Jun 26, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Substatus Report Screen
parent
e392dd8e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
229 additions
and
2 deletions
+229
-2
EmployeeController.java
.../java/com/nisum/myteam/controller/EmployeeController.java
+1
-1
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+3
-0
SubStatusReportController.js
...n/webapp/WEB-INF/controllers/SubStatusReportController.js
+155
-0
custom-theme.css
src/main/webapp/WEB-INF/css/custom-theme.css
+11
-1
index.html
src/main/webapp/WEB-INF/templates/index.html
+1
-0
subStatusReport.html
src/main/webapp/WEB-INF/templates/subStatusReport.html
+58
-0
No files found.
src/main/java/com/nisum/myteam/controller/EmployeeController.java
View file @
d40cd400
...
@@ -285,7 +285,7 @@ public class EmployeeController {
...
@@ -285,7 +285,7 @@ public class EmployeeController {
@RequestMapping
(
value
=
"/employeesBasedOnSubStatusForGivenDates"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
@RequestMapping
(
value
=
"/employeesBasedOnSubStatusForGivenDates"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<?>
employeesBasedOnSubStatusForGivenDates
(
@RequestParam
(
"fromDate"
)
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
Date
fromDate
,
public
ResponseEntity
<?>
employeesBasedOnSubStatusForGivenDates
(
@RequestParam
(
"fromDate"
)
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
Date
fromDate
,
@RequestParam
(
"
from
Date"
)
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
Date
toDate
,
@RequestParam
(
"
to
Date"
)
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
Date
toDate
,
@RequestParam
(
"subStatus"
)
String
subStatus
,
@RequestParam
(
"subStatus"
)
String
subStatus
,
HttpServletRequest
request
){
HttpServletRequest
request
){
List
<
EmployeeSubStatusVO
>
employees
=
subStatusService
.
employeesBasedOnSubStatusForGivenDates
(
fromDate
,
toDate
,
subStatus
);
List
<
EmployeeSubStatusVO
>
employees
=
subStatusService
.
employeesBasedOnSubStatusForGivenDates
(
fromDate
,
toDate
,
subStatus
);
...
...
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
d40cd400
...
@@ -266,6 +266,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -266,6 +266,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems
.
push
({
"menu"
:
"Employee Efforts"
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Employee Efforts"
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"SubStatus Report"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/subStatusReport.html"
});
}
else
if
(
role
==
"Delivery Lead"
){
}
else
if
(
role
==
"Delivery Lead"
){
//menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
//menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
//menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
//menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
...
@@ -304,6 +305,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -304,6 +305,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems
.
push
({
"menu"
:
"Employee Efforts "
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Employee Efforts "
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"SubStatus Report"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/subStatusReport.html"
});
}
else
if
(
role
==
"Lead"
){
}
else
if
(
role
==
"Lead"
){
menuItems
.
push
({
"menu"
:
"My Team"
,
"icon"
:
"fa fa-futbol-o fa-2x"
,
"path"
:
"templates/myTeam.html"
});
menuItems
.
push
({
"menu"
:
"My Team"
,
"icon"
:
"fa fa-futbol-o fa-2x"
,
"path"
:
"templates/myTeam.html"
});
menuItems
.
push
({
"menu"
:
"Reportee Login Details"
,
"icon"
:
"fa fa-users fa-2x"
,
"path"
:
"templates/reportees.html"
});
menuItems
.
push
({
"menu"
:
"Reportee Login Details"
,
"icon"
:
"fa fa-users fa-2x"
,
"path"
:
"templates/reportees.html"
});
...
@@ -335,6 +337,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -335,6 +337,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems
.
push
({
"menu"
:
"Employee Efforts"
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Employee Efforts"
,
"icon"
:
"fa fa-user-circle-o fa-2x"
,
"path"
:
"templates/employeeEfforts.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Reserved Reports"
,
"icon"
:
"fa fa-file-pdf-o fa-2x"
,
"path"
:
"templates/reservedReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"Allocation Change"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/allocationChangeReport.html"
});
menuItems
.
push
({
"menu"
:
"SubStatus Report"
,
"icon"
:
"fa fa-file-excel-o fa-2x"
,
"path"
:
"templates/subStatusReport.html"
});
}
else
{
}
else
{
menuItems
.
push
({
"menu"
:
"My Team"
,
"icon"
:
"fa fa-futbol-o fa-2x"
,
"path"
:
"templates/myTeam.html"
});
menuItems
.
push
({
"menu"
:
"My Team"
,
"icon"
:
"fa fa-futbol-o fa-2x"
,
"path"
:
"templates/myTeam.html"
});
menuItems
.
push
({
"menu"
:
"My Project Allocations"
,
"icon"
:
"fa fa-life-ring fa-2x"
,
"path"
:
"templates/myProjectAllocations.html"
});
menuItems
.
push
({
"menu"
:
"My Project Allocations"
,
"icon"
:
"fa fa-life-ring fa-2x"
,
"path"
:
"templates/myProjectAllocations.html"
});
...
...
src/main/webapp/WEB-INF/controllers/SubStatusReportController.js
0 → 100644
View file @
d40cd400
myApp
.
controller
(
"subStatusController"
,
function
(
$scope
,
$http
,
myFactory
,
$mdDialog
,
appConfig
)
{
$scope
.
records
=
[];
$scope
.
empSubStatuses
=
myFactory
.
getEmployeeSubStatus
();
if
(
$scope
.
empSubStatuses
.
indexOf
(
"All"
)
==
"-1"
){
$scope
.
empSubStatuses
.
unshift
(
"All"
);
}
// Date picker related code
var
today
=
new
Date
();
var
priorDt
=
today
;
$scope
.
maxDate
=
today
;
$scope
.
fromDate
=
priorDt
;
$scope
.
toDate
=
today
;
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
pageSize
:
10
,
enableFiltering
:
true
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Employee ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
'*'
},
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
},
{
field
:
'subStatus'
,
displayName
:
'Sub Status'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
},
{
field
:
'subStatusStartDate'
,
displayName
:
'From Date'
,
enableColumnMenu
:
false
,
enableFiltering
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
},
{
field
:
'subStatusEndDate'
,
displayName
:
'To Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Group'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
enableFiltering
:
true
,
width
:
'*'
}
],
enableGridMenu
:
true
,
enableSelectAll
:
true
,
exporterMenuExcel
:
false
,
exporterMenuCsv
:
false
,
exporterCsvFilename
:
'SubStatusReport.csv'
,
exporterExcelFilename
:
'SubStatusReport'
,
exporterPdfDefaultStyle
:
{
fontSize
:
9
},
exporterPdfTableStyle
:
{
margin
:
[
15
,
15
,
15
,
15
]},
exporterPdfTableHeaderStyle
:
{
fontSize
:
10
,
bold
:
true
,
italics
:
true
,
color
:
'red'
},
exporterPdfHeader
:
{
text
:
"Employee SubStatus Report"
,
style
:
'headerStyle'
},
exporterPdfFooter
:
function
(
currentPage
,
pageCount
)
{
return
{
text
:
currentPage
.
toString
()
+
' of '
+
pageCount
.
toString
(),
style
:
'footerStyle'
};
},
exporterPdfCustomFormatter
:
function
(
docDefinition
)
{
docDefinition
.
styles
.
headerStyle
=
{
fontSize
:
22
,
bold
:
true
};
docDefinition
.
styles
.
footerStyle
=
{
fontSize
:
10
,
bold
:
true
};
return
docDefinition
;
},
exporterPdfOrientation
:
'portrait'
,
exporterPdfPageSize
:
'LETTER'
,
exporterPdfMaxGridWidth
:
500
,
exporterCsvLinkElement
:
angular
.
element
(
document
.
querySelectorAll
(
".custom-csv-link-location"
)),
onRegisterApi
:
function
(
gridApi
){
$scope
.
gridApi
=
gridApi
;
},
gridMenuCustomItems
:
[{
title
:
'Export all data as EXCEL'
,
action
:
function
(
$event
)
{
exportUiGridService
.
exportToExcel
(
'sheet 1'
,
$scope
.
gridApi
,
'all'
,
'all'
);
},
order
:
110
},
{
title
:
'Export visible data as EXCEL'
,
action
:
function
(
$event
)
{
exportUiGridService
.
exportToExcel
(
'sheet 1'
,
$scope
.
gridApi
,
'visible'
,
'visible'
);
},
order
:
111
}
]
};
$scope
.
gridOptions
.
data
=
[];
$scope
.
getSubStatusDetails
=
function
(){
var
fromDate
=
getFormattedDate
(
$scope
.
fromDate
);
var
toDate
=
getFormattedDate
(
$scope
.
toDate
);
var
empSubStatusV
=
$scope
.
empSubStatusValue
;
if
(
empSubStatusV
==
undefined
||
empSubStatusV
==
""
){
empSubStatusV
=
"All"
;
}
$scope
.
empSubStatusValue
=
empSubStatusV
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
'employeesBasedOnSubStatusForGivenDates?fromDate='
+
fromDate
+
'&toDate='
+
toDate
+
'&subStatus='
+
$scope
.
empSubStatusValue
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
};
$scope
.
getSelectedSubStatus
=
function
(){
if
(
$scope
.
empSubStatusValue
!==
undefined
)
{
return
$scope
.
empSubStatusValue
;
}
else
{
return
"Please select a shift"
;
}
};
$scope
.
validateDates
=
function
(
dateValue
,
from
)
{
if
(
from
==
"FromDate"
){
var
toDat
=
$scope
.
toDate
;
var
difference
=
daysBetween
(
dateValue
,
toDat
);
if
(
difference
<
0
){
showAlert
(
'From Date should not be greater than To Date'
);
$scope
.
fromDate
=
priorDt
;
$scope
.
toDate
=
today
;
}
else
{
$scope
.
fromDate
=
dateValue
;
$scope
.
toDate
=
toDat
;
}
}
else
if
(
from
==
"ToDate"
){
var
fromDat
=
$scope
.
fromDate
;
var
differene
=
daysBetween
(
fromDat
,
dateValue
);
if
(
differene
<
0
){
showAlert
(
'To Date should not be less than From Date'
);
$scope
.
fromDate
=
priorDt
;
$scope
.
toDate
=
today
;
}
else
{
$scope
.
fromDate
=
fromDat
;
$scope
.
toDate
=
dateValue
;
}
}
};
function
showAlert
(
message
)
{
$mdDialog
.
show
(
$mdDialog
.
alert
().
parent
(
angular
.
element
(
document
.
querySelector
(
'#popupContainer'
)))
.
clickOutsideToClose
(
true
).
textContent
(
message
).
ariaLabel
(
'Alert Dialog'
).
ok
(
'Ok'
));
}
function
getFormattedDate
(
date
){
var
day
=
date
.
getDate
();
var
month
=
date
.
getMonth
()
+
1
;
var
year
=
date
.
getFullYear
();
return
year
+
'-'
+
(
month
<
10
?
"0"
+
month
:
month
)
+
'-'
+
(
day
<
10
?
"0"
+
day
:
day
);
}
function
treatAsUTC
(
date
)
{
var
result
=
new
Date
(
date
);
result
.
setMinutes
(
result
.
getMinutes
()
-
result
.
getTimezoneOffset
());
return
result
;
}
function
daysBetween
(
fromDate
,
toDate
)
{
var
millisecondsPerDay
=
24
*
60
*
60
*
1000
;
return
Math
.
round
((
treatAsUTC
(
toDate
)
-
treatAsUTC
(
fromDate
))
/
millisecondsPerDay
);
}
});
src/main/webapp/WEB-INF/css/custom-theme.css
View file @
d40cd400
...
@@ -182,7 +182,7 @@ i.fa.fa-refresh:hover {
...
@@ -182,7 +182,7 @@ i.fa.fa-refresh:hover {
background
:
transparent
;
background
:
transparent
;
}
}
#sidebar-wrapper
.sidebar-nav
li
ul
.reportsGroup
{
#sidebar-wrapper
.sidebar-nav
li
ul
.reportsGroup
{
max-height
:
291
px
;
max-height
:
332
px
;
height
:
auto
;
height
:
auto
;
overflow
:
hidden
;
overflow
:
hidden
;
padding
:
0
;
padding
:
0
;
...
@@ -680,3 +680,13 @@ cursor: pointer;
...
@@ -680,3 +680,13 @@ cursor: pointer;
.alertMsg
{
.alertMsg
{
margin
:
10px
0
0
0
;
margin
:
10px
0
0
0
;
}
}
.substatus-dropdown
>
label
{
padding-left
:
0
;
}
.substatus-dropdown
>
md-select
{
margin
:
0
;
padding
:
0
;
}
.substatus-report-grid
{
height
:
calc
(
85vh
-
243px
)
!important
;
}
\ No newline at end of file
src/main/webapp/WEB-INF/templates/index.html
View file @
d40cd400
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
<script
src=
"controllers/MyProfileController.js"
></script>
<script
src=
"controllers/MyProfileController.js"
></script>
<script
src=
"controllers/ResyncDataController.js"
></script>
<script
src=
"controllers/ResyncDataController.js"
></script>
<script
src=
"controllers/MyProjectAllocations.js"
></script>
<script
src=
"controllers/MyProjectAllocations.js"
></script>
<script
src=
"controllers/SubStatusReportController.js"
></script>
<script
src=
"controllers/DashboardController.js"
></script>
<script
src=
"controllers/DashboardController.js"
></script>
<script
src=
"controllers/VisaController.js"
></script>
<script
src=
"controllers/VisaController.js"
></script>
...
...
src/main/webapp/WEB-INF/templates/subStatusReport.html
0 → 100644
View file @
d40cd400
<div
class=
"md-padding"
id=
"popupContainer"
ng-controller=
"subStatusController"
ng-init=
"getSubStatusDetails()"
>
<div
class=
"container-fluid mainDivHeaderClass"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<h1
class=
"no-padding"
>
Employee SubStatus Report
<span
class=
"right"
>
<i
class=
"fa fa-refresh"
aria-hidden=
"true"
ng-click=
"refreshPage()"
></i>
</span>
</h1>
</div>
<div
class=
"clearfix"
></div>
</div>
</div>
<div
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<div
class=
"form-inline col-lg-12"
>
<div
class=
"form-group row col-lg-6 col-sm-4"
>
<label
class=
""
for=
"fromDate"
>
From Date:
<md-datepicker
ng-model=
"fromDate"
md-placeholder=
"Enter date"
md-min-date=
"minDate"
md-max-date=
"maxDate"
onkeydown=
"return false"
ng-change=
"validateDates(fromDate, 'FromDate')"
></md-datepicker></label>
</div>
<div
class=
"form-group row col-lg-6 col-sm-5"
>
<label
class=
""
for=
"toDate"
>
To Date:
<md-datepicker
ng-model=
"toDate"
md-placeholder=
"Enter date"
md-min-date=
"minDate"
md-max-date=
"maxDate"
onkeydown=
"return false"
ng-change=
"validateDates(toDate, 'ToDate')"
></md-datepicker></label>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-inline col-lg-12"
>
<div
class=
"form-group row col-lg-6 col-sm-5 d-flex substatus-dropdown"
>
<label
class=
"col-lg-2"
for=
"fromDate"
>
SubStatus:
</label>
<md-select
class=
"col-lg-4 "
ng-model=
"empSubStatusValue"
md-selected-text=
"getSelectedSubStatus() "
id=
"empSubStatus"
name=
"empSubStatus"
>
<md-optgroup
label=
"Employee SubStatus "
>
<md-option
ng-value=
"empSubStatusValue "
ng-repeat=
"empSubStatusValue in empSubStatuses"
>
{{empSubStatusValue}}
</md-option>
</md-optgroup>
</md-select>
</div>
<div
class=
"form-group row col-lg-6 col-sm-2"
>
<label
for=
"submitBtn"
>
<md-button
class=
"md-raised md-primary"
ng-click=
"getSubStatusDetails('click')"
>
<i
class=
"fa fa-search fa-2x"
></i>
Search
</md-button></label>
</div>
</div>
</div>
<div
id=
"gridTest"
ui-grid=
"gridOptions"
ui-grid-pagination
ui-grid-exporter
class=
"mygrid substatus-report-grid"
>
<div
class=
"watermark"
ng-show=
"!gridOptions.data.length"
>
No
data available
</div>
</div>
</div>
</div>
\ No newline at end of file
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