Blame view
app/views/fbo-flight/flightDept.controller.js
1.49 KB
e4e496d13
|
1 2 3 |
'use strict'; //Load controller |
9835dbe3e
|
4 |
angular.module('acuefuel') |
e4e496d13
|
5 |
|
d5fb510e5
|
6 |
.controller('FlightDeptController', function ($scope, $uibModal, FBOFlight) { |
0a4eb77cc
|
7 |
$scope.data = {}; |
5c6477d3d
|
8 9 10 11 12 13 14 15 16 17 |
$scope.user = {}; $scope.userData = function(){ if($scope.status == true){ $scope.user.status = 'active'; }else{ $scope.user.status = 'inactive'; } $scope.user.username = $scope.user.email; $scope.user.userType = 'flightDetp'; console.log($scope.user) |
d5fb510e5
|
18 |
var formdata = "companyName=" + $scope.user.companyName + "&email=" + $scope.user.email + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&password=" + $scope.user.password + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&clientNote=" + $scope.user.clientNote; |
7379f005b
|
19 20 21 |
FBOFlight.registerUser(formdata).then(function(result) { $scope.registerId = result; $scope.data.accountId = $scope.registerId; |
5c6477d3d
|
22 23 24 |
}) } |
0a4eb77cc
|
25 26 |
$scope.data.cardType = 'creditCard'; |
7379f005b
|
27 28 29 30 31 32 33 34 35 36 |
var cardData = {} cardData.paymentMethodList = []; $scope.addCard = function(){ cardData.paymentMethodList.push($scope.data); console.log("cardData", cardData); FBOFlight.addCardInformation(cardData).then(function(result) { console.log(result) }) } |
d5fb510e5
|
37 |
|
5c6477d3d
|
38 |
}); |