Commit 26f8c698a5cc9bdce5263314a963e5f8b304e954

Authored by Kuldeep Arora
1 parent f62f8940f8
Exists in master

fixes

app/partials/dashboard/dashboard.controller.js
... ... @@ -5,6 +5,7 @@
5 5 .controller('dashboardController', [ '$scope', '$filter', '$rootScope', '$state', 'dashboardService','updateFuelManagerService', dashboardController]);
6 6  
7 7 function dashboardController($scope, $filter, $rootScope, $state, dashboardService,updateFuelManagerService) {
  8 +
8 9 $scope.getQuote = true;
9 10 $scope.showQuote = false;
10 11 $scope.getQuote = function () {
... ...
app/partials/enterFuelOrder/enterFuelOrder.controller.js
... ... @@ -115,7 +115,7 @@ function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http,
115 115 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec;
116 116 $scope.order.upliftDate = new Date($scope.order.upliftDate);
117 117 $scope.order.upliftDate = $scope.order.upliftDate.getTime();
118   - //console.log("---date---",$scope.order.upliftDate)
  118 + console.log("---date---",$scope.order.upliftDate)
119 119 }
120 120 /*if ($scope.order.departingDate != '') {
121 121 $scope.order.departingDate = new Date($scope.order.departingDate);
... ...
app/partials/updateFuelManager/updateFuelManager.controller.js
... ... @@ -4,7 +4,7 @@
4 4 angular.module('acufuel')
5 5  
6 6  
7   - .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) {
  7 + .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService','$state', function($scope , $uibModal, updateFuelManagerService,$state) {
8 8 $scope.showLoader = true;
9 9 $scope.yes = function(data){
10 10 // console.log('========');
... ... @@ -35,9 +35,7 @@
35 35  
36 36 function getAtypeFunction(){
37 37 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
38   - for (var i = 0; i
39   -
40   -<result.length; i++) {
  38 + for (var i = 0; i<result.length; i++) {
41 39 result[i].marginValue = parseFloat(result[i].marginValue).toFixed(4);
42 40 }
43 41 $scope.aTypeJets = result;
... ... @@ -49,12 +47,10 @@
49 47  
50 48 function getVTypeFunction(){
51 49 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
52   - for (var i = 0; i
53   -
54   - <result.length; i++) {
  50 + for (var i = 0; i<result.length; i++) {
55 51 result[i].marginValue = parseFloat(result[i].marginValue).toFixed(4);
56 52 }
57   - console.log("get Vtype",result)
  53 + //console.log("get Vtype",result)
58 54  
59 55 $scope.vTypeJets = result;
60 56 $scope.showLoader = false;
... ... @@ -195,7 +191,6 @@
195 191 toastr.success(''+result.success+'', {
196 192 closeButton: true
197 193 })
198   - // console.log("--tier id custom",$scope.deleteTierObject.id)
199 194 updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) {
200 195 $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers;
201 196 $scope.showLoader = false;
... ... @@ -206,7 +201,6 @@
206 201 }
207 202  
208 203 $scope.cancelTierDelete = function(){
209   - // console.log('cancel');
210 204 $('#deleteTierConfirm').css('display', 'none');
211 205 $scope.deleteTierObject = {};
212 206 }
... ... @@ -248,7 +242,6 @@
248 242 }
249 243  
250 244 $scope.cancelVtypeTierDelete = function(){
251   - // console.log('cancel');
252 245 $('#deleteVtypeTierConfirm').css('display', 'none');
253 246 $scope.deleteVtypeTierObject = {};
254 247 }
... ... @@ -257,7 +250,6 @@
257 250 $scope.showLoader = true;
258 251 $scope.jetsDetail = jets;
259 252 $scope.jetsDetail.userProfileId = $scope.userProfileId;
260   - //console.log('jets', $scope.jetsDetail);
261 253 $('.'+$scope.jetsDetail.id).slideUp();
262 254 $('#'+$scope.jetsDetail.id).removeClass('customActive');
263 255 $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true);
... ... @@ -268,15 +260,10 @@
268 260 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;
269 261  
270 262 updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) {
271   - // console.log('newJet', editJetData);
272 263 toastr.success('Successfully Updated', {
273 264 closeButton: true
274 265 })
275   - /*updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
276   - console.log('result for margin', result);
277   - $scope.aTypeJets = result;
278   - $scope.showLoader = false;
279   - })*/
  266 +
280 267 getAtypeFunction();
281 268 })
282 269  
... ... @@ -315,15 +302,10 @@
315 302 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;
316 303  
317 304 updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) {
318   - //console.log('newJet', editVtypeJetData);
319 305 toastr.success('Successfully Updated', {
320 306 closeButton: true
321 307 })
322   - /* updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
323   - $scope.vTypeJets = result;
324   - //console.log('second jets', result);
325   - $scope.showLoader = false;
326   - })*/
  308 +
327 309 getVTypeFunction();
328 310 })
329 311  
... ... @@ -349,16 +331,11 @@
349 331 var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message;
350 332  
351 333 updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) {
352   - //console.log('newJet', jetData);
353 334 toastr.success('Successfully Added', {
354 335 closeButton: true
355 336 })
356 337 $('.addNewMargin').css('display', 'none');
357   - /* updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
358   - console.log('result', result);
359   - $scope.aTypeJets = result;
360   - $scope.showLoader = false;
361   - })*/
  338 +
362 339 getAtypeFunction();
363 340 })
364 341 }
... ... @@ -387,10 +364,7 @@
387 364 closeButton: true
388 365 })
389 366 $('.addNewVtype').css('display', 'none');
390   - /*updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
391   - $scope.vTypeJets = result;
392   - $scope.showLoader = false;
393   - })*/
  367 +
394 368 getVTypeFunction();
395 369 })
396 370  
... ... @@ -453,7 +427,6 @@
453 427 $scope.saveAndCloseConfirm = function(){
454 428 $('#confirm1').css('display', 'none');
455 429 updateFuelManagerService.sendMailToGroupMargin($scope.sendEmail.pricing).then(function(result) {
456   - console.log("emails",$scope.sendEmail.pricing)
457 430 $scope.sendEmail = {};
458 431 toastr.success(''+result.success+'', {
459 432 closeButton: true
... ... @@ -475,36 +448,38 @@
475 448  
476 449 $scope.formFunction = function(){
477 450 updateFuelManagerService.getFuelPricingNew().then(function(result) {
478   - $scope.newFuelPricing = result;
479   - // console.log('kd testing', result);
  451 + $scope.newFuelPricing = result;
480 452 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
481 453 if ($scope.newFuelPricing[i].fuelPricing != null) {
  454 + /*console.log('Swarn Singh', $scope.newFuelPricing[i].fuelPricing);
  455 + console.log('Swarn Singh', new Date($scope.newFuelPricing[i].fuelPricing.expirationDate));
482 456 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
483 457 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
484 458 var month = newTime.getUTCMonth() + 1; //months from 1-12
485 459 var day = newTime.getUTCDate();
486 460 var year = newTime.getUTCFullYear();
  461 +
487 462 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
488   - }
  463 + }*/
489 464 }
490 465 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
491 466 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
492   - if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
  467 + /*if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
493 468 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
494 469 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
495 470 var nextDay = newTime.getUTCDate();
496 471 var nextYear = newTime.getUTCFullYear();
497 472 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
498   - }
  473 + }*/
499 474 }
500 475 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
501   - if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
  476 + /*if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
502 477 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
503 478 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
504 479 var dday = newTime.getUTCDate();
505 480 var dyear = newTime.getUTCFullYear();
506 481 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
507   - }
  482 + }*/
508 483 }
509 484 }
510 485  
... ... @@ -526,9 +501,7 @@
526 501 }
527 502 }
528 503  
529   - for (var i = 0; i
530   -
531   - <result.length; i++) {
  504 + for (var i = 0; i<result.length; i++) {
532 505 if (result[i].fuelPricing != null) {
533 506 if (result[i].fuelPricing.expirationDate != null && result[i].fuelPricing.expirationDate != '') {
534 507 var newTime = new Date(result[i].fuelPricing.expirationDate);
... ... @@ -591,8 +564,15 @@
591 564 if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) {
592 565 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';
593 566 }else{
  567 + //$scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
  568 + //$scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime();
  569 + //new code
  570 + var setExpiration = new Date();
  571 + var hours = setExpiration.getHours();
  572 + var min = setExpiration.getMinutes();
  573 + var sec = setExpiration.getSeconds();
  574 + $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate + ' ' + hours + ':' + min + ':' + sec;
594 575 $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
595   - // console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate);
596 576 $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime();
597 577 }
598 578  
... ... @@ -622,32 +602,33 @@
622 602 $scope.newFuelPricing = result;
623 603 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
624 604 if ($scope.newFuelPricing[i].fuelPricing != null) {
625   - if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
  605 + /*if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
626 606 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
627 607 var month = newTime.getUTCMonth() + 1; //months from 1-12
628 608 var day = newTime.getUTCDate();
629 609 var year = newTime.getUTCFullYear();
630 610 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
631   - }
  611 + }*/
632 612 }
633 613 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
634 614 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
635   - if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
  615 + /*if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
636 616 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
637 617 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
638 618 var nextDay = newTime.getUTCDate();
639 619 var nextYear = newTime.getUTCFullYear();
640 620 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
641   - }
  621 + }*/
642 622 }
643 623 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
644   - if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
  624 + /* if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
645 625 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
646 626 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
647 627 var dday = newTime.getUTCDate();
648 628 var dyear = newTime.getUTCFullYear();
649 629 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
650   - }
  630 + }*/
  631 +
651 632 }
652 633 }
653 634 }
... ... @@ -658,6 +639,7 @@
658 639  
659 640 }
660 641  
  642 + /*Use for Save and Stage for Deploy */
661 643 $scope.updateFutureFuelPricing = {};
662 644 $scope.updateFutureFuelPricing.futureFuelPricingList = [];
663 645 $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId;
... ... @@ -681,13 +663,23 @@
681 663 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) {
682 664 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = '';
683 665 }else{
  666 + //store timestamp
  667 + var setExpiration = new Date();
  668 + var hours = setExpiration.getHours();
  669 + var min = setExpiration.getMinutes();
  670 + var sec = setExpiration.getSeconds();
  671 + $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration + ' ' + hours + ':' + min + ':' + sec;
684 672 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
685   - // console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
686 673 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime();
687 674 }
688 675 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) {
689 676 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';
690 677 }else{
  678 + var setDeploy = new Date();
  679 + var hours = setDeploy.getHours();
  680 + var min = setDeploy.getMinutes();
  681 + var sec = setDeploy.getSeconds();
  682 + $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate + ' ' + hours + ':' + min + ':' + sec;
691 683 $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
692 684 $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime();
693 685 }
... ... @@ -722,32 +714,32 @@
722 714 $scope.newFuelPricing = result;
723 715 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
724 716 if ($scope.newFuelPricing[i].fuelPricing != null) {
725   - if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
  717 + /*if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
726 718 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
727 719 var month = newTime.getUTCMonth() + 1; //months from 1-12
728 720 var day = newTime.getUTCDate();
729 721 var year = newTime.getUTCFullYear();
730 722 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
731   - }
  723 + }*/
732 724 }
733 725 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
734 726 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
735   - if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
  727 + /*if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
736 728 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
737 729 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
738 730 var nextDay = newTime.getUTCDate();
739 731 var nextYear = newTime.getUTCFullYear();
740 732 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
741   - }
  733 + }*/
742 734 }
743 735 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
744   - if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
  736 + /*if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
745 737 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
746 738 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
747 739 var dday = newTime.getUTCDate();
748 740 var dyear = newTime.getUTCFullYear();
749 741 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
750   - }
  742 + }*/
751 743 }
752 744 }
753 745  
... ... @@ -769,6 +761,7 @@
769 761 }
770 762  
771 763 }
  764 + $state.reload();
772 765 $scope.showLoader = false;
773 766 })
774 767 })
... ... @@ -776,6 +769,7 @@
776 769  
777 770 }
778 771  
  772 + /* Use for Save & Deploy Immediately */
779 773 $scope.updateFutureFuelPricingImmediatelyClick = function(){
780 774 $scope.showLoader = true;
781 775 // console.log('--$scope.newFuelPricing--', $scope.newFuelPricing);
... ... @@ -796,13 +790,22 @@
796 790 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) {
797 791 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = '';
798 792 }else{
  793 + var setExpiration = new Date();
  794 + var hours = setExpiration.getHours();
  795 + var min = setExpiration.getMinutes();
  796 + var sec = setExpiration.getSeconds();
  797 + $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration + ' ' + hours + ':' + min + ':' + sec;
799 798 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
800   - //console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
801 799 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime();
802 800 }
803 801 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) {
804 802 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';
805 803 }else{
  804 + var setDeploy = new Date();
  805 + var hours = setDeploy.getHours();
  806 + var min = setDeploy.getMinutes();
  807 + var sec = setDeploy.getSeconds();
  808 + $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate + ' ' + hours + ':' + min + ':' + sec;
806 809 $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
807 810 $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime();
808 811 }
... ... @@ -837,32 +840,35 @@
837 840 $scope.newFuelPricing = result;
838 841 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
839 842 if ($scope.newFuelPricing[i].fuelPricing != null) {
840   - if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
  843 + console.log("$scope.newFuelPricing[i].fuelPricing.expirationDate",$scope.newFuelPricing[i].fuelPricing.expirationDate)
  844 + /*if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
841 845 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
842 846 var month = newTime.getUTCMonth() + 1; //months from 1-12
843 847 var day = newTime.getUTCDate();
844 848 var year = newTime.getUTCFullYear();
845 849 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
846   - }
  850 + }*/
847 851 }
848 852 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
849 853 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
850   - if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
  854 + console.log(" $scope.newFuelPricing[i].futureFuelPricing.nextExpiration", $scope.newFuelPricing[i].futureFuelPricing.nextExpiration)
  855 + /*if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
851 856 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
852 857 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
853 858 var nextDay = newTime.getUTCDate();
854 859 var nextYear = newTime.getUTCFullYear();
855 860 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
856   - }
  861 + }*/
857 862 }
858 863 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
859   - if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
  864 + /*if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
860 865 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
861 866 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
862 867 var dday = newTime.getUTCDate();
863 868 var dyear = newTime.getUTCFullYear();
864 869 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
865   - }
  870 + }*/
  871 + console.log(" $scope.newFuelPricing[i].futureFuelPricing.deployDate", $scope.newFuelPricing[i].futureFuelPricing.deployDate)
866 872 }
867 873 }
868 874  
... ... @@ -886,6 +892,7 @@
886 892 }
887 893 $scope.showLoader = false;
888 894 })
  895 + $state.reload();
889 896 })
890 897 }
891 898  
... ... @@ -907,10 +914,7 @@
907 914 toastr.success(''+result.success+'', {
908 915 closeButton: true
909 916 })
910   - /*updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
911   - $scope.aTypeJets = result;
912   - $scope.showLoader = false;
913   - })*/
  917 +
914 918 getAtypeFunction();
915 919 })
916 920 }
... ... @@ -933,10 +937,7 @@
933 937 toastr.success(''+result.success+'', {
934 938 closeButton: true
935 939 })
936   - /*updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
937   - $scope.vTypeJets = result;
938   - $scope.showLoader = false;
939   - })*/
  940 +
940 941 getVTypeFunction();
941 942 })
942 943 }
... ...