Commit 71c760e0c0c44c4b24e4d792529a5d4ab00a990e
1 parent
6284a85b90
Exists in
master
update Fuel Manager updates suggested by client
Showing
2 changed files
with
101 additions
and
49 deletions
Show diff stats
app/partials/updateFuelManager/updateFuelManager.controller.js
... | ... | @@ -6,7 +6,10 @@ |
6 | 6 | |
7 | 7 | |
8 | 8 | .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) { |
9 | - $scope.showLoader = true; | |
9 | + | |
10 | + | |
11 | + | |
12 | + $scope.showLoader = true; | |
10 | 13 | $scope.yes = function(data){ |
11 | 14 | console.log('========'); |
12 | 15 | console.log('value', data); |
... | ... | @@ -45,6 +48,7 @@ |
45 | 48 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
46 | 49 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
47 | 50 | $('#'+id+' .btn-default').css('display', 'none'); |
51 | + $('#'+id+' .btn-primary').css('display', 'none'); | |
48 | 52 | |
49 | 53 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
50 | 54 | $scope.aTypeJets[index].tierList = tiers; |
... | ... | @@ -58,6 +62,7 @@ |
58 | 62 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
59 | 63 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
60 | 64 | $('#'+id+' .btn-default').css('display', 'none'); |
65 | + $('#'+id+' .btn-primary').css('display', 'none'); | |
61 | 66 | |
62 | 67 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
63 | 68 | $scope.vTypeJets[index].tierList = tiers; |
... | ... | @@ -235,6 +240,7 @@ |
235 | 240 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
236 | 241 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
237 | 242 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
243 | + $('#'+$scope.jetsDetail.id+' .btn-primary').css('display', 'inline-block'); | |
238 | 244 | |
239 | 245 | 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; |
240 | 246 | |
... | ... | @@ -258,6 +264,7 @@ |
258 | 264 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); |
259 | 265 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); |
260 | 266 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); |
267 | + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | |
261 | 268 | } |
262 | 269 | |
263 | 270 | $scope.closeAccordianVtype = function(jets){ |
... | ... | @@ -266,6 +273,7 @@ |
266 | 273 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); |
267 | 274 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); |
268 | 275 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); |
276 | + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | |
269 | 277 | } |
270 | 278 | |
271 | 279 | $scope.saveVtypeJetAccordian = function(jets){ |
... | ... | @@ -278,6 +286,7 @@ |
278 | 286 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
279 | 287 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
280 | 288 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
289 | + $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | |
281 | 290 | |
282 | 291 | 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; |
283 | 292 | |
... | ... | @@ -415,8 +424,26 @@ |
415 | 424 | } |
416 | 425 | } |
417 | 426 | } |
427 | + | |
428 | + var str =""+ $scope.newFuelPricing[i].name | |
429 | + if(str.startsWith("J")){ | |
430 | + $scope.newFuelPricing[i].jeta = true; | |
431 | + var str1 = str.substring(0,5) | |
432 | + var str2 = str.substring(6, str.length) | |
433 | + $scope.newFuelPricing[i].name = str1 | |
434 | + $scope.newFuelPricing[i].namejetrest = str2 | |
435 | + | |
436 | + | |
437 | + }else if(str.startsWith("100")){ | |
438 | + $scope.newFuelPricing[i].avgas = true; | |
439 | + var str1 = str.substring(0,5) | |
440 | + var str2 = str.substring(6, str.length) | |
441 | + $scope.newFuelPricing[i].name = str1 | |
442 | + $scope.newFuelPricing[i].nameavgasrest = str2 | |
443 | + } | |
418 | 444 | } |
419 | 445 | $scope.showLoader = false; |
446 | + | |
420 | 447 | }) |
421 | 448 | $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ |
422 | 449 | }); |
... | ... | @@ -658,6 +685,10 @@ |
658 | 685 | $('#deleteVtypeMargin').css('display', 'none'); |
659 | 686 | } |
660 | 687 | |
688 | + | |
689 | + | |
690 | + | |
691 | + | |
661 | 692 | }]); |
662 | 693 | |
663 | 694 | ... | ... |
app/partials/updateFuelManager/updateFuelManager.html
... | ... | @@ -8,72 +8,77 @@ |
8 | 8 | <div class="myLoader" ng-show="showLoader"> |
9 | 9 | <img src="../img/hourglass.gif" width="50px;"> |
10 | 10 | </div> |
11 | -<div class="container"> | |
11 | +<div style="width: 90%; margin-left: 5%;"> | |
12 | 12 | <div class="row"> |
13 | - <div class="col-md-5"> | |
13 | + | |
14 | + <div class="col-md-6"> | |
14 | 15 | <div class="widget stacked"> |
15 | 16 | <div class="widget-header"> |
16 | 17 | <i class="fa fa-pencil"></i> |
17 | - <h3>Price Manager</h3> | |
18 | - <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> | |
19 | - <option value="" disabled selected="selected">Send Pricing Email</option> | |
20 | - <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> | |
21 | - <option disabled>_______________</option> | |
22 | - <option value="all">Distribute All</option> | |
23 | - </select> | |
18 | + <h3>Price Manager Staging</h3> | |
24 | 19 | </div> |
25 | 20 | <!-- /widget-header --> |
26 | 21 | <div class="widget-content"> |
27 | - <h4>Update Fuel Price Here</h4> | |
22 | + <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6> | |
23 | + <form> | |
28 | 24 | <table class="table"> |
29 | 25 | <thead> |
30 | 26 | <tr> |
31 | 27 | <th> Product</th> |
32 | 28 | <th> Cost</th> |
33 | - <th> Margin</th> | |
29 | + <th> PAP(Margin)</th> | |
30 | + <th> Deploy Date</th> | |
31 | + <th style="color: #F90;">Price Expires</th> | |
34 | 32 | <th> PAP(Total)</th> |
35 | - <th style="color: #F90;"> Expires</th> | |
36 | 33 | </tr> |
37 | 34 | </thead> |
38 | 35 | <tbody> |
39 | 36 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
40 | 37 | <td> |
41 | - <span>{{fuelPricing.name}}</span> | |
38 | + <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | |
39 | + <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | |
40 | + <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | |
41 | + <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | |
42 | 42 | </td> |
43 | 43 | <td> |
44 | - <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px"> | |
44 | + <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> | |
45 | + </td> | |
46 | + <td> | |
47 | + <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;"> | |
45 | 48 | </td> |
46 | 49 | <td> |
47 | - <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 6px;"> | |
50 | + <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 80px; padding: 6px 6px;"> | |
48 | 51 | </td> |
49 | 52 | <td> |
50 | - <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | |
53 | + <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 80px; padding: 6px 6px;"> | |
51 | 54 | </td> |
52 | 55 | <td> |
53 | - <input type="text" class="form-control" datepicker ng-model="fuelPricing.fuelPricing.expirationDate" style="height:31px; width: 100px; padding: 6px 6px;"> | |
56 | + <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> | |
54 | 57 | </td> |
55 | 58 | </tr> |
56 | 59 | </tbody> |
57 | 60 | </table> |
58 | 61 | <div class="row" style="margin-left: 0px;"> |
59 | 62 | <div class="col-md-12" style= "text-align: right;"> |
60 | - <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> | |
63 | + <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button> | |
64 | + | |
65 | + <button type="reset" class="btn btn-default btn-xs" style="margin-right:33%">Reset All</button> | |
66 | + <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button> | |
61 | 67 | </div> |
62 | 68 | </div> |
63 | - </div> | |
69 | + </form> | |
70 | + </div> | |
64 | 71 | <!-- /widget-content --> |
65 | 72 | </div> |
66 | 73 | <!-- /widget --> |
67 | - </div> | |
74 | + </div> | |
68 | 75 | |
69 | - <div class="col-md-7"> | |
76 | + <div class="col-md-6"> | |
70 | 77 | <div class="widget stacked"> |
71 | 78 | <div class="widget-header"> |
72 | 79 | <i class="fa fa-pencil"></i> |
73 | - <h3><b>JET-A</b> Customer Margin Template</h3> | |
74 | - <div class="pull-right"> | |
75 | - <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | |
76 | - </div> | |
80 | + <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3> | |
81 | + | |
77 | 82 | </div> |
78 | 83 | <!-- /widget-header --> |
79 | 84 | <div class="widget-content" style="padding-top: 10px;"> |
... | ... | @@ -85,9 +90,8 @@ |
85 | 90 | <span>{{jets.marginName}}</span> |
86 | 91 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
87 | 92 | <option value="" disabled selected>Pricing Structure</option> |
88 | - <option value="minus">Retail-(minus)</option> | |
93 | + <option value="minus">Retail/PAP-(minus)</option> | |
89 | 94 | <option value="plus">Cost+(plus)</option> |
90 | - <option value="equal">Direct=(equal)</option> | |
91 | 95 | </select> |
92 | 96 | <span style="margin-right: 0;">$</span> |
93 | 97 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
... | ... | @@ -95,7 +99,8 @@ |
95 | 99 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> |
96 | 100 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> |
97 | 101 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> |
98 | - <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)">Edit</button> | |
102 | + <button type="button" class="btn btn-primary" ng-click="updateFutureFuelPricingClick()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> | |
103 | + <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | |
99 | 104 | </div> |
100 | 105 | <div class="clearfix"></div> |
101 | 106 | </div> |
... | ... | @@ -154,6 +159,9 @@ |
154 | 159 | </div> |
155 | 160 | </div> |
156 | 161 | </div> |
162 | + <div class="pull-right"> | |
163 | + <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | |
164 | + </div> | |
157 | 165 | </section> |
158 | 166 | <!-- <div class="row"> </div> |
159 | 167 | <div class="row"> |
... | ... | @@ -174,65 +182,74 @@ |
174 | 182 | <!-- /span12 --> |
175 | 183 | </div> |
176 | 184 | <!-- /row --> |
177 | -<div class="container"> | |
185 | +<div style="width: 90%; margin-left: 5%;"> | |
178 | 186 | <div class="row"> |
179 | - <div class="col-md-5"> | |
187 | + <div class="col-md-6"> | |
180 | 188 | <div class="widget stacked"> |
181 | 189 | <div class="widget-header"> |
182 | 190 | <i class="fa fa-pencil"></i> |
183 | - <h3>Queue Future Pricing</h3> | |
191 | + <h3>Price Manager</h3> | |
192 | + <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()"> | |
193 | + <option value="" disabled selected="selected">Email All Pricing</option> | |
194 | + <option value="JET-A">Email JET-A pricing only</option> | |
195 | + <option value="AVGAS">Email AVGAS pricing only</option> | |
196 | + <option disabled>_______________________________</option> | |
197 | + <option value="all">Distribute All</option> | |
198 | + </select> | |
184 | 199 | </div> |
185 | 200 | <!-- /widget-header --> |
186 | 201 | <div class="widget-content"> |
187 | - <h4>Update Queue Future Fuel Pricing Here</h4> | |
202 | + <h4>Update Fuel Price Here</h4> | |
188 | 203 | <table class="table"> |
189 | 204 | <thead> |
190 | 205 | <tr> |
191 | 206 | <th> Product</th> |
192 | 207 | <th> Cost</th> |
208 | + <th> Margin</th> | |
193 | 209 | <th> PAP(Total)</th> |
194 | - <th> Deploy</th> | |
195 | - <th style="color: #F90;"> Next Expiration</th> | |
210 | + <th style="color: #F90;"> Expires</th> | |
196 | 211 | </tr> |
197 | 212 | </thead> |
198 | 213 | <tbody> |
199 | 214 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
200 | 215 | <td> |
201 | - <span>{{fuelPricing.name}}</span> | |
216 | + <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | |
217 | + <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | |
218 | + <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | |
219 | + <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | |
202 | 220 | </td> |
203 | 221 | <td> |
204 | - <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> | |
205 | - </td> | |
222 | + <span>{{fuelPricing.fuelPricing.cost}}</span> | |
223 | + </td> | |
206 | 224 | <td> |
207 | - <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> | |
208 | - </td> | |
225 | + <span>{{fuelPricing.fuelPricing.papMargin}}</span> | |
226 | + </td> | |
209 | 227 | <td> |
210 | - <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 100px; padding: 6px 6px;"> | |
228 | + <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | |
211 | 229 | </td> |
212 | 230 | <td> |
213 | - <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 100px; padding: 6px 6px;"> | |
231 | + <span>{{fuelPricing.fuelPricing.expirationDate}}</span> | |
214 | 232 | </td> |
215 | 233 | </tr> |
216 | 234 | </tbody> |
217 | 235 | </table> |
218 | 236 | <div class="row" style="margin-left: 0px;"> |
219 | 237 | <div class="col-md-12" style= "text-align: right;"> |
220 | - <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()">Save</button> | |
238 | + <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()" style="font-size:14px; margin-right:3%">Save</button> | |
221 | 239 | </div> |
222 | 240 | </div> |
223 | 241 | </div> |
224 | 242 | <!-- /widget-content --> |
225 | 243 | </div> |
226 | 244 | <!-- /widget --> |
227 | - </div> | |
228 | - <div class="col-md-7"> | |
245 | + </div> | |
246 | + | |
247 | + <div class="col-md-6"> | |
229 | 248 | <div class="widget stacked"> |
230 | 249 | <div class="widget-header"> |
231 | 250 | <i class="fa fa-pencil"></i> |
232 | 251 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> |
233 | - <div class="pull-right"> | |
234 | - <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | |
235 | - </div> | |
252 | + | |
236 | 253 | </div> |
237 | 254 | <!-- /widget-header --> |
238 | 255 | <div class="widget-content" style="padding-top: 10px;"> |
... | ... | @@ -254,7 +271,8 @@ |
254 | 271 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button> |
255 | 272 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> |
256 | 273 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> |
257 | - <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> | |
274 | + <button type="button" class="btn btn-primary" ng-click="updateFutureFuelPricingClick()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> | |
275 | + <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | |
258 | 276 | </div> |
259 | 277 | <div class="clearfix"></div> |
260 | 278 | </div> |
... | ... | @@ -312,6 +330,9 @@ |
312 | 330 | </div> |
313 | 331 | </div> |
314 | 332 | </div> |
333 | + <div class="pull-right"> | |
334 | + <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | |
335 | + </div> | |
315 | 336 | </section> |
316 | 337 | <!-- <div class="row"> </div> |
317 | 338 | <div class="row"> | ... | ... |