Commit 3573c278 authored by Rajeshekar's avatar Rajeshekar

MT-55[Rajeshekar]: Refactored the code,added project start date

parent b374ad62
...@@ -39,6 +39,7 @@ public class UserController { ...@@ -39,6 +39,7 @@ public class UserController {
public ResponseEntity<EmployeeRoles> getEmployeeRole( public ResponseEntity<EmployeeRoles> getEmployeeRole(
@RequestParam("emailId") String emailId) throws MyTimeException { @RequestParam("emailId") String emailId) throws MyTimeException {
EmployeeRoles employeesRole = userService.getEmployeesRole(emailId); EmployeeRoles employeesRole = userService.getEmployeesRole(emailId);
System.out.println("emailId" + emailId + "result" + employeesRole);
return new ResponseEntity<>(employeesRole, HttpStatus.OK); return new ResponseEntity<>(employeesRole, HttpStatus.OK);
} }
......
...@@ -159,10 +159,13 @@ public class ProjectServiceImpl implements ProjectService { ...@@ -159,10 +159,13 @@ public class ProjectServiceImpl implements ProjectService {
billings.setBillableStatus(pT.getBillableStatus()); billings.setBillableStatus(pT.getBillableStatus());
billings.setAccount(pT.getAccount()); billings.setAccount(pT.getAccount());
billings.setActive(true); billings.setActive(true);
billings.setBillingStartDate( billings.setBillingStartDate(pT.getStartDate() == null
DateUtils.truncate(pT.getStartDate(), Calendar.DATE)); ? DateUtils.truncate(new Date(), Calendar.DATE)
billings.setBillingEndDate( : DateUtils.truncate(pT.getStartDate(), Calendar.DATE));
DateUtils.truncate(pT.getEndDate(), Calendar.DATE)); if (pT.getEndDate() != null) {
billings.setBillingEndDate(
DateUtils.truncate(pT.getEndDate(), Calendar.DATE));
}
billings.setCreateDate(new Date()); billings.setCreateDate(new Date());
addEmployeeBillingDetails(billings); addEmployeeBillingDetails(billings);
......
...@@ -28,6 +28,8 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m ...@@ -28,6 +28,8 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: false}, {field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: false},
{field : 'managerName',displayName: 'Manager Name', enableColumnMenu: false, enableSorting: false}, {field : 'managerName',displayName: 'Manager Name', enableColumnMenu: false, enableSorting: false},
{field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false}, {field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false, enableSorting: false},
{field : 'startDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"'},
{field : 'endDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"'},
{field : 'shift',displayName: 'Shift', enableColumnMenu: false, enableSorting: false}, {field : 'shift',displayName: 'Shift', enableColumnMenu: false, enableSorting: false},
{field : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false} {field : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false}
] ]
......
...@@ -36,12 +36,12 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -36,12 +36,12 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
pageNumber: 1, pageNumber: 1,
pageSize:10, pageSize:10,
enableCellEdit: false, enableCellEdit: false,
enableCellEditOnFocus: true, enableCellEditOnFocus: false,
enableFiltering: true, enableFiltering: true,
cellEditableCondition: function($scope) { cellEditableCondition: function($scope) {
// put your enable-edit code here, using values from $scope.row.entity and/or $scope.col.colDef as you desire // put your enable-edit code here, using values from $scope.row.entity and/or $scope.col.colDef as you desire
return true; // in this example, we'll only allow active rows to be edited return false; // in this example, we'll only allow active rows to be edited
}, },
columnDefs : [ columnDefs : [
...@@ -53,6 +53,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -53,6 +53,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
return row.entity.projectName; return row.entity.projectName;
}}, }},
{field : 'startDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"'},
{field : 'endDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"'},
{field : 'role',displayName: 'Role',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false,enableFiltering: false}, {field : 'role',displayName: 'Role',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false,enableFiltering: false},
{field : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate: getCellActiveTemplate, enableSorting: true,width:60,enableFiltering: false}, {field : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate: getCellActiveTemplate, enableSorting: true,width:60,enableFiltering: false},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false} {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, width:100,enableFiltering: false}
......
This diff is collapsed.
Highcharts.chart('companyfunctionalGroupReport', {
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'Source: thesolarfoundation.com'
},
yAxis: {
title: {
text: 'Number of Employees'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions: {
series: {
label: {
connectorAllowed: false
},
pointStart: 2010
}
},
series: [{
name: 'Installation',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
name: 'Manufacturing',
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
name: 'Sales & Distribution',
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
name: 'Project Development',
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
name: 'Other',
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});
...@@ -14,30 +14,14 @@ ...@@ -14,30 +14,14 @@
<md-dialog-content> <md-dialog-content>
<div class="md-dialog-content"> <div class="md-dialog-content">
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="empId" name="empId"
ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()"/> <br>
<input type="text" class="form-control" id="empName" name="empName"
ng-model="empName" placeholder="Employee Name" /><br>
<input type="text" class="form-control" id="empEmail" name="empEmail"
ng-model="empEmail" placeholder="Email ID" ng-disabled="true"/><br>
<input type="text" class="form-control" id="mobileNumber" name="mobileNumber"
ng-model="mobileNumber" placeholder="Mobile No" />
<md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift">
<md-optgroup label="skills"> <md-option ng-value="shift"
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option ng-value="location"
ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select>
<div role="alert"> <div role="alert">
<span class="error" style="color: red;">{{alertMsg}}</span> <span class="error" style="color: red;">Please contact HR to provide access to application</span>
</div> </div>
</div> </div>
</div> </div>
</md-dialog-content> </md-dialog-content>
<md-dialog-actions layout="row"> <md-button <md-dialog-actions layout="row"> <md-button class="md-raised" ng-click="showRegAlert()" style="width:120px;background: cadetblue;color:white;">
class="md-raised" data-ng-click="validateFields()" style="width:120px;background: cadetblue;color:white;"> Home </md-button> </md-dialog-actions>
Register </md-button> <md-button class="md-raised" ng-click="cancel()" style="width:120px;background: cadetblue;color:white;">
Cancel </md-button> </md-dialog-actions>
</form> </form>
</md-dialog> </md-dialog>
<md-dialog aria-label="Registration Template" style="width:440px;height:500px;">
<form ng-cloak name="myForm">
<md-toolbar style="height:40px">
<div class="md-toolbar-tools"
style="background: cadetblue;">
<h2>Employee Registration</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>
<md-dialog-content>
<div class="md-dialog-content">
<div class="form-group">
<input type="text" class="form-control" id="empId" name="empId"
ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()"/> <br>
<input type="text" class="form-control" id="empName" name="empName"
ng-model="empName" placeholder="Employee Name" /><br>
<input type="text" class="form-control" id="empEmail" name="empEmail"
ng-model="empEmail" placeholder="Email ID" ng-disabled="true"/><br>
<input type="text" class="form-control" id="mobileNumber" name="mobileNumber"
ng-model="mobileNumber" placeholder="Mobile No" />
<md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift">
<md-optgroup label="skills"> <md-option ng-value="shift"
ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
<md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation">
<md-optgroup label="locations"> <md-option ng-value="location"
ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select>
<div role="alert">
<span class="error" style="color: red;">{{alertMsg}}</span>
</div>
</div>
</div>
</md-dialog-content>
<md-dialog-actions layout="row"> <md-button
class="md-raised" data-ng-click="validateFields()" style="width:120px;background: cadetblue;color:white;">
Register </md-button> <md-button class="md-raised" ng-click="cancel()" style="width:120px;background: cadetblue;color:white;">
Cancel </md-button> </md-dialog-actions>
</form>
</md-dialog>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<p align="center" class="col-xs-11" <p align="center" class="col-xs-11"
style="vertical-align: middle; font-weight: bold; font-size: 30px;">Reports</p> style="vertical-align: middle; font-weight: bold; font-size: 30px;">Login Reports</p>
<p align="right" class="col-xs-1" <p align="right" class="col-xs-1"
style="vertical-align: middle; font-weight: bold; font-size: 1.5em; margin-top: 8px; cursor: pointer;"> style="vertical-align: middle; font-weight: bold; font-size: 1.5em; margin-top: 8px; cursor: pointer;">
<i class="fa fa-refresh" aria-hidden="true" <i class="fa fa-refresh" aria-hidden="true"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment