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
703a2b20
Commit
703a2b20
authored
Aug 30, 2018
by
mduppanapudi-nisum-com
Committed by
rbonthala-nisum-com
Aug 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added shifts list and displaying reports based on shifts (#171)
parent
3f8caab7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
AttendanceReportController.js
.../webapp/WEB-INF/controllers/AttendanceReportController.js
+20
-4
attendanceReport.html
src/main/webapp/WEB-INF/templates/attendanceReport.html
+12
-2
No files found.
src/main/webapp/WEB-INF/controllers/AttendanceReportController.js
View file @
703a2b20
...
...
@@ -3,6 +3,8 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
$scope
.
empId
=
myFactory
.
getEmpId
();
$scope
.
empName
=
myFactory
.
getEmpName
();
$scope
.
empEmailId
=
myFactory
.
getEmpEmailId
();
$scope
.
shifts
=
myFactory
.
getShifts
();
$scope
.
shifts
.
unshift
(
"All"
);
// Date picker related code
var
today
=
new
Date
();
$scope
.
maxDate
=
today
;
...
...
@@ -17,7 +19,7 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Employee Id'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
{
field
:
'
ifP
resent'
,
displayName
:
'Status'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
}
{
field
:
'
p
resent'
,
displayName
:
'Status'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
}
],
enableGridMenu
:
true
,
enableSelectAll
:
true
,
...
...
@@ -74,9 +76,15 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
console
.
log
(
""
);
}
var
reportDate
=
getFormattedDate
(
$scope
.
reportDate
);
var
shiftV
=
$scope
.
shiftValue
;
if
(
shiftV
==
undefined
||
shiftV
==
""
){
shiftV
=
"All"
;
}
$scope
.
shiftValue
=
shiftV
;
$scope
.
selectedshiftValue
=
shiftV
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"attendance/attendanciesReport/"
+
reportDate
url
:
appConfig
.
appUri
+
"attendance/attendanciesReport/"
+
reportDate
+
"?shift="
+
shiftV
}).
then
(
function
mySuccess
(
response
)
{
$mdDialog
.
hide
();
if
(
response
.
data
.
length
==
0
){
...
...
@@ -91,9 +99,9 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
$scope
.
presentArray
=
[];
$scope
.
absentArray
=
[];
angular
.
forEach
(
response
.
data
,
function
(
attendance
)
{
if
(
attendance
.
ifP
resent
==
'P'
){
if
(
attendance
.
p
resent
==
'P'
){
$scope
.
presentArray
.
push
(
attendance
);
}
else
if
(
attendance
.
ifP
resent
==
'A'
){
}
else
if
(
attendance
.
p
resent
==
'A'
){
$scope
.
absentArray
.
push
(
attendance
);
}
});
...
...
@@ -117,6 +125,14 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
$scope
.
reportDate
=
dateValue
;
};
$scope
.
getSelectedShift
=
function
(){
if
(
$scope
.
shiftValue
!==
undefined
)
{
return
$scope
.
shiftValue
;
}
else
{
return
"Please select a shift"
;
}
};
$scope
.
refreshPage
=
function
(){
$scope
.
gridOptions
.
data
=
[];
$scope
.
reportDate
=
today
;
...
...
src/main/webapp/WEB-INF/templates/attendanceReport.html
View file @
703a2b20
...
...
@@ -15,7 +15,6 @@
<br
/>
<div
class=
"text-center"
>
<div
class=
"row col-lg-12"
>
<div
class=
"col-lg-3"
></div>
<div
class=
"col-lg-4 col-xs-12"
>
<p>
<b>
Search Date:
</b>
...
...
@@ -24,13 +23,23 @@
onkeydown=
"return false"
ng-change=
"setSearchDate(reportDate)"
></md-datepicker>
</p>
</div>
<div
class=
"col-lg-2 col-xs-12"
>
<p
style=
"margin-top: 15px;"
><b>
Select Shift:
</b></p>
</div>
<div
class=
"col-lg-4 col-xs-12"
>
<md-select
ng-model=
"shiftValue"
md-selected-text=
"getSelectedShift()"
id=
"shiftValue"
style=
"margin:0px;"
>
<md-optgroup
label=
"shifts"
>
<md-option
ng-value=
"shiftValue"
ng-repeat=
"shiftValue in shifts"
>
{{shiftValue}}
</md-option>
</md-optgroup>
</md-select>
</div>
<div
class=
"col-lg-2 col-xs-12"
style=
"cursor: pointer;"
align=
"right"
>
<md-button
class=
"md-raised md-primary"
style=
"width:100px;background: cadetblue;"
ng-click=
"getEmployeePresent('onclick')"
>
<i
class=
"fa fa-search fa-2x"
style=
"margin-top: 5px; font-size: 1.5em; float: left"
></i>
Search
</md-button>
</div>
<div
class=
"col-lg-3"
></div>
</div>
<div
class=
"row col-lg-12"
style=
"height: 15px;"
></div>
<div
class=
"row col-lg-12"
>
...
...
@@ -66,3 +75,4 @@
data available
</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