Commit 7bc4b2b9 authored by Prayas Jain's avatar Prayas Jain

Upadated Show MovetoBenchIcon display Condition

parent dc35fcc2
......@@ -603,10 +603,8 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
'projectId': dataToPass.projectId
};
$scope.status = "Active";
//$scope.isSecondTab = ($scope.projectId == 'Nisum0000');
//grid.appScope.compareDates(row.entity.billingEndDate)
var employeeModel = $scope.employeeModel;
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="grid.appScope.showEditIcon(row.entity)" 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>'
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>'
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" 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>';
......@@ -664,6 +662,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
if($scope.isSecondTab){
$scope.gridOptions.columnDefs[5].visible = false;
}
$http({
method: "GET",
url: appConfig.appUri + "resources/project/"+ $scope.projectId + "?status=" + $scope.status
......@@ -692,6 +691,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
return true;
}
}
$scope.showEditIcon = function(row) {
if(row.status =="Engaged" && !row.editrow ) {
return true;
}
}
$scope.parentData = {
"employeeId":"",
......@@ -798,7 +802,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
$http(req).then(function mySuccess(response) {
$scope.result = "Success";
if(response.data.message == "Resource Moved to Bench"){
if(response.data.message == "Resource is moved to Bench Successfully"){
$timeout(function () {
getProjectDetails($scope.projectId, $scope.status);
}, 500);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment