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;
......
......@@ -62,7 +62,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope.getRowData = function (row, action) {
console.log(row.entity);
$scope.parentData.projectId = row.entity.projectId;
$scope.parentData.projectName = row.entity.projectName;
$scope.parentData.account = row.entity.account;
......@@ -82,10 +81,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.viewTeamDetails(action, $scope.parentData);
}
// function getColumnName() {
// console.log($scope.gridOptions.data);
// return 'managerIds';
// }
$scope.refreshPage = function () {
$scope.empSearchId = "";
......@@ -197,10 +193,20 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
locals: { dataToPass: userData, gridOptionsData: $scope.gridOptions.data, managers: $scope.managers },
})
.then(function (result) {
if (result == "Assign") { $scope.refreshPage(); showAlert('Project created successfully'); }
else if (result == "Update") { $scope.refreshPage(); showAlert('Project updated successfully'); }
else if (result == "Cancelled") console.log(result);
else showAlert('Project assigning/updation failed!!!');
if (result == "Assign") {
$scope.refreshPage();
showAlert('Project created successfully');
}
else if (result == "Update") {
$scope.refreshPage();
showAlert('Project updated successfully');
}
else if (result == "Cancelled") {
}
else {
showAlert('Project assigning/updation failed!!!');
}
});
};
$scope.viewTeamDetails = function (action, userData) {
......@@ -214,10 +220,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
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) {
......@@ -231,10 +245,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
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) {
......@@ -248,10 +270,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
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 () {
......@@ -269,7 +299,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
deleteUserRole(row.entity.projectId);
$timeout(function () { updateGridAfterDelete(row) }, 500);
}, function () {
console.log("Cancelled dialog");
});
};
......@@ -280,7 +310,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$http(req).then(function mySuccess(response) {
$scope.result = response.data;
console.log($scope.result);
}, function myError(response) {
$scope.result = "Error";
});
......@@ -317,7 +346,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
function AddProjectController($scope, $mdDialog, dataToPass, gridOptionsData, managers, $window, $mdSelect) {
console.log(managers,dataToPass);
$scope.templateTitle = dataToPass.action;
$scope.alertMsg = "";
$scope.isDisabled = false;
......@@ -422,7 +450,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// code added
$scope.clearSearchTerm = function () {
console.log($scope.deliveryLeadsSelectedList);
// $("#lead .lead-search .md-select-value span .md-text").css({
//  'border': '1px solid #000',
......@@ -602,8 +630,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope.getRowData = function(row, action){
console.log('row selected',row);
console.log('action',action);
$scope.parentData.employeeId = row.entity.employeeId;
$scope.parentData.employeeName = row.entity.employeeName;
$scope.parentData.emailId = row.entity.emailId;
......@@ -625,7 +651,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.updateTeamMate(action, $scope.parentData);
}
if(action == "Delete"){
console.log("deleted");
$scope.deleteTeamMate(row);
}
......@@ -666,7 +691,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
getProjectDetails($scope.projectId,$scope.status);
}
$scope.updateTeamMate = function(action, userData){
console.log(userData);
$scope.updateTab();
$scope.id = userData.id;
$scope.employeeModel = {
......@@ -701,19 +725,17 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
// })
// .then(function(result) {
// console.log("result");
//// 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 if(result == "Cancelled") {}
//// else showAlert('Teammate assigning/updation failed!!!');
// });
};
$scope.deleteTeamMate = function (row) {
console.log(row);
$scope.id = row.entity.id;
$scope.employeeId = row.entity.employeeId;
$scope.projectId = row.entity.projectId;
......@@ -1038,7 +1060,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.startDate = $scope.newBillingStartDate ;
}
isDataUpdated = function () {
console.log(dataToPass);
if (dataToPass.action == "Update") {
$scope.previousData = {
ProjectID: dataToPass.projectId,
......@@ -1049,7 +1070,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
StartDate:new Date(dataToPass.projectStartDate),
EndDate:new Date(dataToPass.projectEndDate)
}
console.log($scope.projectStartDate);
$scope.currentData = {
ProjectID: $scope.projectId,
ProjectName: $scope.projectName,
......@@ -1211,9 +1231,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
else {
$scope.alertMsg = "";
console.log($scope.projectStatus,$scope.domain.domainId);
var record = { "projectId": $scope.projectId, "projectName": $scope.projectName,"account": $scope.account.accountName, "domain": $scope.domain.domainName, "accountId":$scope.account.accountId, "domainId": $scope.domain.domainId, "managerIds": [], "deliveryLeadIds":getSelectedDeliveryLeadIds(), "status": $scope.projectStatus, "projectStartDate": $scope.projectStartDate, "projectEndDate": $scope.projectEndDate };
console.log(record);
if(action == "Update"){
if (isDataUpdated() != true) {
$mdDialog.show($mdDialog.alert({
......@@ -1265,9 +1283,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if (dataToPass.action == "Assign") {
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;
}
}
......@@ -1339,7 +1355,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
if ($scope.templateTitle == "Add") {
console.log($scope.myForm);
if ($scope.myForm.$dirty) {
$mdDialog.show($mdDialog.confirm({
skipHide: true,
......@@ -1419,7 +1434,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
else if(action == "Add"){
$scope.gridOptions.data.push(record);
console.log($scope.gridOptions.data);
for(i=0;i<$scope.gridOptions.data.length;i++){
if($scope.gridOptions.data[i].role == 'Lead'){
$scope.gridOptions.data[i].role = "Lead";
......@@ -1451,7 +1465,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.result = "Success";
var titleOfModel = "Attention";
$scope.objectId = response.data.records.id;
console.log($scope.id,response.data.records.id ,"$scope.id ");
if(response.data.message =="TeamMate added successfuly"){
titleOfModel = "";
$timeout(function(){
......@@ -1549,7 +1562,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
data: record
}
$http(req).then(function mySuccess(response) {
console.log(response.data);
if(response.data.message == "Project name already exist !!! try with new"){
$mdDialog.show($mdDialog.alert({
skipHide: true,
......
......@@ -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!!!');
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