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
1b2ad8af
Commit
1b2ad8af
authored
Jun 19, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Pagination Issue in view team screen and move to engage api
parent
276c4723
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
ResourceRepo.java
src/main/java/com/nisum/myteam/repository/ResourceRepo.java
+1
-0
ResourceService.java
...n/java/com/nisum/myteam/service/impl/ResourceService.java
+1
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+19
-21
No files found.
src/main/java/com/nisum/myteam/repository/ResourceRepo.java
View file @
1b2ad8af
...
...
@@ -23,6 +23,7 @@ public interface ResourceRepo
List
<
Resource
>
findByBillableStatus
(
String
resourceAllocationStatus
);
List
<
Resource
>
findByBillingStartDateGreaterThan
(
Date
billingStartDate
);
Resource
findOneByEmployeeIdAndStatus
(
String
employeeId
,
String
status
);
List
<
Resource
>
findByBillingStartDateBetween
(
Date
fromDate
,
Date
toDate
);
//Set<Resource> findByBillableStatus(String resourceAllocationStatus);
...
...
src/main/java/com/nisum/myteam/service/impl/ResourceService.java
View file @
1b2ad8af
...
...
@@ -509,7 +509,7 @@ public class ResourceService implements IResourceService {
}
else
if
(
statusFlag
.
equals
(
MyTeamUtils
.
STATUS_PROPOSED
)
&&
resource
.
getStatus
().
equals
(
MyTeamUtils
.
STATUS_PROPOSED
)){
resourceVO
.
setResourceStatus
(
MyTeamUtils
.
STATUS_PROPOSED
);
resourcesList
.
add
(
resourceVO
);
}
else
if
(
statusFlag
.
equals
(
MyTeamUtils
.
BOTH
))
}
else
if
(
statusFlag
.
equals
(
MyTeamUtils
.
ALL
))
resourcesList
.
add
(
resourceVO
);
}
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
1b2ad8af
...
...
@@ -607,10 +607,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var
employeeModel
=
$scope
.
employeeModel
;
var
getCellTemplate1
=
'<p class="col-lg-12"><i ng-show="grid.appScope.showEditIcon(row.entity)" class="fa fa-pencil-square-o fa-2x" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(
\'
show
\'
)" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.edit(row)"></i>'
+
'<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Save" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.saveRow(row.entity,
\'
Update
\'
)"></i>'
+
'
<i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Cancel" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+
' <i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Cancel" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+
'<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" id="moveResource" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Release" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.moveToBench(row.entity)"></i>'
+
'<i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="
deleteResource
" class="fa fa-arrow-circle-left fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Engage" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.changeAllocationStatusToEngaged(row.entity)"></i>'
+
'
<i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="moveToProject
" class="fa fa-trash fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Delete" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.deleteProposedResource(row.entity)"></i></p>'
;
'<i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="
moveToProject
" class="fa fa-arrow-circle-left fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Engage" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.changeAllocationStatusToEngaged(row.entity)"></i>'
+
'
<i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="deleteResource
" class="fa fa-trash fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Delete" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.deleteProposedResource(row.entity)"></i></p>'
;
//' <i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
var
getCellActiveTemplate
=
'<div ng-show="COL_FIELD==true"><p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>'
;
...
...
@@ -670,12 +670,6 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"resources/project/"
+
$scope
.
projectId
+
"?status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
for
(
i
=
0
;
i
<
response
.
data
.
records
.
length
;
i
++
){
if
(
response
.
data
.
records
[
i
].
resourceRole
==
'Lead'
){
...
...
@@ -684,6 +678,13 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
gridOptions
.
data
[
i
].
resourceRole
=
"Individual Contributor"
;
}
}
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
=
[];
...
...
@@ -733,7 +734,6 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
edit
=
function
(
rowd
)
{
console
.
log
(
rowd
)
var
row
=
rowd
.
entity
;
var
index
=
$scope
.
gridOptions
.
data
.
indexOf
(
row
);
if
(
$scope
.
previousRow
){
...
...
@@ -828,11 +828,9 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
$scope
.
changeAllocationStatusToEngaged
=
function
(
row
)
{
var
loginEmpId
=
myFactory
.
getEmpId
();
var
record
=
{
"id"
:
row
.
id
,
"employeeId"
:
row
.
employeeId
,
"projectId"
:
row
.
projectId
,
"billableStatus"
:
row
.
billableStatus
,
"billingEndDate"
:
row
.
billingEndDate
,
"resourceRole"
:
row
.
resourceRole
,
"billingStartDate"
:
row
.
billingStartDate
,
"status"
:
"Engaged"
};
console
.
log
(
record
);
var
urlRequest
=
""
;
var
loginEmpId
=
myFactory
.
getEmpId
();
//urlRequest = appConfig.appUri+ "resources/moveToOpenPool?loginEmpId="+loginEmpId;
var
urlRequest
=
appConfig
.
appUri
+
"resources?loginEmpId="
+
loginEmpId
;
var
req
=
{
method
:
'PUT'
,
url
:
urlRequest
,
...
...
@@ -843,7 +841,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
if
(
response
.
data
.
message
==
"Resource
's status has been changed S
uccessfully"
){
if
(
response
.
data
.
message
==
"Resource
updated s
uccessfully"
){
$timeout
(
function
()
{
getProjectDetails
(
$scope
.
projectId
,
$scope
.
status
);
},
500
);
...
...
@@ -1820,12 +1818,12 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
url
:
appConfig
.
appUri
+
"resources/project/"
+
$scope
.
projectId
+
"?status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
// if(status == "InActive" || dataToPass.status == "InActive"
){
// $scope.gridOptions.columnDefs[5].visible = fals
e;
//
}
//
else{
// $scope.gridOptions.columnDefs[5].visible = tru
e;
//
}
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
tru
e
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
fals
e
;
}
for
(
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
if
(
$scope
.
gridOptions
.
data
[
i
].
resourceRole
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
resourceRole
=
"Lead"
;
...
...
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