From c622f8e758197586b022722661191b23e0cd343a Mon Sep 17 00:00:00 2001 From: swarn Date: Fri, 16 Jun 2017 18:27:59 +0530 Subject: [PATCH] drog-drop and update scheduler fixed, ui issue on update ramp fee manager fixed --- app/partials/scheduler/scheduler.controller.js | 25 +++- .../updateFuelManager/updateFuelManager.html | 146 ++++++++++----------- 2 files changed, 94 insertions(+), 77 deletions(-) diff --git a/app/partials/scheduler/scheduler.controller.js b/app/partials/scheduler/scheduler.controller.js index c6dfd1a..89f5d1d 100644 --- a/app/partials/scheduler/scheduler.controller.js +++ b/app/partials/scheduler/scheduler.controller.js @@ -40,6 +40,7 @@ angular.module('acufuel') schedulerService.addNewEventService($scope.newEvent).then(function(response){ $scope.newEvent = {}; $('#addEvent').modal('hide'); + $scope.events = []; getEventsList(); }) } @@ -70,6 +71,7 @@ angular.module('acufuel') toastr.success('Updated Successfully', { closeButton: true }) + $scope.events = []; getEventsList(); }) } @@ -111,8 +113,29 @@ $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){ console.log('date', dyear+'-'+dmonth+'-'+dday); for (var i = 0; i < $scope.events.length; i++) { if ($scope.events[i].id == event.id) { + console.log('events', $scope.events[i]); - $scope.events[i].start = dyear+'-'+dmonth+'-'+dday; + //$scope.events[i].start = dyear+'-'+dmonth+'-'+dday; + $scope.showLoader = true; + $scope.updatedDataDrop = {}; + $scope.updatedDataDrop.id = $scope.events[i].id; + $scope.updatedDataDrop.aircraft = $scope.events[i].title; + $scope.updatedDataDrop.deployDate = dyear+'-'+dmonth+'-'+dday; + if ($scope.updatedDataDrop.deployDate != undefined) { + $scope.updatedDataDrop.deployDate = new Date($scope.updatedDataDrop.deployDate); + $scope.updatedDataDrop.deployDate = $scope.updatedDataDrop.deployDate.getTime(); + } + schedulerService.updateScheduledEvent($scope.updatedDataDrop).then(function(response){ + console.log('response', response); + $scope.updatedDataDrop = {}; + $('#editEvent').modal('hide'); + toastr.success('Updated Successfully', { + closeButton: true + }) + $scope.events = []; + getEventsList(); + }) + } } console.log('$scope.events new', $scope.events); diff --git a/app/partials/updateFuelManager/updateFuelManager.html b/app/partials/updateFuelManager/updateFuelManager.html index 362bf16..429a664 100644 --- a/app/partials/updateFuelManager/updateFuelManager.html +++ b/app/partials/updateFuelManager/updateFuelManager.html @@ -11,10 +11,9 @@
-
-
+ +
-
@@ -79,9 +78,68 @@
-
-
+ + +
+
+ +

Price Manager

+ +
+ +
+

Deployed Fuel Prices

+ + + + + + + + + + + + + + + + + + + +
Product Cost Margin PAP(Total) Expires
+ {{fuelPricing.name}} + {{fuelPricing.namejetrest}} + {{fuelPricing.name}} + {{fuelPricing.nameavgasrest}} + + {{fuelPricing.fuelPricing.cost}} + + {{fuelPricing.fuelPricing.papMargin}} + + $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }} + + {{fuelPricing.fuelPricing.expirationDate}} +
+ +
+ +
+ + + +
+
+ +
@@ -184,71 +242,9 @@
-
- -
- -
- -
-
-
-
-
- -

Price Manager

- -
- -
-

Deployed Fuel Prices

- - - - - - - - - - - - - - - - - - - -
Product Cost Margin PAP(Total) Expires
- {{fuelPricing.name}} - {{fuelPricing.namejetrest}} - {{fuelPricing.name}} - {{fuelPricing.nameavgasrest}} - - {{fuelPricing.fuelPricing.cost}} - - {{fuelPricing.fuelPricing.papMargin}} - - $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }} - - {{fuelPricing.fuelPricing.expirationDate}} -
- -
- -
- -
- -
+ + +
@@ -351,13 +347,11 @@
-
- -
-
-
-
+ + +
+