Commit 226dc1e5717ce1e6005617ee0dd116dff6abea0f

Authored by Rishav
1 parent db8e1f992c
Exists in master

code changes according to requirement

app/views/fbo-admin/dashboard.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acuefuel') 4 angular.module('acuefuel')
5 5
6 .controller('DashboardController', function($scope, $state, FBOAdmin) { 6 .controller('DashboardController', function($scope, $state, FBOAdmin) {
7 $(document).ready(function(){ 7 $(document).ready(function(){
8 $('.i-checks').iCheck({ 8 $('.i-checks').iCheck({
9 checkboxClass: 'icheckbox_square-green', 9 checkboxClass: 'icheckbox_square-green',
10 radioClass: 'iradio_square-green', 10 radioClass: 'iradio_square-green',
11 }); 11 });
12 }); 12 });
13 $scope.showCompany = true;
14 $scope.userName = 'Dylan Goodwin'; 13 $scope.userName = 'Dylan Goodwin';
15 $scope.essAccountId = true; 14 $scope.essAccountId = true;
16 $("#esAccId").css({ opacity: 0.5 }); 15 $("#esAccId").css({ opacity: 0.5 });
17 $scope.user = {}; 16 $scope.user = {};
18 $scope.feature = {}; 17 $scope.feature = {};
19 $scope.feature.level = 'silver'; 18 $scope.feature.level = 'silver';
20 $scope.feature.essintaPosSystem = false; 19 $scope.feature.essintaPosSystem = false;
21 $scope.feature.acuQuote = false; 20 $scope.feature.acuQuote = false;
22 $scope.feature.acuTrack = false; 21 $scope.feature.acuTrack = false;
23 $scope.feature.fuelProgram = false; 22 $scope.feature.fuelProgram = false;
24 $scope.feature.amstatIntegration = false; 23 $scope.feature.amstatIntegration = false;
25 $scope.feature.posAccountingIntegration = false; 24 $scope.feature.posAccountingIntegration = false;
26 $scope.feature.posVeederRootIntegration = false; 25 $scope.feature.posVeederRootIntegration = false;
27 $scope.userData = function(){ 26 $scope.userData = function(){
28 if($scope.user.email == undefined || $scope.user.email == null){ 27 if($scope.user.email == undefined || $scope.user.email == null){
29 toastr.error('Please enter your email first', { 28 toastr.error('Please enter your email first', {
30 closeButton: true 29 closeButton: true
31 }) 30 })
32 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){ 31 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){
33 toastr.error('Please enter your First Name', { 32 toastr.error('Please enter your First Name', {
34 closeButton: true 33 closeButton: true
35 }) 34 })
36 }else{ 35 }else{
37 if($scope.status == true){ 36 if($scope.status == true){
38 $scope.user.status = 'active'; 37 $scope.user.status = 'active';
39 }else{ 38 }else{
40 $scope.user.status = 'inactive'; 39 $scope.user.status = 'inactive';
41 } 40 }
42 $scope.user.username = $scope.user.email; 41 $scope.user.username = $scope.user.email;
43 $scope.user.userType = 'fbo'; 42 $scope.user.userType = 'fbo';
44 console.log($scope.user) 43 console.log($scope.user)
45 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; 44 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;
46 FBOAdmin.registerUser(formdata).then(function(result) { 45 FBOAdmin.registerUser(formdata).then(function(result) {
47 toastr.success('Created Successfully', { 46 toastr.success('Created Successfully', {
48 closeButton: true 47 closeButton: true
49 }) 48 })
50 $scope.feature.accountId = result; 49 $scope.feature.accountId = result;
51 var featureControlData = "accountId=" + $scope.feature.accountId + "&level=" + $scope.feature.level + "&essintaPosSystem=" + $scope.feature.essintaPosSystem 50 var featureControlData = "accountId=" + $scope.feature.accountId + "&level=" + $scope.feature.level + "&essintaPosSystem=" + $scope.feature.essintaPosSystem
52 + "&acuQuote=" + $scope.feature.acuQuote + "&acuTrack=" + $scope.feature.acuTrack + "&fuelProgram=" + $scope.feature.fuelProgram + "&amstatIntegration=" + $scope.feature.amstatIntegration+ "&posAccountingIntegration=" 51 + "&acuQuote=" + $scope.feature.acuQuote + "&acuTrack=" + $scope.feature.acuTrack + "&fuelProgram=" + $scope.feature.fuelProgram + "&amstatIntegration=" + $scope.feature.amstatIntegration+ "&posAccountingIntegration="
53 + $scope.feature.posAccountingIntegration + "&posVeederRootIntegration=" + $scope.feature.posVeederRootIntegration 52 + $scope.feature.posAccountingIntegration + "&posVeederRootIntegration=" + $scope.feature.posVeederRootIntegration
54 + "&essintaAccountUid=" + $scope.feature.essintaAccountUid + "&additionalLicences=" + $scope.feature.additionalLicences; 53 + "&essintaAccountUid=" + $scope.feature.essintaAccountUid + "&additionalLicences=" + $scope.feature.additionalLicences;
55 54
56 FBOAdmin.featureControl(featureControlData).then(function(response) { 55 FBOAdmin.featureControl(featureControlData).then(function(response) {
57 console.log(response) 56 console.log(response)
58 57
59 }) 58 })
60 $state.go('index.fboAdmin'); 59 $state.go('index.fboAdmin');
61 }, function (err) { 60 }, function (err) {
62 toastr.error('Error in registering', { 61 toastr.error('Error in registering', {
63 closeButton: true 62 closeButton: true
64 }) 63 })
65 }); 64 });
66 } 65 }
67 66
68 } 67 }
69 68
70 $scope.enableEssId = function(){ 69 $scope.enableEssId = function(){
71 if($scope.feature.essintaPosSystem == true){ 70 if($scope.feature.essintaPosSystem == true){
72 $scope.essAccountId = false; 71 $scope.essAccountId = false;
73 $("#esAccId").css({ opacity: 1 }); 72 $("#esAccId").css({ opacity: 1 });
74 }else{ 73 }else{
75 $scope.essAccountId = true; 74 $scope.essAccountId = true;
76 delete $scope.feature.essintaAccountUid; 75 delete $scope.feature.essintaAccountUid;
77 $("#esAccId").css({ opacity: 0.5 }); 76 $("#esAccId").css({ opacity: 0.5 });
78 } 77 }
79 } 78 }
80 79
81 $scope.editName = function(){
82 $scope.showCompany = false;
83
84 }
85
86 }); 80 });
app/views/fbo-admin/dashboard.html
1 </div> 1 </div>
2 <div class="row wrapper border-bottom white-bg page-heading"> 2 <div class="row wrapper border-bottom white-bg page-heading">
3 <div class="col-lg-8"> 3 <div class="col-lg-8">
4 <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">Tellus Institute</h2> 4 <!-- <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">Tellus Institute</h2> -->
5 <div style="margin-top: 20px;" ng-hide="showCompany"><input type="text" style="width:50%;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div> 5 <div style="margin-top: 20px;"><input type="text" style="width:50%;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div>
6 </div> 6 </div>
7 <div class="col-lg-4" style="margin-top: 20px; text-align: right;"> 7 <div class="col-lg-4" style="margin-top: 20px; text-align: right;">
8 <button type="button" class="btn btn-default btn-sm" ui-sref="index.fboAdmin">Cancel</button> 8 <button type="button" class="btn btn-default btn-sm" ui-sref="index.fboAdmin">Cancel</button>
9 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button> 9 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button>
10 </div> 10 </div>
11 </div> 11 </div>
12 </div> 12 </div>
13 <div class="wrapper wrapper-content animated fadeInRight"> 13 <div class="wrapper wrapper-content animated fadeInRight">
14 <div class="row"> 14 <div class="row">
15 <div class="col-lg-7"> 15 <div class="col-lg-7">
16 <div class="ibox float-e-margins"> 16 <div class="ibox float-e-margins">
17 <div class="ibox-title"> 17 <div class="ibox-title">
18 <div class="pull-left"> 18 <div class="pull-left">
19 <h5>Contact Information</h5> 19 <h5>Contact Information</h5>
20 </div> 20 </div>
21 <div class="pull-right my-toggle-switch"> 21 <div class="pull-right my-toggle-switch">
22 <div class="switch"> 22 <div class="switch">
23 <div class="onoffswitch"> 23 <div class="onoffswitch">
24 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1"> 24 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1">
25 <label class="onoffswitch-label" for="example1"> 25 <label class="onoffswitch-label" for="example1">
26 <span class="onoffswitch-inner"></span> 26 <span class="onoffswitch-inner"></span>
27 <span class="onoffswitch-switch"></span> 27 <span class="onoffswitch-switch"></span>
28 </label> 28 </label>
29 </div> 29 </div>
30 </div> 30 </div>
31 </div> 31 </div>
32 <div class="clearfix"></div> 32 <div class="clearfix"></div>
33 </div> 33 </div>
34 <div class="ibox-content"> 34 <div class="ibox-content">
35 <div class="row"> 35 <div class="row">
36 <form role="form"> 36 <form role="form">
37 <div class="col-sm-6 b-r"> 37 <div class="col-sm-6 b-r">
38 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> --> 38 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> -->
39 <div class="form-group"><label>Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> 39 <div class="form-group"><label>Email Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div>
40 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div> 40 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div>
41 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div> 41 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div>
42 <!-- <div> 42 <!-- <div>
43 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button> 43 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button>
44 <label> <input type="checkbox" class="i-checks"> Remember me </label> 44 <label> <input type="checkbox" class="i-checks"> Remember me </label>
45 </div> --> 45 </div> -->
46 46
47 </div> 47 </div>
48 <div class="col-sm-6"> 48 <div class="col-sm-6">
49 <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> 49 <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div>
50 <div class="form-group"><label>Phone</label> <input type="number" ng-model="user.phone" placeholder="Phone" class="form-control"></div> 50 <div class="form-group"><label>Phone</label> <input type="number" ng-model="user.phone" placeholder="Phone" class="form-control"></div>
51 <div class="form-group"><label>Mobile</label> <input type="number" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div> 51 <div class="form-group"><label>Mobile</label> <input type="number" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div>
52 </div> 52 </div>
53 </form> 53 </form>
54 </div> 54 </div>
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 <div class="col-lg-5"> 58 <div class="col-lg-5">
59 <div class="ibox float-e-margins"> 59 <div class="ibox float-e-margins">
60 <div class="ibox-title"> 60 <div class="ibox-title">
61 <h5>Client Notes</h5> 61 <h5>Client Notes</h5>
62 62
63 </div> 63 </div>
64 <div class="ibox-content"> 64 <div class="ibox-content">
65 <div class="row"> 65 <div class="row">
66 <form role="form"> 66 <form role="form">
67 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea> 67 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea>
68 </form> 68 </form>
69 </div> 69 </div>
70 </div> 70 </div>
71 71
72 </div> 72 </div>
73 </div> 73 </div>
74 </div> 74 </div>
75 </div> 75 </div>
76 76
77 <div class="wrapper wrapper-content animated fadeInRight"> 77 <div class="wrapper wrapper-content animated fadeInRight">
78 <div class="row"> 78 <div class="row">
79 <div class="col-lg-12"> 79 <div class="col-lg-12">
80 <div class="ibox float-e-margins"> 80 <div class="ibox float-e-margins">
81 <div class="ibox-title" style="padding: 5px 15px 5px 15px;"> 81 <div class="ibox-title" style="padding: 5px 15px 5px 15px;">
82 <div class="col-lg-8"> 82 <div class="col-lg-8">
83 <h5 style="line-height: 34px;margin-bottom: 0;">Feature Account Control</h5> 83 <h5 style="line-height: 34px;margin-bottom: 0;">Feature Account Control</h5>
84 </div> 84 </div>
85 <div class="col-lg-4"> 85 <div class="col-lg-4">
86 <div class="form-group"> 86 <div class="form-group">
87 <label class="col-sm-2 control-label" style="line-height: 34px;margin-bottom: 0;">Level</label> 87 <label class="col-sm-2 control-label" style="line-height: 34px;margin-bottom: 0;">Level</label>
88 <div class="col-sm-10"> 88 <div class="col-sm-10">
89 <select class="form-control m-b" name="account" ng-model="feature.level" style="margin-bottom: 0;"> 89 <select class="form-control m-b" name="account" ng-model="feature.level" style="margin-bottom: 0;">
90 <option value="silver" selected>Silver</option> 90 <option value="silver" selected>Silver</option>
91 <option value="gold">Gold</option> 91 <option value="gold">Gold</option>
92 </select> 92 </select>
93 </div> 93 </div>
94 </div> 94 </div>
95 </div> 95 </div>
96 <div class="clearfix"></div> 96 <div class="clearfix"></div>
97 </div> 97 </div>
98 <div class="ibox-content"> 98 <div class="ibox-content">
99 <div class="row"> 99 <div class="row">
100 <form role="form"> 100 <form role="form">
101 101
102 <div class="col-lg-3"> 102 <div class="col-lg-3">
103 <label style="color: #1ab394;">Modularized</label> 103 <label style="color: #1ab394;">Modularized</label>
104 <div> 104 <div>
105 <label> <input type="checkbox" class="i-checks" ng-change="enableEssId()" ng-model="feature.essintaPosSystem" icheck> Essinta POS system </label> 105 <label> <input type="checkbox" class="i-checks" ng-change="enableEssId()" ng-model="feature.essintaPosSystem" icheck> Essinta POS system </label>
106 </div> 106 </div>
107 <div> 107 <div>
108 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuQuote" icheck> AcuQuote </label> 108 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuQuote" icheck> AcuQuote </label>
109 </div> 109 </div>
110 <div> 110 <div>
111 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuTrack" icheck> AcuTrack </label> 111 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuTrack" icheck> AcuTrack </label>
112 </div> 112 </div>
113 <div> 113 <div>
114 <label> <input type="checkbox" class="i-checks" ng-model="feature.fuelProgram" icheck> Fuel Program </label> 114 <label> <input type="checkbox" class="i-checks" ng-model="feature.fuelProgram" icheck> Fuel Program </label>
115 </div> 115 </div>
116 <div> 116 <div>
117 <label> <input type="checkbox" class="i-checks" ng-model="feature.amstatIntegration" icheck> AMSTAT Integration </label> 117 <label> <input type="checkbox" class="i-checks" ng-model="feature.amstatIntegration" icheck> AMSTAT Integration </label>
118 </div> 118 </div>
119 <div> 119 <div>
120 <label> <input type="checkbox" class="i-checks" ng-model="feature.posAccountingIntegration" icheck> POS Accounting Integration </label> 120 <label> <input type="checkbox" class="i-checks" ng-model="feature.posAccountingIntegration" icheck> POS Accounting Integration </label>
121 </div> 121 </div>
122 <div> 122 <div>
123 <label> <input type="checkbox" class="i-checks" ng-model="feature.posVeederRootIntegration" icheck> POS VeederRoot Integration </label> 123 <label> <input type="checkbox" class="i-checks" ng-model="feature.posVeederRootIntegration" icheck> POS VeederRoot Integration </label>
124 </div> 124 </div>
125 </div> 125 </div>
126 <div class="col-lg-9" style="padding: 0;"> 126 <div class="col-lg-9" style="padding: 0;">
127 <div class="col-lg-6"> 127 <div class="col-lg-6">
128 <div class="form-group" style="margin-top: 18px;" id="esAccId"> 128 <div class="form-group" style="margin-top: 18px;" id="esAccId">
129 <label class="control-label pull-left" style="color: #1ab394;line-height: 34px;">Essinta Account UID</label> 129 <label class="control-label pull-left" style="color: #1ab394;line-height: 34px;">Essinta Account UID</label>
130 <div class="col-lg-6"> 130 <div class="col-lg-6">
131 <input type="text" placeholder="" ng-disabled="essAccountId" style="border-color: #1ab394;" class="form-control" ng-model="feature.essintaAccountUid"> 131 <input type="text" placeholder="" ng-disabled="essAccountId" style="border-color: #1ab394;" class="form-control" ng-model="feature.essintaAccountUid">
132 </div> 132 </div>
133 </div> 133 </div>
134 </div> 134 </div>
135 <div class="col-lg-6"> 135 <div class="col-lg-6">
136 <div class="form-group" style="margin-top: 18px;"> 136 <div class="form-group" style="margin-top: 18px;">
137 <label class="control-label pull-left" style="color: #ffa149;line-height: 34px;">Additional Device Licences</label> 137 <label class="control-label pull-left" style="color: #ffa149;line-height: 34px;">Additional Device Licences</label>
138 <div class="col-lg-6"> 138 <div class="col-lg-6">
139 <input type="text" placeholder="" style="border-color: #ffa149 !important;" ng-model="feature.additionalLicences" class="form-control"> 139 <input type="text" placeholder="" style="border-color: #ffa149 !important;" ng-model="feature.additionalLicences" class="form-control">
140 </div> 140 </div>
141 </div> 141 </div>
142 </div> 142 </div>
143 </div> 143 </div>
144 144
145 </form> 145 </form>
146 </div> 146 </div>
147 </div> 147 </div>
148 </div> 148 </div>
149 </div> 149 </div>
150 </div> 150 </div>
151 </div> 151 </div>
app/views/fbo-flight/flight.html
1 </div> 1 </div>
2 <div class="row wrapper border-bottom white-bg page-heading"> 2 <div class="row wrapper border-bottom white-bg page-heading">
3 <div class="col-lg-8"> 3 <div class="col-lg-8">
4 <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">Tellus Institute</h2> 4 <!-- <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">Tellus Institute</h2> -->
5 <div style="margin-top: 20px;" ng-hide="showCompany"><input type="text" style="width:50%;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div> 5 <div style="margin-top: 20px;"><input type="text" style="width:50%;" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div>
6 </div> 6 </div>
7 <div class="col-lg-4" style="margin-top: 20px; text-align: right;"> 7 <div class="col-lg-4" style="margin-top: 20px; text-align: right;">
8 <button type="button" class="btn btn-default btn-sm" ui-sref="index.flightDept">Cancel</button> 8 <button type="button" class="btn btn-default btn-sm" ui-sref="index.flightDept">Cancel</button>
9 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button> 9 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button>
10 </div> 10 </div>
11 </div> 11 </div>
12 </div> 12 </div>
13 <div class="wrapper wrapper-content animated fadeInRight"> 13 <div class="wrapper wrapper-content animated fadeInRight">
14 <div class="row"> 14 <div class="row">
15 <div class="col-lg-7"> 15 <div class="col-lg-7">
16 <div class="ibox float-e-margins"> 16 <div class="ibox float-e-margins">
17 <div class="ibox-title"> 17 <div class="ibox-title">
18 <div class="pull-left"> 18 <div class="pull-left">
19 <h5>Contact Information</h5> 19 <h5>Contact Information</h5>
20 </div> 20 </div>
21 <div class="pull-right my-toggle-switch"> 21 <div class="pull-right my-toggle-switch">
22 <div class="switch"> 22 <div class="switch">
23 <div class="onoffswitch"> 23 <div class="onoffswitch">
24 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1"> 24 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1">
25 <label class="onoffswitch-label" for="example1"> 25 <label class="onoffswitch-label" for="example1">
26 <span class="onoffswitch-inner"></span> 26 <span class="onoffswitch-inner"></span>
27 <span class="onoffswitch-switch"></span> 27 <span class="onoffswitch-switch"></span>
28 </label> 28 </label>
29 </div> 29 </div>
30 </div> 30 </div>
31 </div> 31 </div>
32 <div class="clearfix"></div> 32 <div class="clearfix"></div>
33 </div> 33 </div>
34 <div class="ibox-content"> 34 <div class="ibox-content">
35 <div class="row"> 35 <div class="row">
36 <form role="form"> 36 <form role="form">
37 <div class="col-sm-6 b-r"> 37 <div class="col-sm-6 b-r">
38 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> --> 38 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> -->
39 <div class="form-group"><label>Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> 39 <div class="form-group"><label>Email Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div>
40 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div> 40 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div>
41 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div> 41 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div>
42 <!-- <div> 42 <!-- <div>
43 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button> 43 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button>
44 <label> <input type="checkbox" class="i-checks"> Remember me </label> 44 <label> <input type="checkbox" class="i-checks"> Remember me </label>
45 </div> --> 45 </div> -->
46 46
47 </div> 47 </div>
48 <div class="col-sm-6"> 48 <div class="col-sm-6">
49 <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> 49 <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div>
50 <div class="form-group"><label>Phone</label> <input type="number" ng-model="user.phone" placeholder="Phone" class="form-control"></div> 50 <div class="form-group"><label>Phone</label> <input type="number" ng-model="user.phone" placeholder="Phone" class="form-control"></div>
51 <div class="form-group"><label>Mobile</label> <input type="number" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div> 51 <div class="form-group"><label>Mobile</label> <input type="number" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div>
52 </div> 52 </div>
53 </form> 53 </form>
54 </div> 54 </div>
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 <div class="col-lg-5"> 58 <div class="col-lg-5">
59 <div class="ibox float-e-margins"> 59 <div class="ibox float-e-margins">
60 <div class="ibox-title"> 60 <div class="ibox-title">
61 <h5>Client Notes</h5> 61 <h5>Client Notes</h5>
62 62
63 </div> 63 </div>
64 <div class="ibox-content"> 64 <div class="ibox-content">
65 <div class="row"> 65 <div class="row">
66 <form role="form"> 66 <form role="form">
67 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea> 67 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea>
68 </form> 68 </form>
69 </div> 69 </div>
70 </div> 70 </div>
71 71
72 </div> 72 </div>
73 </div> 73 </div>
74 </div> 74 </div>
75 </div> 75 </div>
76 76
77 <div> 77 <div>
78 <div class="row"> 78 <div class="row">
79 <div class="col-lg-7"> 79 <div class="col-lg-7">
80 <div class="ibox float-e-margins"> 80 <div class="ibox float-e-margins">
81 <div class="ibox-title"> 81 <div class="ibox-title">
82 <h5>Aircraft List</h5> 82 <h5>Aircraft List</h5>
83 <div class="pull-right"> 83 <div class="pull-right">
84 <button type="button" class="btn btn-primary btn-sm" ng-click="openModal()">+ Add</button> 84 <button type="button" class="btn btn-primary btn-sm" ng-click="openModal()">+ Add</button>
85 </div> 85 </div>
86 <div class="clearfix"></div> 86 <div class="clearfix"></div>
87 <div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true"> 87 <div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true">
88 <div class="modal-dialog"> 88 <div class="modal-dialog">
89 <div class="modal-content animated fadeIn"> 89 <div class="modal-content animated fadeIn">
90 <div class="modal-header"> 90 <div class="modal-header">
91 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> 91 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
92 <!-- <i class="fa fa-clock-o modal-icon"></i> --> 92 <!-- <i class="fa fa-clock-o modal-icon"></i> -->
93 <h4 class="modal-title">Add Aircraft</h4> 93 <h4 class="modal-title">Add Aircraft</h4>
94 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> --> 94 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> -->
95 </div> 95 </div>
96 <div class="modal-body" style="padding: 15px;"> 96 <div class="modal-body" style="padding: 15px;">
97 <table class="table table-bordered table-hover table-striped"> 97 <table class="table table-bordered table-hover table-striped">
98 <thead> 98 <thead>
99 <tr> 99 <tr>
100 <th>Tail</th> 100 <th>Tail</th>
101 <th>Make</th> 101 <th>Make</th>
102 <th>Model</th> 102 <th>Model</th>
103 <th>Size</th> 103 <th>Size</th>
104 </tr> 104 </tr>
105 </thead> 105 </thead>
106 <tbody> 106 <tbody>
107 <tr> 107 <tr>
108 <td> 108 <td>
109 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> 109 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control">
110 </td> 110 </td>
111 <td style="width: 30%"> 111 <td style="width: 30%">
112 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> 112 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()">
113 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 113 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
114 </select> 114 </select>
115 </td> 115 </td>
116 <td style="width: 30%"> 116 <td style="width: 30%">
117 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> 117 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()">
118 <option ng-repeat="model in aircraftModalList">{{model}}</option> 118 <option ng-repeat="model in aircraftModalList">{{model}}</option>
119 </select> 119 </select>
120 </td> 120 </td>
121 <td style="width: 30%"> 121 <td style="width: 30%">
122 <select class="form-control" ng-model="aircraft.size"> 122 <select class="form-control" ng-model="aircraft.size">
123 <option ng-repeat="size in aircraftSizeList">{{size}}</option> 123 <option ng-repeat="size in aircraftSizeList">{{size}}</option>
124 </select> 124 </select>
125 </td> 125 </td>
126 </tr> 126 </tr>
127 </tbody> 127 </tbody>
128 </table> 128 </table>
129 </div> 129 </div>
130 <div class="modal-footer"> 130 <div class="modal-footer">
131 <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> 131 <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
132 <button type="button" class="btn btn-primary" ng-click="addAircraft()">Save changes</button> 132 <button type="button" class="btn btn-primary" ng-click="addAircraft()">Save changes</button>
133 </div> 133 </div>
134 </div> 134 </div>
135 </div> 135 </div>
136 </div> 136 </div>
137 </div> 137 </div>
138 <div class="ibox-content"> 138 <div class="ibox-content">
139 <div class="table-responsive"> 139 <div class="table-responsive">
140 <table class="table table-bordered table-hover table-striped"> 140 <table class="table table-bordered table-hover table-striped">
141 <thead> 141 <thead>
142 <tr> 142 <tr>
143 <th>Tail</th> 143 <th>Tail</th>
144 <th>Make</th> 144 <th>Make</th>
145 <th>Model</th> 145 <th>Model</th>
146 <th>Size</th> 146 <th>Size</th>
147 </tr> 147 </tr>
148 </thead> 148 </thead>
149 <tbody> 149 <tbody>
150 <tr ng-repeat="airData in getCraftList track by $index"> 150 <tr ng-repeat="airData in getCraftList track by $index">
151 <td> 151 <td>
152 <input type="text" style="width:100px;" ng-model="airData.tail" class="form-control"> 152 <input type="text" style="width:100px;" ng-model="airData.tail" class="form-control">
153 </td> 153 </td>
154 <td> 154 <td>
155 <select class="form-control" ng-model="airData.make"> 155 <select class="form-control" ng-model="airData.make">
156 <option>{{airData.make}}</option> 156 <option>{{airData.make}}</option>
157 </select> 157 </select>
158 </td> 158 </td>
159 <td> 159 <td>
160 <select class="form-control" ng-model="airData.model"> 160 <select class="form-control" ng-model="airData.model">
161 <option>{{airData.model}}</option> 161 <option>{{airData.model}}</option>
162 </select> 162 </select>
163 </td> 163 </td>
164 <td> 164 <td>
165 <select class="form-control" ng-model="airData.size"> 165 <select class="form-control" ng-model="airData.size">
166 <option>{{airData.size}}</option> 166 <option>{{airData.size}}</option>
167 </select> 167 </select>
168 </td> 168 </td>
169 </tr> 169 </tr>
170 </tbody> 170 </tbody>
171 </table> 171 </table>
172 </div> 172 </div>
173 <div class="clearfix"></div> 173 <div class="clearfix"></div>
174 </div> 174 </div>
175 </div> 175 </div>
176 </div> 176 </div>
177 <div class="col-lg-5"> 177 <div class="col-lg-5">
178 <div class="ibox float-e-margins"> 178 <div class="ibox float-e-margins">
179 <div class="ibox-title"> 179 <div class="ibox-title">
180 <h5>Account Authenticatio & Payment Method</h5> 180 <h5>Account Authenticatio & Payment Method</h5>
181 181
182 </div> 182 </div>
183 <div class="ibox-content"> 183 <div class="ibox-content">
184 <!-- <div class="row"> 184 <!-- <div class="row">
185 <div class="col-md-3"> 185 <div class="col-md-3">
186 <img src="images/master.png"> 186 <img src="images/master.png">
187 </div> 187 </div>
188 <div class="col-md-9"> 188 <div class="col-md-9">
189 <div class="col"> 189 <div class="col">
190 <span style="font-size: large; color: #909394;">**** **** **** 7002</span> 190 <span style="font-size: large; color: #909394;">**** **** **** 7002</span>
191 </div> 191 </div>
192 <div class="col"> 192 <div class="col">
193 <span><strong>Expiry Date:</strong>10/16</span> 193 <span><strong>Expiry Date:</strong>10/16</span>
194 </div> 194 </div>
195 </div> 195 </div>
196 <div class="clearfix"></div> 196 <div class="clearfix"></div>
197 <br> 197 <br>
198 198
199 <div class="col-md-3"> 199 <div class="col-md-3">
200 <img src="images/visa1.png"> 200 <img src="images/visa1.png">
201 </div> 201 </div>
202 <div class="col-md-9"> 202 <div class="col-md-9">
203 <div class="col"> 203 <div class="col">
204 <span style="font-size: large; color: #909394;">**** **** **** 1060</span> 204 <span style="font-size: large; color: #909394;">**** **** **** 1060</span>
205 </div> 205 </div>
206 <div class="col"> 206 <div class="col">
207 <span><strong>Expiry Date:</strong>10/16</span> 207 <span><strong>Expiry Date:</strong>10/16</span>
208 </div> 208 </div>
209 </div> 209 </div>
210 <div class="clearfix"></div> 210 <div class="clearfix"></div>
211 </div> --> 211 </div> -->
212 212
213 213
214 <div class="row"> 214 <div class="row">
215 215
216 <!-- <form name="myForm"> 216 <!-- <form name="myForm">
217 217
218 <div class="span3"> 218 <div class="span3">
219 <label for="">Card number</label> 219 <label for="">Card number</label>
220 <input type="text" class="form-control" ng-model="number"> 220 <input type="text" class="form-control" ng-model="number">
221 </div> 221 </div>
222 222
223 <div class="span3"> 223 <div class="span3">
224 <label for="">Name on card </label> 224 <label for="">Name on card </label>
225 <input type="text" class="form-control"> 225 <input type="text" class="form-control">
226 </div> 226 </div>
227 227
228 <div class="row"> 228 <div class="row">
229 <div class="col-sm-6"> 229 <div class="col-sm-6">
230 <label for="">Expiry</label> 230 <label for="">Expiry</label>
231 <input type="text" class="form-control" ng-model="expiry"> 231 <input type="text" class="form-control" ng-model="expiry">
232 </div> 232 </div>
233 233
234 <div class="col-sm-6"> 234 <div class="col-sm-6">
235 <label for="">CVV</label> 235 <label for="">CVV</label>
236 <input type="text" class="form-control" ng-model="cvc"> 236 <input type="text" class="form-control" ng-model="cvc">
237 </div> 237 </div>
238 </div> 238 </div>
239 <div class="span4"> 239 <div class="span4">
240 <button type="submit" class="btn btn-primary btn-large">Add</button> 240 <button type="submit" class="btn btn-primary btn-large">Add</button>
241 </div> 241 </div>
242 242
243 </form> --> 243 </form> -->
244 244
245 <div class="container"> 245 <div class="container">
246 <div class="row"> 246 <div class="row">
247 <div class="col-xs-12 col-md-4"> 247 <div class="col-xs-12 col-md-4">
248 <div class="panel panel-default credit-card-box"> 248 <div class="panel panel-default credit-card-box">
249 <div class="panel-heading display-table" > 249 <div class="panel-heading display-table" >
250 <div class="row display-tr" > 250 <div class="row display-tr" >
251 <h3 class="panel-title display-td" >Payment Details</h3> 251 <h3 class="panel-title display-td" >Payment Details</h3>
252 <div class="display-td" > 252 <div class="display-td" >
253 <img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png"> 253 <img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png">
254 </div> 254 </div>
255 </div> 255 </div>
256 </div> 256 </div>
257 <div class="panel-body"> 257 <div class="panel-body">
258 <form role="form" id="payment-form"> 258 <form role="form" id="payment-form">
259 <div class="row"> 259 <div class="row">
260 <div class="col-xs-12"> 260 <div class="col-xs-12">
261 <div class="form-group"> 261 <div class="form-group">
262 <label for="cardNumber">CARD NUMBER</label> 262 <label for="cardNumber">CARD NUMBER</label>
263 <div class="input-group"> 263 <div class="input-group">
264 <input type="number" ng-model="data.cardNumber" maxlength="16" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardNumber" placeholder="Valid Card Number" autocomplete="cc-number" required autofocus> 264 <input type="number" ng-model="data.cardNumber" maxlength="16" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardNumber" placeholder="Valid Card Number" autocomplete="cc-number" required autofocus>
265 <span class="input-group-addon"><i class="fa fa-credit-card"></i></span> 265 <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
266 </div> 266 </div>
267 </div> 267 </div>
268 </div> 268 </div>
269 </div> 269 </div>
270 <div class="row"> 270 <div class="row">
271 <div class="col-xs-7 col-md-7"> 271 <div class="col-xs-7 col-md-7">
272 <div class="form-group"> 272 <div class="form-group">
273 <label for="cardExpiry"><span class="hidden-xs">EXPIRATION</span><span class="visible-xs-inline">EXP</span> DATE</label> 273 <label for="cardExpiry"><span class="hidden-xs">EXPIRATION</span><span class="visible-xs-inline">EXP</span> DATE</label>
274 <input type="text" ng-model="data.expiryDate" class="form-control" name="cardExpiry" placeholder="MM / YY" autocomplete="cc-exp" 274 <input type="text" ng-model="data.expiryDate" class="form-control" name="cardExpiry" placeholder="MM / YY" autocomplete="cc-exp"
275 required> 275 required>
276 </div> 276 </div>
277 </div> 277 </div>
278 <div class="col-xs-5 col-md-5 pull-right"> 278 <div class="col-xs-5 col-md-5 pull-right">
279 <div class="form-group"> 279 <div class="form-group">
280 <label for="cardCVC">CVV CODE</label> 280 <label for="cardCVC">CVV CODE</label>
281 <input type="number" maxlength="3" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardCVC" placeholder="CVC" autocomplete="cc-csc" 281 <input type="number" maxlength="3" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardCVC" placeholder="CVC" autocomplete="cc-csc"
282 required> 282 required>
283 </div> 283 </div>
284 </div> 284 </div>
285 </div> 285 </div>
286 <div class="row"> 286 <div class="row">
287 <div class="col-xs-12"> 287 <div class="col-xs-12">
288 <div class="form-group"> 288 <div class="form-group">
289 <label for="name">Card Type</label> 289 <label for="name">Card Type</label>
290 <select class="form-control m-b" name="account" ng-model="data.cardType" style="margin-bottom: 0;"> 290 <select class="form-control m-b" name="account" ng-model="data.cardType" style="margin-bottom: 0;">
291 <option value="creditCard" selected>Credit Card</option> 291 <option value="creditCard" selected>Credit Card</option>
292 <option value="debitCard">Debit Card</option> 292 <option value="debitCard">Debit Card</option>
293 </select> 293 </select>
294 </div> 294 </div>
295 </div> 295 </div>
296 </div> 296 </div>
297 <div class="row"> 297 <div class="row">
298 <div class="col-xs-12"> 298 <div class="col-xs-12">
299 <button class="btn btn-success btn-lg btn-block" type="submit" ng-click="addCard()">Add</button> 299 <button class="btn btn-success btn-lg btn-block" type="submit" ng-click="addCard()">Add</button>
300 </div> 300 </div>
301 </div> 301 </div>
302 <div class="row" style="display:none;"> 302 <div class="row" style="display:none;">
303 <div class="col-xs-12"> 303 <div class="col-xs-12">
304 <p class="payment-errors"></p> 304 <p class="payment-errors"></p>
305 </div> 305 </div>
306 </div> 306 </div>
307 </form> 307 </form>
308 </div> 308 </div>
309 </div> 309 </div>
310 </div> 310 </div>
311 </div> 311 </div>
312 </div> 312 </div>
313 </div> 313 </div>
314 </div> 314 </div>
315 </div> 315 </div>
316 </div> 316 </div>
317 </div> 317 </div>
318 </div> 318 </div>
319 </div> 319 </div>
320 <script type="text/javascript" src="https://js.stripe.com/v2/"></script> 320 <script type="text/javascript" src="https://js.stripe.com/v2/"></script>
app/views/fbo-flight/flightDept.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acuefuel') 4 angular.module('acuefuel')
5 5
6 .controller('FlightDeptController', function ($scope, $uibModal, FBOFlight) { 6 .controller('FlightDeptController', function ($scope, $uibModal, FBOFlight) {
7 $scope.showCompany = true;
8 $scope.editName = function(){
9 $scope.showCompany = false;
10
11 }
12 $scope.data = {}; 7 $scope.data = {};
13 $scope.user = {}; 8 $scope.user = {};
14 $scope.aircraft = {}; 9 $scope.aircraft = {};
15 $scope.userData = function(){ 10 $scope.userData = function(){
16 if($scope.user.email == undefined || $scope.user.email == null){ 11 if($scope.user.email == undefined || $scope.user.email == null){
17 toastr.error('Please enter your email first', { 12 toastr.error('Please enter your email first', {
18 closeButton: true 13 closeButton: true
19 }) 14 })
20 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){ 15 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){
21 toastr.error('Please enter your First Name', { 16 toastr.error('Please enter your First Name', {
22 closeButton: true 17 closeButton: true
23 }) 18 })
24 }else{ 19 }else{
25 if($scope.status == true){ 20 if($scope.status == true){
26 $scope.user.status = 'active'; 21 $scope.user.status = 'active';
27 }else{ 22 }else{
28 $scope.user.status = 'inactive'; 23 $scope.user.status = 'inactive';
29 } 24 }
30 $scope.user.username = $scope.user.email; 25 $scope.user.username = $scope.user.email;
31 $scope.user.userType = 'flightDetp'; 26 $scope.user.userType = 'flightDetp';
32 console.log($scope.user) 27 console.log($scope.user)
33 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; 28 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;
34 FBOFlight.registerUser(formdata).then(function(result) { 29 FBOFlight.registerUser(formdata).then(function(result) {
35 $scope.registerId = result; 30 $scope.registerId = result;
36 $scope.data.accountId = $scope.registerId; 31 $scope.data.accountId = $scope.registerId;
37 $scope.aircraft.accountId = $scope.registerId; 32 $scope.aircraft.accountId = $scope.registerId;
38 toastr.success('Created Successfully', { 33 toastr.success('Created Successfully', {
39 closeButton: true 34 closeButton: true
40 }) 35 })
41 $state.go('index.flightDept'); 36 $state.go('index.flightDept');
42 }, function (err) { 37 }, function (err) {
43 toastr.error('Error in registering', { 38 toastr.error('Error in registering', {
44 closeButton: true 39 closeButton: true
45 }) 40 })
46 }); 41 });
47 } 42 }
48 } 43 }
49 44
50 $scope.data.cardType = 'creditCard'; 45 $scope.data.cardType = 'creditCard';
51 var cardData = {} 46 var cardData = {}
52 cardData.paymentMethodList = []; 47 cardData.paymentMethodList = [];
53 $scope.addCard = function(){ 48 $scope.addCard = function(){
54 if($scope.aircraft.accountId == undefined){ 49 if($scope.aircraft.accountId == undefined){
55 toastr.error('Please Add Contact Information', { 50 toastr.error('Please Add Contact Information', {
56 closeButton: true 51 closeButton: true
57 }) 52 })
58 }else{ 53 }else{
59 cardData.paymentMethodList.push($scope.data); 54 cardData.paymentMethodList.push($scope.data);
60 console.log("cardData", cardData); 55 console.log("cardData", cardData);
61 FBOFlight.addCardInformation(cardData).then(function(result) { 56 FBOFlight.addCardInformation(cardData).then(function(result) {
62 console.log(result) 57 console.log(result)
63 toastr.success('Created Successfully', { 58 toastr.success('Created Successfully', {
64 closeButton: true 59 closeButton: true
65 }) 60 })
66 }) 61 })
67 } 62 }
68 63
69 } 64 }
70 65
71 getData(); 66 getData();
72 function getData(){ 67 function getData(){
73 FBOFlight.getAircraftMake().then(function(result) { 68 FBOFlight.getAircraftMake().then(function(result) {
74 $scope.aircraftMakeList = result; 69 $scope.aircraftMakeList = result;
75 $scope.aircraft.make = $scope.aircraftMakeList[0]; 70 $scope.aircraft.make = $scope.aircraftMakeList[0];
76 FBOFlight.getModal($scope.aircraft.make).then(function(result) { 71 FBOFlight.getModal($scope.aircraft.make).then(function(result) {
77 $scope.aircraftModalList = result; 72 $scope.aircraftModalList = result;
78 $scope.aircraft.model = $scope.aircraftModalList[0]; 73 $scope.aircraft.model = $scope.aircraftModalList[0];
79 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) { 74 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) {
80 $scope.aircraftSizeList = result; 75 $scope.aircraftSizeList = result;
81 $scope.aircraft.size = $scope.aircraftSizeList[0]; 76 $scope.aircraft.size = $scope.aircraftSizeList[0];
82 }) 77 })
83 }) 78 })
84 79
85 }) 80 })
86 } 81 }
87 82
88 83
89 $scope.getModal = function(){ 84 $scope.getModal = function(){
90 var makeId = $scope.aircraft.make; 85 var makeId = $scope.aircraft.make;
91 FBOFlight.getModal(makeId).then(function(result) { 86 FBOFlight.getModal(makeId).then(function(result) {
92 $scope.aircraftModalList = result; 87 $scope.aircraftModalList = result;
93 $scope.aircraft.model = $scope.aircraftModalList[0]; 88 $scope.aircraft.model = $scope.aircraftModalList[0];
94 FBOFlight.getAircraftSize(makeId, $scope.aircraft.model).then(function(result) { 89 FBOFlight.getAircraftSize(makeId, $scope.aircraft.model).then(function(result) {
95 $scope.aircraftSizeList = result; 90 $scope.aircraftSizeList = result;
96 $scope.aircraft.size = $scope.aircraftSizeList[0]; 91 $scope.aircraft.size = $scope.aircraftSizeList[0];
97 }) 92 })
98 }) 93 })
99 } 94 }
100 95
101 $scope.getSize = function(){ 96 $scope.getSize = function(){
102 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) { 97 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) {
103 $scope.aircraftSizeList = result; 98 $scope.aircraftSizeList = result;
104 $scope.aircraft.size = $scope.aircraftSizeList[0]; 99 $scope.aircraft.size = $scope.aircraftSizeList[0];
105 }) 100 })
106 } 101 }
107 102
108 $scope.openModal = function(){ 103 $scope.openModal = function(){
109 if($scope.aircraft.accountId == undefined){ 104 if($scope.aircraft.accountId == undefined){
110 toastr.error('Please Add Contact Information', { 105 toastr.error('Please Add Contact Information', {
111 closeButton: true 106 closeButton: true
112 }) 107 })
113 $('#myModal4').modal('show'); 108 $('#myModal4').modal('hide');
114 }else{ 109 }else{
115 $('#myModal4').modal('show'); 110 $('#myModal4').modal('show');
116 } 111 }
117 112
118 } 113 }
119 $scope.aircraftData = {}; 114 $scope.aircraftData = {};
120 $scope.aircraftData.aircraftList = []; 115 $scope.aircraftData.aircraftList = [];
121 $scope.getCraftList = []; 116 $scope.getCraftList = [];
122 $scope.addAircraft = function(){ 117 $scope.addAircraft = function(){
123 $scope.aircraftData.aircraftList.push($scope.aircraft); 118 $scope.aircraftData.aircraftList.push($scope.aircraft);
124 if ($scope.getCraftList.indexOf($scope.aircraft) == -1) { 119 if ($scope.getCraftList.indexOf($scope.aircraft) == -1) {
125 $scope.getCraftList.push($scope.aircraft); 120 $scope.getCraftList.push($scope.aircraft);
126 } 121 }
127 122
128 FBOFlight.addAircraft($scope.aircraftData).then(function(result) { 123 FBOFlight.addAircraft($scope.aircraftData).then(function(result) {
129 $('#myModal4').modal('hide'); 124 $('#myModal4').modal('hide');
130 $scope.reset(); 125 $scope.reset();
131 toastr.success('Created Successfully', { 126 toastr.success('Created Successfully', {
132 closeButton: true 127 closeButton: true
133 }) 128 })
134 }, function (err) { 129 }, function (err) {
135 toastr.error('Error in Adding Aircraft', { 130 toastr.error('Error in Adding Aircraft', {
136 closeButton: true 131 closeButton: true
137 }) 132 })
138 $('#myModal4').modal('hide'); 133 $('#myModal4').modal('hide');
139 $scope.getCraftList.splice($scope.aircraft); 134 $scope.getCraftList.splice($scope.aircraft);
140 }); 135 });
141 136
142 } 137 }
143 138
144 $scope.reset = function() { 139 $scope.reset = function() {
145 $scope.aircraft = {}; 140 $scope.aircraft = {};
146 $scope.aircraft.accountId = $scope.data.accountId; 141 $scope.aircraft.accountId = $scope.data.accountId;
147 $scope.aircraftData.aircraftList = []; 142 $scope.aircraftData.aircraftList = [];
148 getData(); 143 getData();
149 } 144 }
150 }); 145 });
app/views/updateAllFBO/updateAllFBO.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acuefuel') 4 angular.module('acuefuel')
5 5
6 .controller('updateAllFBOController', function($scope, $stateParams, UpdateAllFBO) { 6 .controller('updateAllFBOController', function($scope, $stateParams, UpdateAllFBO) {
7 $(document).ready(function(){ 7 $(document).ready(function(){
8 $('.i-checks').iCheck({ 8 $('.i-checks').iCheck({
9 checkboxClass: 'icheckbox_square-green', 9 checkboxClass: 'icheckbox_square-green',
10 radioClass: 'iradio_square-green', 10 radioClass: 'iradio_square-green',
11 }); 11 });
12 12
13 }); 13 });
14 $scope.showCompany = true; 14
15 $scope.editName = function(){
16 $scope.showCompany = false;
17
18 }
19 $scope.feature = {}; 15 $scope.feature = {};
20 var userProfileID = $stateParams.id; 16 var userProfileID = $stateParams.id;
21 UpdateAllFBO.getALlFBOData(userProfileID).then(function(result) { 17 UpdateAllFBO.getALlFBOData(userProfileID).then(function(result) {
22 console.log(result) 18 console.log(result)
23 $scope.user = result; 19 $scope.user = result;
24 $scope.user.userTypeId = result.userType.id; 20 $scope.user.userTypeId = result.userType.id;
25 21
26 if(result.accountFeatureControl != null){ 22 if(result.accountFeatureControl != null){
27 $scope.feature = result.accountFeatureControl; 23 $scope.feature = result.accountFeatureControl;
28 $scope.feature.accountId = result.account.id; 24 $scope.feature.accountId = result.account.id;
29 console.log($scope.feature) 25 console.log($scope.feature)
30 if($scope.feature.essintaPosSystem == true){ 26 if($scope.feature.essintaPosSystem == true){
31 $scope.essAccountId = false; 27 $scope.essAccountId = false;
32 $("#esAccId").css({ opacity: 1 }); 28 $("#esAccId").css({ opacity: 1 });
33 }else{ 29 }else{
34 $scope.essAccountId = true; 30 $scope.essAccountId = true;
35 delete $scope.feature.essintaAccountUid; 31 delete $scope.feature.essintaAccountUid;
36 $("#esAccId").css({ opacity: 0.5 }); 32 $("#esAccId").css({ opacity: 0.5 });
37 } 33 }
38 }else{ 34 }else{
39 $scope.feature.accountId = result.account.id; 35 $scope.feature.accountId = result.account.id;
40 } 36 }
41 37
42 UpdateAllFBO.getNotes(userProfileID).then(function(response) { 38 UpdateAllFBO.getNotes(userProfileID).then(function(response) {
43 $scope.user.clientNote = response[0].notes 39 $scope.user.clientNote = response[0].notes
44 $scope.user.userNoteId = response[0].id; 40 $scope.user.userNoteId = response[0].id;
45 }) 41 })
46 console.log($scope.feature,"dsdsdsds") 42 console.log($scope.feature,"dsdsdsds")
47 if($scope.user.account.user.status == 'ACTIVE'){ 43 if($scope.user.account.user.status == 'ACTIVE'){
48 $scope.status = true; 44 $scope.status = true;
49 }else { 45 }else {
50 $scope.status = false; 46 $scope.status = false;
51 } 47 }
52 }) 48 })
53 49
54 $scope.enableEssId = function(){ 50 $scope.enableEssId = function(){
55 if($scope.feature.essintaPosSystem == true){ 51 if($scope.feature.essintaPosSystem == true){
56 $scope.essAccountId = false; 52 $scope.essAccountId = false;
57 $("#esAccId").css({ opacity: 1 }); 53 $("#esAccId").css({ opacity: 1 });
58 }else{ 54 }else{
59 $scope.essAccountId = true; 55 $scope.essAccountId = true;
60 delete $scope.feature.essintaAccountUid; 56 delete $scope.feature.essintaAccountUid;
61 $("#esAccId").css({ opacity: 0.5 }); 57 $("#esAccId").css({ opacity: 0.5 });
62 } 58 }
63 } 59 }
64 60
65 $scope.userData = function(){ 61 $scope.userData = function(){
66 console.log($scope.user.userTypeId) 62 console.log($scope.user.userTypeId)
67 if($scope.user.email == undefined || $scope.user.email == null){ 63 if($scope.user.email == undefined || $scope.user.email == null){
68 toastr.error('Please enter your email first', { 64 toastr.error('Please enter your email first', {
69 closeButton: true 65 closeButton: true
70 }) 66 })
71 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){ 67 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){
72 toastr.error('Please enter your First Name', { 68 toastr.error('Please enter your First Name', {
73 closeButton: true 69 closeButton: true
74 }) 70 })
75 }else{ 71 }else{
76 if($scope.status == true){ 72 if($scope.status == true){
77 $scope.user.status = 'active'; 73 $scope.user.status = 'active';
78 }else{ 74 }else{
79 $scope.user.status = 'inactive'; 75 $scope.user.status = 'inactive';
80 } 76 }
81 $scope.user.username = $scope.user.email; 77 $scope.user.username = $scope.user.email;
82 $scope.user.userType = 'fbo'; 78 $scope.user.userType = 'fbo';
83 console.log($scope.user) 79 console.log($scope.user)
84 // if($scope.user.userNoteId == undefined){ 80 // if($scope.user.userNoteId == undefined){
85 // $scope.user.userNoteId = null; 81 // $scope.user.userNoteId = null;
86 // } 82 // }
87 var updateData = "companyName=" + $scope.user.companyName + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&userNote=" + $scope.user.clientNote + "&userNoteId=" + $scope.user.userNoteId + "&userTypeId=" + $scope.user.userTypeId + "&userProfileId=" + userProfileID; 83 var updateData = "companyName=" + $scope.user.companyName + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&userNote=" + $scope.user.clientNote + "&userNoteId=" + $scope.user.userNoteId + "&userTypeId=" + $scope.user.userTypeId + "&userProfileId=" + userProfileID;
88 UpdateAllFBO.updateUser(updateData).then(function(result) { 84 UpdateAllFBO.updateUser(updateData).then(function(result) {
89 toastr.success(''+result.success+'', { 85 toastr.success(''+result.success+'', {
90 closeButton: true 86 closeButton: true
91 }) 87 })
92 var updatefeatureControlData = "accountId=" + $scope.feature.accountId + "&level=" + $scope.feature.level + "&essintaPosSystem=" + $scope.feature.essintaPosSystem 88 var updatefeatureControlData = "accountId=" + $scope.feature.accountId + "&level=" + $scope.feature.level + "&essintaPosSystem=" + $scope.feature.essintaPosSystem
93 + "&acuQuote=" + $scope.feature.acuQuote + "&acuTrack=" + $scope.feature.acuTrack + "&fuelProgram=" + $scope.feature.fuelProgram + "&amstatIntegration=" + $scope.feature.amstatIntegration+ "&posAccountingIntegration=" 89 + "&acuQuote=" + $scope.feature.acuQuote + "&acuTrack=" + $scope.feature.acuTrack + "&fuelProgram=" + $scope.feature.fuelProgram + "&amstatIntegration=" + $scope.feature.amstatIntegration+ "&posAccountingIntegration="
94 + $scope.feature.posAccountingIntegration + "&posVeederRootIntegration=" + $scope.feature.posVeederRootIntegration 90 + $scope.feature.posAccountingIntegration + "&posVeederRootIntegration=" + $scope.feature.posVeederRootIntegration
95 + "&essintaAccountUid=" + $scope.feature.essintaAccountUid + "&additionalLicences=" + $scope.feature.additionalLicences + "&accountFeatureControlId=" + $scope.feature.id; 91 + "&essintaAccountUid=" + $scope.feature.essintaAccountUid + "&additionalLicences=" + $scope.feature.additionalLicences + "&accountFeatureControlId=" + $scope.feature.id;
96 92
97 UpdateAllFBO.updatefeatureControl(updatefeatureControlData).then(function(response) { 93 UpdateAllFBO.updatefeatureControl(updatefeatureControlData).then(function(response) {
98 console.log(response) 94 console.log(response)
99 }) 95 })
100 }) 96 })
101 } 97 }
102 } 98 }
103 99
104 }); 100 });
app/views/updateAllFBO/updateAllFBO.html
1 </div> 1 </div>
2 <div class="row wrapper border-bottom white-bg page-heading"> 2 <div class="row wrapper border-bottom white-bg page-heading">
3 <div class="col-lg-3"> 3 <div class="col-lg-3">
4 <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">{{user.companyName}}</h2> 4 <!-- <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">{{user.companyName}}</h2> -->
5 <div style="margin-top: 20px;" ng-hide="showCompany"><input type="text" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div> 5 <div style="margin-top: 20px;"><input type="text" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div>
6 </div> 6 </div>
7 <div class="col-lg-3" style="margin-top: 20px;"> 7 <div class="col-lg-3" style="margin-top: 20px;">
8 <button type="button" class="btn btn-w-m btn-danger" ng-click="deleteData()">Delete Account</button> 8 <button type="button" class="btn btn-w-m btn-danger" ng-click="deleteData()">Delete Account</button>
9 </div> 9 </div>
10 <div class="col-lg-6" style="margin-top: 20px; text-align: right;"> 10 <div class="col-lg-6" style="margin-top: 20px; text-align: right;">
11 <button type="button" class="btn btn-default btn-sm" ui-sref="index.fboAdmin">Cancel</button> 11 <button type="button" class="btn btn-default btn-sm" ui-sref="index.fboAdmin">Cancel</button>
12 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button> 12 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button>
13 </div> 13 </div>
14 </div> 14 </div>
15 </div> 15 </div>
16 <div class="wrapper wrapper-content animated fadeInRight"> 16 <div class="wrapper wrapper-content animated fadeInRight">
17 <div class="row"> 17 <div class="row">
18 <div class="col-lg-7"> 18 <div class="col-lg-7">
19 <div class="ibox float-e-margins"> 19 <div class="ibox float-e-margins">
20 <div class="ibox-title"> 20 <div class="ibox-title">
21 <div class="pull-left"> 21 <div class="pull-left">
22 <h5>Contact Information</h5> 22 <h5>Contact Information</h5>
23 </div> 23 </div>
24 <div class="pull-right my-toggle-switch"> 24 <div class="pull-right my-toggle-switch">
25 <div class="switch"> 25 <div class="switch">
26 <div class="onoffswitch"> 26 <div class="onoffswitch">
27 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1"> 27 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1">
28 <label class="onoffswitch-label" for="example1"> 28 <label class="onoffswitch-label" for="example1">
29 <span class="onoffswitch-inner"></span> 29 <span class="onoffswitch-inner"></span>
30 <span class="onoffswitch-switch"></span> 30 <span class="onoffswitch-switch"></span>
31 </label> 31 </label>
32 </div> 32 </div>
33 </div> 33 </div>
34 </div> 34 </div>
35 <div class="clearfix"></div> 35 <div class="clearfix"></div>
36 </div> 36 </div>
37 <div class="ibox-content"> 37 <div class="ibox-content">
38 <div class="row"> 38 <div class="row">
39 <form role="form"> 39 <form role="form">
40 <div class="col-sm-6 b-r"> 40 <div class="col-sm-6 b-r">
41 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> --> 41 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> -->
42 <!-- <div class="form-group"><label>Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> --> 42 <!-- <div class="form-group"><label>Email Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> -->
43 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div> 43 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div>
44 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div> 44 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div>
45 <!-- <div> 45 <!-- <div>
46 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button> 46 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button>
47 <label> <input type="checkbox" class="i-checks"> Remember me </label> 47 <label> <input type="checkbox" class="i-checks"> Remember me </label>
48 </div> --> 48 </div> -->
49 49
50 </div> 50 </div>
51 <div class="col-sm-6"> 51 <div class="col-sm-6">
52 <!-- <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> --> 52 <!-- <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> -->
53 <div class="form-group"><label>Phone</label> <input type="tel" ng-model="user.phone" placeholder="Phone" class="form-control"></div> 53 <div class="form-group"><label>Phone</label> <input type="tel" ng-model="user.phone" placeholder="Phone" class="form-control"></div>
54 <div class="form-group"><label>Mobile</label> <input type="tel" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div> 54 <div class="form-group"><label>Mobile</label> <input type="tel" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div>
55 </div> 55 </div>
56 </form> 56 </form>
57 </div> 57 </div>
58 </div> 58 </div>
59 </div> 59 </div>
60 </div> 60 </div>
61 <div class="col-lg-5"> 61 <div class="col-lg-5">
62 <div class="ibox float-e-margins"> 62 <div class="ibox float-e-margins">
63 <div class="ibox-title"> 63 <div class="ibox-title">
64 <h5>Client Notes</h5> 64 <h5>Client Notes</h5>
65 65
66 </div> 66 </div>
67 <div class="ibox-content"> 67 <div class="ibox-content">
68 <div class="row"> 68 <div class="row">
69 <form role="form"> 69 <form role="form">
70 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea> 70 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea>
71 </form> 71 </form>
72 </div> 72 </div>
73 </div> 73 </div>
74 74
75 </div> 75 </div>
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
79 79
80 <div class="wrapper wrapper-content animated fadeInRight"> 80 <div class="wrapper wrapper-content animated fadeInRight">
81 <div class="row"> 81 <div class="row">
82 <div class="col-lg-12"> 82 <div class="col-lg-12">
83 <div class="ibox float-e-margins"> 83 <div class="ibox float-e-margins">
84 <div class="ibox-title" style="padding: 5px 15px 5px 15px;"> 84 <div class="ibox-title" style="padding: 5px 15px 5px 15px;">
85 <div class="col-lg-8"> 85 <div class="col-lg-8">
86 <h5 style="line-height: 34px;margin-bottom: 0;">Feature Account Control</h5> 86 <h5 style="line-height: 34px;margin-bottom: 0;">Feature Account Control</h5>
87 </div> 87 </div>
88 <div class="col-lg-4"> 88 <div class="col-lg-4">
89 <div class="form-group"> 89 <div class="form-group">
90 <label class="col-sm-2 control-label" style="line-height: 34px;margin-bottom: 0;">Level</label> 90 <label class="col-sm-2 control-label" style="line-height: 34px;margin-bottom: 0;">Level</label>
91 <div class="col-sm-10"> 91 <div class="col-sm-10">
92 <select class="form-control m-b" name="account" ng-model="feature.level" style="margin-bottom: 0;"> 92 <select class="form-control m-b" name="account" ng-model="feature.level" style="margin-bottom: 0;">
93 <option value="silver" selected>Silver</option> 93 <option value="silver" selected>Silver</option>
94 <option value="gold">Gold</option> 94 <option value="gold">Gold</option>
95 </select> 95 </select>
96 </div> 96 </div>
97 </div> 97 </div>
98 </div> 98 </div>
99 <div class="clearfix"></div> 99 <div class="clearfix"></div>
100 </div> 100 </div>
101 <div class="ibox-content"> 101 <div class="ibox-content">
102 <div class="row"> 102 <div class="row">
103 <form role="form"> 103 <form role="form">
104 104
105 <div class="col-lg-3"> 105 <div class="col-lg-3">
106 <label style="color: #1ab394;">Modularized</label> 106 <label style="color: #1ab394;">Modularized</label>
107 <div> 107 <div>
108 <label> <input type="checkbox" class="i-checks" ng-change="enableEssId()" ng-model="feature.essintaPosSystem" icheck> Essinta POS system </label> 108 <label> <input type="checkbox" class="i-checks" ng-change="enableEssId()" ng-model="feature.essintaPosSystem" icheck> Essinta POS system </label>
109 </div> 109 </div>
110 <div> 110 <div>
111 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuQuote" icheck> AcuQuote </label> 111 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuQuote" icheck> AcuQuote </label>
112 </div> 112 </div>
113 <div> 113 <div>
114 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuTrack" icheck> AcuTrack </label> 114 <label> <input type="checkbox" class="i-checks" ng-model="feature.acuTrack" icheck> AcuTrack </label>
115 </div> 115 </div>
116 <div> 116 <div>
117 <label> <input type="checkbox" class="i-checks" ng-model="feature.fuelProgram" icheck> Fuel Program </label> 117 <label> <input type="checkbox" class="i-checks" ng-model="feature.fuelProgram" icheck> Fuel Program </label>
118 </div> 118 </div>
119 <div> 119 <div>
120 <label> <input type="checkbox" class="i-checks" ng-model="feature.amstatIntegration" icheck> AMSTAT Integration </label> 120 <label> <input type="checkbox" class="i-checks" ng-model="feature.amstatIntegration" icheck> AMSTAT Integration </label>
121 </div> 121 </div>
122 <div> 122 <div>
123 <label> <input type="checkbox" class="i-checks" ng-model="feature.posAccountingIntegration" icheck> POS Accounting Integration </label> 123 <label> <input type="checkbox" class="i-checks" ng-model="feature.posAccountingIntegration" icheck> POS Accounting Integration </label>
124 </div> 124 </div>
125 <div> 125 <div>
126 <label> <input type="checkbox" class="i-checks" ng-model="feature.posVeederRootIntegration" icheck> POS VeederRoot Integration </label> 126 <label> <input type="checkbox" class="i-checks" ng-model="feature.posVeederRootIntegration" icheck> POS VeederRoot Integration </label>
127 </div> 127 </div>
128 </div> 128 </div>
129 <div class="col-lg-9" style="padding: 0;"> 129 <div class="col-lg-9" style="padding: 0;">
130 <div class="col-lg-6"> 130 <div class="col-lg-6">
131 <div class="form-group" style="margin-top: 18px;" id="esAccId"> 131 <div class="form-group" style="margin-top: 18px;" id="esAccId">
132 <label class="control-label pull-left" style="color: #1ab394;line-height: 34px;">Essinta Account UID</label> 132 <label class="control-label pull-left" style="color: #1ab394;line-height: 34px;">Essinta Account UID</label>
133 <div class="col-lg-6"> 133 <div class="col-lg-6">
134 <input type="text" placeholder="" ng-disabled="essAccountId" style="border-color: #1ab394;" class="form-control" ng-model="feature.essintaAccountUid"> 134 <input type="text" placeholder="" ng-disabled="essAccountId" style="border-color: #1ab394;" class="form-control" ng-model="feature.essintaAccountUid">
135 </div> 135 </div>
136 </div> 136 </div>
137 </div> 137 </div>
138 <div class="col-lg-6"> 138 <div class="col-lg-6">
139 <div class="form-group" style="margin-top: 18px;"> 139 <div class="form-group" style="margin-top: 18px;">
140 <label class="control-label pull-left" style="color: #ffa149;line-height: 34px;">Additional Device Licences</label> 140 <label class="control-label pull-left" style="color: #ffa149;line-height: 34px;">Additional Device Licences</label>
141 <div class="col-lg-6"> 141 <div class="col-lg-6">
142 <input type="text" placeholder="" style="border-color: #ffa149 !important;" ng-model="feature.additionalLicences" class="form-control"> 142 <input type="text" placeholder="" style="border-color: #ffa149 !important;" ng-model="feature.additionalLicences" class="form-control">
143 </div> 143 </div>
144 </div> 144 </div>
145 </div> 145 </div>
146 </div> 146 </div>
147 147
148 </form> 148 </form>
149 </div> 149 </div>
150 </div> 150 </div>
151 </div> 151 </div>
152 </div> 152 </div>
153 </div> 153 </div>
154 </div> 154 </div>
app/views/updateFBODept/updateFBODept.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acuefuel') 4 angular.module('acuefuel')
5 5
6 .controller('updateFBODeptController', function($scope, $stateParams, UpdateAllFBODept, UpdateAllFBO, FBOFlight) { 6 .controller('updateFBODeptController', function($scope, $stateParams, UpdateAllFBODept, UpdateAllFBO, FBOFlight) {
7 $scope.showCompany = true; 7
8 $scope.editName = function(){
9 $scope.showCompany = false;
10
11 }
12 $scope.showPayments = true; 8 $scope.showPayments = true;
13 $scope.aircraft = {}; 9 $scope.aircraft = {};
14 $scope.updateData = {}; 10 $scope.updateData = {};
15 var userProfileID = $stateParams.id; 11 var userProfileID = $stateParams.id;
16 UpdateAllFBODept.getALlFBOData(userProfileID).then(function(result) { 12 UpdateAllFBODept.getALlFBOData(userProfileID).then(function(result) {
17 console.log(result) 13 console.log(result)
18 $scope.user = result; 14 $scope.user = result;
19 $scope.aircraft.accountId = result.account.id; 15 $scope.aircraft.accountId = result.account.id;
20 $scope.user.userTypeId = result.userType.id; 16 $scope.user.userTypeId = result.userType.id;
21 UpdateAllFBODept.getNotes(userProfileID).then(function(response) { 17 UpdateAllFBODept.getNotes(userProfileID).then(function(response) {
22 $scope.user.clientNote = response[0].notes 18 $scope.user.clientNote = response[0].notes
23 $scope.user.userNoteId = response[0].id; 19 $scope.user.userNoteId = response[0].id;
24 }) 20 })
25 // $scope.feature = result.accountFeatureControl; 21 // $scope.feature = result.accountFeatureControl;
26 // console.log($scope.feature,"dsdsdsds") 22 // console.log($scope.feature,"dsdsdsds")
27 if($scope.user.account.user.status == 'ACTIVE'){ 23 if($scope.user.account.user.status == 'ACTIVE'){
28 $scope.status = true; 24 $scope.status = true;
29 }else { 25 }else {
30 $scope.status = false; 26 $scope.status = false;
31 } 27 }
32 }) 28 })
33 29
34 getCrafts(); 30 getCrafts();
35 function getCrafts(){ 31 function getCrafts(){
36 UpdateAllFBODept.getAircrafts(userProfileID).then(function(response) { 32 UpdateAllFBODept.getAircrafts(userProfileID).then(function(response) {
37 $scope.getCraftList = response; 33 $scope.getCraftList = response;
38 }) 34 })
39 } 35 }
40 36
41 UpdateAllFBODept.getPaymentMethod(userProfileID).then(function(response) { 37 UpdateAllFBODept.getPaymentMethod(userProfileID).then(function(response) {
42 $scope.paymentList = response; 38 $scope.paymentList = response;
43 39
44 }) 40 })
45 41
46 $scope.openCard = function(payment){ 42 $scope.openCard = function(payment){
47 console.log(payment) 43 console.log(payment)
48 $scope.showPayments = false; 44 $scope.showPayments = false;
49 $scope.data = {}; 45 $scope.data = {};
50 $scope.data.cardNumber = payment.cardNumber; 46 $scope.data.cardNumber = payment.cardNumber;
51 $scope.data.cardType = payment.cardType; 47 $scope.data.cardType = payment.cardType;
52 $scope.data.expiryDate = payment.expiryDate; 48 $scope.data.expiryDate = payment.expiryDate;
53 $scope.data.id = payment.id; 49 $scope.data.id = payment.id;
54 $scope.data.accountId = payment.user.account.id; 50 $scope.data.accountId = payment.user.account.id;
55 } 51 }
56 52
57 var cardData = {} 53 var cardData = {}
58 cardData.paymentMethodList = []; 54 cardData.paymentMethodList = [];
59 $scope.updateCard = function(){ 55 $scope.updateCard = function(){
60 console.log($scope.data) 56 console.log($scope.data)
61 cardData.paymentMethodList.push($scope.data); 57 cardData.paymentMethodList.push($scope.data);
62 console.log("cardData", cardData); 58 console.log("cardData", cardData);
63 UpdateAllFBODept.updatePaymentMethod(cardData).then(function(result) { 59 UpdateAllFBODept.updatePaymentMethod(cardData).then(function(result) {
64 console.log(result) 60 console.log(result)
65 toastr.success('Updated Successfully', { 61 toastr.success('Updated Successfully', {
66 closeButton: true 62 closeButton: true
67 }) 63 })
68 $scope.reset(); 64 $scope.reset();
69 }) 65 })
70 } 66 }
71 67
72 68
73 $scope.reset = function(){ 69 $scope.reset = function(){
74 cardData.paymentMethodList = []; 70 cardData.paymentMethodList = [];
75 } 71 }
76 72
77 $scope.userData = function(){ 73 $scope.userData = function(){
78 console.log($scope.user.userTypeId) 74 console.log($scope.user.userTypeId)
79 if($scope.user.email == undefined || $scope.user.email == null){ 75 if($scope.user.email == undefined || $scope.user.email == null){
80 toastr.error('Please enter your email first', { 76 toastr.error('Please enter your email first', {
81 closeButton: true 77 closeButton: true
82 }) 78 })
83 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){ 79 }else if($scope.user.firstName == undefined || $scope.user.firstName == null){
84 toastr.error('Please enter your First Name', { 80 toastr.error('Please enter your First Name', {
85 closeButton: true 81 closeButton: true
86 }) 82 })
87 }else{ 83 }else{
88 if($scope.status == true){ 84 if($scope.status == true){
89 $scope.user.status = 'active'; 85 $scope.user.status = 'active';
90 }else{ 86 }else{
91 $scope.user.status = 'inactive'; 87 $scope.user.status = 'inactive';
92 } 88 }
93 $scope.user.username = $scope.user.email; 89 $scope.user.username = $scope.user.email;
94 $scope.user.userType = 'flightDetp'; 90 $scope.user.userType = 'flightDetp';
95 console.log($scope.user) 91 console.log($scope.user)
96 // if($scope.user.userNoteId == undefined){ 92 // if($scope.user.userNoteId == undefined){
97 // $scope.user.userNoteId = null; 93 // $scope.user.userNoteId = null;
98 // } 94 // }
99 var updateData = "companyName=" + $scope.user.companyName + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&userNote=" + $scope.user.clientNote + "&userNoteId=" + $scope.user.userNoteId + "&userTypeId=" + $scope.user.userTypeId + "&userProfileId=" + userProfileID; 95 var updateData = "companyName=" + $scope.user.companyName + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&userNote=" + $scope.user.clientNote + "&userNoteId=" + $scope.user.userNoteId + "&userTypeId=" + $scope.user.userTypeId + "&userProfileId=" + userProfileID;
100 UpdateAllFBO.updateUser(updateData).then(function(result) { 96 UpdateAllFBO.updateUser(updateData).then(function(result) {
101 toastr.success(''+result.success+'', { 97 toastr.success(''+result.success+'', {
102 closeButton: true 98 closeButton: true
103 }) 99 })
104 }) 100 })
105 } 101 }
106 } 102 }
107 103
108 getData(); 104 getData();
109 function getData(){ 105 function getData(){
110 FBOFlight.getAircraftMake().then(function(result) { 106 FBOFlight.getAircraftMake().then(function(result) {
111 $scope.aircraftMakeList = result; 107 $scope.aircraftMakeList = result;
112 $scope.aircraft.make = $scope.aircraftMakeList[0]; 108 $scope.aircraft.make = $scope.aircraftMakeList[0];
113 FBOFlight.getModal($scope.aircraft.make).then(function(result) { 109 FBOFlight.getModal($scope.aircraft.make).then(function(result) {
114 $scope.aircraftModalList = result; 110 $scope.aircraftModalList = result;
115 $scope.aircraft.model = $scope.aircraftModalList[0]; 111 $scope.aircraft.model = $scope.aircraftModalList[0];
116 112
117 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) { 113 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) {
118 $scope.aircraftSizeList = result; 114 $scope.aircraftSizeList = result;
119 $scope.aircraft.size = $scope.aircraftSizeList[0]; 115 $scope.aircraft.size = $scope.aircraftSizeList[0];
120 116
121 }) 117 })
122 }) 118 })
123 119
124 }) 120 })
125 } 121 }
126 122
127 $scope.getModal = function(){ 123 $scope.getModal = function(){
128 var makeId = $scope.aircraft.make 124 var makeId = $scope.aircraft.make
129 FBOFlight.getModal(makeId).then(function(result) { 125 FBOFlight.getModal(makeId).then(function(result) {
130 $scope.aircraftModalList = result; 126 $scope.aircraftModalList = result;
131 $scope.aircraft.model = $scope.aircraftModalList[0]; 127 $scope.aircraft.model = $scope.aircraftModalList[0];
132 128
133 FBOFlight.getAircraftSize(makeId, $scope.aircraft.model).then(function(result) { 129 FBOFlight.getAircraftSize(makeId, $scope.aircraft.model).then(function(result) {
134 $scope.aircraftSizeList = result; 130 $scope.aircraftSizeList = result;
135 $scope.aircraft.size = $scope.aircraftSizeList[0]; 131 $scope.aircraft.size = $scope.aircraftSizeList[0];
136 }) 132 })
137 }) 133 })
138 } 134 }
139 135
140 $scope.getSize = function(){ 136 $scope.getSize = function(){
141 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) { 137 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) {
142 $scope.aircraftSizeList = result; 138 $scope.aircraftSizeList = result;
143 $scope.aircraft.size = $scope.aircraftSizeList[0]; 139 $scope.aircraft.size = $scope.aircraftSizeList[0];
144 }) 140 })
145 } 141 }
146 142
147 $scope.aircraftData = {}; 143 $scope.aircraftData = {};
148 $scope.aircraftData.aircraftList = []; 144 $scope.aircraftData.aircraftList = [];
149 $scope.addAircraft = function(){ 145 $scope.addAircraft = function(){
150 $scope.aircraftData.aircraftList.push($scope.aircraft); 146 $scope.aircraftData.aircraftList.push($scope.aircraft);
151 147
152 FBOFlight.addAircraft($scope.aircraftData).then(function(result) { 148 FBOFlight.addAircraft($scope.aircraftData).then(function(result) {
153 $('#myModal4').modal('hide'); 149 $('#myModal4').modal('hide');
154 getCrafts(); 150 getCrafts();
155 $scope.resetData(); 151 $scope.resetData();
156 toastr.success('Created Successfully', { 152 toastr.success('Created Successfully', {
157 closeButton: true 153 closeButton: true
158 }) 154 })
159 }, function (err) { 155 }, function (err) {
160 toastr.error('Error in Adding Aircraft', { 156 toastr.error('Error in Adding Aircraft', {
161 closeButton: true 157 closeButton: true
162 }) 158 })
163 $('#myModal4').modal('hide'); 159 $('#myModal4').modal('hide');
164 $scope.getCraftList.splice($scope.aircraft); 160 $scope.getCraftList.splice($scope.aircraft);
165 }); 161 });
166 } 162 }
167 163
168 $scope.closeModal = function(){ 164 $scope.closeModal = function(){
169 $("#myModal5").modal('hide'); 165 $("#myModal5").modal('hide');
170 $scope.resetData(); 166 $scope.resetData();
171 } 167 }
172 168
173 $scope.update = function(airdata){ 169 $scope.update = function(airdata){
174 $("#myModal5").modal('show'); 170 $("#myModal5").modal('show');
175 $scope.aircraft = airdata; 171 $scope.aircraft = airdata;
176 console.log($scope.aircraft) 172 console.log($scope.aircraft)
177 $scope.aircraft.accountId = $scope.user.account.id; 173 $scope.aircraft.accountId = $scope.user.account.id;
178 174
179 FBOFlight.getModal($scope.aircraft.make).then(function(result) { 175 FBOFlight.getModal($scope.aircraft.make).then(function(result) {
180 $scope.aircraftModalList = result; 176 $scope.aircraftModalList = result;
181 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) { 177 FBOFlight.getAircraftSize($scope.aircraft.make, $scope.aircraft.model).then(function(result) {
182 $scope.aircraftSizeList = result; 178 $scope.aircraftSizeList = result;
183 179
184 }) 180 })
185 }) 181 })
186 } 182 }
187 183
188 $scope.updatecraftData = {}; 184 $scope.updatecraftData = {};
189 $scope.updatecraftData.aircraftList = []; 185 $scope.updatecraftData.aircraftList = [];
190 $scope.updateAircraftData = {}; 186 $scope.updateAircraftData = {};
191 187
192 $scope.updateAircraft = function(updateAircraft){ 188 $scope.updateAircraft = function(updateAircraft){
193 $scope.updateAircraftData.id = updateAircraft.id; 189 $scope.updateAircraftData.id = updateAircraft.id;
194 $scope.updateAircraftData.make = updateAircraft.make; 190 $scope.updateAircraftData.make = updateAircraft.make;
195 $scope.updateAircraftData.model = updateAircraft.model; 191 $scope.updateAircraftData.model = updateAircraft.model;
196 $scope.updateAircraftData.size = updateAircraft.size; 192 $scope.updateAircraftData.size = updateAircraft.size;
197 $scope.updateAircraftData.tail = updateAircraft.tail; 193 $scope.updateAircraftData.tail = updateAircraft.tail;
198 $scope.updateAircraftData.accountId = updateAircraft.accountId; 194 $scope.updateAircraftData.accountId = updateAircraft.accountId;
199 console.log($scope.updateAircraftData) 195 console.log($scope.updateAircraftData)
200 196
201 $scope.updatecraftData.aircraftList.push($scope.updateAircraftData); 197 $scope.updatecraftData.aircraftList.push($scope.updateAircraftData);
202 console.log($scope.updatecraftData.aircraftList) 198 console.log($scope.updatecraftData.aircraftList)
203 199
204 UpdateAllFBODept.updateAircraft($scope.updatecraftData).then(function(result) { 200 UpdateAllFBODept.updateAircraft($scope.updatecraftData).then(function(result) {
205 $('#myModal5').modal('hide'); 201 $('#myModal5').modal('hide');
206 $scope.resetData(); 202 $scope.resetData();
207 toastr.success('Updated Successfully', { 203 toastr.success('Updated Successfully', {
208 closeButton: true 204 closeButton: true
209 }) 205 })
210 }, function (err) { 206 }, function (err) {
211 toastr.error('Error in Updating Aircraft', { 207 toastr.error('Error in Updating Aircraft', {
212 closeButton: true 208 closeButton: true
213 }) 209 })
214 $('#myModal5').modal('hide'); 210 $('#myModal5').modal('hide');
215 $scope.getCraftList.splice($scope.aircraft); 211 $scope.getCraftList.splice($scope.aircraft);
216 }); 212 });
217 } 213 }
218 214
219 $scope.remove = function(data){ 215 $scope.remove = function(data){
220 console.log(data) 216 console.log(data)
221 UpdateAllFBODept.removeAircraft(data.id).then(function(result) { 217 UpdateAllFBODept.removeAircraft(data.id).then(function(result) {
222 toastr.success(''+result.success+'', { 218 toastr.success(''+result.success+'', {
223 closeButton: true 219 closeButton: true
224 }) 220 })
225 getCrafts(); 221 getCrafts();
226 }) 222 })
227 } 223 }
228 224
229 $scope.resetData = function() { 225 $scope.resetData = function() {
230 $scope.aircraft = {}; 226 $scope.aircraft = {};
231 $scope.aircraft.accountId = $scope.user.account.id; 227 $scope.aircraft.accountId = $scope.user.account.id;
232 $scope.aircraftData.aircraftList = []; 228 $scope.aircraftData.aircraftList = [];
233 getData(); 229 getData();
234 } 230 }
235 231
236 }); 232 });
app/views/updateFBODept/updateFBODept.html
1 1
2 <div class="row wrapper border-bottom white-bg page-heading"> 2 <div class="row wrapper border-bottom white-bg page-heading">
3 <div class="col-lg-3"> 3 <div class="col-lg-3">
4 <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">{{user.companyName}}</h2> 4 <!-- <h2 ng-click="editName()" ng-show="showCompany" style="cursor: pointer;">{{user.companyName}}</h2> -->
5 <div style="margin-top: 20px;" ng-hide="showCompany"><input type="text" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div> 5 <div style="margin-top: 20px;"><input type="text" placeholder="Enter Company Name" ng-model="user.companyName" class="form-control"></div>
6 </div> 6 </div>
7 <div class="col-lg-3" style="margin-top: 20px;"> 7 <div class="col-lg-3" style="margin-top: 20px;">
8 <button type="button" class="btn btn-w-m btn-danger" ng-click="deleteData()">Delete Account</button> 8 <button type="button" class="btn btn-w-m btn-danger" ng-click="deleteData()">Delete Account</button>
9 </div> 9 </div>
10 <div class="col-lg-6" style="margin-top: 20px; text-align: right;"> 10 <div class="col-lg-6" style="margin-top: 20px; text-align: right;">
11 <button type="button" class="btn btn-default btn-sm" ui-sref="index.flightDept">Cancel</button> 11 <button type="button" class="btn btn-default btn-sm" ui-sref="index.flightDept">Cancel</button>
12 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button> 12 <button type="button" class="btn btn-primary btn-sm" ng-click="userData()">Save Changes</button>
13 </div> 13 </div>
14 </div> 14 </div>
15 <div class="wrapper wrapper-content animated fadeInRight"> 15 <div class="wrapper wrapper-content animated fadeInRight">
16 <div class="row"> 16 <div class="row">
17 <div class="col-lg-7"> 17 <div class="col-lg-7">
18 <div class="ibox float-e-margins"> 18 <div class="ibox float-e-margins">
19 <div class="ibox-title"> 19 <div class="ibox-title">
20 <div class="pull-left"> 20 <div class="pull-left">
21 <h5>Contact Information</h5> 21 <h5>Contact Information</h5>
22 </div> 22 </div>
23 <div class="pull-right my-toggle-switch"> 23 <div class="pull-right my-toggle-switch">
24 <div class="switch"> 24 <div class="switch">
25 <div class="onoffswitch"> 25 <div class="onoffswitch">
26 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1"> 26 <input type="checkbox" ng-checked="status === true" ng-model="status" ng-init="status = true" class="onoffswitch-checkbox" id="example1">
27 <label class="onoffswitch-label" for="example1"> 27 <label class="onoffswitch-label" for="example1">
28 <span class="onoffswitch-inner"></span> 28 <span class="onoffswitch-inner"></span>
29 <span class="onoffswitch-switch"></span> 29 <span class="onoffswitch-switch"></span>
30 </label> 30 </label>
31 </div> 31 </div>
32 </div> 32 </div>
33 </div> 33 </div>
34 <div class="clearfix"></div> 34 <div class="clearfix"></div>
35 </div> 35 </div>
36 <div class="ibox-content"> 36 <div class="ibox-content">
37 <div class="row"> 37 <div class="row">
38 <form role="form"> 38 <form role="form">
39 <div class="col-sm-6 b-r"> 39 <div class="col-sm-6 b-r">
40 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> --> 40 <!-- <div class="form-group"><label>Company Name</label> <input type="text" placeholder="Company Name" ng-model="user.companyName" class="form-control"></div> -->
41 <!-- <div class="form-group"><label>Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> --> 41 <!-- <div class="form-group"><label>Email Username</label> <input type="email" placeholder="Email Username" ng-model="user.email" class="form-control"></div> -->
42 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div> 42 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="user.firstName" class="form-control"></div>
43 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div> 43 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="user.lastName" class="form-control"></div>
44 <!-- <div> 44 <!-- <div>
45 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button> 45 <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>Log in</strong></button>
46 <label> <input type="checkbox" class="i-checks"> Remember me </label> 46 <label> <input type="checkbox" class="i-checks"> Remember me </label>
47 </div> --> 47 </div> -->
48 48
49 </div> 49 </div>
50 <div class="col-sm-6"> 50 <div class="col-sm-6">
51 <!-- <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> --> 51 <!-- <div class="form-group"><label>Password</label> <input type="password" ng-model="user.password" placeholder="Password" class="form-control"></div> -->
52 <div class="form-group"><label>Phone</label> <input type="tel" ng-model="user.phone" placeholder="Phone" class="form-control"></div> 52 <div class="form-group"><label>Phone</label> <input type="tel" ng-model="user.phone" placeholder="Phone" class="form-control"></div>
53 <div class="form-group"><label>Mobile</label> <input type="tel" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div> 53 <div class="form-group"><label>Mobile</label> <input type="tel" ng-model="user.mobile" placeholder="Mobile" class="form-control"></div>
54 </div> 54 </div>
55 </form> 55 </form>
56 </div> 56 </div>
57 </div> 57 </div>
58 </div> 58 </div>
59 </div> 59 </div>
60 <div class="col-lg-5"> 60 <div class="col-lg-5">
61 <div class="ibox float-e-margins"> 61 <div class="ibox float-e-margins">
62 <div class="ibox-title"> 62 <div class="ibox-title">
63 <h5>Client Notes</h5> 63 <h5>Client Notes</h5>
64 64
65 </div> 65 </div>
66 <div class="ibox-content"> 66 <div class="ibox-content">
67 <div class="row"> 67 <div class="row">
68 <form role="form"> 68 <form role="form">
69 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea> 69 <textarea class="form-control" rows="10" ng-model="user.clientNote" id="comment"></textarea>
70 </form> 70 </form>
71 </div> 71 </div>
72 </div> 72 </div>
73 73
74 </div> 74 </div>
75 </div> 75 </div>
76 </div> 76 </div>
77 </div> 77 </div>
78 78
79 <div> 79 <div>
80 <div class="row"> 80 <div class="row">
81 <div class="col-lg-7"> 81 <div class="col-lg-7">
82 <div class="ibox float-e-margins"> 82 <div class="ibox float-e-margins">
83 <div class="ibox-title"> 83 <div class="ibox-title">
84 <div> 84 <div>
85 <h3 style="float: left;">Aircraft List</h3> 85 <h3 style="float: left;">Aircraft List</h3>
86 </div> 86 </div>
87 <div class="pull-right"> 87 <div class="pull-right">
88 <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal4">+ Add</button> 88 <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal4">+ Add</button>
89 </div> 89 </div>
90 <div class="clearfix"></div> 90 <div class="clearfix"></div>
91 <div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true"> 91 <div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true">
92 <div class="modal-dialog"> 92 <div class="modal-dialog">
93 <div class="modal-content animated fadeIn"> 93 <div class="modal-content animated fadeIn">
94 <div class="modal-header"> 94 <div class="modal-header">
95 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> 95 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
96 <!-- <i class="fa fa-clock-o modal-icon"></i> --> 96 <!-- <i class="fa fa-clock-o modal-icon"></i> -->
97 <h4 class="modal-title">Add Aircraft</h4> 97 <h4 class="modal-title">Add Aircraft</h4>
98 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> --> 98 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> -->
99 </div> 99 </div>
100 <div class="modal-body" style="padding: 15px;"> 100 <div class="modal-body" style="padding: 15px;">
101 <table class="table table-bordered table-hover table-striped"> 101 <table class="table table-bordered table-hover table-striped">
102 <thead> 102 <thead>
103 <tr> 103 <tr>
104 <th>Tail</th> 104 <th>Tail</th>
105 <th>Make</th> 105 <th>Make</th>
106 <th>Model</th> 106 <th>Model</th>
107 <th>Size</th> 107 <th>Size</th>
108 </tr> 108 </tr>
109 </thead> 109 </thead>
110 <tbody> 110 <tbody>
111 <tr> 111 <tr>
112 <td> 112 <td>
113 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> 113 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control">
114 </td> 114 </td>
115 <td style="width: 30%"> 115 <td style="width: 30%">
116 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> 116 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()">
117 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 117 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
118 </select> 118 </select>
119 </td> 119 </td>
120 <td style="width: 30%"> 120 <td style="width: 30%">
121 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> 121 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()">
122 <option ng-repeat="model in aircraftModalList">{{model}}</option> 122 <option ng-repeat="model in aircraftModalList">{{model}}</option>
123 </select> 123 </select>
124 </td> 124 </td>
125 <td style="width: 30%"> 125 <td style="width: 30%">
126 <select class="form-control" ng-model="aircraft.size"> 126 <select class="form-control" ng-model="aircraft.size">
127 <option ng-repeat="size in aircraftSizeList">{{size}}</option> 127 <option ng-repeat="size in aircraftSizeList">{{size}}</option>
128 </select> 128 </select>
129 </td> 129 </td>
130 </tr> 130 </tr>
131 </tbody> 131 </tbody>
132 </table> 132 </table>
133 </div> 133 </div>
134 <div class="modal-footer"> 134 <div class="modal-footer">
135 <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> 135 <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
136 <button type="button" class="btn btn-primary" ng-click="addAircraft()">Save changes</button> 136 <button type="button" class="btn btn-primary" ng-click="addAircraft()">Save changes</button>
137 </div> 137 </div>
138 </div> 138 </div>
139 </div> 139 </div>
140 </div> 140 </div>
141 </div> 141 </div>
142 <div class="ibox-content"> 142 <div class="ibox-content">
143 <div class="table-responsive"> 143 <div class="table-responsive">
144 <table class="table table-bordered table-hover table-striped"> 144 <table class="table table-bordered table-hover table-striped">
145 <thead> 145 <thead>
146 <tr> 146 <tr>
147 <th>Tail</th> 147 <th>Tail</th>
148 <th>Make</th> 148 <th>Make</th>
149 <th>Model</th> 149 <th>Model</th>
150 <th>Size</th> 150 <th>Size</th>
151 <th>Actions</th> 151 <th>Actions</th>
152 </tr> 152 </tr>
153 </thead> 153 </thead>
154 <tbody> 154 <tbody>
155 <tr ng-repeat="airData in getCraftList track by $index"> 155 <tr ng-repeat="airData in getCraftList track by $index">
156 <td> 156 <td>
157 <input type="text" style="width:100px;" ng-model="airData.tail" class="form-control"> 157 <input type="text" style="width:100px;" ng-model="airData.tail" class="form-control">
158 </td> 158 </td>
159 <td> 159 <td>
160 <select class="form-control" ng-model="airData.make"> 160 <select class="form-control" ng-model="airData.make">
161 <option>{{airData.make}}</option> 161 <option>{{airData.make}}</option>
162 </select> 162 </select>
163 </td> 163 </td>
164 <td> 164 <td>
165 <select class="form-control" ng-model="airData.model"> 165 <select class="form-control" ng-model="airData.model">
166 <option>{{airData.model}}</option> 166 <option>{{airData.model}}</option>
167 </select> 167 </select>
168 </td> 168 </td>
169 <td> 169 <td>
170 <select class="form-control" ng-model="airData.size"> 170 <select class="form-control" ng-model="airData.size">
171 <option>{{airData.size}}</option> 171 <option>{{airData.size}}</option>
172 </select> 172 </select>
173 </td> 173 </td>
174 <td> 174 <td>
175 <i style="margin-top: 10px;" class="fa fa-pencil" ng-click="update(airData)"></i>&nbsp; 175 <i style="margin-top: 10px;" class="fa fa-pencil" ng-click="update(airData)"></i>&nbsp;
176 <i class="fa fa-trash" ng-click="remove(airData)"></i> 176 <i class="fa fa-trash" ng-click="remove(airData)"></i>
177 </td> 177 </td>
178 </tr> 178 </tr>
179 </tbody> 179 </tbody>
180 </table> 180 </table>
181 </div> 181 </div>
182 <div class="clearfix"></div> 182 <div class="clearfix"></div>
183 </div> 183 </div>
184 </div> 184 </div>
185 </div> 185 </div>
186 <div class="modal inmodal" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true"> 186 <div class="modal inmodal" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
187 <div class="modal-dialog"> 187 <div class="modal-dialog">
188 <div class="modal-content animated fadeIn"> 188 <div class="modal-content animated fadeIn">
189 <div class="modal-header"> 189 <div class="modal-header">
190 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> 190 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
191 <!-- <i class="fa fa-clock-o modal-icon"></i> --> 191 <!-- <i class="fa fa-clock-o modal-icon"></i> -->
192 <h4 class="modal-title">Update Aircraft</h4> 192 <h4 class="modal-title">Update Aircraft</h4>
193 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> --> 193 <!-- <small>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small> -->
194 </div> 194 </div>
195 <div class="modal-body" style="padding: 15px;"> 195 <div class="modal-body" style="padding: 15px;">
196 <table class="table table-bordered table-hover table-striped"> 196 <table class="table table-bordered table-hover table-striped">
197 <thead> 197 <thead>
198 <tr> 198 <tr>
199 <th>Tail</th> 199 <th>Tail</th>
200 <th>Make</th> 200 <th>Make</th>
201 <th>Model</th> 201 <th>Model</th>
202 <th>Size</th> 202 <th>Size</th>
203 </tr> 203 </tr>
204 </thead> 204 </thead>
205 <tbody> 205 <tbody>
206 <tr> 206 <tr>
207 <td> 207 <td>
208 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> 208 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control">
209 </td> 209 </td>
210 <td style="width: 30%"> 210 <td style="width: 30%">
211 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> 211 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()">
212 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 212 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
213 </select> 213 </select>
214 </td> 214 </td>
215 <td style="width: 30%"> 215 <td style="width: 30%">
216 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> 216 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()">
217 <option ng-repeat="model in aircraftModalList">{{model}}</option> 217 <option ng-repeat="model in aircraftModalList">{{model}}</option>
218 </select> 218 </select>
219 </td> 219 </td>
220 <td style="width: 30%"> 220 <td style="width: 30%">
221 <select class="form-control" ng-model="aircraft.size"> 221 <select class="form-control" ng-model="aircraft.size">
222 <option ng-repeat="size in aircraftSizeList">{{size}}</option> 222 <option ng-repeat="size in aircraftSizeList">{{size}}</option>
223 </select> 223 </select>
224 </td> 224 </td>
225 </tr> 225 </tr>
226 </tbody> 226 </tbody>
227 </table> 227 </table>
228 </div> 228 </div>
229 <div class="modal-footer"> 229 <div class="modal-footer">
230 <button type="button" class="btn btn-white" ng-click="closeModal()">Close</button> 230 <button type="button" class="btn btn-white" ng-click="closeModal()">Close</button>
231 <button type="button" class="btn btn-primary" ng-click="updateAircraft(aircraft)">Save changes</button> 231 <button type="button" class="btn btn-primary" ng-click="updateAircraft(aircraft)">Save changes</button>
232 </div> 232 </div>
233 </div> 233 </div>
234 </div> 234 </div>
235 </div> 235 </div>
236 <div class="col-lg-5"> 236 <div class="col-lg-5">
237 <div class="ibox float-e-margins"> 237 <div class="ibox float-e-margins">
238 <div class="ibox-title"> 238 <div class="ibox-title">
239 <h5>Account Authenticatio & Payment Method</h5> 239 <h5>Account Authenticatio & Payment Method</h5>
240 240
241 </div> 241 </div>
242 <div class="ibox-content"> 242 <div class="ibox-content">
243 <div class="row" ng-repeat="payment in paymentList" ng-click="openCard(payment)" style="cursor: pointer;" ng-show="showPayments"> 243 <div class="row" ng-repeat="payment in paymentList" ng-click="openCard(payment)" style="cursor: pointer;" ng-show="showPayments">
244 <div class="col-md-3"> 244 <div class="col-md-3">
245 <img src="images/master.png"> 245 <img src="images/master.png">
246 </div> 246 </div>
247 <div class="col-md-9"> 247 <div class="col-md-9">
248 <div class="col"> 248 <div class="col">
249 <span style="font-size: large; color: #909394;">**** **** **** {{payment.cardNumber | limitTo: -4}}</span> 249 <span style="font-size: large; color: #909394;">**** **** **** {{payment.cardNumber | limitTo: -4}}</span>
250 </div> 250 </div>
251 <div class="col"> 251 <div class="col">
252 <span><strong>Expiry Date: </strong>{{payment.expiryDate}}</span> 252 <span><strong>Expiry Date: </strong>{{payment.expiryDate}}</span>
253 </div> 253 </div>
254 </div> 254 </div>
255 <div class="clearfix"></div> 255 <div class="clearfix"></div>
256 <!-- <br> 256 <!-- <br>
257 257
258 <div class="col-md-3"> 258 <div class="col-md-3">
259 <img src="images/visa1.png"> 259 <img src="images/visa1.png">
260 </div> 260 </div>
261 <div class="col-md-9"> 261 <div class="col-md-9">
262 <div class="col"> 262 <div class="col">
263 <span style="font-size: large; color: #909394;">**** **** **** 1060</span> 263 <span style="font-size: large; color: #909394;">**** **** **** 1060</span>
264 </div> 264 </div>
265 <div class="col"> 265 <div class="col">
266 <span><strong>Expiry Date:</strong>10/16</span> 266 <span><strong>Expiry Date:</strong>10/16</span>
267 </div> 267 </div>
268 </div> 268 </div>
269 <div class="clearfix"></div> --> 269 <div class="clearfix"></div> -->
270 </div> 270 </div>
271 <div class="row" ng-hide="showPayments"> 271 <div class="row" ng-hide="showPayments">
272 <div class="container"> 272 <div class="container">
273 <div class="row"> 273 <div class="row">
274 <div class="col-xs-12 col-md-4"> 274 <div class="col-xs-12 col-md-4">
275 <div class="panel panel-default credit-card-box"> 275 <div class="panel panel-default credit-card-box">
276 <div class="panel-heading display-table" > 276 <div class="panel-heading display-table" >
277 <div class="row display-tr" > 277 <div class="row display-tr" >
278 <h3 class="panel-title display-td" >Payment Details</h3> 278 <h3 class="panel-title display-td" >Payment Details</h3>
279 <div class="display-td" > 279 <div class="display-td" >
280 <img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png"> 280 <img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png">
281 </div> 281 </div>
282 </div> 282 </div>
283 </div> 283 </div>
284 <div class="panel-body"> 284 <div class="panel-body">
285 <form role="form" id="payment-form"> 285 <form role="form" id="payment-form">
286 <div class="row"> 286 <div class="row">
287 <div class="col-xs-12"> 287 <div class="col-xs-12">
288 <div class="form-group"> 288 <div class="form-group">
289 <label for="cardNumber">CARD NUMBER</label> 289 <label for="cardNumber">CARD NUMBER</label>
290 <div class="input-group"> 290 <div class="input-group">
291 <input type="tel" ng-model="data.cardNumber" maxlength="16" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardNumber" placeholder="Valid Card Number" autocomplete="cc-number" required autofocus> 291 <input type="tel" ng-model="data.cardNumber" maxlength="16" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardNumber" placeholder="Valid Card Number" autocomplete="cc-number" required autofocus>
292 <span class="input-group-addon"><i class="fa fa-credit-card"></i></span> 292 <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
293 </div> 293 </div>
294 </div> 294 </div>
295 </div> 295 </div>
296 </div> 296 </div>
297 <div class="row"> 297 <div class="row">
298 <div class="col-xs-7 col-md-7"> 298 <div class="col-xs-7 col-md-7">
299 <div class="form-group"> 299 <div class="form-group">
300 <label for="cardExpiry"><span class="hidden-xs">EXPIRATION</span><span class="visible-xs-inline">EXP</span> DATE</label> 300 <label for="cardExpiry"><span class="hidden-xs">EXPIRATION</span><span class="visible-xs-inline">EXP</span> DATE</label>
301 <input type="text" ng-model="data.expiryDate" class="form-control" name="cardExpiry" placeholder="MM / YY" autocomplete="cc-exp" 301 <input type="text" ng-model="data.expiryDate" class="form-control" name="cardExpiry" placeholder="MM / YY" autocomplete="cc-exp"
302 required> 302 required>
303 </div> 303 </div>
304 </div> 304 </div>
305 <div class="col-xs-5 col-md-5 pull-right"> 305 <div class="col-xs-5 col-md-5 pull-right">
306 <div class="form-group"> 306 <div class="form-group">
307 <label for="cardCVC">CVV CODE</label> 307 <label for="cardCVC">CVV CODE</label>
308 <input type="number" maxlength="3" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardCVC" placeholder="CVC" autocomplete="cc-csc" 308 <input type="number" maxlength="3" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" class="form-control" name="cardCVC" placeholder="CVC" autocomplete="cc-csc"
309 required> 309 required>
310 </div> 310 </div>
311 </div> 311 </div>
312 </div> 312 </div>
313 <div class="row"> 313 <div class="row">
314 <div class="col-xs-12"> 314 <div class="col-xs-12">
315 <div class="form-group"> 315 <div class="form-group">
316 <label for="name">Card Type</label> 316 <label for="name">Card Type</label>
317 <select class="form-control m-b" name="account" ng-model="data.cardType" style="margin-bottom: 0;"> 317 <select class="form-control m-b" name="account" ng-model="data.cardType" style="margin-bottom: 0;">
318 <option value="creditCard" selected>Credit Card</option> 318 <option value="creditCard" selected>Credit Card</option>
319 <option value="debitCard">Debit Card</option> 319 <option value="debitCard">Debit Card</option>
320 </select> 320 </select>
321 </div> 321 </div>
322 </div> 322 </div>
323 </div> 323 </div>
324 <div class="row"> 324 <div class="row">
325 <div class="col-xs-12"> 325 <div class="col-xs-12">
326 <button class="btn btn-success btn-lg btn-block" type="submit" ng-click="updateCard()">Update Card</button> 326 <button class="btn btn-success btn-lg btn-block" type="submit" ng-click="updateCard()">Update Card</button>
327 </div> 327 </div>
328 </div> 328 </div>
329 <div class="row" style="display:none;"> 329 <div class="row" style="display:none;">
330 <div class="col-xs-12"> 330 <div class="col-xs-12">
331 <p class="payment-errors"></p> 331 <p class="payment-errors"></p>
332 </div> 332 </div>
333 </div> 333 </div>
334 </form> 334 </form>
335 </div> 335 </div>
336 </div> 336 </div>
337 </div> 337 </div>
338 </div> 338 </div>
339 </div> 339 </div>
340 </div> 340 </div>
341 </div> 341 </div>
342 </div> 342 </div>
343 </div> 343 </div>
344 </div> 344 </div>
345 </div> 345 </div>
346 </div> 346 </div>
347 <script type="text/javascript" src="https://js.stripe.com/v2/"></script> 347 <script type="text/javascript" src="https://js.stripe.com/v2/"></script>