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