Commit 13c31899 authored by ssathu-nisum-com's avatar ssathu-nisum-com Committed by tdutta-nisum-com

Addrole_option_in_addteammatescreen_Issues (#72)

parent 8d950be2
......@@ -255,7 +255,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Login Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
//menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
......@@ -268,7 +268,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Login Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
//menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
......@@ -303,11 +303,11 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}else if(role == "Delivery Manager" || role == "Director"){
menuItems.push({"menu" : "Manage Accounts","icon" : "fa fa fa-user fa-2x","path" : "templates/accounts.html"});
menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "Manage Accounts","icon" : "fa fa fa-user fa-2x","path" : "templates/accounts.html"});
menuItems.push({"menu" : "Manage Domains","icon" : "fa fa-handshake-o","path" : "templates/domains.html"});
menuItems.push({"menu" : "Manage Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/projects.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "Manage Visa","icon" : "fa fa-tasks fa-2x","path" : "templates/visaList.html"});
menuItems.push({"menu" : "Manage Travels","icon" : "fa fa-tasks fa-2x","path" : "templates/onsiteTravelsList.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
......
......@@ -7,7 +7,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
"account": "",
"status": "",
"action": "",
"managerIds":[]
"managerIds":[],
"accountId":"",
"domainId":""
};
$scope.managers = [];
......@@ -50,6 +52,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.parentData.managerIds=row.entity.managerIds;
$scope.parentData.domain = row.entity.domain;
$scope.parentData.status = row.entity.status;
$scope.parentData.accountId = row.entity.accountId;
$scope.parentData.domainId = row.entity.domainId;
if (action == "Update")
$scope.addProject(action, $scope.parentData);
else if (action == "Delete")
......@@ -271,6 +275,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.selectedTab = 0;
$scope.managersSelectedList = [];
$scope.employeeInTeam = [];
$scope.employeeRoles = ["Lead","Employee"];
$scope.accountId = dataToPass.accountId;
$scope.domainId = dataToPass.domainId;
$scope.domains = [];
// code added
......@@ -700,6 +707,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if(employeeModel == undefined){
$scope.alertMsg = "Please select a employee";
angular.element(document.getElementById('selectEmp')).focus();
}else if($scope.employeeRole == undefined){
$scope.alertMsg = "Please select a employee role";
angular.element(document.getElementById('empRole')).focus();
}
else if($scope.empBillableStatus == undefined){
$scope.alertMsg = "Please select a billable status";
......@@ -723,7 +733,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
return false;
}else {
$scope.alertMsg = "";
var record = {"employeeId":employeeModel.employeeId, "employeeName":employeeModel.employeeName, "emailId": employeeModel.emailId, "designation":employeeModel.designation,"projectId":project,"projectName":projectName,"managerId":managerId,"managerName":managerName,"mobileNumber":employeeModel.mobileNumber,"active":true,"billableStatus":$scope.empBillableStatus,"startDate":$scope.startDate,"endDate":$scope.endDate,"account":account,"newBillingStartDate":newBillingStartDate};
var record = {"employeeId":employeeModel.employeeId, "employeeName":employeeModel.employeeName, "emailId": employeeModel.emailId, "designation":employeeModel.designation,"projectId":project,"projectName":projectName,"managerId":managerId,"managerName":managerName,"mobileNumber":employeeModel.mobileNumber,"active":true,"billableStatus":$scope.empBillableStatus,"startDate":$scope.startDate,"endDate":$scope.endDate,"account":account,"role":$scope.employeeRole,"newBillingStartDate":newBillingStartDate,"accountId":$scope.accountId,"domainId":$scope.domainId};
addRecord(record,action);
$timeout(function(){
updateGrid('Add',record);
......@@ -808,6 +818,13 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
return "Please select a employee";
}
};
$scope.getSelectedEmpRole = function(){
if ($scope.employeeRole !== undefined) {
return $scope.employeeRole;
} else {
return "Please select a employee role";
}
}
// $scope.getProjectSelected = function(){
// if ($scope.projectModel !== undefined) {
// $scope.project=$scope.projectModel;
......
......@@ -51,6 +51,13 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
}).then(function mySuccess(response) {
$scope.gridOptions.data=response.data;
myFactory.setAccounts(response.data);
for(i=0;i<response.data.length;i++){
if(response.data[i].status == 'Y'){
$scope.gridOptions.data[i].status = "Active";
}else if(response.data[i].status == 'N'){
$scope.gridOptions.data[i].status = "InActive";
}
}
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = [];
......@@ -240,19 +247,19 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
return employeeIdsArray;
}
if(action == "Add"){
if(managersSelectedList == undefined){
$scope.alertMsg = "Please select a accountManager";
document.getElementById('selectManager').focus();
}else if(accountName == undefined){
if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name";
document.getElementById('accountName').focus();
}else if(industryType == undefined){
}else if(industryType == undefined || industryType == ""){
$scope.alertMsg = "Please enter the industry type";
document.getElementById('industryType').focus();
}else if(clientAddress == undefined){
}else if(clientAddress == undefined || clientAddress == ""){
$scope.alertMsg = "Please enter the client address";
document.getElementById('clientAddress').focus();
}
}else if(managersSelectedList == undefined || managersSelectedList == ""){
$scope.alertMsg = "Please select a delivery Manager";
document.getElementById('selectManager').focus();
}
else{
$scope.alertMsg = "";
var record = {"accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()};
......@@ -261,19 +268,20 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$timeout(function(){updateGrid($scope.templateTitle, record)},200);
}
}else if(action == "Update"){
if(managersSelectedList == undefined){
$scope.alertMsg = "Please select a accountManager";
document.getElementById('selectManager').focus();
}else if(accountName == undefined){
if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name";
document.getElementById('accountName').focus();
}else if(industryType == undefined){
}else if(industryType == undefined || industryType == ""){
$scope.alertMsg = "Please enter the industry type";
document.getElementById('industryType').focus();
}else if(clientAddress == undefined){
}else if(clientAddress == undefined || clientAddress == ""){
$scope.alertMsg = "Please enter the client address";
document.getElementById('clientAddress').focus();
}else{
}else if(managersSelectedList == undefined || managersSelectedList == ""){
$scope.alertMsg = "Please select a delivery Manager";
document.getElementById('selectManager').focus();
}
else{
$scope.alertMsg = "";
var record = {"accountId":$scope.accountId, "accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()};
......
......@@ -209,4 +209,7 @@ md-dialog{
white-space: normal;
}
.mandatory:after {content: " *"; color: red; font-size: 15px;}
\ No newline at end of file
.mandatory:after {content: " *"; color: red; font-size: 15px;}
md-select {
margin: 10px 0 6px !important;
}
......@@ -85,6 +85,14 @@
<output>Email Id : {{employeeModel.emailId}}</output>
<output>Role : {{employeeModel.role}}</output>
<output>Designation : {{employeeModel.designation}}</output>
<md-select ng-model="employeeRole"
md-selected-text="getSelectedEmpRole()"
id="empRole"> <md-optgroup
label="employee role"> <md-option
ng-value="empRole"
ng-repeat="empRole in employeeRoles">{{empRole}}</md-option>
</md-optgroup> </md-select>
<md-select ng-model="empBillableStatus " md-selected-text="getSelectedBillableStatus() " id="empBillableStatus" name="empBillableStatus">
<md-optgroup label="billable statuses ">
<md-option ng-value="billableStatus " ng-repeat="billableStatus in billableStatuses ">{{billableStatus}}</md-option>
......
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