Compare View

switch
from
...
to
 
Commits (2)
app/partials/scheduler/scheduler.controller.js
... ... @@ -40,6 +40,7 @@ angular.module('acufuel')
40 40 schedulerService.addNewEventService($scope.newEvent).then(function(response){
41 41 $scope.newEvent = {};
42 42 $('#addEvent').modal('hide');
  43 + $scope.events = [];
43 44 getEventsList();
44 45 })
45 46 }
... ... @@ -70,6 +71,7 @@ angular.module('acufuel')
70 71 toastr.success('Updated Successfully', {
71 72 closeButton: true
72 73 })
  74 + $scope.events = [];
73 75 getEventsList();
74 76 })
75 77 }
... ... @@ -111,8 +113,29 @@ $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){
111 113 console.log('date', dyear+'-'+dmonth+'-'+dday);
112 114 for (var i = 0; i < $scope.events.length; i++) {
113 115 if ($scope.events[i].id == event.id) {
  116 +
114 117 console.log('events', $scope.events[i]);
115   - $scope.events[i].start = dyear+'-'+dmonth+'-'+dday;
  118 + //$scope.events[i].start = dyear+'-'+dmonth+'-'+dday;
  119 + $scope.showLoader = true;
  120 + $scope.updatedDataDrop = {};
  121 + $scope.updatedDataDrop.id = $scope.events[i].id;
  122 + $scope.updatedDataDrop.aircraft = $scope.events[i].title;
  123 + $scope.updatedDataDrop.deployDate = dyear+'-'+dmonth+'-'+dday;
  124 + if ($scope.updatedDataDrop.deployDate != undefined) {
  125 + $scope.updatedDataDrop.deployDate = new Date($scope.updatedDataDrop.deployDate);
  126 + $scope.updatedDataDrop.deployDate = $scope.updatedDataDrop.deployDate.getTime();
  127 + }
  128 + schedulerService.updateScheduledEvent($scope.updatedDataDrop).then(function(response){
  129 + console.log('response', response);
  130 + $scope.updatedDataDrop = {};
  131 + $('#editEvent').modal('hide');
  132 + toastr.success('Updated Successfully', {
  133 + closeButton: true
  134 + })
  135 + $scope.events = [];
  136 + getEventsList();
  137 + })
  138 +
116 139 }
117 140 }
118 141 console.log('$scope.events new', $scope.events);
... ...
app/partials/updateFuelManager/updateFuelManager.html
... ... @@ -11,10 +11,9 @@
11 11 <div class="myLoader" ng-show="showLoader">
12 12 <img src="../img/hourglass.gif" width="50px;">
13 13 </div>
14   -<div style="width: 90%; margin-left: 5%;">
15   - <div class="row">
  14 +
  15 +<div class="col-xs-12 col-md-6">
16 16  
17   - <div class="col-md-6">
18 17 <div class="widget stacked">
19 18 <div class="widget-header">
20 19 <i class="fa fa-pencil"></i>
... ... @@ -79,9 +78,68 @@
79 78 <!-- /widget-content -->
80 79 </div>
81 80 <!-- /widget -->
82   - </div>
83 81  
84   - <div class="col-md-6">
  82 +
  83 +
  84 + <div class="widget stacked">
  85 + <div class="widget-header">
  86 + <i class="fa fa-pencil"></i>
  87 + <h3>Price Manager</h3>
  88 + <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()">
  89 + <option value="" disabled selected="selected">Email All Pricing</option>
  90 + <option value="JET-A">Email JET-A pricing only</option>
  91 + <option value="AVGAS">Email AVGAS pricing only</option>
  92 + <option disabled>_______________________________</option>
  93 + <option value="all">Distribute All</option>
  94 + </select>
  95 + </div>
  96 + <!-- /widget-header -->
  97 + <div class="widget-content">
  98 + <h4>Deployed Fuel Prices</h4>
  99 + <table class="table">
  100 + <thead>
  101 + <tr>
  102 + <th> Product</th>
  103 + <th> Cost</th>
  104 + <th> Margin</th>
  105 + <th> PAP(Total)</th>
  106 + <th style="color: #F90;"> Expires</th>
  107 + </tr>
  108 + </thead>
  109 + <tbody>
  110 + <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }">
  111 + <td>
  112 + <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span>
  113 + <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span>
  114 + <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span>
  115 + <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span>
  116 + </td>
  117 + <td>
  118 + <span>{{fuelPricing.fuelPricing.cost}}</span>
  119 + </td>
  120 + <td>
  121 + <span>{{fuelPricing.fuelPricing.papMargin}}</span>
  122 + </td>
  123 + <td>
  124 + <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span>
  125 + </td>
  126 + <td>
  127 + <span>{{fuelPricing.fuelPricing.expirationDate}}</span>
  128 + </td>
  129 + </tr>
  130 + </tbody>
  131 + </table>
  132 +
  133 + </div>
  134 + <!-- /widget-content -->
  135 + </div>
  136 + <!-- /widget -->
  137 +
  138 +
  139 +</div>
  140 +<div class="col-xs-12 col-md-6">
  141 +
  142 +
85 143 <div class="widget stacked">
86 144 <div class="widget-header">
87 145 <i class="fa fa-pencil"></i>
... ... @@ -184,71 +242,9 @@
184 242 <!-- /widget-content -->
185 243 </div>
186 244 <!-- /widget -->
187   - </div>
188   - <!-- /span6 -->
189   - </div>
190   - <!-- /span12 -->
191   -</div>
192   -<!-- /row -->
193   -<div style="width: 96%; margin-left: 2%;">
194   -<div class="row">
195   - <div class="col-md-6">
196   - <div class="widget stacked">
197   - <div class="widget-header">
198   - <i class="fa fa-pencil"></i>
199   - <h3>Price Manager</h3>
200   - <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()">
201   - <option value="" disabled selected="selected">Email All Pricing</option>
202   - <option value="JET-A">Email JET-A pricing only</option>
203   - <option value="AVGAS">Email AVGAS pricing only</option>
204   - <option disabled>_______________________________</option>
205   - <option value="all">Distribute All</option>
206   - </select>
207   - </div>
208   - <!-- /widget-header -->
209   - <div class="widget-content">
210   - <h4>Deployed Fuel Prices</h4>
211   - <table class="table">
212   - <thead>
213   - <tr>
214   - <th> Product</th>
215   - <th> Cost</th>
216   - <th> Margin</th>
217   - <th> PAP(Total)</th>
218   - <th style="color: #F90;"> Expires</th>
219   - </tr>
220   - </thead>
221   - <tbody>
222   - <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }">
223   - <td>
224   - <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span>
225   - <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span>
226   - <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span>
227   - <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span>
228   - </td>
229   - <td>
230   - <span>{{fuelPricing.fuelPricing.cost}}</span>
231   - </td>
232   - <td>
233   - <span>{{fuelPricing.fuelPricing.papMargin}}</span>
234   - </td>
235   - <td>
236   - <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span>
237   - </td>
238   - <td>
239   - <span>{{fuelPricing.fuelPricing.expirationDate}}</span>
240   - </td>
241   - </tr>
242   - </tbody>
243   - </table>
244   -
245   - </div>
246   - <!-- /widget-content -->
247   - </div>
248   - <!-- /widget -->
249   - </div>
250   -
251   - <div class="col-md-6">
  245 +
  246 +
  247 +
252 248 <div class="widget stacked">
253 249 <div class="widget-header">
254 250 <i class="fa fa-pencil"></i>
... ... @@ -351,13 +347,11 @@
351 347 <!-- /widget-content -->
352 348 </div>
353 349 <!-- /widget -->
354   - </div>
355   - <!-- /span6 -->
356   -</div>
357   -</div>
358   -</div>
359   -</div> <!-- /container -->
  350 +
  351 +
360 352  
  353 +</div>
  354 +<div class="clearfix"></div>
361 355  
362 356 <div class="addNewMargin" style="display: none;">
363 357 <div class="customBackdrop">
... ...