Commit 5949358b authored by Prayas Jain's avatar Prayas Jain

Added Open Pool Display Screen and filter Bench project in manage Project Screen

parent 5258a233
......@@ -39,14 +39,15 @@ myApp.directive('hcPieChart', function () {
enableFiltering:true,
pageSize:10,
columnDefs : [
{field : 'employeeId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true, enableFiltering:true, width:120},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: false, enableFiltering:true},
{field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false, enableFiltering:true},
{field : 'projectName',displayName: 'Project Name', enableColumnMenu: false, enableSorting: false, enableFiltering:true},
{field : 'billableStatus',displayName: 'Billable Status', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{field : 'billingStartDate',displayName: 'Billing Start Data', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false},
{field : 'billingEndDate',displayName: 'Billing End Data', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false},
{field : 'functionalGroup',displayName: 'Functional Group', enableColumnMenu: false, enableSorting: false, enableFiltering:false}
{field : 'employeeId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true, enableFiltering:true, width:'*'},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: false, enableFiltering:true,width:'*'},
{field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false, enableFiltering:true, width:'*'},
{field : 'projectName',displayName: 'Project Name', enableColumnMenu: false, enableSorting: false, enableFiltering:true, width:'*'},
{field : 'onBehalfOf',displayName: 'Behalf Of', enableColumnMenu: false, enableSorting: false, enableFiltering:true, width:'*'},
{field : 'billableStatus',displayName: 'Billable Status', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:'*'},
{field : 'billingStartDate',displayName: 'Billing Start Data', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false, width:'*'},
{field : 'billingEndDate',displayName: 'Billing End Data', enableColumnMenu: false, enableSorting: false,cellFilter: 'date:"dd-MMM-yyyy"',enableFiltering:false, width:'*'},
{field : 'functionalGroup',displayName: 'Functional Group', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:'*'}
],
enableGridMenu: true,
enableSelectAll: true,
......
......@@ -22,7 +22,7 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
$scope.manageGroup = [];
$scope.nonManageGroup = [];
for(var i = 0; i < $scope.menuItems.length; i++){
if($scope.menuItems[i].menu.indexOf('Manage') !== -1) {
if($scope.menuItems[i].menu.indexOf('Manage') !== -1 || $scope.menuItems[i].menu.indexOf('Pool') !== -1) {
$scope.manageGroup.push($scope.menuItems[i]);
}
else if($scope.menuItems[i].menu.indexOf('Report') !== -1 ||
......
......@@ -267,6 +267,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Reserved Reports","icon" : "fa fa-file-pdf-o fa-2x","path" : "templates/reservedReport.html"});
menuItems.push({"menu" : "Allocation Change","icon" : "fa fa-file-excel-o fa-2x","path" : "templates/allocationChangeReport.html"});
menuItems.push({"menu" : "SubStatus Report","icon" : "fa fa-area-chart fa-2x","path" : "templates/subStatusReport.html"});
menuItems.push({"menu" : "View Open Pool","icon" : "fa fa-child fa-2x","path" : "templates/showOpenPool.html"});
}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 Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
......@@ -306,6 +307,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Reserved Reports","icon" : "fa fa-file-pdf-o fa-2x","path" : "templates/reservedReport.html"});
menuItems.push({"menu" : "Allocation Change","icon" : "fa fa-file-excel-o fa-2x","path" : "templates/allocationChangeReport.html"});
menuItems.push({"menu" : "SubStatus Report","icon" : "fa fa-area-chart fa-2x","path" : "templates/subStatusReport.html"});
menuItems.push({"menu" : "View Open Pool","icon" : "fa fa-child fa-2x","path" : "templates/showOpenPool.html"});
}else if(role == "Lead"){
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"});
......@@ -338,6 +340,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Reserved Reports","icon" : "fa fa-file-pdf-o fa-2x","path" : "templates/reservedReport.html"});
menuItems.push({"menu" : "Allocation Change","icon" : "fa fa-file-excel-o fa-2x","path" : "templates/allocationChangeReport.html"});
menuItems.push({"menu" : "SubStatus Report","icon" : "fa fa-area-chart fa-2x","path" : "templates/subStatusReport.html"});
menuItems.push({"menu" : "View Open Pool","icon" : "fa fa-child fa-2x","path" : "templates/showOpenPool.html"});
}else{
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"});
......
myApp.controller("openPoolController", function($scope, $http, myFactory, $mdDialog, appConfig, exportUiGridService) {
$scope.records = [];
$scope.gridOptions = {
paginationPageSizes : [ 10, 20, 30, 40, 50, 100],
paginationPageSize : 10,
pageNumber: 1,
pageSize:10,
enableFiltering:true,
columnDefs : [
{field : 'employeeId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true, enableFiltering: true,width:'*'},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: false, enableFiltering: true,width:'*'},
{field : 'resourceRole',displayName: 'Role', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:'*'},
{field : 'designation',displayName: 'Designation', enableColumnMenu: false,enableFiltering: false,width:'*'},
{field : 'billableStatus',displayName: 'Billability', enableColumnMenu: false,enableSorting: false,enableFiltering: true , cellFilter: 'date:"dd-MMM-yyyy"',width:'*'},
{field : 'billingStartDate',displayName: 'Billable Start Date', enableColumnMenu: false, enableSorting: false, enableFiltering: true,width:'*',cellFilter: 'date:"dd-MMM-yyyy"'},
{field : 'billingEndDate',displayName: 'Billable End Date', enableColumnMenu: false,enableSorting: false,enableFiltering: false , cellFilter: 'date:"dd-MMM-yyyy"',width:'*'},
],
enableGridMenu: true,
enableSelectAll: true,
exporterMenuExcel:false,
exporterMenuCsv:false,
exporterCsvFilename: 'openPoolReport.csv',
exporterExcelFilename:'OpenPoolReport',
exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [15, 15, 15, 15]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "Open Pool Report", 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: 400,
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.getOpenPoolRecords = function(){
$http({
method : "GET",
url : appConfig.appUri + 'resources/project/Nisum0000?status=Active'
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data.records;
if(response.data.records.length > 10){
$scope.gridOptions.enablePaginationControls = true;
}
else{
$scope.gridOptions.enablePaginationControls = false;
}
}, function myError(response) {
showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = [];
});
};
});
......@@ -111,17 +111,15 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope.status="Active";
$scope.activeProjectsArray=[];
$scope.completedProjectsArray=[];
$scope.allProjectsArray = response.data.records;
angular.forEach(response.data.records, function(project) {
if(project.status == 'Active'){
$scope.activeProjectsArray.push(project);
} else if(project.status == 'Completed'){
$scope.completedProjectsArray.push(project);
} else{
}
});
$scope.allProjectsArray= response.data.records.filter(function (project) {
return project.projectName !== 'Bench';
});
$scope.activeProjectsArray = response.data.records.filter(function (project) {
return project.status == 'Active' && project.projectName !='Bench';
});
$scope.completedProjectsArray = response.data.records.filter(function (project) {
return project.status == 'Completed' && project.projectName !='Bench';
});
$scope.gridOptions.data = $scope.activeProjectsArray;
if(response.data.records.length > 10){
$scope.gridOptions.enablePaginationControls = true;
......
......@@ -166,7 +166,7 @@ i.fa.fa-refresh:hover {
list-style: none;
}
#sidebar-wrapper .sidebar-nav li ul.manageGroup {
max-height: 165px;
max-height: 205px;
overflow: hidden;
height: auto;
padding: 0;
......
......@@ -74,7 +74,7 @@
<script src="controllers/ResyncDataController.js"></script>
<script src="controllers/MyProjectAllocations.js"></script>
<script src="controllers/SubStatusReportController.js"></script>
<script src="controllers/OpenPoolController.js"></script>
<script src="controllers/DashboardController.js"></script>
<script src="controllers/VisaController.js"></script>
<script src="controllers/TravelController.js"></script>
......
<div class="md-padding" id="popupContainer" ng-controller="openPoolController" ng-init="getOpenPoolRecords()">
<div class="container-fluid mainDivHeaderClass">
<div class="row">
<div class="col-lg-12">
<h1 class="no-padding">Open Pool Resources
<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="form-horizontal">
<div class="row">
<div class="col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="myGrid grid-full-view">
<div class="watermark" ng-show="!gridOptions.data.length">No
data available</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
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