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
c64cc99d
Commit
c64cc99d
authored
Jun 18, 2019
by
Soumya Gouri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing resource status from proposed to engaged
parent
fc48b286
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+37
-1
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
c64cc99d
...
@@ -609,7 +609,8 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -609,7 +609,8 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
'<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" 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="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-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="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 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>';
//' <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>'
;
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>'
;
...
@@ -788,6 +789,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -788,6 +789,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
}
$scope
.
moveToBench
=
function
(
row
)
{
$scope
.
moveToBench
=
function
(
row
)
{
let
role
;
let
role
;
if
(
row
.
resourceRole
==
'Individual Contributor'
){
if
(
row
.
resourceRole
==
'Individual Contributor'
){
...
@@ -824,6 +826,40 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -824,6 +826,40 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
});
});
}
}
$scope
.
changeAllocationStatusToEngaged
=
function
(
row
)
{
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
req
=
{
method
:
'PUT'
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
},
data
:
record
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
if
(
response
.
data
.
message
==
"Resource's status has been changed Successfully"
){
$timeout
(
function
()
{
getProjectDetails
(
$scope
.
projectId
,
$scope
.
status
);
},
500
);
}
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
textContent
:
response
.
data
.
message
,
ok
:
'ok'
})).
then
(
function
()
{
$scope
.
myForm
.
$setPristine
();
})
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
});
}
$scope
.
deleteProposedResource
=
function
(
row
)
{
$scope
.
deleteProposedResource
=
function
(
row
)
{
$scope
.
id
=
row
.
id
;
$scope
.
id
=
row
.
id
;
...
...
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