Commit 5a51b08a authored by Prayas Jain's avatar Prayas Jain

Removed_Console_Logs

parent 1b16f1cd
......@@ -50,7 +50,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
method : "GET",
url : appConfig.appUri + "accounts"
}).then(function mySuccess(response) {
console.log(response)
if(response.data.records.length > 10){
$scope.gridOptions.enablePaginationControls = true;
}
......@@ -84,10 +83,18 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
controller: addController,
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data},
}).then(function(result) {
if(result == "Add") showAlert('Account assigned successfully');
else if(result == "Update") showAlert('Account updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Account assigning/updation failed!!!');
if(result == "Add") {
showAlert('Account assigned successfully');
}
else if(result == "Update") {
showAlert('Account updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Account assigning/updation failed!!!');
}
});
}
function showAlert(message) {
......@@ -107,7 +114,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
deleteAccountRole(row.entity.accountId);
$timeout(function(){updateGridAfterDelete()},500);
}, function() {
console.log("Cancelled dialog");
});
};
function deleteAccountRole(accountId){
......@@ -318,7 +325,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$timeout(function(){updateGrid($scope.templateTitle, record)},200);
}
}else if(action == "Update"){
console.log($scope.myForm);
if(accountName == undefined || accountName == ""){
$scope.alertMsg = "Please enter the account Name";
document.getElementById('accountName').focus();
......@@ -339,7 +345,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope.alertMsg = "";
var record = {"accountId":$scope.accountId, "accountName":$scope.accountName,"industryType":$scope.industryType,"clientAddress":$scope.clientAddress,"deliveryManagers":$scope.accountManagers()};
var dataRequired = {"accountName":dataToPass.accountName,"industryType":dataToPass.industryType,"clientAddress":dataToPass.clientAddress,"deliveryManagers":getDeliveryManagersFromService()};
console.log($scope.myForm);
var isFormUpated = myFactory.updateFormDataCheck($scope.myForm,dataRequired);
if(isFormUpated == true){
addOrUpdateAccount(record, $scope.templateTitle, "U");
......
......@@ -159,13 +159,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data},
})
.then(function(result) {
if(result == "Add") showAlert('Employee assigned successfully');
if(result == "Add"){
showAlert('Employee assigned successfully');
}
else if(result == "Update") {
$scope.getUserRoles();
showAlert('Employee updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Role assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Role assigning/updation failed!!!');
}
});
};
......@@ -183,7 +189,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
deleteUserRole(row.entity.employeeId);
$timeout(function(){updateGridAfterDelete(row)},500);
}, function() {
console.log("Cancelled dialog");
});
};
function deleteUserRole(empId){
......@@ -193,7 +199,6 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
$http(req).then(function mySuccess(response) {
$scope.result = response.data;
console.log($scope.result);
}, function myError(response){
$scope.result = "Error";
});
......
......@@ -76,7 +76,7 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
else if(type == "onclick" && $scope.reportDate < today){
showProgressDialog("Fetching data please wait...");
}else{
console.log("");
}
var reportDate = getFormattedDate($scope.reportDate);
var shiftV = $scope.shiftValue;
......
......@@ -116,7 +116,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
.then(function(result) {/*
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled") console.log(result);
else if(result == "Cancelled") {}
else showAlert('Manager assigning/updation failed!!!');
*/});
};
......@@ -189,7 +189,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
{field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false,minWidth : 100,width: 150},
{field : 'projectStartDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false, cellFilter: 'date:"dd-MMM-yyyy"',minWidth : 100,width: 150},
{field : 'projectEndDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: false, cellFilter: 'date:"dd-MMM-yyyy"' ,minWidth : 100,width: 150},
{field : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false,minWidth : 100,width: 150}
{field : 'status',displayName: 'Active', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false,minWidth : 100,width: 150}
]
};
......
......@@ -154,10 +154,12 @@ myApp.controller("domainController",
showAlert('Domain created successfully');
} else if (result == "Update") {
showAlert('Domain updated successfully');
} else if (result == "Cancelled")
console.log(result);
else
} else if (result == "Cancelled") {
}
else {
showAlert('Domain assigning/updation failed!!!');
}
});
};
......@@ -171,7 +173,7 @@ myApp.controller("domainController",
deleteDomainRow(row.entity.domainId);
showAlert("Domain Inactivated successfully");
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -340,7 +342,6 @@ myApp.controller("domainController",
if (dataToPass.action == "Add") {
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if (totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
showConfirmDialog = true;
}
......@@ -363,7 +364,6 @@ myApp.controller("domainController",
$scope.deliveryHeads = function() {
var length = $scope.employeeModel.length;
console.log(length);
for (i = 0; i < length; i++) {
$scope.employeeNamesArray[i] = $scope.employeeModel[i].employeeId;
}
......@@ -373,10 +373,8 @@ myApp.controller("domainController",
$scope.removeSelectedLead = function(item) {
var index = $scope.employeeModel.indexOf(item);
console.log(index);
$scope.employeeNamesArray.splice(index, 1);
$scope.employeeModel.splice(index, 1);
console.log($scope.employeeNamesArray);
}
......@@ -409,7 +407,6 @@ myApp.controller("domainController",
.then(
function mySuccess(response) {
$scope.result = "Success";
console.log(response);
updatingGridBasedOnStatus(dataToPass.action,response.data,$scope.result);
},
function myError(response) {
......@@ -467,7 +464,6 @@ myApp.controller("domainController",
"accountId" : $scope.AccountInfo.accountId,
"deliveryManagers" : $scope.deliveryHeads()
};
console.log(record)
$scope.addOrUpdateDomain(record,action);
}
}else{
......@@ -506,7 +502,6 @@ myApp.controller("domainController",
}))
}
else {
console.log(record)
$scope.addOrUpdateDomain(record, action);
}
}
......
......@@ -50,7 +50,6 @@ myApp
$scope.refreshPage();
}, function myError(response) {
$mdDialog.hide();
console.log(response);
showAlert('Something went wrong while importing the data from file...');
$scope.refreshPage();
});
......
......@@ -9,7 +9,6 @@ myApp.controller("headerController",function($scope, myFactory, $compile, $mdDia
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log("User signed out.");
});
auth2.disconnect();
......
......@@ -28,8 +28,6 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
$scope.nonManageGroup.push($scope.menuItems[i]);
}
}
console.log('MANAGE',$scope.manageGroup);
console.log('NONMANAGE',$scope.nonManageGroup);
$scope.custom = true;
$scope.toggleManage = function(){
$scope.custom = $scope.custom === false ? true: false;
......
......@@ -90,7 +90,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
method : "GET",
url : appConfig.appUri + "accounts"
}).then(function mySuccess(response) {
console.log( response.data.records);
var accounts = response.data.records;
myFactory.setAccounts(accounts);
}, function myError(response) {
......@@ -107,10 +106,10 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
locals:{dataToPass: profile, rolesData:$scope.rolesData },
})
.then(function(result) {
if(result == "Cancelled"){ console.log(result);
if(result == "Cancelled"){
showProgressDialog("Registration cancelled!!! Please wait while redirected to login page.");
$timeout(function(){redirectToLoginPage();},2000);
}else if(result == "RegAlert"){ console.log(result);
}else if(result == "RegAlert"){
showProgressDialog("Application access/registration required!!! Please reachout to HR to get required access");
$timeout(function(){redirectToLoginPage();},2000);
}
......@@ -119,7 +118,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
$timeout(function(){redirectToLoginPage();},2000);
}else{
showProgressDialog("Registered successfully!!! Please wait while redirected to home page.");
console.log("Result:: "+result.data);
$timeout(function(){setDefaultValues(result.data, profile.getImageUrl());},2000);
}
});
......@@ -353,7 +351,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
auth2.disconnect();
......
......@@ -95,7 +95,6 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$mdDialog.hide();
};
function ProjectDetailsController($scope, $mdDialog, dataToPass,gridOptionsData, managers) {
console.log(dataToPass);
$scope.templateTitle = dataToPass.action;
$scope.alertMsg = "";
$scope.isDisabled = false;
......
......@@ -167,10 +167,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees, projects: $scope.projects},
})
.then(function(result) {
if(result == "Assign") showAlert('Role assigned successfully');
else if(result == "Update") showAlert('Role updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Role assigning/updation failed!!!');
if(result == "Assign") {
showAlert('Role assigned successfully');
}
else if(result == "Update") {
showAlert('Role updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Role assigning/updation failed!!!');
}
});
};
$scope.updateEmployee = function(action, userData){
......@@ -184,10 +192,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees, projects: $scope.projects},
})
.then(function(result) {
if(result == "Assign") showAlert('Role assigned successfully');
else if(result == "Update") showAlert('Role updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Role assigning/updation failed!!!');
if(result == "Assign") {
showAlert('Role assigned successfully');
}
else if(result == "Update") {
showAlert('Role updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Role assigning/updation failed!!!');
}
});
};
$scope.cancel = function() {
......@@ -205,7 +221,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
deleteUserRole(row.entity.employeeId);
$timeout(function(){updateGridAfterDelete(row)},500);
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -216,7 +232,6 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
}
$http(req).then(function mySuccess(response) {
$scope.result = response.data;
console.log($scope.result);
}, function myError(response){
$scope.result = "Error";
});
......
......@@ -257,9 +257,9 @@ myApp
method : "GET",
url : appConfig.appUri + "deleteReport/" + fileName
}).then(function mySuccess(response) {
console.log("Report deleted successfully.");
}, function myError(response) {
console.log("Something went wrong while deleting the report!!!");
});
}
......@@ -326,7 +326,6 @@ myApp
// url : defaultURL
// }).then(function mySuccess(response) {
// if(response.data){
// console.log(response.data);
// $scope.jsonToExport = response.data;
// excelDataFormation();
// }
......@@ -375,7 +374,7 @@ myApp
deleteReport($scope.pdfUrl);
}
else if(result.data == "Cancelled" || result.data == undefined){
console.log("Dialog cancelled");
}
else{
showAlert("Something went wrong while sending email!!!");
......@@ -393,9 +392,9 @@ myApp
method : "GET",
url : appConfig.appUri + "deleteReport/" + fileName
}).then(function mySuccess(response) {
console.log("Report deleted successfully after sending email.");
}, function myError(response) {
console.log("Something went wrong while deleting the report!!!");
});
setDefaults();
}
......
......@@ -160,10 +160,18 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
else if(result == "Update") showAlert('Teammate updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
......@@ -178,14 +186,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.cancel = function() {
......@@ -202,14 +216,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.ViewBillability = function(action, userData){
......@@ -223,14 +243,19 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") {
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
......@@ -249,7 +274,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$timeout(function(){updateGridAfterDelete(row.entity.employeeId)},500);
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -735,10 +760,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope.cancel = function() {
var showConfirmDialog = false;
// console.log(dataToPass);
// console.log( "nb"+new Date(dataToPass.newBillingStartDate));
// console.log("end"+new Date(dataToPass.endDate));
// console.log("start"+new Date(dataToPass.startDate));
if(dataToPass.action=="Update"){
$scope.previousData={
EmployeeName:dataToPass.employeeName,
......@@ -755,9 +776,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
Enddate:new Date(dataToPass.endDate),
NewBillingStartDate:new Date(dataToPass.newBillingStartDate)
}
// console.log("nb"+$scope.newBillingStartDate);
// console.log("end"+$scope.endDate);
console.log($scope.shift);
$scope.currentData={
EmployeeName:$scope.employeeName,
EmployeeId:$scope.employeeId,
......@@ -792,9 +810,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
if(dataToPass.action=="Add"){
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined) {
console.log("Came here!");
showConfirmDialog = true;
}
}
......
......@@ -45,7 +45,7 @@ myApp.controller('SessionController',
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {
console.log('User signed out.');
});
auth2.disconnect();
......
......@@ -151,13 +151,21 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('Travel request created successfully');
else if(result == "Update") showAlert('Travel request updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
$scope.refreshPage();
});
if(result == "Add"){
showAlert('Travel request created successfully');
}
else if(result == "Update"){
showAlert('Travel request updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
$scope.refreshPage();
}
});
};
$scope.updateEmployee = function(action, userData){
......@@ -171,14 +179,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.cancel = function() {
......@@ -195,14 +209,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.ViewBillability = function(action, userData){
......@@ -216,14 +236,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add"){
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else{
showAlert('Teammate assigning/updation failed!!!');
}
});
};
......@@ -243,7 +269,6 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
$scope.refreshPage();
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -461,9 +486,7 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = true;
}
}
......
......@@ -139,10 +139,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers},
})
.then(function(result) {
if(result == "Assign") showAlert('Project created successfully');
else if(result == "Update") showAlert('Project updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Project assigning/updation failed!!!');
if(result == "Assign"){
showAlert('Project created successfully');
}
else if(result == "Update") {
showAlert('Project updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Project assigning/updation failed!!!');
}
});
};
$scope.viewTeamDetails = function(action, userData){
......@@ -156,10 +164,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers},
})
.then(function(result) {
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Manager assigning/updation failed!!!');
if(result == "Assign"){
showAlert('Manager assigned successfully');
}
else if(result == "Update") {
showAlert('Manager updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Manager assigning/updation failed!!!');
}
});
};
$scope.getUnAssignedEmployees = function(action, userData){
......@@ -173,10 +189,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers},
})
.then(function(result) {
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Manager assigning/updation failed!!!');
if(result == "Assign") {
showAlert('Manager assigned successfully');
}
else if(result == "Update") {
showAlert('Manager updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Manager assigning/updation failed!!!');
}
});
};
$scope.getAllocatedEmployees = function(action, userData){
......@@ -190,10 +214,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers},
})
.then(function(result) {
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Manager assigning/updation failed!!!');
if(result == "Assign") {
showAlert('Manager assigned successfully');
}
else if(result == "Update") {
showAlert('Manager updated successfully');
}
else if(result == "Cancelled") {
}
else {
showAlert('Manager assigning/updation failed!!!');
}
});
};
$scope.cancel = function() {
......@@ -211,7 +243,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
deleteUserRole(row.entity.projectId);
$timeout(function(){updateGridAfterDelete(row)},500);
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -222,7 +254,6 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
}
$http(req).then(function mySuccess(response) {
$scope.result = response.data;
console.log($scope.result);
}, function myError(response){
$scope.result = "Error";
});
......
......@@ -143,10 +143,18 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
else if(result == "Update") showAlert('Teammate updated successfully');
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
if(result == "Add") {
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") {
}
else{
showAlert('Teammate assigning/updation failed!!!');
}
$scope.refreshPage();
});
......@@ -169,8 +177,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled"){
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.cancel = function() {
......@@ -187,14 +199,20 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
})
.then(function(result) {
if(result == "Add") showAlert('New Teammate assigned successfully');
if(result == "Add"){
showAlert('New Teammate assigned successfully');
}
else if(result == "Update") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled"){
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
$scope.ViewBillability = function(action, userData){
......@@ -214,8 +232,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") console.log(result);
else showAlert('Teammate assigning/updation failed!!!');
else if(result == "Cancelled") {
}
else {
showAlert('Teammate assigning/updation failed!!!');
}
});
};
......@@ -234,7 +256,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
$timeout(function(){updateGridAfterDelete(row.entity.employeeId)},500);
}, function() {
console.log("Cancelled dialog");
});
};
......@@ -409,9 +431,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls;
for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!");
showConfirmDialog = 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