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
d55f627f
Commit
d55f627f
authored
Jun 12, 2019
by
Soumya Gouri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added move to bench functionality
parent
86948483
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+39
-1
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
d55f627f
...
@@ -609,7 +609,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -609,7 +609,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var
getCellTemplate1
=
'<p class="col-lg-12"><i ng-show="!row.entity.editrow" class="fa fa-pencil-square-o fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.edit(row)"></i>'
+
var
getCellTemplate1
=
'<p class="col-lg-12"><i ng-show="!row.entity.editrow" class="fa fa-pencil-square-o fa-2x" 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;" 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;" 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;" 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;" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+
' <i ng-show="grid.appScope.status ==
\'
InActive
\'
" id="moveEdit" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.
cancelEdit
(row.entity)"></i></p>'
+
' <i ng-show="grid.appScope.status ==
\'
InActive
\'
" id="moveEdit" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.
moveToBench
(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>'
;
...
@@ -772,6 +772,44 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -772,6 +772,44 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
}
$scope
.
moveToBench
=
function
(
row
)
{
let
role
;
if
(
row
.
resourceRole
==
'Individual Contributor'
){
role
=
'Employee'
;
}
var
record
=
{
"id"
:
row
.
id
,
"employeeId"
:
row
.
employeeId
,
"projectId"
:
row
.
projectId
,
"billableStatus"
:
row
.
billableStatus
,
"billingEndDate"
:
row
.
billingEndDate
,
"resourceRole"
:
role
,
"billingStartDate"
:
row
.
billingStartDate
};
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 Moved to Bench"
){
$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
.
cancelEdit
=
function
(
row
)
{
$scope
.
cancelEdit
=
function
(
row
)
{
var
index
=
$scope
.
gridOptions
.
data
.
indexOf
(
row
);
var
index
=
$scope
.
gridOptions
.
data
.
indexOf
(
row
);
$scope
.
gridOptions
.
data
[
index
].
editrow
=
false
;
$scope
.
gridOptions
.
data
[
index
].
editrow
=
false
;
...
...
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