Commit d956888e authored by Prayas Jain's avatar Prayas Jain

Updated_UPDATE_TEAMMATE_AND_UI

parent fc54bb12
......@@ -3,7 +3,8 @@ myApp.directive('hcPieChart', function () {
restrict: 'E',
template: '<div></div>',
link: function (scope, element) {
getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element,"Billability By Account");
getEmployeeDetails(scope,element[0].baseURI+'reports/getEmployeesByFunctionalGroup','pie',element,"Employees Overview Report");
//getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element,"Billability By Account");
scope.clickMe= function() {
if(scope.reportId == 1){
getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element," Billability By Account");
......@@ -20,9 +21,10 @@ myApp.directive('hcPieChart', function () {
$scope.name = [];
$scope.records = [];
$scope.empSearchId = "";
$scope.reportId = "1"
//$scope.reportId = "1"
$scope.reportId = "2"
$scope.reports = $scope.reportId;
$scope.reports=[ {Name:"Billability Report",Id:"1"},{Name:"Employees By Functional Group",Id:"2"},{Name:"Billability Monthly Trends",Id:"3"}];
$scope.reports=[ /*{Name:"Billability Report",Id:"1"},*/{Name:"Employees By Functional Group",Id:"2"},{Name:"Billability Monthly Trends",Id:"3"}];
$scope.employees = [];
......
myApp.controller("projectController", function ($scope, myFactory, exportUiGridService, $mdDialog, $http, appConfig, $timeout, $window, $mdSelect, $element) {
myApp.controller("projectController", function ($scope,uiGridConstants, myFactory, exportUiGridService, $mdDialog, $http, appConfig, $timeout, $window, $mdSelect, $element) {
$scope.records = [];
$scope.isEditable = false;
$scope.empSearchId = "";
$scope.parentData = {
"projectId": "",
......@@ -604,27 +605,55 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
//$scope.isSecondTab = ($scope.projectId == 'Nisum0000');
var employeeModel = $scope.employeeModel;
var getCellTemplate1 = '<p class="col-md-6 col-md-offset-3"><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,\'UpdateTeam\')"></i><p>'
var getCellTemplate1 = '<p class="col-lg-12"><i ng-show="!row.entity.editrow" 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.edit(row.entity)"></i>'+
'<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.saveRow(row.entity,\'Update\')"></i>'
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="row.entity.editrow" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.cancelEdit(row.entity)"></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;" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
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 = {
paginationPageSizes: [10, 20, 30, 40, 50, 100],
paginationPageSize: 10,
pageNumber: 1,
pageSize: 10,
enableFiltering:true,
enableCellEdit:false,
columnDefs: [
{ field: 'employeeId', displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, width: 100, enableFiltering:true},
{ field: 'employeeName', displayName: 'Emp Name ', enableColumnMenu: false, enableSorting: false,enableFiltering:true },
{ name: 'employeeId', displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, width:80, enableFiltering:true ,enableCellEdit: true },
{ field: 'employeeName', displayName: 'Emp Name ', enableColumnMenu: false, enableSorting: false,enableFiltering:true,sort: {
direction: uiGridConstants.ASC,
priority: 0,
} },
// { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false },
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{field: 'resourceRole', displayName:'Role', enableColumnMenu: true, enableSorting: false,enableFiltering:false},
{ field: 'designation', displayName: 'Designation ', enableColumnMenu: false, enableSorting: false,enableFiltering:false },
// { field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate },
{ field: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false},
{ field: 'billingStartDate', displayName: 'Start Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false},
{ field: 'billingEndDate', displayName: 'End Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false},
{
field: 'resourceRole', displayName:'Role', enableColumnMenu: true, enableSorting: false,enableFiltering:false,
cellTemplate:'<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" id="empRole">'
+'<md-optgroup label="employee role"><md-option ng-value="empRole" ng-repeat="empRole in col.colDef.editDropdownOptionsArray">{{empRole}}</md-option>'
+'</md-optgroup></md-select></div>',
editDropdownOptionsArray: [
'Individual Contributor' ,
'Lead' ]
},
{ field: 'designation', resourceRole: 'Designation ', enableColumnMenu: false, enableSorting: false,enableFiltering:false },
{
name: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" name="empBillableStatus" append-to-body="true">'
+ '<md-optgroup label="billable statuses "><md-option ng-value="billableStatus " ng-repeat="billableStatus in col.colDef.editDropdownOptionsArray">{{billableStatus}}</md-option>'
+'</md-optgroup></md-select></div>',editDropdownOptionsArray: [
'Billable' ,
'Shadow' ,
'Non-Billable',
'Reserved' ,
'Trainee' ]
},
{ field: 'billingStartDate', displayName: 'Start Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false, width:160,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" md-placeholder="Plase select Date " id="newBillingStartDate " md-min-date="minDate "md-max-date="maxDate " name="newBillingStartDate"></md-datepicker></div>'},
{ field: 'billingEndDate', displayName: 'End Date ', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false, width:160,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" id="endDate " name="endDate">{{MODEL_COL_FIELD}}</md-datepicker></div>'},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false}
]
};
......@@ -680,10 +709,76 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
"startDate":"",
"endDate":"",
"newBillingStartDate":"",
"empBillableStatuses":[]
};
$scope.getRowData = function(row, action){
console.log(row.entity)
$scope.edit = function (row) {
var index = $scope.gridOptions.data.indexOf(row);
for(var i =0; i<$scope.gridOptions.data.length; i++){
if(i==index){
$scope.gridOptions.data[i].editrow = !$scope.gridOptions.data[i].editrow;
}
else{
$scope.gridOptions.data[i].editrow = false;
}
}
row.billingStartDate = new Date(row.billingStartDate);
row.billingEndDate = new Date(row.billingEndDate);
$scope.parentData.employeeId = row.employeeId;
$scope.parentData.employeeName = row.employeeName;
$scope.parentData.emailId = row.emailId;
$scope.parentData.id = row.id;
$scope.parentData.role = row.resourceRole;
$scope.parentData.projectId = row.projectId;
$scope.parentData.projectName = row.projectName;
$scope.parentData.designation = row.designation;
$scope.parentData.billableStatus = row.billableStatus;
$scope.parentData.employeeModel = {
'employeeName': row.employeeName,
'employeeId': row.employeeId,
'emailId':row.emailId,
'designation': row.designation
};
$scope.parentData.newBillingStartDate = row.billingStartDate;
$scope.parentData.endDate = row.billingEndDate;
};
$scope.cancelEdit = function (row) {
var index = $scope.gridOptions.data.indexOf(row);
$scope.gridOptions.data[index].editrow = false;
$scope.alerts.push({
msg: 'Row editing cancelled',
type: 'info'
});
};
$scope.saveRow = function (row,action) {
var index = $scope.gridOptions.data.indexOf(row);
$scope.gridOptions.data[index].editrow = false;
$scope.projectId = row.projectId;
$scope.projectName = row.projectName;
$scope.account = row.account;
$scope.managerId = row.managerId
$scope.managerName = $scope.managerName ;
$scope.employeeModel = {
'employeeName': row.employeeName,
'employeeId': row.employeeId,
'emailId':row.emailId,
'designation': row.designation
};
$scope.newBillingStartDate = row.billingStartDate;
$scope.endDate = row.billingEndDate;
$scope.employeeRole = row.resourceRole;
$scope.empBillableStatus = row.billableStatus;
$scope.id = row.id;
if(action == 'Update'){
$scope.validateFields(action);
}
}
// $scope.getRowData = function(row, action){
// $scope.isEditable = true;
/* $scope.showUpdateBtn = false;
$scope.showEditDisplay = false;
$scope.parentData.empBillableStatuses = [{billableStatus:'Billable' , billableStartDate : 1558031400000, billableEndDate : 1558031400001},{billableStatus:'Shadow' , billableStartDate : 1558031400001, billableEndDate : 1577125800001}];
$scope.parentData.employeeId = row.entity.employeeId;
$scope.parentData.employeeName = row.entity.employeeName;
$scope.parentData.emailId = row.entity.emailId;
......@@ -697,18 +792,19 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.parentData.billableStatus = row.entity.billableStatus;
//$scope.parentData.shift = row.entity.shift;
//$scope.parentData.mobileNumber = row.entity.mobileNumber;
$scope.parentData.employeeModel = {}
$scope.parentData.newBillingStartDate = row.entity.billingStartDate;
$scope.parentData.employeeModel = {};
//$scope.parentData.startDate = new Date(row.entity.startDate);
$scope.parentData.endDate = new Date(row.entity.billingEndDate);
$scope.parentData.newBillingStartDate = new Date(row.entity.billingStartDate);
$scope.parentData.endDate = new Date(dataToPass.projectEndDate);
console.log($scope.parentData)
if(action == "UpdateTeam"){
$scope.updateTeamMate(action, $scope.parentData);
$scope.isEdit = true;
//$scope.updateTeamMate(action, $scope.parentData);
}
if(action == "Delete"){
$scope.deleteTeamMate(row);
}
}*/
// else if(action == "Delete"){
// $scope.deleteRole(row,$scope.parentData.id);
// }else if(action=="ViewTeamDetail"){
......@@ -720,7 +816,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// $scope.ViewBillability(action, $scope.parentData);
//
// }
}
//}
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" ;
......@@ -745,20 +841,22 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope.getTeamMates = function(){
getProjectDetails($scope.projectId,$scope.status);
}
$scope.updateTeamMate = function(action, userData){
/* $scope.updateTeamMate = function(action, userData){
$scope.updateTab();
$scope.id = userData.id;
$('.md-datepicker-input')[2].value = null;
$scope.employeeModel = {
'employeeName': userData.employeeName,
'employeeId': userData.employeeId,
'emailId':userData.emailId,
'designation': userData.designation
};
$scope.empBillableStatuses = userData.empBillableStatuses;
// $scope.employeeModel.employeeId = userData.employeeId;
// $scope.employeeModel.employeeName = userData.employeeName;
// $scope.employeeModel.emailId = userData.emailId;
$scope.empBillableStatus = userData.billableStatus;
$scope.employeeModel.employeeId = userData.employeeId;
$scope.employeeModel.employeeName = userData.employeeName;
$scope.employeeModel.emailId = userData.emailId;
$scope.empBillableStatus =null;
if(userData.role == "Individual Contributor"){
$scope.employeeRole = "Employee";
}else{
......@@ -767,30 +865,30 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
console.log($scope.employeeRole)
//$scope.employeeRole = userData.role;
//$scope.employeeShift = userData.shift;
$scope.newBillingStartDate = new Date(userData.newBillingStartDate);
$scope.newBillingStartDate = null;
//$scope.startDate = new Date(userData.startDate);
$scope.endDate = new Date(userData.endDate);
//$scope.addTab();
//$('#home').addClass('md-scroll-mask');
userData.action = action;
// $mdDialog.show({
// controller: AddProjectController,
// templateUrl: 'templates/UpdateTeamMate.html',
// parent: angular.element(document.body),
// clickOutsideToClose:false,
// 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") {
//// $scope.refreshPage();
//// showAlert('Teammate updated successfully');
////
//// }
//// else if(result == "Cancelled") {}
//// else showAlert('Teammate assigning/updation failed!!!');
// });
};
$mdDialog.show({
controller: AddProjectController,
templateUrl: 'templates/UpdateTeamMate.html',
parent: angular.element(document.body),
clickOutsideToClose:false,
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") {
$scope.refreshPage();
showAlert('Teammate updated successfully');
}
else if(result == "Cancelled") {}
else showAlert('Teammate assigning/updation failed!!!');
});
};*/
$scope.deleteTeamMate = function (row) {
$scope.id = row.entity.id;
$scope.employeeId = row.entity.employeeId;
......@@ -922,7 +1020,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
};
$scope.changeEmpBillableStatus = function(){
//$scope.newBillingStartDate = null;
// $scope.newBillingStartDate = null;
if($scope.templateTitle == "Add"){
$('.md-datepicker-input')[0].value = null;
......@@ -932,6 +1030,16 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$('.md-datepicker-input')[3].value = new Date(dataToPass.projectEndDate);
}
}
/* $scope.getEditTeammate = function(selectedStatus) {
if(selectedStatus) {
$scope.showEditDisplay = true;
$scope.showUpdateBtn = true;
$scope.empBillableStatus = selectedStatus.billableStatus;
$scope.newBillingStartDate = new Date(selectedStatus.billableStartDate);
$scope.endDate = new Date(selectedStatus.billableEndDate);
}
}*/
var noDomainError = function(){
$mdDialog.show($mdDialog.alert({
......@@ -1173,6 +1281,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$scope.validateFields = function (action) {
var project = $scope.projectId;
var projectName = $scope.projectName;
var account = $scope.account;
......@@ -1359,13 +1468,13 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope.DataUpdate = function () {
var data = $scope.parentData;
if (data.role == "Individual Contributor") {
/* if (data.role == "Individual Contributor") {
var roleselected = "Employee";
} else {
roleselected = data.role;
}
}*/
$scope.previousData = {
Role: roleselected,
Role: data.role,
//Shift: data.shift,
Billabilitystatus: data.billableStatus,
newBilligStartDate: new Date(data.newBillingStartDate),
......@@ -1581,7 +1690,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if(response.data.message == "Resource updated successfully"){
$timeout(function () {
getProjectDetails($scope.projectId, $scope.status);
removeTab('Add');
}, 500);
}
$mdDialog.show($mdDialog.alert({
......
......@@ -599,6 +599,9 @@ cursor: pointer;
.update-Teammate>h4 {
border-bottom: 1px solid #ccc;
padding-bottom : 5px;
}
.update-teammate-dropdown md-select {
margin : -6px 0 0 0;
}
.panel-default>.panel-heading {
color: #fff;
......@@ -608,5 +611,13 @@ cursor: pointer;
}
.update-Teammate .form-inline {
margin-bottom : 15px;
}
.billable-table {
margin-top : 10px;
}
.billable-table .table {
margin : 0px;
}
.grid-Dropdown md-select {
margin : 0px;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<form ng-cloak name="myForm ">
<md-toolbar>
<div class="md-toolbar-tools " style="background: cadetblue; ">
<h2>Team Details </h2>
<h2>{{projectName}} Team </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>
......@@ -22,9 +22,9 @@
<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-left ">
<p>
<!-- <p>
<b>Project Name:</b> {{projectName}}
</p>
</p> -->
<p>
<b>Project Start Date:</b> {{projectStartDate | date : 'dd-MMM-yyyy'}}
</p>
......@@ -46,9 +46,12 @@
<input type="radio" ng-model="status" value="Both" ng-click="getTeamMates()"> Both
</div>
<div id="gridTest " ui-grid="gridOptions " ui-grid-pagination style="width:99%;height:230px;margin-left:10px; ">
<div id="gridTest" class="grid-half-view" ui-grid="gridOptions " ui-grid-edit 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 role="alert">
<span style="color: red; ">{{alertMsg}}</span>
</div>
</div>
</div>
</div>
......@@ -70,18 +73,18 @@
<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 ">
<!-- <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>
<div class="col-xs-6 text-center ">
<p>
<b>Manager Name: </b><span ng-repeat="manager in deliveryLeadIds">{{manager.employeeName}}<span ng-hide="$last">,</span></span>
</p>
</div>
</div>
</div> -->
<table>
<tr>
<td>Select a Employee</td>
......@@ -186,126 +189,118 @@
</md-tab>
<md-tab label="Update Team Mate" id="tab3">
<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>
<span ng-repeat="manager in deliveryLeadIds">{{manager.employeeName}}
<span ng-hide="$last">,</span>
</span>
</p>
</div>
</div>
<!-- <md-select ng-model="employeeModel" data-md-container-class="selectHeader" md-selected-text="getEmployeeSelected() " id="selectEmp" name="employeeModel" ng-disabled="addOrUpdateFlag">
<md-select-header class="selectHeaderChild header-spacing" layout="column">
<input ng-model="searchTerm" type="search" id="search" ng-keydown="updateSearch($event)" ng-model-options="{debounce: {'default': 500, 'blur': 0}}"
placeholder="Please search for a employee" class="searchBoxHeader demo-header-searchbox md-text search-spacingleft" />
<span class="glyphicon glyphicon-remove close-mdselect" ng-click="closeSelectBox()"></span>
</md-select-header>
<md-optgroup label="Employee " class="optionScroll">
<md-option ng-value="employee " ng-repeat="employee in employeeList | filter:searchFilter">{{employee.employeeName}}</md-option>
</md-optgroup>
</md-select> -->
<table>
<tr>
<td class="Employee">Employee Name : </td>
<td>{{employeeModel.employeeName}}</td>
</tr>
<tr>
<td class="Employee"> Employee Id :</td>
<td>{{employeeModel.employeeId}}</td>
</tr>
<tr>
<td class="Employee">Email Id :</td>
<td>{{employeeModel.emailId}}</td>
</tr>
<tr>
<td class="Employee">Designation : </td>
<td>{{employeeModel.designation}}</td>
</tr>
<tr>
<td class="Employee"> Assigned Role</td>
<td>
<md-select ng-model="employeeRole" md-selected-text="getSelectedEmpRole()" id="empRole">
<md-optgroup label="employee role">
<md-option ng-value="empRole" ng-repeat="empRole in employeeRoles">{{empRole}}</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
<!-- <tr>
<td class="Employee">Shift</td>
<td>
<md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift">
<md-optgroup label="employee shift">
<md-option ng-value="empShift" ng-repeat="empShift in employeeShifts">{{empShift}}</md-option>
</md-optgroup>
</md-select>
</td>
</tr> -->
<tr>
<td class="Employee">Billability Status</td>
<td>
<md-select ng-model="empBillableStatus " md-selected-text="getSelectedBillableStatus() " id="empBillableStatus" name="empBillableStatus" ng-change="changeEmpBillableStatus()" >
<form ng-cloak name="myForm" id="myForm">
<div class="md-dialog-content ">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">Employee Details</div>
<div class="panel-body update-Teammate">
<div class="form-inline col-lg-12">
<div class="row">
<div class="form-group row col-lg-6 col-md-6">
<label class="Employee col-lg-5">Employee Name :</label>
<span>{{employeeModel.employeeName}}</span>
</div>
<div class="form-group col-lg-6 col-md-6">
<label class="Employee">Employee Id :</label>
<span>{{employeeModel.employeeId}}</span>
</div>
</div>
</div>
<div class="form-inline col-lg-12">
<div class="row">
<div class="form-group row col-lg-6 col-md-6">
<label class="Employee col-lg-5">Designation : </label>
<span>{{employeeModel.designation}}</span>
</div>
<div class="form-group col-lg-6 col-md-6">
<label class="Employee">Email Id :</label>
<span>{{employeeModel.emailId}}</span>
</div>
</div>
</div>
<div class="form-inline col-lg-12">
<div class="row">
<div class="form-group row col-lg-6 col-md-6 update-teammate-dropdown">
<label class="Employee col-lg-5">Assigned Role : </label>
<md-select ng-model="employeeRole" md-selected-text="getSelectedEmpRole()" id="empRole">
<md-optgroup label="employee role">
<md-option ng-value="empRole" ng-repeat="empRole in employeeRoles">{{empRole}}</md-option>
</md-optgroup>
</md-select>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Resource Allocation</div>
<div class="panel-body">
<div class="form-inline col-lg-12">
<div class="row">
<div class="form-group row col-lg-6 col-md-6 update-teammate-dropdown">
<label class="Employee col-lg-5">Billability Status : </label>
<md-select ng-model="empBillableStatus " md-selected-text="getSelectedBillableStatus() " id="empBillableStatus" name="empBillableStatus" ng-change="changeEmpBillableStatus()" >
<md-optgroup label="billable statuses ">
<md-option ng-value="billableStatus " ng-repeat="billableStatus in billableStatuses ">{{billableStatus}}</md-option>
<md-option ng-value="billableStatus " ng-repeat="billableStatus in billableStatuses ">{{billableStatus}}</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
<tr ng-show="empBillableStatus">
<td>{{empBillableStatus}} Start Date </td>
<td>
<md-datepicker ng-model="newBillingStartDate" md-placeholder="Plase select Date " id="newBillingStartDate " md-min-date="minDate "
md-max-date="maxDate " onkeydown="return false "
name="newBillingStartDate"></md-datepicker>
</td>
</tr>
<!-- <tr>
<td class="Employee">Start Date</td>
<td>
<md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="startDate"></md-datepicker>
</td>
</tr> -->
<tr ng-show="empBillableStatus">
<td class="Employee">{{empBillableStatus}} End Date</td>
<td>
<md-datepicker ng-model="endDate " md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="endDate"></md-datepicker>
</td>
</tr>
</table>
</div>
<div class="form-group col-lg-6 col-md-6" style="margin-top: -5px;">
<label class="Employee">{{empBillableStatus}} Start Date :</label>
<md-datepicker ng-model="newBillingStartDate" md-placeholder="Plase select Date " id="newBillingStartDate " md-min-date="minDate "
md-max-date="maxDate " onkeydown="return false "
name="newBillingStartDate">
</md-datepicker>
</div>
</div>
</div>
<div class="form-inline col-lg-12">
<div class="row">
<div class="form-group col-lg-6 col-md-6">
<label class="Employee">{{empBillableStatus}} End Date :</label>
<md-datepicker ng-model="endDate " md-placeholder="Please select Date" id="endDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="endDate"></md-datepicker>
</div>
<md-button class="md-raised " ng-if="!showUpdateBtn" data-ng-click="validateFields('Update') " style="width:120px;background: #3f51b5;color:white; ">Add </md-button>
<md-button class="md-raised " ng-if="showUpdateBtn" data-ng-click="validateFields('Update') " style="width:120px;background: #3f51b5;color:white; ">Update </md-button>
</div>
</div>
</div>
<div class="form-inline col-lg-12 billable-table">
<div class="row">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Billable Status</th>
<th>Start Date</th>
<th>End Date</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="status in empBillableStatuses">
<td>{{status.billableStatus}}</td>
<td>{{status.billableStartDate | date : 'dd-MMM-yyyy'}}</td>
<td>{{status.billableEndDate | date : 'dd-MMM-yyyy'}}</td>
<td><i class="fa fa-pencil-square-o fa-2x" ng-click="getEditTeammate(status)" ng-show="empBillableStatuses.length-1 == $index" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;"></i></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div role="alert ">
<span class="error " style="color: red; ">{{alertMsg}}</span>
</div>
</div>
</div>
</div>
<md-dialog-actions layout="row ">
<md-button class="md-raised " data-ng-click="validateFields(templateTitle) " style="width:120px;background: cadetblue;color:white; ">Update
</md-button>
<!-- <md-button class="md-raised " data-ng-click="validateFields(templateTitle) " style="width:120px;background: cadetblue;color:white; ">Update
</md-button> -->
<md-button class="md-raised " ng-click="cancelTab() " style="width:120px;background: cadetblue;color:white; ">
Cancel </md-button>
</md-dialog-actions>
......
......@@ -31,7 +31,7 @@
</div>
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
<div id="gridTest" ui-grid="gridOptions" ui-grid-edit ui-grid-pagination
style="width:99%;height:230px;margin-left:10px;">
<div class="watermark" ng-show="!gridOptions.data.length">No
data available</div>
......
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