Blame view

app/partials/fuelManager/fuelManager.controller.js 23 KB
feacde5ff   Rishav   setup acuefuel in...
1
2
3
4
5
  
  'use strict';
  
   //Load controller
    angular.module('acufuel')
4bda5699a   Swarn Singh   fuel manager desi...
6
7
  	//.controller('fuelManagerController', ['$scope', 'fuelManagerService',function($scope, fuelManagerService) {
    .controller('fuelManagerController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'fuelManagerService', fuelManagerController]);
feacde5ff   Rishav   setup acuefuel in...
8

4bda5699a   Swarn Singh   fuel manager desi...
9
    function fuelManagerController($scope, $rootScope, $uibModal, $filter, $http, fuelManagerService) {
8f7dbe97c   Swarn Singh   fuel order comple...
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        var todayDate = new Date();
        var ddn = todayDate.getDate();
        var mmn = todayDate.getMonth()+1; //January is 0!
        var yyyyn = todayDate.getFullYear();
  
        if(ddn<10) {
            ddn ='0'+ddn
        } 
  
        if(mmn<10) {
            mmn ='0'+mmn
        }
  
        $scope.todayDateNew = mmn+'/'+ddn+'/'+yyyyn;
        $scope.currentUserName = JSON.parse(window.localStorage.getItem("currentUserName"));
4bda5699a   Swarn Singh   fuel manager desi...
25
        $scope.currentUserData = JSON.parse(localStorage.getItem('userProfileId'));
ec746c7d9   Swarn Singh   loader added
26
        $scope.showLoader = true;
4bda5699a   Swarn Singh   fuel manager desi...
27

e652e571f   Kuldeep Arora   ramp fee automate...
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        function getFulllistFunction(){
          fuelManagerService.getFullList().then(function(result) {
            $scope.fullJetList = result;
           // console.log('$scope.fullJetList', $scope.fullJetList);
            for (var i = 0; i<$scope.fullJetList.length; i++) {
              for (var j = 0; j<$scope.fullJetList[i].aircraftsSize.length; j++) {
                if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null) {
                  result[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees=parseFloat(result[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees).toFixed(2);
                 // console.log("kd",result[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees)
  
                  if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != null && $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != '') {
                    var newTime = new Date($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate);
                    var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
                    var dday = newTime.getUTCDate();
                    var dyear = newTime.getUTCFullYear();
                    $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = dmonth+'/'+dday+'/'+dyear;
                   // console.log('$scope.fullJetList.aircraftsSize.rampFeesAndAvoidance.expirationDate', $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate); 
                  }
a9e3a7365   Swarn Singh   fix issues on vie...
46
47
48
                }
              }
            }
e652e571f   Kuldeep Arora   ramp fee automate...
49
50
51
52
53
            $scope.showLoader = false;
          })
          
      }
        getFulllistFunction();
4bda5699a   Swarn Singh   fuel manager desi...
54
55
56
57
  
        $scope.avoidanceList = {};
       
        $scope.updateList = function(fullJetList){
ec746c7d9   Swarn Singh   loader added
58
          $scope.showLoader = true;
4bda5699a   Swarn Singh   fuel manager desi...
59
60
          $scope.addData = [];
          $scope.newJetList = fullJetList;
a9e3a7365   Swarn Singh   fix issues on vie...
61
          if ($scope.currentUserData != undefined || $scope.currentUserData != null) {
4bda5699a   Swarn Singh   fuel manager desi...
62
63
64
            for(var i=0; i<$scope.newJetList.length;i++){
                for(var j = 0; j < $scope.newJetList[i].aircraftsSize.length; j++){
                  if($scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null){
a9e3a7365   Swarn Singh   fix issues on vie...
65
66
67
68
                    if ($scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != null) {
                      $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = new Date($scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate);
                      $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate.getTime();
                    }
4bda5699a   Swarn Singh   fuel manager desi...
69
70
71
72
73
74
75
76
                    $scope.addData.push({
                        //'aircraftType': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.aircraftType,
                        'id': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.id,
                        'aircraftSizeId': $scope.newJetList[i].aircraftsSize[j].id,
                        'rampFees': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees,
                        'avoidance' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.avoidance,
                        'applicable' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.applicable,
                        'expirationDate' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate,
8f7dbe97c   Swarn Singh   fuel order comple...
77
78
                        'notes' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.notes,
                        'reportedBy': $scope.currentUserName
4bda5699a   Swarn Singh   fuel manager desi...
79
                      });
4bda5699a   Swarn Singh   fuel manager desi...
80
81
82
83
84
                  }
                }
            }
            $scope.avoidanceList.rampFeesAndAvoidanceList = $scope.addData;
            $scope.avoidanceList.fboUserId = $scope.currentUserData;
4bda5699a   Swarn Singh   fuel manager desi...
85

68c767613   Swarn Singh   fixed ramp fee an...
86
            fuelManagerService.updateFullList($scope.avoidanceList).then(function(result) {
e652e571f   Kuldeep Arora   ramp fee automate...
87
88
             // console.log("list",$scope.avoidanceList)
             // console.log("result",result)
fb26e70bf   Swarn Singh   fuel manager done
89
90
91
              toastr.success(''+result.success+'', {
                closeButton: true
              })
e652e571f   Kuldeep Arora   ramp fee automate...
92
              /*fuelManagerService.getFullList().then(function(result) {
68c767613   Swarn Singh   fixed ramp fee an...
93
              $scope.fullJetList = result;
302b19c4e   Kuldeep Arora   updates
94
             // console.log('$scope.fullJetList', $scope.fullJetList);
68c767613   Swarn Singh   fixed ramp fee an...
95
96
97
98
99
100
101
102
103
              for (var i = 0; i<$scope.fullJetList.length; i++) {
                for (var j = 0; j<$scope.fullJetList[i].aircraftsSize.length; j++) {
                  if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null) {
                    if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != null && $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != '') {
                      var newTime = new Date($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate);
                      var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
                      var dday = newTime.getUTCDate();
                      var dyear = newTime.getUTCFullYear();
                      $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = dmonth+'/'+dday+'/'+dyear;
302b19c4e   Kuldeep Arora   updates
104
                     // console.log('$scope.fullJetList.aircraftsSize.rampFeesAndAvoidance.expirationDate', $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate); 
68c767613   Swarn Singh   fixed ramp fee an...
105
106
107
108
109
                    }
                  }
                }
              }
              $scope.showLoader = false;
e652e571f   Kuldeep Arora   ramp fee automate...
110
111
            })*/
              getFulllistFunction();
68c767613   Swarn Singh   fixed ramp fee an...
112
            })
4bda5699a   Swarn Singh   fuel manager desi...
113
114
115
116
  
          }
              
        }
9fabc0d40   Swarn Singh   fuel manager and ...
117

fb26e70bf   Swarn Singh   fuel manager done
118
        $scope.dropOptions = {};
9fabc0d40   Swarn Singh   fuel manager and ...
119
120
121
  
        fuelManagerService.getOptions().then(function(result) {
            $scope.dropOptions = result;
302b19c4e   Kuldeep Arora   updates
122
           // console.log('$scope.dropOptions', $scope.dropOptions);
9fabc0d40   Swarn Singh   fuel manager and ...
123
        })
fb26e70bf   Swarn Singh   fuel manager done
124
125
126
        fuelManagerService.getAircrafts().then(function(result) {
            $scope.aircrafts = result;
        })
68c767613   Swarn Singh   fixed ramp fee an...
127
128
129
130
        $scope.customRampData = {};
        $scope.customRampDataCraft = {};
        $scope.customRampDataCraft.aircraftType = '';
        $scope.customRampDataCraft.aircraftSizeId = '';
fb26e70bf   Swarn Singh   fuel manager done
131
        $scope.openRampFeeModal = false;
68c767613   Swarn Singh   fixed ramp fee an...
132
133
134
135
        $scope.showWeightForm = false;
        $scope.showMakeModelForm = false;
        $scope.showWingspanForm = false;
        $scope.showTailForm = false;
fb26e70bf   Swarn Singh   fuel manager done
136
        $scope.customRampData = {};
68c767613   Swarn Singh   fixed ramp fee an...
137
138
139
        $scope.customMakeData = {};
        $scope.customWingspanData = {};
        $scope.customTailData = {};
9fabc0d40   Swarn Singh   fuel manager and ...
140

fb26e70bf   Swarn Singh   fuel manager done
141
        $scope.openRampModal = function(){
68c767613   Swarn Singh   fixed ramp fee an...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
          $scope.showLoader = true;
          $scope.openRampFeeModal = true;
          if ($scope.customRampDataCraft.aircraftType != null) {
            for (var i = 0; i < $scope.dropOptions.length; i++) {
              if ($scope.customRampDataCraft.aircraftType === $scope.dropOptions[i].size) {
                $scope.customRampDataCraft.aircraftSizeId = $scope.dropOptions[i].id;
              }
            }
            $scope.OldRampData = {};
            fuelManagerService.getRampFeeDetail($scope.customRampDataCraft.aircraftSizeId).then(function(result) {
              $scope.OldRampData = result;
              if ($scope.customRampDataCraft.aircraftType === 'WEIGHT') {
                $scope.showWeightForm = true;
                $scope.showMakeModelForm = false;
                $scope.showWingspanForm = false;
                $scope.showTailForm = false;
                $scope.customRampData = $scope.OldRampData;
              }else if ($scope.customRampDataCraft.aircraftType === 'MAKE_AND_MODEL') {
                $scope.showWeightForm = false;
                $scope.showMakeModelForm = true;
                $scope.showWingspanForm = false;
                $scope.showTailForm = false;
                $scope.customMakeData = $scope.OldRampData;
302b19c4e   Kuldeep Arora   updates
165
               // console.log('$scope.customMakeData', $scope.customMakeData);
68c767613   Swarn Singh   fixed ramp fee an...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
              }else if ($scope.customRampDataCraft.aircraftType === 'WINGSPAN') {
                $scope.showWeightForm = false;
                $scope.showMakeModelForm = false;
                $scope.showWingspanForm = true;
                $scope.showTailForm = false;
                $scope.customWingspanData = $scope.OldRampData;
              }else if ($scope.customRampDataCraft.aircraftType === 'TAIL') {
                $scope.showWeightForm = false;
                $scope.showMakeModelForm = false;
                $scope.showWingspanForm = false;
                $scope.showTailForm = true;
                $scope.customTailData = $scope.OldRampData;
              }else{
                $scope.openRampFeeModal = false;
                $scope.showWeightForm = false;
                $scope.showMakeModelForm = false;
                $scope.showWingspanForm = false;
                $scope.showTailForm = false;
              }
              $scope.showLoader = false;
            })
fb26e70bf   Swarn Singh   fuel manager done
187
188
          }else{
            $scope.openRampFeeModal = false;
fb26e70bf   Swarn Singh   fuel manager done
189
          }
fb26e70bf   Swarn Singh   fuel manager done
190
        }
e652e571f   Kuldeep Arora   ramp fee automate...
191
192
193
194
195
196
        /*validate number input type to 2 digit auto complete zero's*/
      
       $scope.force2decimals= function(data) {
          console.log("check")
          event.target.value = parseFloat(event.target.value).toFixed(2);
        }
68c767613   Swarn Singh   fixed ramp fee an...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
        $scope.addCustomRampNew = function(data){
          $scope.showLoader = true;
          $scope.newCustomRampData = data;
          $scope.newRampData = [];
          if ($scope.newCustomRampData != null) {
            if ($scope.newCustomRampData.id != null) {
              $scope.newRampData.push({'id': $scope.newCustomRampData.id});
            }
            $scope.newRampData.push({
              'aircraftSizeId': $scope.customRampDataCraft.aircraftSizeId,
              'rampFees': $scope.newCustomRampData.rampFees,
              'avoidance': $scope.newCustomRampData.avoidance,
              'applicable': $scope.newCustomRampData.applicable,
              'expirationDate': $scope.newCustomRampData.expirationDate,
              'notes': $scope.newCustomRampData.notes,
              'aircraftMake': $scope.newCustomRampData.aircraftMake,
              'wingspanMin': $scope.newCustomRampData.wingspanMin,
              'wingspanMax': $scope.newCustomRampData.wingspanMax,
              'weightRangeMin': $scope.newCustomRampData.weightRangeMin,
              'weightRangeMax': $scope.newCustomRampData.weightRangeMax,
              'tailNumber': $scope.newCustomRampData.tailNumber,
            });
          }
9fabc0d40   Swarn Singh   fuel manager and ...
220
          
68c767613   Swarn Singh   fixed ramp fee an...
221
222
223
224
          $scope.avoidanceList.rampFeesAndAvoidanceList = $scope.newRampData;
          $scope.avoidanceList.fboUserId = $scope.currentUserData;
          //console.log('$scope.newRampData', $scope.avoidanceList);
          fuelManagerService.updateFullList($scope.avoidanceList).then(function(result) {
fb26e70bf   Swarn Singh   fuel manager done
225
226
            toastr.success(''+result.success+'', {
              closeButton: true
68c767613   Swarn Singh   fixed ramp fee an...
227
            })
fb26e70bf   Swarn Singh   fuel manager done
228
            $scope.openRampFeeModal = false;
e652e571f   Kuldeep Arora   ramp fee automate...
229
            /*fuelManagerService.getFullList().then(function(result) {
68c767613   Swarn Singh   fixed ramp fee an...
230
            $scope.fullJetList = result;
302b19c4e   Kuldeep Arora   updates
231
           // console.log('$scope.fullJetList', $scope.fullJetList);
68c767613   Swarn Singh   fixed ramp fee an...
232
233
234
235
236
237
238
239
240
            for (var i = 0; i<$scope.fullJetList.length; i++) {
              for (var j = 0; j<$scope.fullJetList[i].aircraftsSize.length; j++) {
                if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null) {
                  if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != null && $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != '') {
                    var newTime = new Date($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate);
                    var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
                    var dday = newTime.getUTCDate();
                    var dyear = newTime.getUTCFullYear();
                    $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = dmonth+'/'+dday+'/'+dyear;
302b19c4e   Kuldeep Arora   updates
241
                   // console.log('$scope.fullJetList.aircraftsSize.rampFeesAndAvoidance.expirationDate', $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate); 
68c767613   Swarn Singh   fixed ramp fee an...
242
243
244
245
246
                  }
                }
              }
            }
            $scope.showLoader = false;
e652e571f   Kuldeep Arora   ramp fee automate...
247
248
          })*/
          getFulllistFunction();
68c767613   Swarn Singh   fixed ramp fee an...
249
250
251
252
253
254
255
256
          })
        }
  
        $scope.deleteTemplateId = '';
  
        $scope.deleteCustomJet = function(id){
          $('#confirm1').css('display', 'block');
          $scope.deleteTemplateId = id;
302b19c4e   Kuldeep Arora   updates
257
         // console.log('$scope.deleteTemplateId', id);
68c767613   Swarn Singh   fixed ramp fee an...
258
259
260
261
262
263
        }
  
        $scope.saveAndCloseConfirm = function(){
          $scope.showLoader = true;
          $('#confirm1').css('display', 'none');
          fuelManagerService.deleteCustomRamp($scope.deleteTemplateId).then(function(result) {
e652e571f   Kuldeep Arora   ramp fee automate...
264
            /*fuelManagerService.getFullList().then(function(result) {
fb26e70bf   Swarn Singh   fuel manager done
265
              $scope.fullJetList = result;
302b19c4e   Kuldeep Arora   updates
266
             // console.log('$scope.fullJetList', $scope.fullJetList);
68c767613   Swarn Singh   fixed ramp fee an...
267
268
269
270
271
272
273
274
275
              for (var i = 0; i<$scope.fullJetList.length; i++) {
                for (var j = 0; j<$scope.fullJetList[i].aircraftsSize.length; j++) {
                  if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null) {
                    if ($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != null && $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate != '') {
                      var newTime = new Date($scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate);
                      var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
                      var dday = newTime.getUTCDate();
                      var dyear = newTime.getUTCFullYear();
                      $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate = dmonth+'/'+dday+'/'+dyear;
302b19c4e   Kuldeep Arora   updates
276
                      //console.log('$scope.fullJetList.aircraftsSize.rampFeesAndAvoidance.expirationDate', $scope.fullJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate); 
68c767613   Swarn Singh   fixed ramp fee an...
277
278
279
280
281
                    }
                  }
                }
              }
              $scope.showLoader = false;
e652e571f   Kuldeep Arora   ramp fee automate...
282
283
            })*/
            getFulllistFunction();
fb26e70bf   Swarn Singh   fuel manager done
284
285
          })
        }
68c767613   Swarn Singh   fixed ramp fee an...
286
287
288
289
        $scope.cancelAndCloseConfirm = function(){
          $('#confirm1').css('display', 'none');
          $scope.deleteTemplateId = '';
        }
fb26e70bf   Swarn Singh   fuel manager done
290
291
292
293
294
295
296
        $scope.closeRampFeeModel = function(){
          $scope.openRampFeeModal = false;
          $scope.showWeight = false;
          $scope.showWingspan = false;
          $scope.showTail = false;
          $scope.showAircraft = false;
          $scope.customRampData.rampFeesAndAvoidanceList = {};
68c767613   Swarn Singh   fixed ramp fee an...
297
          $scope.customRampDataCraft.aircraftType = null;
9fabc0d40   Swarn Singh   fuel manager and ...
298
        }
4bda5699a   Swarn Singh   fuel manager desi...
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
        $scope.parentOpen = function(index){
          $('#parentOpen'+index).css('display', 'none');
          $('#parentClose'+index).css('display', 'initial');
          $('#parentTogglebody'+index).slideDown();
        }
        $scope.parentClose = function(index){
          $('#parentOpen'+index).css('display', 'initial');
          $('#parentClose'+index).css('display', 'none');
          $('#parentTogglebody'+index).slideUp();
        }
  
        $scope.toggleChild = function(id){
          if ($('.'+id).hasClass('fa-plus-circle')) {
            $('.'+id).removeClass('fa-plus-circle');
            $('.'+id).addClass('fa-minus-circle');
          }else{
            $('.'+id).removeClass('fa-minus-circle');
            $('.'+id).addClass('fa-plus-circle');
          }
          $('#'+id).slideToggle();
        }
feacde5ff   Rishav   setup acuefuel in...
320

32ea0c476   Swarn Singh   working on fuel m...
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
        $scope.dates = [{date:'01-05-2001'}, {date:'05-05-2014'}, {date:'10-11-2008'}]
  
        $scope.open = function($event, dt) {
          $event.preventDefault();
          $event.stopPropagation();
  
          dt.opened = true;
        };
  
        $scope.dateOptions = {
          formatYear: 'yy',
          startingDay: 1
        };
  
  
        $scope.format = 'dd-MMMM-yyyy'
        
4b64fa3a3   Swarn Singh   acordian tabs ui ...
338
        $(document).ready(function(){
9fabc0d40   Swarn Singh   fuel manager and ...
339
340
341
342
343
  
          setInterval(function(){ 
            var newHeight = $('.feeManagerLeft').height();
            $('.feeManagerRight').css('height', newHeight);
          }, 3);
4b64fa3a3   Swarn Singh   acordian tabs ui ...
344
          $('#customTabToggle1').click(function(){
302b19c4e   Kuldeep Arora   updates
345
            //console.log('tab 1');
4b64fa3a3   Swarn Singh   acordian tabs ui ...
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
            $('#customTabsBody1').slideDown();
            $('#customTabsBody2').slideUp();
            $('#customTabsBody3').slideUp();
            $('#customTabsBody4').slideUp();
            $('#customTabs1').addClass('customActive');
            $('#customTabs2').removeClass('customActive');
            $('#customTabs3').removeClass('customActive');
            $('#customTabs4').removeClass('customActive');
            $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true);
            $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false);
  
            $('#customTabs1 > .pull-right > .btn-default').css('display', 'none');
            $('#customTabs1 > .pull-right > .btn-success').css('display', 'inline-block');
            $('#customTabs1 > .pull-right > .btn-danger').css('display', 'inline-block');
  
            $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs2 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs3 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs4 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none');
  
          })
          $('#customTabToggle2').click(function(){
302b19c4e   Kuldeep Arora   updates
375
           // console.log('tab 2');
4b64fa3a3   Swarn Singh   acordian tabs ui ...
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
            $('#customTabsBody1').slideUp();
            $('#customTabsBody2').slideDown();
            $('#customTabsBody3').slideUp();
            $('#customTabsBody4').slideUp();
            $('#customTabs1').removeClass('customActive');
            $('#customTabs2').addClass('customActive');
            $('#customTabs3').removeClass('customActive');
            $('#customTabs4').removeClass('customActive');
            $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true);
            $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false);
  
            $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs1 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs2 > .pull-right > .btn-default').css('display', 'none');
            $('#customTabs2 > .pull-right > .btn-success').css('display', 'inline-block');
            $('#customTabs2 > .pull-right > .btn-danger').css('display', 'inline-block');
  
            $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs3 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs4 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none');
  
          })
          $('#customTabToggle3').click(function(){
302b19c4e   Kuldeep Arora   updates
405
           // console.log('tab 3');
4b64fa3a3   Swarn Singh   acordian tabs ui ...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
            $('#customTabsBody1').slideUp();
            $('#customTabsBody2').slideUp();
            $('#customTabsBody3').slideDown();
            $('#customTabsBody4').slideUp();
            $('#customTabs1').removeClass('customActive');
            $('#customTabs2').removeClass('customActive');
            $('#customTabs3').addClass('customActive');
            $('#customTabs4').removeClass('customActive');
            $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true);
            $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false);
  
            $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs1 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs2 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs3 > .pull-right > .btn-default').css('display', 'none');
            $('#customTabs3 > .pull-right > .btn-success').css('display', 'inline-block');
            $('#customTabs3 > .pull-right > .btn-danger').css('display', 'inline-block');
  
            $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs4 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none');
  
          })
          $('#customTabToggle4').click(function(){
302b19c4e   Kuldeep Arora   updates
435
          //  console.log('tab 4');
4b64fa3a3   Swarn Singh   acordian tabs ui ...
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
            $('#customTabsBody1').slideUp();
            $('#customTabsBody2').slideUp();
            $('#customTabsBody3').slideUp();
            $('#customTabsBody4').slideDown();
            $('#customTabs1').removeClass('customActive');
            $('#customTabs2').removeClass('customActive');
            $('#customTabs3').removeClass('customActive');
            $('#customTabs4').addClass('customActive');
            $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true);
            $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false);
  
            $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs1 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs2 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block');
            $('#customTabs3 > .pull-right > .btn-success').css('display', 'none');
            $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none');
  
            $('#customTabs4 > .pull-right > .btn-default').css('display', 'none');
            $('#customTabs4 > .pull-right > .btn-success').css('display', 'inline-block');
            $('#customTabs4 > .pull-right > .btn-danger').css('display', 'inline-block');
  
          })
  
        })
4bda5699a   Swarn Singh   fuel manager desi...
466
    }