Commit 4aae69af authored by Prayas Jain's avatar Prayas Jain

Mapped UI grid with the backend response

parent d40cd400
...@@ -19,11 +19,11 @@ myApp.controller("subStatusController", function($scope, $http, myFactory, $mdDi ...@@ -19,11 +19,11 @@ myApp.controller("subStatusController", function($scope, $http, myFactory, $mdDi
pageSize:10, pageSize:10,
enableFiltering:true, enableFiltering:true,
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true, enableFiltering: true,width:'*'}, {field : 'empId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true, enableFiltering: true,width:'*'},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: false, enableFiltering: true,width:'*'}, {field : 'empName',displayName: 'Employee Name', enableColumnMenu: false, enableSorting: false, enableFiltering: true,width:'*'},
{field : 'subStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:'*'}, {field : 'empStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:'*'},
{field : 'subStatusStartDate',displayName: 'From Date', enableColumnMenu: false,enableFiltering: false, cellFilter: 'date:"dd-MMM-yyyy"',width:'*'}, {field : 'fromDate',displayName: 'From Date', enableColumnMenu: false,enableFiltering: false, cellFilter: 'date:"dd-MMM-yyyy"',width:'*'},
{field : 'subStatusEndDate',displayName: 'To Date', enableColumnMenu: false,enableSorting: false,enableFiltering: false , cellFilter: 'date:"dd-MMM-yyyy"',width:'*'}, {field : 'toDate',displayName: 'To Date', enableColumnMenu: false,enableSorting: false,enableFiltering: false , cellFilter: 'date:"dd-MMM-yyyy"',width:'*'},
{field : 'functionalGroup',displayName: 'Functional Group', enableColumnMenu: false, enableSorting: false,enableFiltering: false, enableFiltering: true,width:'*'} {field : 'functionalGroup',displayName: 'Functional Group', enableColumnMenu: false, enableSorting: false,enableFiltering: false, enableFiltering: true,width:'*'}
], ],
enableGridMenu: true, enableGridMenu: true,
...@@ -97,7 +97,7 @@ myApp.controller("subStatusController", function($scope, $http, myFactory, $mdDi ...@@ -97,7 +97,7 @@ myApp.controller("subStatusController", function($scope, $http, myFactory, $mdDi
if ($scope.empSubStatusValue !== undefined) { if ($scope.empSubStatusValue !== undefined) {
return $scope.empSubStatusValue; return $scope.empSubStatusValue;
} else { } else {
return "Please select a shift"; return "Please select a SubStatus";
} }
}; };
$scope.validateDates = function(dateValue, from) { $scope.validateDates = function(dateValue, from) {
......
...@@ -681,11 +681,15 @@ cursor: pointer; ...@@ -681,11 +681,15 @@ cursor: pointer;
margin: 10px 0 0 0; margin: 10px 0 0 0;
} }
.substatus-dropdown > label { .substatus-dropdown > label {
padding-left:0; padding:0;
margin-top:10px;
}
.substatus-dropdown md-datepicker {
padding:0;
} }
.substatus-dropdown >md-select { .substatus-dropdown >md-select {
margin:0; margin:0;
padding:0;
} }
.substatus-report-grid { .substatus-report-grid {
height: calc(85vh - 243px) !important; height: calc(85vh - 243px) !important;
......
...@@ -14,33 +14,34 @@ ...@@ -14,33 +14,34 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<div class="form-inline col-lg-12"> <div class="form-inline col-lg-12">
<div class="form-group row col-lg-6 col-sm-4"> <div class="form-group row col-lg-4 col-sm-4 substatus-dropdown">
<label class="" for="fromDate">From Date: <md-datepicker <label class="col-lg-3" for="fromDate">Start Date: </label>
<md-datepicker class="col-lg-9"
ng-model="fromDate" md-placeholder="Enter date" ng-model="fromDate" md-placeholder="Enter date"
md-min-date="minDate" md-max-date="maxDate" md-min-date="minDate" md-max-date="maxDate"
onkeydown="return false" onkeydown="return false"
ng-change="validateDates(fromDate, 'FromDate')"></md-datepicker></label> ng-change="validateDates(fromDate, 'FromDate')">
</md-datepicker>
</div> </div>
<div class="form-group row col-lg-6 col-sm-5"> <div class="form-group row col-lg-4 col-sm-5 substatus-dropdown">
<label class="" for="toDate">To Date: <md-datepicker <label class="col-lg-3" for="toDate">End Date: </label>
<md-datepicker
class="col-lg-8"
ng-model="toDate" md-placeholder="Enter date" ng-model="toDate" md-placeholder="Enter date"
md-min-date="minDate" md-max-date="maxDate" md-min-date="minDate" md-max-date="maxDate"
onkeydown="return false" onkeydown="return false"
ng-change="validateDates(toDate, 'ToDate')"></md-datepicker></label> ng-change="validateDates(toDate, 'ToDate')">
</md-datepicker>
</div> </div>
</div> <div class="form-group col-lg-3 col-sm-5 d-flex substatus-dropdown">
</div> <label class="col-lg-5" for="fromDate">SubStatus: </label>
<div class="form-group"> <md-select class="col-lg-7 " ng-model="empSubStatusValue" md-selected-text="getSelectedSubStatus() " id="empSubStatus" name="empSubStatus">
<div class="form-inline col-lg-12">
<div class="form-group row col-lg-6 col-sm-5 d-flex substatus-dropdown">
<label class="col-lg-2" for="fromDate">SubStatus: </label>
<md-select class="col-lg-4 " ng-model="empSubStatusValue" md-selected-text="getSelectedSubStatus() " id="empSubStatus" name="empSubStatus">
<md-optgroup label="Employee SubStatus "> <md-optgroup label="Employee SubStatus ">
<md-option ng-value="empSubStatusValue " ng-repeat="empSubStatusValue in empSubStatuses">{{empSubStatusValue}}</md-option> <md-option ng-value="empSubStatusValue " ng-repeat="empSubStatusValue in empSubStatuses">{{empSubStatusValue}}</md-option>
</md-optgroup> </md-optgroup>
</md-select> </md-select>
</div> </div>
<div class="form-group row col-lg-6 col-sm-2"> <div class="form-group col-lg-1 col-sm-2" style="margin-left: 20px;">
<label for="submitBtn"> <md-button <label for="submitBtn"> <md-button
class="md-raised md-primary" class="md-raised md-primary"
ng-click="getSubStatusDetails('click')"> <i ng-click="getSubStatusDetails('click')"> <i
......
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