Commit 817dadbe authored by Prayas Jain's avatar Prayas Jain

Updated Allocation Change screen

parent 66ba5d97
......@@ -15,18 +15,21 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
paginationPageSize : 10,
pageNumber: 1,
pageSize:10,
enableFiltering:true,
enableFiltering: true,
enableHorizontalScrollbar:1,
columnDefs : [
{field : 'employeeId',displayName: 'Employee Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : ' prevClient', displayName: 'Previous Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{field : 'prevProjectName',displayName: 'Previous Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'prevBillableStatus', displayName: 'Previous Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{name : 'prevBillingStartDate', displayName: 'Previous Billing Start Date', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{name : 'currentClient', displayName: 'Current Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{field : 'currentProjectName',displayName: 'Current Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'currentBillingStartDate', displayName: 'Current Billing Start Date', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{name : 'currentBillingStartDate', displayName: 'Current Billing End Date', enableColumnMenu: false, enableSorting: false, enableFiltering:false},
{field : 'employeeId',displayName: 'Employee Id', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:100},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:200},
{name : ' prevAccountName', displayName: 'Previous Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:100},
{field : 'prevProjectName',displayName: 'Previous Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true, width:150},
{name : 'prevBillableStatus', displayName: 'Previous Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:100},
{name : 'prevBillingStartDate', displayName: 'Previous Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false, width:150},
{name : 'prevBillingEndDate', displayName: 'Previous Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
{name : 'currentAccountName', displayName: 'Current Client', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100},
{name : 'currentBillableStatus', displayName: 'Current Billability', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:100},
{field : 'currentProjectName',displayName: 'Current Project', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:150},
{name : 'currentBillingStartDate', displayName: 'Current Billing Start Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
{name : 'currentBillingEndDate', displayName: 'Current Billing End Date',cellFilter: 'date:"dd-MMM-yyyy"', enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:150},
],
enableGridMenu: true,
......@@ -72,15 +75,15 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
};
$scope.gridOptions.data = [];
/* $scope.getEmployeeEffortsData = function(){
$scope.getAllocationChangeData = function(){
var fromDate = getFormattedDate($scope.fromDate);
var toDate = getFormattedDate($scope.toDate);
$http({
method : "GET",
url : appConfig.appUri + "employeeEfforts/getWeeklyReport?fromDate=" + fromDate + "&toDate=" +toDate
url : appConfig.appUri + "resources/allocationReports?fromDate=" + fromDate + "&toDate=" +toDate
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
if(response.data.length > 10){
$scope.gridOptions.data = response.data.records;
if(response.data.records.length > 10){
$scope.gridOptions.enablePaginationControls = true;
}
else{
......@@ -90,7 +93,7 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
showAlert("Something went wrong while fetching data!!!");
$scope.gridOptions.data = [];
});
}*/
}
$scope.validateDates = function(dateValue, from) {
if(from == "FromDate"){
......
<div class="md-padding" id="popupContainer" ng-controller="allocationChangeReportController">
<div class="md-padding" id="popupContainer" ng-controller="allocationChangeReportController" ng-init="getAllocationChangeData()">
<div class="container-fluid mainDivHeaderClass">
<div class="row">
<div class="col-lg-12">
......@@ -37,7 +37,7 @@
<div class="form-group">
<div class="form-inline col-lg-12">
<div id="gridTest" ui-grid="gridOptions" ui-grid-pagination ui-grid-exporter
class="mygrid manage-employee-efforts">
class="mygrid">
<div class="watermark" ng-show="!gridOptions.data.length">No
data available</div>
</div>
......
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