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
58397f07
Commit
58397f07
authored
Jul 24, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Progress Bar in Open Pool Screen
parent
3e0f1967
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
OpenPoolController.js
src/main/webapp/WEB-INF/controllers/OpenPoolController.js
+27
-5
showOpenPool.html
src/main/webapp/WEB-INF/templates/showOpenPool.html
+1
-1
No files found.
src/main/webapp/WEB-INF/controllers/OpenPoolController.js
View file @
58397f07
myApp
.
controller
(
"openPoolController"
,
function
(
$scope
,
$http
,
myFactory
,
$mdDialog
,
appConfig
,
exportUiGridService
)
{
myApp
.
controller
(
"openPoolController"
,
function
(
$scope
,
$http
,
myFactory
,
$mdDialog
,
appConfig
,
exportUiGridService
)
{
$scope
.
records
=
[];
$scope
.
records
=
[];
var
today
=
new
Date
();
$scope
.
gridOptions
=
{
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
paginationPageSize
:
10
,
...
@@ -12,8 +13,7 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
...
@@ -12,8 +13,7 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
{
field
:
'resourceRole'
,
displayName
:
'Role'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
},
{
field
:
'resourceRole'
,
displayName
:
'Role'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
},
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableFiltering
:
false
,
width
:
'*'
},
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableFiltering
:
false
,
width
:
'*'
},
{
field
:
'billableStatus'
,
displayName
:
'Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
},
{
field
:
'billableStatus'
,
displayName
:
'Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
},
{
field
:
'billingStartDate'
,
displayName
:
'Billable Start Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
},
{
field
:
'billingStartDate'
,
displayName
:
'Start Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
'*'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
}
{
field
:
'billingEndDate'
,
displayName
:
'Billable End Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
width
:
'*'
},
],
],
enableGridMenu
:
true
,
enableGridMenu
:
true
,
enableSelectAll
:
true
,
enableSelectAll
:
true
,
...
@@ -58,12 +58,21 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
...
@@ -58,12 +58,21 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
};
};
$scope
.
gridOptions
.
data
=
[];
$scope
.
gridOptions
.
data
=
[];
$scope
.
getOpenPoolRecords
=
function
(){
$scope
.
getOpenPoolRecords
=
function
(
type
){
$mdDialog
.
hide
();
if
(
type
==
"onload"
){
showProgressDialog
(
"Fetching data please wait..."
);
}
$http
({
$http
({
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
'resources/project/Nisum0000?status=Active'
url
:
appConfig
.
appUri
+
'resources/project/Nisum0000?status=Active'
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
$mdDialog
.
hide
();
today
.
setHours
(
0
,
0
,
0
,
0
);
var
openPoolRecords
=
response
.
data
.
records
.
filter
(
function
(
employee
)
{
return
employee
.
billingEndDate
>=
today
;
});
$scope
.
gridOptions
.
data
=
openPoolRecords
;
if
(
response
.
data
.
records
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
}
...
@@ -75,4 +84,17 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
...
@@ -75,4 +84,17 @@ myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDia
$scope
.
gridOptions
.
data
=
[];
$scope
.
gridOptions
.
data
=
[];
});
});
};
};
});
function
showProgressDialog
(
msg
){
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
$mdDialog
.
show
({
templateUrl
:
'templates/progressDialog.html'
,
controller
:
ProgressController
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
false
,
locals
:
{
dataToPass
:
msg
}
});
}
function
ProgressController
(
$scope
,
dataToPass
)
{
$scope
.
progressText
=
dataToPass
;
}
});
\ No newline at end of file
src/main/webapp/WEB-INF/templates/showOpenPool.html
View file @
58397f07
<div
class=
"md-padding"
id=
"popupContainer"
ng-controller=
"openPoolController"
ng-init=
"getOpenPoolRecords()"
>
<div
class=
"md-padding"
id=
"popupContainer"
ng-controller=
"openPoolController"
ng-init=
"getOpenPoolRecords(
'onload'
)"
>
<div
class=
"container-fluid mainDivHeaderClass"
>
<div
class=
"container-fluid mainDivHeaderClass"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"col-lg-12"
>
...
...
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