Commit c1848575 authored by mduppanapudi-nisum-com's avatar mduppanapudi-nisum-com Committed by tdutta-nisum-com

Restricting DL to see only limited records related to him (#143)

* Restricting DL to see only limited records related to him

* added empId for add and update in  manage Employee
parent 39900abd
......@@ -592,11 +592,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
function addOrUpdateRole(record, action){
var empId = myFactory.getEmpId();
var urlRequest = "";
if(action == "Add"){
urlRequest = appConfig.appUri+ "user/assignEmployeeRole";
urlRequest = appConfig.appUri+ "user/assignEmployeeRole?empId="+empId;
}else if(action == "Update"){
urlRequest = appConfig.appUri+ "user/updateEmployeeRole";
urlRequest = appConfig.appUri+ "user/updateEmployeeRole?empId="+empId;
}
var req = {
method : 'POST',
......
......@@ -91,9 +91,12 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$scope.getProjects = function () {
var role = myFactory.getEmpRole();
var empId = myFactory.getEmpId();
var deliveryLeadEmpId = ((role == "Delivery Lead") ? empId : undefined);
$http({
method: "GET",
url: appConfig.appUri + "project/getProjects"
url: appConfig.appUri + "project/getProjects?empId="+deliveryLeadEmpId
}).then(function mySuccess(response) {
if(response.data.length > 10){
$scope.gridOptions.enablePaginationControls = true;
......
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