Commit 53bb7629 authored by Prayas Jain's avatar Prayas Jain

Updated grid alignment in View Team Details Page

parent cb8450a9
...@@ -49,11 +49,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -49,11 +49,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
columnDefs: [ columnDefs: [
{ field: 'projectName', displayName: 'Project ', enableColumnMenu: false, enableSorting: true, enableFiltering: true }, { field: 'projectName', displayName: 'Project ', enableColumnMenu: false, enableSorting: true, enableFiltering: true },
{ field: 'domain', displayName: 'Domain ', enableColumnMenu: false, enableSorting: true, enableFiltering: true }, { field: 'domain', displayName: 'Domain ', enableColumnMenu: false, enableSorting: true, enableFiltering: true },
{ field: 'account', displayName: 'Account ', enableColumnMenu: false, enableSorting: true, enableFiltering: true }, { field: 'account', displayName: 'Account ', enableColumnMenu: false, enableSorting: true, enableFiltering: true},
//{field : 'managerId',displayName: 'Manager ID ', enableColumnMenu: false, enableSorting: false}, //{field : 'managerId',displayName: 'Manager ID ', enableColumnMenu: false, enableSorting: false},
{ field: 'deliveryLeadIds', displayName: 'Delivery Lead / Lead ', cellTemplate: '<div ng-repeat= "item in row.entity[col.field]">{{item.employeeName}}<span ng-hide="$last">,</span></div>', enableColumnMenu: false, enableSorting: true, enableFiltering: false }, { field: 'deliveryLeadIds', displayName: 'Delivery Lead', cellTemplate: '<div ng-repeat= "item in row.entity[col.field]">{{item.employeeName}}<span ng-hide="$last">,</span></div>', enableColumnMenu: false, enableSorting: true, enableFiltering: false },
{ field: 'status', displayName: 'Status ', enableColumnMenu: false, enableSorting: true, enableFiltering: false }, { field: 'status', displayName: 'Status ', enableColumnMenu: false, enableSorting: true, enableFiltering: false ,width:100},
{ name: 'Actions', displayName: 'Actions', cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering: false, width:100 } { name: 'Actions', displayName: 'Actions', cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering: false, width:120 }
] ]
}; };
$scope.gridOptions.data = $scope.records; $scope.gridOptions.data = $scope.records;
...@@ -604,10 +604,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -604,10 +604,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}; };
$scope.status = "Active"; $scope.status = "Active";
var employeeModel = $scope.employeeModel; var employeeModel = $scope.employeeModel;
var getCellTemplate1 = '<p class="col-lg-12"><i ng-show="grid.appScope.showEditIcon(row.entity)" class="fa fa-pencil-square-o fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.edit(row)"></i>'+ var getCellTemplate1 = '<p class="col-lg-12"><i ng-show="grid.appScope.showEditIcon(row.entity)" class="fa fa-pencil-square-o fa-2x" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(\'show\')" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.edit(row)"></i>'+
'<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.saveRow(row.entity,\'Update\')"></i>' '<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Save" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.saveRow(row.entity,\'Update\')"></i>'
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.cancelEdit(row.entity)"></i>' +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Cancel" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" id="moveEdit" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.moveToBench(row.entity)"></i></p>'; +'<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" id="moveEdit" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Release" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.moveToBench(row.entity)"></i></p>';
//'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>'; //'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p>';
var getCellActiveTemplate = '<div ng-show="COL_FIELD==true"><p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>'; var getCellActiveTemplate = '<div ng-show="COL_FIELD==true"><p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>';
...@@ -632,7 +632,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -632,7 +632,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 }, // { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{ {
name: 'resourceRole', displayName:'Role', enableColumnMenu: false,width:"*", enableSorting: false,enableFiltering:false, name: 'resourceRole', displayName:'Role', enableColumnMenu: false,width:"*", enableSorting: false,enableFiltering:false,
cellTemplate:'<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" id="empRole">' cellTemplate:'<div class="ui-grid-cell-contents" ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" id="empRole">'
+'<md-optgroup label="employee role"><md-option ng-value="empRole" ng-repeat="empRole in col.colDef.editDropdownOptionsArray">{{empRole}}</md-option>' +'<md-optgroup label="employee role"><md-option ng-value="empRole" ng-repeat="empRole in col.colDef.editDropdownOptionsArray">{{empRole}}</md-option>'
+'</md-optgroup></md-select></div>', +'</md-optgroup></md-select></div>',
editDropdownOptionsArray: [ editDropdownOptionsArray: [
...@@ -643,7 +643,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -643,7 +643,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
{ field: 'designation',width:"*", displayName: 'Designation', enableColumnMenu: false, enableSorting: false,enableFiltering:false }, { field: 'designation',width:"*", displayName: 'Designation', enableColumnMenu: false, enableSorting: false,enableFiltering:false },
{ {
name: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false, name: 'billableStatus', displayName: 'Billability ', enableColumnMenu: false, enableSorting: false ,enableFiltering:false,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" name="empBillableStatus" append-to-body="true">' cellTemplate: '<div class="ui-grid-cell-contents" ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" name="empBillableStatus" append-to-body="true">'
+ '<md-optgroup label="billable statuses "><md-option ng-value="billableStatus " ng-repeat="billableStatus in col.colDef.editDropdownOptionsArray">{{billableStatus}}</md-option>' + '<md-optgroup label="billable statuses "><md-option ng-value="billableStatus " ng-repeat="billableStatus in col.colDef.editDropdownOptionsArray">{{billableStatus}}</md-option>'
+'</md-optgroup></md-select></div>',editDropdownOptionsArray: [ +'</md-optgroup></md-select></div>',editDropdownOptionsArray: [
'Billable' , 'Billable' ,
...@@ -653,10 +653,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -653,10 +653,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
'Trainee' ] 'Trainee' ]
}, },
{ name: 'billingStartDate',width:"*", displayName: 'Start Date', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false,width:160, { name: 'billingStartDate',width:"*", displayName: 'Start Date', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false,width:160,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" md-placeholder="Select Date" id="newBillingStartDate" name="newBillingStartDate" md-min-date="grid.appScope.minBillingDate" md-max-date="grid.appScope.maxBillingDate"></md-datepicker></div>'}, cellTemplate: '<div class="ui-grid-cell-contents" ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" md-placeholder="Select Date" id="newBillingStartDate" name="newBillingStartDate" md-min-date="grid.appScope.minBillingDate" md-max-date="grid.appScope.maxBillingDate"></md-datepicker></div>'},
{ field: 'billingEndDate',width:"*", displayName: 'End Date', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false,width:160, { field: 'billingEndDate',width:"*", displayName: 'End Date', enableColumnMenu: false, enableSorting: false , cellFilter:'date:"dd-MMM-yyyy"',enableFiltering:false,width:160,
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" md-placeholder="Select Date" id="endDate" name="endDate" md-min-date="row.entity.billingStartDate" md-max-date="grid.appScope.maxBillingDate"></md-datepicker></div>'}, cellTemplate: '<div class="ui-grid-cell-contents" ng-if="!row.entity.editrow">{{COL_FIELD | date:"dd-MMM-yyyy"}}</div><div ng-if="row.entity.editrow"><md-datepicker ng-model="MODEL_COL_FIELD" md-placeholder="Select Date" id="endDate" name="endDate" md-min-date="row.entity.billingStartDate" md-max-date="grid.appScope.maxBillingDate"></md-datepicker></div>'},
{name : 'Actions',width:"*", displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false,enableFiltering: false,width:"*"} {name : 'Actions',width:140, displayName: 'Actions',cellTemplate: getCellTemplate1, enableColumnMenu: false, enableSorting: false,enableFiltering: false}
] ]
}; };
if($scope.isSecondTab){ if($scope.isSecondTab){
......
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