Commit afb70d41 authored by Rajesh Sagar's avatar Rajesh Sagar

myteam mate changes

parent 9916edd2
...@@ -369,14 +369,19 @@ public class ProjectServiceImpl implements ProjectService { ...@@ -369,14 +369,19 @@ public class ProjectServiceImpl implements ProjectService {
billings.setProjectName(projectTeamMate.getProjectName()); billings.setProjectName(projectTeamMate.getProjectName());
billings.setBillableStatus(projectTeamMate.getBillableStatus()); billings.setBillableStatus(projectTeamMate.getBillableStatus());
billings.setActive(true); billings.setActive(true);
//TODO
Date d = projectTeamMate.getNewBillingStartDate();
d.setDate(d.getDate() + 1);
billings.setBillingStartDate(DateUtils.truncate( billings.setBillingStartDate(DateUtils.truncate(
projectTeamMate.getNewBillingStartDate(), Calendar.DATE)); d, Calendar.DATE));
existingTeammate.setNewBillingStartDate(DateUtils.truncate(d, Calendar.DATE));
billings.setBillingEndDate(DateUtils billings.setBillingEndDate(DateUtils
.truncate(projectTeamMate.getEndDate(), Calendar.DATE)); .truncate(projectTeamMate.getEndDate(), Calendar.DATE));
billings.setCreateDate(new Date()); billings.setCreateDate(new Date());
addEmployeeBillingDetails(billings); addEmployeeBillingDetails(billings);
// TODO // TODO
} }
existingTeammate.setBillableStatus(projectTeamMate.getBillableStatus()); existingTeammate.setBillableStatus(projectTeamMate.getBillableStatus());
existingTeammate.setStartDate(projectTeamMate.getStartDate()); existingTeammate.setStartDate(projectTeamMate.getStartDate());
existingTeammate.setEndDate(projectTeamMate.getEndDate()); existingTeammate.setEndDate(projectTeamMate.getEndDate());
......
...@@ -682,7 +682,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -682,7 +682,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
else { else {
$scope.alertMsg = ""; $scope.alertMsg = "";
var record = {"employeeId":employeeModel.employeeId, "employeeName":employeeModel.employeeName, "emailId": employeeModel.emailId, "role": employeeModel.role, "designation":employeeModel.designation,"shift": employeeModel.shift,"projectId":projectModel.projectId,"projectName":projectModel.projectName,"account":$scope.projectModel.account,"managerId":myFactory.getEmpId(),"managerName":myFactory.getEmpName(),"mobileNumber":employeeModel.mobileNumber,"active":true,"billableStatus":$scope.empBillableStatus,"startDate":$scope.startDate,"endDate":$scope.endDate,"newBillingStartDate":$scope.newBillingStartDate}; var record = {"employeeId":employeeModel.employeeId, "employeeName":employeeModel.employeeName, "emailId": employeeModel.emailId, "role": employeeModel.role, "designation":employeeModel.designation,"shift": employeeModel.shift,"projectId":projectModel.projectId,"projectName":projectModel.projectName,"account":$scope.projectModel.account,"managerId":myFactory.getEmpId(),"managerName":myFactory.getEmpName(),"mobileNumber":employeeModel.mobileNumber,"active":true,"billableStatus":$scope.empBillableStatus,"startDate":$scope.startDate,"endDate":$scope.endDate,"newBillingStartDate":$scope.newBillingStartDate,"accountId":$scope.projectModel.accountId,"domainId":$scope.projectModel.domainId};
addOrUpdateRole(record, $scope.templateTitle); addOrUpdateRole(record, $scope.templateTitle);
$timeout(function(){updateGrid($scope.templateTitle, record)},500); $timeout(function(){updateGrid($scope.templateTitle, record)},500);
} }
......
...@@ -35,6 +35,13 @@ ...@@ -35,6 +35,13 @@
<md-select ng-model="empBillableStatus" md-selected-text="getSelectedBillableStatus()" id="empBillableStatus"> <md-select ng-model="empBillableStatus" md-selected-text="getSelectedBillableStatus()" id="empBillableStatus">
<md-optgroup label="billable statuses"> <md-option ng-value="billableStatus" <md-optgroup label="billable statuses"> <md-option ng-value="billableStatus"
ng-repeat="billableStatus in billableStatuses">{{billableStatus}}</md-option> </md-optgroup> </md-select> ng-repeat="billableStatus in billableStatuses">{{billableStatus}}</md-option> </md-optgroup> </md-select>
<div ng-show="empBillableStatus">
<output>Current Billability Start Date : <md-datepicker ng-model="newBillingStartDate" md-placeholder="Please Select Date" id ="newBillingStartDate"
md-min-date="minDate" md-max-date="maxDate"
onkeydown="return false"
></md-datepicker></br></output>
</div>
<md-datepicker ng-model="startDate" md-placeholder="Start Date" <md-datepicker ng-model="startDate" md-placeholder="Start Date"
md-min-date="minDate" md-max-date="maxDate" md-min-date="minDate" md-max-date="maxDate"
onkeydown="return false" onkeydown="return false"
......
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