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 {
public ResponseEntity<EmployeeRoles> getEmployeeRole(
@RequestParam("emailId") String emailId) throws MyTimeException {
EmployeeRoles employeesRole = userService.getEmployeesRole(emailId);
System.out.println("emailId" + emailId + "result" + employeesRole);
return new ResponseEntity<>(employeesRole, HttpStatus.OK);
}
......
......@@ -159,10 +159,13 @@ public class ProjectServiceImpl implements ProjectService {
billings.setBillableStatus(pT.getBillableStatus());
billings.setAccount(pT.getAccount());
billings.setActive(true);
billings.setBillingStartDate(
DateUtils.truncate(pT.getStartDate(), Calendar.DATE));
billings.setBillingEndDate(
DateUtils.truncate(pT.getEndDate(), Calendar.DATE));
billings.setBillingStartDate(pT.getStartDate() == null
? DateUtils.truncate(new Date(), Calendar.DATE)
: DateUtils.truncate(pT.getStartDate(), Calendar.DATE));
if (pT.getEndDate() != null) {
billings.setBillingEndDate(
DateUtils.truncate(pT.getEndDate(), Calendar.DATE));
}
billings.setCreateDate(new Date());
addEmployeeBillingDetails(billings);
......
......@@ -107,7 +107,11 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
if(result == "Cancelled"){ console.log(result);
showProgressDialog("Registration cancelled!!! Please wait while redirected to login page.");
$timeout(function(){redirectToLoginPage();},2000);
}else if(result == "Error"){
}else if(result == "RegAlert"){ console.log(result);
showProgressDialog("Application access/registration required!!! Please reachout to HR to get required access");
$timeout(function(){redirectToLoginPage();},2000);
}
else if(result == "Error"){
showProgressDialog("Registration failed!!! Please wait while redirected to login page.");
$timeout(function(){redirectToLoginPage();},2000);
}else{
......@@ -230,6 +234,9 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
$scope.cancel = function() {
$mdDialog.hide('Cancelled');
};
$scope.showRegAlert = function() {
$mdDialog.hide('RegAlert');
};
}
function setDefaultValues(userRole, profilePicUrl){
......@@ -242,69 +249,69 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
var role = userRole.role;
myFactory.setEmpRole(role);
if(role == "HR"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
menuItems.push({"menu" : "Manage Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/projects.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Login Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
}else if(role == "Manager"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Reportee Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "View Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/viewProjects.html"});
menuItems.push({"menu" : "Reportee Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}else if(role == "HR Manager"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "Manage Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/projects.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Login Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
}else if(role == "Lead"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Reportee Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "Reportee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}else if(role == "Delivery Manager" || role == "Director"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "Manage Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/projects.html"});
menuItems.push({"menu" : "Manage Visa","icon" : "fa fa-tasks fa-2x","path" : "templates/visaList.html"});
menuItems.push({"menu" : "Manage Travels","icon" : "fa fa-tasks fa-2x","path" : "templates/onsiteTravelsList.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
menuItems.push({"menu" : "Login Reports","icon" : "fa fa-pie-chart fa-2x","path" : "templates/reports.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "Dashboard","icon" : "fa fa-television fa-2x","path" : "templates/dashboard.html"});
menuItems.push({"menu" : "Charts","icon" : "fa fa-television fa-2x","path" : "templates/charts.html"});
menuItems.push({"menu" : "Utilization Report","icon" : "fa fa-television fa-2x","path" : "templates/charts3.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
//menuItems.push({"menu" : "Charts","icon" : "fa fa-television fa-2x","path" : "templates/charts.html"});
//menuItems.push({"menu" : "Utilization Report","icon" : "fa fa-television fa-2x","path" : "templates/charts3.html"});
menuItems.push({"menu" : "Utilization Report","icon" : "fa fa-address-book-o fa-2x","path" : "templates/charts.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
menuItems.push({"menu" : "Reports","icon" : "fa fa-address-book-o fa-2x","path" : "templates/charts.html"});
}else{
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Login Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}
......
......@@ -28,6 +28,8 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
{field : 'account',displayName: 'Account', enableColumnMenu: false, enableSorting: false},
{field : 'managerName',displayName: 'Manager Name', 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 : 'active',displayName: 'Active', enableColumnMenu: false,cellTemplate:getCellActiveTemplate,enableSorting: false}
]
......
......@@ -36,12 +36,12 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
pageNumber: 1,
pageSize:10,
enableCellEdit: false,
enableCellEditOnFocus: true,
enableCellEditOnFocus: false,
enableFiltering: true,
cellEditableCondition: function($scope) {
// 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 : [
......@@ -53,6 +53,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
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 : '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}
......
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 @@
<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>
<span class="error" style="color: red;">Please contact HR to provide access to application</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>
<md-dialog-actions layout="row"> <md-button class="md-raised" ng-click="showRegAlert()" style="width:120px;background: cadetblue;color:white;">
Home </md-button> </md-dialog-actions>
</form>
</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 @@
<div class="row">
<div class="col-lg-12">
<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"
style="vertical-align: middle; font-weight: bold; font-size: 1.5em; margin-top: 8px; cursor: pointer;">
<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