Blame view
app/views/flightDept/flightDeptController.js
3.17 KB
20857569f
|
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 |
'use strict'; //Load controller angular.module('acuefuel') .controller('flightDeptController', function($scope, $stateParams, FBOClient) { $(document).ready(function(){ $('.tab-pane').slimScroll({ height: '600px' }); }); //$('#tab-2').css('display', 'none'); getAllFbo(); function getAllFbo(){ 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'); }) } |
1c749689b
|
26 27 28 29 30 |
// $scope.searchData = function(){ // console.log($scope.searchQuery) // var userType = $('#tabClient > li.active > a').attr('id'); // searchClient($scope.searchQuery, userType); // } |
20857569f
|
31 |
|
1c749689b
|
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 59 60 61 62 63 64 65 66 |
// function searchClient(searchData, userType){ // console.log(searchData) // console.log(userType) // if(searchData == null || searchData == undefined || searchData == "" && userType == 'fbo'){ // $scope.fboAdmin(); // }else if(searchData == null || searchData == undefined || searchData == "" && userType == 'flightDetp'){ // getAllFbo(); // }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{ // console.log("nai aaya") // $scope.fboDeptList = result; // $scope.clientLength = result.length; // } // }) // } // } |
20857569f
|
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
$scope.fboAdmin = function(){ FBOClient.getALlFBOList().then(function(result) { console.log(result) $scope.fboClient = result; $scope.clientLength = result.length; }) $('#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(){ getAllFbo(); } }); |