Commit 5fe941ac619b100086bc3e100e3c529a2c183cb8
1 parent
176381a3a4
Exists in
master
update fuel
Showing
2 changed files
with
30 additions
and
13 deletions
Show diff stats
app/partials/fuelOrders/fuelOrders.controller.js
... | ... | @@ -131,7 +131,9 @@ function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgT |
131 | 131 | }); |
132 | 132 | $(document).ready(function(){ |
133 | 133 | function changeSelectboxBg(){ |
134 | - var myselect = document.getElementsByClassName('colorfulSelectbox'); | |
134 | + setInterval(function(){ | |
135 | + | |
136 | + var myselect = document.getElementsByClassName('colorfulSelectbox'); | |
135 | 137 | |
136 | 138 | for (var i = 0; i < myselect.length; i++) { |
137 | 139 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
... | ... | @@ -142,12 +144,17 @@ function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgT |
142 | 144 | // console.log('colour', getColor); |
143 | 145 | myselect[i].blur(); |
144 | 146 | } |
147 | + }, 1000) | |
145 | 148 | } |
146 | 149 | changeSelectboxBg(); |
147 | 150 | |
148 | - $('.pagination , .recordCountSelect').click(function(){ | |
151 | + /*$('.pagination , .recordCountSelect').click(function(){ | |
149 | 152 | changeSelectboxBg(); |
150 | 153 | }) |
154 | + $('.input-filter').keydown(function(){ | |
155 | + console.log('function..........'); | |
156 | + changeSelectboxBg(); | |
157 | + })*/ | |
151 | 158 | }) |
152 | 159 | }) |
153 | 160 | } |
... | ... | @@ -369,9 +376,11 @@ function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgT |
369 | 376 | $scope.fuelData.status = $scope.editdata.status |
370 | 377 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak |
371 | 378 | $scope.fuelData.total = $scope.editdata.total |
372 | - $scope.fuelData.upliftDate = $scope.editdata.upliftDate | |
379 | + | |
380 | + $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); | |
381 | + $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); | |
373 | 382 | |
374 | - | |
383 | + $scope.fuelData.upliftDate = $scope.editdata.upliftDateString | |
375 | 384 | |
376 | 385 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
377 | 386 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | ... | ... |
app/partials/fuelOrders/fuelOrders.html
... | ... | @@ -605,9 +605,9 @@ |
605 | 605 | </div> |
606 | 606 | <div class="pull-left" style="width: calc(100% - 110px);"> |
607 | 607 | <select class="form-control" ng-model="order.aircraftName"> |
608 | - <option selected disabled value="">Select Aircraft</option> | |
609 | - <option ng-repeat="list in aircraftList" value="{{list.tail}}">{{list.tail}}</option> | |
610 | - </select> | |
608 | + <option selected disabled value="">Select Aircraft</option> | |
609 | + <option ng-repeat="list in aircraftList" value="{{list.tail}}">{{list.tail}}</option> | |
610 | + </select> | |
611 | 611 | </div> |
612 | 612 | <div class="clearfix"></div> |
613 | 613 | </div> |
... | ... | @@ -740,8 +740,8 @@ |
740 | 740 | <label class="new-input-label"><b>Fueling Date</b></label> |
741 | 741 | </div> |
742 | 742 | <div class="pull-left" style="width: calc(100% - 110px);"> |
743 | - <!--<input type="date" ng-model="editdata.departingDate" class="form-control" placeholder="">--> | |
744 | - {{editdata.upliftDateString}} | |
743 | + <input type="text" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> | |
744 | + <!-- {{editdata.upliftDateString}} --> | |
745 | 745 | </div> |
746 | 746 | <div class="clearfix"></div> |
747 | 747 | </div> |
... | ... | @@ -821,11 +821,11 @@ |
821 | 821 | <label class="new-input-label"><b>Source</b></label> |
822 | 822 | </div> |
823 | 823 | <div class="pull-left" style="width: calc(100% - 110px);"> |
824 | - <!--<select ui-select2 ng-model="editdata.source" style="width: 100%;"> | |
824 | + <select ui-select2 ng-model="editdata.source" style="width: 100%;"> | |
825 | 825 | <option value="" selected disabled>Select Source</option> |
826 | 826 | <option ng-repeat="list in sourceList">{{list.source}}</option> |
827 | - </select>--> | |
828 | - {{editdata.source}} | |
827 | + </select> | |
828 | + <!-- {{editdata.source}} --> | |
829 | 829 | </div> |
830 | 830 | <div class="clearfix"></div> |
831 | 831 | </div> |
... | ... | @@ -850,7 +850,15 @@ |
850 | 850 | <label class="new-input-label"><b>Status</b></label> |
851 | 851 | </div> |
852 | 852 | <div class="pull-left" style="width: calc(100% - 110px);"> |
853 | - {{editdata.status}} | |
853 | + <select ui-select2 ng-model="editdata.status" style="width: 100%;"> | |
854 | + <option value="" selected disabled>Select Status</option> | |
855 | + <option>pending</option> | |
856 | + <option>invoiced</option> | |
857 | + <option>paid</option> | |
858 | + <option>cancelled</option> | |
859 | + <option>archived</option> | |
860 | + </select> | |
861 | + <!-- {{editdata.status}} --> | |
854 | 862 | </div> |
855 | 863 | <div class="clearfix"></div> |
856 | 864 | </div> | ... | ... |