From 71c760e0c0c44c4b24e4d792529a5d4ab00a990e Mon Sep 17 00:00:00 2001 From: Jaideep Singh Date: Tue, 13 Jun 2017 18:34:49 +0530 Subject: [PATCH] update Fuel Manager updates suggested by client --- .../updateFuelManager.controller.js | 33 +++++- .../updateFuelManager/updateFuelManager.html | 117 ++++++++++++--------- 2 files changed, 101 insertions(+), 49 deletions(-) diff --git a/app/partials/updateFuelManager/updateFuelManager.controller.js b/app/partials/updateFuelManager/updateFuelManager.controller.js index 7991134..c9b57ba 100644 --- a/app/partials/updateFuelManager/updateFuelManager.controller.js +++ b/app/partials/updateFuelManager/updateFuelManager.controller.js @@ -6,7 +6,10 @@ .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) { - $scope.showLoader = true; + + + + $scope.showLoader = true; $scope.yes = function(data){ console.log('========'); console.log('value', data); @@ -45,6 +48,7 @@ $('#'+id+' select, #'+id+' input').prop("disabled", false); $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); $('#'+id+' .btn-default').css('display', 'none'); + $('#'+id+' .btn-primary').css('display', 'none'); updateFuelManagerService.getJetTiers(id).then(function(tiers) { $scope.aTypeJets[index].tierList = tiers; @@ -58,6 +62,7 @@ $('#'+id+' select, #'+id+' input').prop("disabled", false); $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); $('#'+id+' .btn-default').css('display', 'none'); + $('#'+id+' .btn-primary').css('display', 'none'); updateFuelManagerService.getJetTiers(id).then(function(tiers) { $scope.vTypeJets[index].tierList = tiers; @@ -235,6 +240,7 @@ $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); + $('#'+$scope.jetsDetail.id+' .btn-primary').css('display', 'inline-block'); var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; @@ -258,6 +264,7 @@ $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); $('#'+jets.id+' .btn-default').css('display', 'inline-block'); + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); } $scope.closeAccordianVtype = function(jets){ @@ -266,6 +273,7 @@ $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); $('#'+jets.id+' .btn-default').css('display', 'inline-block'); + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); } $scope.saveVtypeJetAccordian = function(jets){ @@ -278,6 +286,7 @@ $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; @@ -415,8 +424,26 @@ } } } + + var str =""+ $scope.newFuelPricing[i].name + if(str.startsWith("J")){ + $scope.newFuelPricing[i].jeta = true; + var str1 = str.substring(0,5) + var str2 = str.substring(6, str.length) + $scope.newFuelPricing[i].name = str1 + $scope.newFuelPricing[i].namejetrest = str2 + + + }else if(str.startsWith("100")){ + $scope.newFuelPricing[i].avgas = true; + var str1 = str.substring(0,5) + var str2 = str.substring(6, str.length) + $scope.newFuelPricing[i].name = str1 + $scope.newFuelPricing[i].nameavgasrest = str2 + } } $scope.showLoader = false; + }) $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ }); @@ -658,6 +685,10 @@ $('#deleteVtypeMargin').css('display', 'none'); } + + + + }]); diff --git a/app/partials/updateFuelManager/updateFuelManager.html b/app/partials/updateFuelManager/updateFuelManager.html index 3027d1a..4f024be 100644 --- a/app/partials/updateFuelManager/updateFuelManager.html +++ b/app/partials/updateFuelManager/updateFuelManager.html @@ -8,72 +8,77 @@
-
+
-
+ +
-

Price Manager

- +

Price Manager Staging

-

Update Fuel Price Here

+
Queue Pricing for Deployment in the Price Manager below
+
- + + + - +
Product Cost Margin PAP(Margin) Deploy DatePrice Expires PAP(Total) Expires
- {{fuelPricing.name}} + {{fuelPricing.name}} + {{fuelPricing.namejetrest}} + {{fuelPricing.name}} + {{fuelPricing.nameavgasrest}} - + + + - + - $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }} + - + $ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}
- + + + +
-
+ +
-
+
-
+
-

JET-A Customer Margin Template

-
- -
+

JET-A Customer Margin Template

+
@@ -85,9 +90,8 @@ {{jets.marginName}} $ @@ -95,7 +99,8 @@ - + +
@@ -154,6 +159,9 @@
+
+ +
-
+
-
+
-

Queue Future Pricing

+

Price Manager

+
-

Update Queue Future Fuel Pricing Here

+

Update Fuel Price Here

+ - - + + {{fuelPricing.fuelPricing.cost}} + + {{fuelPricing.fuelPricing.papMargin}} +
Product Cost Margin PAP(Total) Deploy Next Expiration Expires
- {{fuelPricing.name}} + {{fuelPricing.name}} + {{fuelPricing.namejetrest}} + {{fuelPricing.name}} + {{fuelPricing.nameavgasrest}} - - - $ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}} - - + $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }} - + {{fuelPricing.fuelPricing.expirationDate}}
- +
-
-
+
+ +

AVGAS 100LL Customer Margin Template

-
- -
+
@@ -254,7 +271,8 @@ - + +
@@ -312,6 +330,9 @@
+
+ +