Commit 85e930bd authored by dgoud-nisum-com's avatar dgoud-nisum-com Committed by rbonthala-nisum-com

MT-69 (#18)

* MT-69

* MT-69

* MT-69

* MT-69
parent 690a4763
myApp.controller("projectController",function($scope, myFactory,exportUiGridService, $mdDialog, $http, appConfig, $timeout){ myApp.controller("projectController",function($scope, myFactory,exportUiGridService, $mdDialog, $http, appConfig, $timeout,$window){
$scope.records = []; $scope.records = [];
$scope.empSearchId = ""; $scope.empSearchId = "";
$scope.parentData = { $scope.parentData = {
...@@ -12,20 +12,18 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -12,20 +12,18 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
}; };
$scope.managers = []; $scope.managers = [];
var getCellTemplate = '<p class="col-lg-12"><i class="fa fa-book fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'View\')"></i>'+
var getCellTemplate = '<p class="col-lg-12"><i class="fa fa-book fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'View\')" ></i>'+ '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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,\'Update\')"></i>'+
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-pencil-square-o fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="View" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Update\')"></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>';
'&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;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
$scope.gridOptions = { $scope.gridOptions = {
paginationPageSizes : [ 10, 20, 30, 40, 50, 100], paginationPageSizes : [ 10, 20, 30, 40, 50, 100],
paginationPageSize : 10, paginationPageSize : 10,
pageNumber: 1, pageNumber: 1,
pageSize:10, pageSize:10,
enableFiltering: true, enableFiltering: true,
columnDefs : [ columnDefs : [
{field : 'projectId',displayName: 'Project ID', enableColumnMenu: false, enableSorting: false,enableFiltering:false, width:120,}, {field : 'projectId',displayName: 'Project ID', enableColumnMenu: false, enableSorting: false,enableFiltering:false, width:120},
{field : 'projectName',displayName: 'Project ', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'projectName',displayName: 'Project ', enableColumnMenu: false, enableSorting: true,enableFiltering:true},
{field : 'account',displayName: 'Account ', enableColumnMenu: false, enableSorting: true,enableFiltering:true}, {field : 'account',displayName: 'Account ', enableColumnMenu: false, enableSorting: true,enableFiltering:true},
//{field : 'managerId',displayName: 'Manager ID ', enableColumnMenu: false, enableSorting: false}, //{field : 'managerId',displayName: 'Manager ID ', enableColumnMenu: false, enableSorting: false},
...@@ -35,7 +33,6 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -35,7 +33,6 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
] ]
}; };
$scope.gridOptions.data = $scope.records; $scope.gridOptions.data = $scope.records;
$scope.getRowData = function(row, action){ $scope.getRowData = function(row, action){
$scope.parentData.projectId = row.entity.projectId; $scope.parentData.projectId = row.entity.projectId;
$scope.parentData.projectName = row.entity.projectName; $scope.parentData.projectName = row.entity.projectName;
...@@ -50,8 +47,11 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -50,8 +47,11 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
$scope.deleteRole(row); $scope.deleteRole(row);
else if(action == "View") else if(action == "View")
$scope.viewTeamDetails(action, $scope.parentData); $scope.viewTeamDetails(action, $scope.parentData);
} }
$scope.refreshPage = function(){ $scope.refreshPage = function(){
$scope.empSearchId = ""; $scope.empSearchId = "";
$scope.getProjects(); $scope.getProjects();
...@@ -163,6 +163,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -163,6 +163,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
templateUrl: 'templates/projectTeamDetails.html', templateUrl: 'templates/projectTeamDetails.html',
parent: angular.element(document.body), parent: angular.element(document.body),
clickOutsideToClose:true, clickOutsideToClose:true,
preserveScope: true,
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers}, locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers},
}) })
.then(function(result) { .then(function(result) {
...@@ -172,6 +173,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -172,6 +173,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
else showAlert('Manager assigning/updation failed!!!'); else showAlert('Manager assigning/updation failed!!!');
}); });
}; };
$scope.getUnAssignedEmployees = function(action, userData){ $scope.getUnAssignedEmployees = function(action, userData){
$('#home').addClass('md-scroll-mask'); $('#home').addClass('md-scroll-mask');
userData.action = action; userData.action = action;
...@@ -197,10 +199,11 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -197,10 +199,11 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
templateUrl: 'templates/projectAssignedDetails.html', templateUrl: 'templates/projectAssignedDetails.html',
parent: angular.element(document.body), parent: angular.element(document.body),
clickOutsideToClose:true, clickOutsideToClose:true,
locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers}, locals:{dataToPass: userData,gridOptionsData: $scope.gridOptions.data, managers: $scope.managers,employees:$scope.employees},
}) })
.then(function(result) { .then(function(result) {
if(result == "Assign") showAlert('Manager assigned successfully'); console.log("result",result);
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully'); else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled") console.log(result); else if(result == "Cancelled") console.log(result);
else showAlert('Manager assigning/updation failed!!!'); else showAlert('Manager assigning/updation failed!!!');
...@@ -209,7 +212,6 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -209,7 +212,6 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
$scope.cancel = function() { $scope.cancel = function() {
$mdDialog.hide(); $mdDialog.hide();
}; };
$scope.deleteRole = function(row){ $scope.deleteRole = function(row){
$('#home').addClass('md-scroll-mask'); $('#home').addClass('md-scroll-mask');
var confirm = $mdDialog.confirm() var confirm = $mdDialog.confirm()
...@@ -249,15 +251,65 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -249,15 +251,65 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
} }
function AddProjectController($scope, $mdDialog, dataToPass,gridOptionsData, managers, $window, $mdSelect) {
function AddProjectController($scope, $mdDialog, dataToPass,gridOptionsData, managers) {
$scope.templateTitle = dataToPass.action; $scope.templateTitle = dataToPass.action;
$scope.alertMsg = ""; $scope.alertMsg = "";
$scope.isDisabled = false; $scope.isDisabled = false;
$scope.result = ""; $scope.result = "";
$scope.managerDetails = managers; $scope.managerDetails = managers;
$scope.prjctStses=["Active","Completed","On Hold","Proposed"]; $scope.employee;
$scope.projectModel;
$scope.isSecondTab = false;
$scope.prjctStses=["Active","Completed","On Hold","Proposed"];
$scope.billableStatuses = ["Billable","Shadow","Non-Billable","Reserved"];
$scope.accounts=myFactory.getAccounts(); $scope.accounts=myFactory.getAccounts();
$scope.selectedTab = 0;
$scope.addTab = function () {
if($scope.isSecondTab === false){
$scope.templateTitle = "Add";
document.getElementsByClassName("md-tab")[1].style.visibility = "visible" ;
$scope.isSecondTab = true;
$scope.selectedTab = 1;
}
};
var removeTab = function (action) {
if(action == "Add"){
if($scope.isSecondTab === true){
$('.md-select-value')[0].childNodes[0].innerHTML = null
$('.md-select-value')[1].childNodes[0].innerHTML = null
$('.md-datepicker-input')[0].value = null;
$('.md-datepicker-input')[1].value = null;
$('.md-datepicker-input')[2].value = null;
$scope.employeeModel = {};
}
}
$scope.selectedTab = 0;
document.getElementsByClassName("md-tab")[1].style.visibility = "hidden" ;
$scope.isSecondTab = !$scope.isSecondTab;
};
$window.addEventListener('click',function(e){
$mdSelect.hide();
})
$scope.getEmployeeDetails = function(){
$http({
method : "GET",
url : appConfig.appUri + "projectTeam/getEmployeesToTeam"
}).then(function mySuccess(response) {
$scope.employeeList =response.data;
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
});
};
if(dataToPass.action == "Assign"){ if(dataToPass.action == "Assign"){
$scope.projectId = ""; $scope.projectId = "";
$scope.projectName = ""; $scope.projectName = "";
...@@ -284,12 +336,27 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -284,12 +336,27 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
}; };
$scope.managerDetails = managers; $scope.managerDetails = managers;
$scope.isDisabled = true; $scope.isDisabled = true;
}else if(dataToPass.action == "View"){
}
else if(dataToPass.action == "View"){
$scope.projectId = dataToPass.projectId; $scope.projectId = dataToPass.projectId;
$scope.account = dataToPass.account;
$scope.projectName = dataToPass.projectName; $scope.projectName = dataToPass.projectName;
$scope.managerId = dataToPass.managerId; $scope.managerId = dataToPass.managerId;
$scope.managerName = dataToPass.managerName; $scope.managerName = dataToPass.managerName;
$scope.projectStatus = dataToPass.status; $scope.projectStatus = dataToPass.status;
$scope.domain = dataToPass.domain;
$scope.managerModel = {
'employeeName': dataToPass.managerName,
'employeeId': dataToPass.managerId
};
$scope.projectModel = {
'projectName': dataToPass.projectName,
'projectId': dataToPass.projectId
};
var employeeModel = $scope.employeeModel;
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>'; 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 = { $scope.gridOptions = {
paginationPageSizes : [ 10, 20, 30, 40, 50, 100], paginationPageSizes : [ 10, 20, 30, 40, 50, 100],
...@@ -316,6 +383,13 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -316,6 +383,13 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
showAlert("Something went wrong while fetching data!!!"); showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = []; $scope.gridOptions.data = [];
}); });
document.addEventListener("DOMSubtreeModified", function(e) {
if(document.getElementsByClassName("md-tab")[1] && (document.getElementsByClassName("md-tab")[1].style.visibility === "")){
document.getElementsByClassName("md-tab")[1].style.visibility = "hidden" ;
}
}, false);
}else if(dataToPass.action == "UnAssigned"){ }else if(dataToPass.action == "UnAssigned"){
$scope.gridOptions = { $scope.gridOptions = {
paginationPageSizes : [ 10, 20, 30, 40, 50, 100], paginationPageSizes : [ 10, 20, 30, 40, 50, 100],
...@@ -396,6 +470,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -396,6 +470,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
] ]
}; };
$scope.isDisabled = true; $scope.isDisabled = true;
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "/projectTeam/getProjectAllocations" url : appConfig.appUri + "/projectTeam/getProjectAllocations"
...@@ -489,57 +564,172 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -489,57 +564,172 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
return false; return false;
} }
$scope.validateFields = function(){ $scope.currentBillabilityDateChange = function(){
$scope.startDate = $scope.newBillingStartDate ;
}
$scope.validateFields = function(action){
var project = $scope.projectId; var project = $scope.projectId;
var projectName = $scope.projectName; var projectName = $scope.projectName;
var managerModel = $scope.managerModel; var managerModel = $scope.managerModel;
// if(project == ""){ var account = $scope.account;
// $scope.alertMsg = "Project ID is mandatory"; var managerId=$scope.managerId;
// document.getElementById('projectId').focus(); var managerName=$scope.managerName;
// }else
if(projectName == ""){
$scope.alertMsg = "Project Name is mandatory";
document.getElementById('projectName').focus();
}else if(account == undefined || account == ""){
$scope.alertMsg = "Account is mandatory";
document.getElementById('account').focus();
}else if(domain == undefined || domain == ""){ var employeeModel = $scope.employeeModel;
$scope.alertMsg = "Domain is mandatory"; var projectModel = $scope.projectModel;
document.getElementById('domain').focus(); var domain = $scope.domain;
} var newBillingStartDate = $scope.newBillingStartDate
else if(managerModel == undefined){
$scope.alertMsg = "Please select a manager"; if(action === "Add"){
}else{ if(employeeModel == undefined){
$scope.alertMsg = ""; $scope.alertMsg = "Please select a employee";
var record = {"projectId":$scope.projectId, "projectName": $scope.projectName, "managerId": $scope.managerModel.employeeId, "managerName": $scope.managerModel.employeeName, "status": $scope.projectStatus,"account": $scope.account.accountName,"domain": $scope.domain}; angular.element(document.getElementById('selectEmp')).focus();
addOrUpdateProject(record, $scope.templateTitle); }
$timeout(function(){updateGrid($scope.templateTitle, record)},500); else if($scope.empBillableStatus == undefined){
$scope.alertMsg = "Please select a billable status";
angular.element(document.getElementById('empBillableStatus')).focus();
}else if($scope.startDate == undefined) {
$scope.alertMsg = "Please select Start Date";
angular.element(document.getElementById('startDate')).focus();
}else if($scope.endDate == undefined) {
$scope.alertMsg = "Please select End Date";
angular.element(document.getElementById('endDate')).focus();
}else if($scope.newBillingStartDate == undefined){
$scope.alertMsg = "Please select new Billing StartDate";
angular.element(document.getElementById('newBillingStartDate')).focus();
}
else if($scope.newBillingStartDate > $scope.endDate){
$scope.alertMsg = "Assignment End Date should be less than Current Billability Start Date ";
}
else if(employeeModel != undefined && projectModel != undefined
&& getExistingRecordProjectStatus(employeeModel.employeeId, projectModel.projectName)){
$scope.alertMsg = "Employee is already assigned to the selected project";
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};
addRecord(record,action);
$timeout(function(){
updateGrid('Add',record);
removeTab('Add');
$mdDialog.show($mdDialog.alert({
skipHide: true,
textContent: 'Employee Added',
ok: 'ok'
}));
},500);
}
}
else{
// if(project == ""){
// $scope.alertMsg = "Project ID is mandatory";
// document.getElementById('projectId').focus();
// }else
if(projectName == ""){
$scope.alertMsg = "Project Name is mandatory";
document.getElementById('projectName').focus();
}else if(account == undefined || account == ""){
$scope.alertMsg = "Account is mandatory";
document.getElementById('account').focus();
}else if(domain == undefined || domain == ""){
$scope.alertMsg = "Domain is mandatory";
document.getElementById('domain').focus();
} }
else if(managerModel == undefined){
$scope.alertMsg = "Please select a manager";
}
else{
$scope.alertMsg = "";
var record = {"projectId":$scope.projectId, "projectName": $scope.projectName, "managerId": $scope.managerModel.employeeId, "managerName": $scope.managerModel.employeeName, "status": $scope.projectStatus,"account": $scope.account.accountName,"domain": $scope.domain};
addOrUpdateProject(record, $scope.templateTitle);
$timeout(function(){updateGrid($scope.templateTitle, record)},500);
}
}
};
$scope.cancelDialog = function() {
$mdDialog.hide('Cancelled');
}; };
$scope.cancelTab = function() {
removeTab("cancel");
};
$scope.cancel = function() { $scope.cancel = function() {
$mdDialog.hide('Cancelled'); $mdDialog.hide('Cancelled');
}; };
$scope.getEmployeeSelected = function(){
if ($scope.employeeModel !== undefined) {
$scope.employee=$scope.employeeModel;
return $scope.employeeModel.employeeName;
} else {
return "Please select a employee";
}
};
// $scope.getProjectSelected = function(){
// if ($scope.projectModel !== undefined) {
// $scope.project=$scope.projectModel;
// return $scope.projectModel.projectName;
// } else {
// return "Please select a project";
// }
// };
$scope.getSelectedBillableStatus = function(){
if ($scope.empBillableStatus !== undefined) {
return $scope.empBillableStatus;
} else {
return "Please select a billable status";
}
};
function updateGrid(action, record){ function updateGrid(action, record){
if($scope.alertMsg == ""){ if($scope.alertMsg == ""){
if($scope.result == "Success"){ if($scope.result == "Success"){
if(action == "Assign"){ if(action == "Assign"){
gridOptionsData.push(record); gridOptionsData.push(record);
$mdDialog.hide(action);
}else if(action == "Update"){ }else if(action == "Update"){
var existingRecord = getRowEntity($scope.projectId); var existingRecord = getRowEntity($scope.projectId);
var index = gridOptionsData.indexOf(existingRecord); var index = gridOptionsData.indexOf(existingRecord);
gridOptionsData[index] = record; gridOptionsData[index] = record;
$mdDialog.hide(action);
}
else if(action == "Add"){
$scope.gridOptions.data.push(record);
} }
$mdDialog.hide(action); // $mdDialog.hide(action);
}else{ }else{
$mdDialog.hide("Error"); $mdDialog.hide("Error");
} }
} }
} }
function addRecord(record, action){
var urlRequest = "";
urlRequest = appConfig.appUri+ "projectTeam/addEmployeeToTeam";
var req = {
method : 'POST',
url : urlRequest,
headers : {
"Content-type" : "application/json"
},
data : record
}
$http(req).then(function mySuccess(response) {
$scope.result = "Success";
$scope.objectId = response.data.id;
}, function myError(response){
$scope.result = "Error";
});
}
function addOrUpdateProject(record, action){ function addOrUpdateProject(record, action){
...@@ -572,5 +762,16 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ ...@@ -572,5 +762,16 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
} }
} }
} }
function getExistingRecordProjectStatus(empId, projectName){
for(var i=0;i<$scope.gridOptions.data.length;i++){
var record = $scope.gridOptions.data[i];
if(record.employeeId == empId){
if(record.active == true && record.projectName == projectName)
return true;
}
}
return false;
}
} }
}); });
\ No newline at end of file
...@@ -146,3 +146,12 @@ md-dialog{ ...@@ -146,3 +146,12 @@ md-dialog{
.md-select-menu-container { .md-select-menu-container {
z-index: 100 !important; z-index: 100 !important;
} }
.md-dialog-custom-height {
max-height: 95% !important;
}
.md-content{
height: 1100px !important;
}
\ No newline at end of file
<md-dialog aria-label="Team Details" style="width:950px;height:auto;" class="md-dialog-custom-height" ng-init="getEmployeeDetails()" >
<form ng-cloak name="myForm ">
<md-toolbar>
<div class="md-toolbar-tools " style="background: cadetblue; ">
<h2>Team Details </h2>
<span flex></span>
<md-button class="md-icon-button " ng-click="cancelDialog() ">
<i class="fa fa-times fa-2x " style="margin-top: 5px; font-size: 1.5em; float: left "></i>
</md-button>
</div>
</md-toolbar>
<section layout="row" style="background-color: #fafafa;padding-top: 40px;" layout-sm="column" layout-align="end end" layout-wrap>
<md-button class="md-raised " class="pull-right" data-ng-click="addTab()" style="width:120px;background: cadetblue;color:white; " ng-show="!isSecondTab">Add</md-button>
</section>
<md-content style="height:1100px !important">
<md-tabs md-dynamic-height=" " md-border-bottom=" " md-selected="selectedTab">
<md-tab label="Team Details ">
<md-content class="md-padding ">
<md-dialog-content>
<div class="md-dialog-content ">
<div class="form-group ">
<div class="row col-lg-12 " style="margin-left: 0px; ">
<div class="row col-lg-12 col-xs-12 ">
<div class="col-xs-6 text-center ">
<p>
<b>Project Name:</b> {{projectName}}
</p>
</div>
<div class="col-xs-6 text-center ">
<p>
<b>Manager Name:</b>&nbsp;&nbsp;&nbsp; {{managerName}}
</p>
</div>
<md-dialog aria-label="Team Details" style="width:950px;height:450px;"> </div>
<form ng-cloak name="myForm"> <div id="gridTest " ui-grid="gridOptions " ui-grid-pagination style="width:99%;height:230px;margin-left:10px; ">
<md-toolbar> <div class="watermark " ng-show="!gridOptions.data.length ">No data available</div>
<div class="md-toolbar-tools" </div>
style="background: cadetblue;"> </div>
<h2>Team Details </h2> </div>
<span flex></span> </div>
<md-button class="md-icon-button" ng-click="cancel()"> <i </md-dialog-content>
class="fa fa-times fa-2x" </md-content>
style="margin-top: 5px; font-size: 1.5em; float: left"></i> </md-button> </md-tab>
</div> <md-tab label="Add Team Mate" id="tab2">
</md-toolbar> <md-content class="md-padding ">
<form ng-cloak name="myForm" id="myForm">
<!-- <md-toolbar>
<div class="md-toolbar-tools " style="background: cadetblue; ">
<h2>Add Team Mate </h2>
<span flex></span>
<md-button class="md-icon-button " ng-click="cancel() ">
<i class="fa fa-times fa-2x " style="margin-top: 5px; font-size: 1.5em; float: left "></i>
</md-button>
</div>
</md-toolbar> -->
<div class="md-dialog-content ">
<div class="form-group ">
<div class="row col-lg-12 " style="margin-left: 0px; ">
<div class="row col-lg-12 col-xs-12 ">
<div class="col-xs-6 text-center ">
<p>
<b>Project Name:</b> {{projectName}}
</p>
</div>
<div class="col-xs-6 text-center ">
<p>
<b>Manager Name:</b>&nbsp;&nbsp;&nbsp; {{managerName}}
</p>
</div>
</div>
<md-select ng-model="employeeModel " md-selected-text="getEmployeeSelected() " id="selectEmp" name="employeeModel">
<md-optgroup label="Employee ">
<md-option ng-value="employee " ng-repeat="employee in employeeList ">{{employee.employeeName}}</md-option>
</md-optgroup>
</md-select>
<output>Employee Name : {{employeeModel.employeeName}}</output>
<output>Employee Id : {{employeeModel.employeeId}}</output>
<output>Email Id : {{employeeModel.emailId}}</output>
<output>Role : {{employeeModel.role}}</output>
<output>Designation : {{employeeModel.designation}}</output>
<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>
</md-optgroup>
</md-select>
<div ng-show="empBillableStatus">
<md-datepicker ng-model="newBillingStartDate" md-placeholder="newBillingStartDate " id="newBillingStartDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " ng-change="currentBillabilityDateChange()"name="newBillingStartDate"></md-datepicker>
</div>
<md-datepicker ng-model="startDate " md-placeholder="Start Date " id="startDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " ng-disabled="newBillingStartDate" name="startDate"></md-datepicker>
</br>
<md-datepicker ng-model="endDate " md-placeholder="Projected End Date " id="endDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="endDate"></md-datepicker>
<md-dialog-content> <div role="alert ">
<div class="md-dialog-content"> <span class="error " style="color: red; ">{{alertMsg}}</span>
<div class="form-group"> </div>
<div class="row col-lg-12" style="margin-left: 0px;"> </div>
<div class="row col-lg-12 col-xs-12"> </div>
<div class="col-xs-6 text-center"> <md-dialog-actions layout="row ">
<p> <md-button class="md-raised " data-ng-click="validateFields(templateTitle) " style="width:120px;background: cadetblue;color:white; ">Add
<b>Project Name:</b> {{projectName}} </md-button>
</p> <md-button class="md-raised " ng-click="cancelTab() " style="width:120px;background: cadetblue;color:white; ">
</div> Cancel </md-button>
<div class="col-xs-6 text-center"> </md-dialog-actions>
<p> </form>
<b>Manager Name:</b>&nbsp;&nbsp;&nbsp; {{managerName}} </md-content>
</p> </md-tab>
</div> </md-tabs>
</md-content>
</div> </form>
<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>
</div>
</div>
</div>
</md-dialog-content>
<md-dialog-actions layout="row"> <md-button class="md-raised" ng-click="cancel()" style="width:120px;background: cadetblue;color:white;">
Close </md-button> </md-dialog-actions>
</form>
</md-dialog> </md-dialog>
\ No newline at end of file
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