Blame view
app/views/fbo-Clients/fboClient.controller.js
3.04 KB
7379f005b
|
1 2 3 |
'use strict'; //Load controller |
9835dbe3e
|
4 |
angular.module('acuefuel') |
7379f005b
|
5 |
|
988ec12e4
|
6 7 8 9 10 |
.controller('fboClientsController', function($scope, $stateParams, FBOClient) { $(document).ready(function(){ $('.tab-pane').slimScroll({ height: '600px' }); |
7379f005b
|
11 |
}); |
988ec12e4
|
12 13 14 15 16 17 18 19 20 |
$('#tab-2').css('display', 'none'); getAllFbo(); function getAllFbo(){ FBOClient.getALlFBOList().then(function(result) { console.log(result) $scope.fboClient = result; $scope.clientLength = result.length; }) } |
d5fb510e5
|
21 |
|
1c749689b
|
22 23 24 25 |
// $scope.searchData = function(){ // var userType = $('#tabClient > li.active > a').attr('id'); // searchClient($scope.searchQuery, userType); // } |
988ec12e4
|
26 |
|
1c749689b
|
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
// function searchClient(searchData, userType){ // console.log(userType) // if(searchData == null || searchData == undefined || searchData == "" && userType == 'fbo'){ // getAllFbo(); // }else if(searchData == null || searchData == undefined || searchData == "" && userType == 'flightDetp'){ // $scope.fboDept(); // }else{ // var data = { // "query" : searchData, // "userType" : userType // } // FBOClient.getSearchClient(data).then(function(result) { // for(var i=0; i<result.length; i++){ // result[i].user = []; // result[i].user.companyName = result[i].companyName; // result[i].user.firstName = result[i].firstName; // result[i].user.lastName = result[i].lastName; // result[i].user.id = result[i].id; // result[i].user.account = []; // result[i].user.account.user = []; // result[i].user.account.user.status = result[i].account.user.status; // } // if(userType == 'fbo'){ // $scope.fboClient = result; // console.log(result) // $scope.clientLength = result.length; // }else{ // $scope.fboDeptList = result; // $scope.clientLength = result.length; // } // }) // } |
db8e1f992
|
59 |
|
1c749689b
|
60 |
// } |
7379f005b
|
61 62 |
$scope.fboAdmin = function(){ |
988ec12e4
|
63 |
getAllFbo(); |
7379f005b
|
64 65 66 67 68 69 70 71 72 |
$('#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(){ |
988ec12e4
|
73 74 75 76 77 |
FBOClient.getAllFlightDeptList().then(function(result) { console.log(result) $scope.fboDeptList = result; $scope.clientLength = result.length; }) |
7379f005b
|
78 79 80 81 82 83 84 85 |
$('#tab-1').css('display', 'none'); $('#tab-2').css('display', 'block'); $('.customTab2').addClass('active'); $('.customTab1').removeClass('active'); $('.slimScrollDiv:first-child').css('display', 'none'); } }); |