fboClient.controller.js
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict';
//Load controller
angular.module('acuefuel')
.controller('fboClientsController', function($scope, $stateParams, FBOClient) {
$(document).ready(function(){
$('.tab-pane').slimScroll({
height: '600px'
});
});
$('#tab-2').css('display', 'none');
getAllFbo();
function getAllFbo(){
FBOClient.getALlFBOList().then(function(result) {
console.log(result)
$scope.fboClient = result;
$scope.clientLength = result.length;
})
}
$scope.fboAdmin = function(){
getAllFbo();
$('#tab-1').css('display', 'block');
$('#tab-2').css('display', 'none');
$('.customTab1').addClass('active');
$('.customTab2').removeClass('active');
$('.slimScrollDiv:first-child').css('display', 'block');
}
$scope.fboDept = function(){
FBOClient.getAllFlightDeptList().then(function(result) {
console.log(result)
$scope.fboDeptList = result;
$scope.clientLength = result.length;
})
$('#tab-1').css('display', 'none');
$('#tab-2').css('display', 'block');
$('.customTab2').addClass('active');
$('.customTab1').removeClass('active');
$('.slimScrollDiv:first-child').css('display', 'none');
}
});