Commit fe3343fe authored by Prayas Jain's avatar Prayas Jain

Added Employee_Efforts_Tab

parent e7bcb71e
...@@ -52,7 +52,7 @@ public class LeaveNotificationScheduler { ...@@ -52,7 +52,7 @@ public class LeaveNotificationScheduler {
private IFunctionalGroupService functionalGroupService; private IFunctionalGroupService functionalGroupService;
//@Scheduled(cron = "0 * * * * ?") //@Scheduled(cron = "0 * * * * ?")
//@Scheduled(cron = "00 50 15 * * 1-5") //@Scheduled(cron = "00 50 15 * * 1-5")
public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException { public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException {
//Shift 1(9:00 AM - 6:00 PM) //Shift 1(9:00 AM - 6:00 PM)
...@@ -94,7 +94,7 @@ public class LeaveNotificationScheduler { ...@@ -94,7 +94,7 @@ public class LeaveNotificationScheduler {
private void sendMailToAbsentees(String shift) throws IOException, MessagingException, MyTeamException { private void sendMailToAbsentees(String shift) throws IOException, MessagingException, MyTeamException {
Mail mail = new Mail(); Mail mail = new Mail();
mail.setFrom(environment.getProperty("email.leave.notification.from")); mail.setFrom(environment.getProperty("email.leave.notification.from"));
mail.setSubject(environment.getProperty("email.leave.notification.subject")); mail.setSubject(environment.getProperty("email.leave.notification.subject"));
...@@ -111,30 +111,27 @@ public class LeaveNotificationScheduler { ...@@ -111,30 +111,27 @@ public class LeaveNotificationScheduler {
List<AttendenceData> absentiesList = attendenceList.stream() List<AttendenceData> absentiesList = attendenceList.stream()
.filter(attendance -> attendance.getPresent().equalsIgnoreCase(MyTeamUtils.ABSENT)).collect(Collectors.toList()); .filter(attendance -> attendance.getPresent().equalsIgnoreCase(MyTeamUtils.ABSENT)).collect(Collectors.toList());
for (AttendenceData absentee : absentiesList) { for (AttendenceData absentee : absentiesList) {
//model.put("employeeName", );//mail.setModel(model); //model.put("employeeName", );//mail.setModel(model);
employee = employeeService.getEmployeeById(absentee.getEmployeeId()); employee = employeeService.getEmployeeById(absentee.getEmployeeId());
empSubStatus = employee.getEmpSubStatus(); empSubStatus = employee.getEmpSubStatus();
if(empSubStatus==null) if(empSubStatus==null)
empSubStatus=""; empSubStatus="";
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && ( !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType())) { !empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType()))) {
logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId()); logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId());
//mail.setEmpName(absentee.getEmployeeName()); //mail.setEmpName(absentee.getEmployeeName());
//mail.setTo(absentee.getEmailId()); //mail.setTo(absentee.getEmailId());
mail.setEmpName("Vijay"); mail.setEmpName("Prayas");
mail.setTo("vakula@nisum.com"); mail.setTo("pjain@nisum.com");
functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup()); functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup());
//mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()}); //mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()});
mail.setCc(new String[]{"mduppanapudi@nisum.com"}); mail.setCc(new String[]{"prayasjain21@gmail.com"});
mailService.sendLeaveNotification(mail); mailService.sendLeaveNotification(mail);
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</tr> </tr>
<tr> <tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br /> <td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br />
--> Please ignore if already applied.<br /> Please ignore if already applied.<br />
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -31,9 +31,9 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -31,9 +31,9 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:100,cellTemplate: getEmpDetTemplate}, {field : 'employeeId',displayName: 'Emp ID', enableColumnMenu: false, enableSorting: false,enableFiltering:true, width:100,cellTemplate: getEmpDetTemplate},
{field : 'employeeName',displayName: 'Employee Name ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200}, {field : 'employeeName',displayName: 'Employee Name ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:200},
{field : 'domain',displayName: 'Domain', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100}, {field : 'domain',displayName: 'Domain', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'account',displayName: 'Client', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100}, {field : 'account',displayName: 'Client', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: false,enableFiltering:false,width:150}, {field : 'projectName',displayName: 'Project', enableColumnMenu: false, enableSorting: false,enableFiltering:true,width:150},
{field : 'startDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150}, {field : 'startDate',displayName: 'Start Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150},
{field : 'endDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150}, {field : 'endDate',displayName: 'End Date', enableColumnMenu: false, enableSorting: true,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false,width:150},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100}, {field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
...@@ -79,7 +79,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -79,7 +79,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
exporterCsvFilename: 'AbsentDetails.csv', exporterCsvFilename: 'AbsentDetails.csv',
exporterExcelFilename:'Employee Details', exporterExcelFilename:'Employee Details',
exporterPdfDefaultStyle: {fontSize: 9}, exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, exporterPdfTableStyle: {margin: [15, 15, 15, 15]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "Employee Details", style: 'headerStyle' }, exporterPdfHeader: { text: "Employee Details", style: 'headerStyle' },
exporterPdfFooter: function ( currentPage, pageCount ) { exporterPdfFooter: function ( currentPage, pageCount ) {
...@@ -92,7 +92,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -92,7 +92,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
}, },
exporterPdfOrientation: 'portrait', exporterPdfOrientation: 'portrait',
exporterPdfPageSize: 'LETTER', exporterPdfPageSize: 'LETTER',
exporterPdfMaxGridWidth: 500, exporterPdfMaxGridWidth: 400,
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){ onRegisterApi: function(gridApi){
$scope.gridApi = gridApi; $scope.gridApi = gridApi;
...@@ -347,4 +347,4 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -347,4 +347,4 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
template: '<select class="form-control" ng-model="colFilter.term" ng-options="option.id as option.value for option in colFilter.options"></select>' template: '<select class="form-control" ng-model="colFilter.term" ng-options="option.id as option.value for option in colFilter.options"></select>'
}; };
}); });
\ No newline at end of file
myApp.controller("assignEmployeeEffortrsController",function($scope, myFactory, $mdDialog, $http, appConfig, $timeout, $element, $window){
$scope.records = [];
$scope.parentData = {
"employeeId": "",
"employeeName": "",
"totalHoursSpent":"",
"projectName":"",
"account":"",
"functionalOrg":""
};
// +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="row.entity.status == \'InActive\'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i><i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
$scope.gridOptions = {
paginationPageSizes : [10, 20, 30, 40, 50, 100],
paginationPageSize : 10,
pageNumber: 1,
pageSize:10,
enableFiltering: true,
rowHeight:22,
columnDefs : [
{field : 'employeeId',displayName: 'Employee Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'totalHoursSpent', displayName: 'Total Hours Spent', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{field : 'projectName',displayName: 'Project Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true,},
{name : 'account', displayName: 'Account', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{name : 'functionalOrg', displayName: 'Functional Org', enableColumnMenu: false, enableSorting: false, enableFiltering:false}
],
enableGridMenu: true,
enableSelectAll: true,
exporterMenuExcel:false,
exporterMenuCsv:false,
exporterCsvFilename: '.csv',
exporterExcelFilename:'Employee Efforts Details',
exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "Employee Efforts Details", style: 'headerStyle' },
exporterPdfFooter: function ( currentPage, pageCount ) {
return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
},
exporterPdfCustomFormatter: function ( docDefinition ) {
docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
return docDefinition;
},
exporterPdfOrientation: 'portrait',
exporterPdfPageSize: 'LETTER',
exporterPdfMaxGridWidth: 800,
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){
$scope.gridApi = gridApi;
},
gridMenuCustomItems: [{
title: 'Export all data as EXCEL',
action: function ($event) {
exportUiGridService.exportToExcel('sheet 1', $scope.gridApi, 'all', 'all');
},
order: 110
},
{
title: 'Export visible data as EXCEL',
action: function ($event) {
exportUiGridService.exportToExcel('sheet 1', $scope.gridApi, 'visible', 'visible');
},
order: 111
}
]
};
$scope.gridOptions.data = $scope.records;
});
...@@ -263,6 +263,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -263,6 +263,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.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" : "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" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
menuItems.push({"menu" : "Employee Efforts","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else if(role == "Delivery Lead"){ }else if(role == "Delivery Lead"){
//menuItems.push({"menu" : "Manage Employees","icon" : "fa fa-user-plus fa-2x","path" : "templates/roles.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 Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
...@@ -298,6 +299,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -298,6 +299,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.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" : "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" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
menuItems.push({"menu" : "Employee Efforts ","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else if(role == "Lead"){ }else if(role == "Lead"){
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"}); menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems.push({"menu" : "Reportee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"}); menuItems.push({"menu" : "Reportee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
...@@ -326,6 +328,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -326,6 +328,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.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 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" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Employee Efforts","icon" : "fa fa-user-circle-o fa-2x","path" : "templates/employeeEfforts.html"});
}else{ }else{
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.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 Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class="row col-lg-12" style="height: 15px;"></div> <div class="row col-lg-12" style="height: 15px;"></div>
</div> </div>
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid" style="width:99%;height:330px;"> class="myGrid grid-half-view" style="width:99%;height:330px;">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid"> class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="row col-lg-12" style="margin-left: 0px; margin-top: 10px"> <div class="row col-lg-12" style="margin-left: 0px; margin-top: 10px">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination <div id="gridTest" ui-grid="gridOptions" ui-grid-pagination
class="myGrid" style="width: 99%"> class="myGrid grid-full-view" style="width: 99%">
<div class="watermark" ng-show="!gridOptions.data.length">No <div class="watermark" ng-show="!gridOptions.data.length">No
data available</div> data available</div>
</div> </div>
......
<div class="md-padding" id="popupContainer" ng-controller="assignEmployeeEffortrsController">
<div class="container-fluid mainDivHeaderClass">
<div class="row">
<div class="col-lg-12">
<h1 class="no-padding">Employee Efforts
<span class="right">
<i class="fa fa-refresh" aria-hidden="true" ng-click="refreshPage()"></i>
</span>
</h1>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid">
<div class="watermark" ng-show="!gridOptions.data.length">No
data available</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<script src="controllers/MyDetailsController.js"></script> <script src="controllers/MyDetailsController.js"></script>
<script src="controllers/ReporteesController.js"></script> <script src="controllers/ReporteesController.js"></script>
<script src="controllers/ManagerReporteesController.js"></script> <script src="controllers/ManagerReporteesController.js"></script>
<script src="controllers/EmployeeEffortsController.js"></script>
<script src="controllers/ReportsController.js"></script> <script src="controllers/ReportsController.js"></script>
<script src="controllers/AssignRolesController.js"></script> <script src="controllers/AssignRolesController.js"></script>
<script src="controllers/ProjectController.js"></script> <script src="controllers/ProjectController.js"></script>
......
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