Commit 18cfe357 authored by Soumya Gouri's avatar Soumya Gouri

delete reserved resource icon is added

parent 22332416
......@@ -606,10 +606,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
};
$scope.status = "Active";
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>'+
var getCellTemplate1 = '<p class="col-lg-12"><i ng-show="!row.entity.editrow" 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>'
+'&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;" 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="moveEdit" 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></p>';
+'<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>';
//'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>';
......@@ -825,6 +826,29 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
$scope.deleteProposedResource = function (row) {
$scope.id = row.id;
$scope.employeeId = row.employeeId;
$scope.projectId = row.projectId;
var record = {"id":$scope.id, "employeeId":$scope.employeeId, "projectId":$scope.projectId }
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to delete this teamMate?',
ok: 'ok',
cancel:'cancel'
})).then(function(){
deleteTeam(record);
$timeout(function(){
getProjectDetails($scope.projectId);
$mdDialog.show($mdDialog.alert({
skipHide: true,
textContent: 'Employee Inactivated',
ok: 'ok'
}));
},500);
})
};
$scope.cancelEdit = function (row) {
var index = $scope.gridOptions.data.indexOf(row);
......@@ -994,10 +1018,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
})).then(function(){
deleteTeam(record);
$timeout(function(){
getProjectDetails($scope.projectId);
getProjectDetails($scope.projectId,$scope.status);
$mdDialog.show($mdDialog.alert({
skipHide: true,
textContent: 'Employee Inactivated',
textContent: 'Resource deleted successfully!!!',
ok: 'ok'
}));
},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