Commit 9c85cd0e authored by Poojitha Durgapu's avatar Poojitha Durgapu

Created RadioButtons for View Of ManageProjects

parent ed6c89ca
......@@ -493,9 +493,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
'projectName': dataToPass.projectName,
'projectId': dataToPass.projectId
};
$scope.status = "Active";
var employeeModel = $scope.employeeModel;
var getCellTemplate1 = '<p class="col-lg-12"><i 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.getRowData(row,\'UpdateTeam\')"></i>'+
'&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 getCellTemplate1 = '<p class="col-md-6 col-md-offset-3"><i 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.getRowData(row,\'UpdateTeam\')"></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>';
$scope.gridOptions = {
......@@ -510,7 +511,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{field: 'role', displayName:'Role', enableColumnMenu: true, enableSorting: false,enableFiltering:true},
{ field: 'designation', displayName: 'Designation ', enableColumnMenu: false, enableSorting: false },
{ field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate },
// { field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate },
{ field: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false },
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false}
]
......@@ -518,7 +519,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.isDisabled = true;
$http({
method: "GET",
url: appConfig.appUri + "/projectTeam/getProjectDetails?projectId=" + $scope.projectId
url: appConfig.appUri + "/projectTeam/getProjectDetails?projectId=" + $scope.projectId + "&status=" + $scope.status
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
for(i=0;i<response.data.length;i++){
......@@ -619,6 +620,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.alertMsg = "";
// }
};
$scope.getTeamMates = function(){
getProjectDetails($scope.projectId,$scope.status);
}
$scope.updateTeamMate = function(action, userData){
console.log(userData);
$scope.updateTab();
......@@ -1046,7 +1051,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}else if(action == "Update"){
updateTeamRecord(record,action);
$timeout(function(){
getProjectDetails(project);
getProjectDetails(project,$scope.status);
removeTab('Add');
$mdDialog.show($mdDialog.alert({
skipHide: true,
......@@ -1320,10 +1325,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.result = "Error";
});
}
function getProjectDetails(projectId){
function getProjectDetails(projectId,status){
$http({
method: "GET",
url: appConfig.appUri + "/projectTeam/getProjectDetails?projectId=" + projectId
url: appConfig.appUri + "/projectTeam/getProjectDetails?projectId=" + projectId + "&status=" +status
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
for(i=0;i<$scope.gridOptions.data.length;i++){
......
......@@ -33,7 +33,13 @@
</div>
</div>
<div class="form-group col-lg-7 col-md-7 col-sm-7 col-xs-12"></div>
<div class="row col-lg-12" style="margin-left: 0px;">
<input type="radio" ng-model="status" value="Active" ng-click="getTeamMates()"> Active
<input type="radio" ng-model="status" value="InActive" ng-click="getTeamMates()"> Inactive
<input type="radio" ng-model="status" value="Both" ng-click="getTeamMates()"> Both
</div>
<div id="gridTest " ui-grid="gridOptions " ui-grid-pagination style="width:99%;height:230px;margin-left:10px; ">
<div class="watermark " ng-show="!gridOptions.data.length ">No data available</div>
</div>
......
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