Commit 87660da6c92cf73436909d8a3fe2f15343d4fe50
1 parent
91d8ce8f46
Exists in
master
testing
Showing
2 changed files
with
22 additions
and
18 deletions
Show diff stats
app/partials/customers/customers.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | //Load controller | 3 | //Load controller |
4 | angular.module('acufuel') | 4 | angular.module('acufuel') |
5 | .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]); | 5 | .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]); |
6 | 6 | ||
7 | function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) { | 7 | function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) { |
8 | $(document).ready(function() { | 8 | $(document).ready(function() { |
9 | // $('#example').DataTable(); | 9 | // $('#example').DataTable(); |
10 | }); | 10 | }); |
11 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | 11 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) |
12 | $scope.reset2 = function() { | 12 | $scope.reset2 = function() { |
13 | $("input").val(""); | 13 | $("input").val(""); |
14 | $scope.removeMarginValidation(); | 14 | $scope.removeMarginValidation(); |
15 | } | 15 | } |
16 | 16 | ||
17 | $scope.order = {}; | 17 | $scope.order = {}; |
18 | $scope.order.upliftDate = ''; | 18 | $scope.order.upliftDate = ''; |
19 | $scope.data = {}; | 19 | $scope.data = {}; |
20 | $scope.aircraft = {}; | 20 | $scope.aircraft = {}; |
21 | $scope.data.activate = true; | 21 | $scope.data.activate = true; |
22 | $scope.showLoader = true; | 22 | $scope.showLoader = true; |
23 | $scope.jetShow = []; | 23 | $scope.jetShow = []; |
24 | $scope.marginShow = []; | 24 | $scope.marginShow = []; |
25 | 25 | ||
26 | $scope.jetShow[0] = true; | 26 | $scope.jetShow[0] = true; |
27 | $scope.marginShow[0] = true; | 27 | $scope.marginShow[0] = true; |
28 | $scope.dispatchOrder = {}; | 28 | $scope.dispatchOrder = {}; |
29 | $scope.dispatchOrder.fuelOrderList = []; | 29 | $scope.dispatchOrder.fuelOrderList = []; |
30 | $scope.statusFilterOptions = []; | 30 | $scope.statusFilterOptions = []; |
31 | $scope.companyList = {}; | 31 | $scope.companyList = {}; |
32 | $scope.statusFilterOptions.push({ | 32 | $scope.statusFilterOptions.push({ |
33 | 'id' : '', | 33 | 'id' : '', |
34 | 'title' : 'Show All' | 34 | 'title' : 'Show All' |
35 | }, { | 35 | }, { |
36 | 'id' : 'pending', | 36 | 'id' : 'pending', |
37 | 'title' : 'Pending' | 37 | 'title' : 'Pending' |
38 | }, { | 38 | }, { |
39 | 'id' : 'invoiced', | 39 | 'id' : 'invoiced', |
40 | 'title' : 'Invoiced' | 40 | 'title' : 'Invoiced' |
41 | }, { | 41 | }, { |
42 | 'id' : 'paid', | 42 | 'id' : 'paid', |
43 | 'title' : 'Paid' | 43 | 'title' : 'Paid' |
44 | }, { | 44 | }, { |
45 | 'id' : 'cancelled', | 45 | 'id' : 'cancelled', |
46 | 'title' : 'Cancelled' | 46 | 'title' : 'Cancelled' |
47 | }, { | 47 | }, { |
48 | 'id' : 'archived', | 48 | 'id' : 'archived', |
49 | 'title' : 'Archived' | 49 | 'title' : 'Archived' |
50 | } | 50 | } |
51 | 51 | ||
52 | ); | 52 | ); |
53 | 53 | ||
54 | getAllCompanies(); | 54 | getAllCompanies(); |
55 | 55 | ||
56 | /*function getAllCompanies(){ | 56 | /*function getAllCompanies(){ |
57 | CustomersService.getAllCompanies().then(function(result) { | 57 | CustomersService.getAllCompanies().then(function(result) { |
58 | $scope.companyList = result; | 58 | $scope.companyList = result; |
59 | for(var i=0; i<$scope.companyList.length; i++){ | 59 | for(var i=0; i<$scope.companyList.length; i++){ |
60 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 60 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
61 | } | 61 | } |
62 | }) | 62 | }) |
63 | 63 | ||
64 | }*/ | 64 | }*/ |
65 | 65 | ||
66 | $scope.statusFilter = [ | 66 | $scope.statusFilter = [ |
67 | { | 67 | { |
68 | id : "", | 68 | id : "", |
69 | title : "Show All" | 69 | title : "Show All" |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | id : "true", | 72 | id : "true", |
73 | title : "Active" | 73 | title : "Active" |
74 | }, | 74 | }, |
75 | { | 75 | { |
76 | id : "false", | 76 | id : "false", |
77 | title : "Inactive" | 77 | title : "Inactive" |
78 | } | 78 | } |
79 | ] | 79 | ] |
80 | 80 | ||
81 | function getAllCompanies() { | 81 | function getAllCompanies() { |
82 | CustomersService.getAllCompanies().then(function(result) { | 82 | CustomersService.getAllCompanies().then(function(result) { |
83 | //console.log('log', result); | 83 | console.log('company list', result); |
84 | $scope.companyList = result; | 84 | $scope.companyList = result; |
85 | for (var i = 0; i < $scope.companyList.length; i++) { | 85 | for (var i = 0; i < $scope.companyList.length; i++) { |
86 | if ($scope.companyList[i].companyContact != null) { | 86 | if ($scope.companyList[i].companyContact != null) { |
87 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 87 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
88 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 88 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | if ($scope.companyList[i].primaryContact != null) { | 91 | if ($scope.companyList[i].primaryContact != null) { |
92 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 92 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
93 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 93 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
94 | } | 94 | } |
95 | } | 95 | } |
96 | if ($scope.companyList[i].margin != null) { | 96 | if ($scope.companyList[i].margin != null) { |
97 | if ($scope.companyList[i].margin.marginName != null) { | 97 | if ($scope.companyList[i].margin.marginName != null) { |
98 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 98 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
99 | } | 99 | } |
100 | } | 100 | } |
101 | } | 101 | } |
102 | $scope.displayCompanyList = new NgTableParams({ | 102 | $scope.displayCompanyList = new NgTableParams({ |
103 | page : 1, | 103 | page : 1, |
104 | count : 10, | 104 | count : 10, |
105 | }, { | 105 | }, { |
106 | data : $scope.companyList | 106 | data : $scope.companyList |
107 | }); | 107 | }); |
108 | $scope.showLoader = false; | 108 | $scope.showLoader = false; |
109 | }) | 109 | }) |
110 | } | 110 | } |
111 | 111 | ||
112 | $scope.editMargin = function(customer) { | 112 | $scope.editMargin = function(customer) { |
113 | //console.log('customer', customer); | 113 | //console.log('customer', customer); |
114 | $scope.showLoader = true; | 114 | $scope.showLoader = true; |
115 | event.stopPropagation(); | 115 | event.stopPropagation(); |
116 | 116 | ||
117 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin | 117 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin |
118 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" | 118 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" |
119 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" | 119 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" |
120 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant | 120 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant |
121 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor | 121 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor |
122 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; | 122 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; |
123 | 123 | ||
124 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { | 124 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { |
125 | if (result != null && result.success) { | 125 | if (result != null && result.success) { |
126 | $scope.showLoader = false; | 126 | $scope.showLoader = false; |
127 | toastr.success('' + result.success + '', { | 127 | toastr.success('' + result.success + '', { |
128 | closeButton : true | 128 | closeButton : true |
129 | }) | 129 | }) |
130 | getAllCompanies(); | 130 | getAllCompanies(); |
131 | } else { | 131 | } else { |
132 | $scope.showLoader = false; | 132 | $scope.showLoader = false; |
133 | toastr.error('' + result.statusText + '', { | 133 | toastr.error('' + result.statusText + '', { |
134 | closeButton : true | 134 | closeButton : true |
135 | }) | 135 | }) |
136 | } | 136 | } |
137 | }) | 137 | }) |
138 | } | 138 | } |
139 | 139 | ||
140 | getData(); | 140 | getData(); |
141 | function getData() { | 141 | function getData() { |
142 | $scope.showLoader = true; | 142 | $scope.showLoader = true; |
143 | CustomersService.getAircraftMake().then(function(result) { | 143 | CustomersService.getAircraftMake().then(function(result) { |
144 | //console.log("==aircrafts===",result) | ||
144 | $scope.aircraftMakeList = result; | 145 | $scope.aircraftMakeList = result; |
145 | $scope.showLoader = false; | 146 | $scope.showLoader = false; |
146 | }) | 147 | }) |
147 | } | 148 | } |
148 | // CustomersService.getMargin().then(function(result) { | 149 | // CustomersService.getMargin().then(function(result) { |
149 | // $scope.marginList = result; | 150 | // $scope.marginList = result; |
150 | // }) | 151 | // }) |
151 | $scope.marginFilterOptions = []; | 152 | $scope.marginFilterOptions = []; |
152 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 153 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
153 | $scope.showLoader = true; | 154 | $scope.showLoader = true; |
154 | $scope.jetMarginList = result; | 155 | $scope.jetMarginList = result; |
155 | //console.log("jet margin",result,$scope.userProfileId) | 156 | //console.log("jet margin",result,$scope.userProfileId) |
156 | $scope.marginFilterOptions.push({ | 157 | $scope.marginFilterOptions.push({ |
157 | 'id' : '', | 158 | 'id' : '', |
158 | 'title' : 'Show All' | 159 | 'title' : 'Show All' |
159 | }); | 160 | }); |
160 | for (var i = 0; i < result.length; i++) { | 161 | for (var i = 0; i < result.length; i++) { |
161 | $scope.marginFilterOptions.push({ | 162 | $scope.marginFilterOptions.push({ |
162 | 'id' : result[i].id, | 163 | 'id' : result[i].id, |
163 | 'title' : result[i].marginName | 164 | 'title' : result[i].marginName |
164 | }) | 165 | }) |
165 | } | 166 | } |
166 | $scope.showLoader = false; | 167 | $scope.showLoader = false; |
167 | }) | 168 | }) |
168 | 169 | ||
169 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 170 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
170 | $scope.avgsMarginList = result; | 171 | $scope.avgsMarginList = result; |
171 | // console.log('avgsMarginList',result) | 172 | // console.log('avgsMarginList',result) |
172 | }) | 173 | }) |
173 | 174 | ||
174 | 175 | ||
175 | $scope.showCompanyError = false; | 176 | $scope.showCompanyError = false; |
176 | $scope.showMarginError = false; | 177 | $scope.showMarginError = false; |
177 | 178 | ||
178 | $scope.removeValidation = function() { | 179 | $scope.removeValidation = function() { |
179 | $scope.showCompanyError = false; | 180 | $scope.showCompanyError = false; |
180 | $('.companyNameInput').removeClass('customErrorInput'); | 181 | $('.companyNameInput').removeClass('customErrorInput'); |
181 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 182 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
182 | $('.companyNameInput').addClass('customErrorInput'); | 183 | $('.companyNameInput').addClass('customErrorInput'); |
183 | $scope.showCompanyError = true; | 184 | $scope.showCompanyError = true; |
184 | } | 185 | } |
185 | } | 186 | } |
186 | 187 | ||
187 | $scope.removeMarginValidation = function() { | 188 | $scope.removeMarginValidation = function() { |
188 | $scope.showMarginError = false; | 189 | $scope.showMarginError = false; |
189 | $('.marginSelectBox').removeClass('customErrorInput'); | 190 | $('.marginSelectBox').removeClass('customErrorInput'); |
190 | } | 191 | } |
191 | 192 | ||
192 | var companyData; | 193 | var companyData; |
193 | $scope.addFirstData = function(sel, step) { | 194 | $scope.addFirstData = function(sel, step) { |
194 | $scope.showLoader = true; | 195 | $scope.showLoader = true; |
195 | if ($scope.data.companyName == undefined) { | 196 | if ($scope.data.companyName == undefined) { |
196 | $scope.showCompanyError = true; | 197 | $scope.showCompanyError = true; |
197 | $('.companyNameInput').addClass('customErrorInput'); | 198 | $('.companyNameInput').addClass('customErrorInput'); |
198 | } else if ($scope.data.masterMargin == undefined) { | 199 | } else if ($scope.data.masterMargin == undefined) { |
199 | $scope.showMarginError = true; | 200 | $scope.showMarginError = true; |
200 | $('.marginSelectBox').addClass('customErrorInput'); | 201 | $('.marginSelectBox').addClass('customErrorInput'); |
201 | } else { | 202 | } else { |
202 | $scope.aircraftDetails = [ { | 203 | $scope.aircraftDetails = [ { |
203 | 'tail' : '', | 204 | 'tail' : '', |
204 | 'make' : '', | 205 | 'make' : '', |
205 | 'model' : '', | 206 | 'model' : '', |
206 | 'sizeId' : '', | 207 | 'sizeId' : '', |
207 | 'marginId' : $scope.data.masterMargin, | 208 | 'marginId' : $scope.data.masterMargin, |
208 | 'avgasMarginId' : $scope.data.avgasMargin | 209 | 'avgasMarginId' : $scope.data.avgasMargin |
209 | } ]; | 210 | } ]; |
210 | 211 | ||
211 | $(sel).trigger('next.m.' + step); | 212 | $(sel).trigger('next.m.' + step); |
212 | getData(); | 213 | getData(); |
213 | } | 214 | } |
214 | $scope.showLoader = false; | 215 | $scope.showLoader = false; |
215 | } | 216 | } |
216 | $scope.addNew = function() { | 217 | $scope.addNew = function() { |
217 | $scope.showLoader = true; | 218 | $scope.showLoader = true; |
218 | $scope.aircraftDetails.push({ | 219 | $scope.aircraftDetails.push({ |
219 | 'tail' : '', | 220 | 'tail' : '', |
220 | 'make' : '', | 221 | 'make' : '', |
221 | 'model' : '', | 222 | 'model' : '', |
222 | 'sizeId' : '', | 223 | 'sizeId' : '', |
223 | 'marginId' : $scope.data.masterMargin, | 224 | 'marginId' : $scope.data.masterMargin, |
224 | 'avgasMarginId' : $scope.data.avgasMargin | 225 | 'avgasMarginId' : $scope.data.avgasMargin |
225 | }); | 226 | }); |
226 | $scope.showLoader = false; | 227 | $scope.showLoader = false; |
227 | }; | 228 | }; |
228 | 229 | ||
229 | $scope.getModal = function(makeId, index) { | 230 | $scope.getModal = function(makeId, index) { |
230 | $scope.showLoader = true; | 231 | $scope.showLoader = true; |
231 | //console.log(makeId) | 232 | //console.log(makeId) |
232 | $scope.aircraft.make = makeId; | 233 | $scope.aircraft.make = makeId; |
233 | //var makeId = makeId; | 234 | //var makeId = makeId; |
234 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 235 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
235 | $scope.showLoader = false; | 236 | $scope.showLoader = false; |
236 | $scope.aircraftDetails[index].aircraftModalList = result; | 237 | $scope.aircraftDetails[index].aircraftModalList = result; |
237 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 238 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
238 | }) | 239 | }) |
239 | } | 240 | } |
240 | 241 | ||
241 | $scope.getSize = function(model, index) { | 242 | $scope.getSize = function(model, index) { |
242 | $scope.showLoader = true; | 243 | $scope.showLoader = true; |
243 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 244 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
244 | $scope.showLoader = false; | 245 | $scope.showLoader = false; |
245 | $scope.aircraftDetails[index].aircraftSizeList = result; | 246 | $scope.aircraftDetails[index].aircraftSizeList = result; |
246 | }) | 247 | }) |
247 | } | 248 | } |
248 | 249 | ||
249 | $scope.aircraftListData = {}; | 250 | $scope.aircraftListData = {}; |
250 | $scope.addData = []; | 251 | $scope.addData = []; |
251 | $scope.saveCompanyData = function() { | 252 | $scope.saveCompanyData = function() { |
253 | console.log("company data --",$scope.data) | ||
252 | CustomersService.addCompany($scope.data).then(function(result) { | 254 | CustomersService.addCompany($scope.data).then(function(result) { |
253 | $scope.accountId = result; | 255 | $scope.accountId = result; |
254 | $scope.aircraft.accountId = $scope.accountId; | 256 | $scope.aircraft.accountId = $scope.accountId; |
255 | 257 | ||
256 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 258 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
257 | $scope.addData.push({ | 259 | $scope.addData.push({ |
258 | 'tail' : $scope.aircraftDetails[i].tail, | 260 | 'tail' : $scope.aircraftDetails[i].tail, |
259 | 'make' : $scope.aircraftDetails[i].make, | 261 | 'make' : $scope.aircraftDetails[i].make, |
260 | 'model' : $scope.aircraftDetails[i].model, | 262 | 'model' : $scope.aircraftDetails[i].model, |
261 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 263 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
262 | 'marginId' : $scope.aircraftDetails[i].marginId, | 264 | 'marginId' : $scope.aircraftDetails[i].marginId, |
263 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId | 265 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId |
264 | }); | 266 | }); |
265 | } | 267 | } |
266 | $scope.aircraftListData.aircraftList = $scope.addData; | 268 | $scope.aircraftListData.aircraftList = $scope.addData; |
267 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 269 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
268 | 270 | ||
269 | if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { | 271 | if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { |
270 | $scope.aircraftListData.aircraftList = []; | 272 | $scope.aircraftListData.aircraftList = []; |
271 | } | 273 | } |
272 | 274 | ||
273 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 275 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
274 | 276 | ||
275 | if (result != null && result.success) { | 277 | if (result != null && result.success) { |
276 | toastr.success('' + result.success + '', { | 278 | toastr.success('' + result.success + '', { |
277 | closeButton : true | 279 | closeButton : true |
278 | }) | 280 | }) |
279 | $('#demo-modal-3').modal('hide'); | 281 | $('#demo-modal-3').css('display', 'none'); |
282 | $('.modal-backdrop').css('display', 'none'); | ||
280 | getAllCompanies(); | 283 | getAllCompanies(); |
281 | } else { | 284 | } else { |
282 | toastr.error('' + result.statusText + '', { | 285 | toastr.error('' + result.statusText + '', { |
283 | closeButton : true | 286 | closeButton : true |
284 | }) | 287 | }) |
285 | } | 288 | } |
286 | }); | 289 | }); |
287 | 290 | ||
288 | }) | 291 | }) |
289 | } | 292 | } |
290 | 293 | ||
291 | /*add a fuel order*/ | 294 | /*add a fuel order*/ |
292 | $scope.getOrders = function() { | 295 | $scope.getOrders = function() { |
293 | fuelOrdersService.getOrders().then(function(result) { | 296 | fuelOrdersService.getOrders().then(function(result) { |
294 | 297 | console.log("==get orders===",result) | |
295 | $scope.orderdata = result; | 298 | $scope.orderdata = result; |
296 | for (var i = 0; i < $scope.orderdata.length; i++) { | 299 | for (var i = 0; i < $scope.orderdata.length; i++) { |
297 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 300 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
298 | 301 | ||
299 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 302 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
300 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 303 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
301 | // str = str.slice(4,16) | 304 | // str = str.slice(4,16) |
302 | $scope.orderdata[i].upliftDateString = str | 305 | $scope.orderdata[i].upliftDateString = str |
303 | // console.log(str); | 306 | // console.log(str); |
304 | 307 | ||
305 | } | 308 | } |
306 | 309 | ||
307 | $scope.displayFuelOrderList = new NgTableParams({ | 310 | $scope.displayFuelOrderList = new NgTableParams({ |
308 | page : 1, | 311 | page : 1, |
309 | count : 10, | 312 | count : 10, |
310 | }, { | 313 | }, { |
311 | data : $scope.orderdata | 314 | data : $scope.orderdata |
312 | }); | 315 | }); |
313 | $(document).ready(function() { | 316 | $(document).ready(function() { |
314 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 317 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
315 | 318 | ||
316 | for (var i = 0; i < myselect.length; i++) { | 319 | for (var i = 0; i < myselect.length; i++) { |
317 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 320 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
318 | colourIndex = colourIndex + 1; | 321 | colourIndex = colourIndex + 1; |
319 | // console.log(colourIndex); | 322 | // console.log(colourIndex); |
320 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 323 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
321 | $(myselect[i]).css('background-color', getColor); | 324 | $(myselect[i]).css('background-color', getColor); |
322 | // console.log('colour', getColor); | 325 | // console.log('colour', getColor); |
323 | myselect[i].blur(); | 326 | myselect[i].blur(); |
324 | } | 327 | } |
325 | 328 | ||
326 | }) | 329 | }) |
327 | 330 | ||
328 | }) | 331 | }) |
329 | } | 332 | } |
330 | 333 | ||
331 | $scope.getOrders(); | 334 | $scope.getOrders(); |
332 | $scope.tiervalue=function(){ | 335 | $scope.tiervalue=function(){ |
333 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 336 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
334 | } | 337 | } |
335 | 338 | ||
336 | $scope.setCost = function(cost){ | 339 | $scope.setCost = function(cost){ |
337 | if(cost != null) { | 340 | if(cost != null) { |
338 | var obj =JSON.parse(cost); | 341 | var obj =JSON.parse(cost); |
339 | $scope.order.fboCost = obj.cost; | 342 | $scope.order.fboCost = obj.cost; |
340 | } | 343 | } |
341 | } | 344 | } |
342 | 345 | ||
343 | $scope.cancelOrder = function() { | 346 | $scope.cancelOrder = function() { |
344 | $scope.order = {}; | 347 | $scope.order = {}; |
345 | } | 348 | } |
346 | 349 | ||
347 | $scope.dispatchFuel = function(){ | 350 | $scope.dispatchFuel = function(){ |
348 | $scope.showLoader = true; | 351 | $scope.showLoader = true; |
349 | $scope.fuelData = {}; | 352 | $scope.fuelData = {}; |
350 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 353 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
351 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; | 354 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; |
352 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 355 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
353 | $scope.fuelData.aircraftName = aircraftObj.tail; | 356 | $scope.fuelData.aircraftName = aircraftObj.tail; |
354 | $scope.fuelData.make = aircraftObj.make; | 357 | $scope.fuelData.make = aircraftObj.make; |
355 | $scope.fuelData.model = aircraftObj.model; | 358 | $scope.fuelData.model = aircraftObj.model; |
356 | $scope.fuelData.fuelOn = $scope.order.fuelOn; | 359 | $scope.fuelData.fuelOn = $scope.order.fuelOn; |
357 | $scope.fuelData.invoiced = $scope.order.invoiced; | 360 | $scope.fuelData.invoiced = $scope.order.invoiced; |
358 | $scope.fuelData.volume = $scope.order.volume; | 361 | $scope.fuelData.volume = $scope.order.volume; |
359 | $scope.fuelData.source = $scope.order.source; | 362 | $scope.fuelData.source = $scope.order.source; |
360 | 363 | ||
361 | $scope.fuelData.total = $scope.order.total; | 364 | $scope.fuelData.total = $scope.order.total; |
362 | //tier no use | 365 | //tier no use |
363 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 366 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
364 | 367 | ||
365 | var obj =JSON.parse($scope.order.priceQuote); | 368 | var obj =JSON.parse($scope.order.priceQuote); |
366 | $scope.fuelData.priceQuote = obj.papTotal; | 369 | $scope.fuelData.priceQuote = obj.papTotal; |
367 | $scope.fuelData.fboCost = obj.cost; | 370 | $scope.fuelData.fboCost = obj.cost; |
368 | $scope.fuelData.productName = obj.productName; | 371 | $scope.fuelData.productName = obj.productName; |
369 | 372 | ||
370 | $scope.fuelData.etaTime = $scope.order.etaTime; | 373 | $scope.fuelData.etaTime = $scope.order.etaTime; |
371 | $scope.fuelData.etdTime = $scope.order.etdTime; | 374 | $scope.fuelData.etdTime = $scope.order.etdTime; |
372 | $scope.fuelData.certificateType = $scope.order.certificateType; | 375 | $scope.fuelData.certificateType = $scope.order.certificateType; |
373 | var currentDate = new Date(); | 376 | var currentDate = new Date(); |
374 | var hours = currentDate.getHours(); | 377 | var hours = currentDate.getHours(); |
375 | var min = currentDate.getMinutes(); | 378 | var min = currentDate.getMinutes(); |
376 | var sec = currentDate.getSeconds(); | 379 | var sec = currentDate.getSeconds(); |
377 | if ($scope.order.upliftDate != '') { | 380 | if ($scope.order.upliftDate != '') { |
378 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 381 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
379 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 382 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
380 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 383 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
381 | } | 384 | } |
382 | 385 | ||
383 | 386 | ||
384 | if ($scope.order.departingDate != '') { | 387 | if ($scope.order.departingDate != '') { |
385 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 388 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
386 | $scope.order.departingDate = new Date($scope.order.departingDate); | 389 | $scope.order.departingDate = new Date($scope.order.departingDate); |
387 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 390 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
388 | } | 391 | } |
389 | 392 | ||
390 | if($scope.order.status === null || $scope.order.status === undefined){ | 393 | if($scope.order.status === null || $scope.order.status === undefined){ |
391 | 394 | ||
392 | $scope.fuelData.status = "pending"; //default status | 395 | $scope.fuelData.status = "pending"; //default status |
393 | 396 | ||
394 | }else { | 397 | }else { |
395 | 398 | ||
396 | $scope.fuelData.status = $scope.order.status; | 399 | $scope.fuelData.status = $scope.order.status; |
397 | } | 400 | } |
398 | 401 | ||
399 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 402 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
400 | // console.log("=====$scope.fueldata======",$scope.fuelData) | 403 | // console.log("=====$scope.fueldata======",$scope.fuelData) |
401 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 404 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
402 | $scope.showLoader = false; | 405 | $scope.showLoader = false; |
403 | $scope.order = {}; | 406 | $scope.order = {}; |
404 | $scope.dispatchOrder.fuelOrderList = []; | 407 | $scope.dispatchOrder.fuelOrderList = []; |
405 | $('#demo-modal-4').css('display', ''); | 408 | $('#demo-modal-4').css('display', ''); |
406 | $scope.getOrders(); | 409 | $scope.getOrders(); |
407 | toastr.success('Fuel Order Dispatched Successfully', { | 410 | toastr.success('Fuel Order Dispatched Successfully', { |
408 | closeButton: true | 411 | closeButton: true |
409 | }) | 412 | }) |
410 | }) | 413 | }) |
411 | } | 414 | } |
412 | 415 | ||
413 | $scope.addTotal = function(value, valueOf) { | 416 | $scope.addTotal = function(value, valueOf) { |
414 | if (valueOf == 'v') { | 417 | if (value != undefined && valueOf != undefined) { |
415 | $scope.order.total = value * $scope.order.invoiced | 418 | value = JSON.parse(value) |
416 | } else if (valueOf == 'i') { | 419 | $scope.order.total = value.cost * valueOf; |
417 | $scope.order.total = $scope.order.volume * value | ||
418 | } | 420 | } |
419 | } | 421 | } |
420 | 422 | ||
421 | $scope.getAircraft = function(company) { | 423 | $scope.getAircraft = function(company) { |
422 | $scope.selectedCompanyName = company; | 424 | $scope.selectedCompanyName = company; |
423 | //$scope.showLoader = true; | 425 | //$scope.showLoader = true; |
424 | // console.log("id",company) | 426 | // console.log("id",company) |
425 | for (var i = 0; i < $scope.companyList.length; i++) { | 427 | for (var i = 0; i < $scope.companyList.length; i++) { |
426 | if ($scope.companyList[i].companyName == company) { | 428 | if ($scope.companyList[i].companyName == company) { |
427 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { | 429 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { |
428 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 430 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
429 | $scope.marginList = margins; | 431 | $scope.marginList = margins; |
430 | //console.log('$scope.marginList', $scope.marginList); | 432 | //console.log('$scope.marginList', $scope.marginList); |
431 | }) | 433 | }) |
432 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 434 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
433 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 435 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
434 | $scope.marginList = margins; | 436 | $scope.marginList = margins; |
435 | }) | 437 | }) |
436 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 438 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
437 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 439 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
438 | $scope.marginList = margins; | 440 | $scope.marginList = margins; |
439 | }) | 441 | }) |
440 | } | 442 | } |
441 | $scope.selectedCompanyId = $scope.companyList[i].id; | 443 | $scope.selectedCompanyId = $scope.companyList[i].id; |
442 | $scope.marginId = $scope.companyList[i].margin.id; | 444 | $scope.marginId = $scope.companyList[i].margin.id; |
443 | if ($scope.selectedCompanyId != '') { | 445 | if ($scope.selectedCompanyId != '') { |
444 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 446 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
445 | $scope.aircraftList = aircraft; | 447 | $scope.aircraftList = aircraft; |
448 | console.log("===tail search====",aircraft); | ||
446 | }) | 449 | }) |
447 | } | 450 | } |
448 | if ($scope.marginId != '') { | 451 | if ($scope.marginId != '') { |
449 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 452 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
450 | $scope.tierList = tiers; | 453 | $scope.tierList = tiers; |
451 | // $scope.showLoader = false; | 454 | // $scope.showLoader = false; |
452 | }) | 455 | }) |
453 | } else { | 456 | } else { |
454 | // $scope.showLoader = false; | 457 | // $scope.showLoader = false; |
455 | } | 458 | } |
456 | } | 459 | } |
457 | } | 460 | } |
458 | 461 | ||
459 | } | 462 | } |
460 | 463 | ||
461 | $scope.sourceList = [ { | 464 | $scope.sourceList = [ { |
462 | source : "Direct Jet-A" | 465 | source : "Direct Jet-A" |
463 | }, { | 466 | }, { |
464 | source : "Direct AVGAS 100LL" | 467 | source : "Direct AVGAS 100LL" |
465 | } ]; | 468 | } ]; |
466 | $scope.cancelData = function() { | 469 | $scope.cancelData = function() { |
467 | $scope.order = {}; | 470 | $scope.order = {}; |
468 | $('#demo-modal-4').css('display', ''); | 471 | $('#demo-modal-4').css('display', ''); |
469 | } | 472 | } |
470 | 473 | ||
471 | $scope.setFuel = function(companyName) { | 474 | $scope.setFuel = function(companyName,certificateType) { |
472 | $('#demo-modal-4').css('display', 'block'); | 475 | $('#demo-modal-4').css('display', 'block'); |
473 | $scope.order.defaultCompanyName = companyName; | 476 | $scope.order.defaultCompanyName = companyName; |
477 | $scope.order.certificateType = certificateType; | ||
474 | $scope.getAircraft(companyName); | 478 | $scope.getAircraft(companyName); |
475 | // event.stopPropagation(); | 479 | // event.stopPropagation(); |
476 | // $state.go('app.updateFuelManager'); | 480 | // $state.go('app.updateFuelManager'); |
477 | } | 481 | } |
478 | 482 | ||
479 | /* ng table */ | 483 | /* ng table */ |
480 | 484 | ||
481 | $scope.exportCompany = function() { | 485 | $scope.exportCompany = function() { |
482 | $scope.showLoader = true; | 486 | $scope.showLoader = true; |
483 | var fileName = "companies.csv"; | 487 | var fileName = "companies.csv"; |
484 | var a = document.createElement("a"); | 488 | var a = document.createElement("a"); |
485 | document.body.appendChild(a); | 489 | document.body.appendChild(a); |
486 | CustomersService.exportCompany().then(function(result) { | 490 | CustomersService.exportCompany().then(function(result) { |
487 | var file = new Blob([ result ], { | 491 | var file = new Blob([ result ], { |
488 | type : 'application/csv' | 492 | type : 'application/csv' |
489 | }); | 493 | }); |
490 | var fileURL = URL.createObjectURL(file); | 494 | var fileURL = URL.createObjectURL(file); |
491 | a.href = fileURL; | 495 | a.href = fileURL; |
492 | a.download = fileName; | 496 | a.download = fileName; |
493 | a.click(); | 497 | a.click(); |
494 | $scope.showLoader = false; | 498 | $scope.showLoader = false; |
495 | }) | 499 | }) |
496 | } | 500 | } |
497 | getCompanyName(); | 501 | getCompanyName(); |
498 | function getCompanyName() { | 502 | function getCompanyName() { |
499 | CustomersService.getCompanyName().then(function(result) { | 503 | CustomersService.getCompanyName().then(function(result) { |
500 | $scope.compNameList = result; | 504 | $scope.compNameList = result; |
501 | //console.log("kd",result) | 505 | //console.log("kd",result) |
502 | }) | 506 | }) |
503 | } | 507 | } |
504 | 508 | ||
505 | $scope.checkJetWithTail = function(tail, index) { | 509 | $scope.checkJetWithTail = function(tail, index) { |
506 | //console.log("tail==============",tail, index) | 510 | //console.log("tail==============",tail, index) |
507 | ViewCompanyService.checkJetType(tail).then(function(result) { | 511 | ViewCompanyService.checkJetType(tail).then(function(result) { |
508 | //console.log("result",result) | 512 | //console.log("result",result) |
509 | if (result.jetA == "true") { | 513 | if (result.jetA == "true") { |
510 | $scope.jetShow[index] = false; | 514 | $scope.jetShow[index] = false; |
511 | $scope.marginShow[index] = true; | 515 | $scope.marginShow[index] = true; |
512 | } else { | 516 | } else { |
513 | $scope.jetShow[index] = true; | 517 | $scope.jetShow[index] = true; |
514 | $scope.marginShow[index] = false; | 518 | $scope.marginShow[index] = false; |
515 | } | 519 | } |
516 | }) | 520 | }) |
517 | } | 521 | } |
518 | 522 | ||
519 | 523 | ||
520 | $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, | 524 | $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
521 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, | 525 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
522 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, | 526 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
523 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, | 527 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
524 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, | 528 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
525 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; | 529 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
526 | 530 | ||
527 | $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, | 531 | $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
528 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, | 532 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
529 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, | 533 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
530 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, | 534 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
531 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, | 535 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
532 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; | 536 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
533 | 537 |
app/partials/customers/customers.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ca5c6a; | 3 | color: #ca5c6a; |
4 | } | 4 | } |
5 | 5 | ||
6 | .button1 { | 6 | .button1 { |
7 | display: inline-block; | 7 | display: inline-block; |
8 | height: 35px; | 8 | height: 35px; |
9 | line-height: 35px; | 9 | line-height: 35px; |
10 | padding-right: 15px; | 10 | padding-right: 15px; |
11 | padding-left: 50px; | 11 | padding-left: 50px; |
12 | position: relative; | 12 | position: relative; |
13 | background-color:rgb(41,127,184); | 13 | background-color:rgb(41,127,184); |
14 | color:rgb(255,255,255); | 14 | color:rgb(255,255,255); |
15 | text-decoration: none; | 15 | text-decoration: none; |
16 | text-transform: uppercase; | 16 | text-transform: uppercase; |
17 | letter-spacing: 1px; | 17 | letter-spacing: 1px; |
18 | margin-bottom: 15px; | 18 | margin-bottom: 15px; |
19 | border: 0; | 19 | border: 0; |
20 | 20 | ||
21 | 21 | ||
22 | border-radius: 5px; | 22 | border-radius: 5px; |
23 | -moz-border-radius: 5px; | 23 | -moz-border-radius: 5px; |
24 | -webkit-border-radius: 5px; | 24 | -webkit-border-radius: 5px; |
25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
28 | 28 | ||
29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
34 | } | 34 | } |
35 | 35 | ||
36 | .button1 span { | 36 | .button1 span { |
37 | position: absolute; | 37 | position: absolute; |
38 | left: 0; | 38 | left: 0; |
39 | top: 0; | 39 | top: 0; |
40 | width: 35px; | 40 | width: 35px; |
41 | background-color:rgba(0,0,0,0.5); | 41 | background-color:rgba(0,0,0,0.5); |
42 | -webkit-border-top-left-radius: 5px; | 42 | -webkit-border-top-left-radius: 5px; |
43 | -webkit-border-bottom-left-radius: 5px; | 43 | -webkit-border-bottom-left-radius: 5px; |
44 | -moz-border-radius-topleft: 5px; | 44 | -moz-border-radius-topleft: 5px; |
45 | -moz-border-radius-bottomleft: 5px; | 45 | -moz-border-radius-bottomleft: 5px; |
46 | border-top-left-radius: 5px; | 46 | border-top-left-radius: 5px; |
47 | border-bottom-left-radius: 5px; | 47 | border-bottom-left-radius: 5px; |
48 | border-right: 1px solid rgba(0,0,0,0.15); | 48 | border-right: 1px solid rgba(0,0,0,0.15); |
49 | } | 49 | } |
50 | 50 | ||
51 | .button1:hover span, .button1.active span { | 51 | .button1:hover span, .button1.active span { |
52 | background-color:rgb(0,102,26); | 52 | background-color:rgb(0,102,26); |
53 | border-right: 1px solid rgba(0,0,0,0.3); | 53 | border-right: 1px solid rgba(0,0,0,0.3); |
54 | } | 54 | } |
55 | 55 | ||
56 | .button1:active { | 56 | .button1:active { |
57 | margin-top: 2px; | 57 | margin-top: 2px; |
58 | margin-bottom: 13px; | 58 | margin-bottom: 13px; |
59 | 59 | ||
60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
65 | } | 65 | } |
66 | 66 | ||
67 | .button1.turquoise { | 67 | .button1.turquoise { |
68 | background: #449d44; | 68 | background: #449d44; |
69 | } | 69 | } |
70 | </style> | 70 | </style> |
71 | <div class="myLoader" ng-show="showLoader"> | 71 | <div class="myLoader" ng-show="showLoader"> |
72 | <img src="../img/hourglass.gif" width="50px;"> | 72 | <img src="../img/hourglass.gif" width="50px;"> |
73 | </div> | 73 | </div> |
74 | 74 | ||
75 | <div class="main"> | 75 | <div class="main"> |
76 | <div class="container"> | 76 | <div class="container"> |
77 | <div class="row"> | 77 | <div class="row"> |
78 | <div class="col-md-12"> | 78 | <div class="col-md-12"> |
79 | <div class="widget stacked "> | 79 | <div class="widget stacked "> |
80 | <div class="widget-content"> | 80 | <div class="widget-content"> |
81 | <div class="tabbable"> | 81 | <div class="tabbable"> |
82 | <ul class="nav nav-tabs"> | 82 | <ul class="nav nav-tabs"> |
83 | <li class="active"> | 83 | <li class="active"> |
84 | <a ui-sref="app.customers">Customer View | 84 | <a ui-sref="app.customers">Customer View |
85 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 85 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
86 | </a> | 86 | </a> |
87 | </li> | 87 | </li> |
88 | <li> | 88 | <li> |
89 | <a ui-sref="app.ContactView">Contact View | 89 | <a ui-sref="app.ContactView">Contact View |
90 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 90 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
91 | </a> | 91 | </a> |
92 | </li> | 92 | </li> |
93 | <li> | 93 | <li> |
94 | <a ui-sref="app.FuelVendors">Fuel Vendors | 94 | <a ui-sref="app.FuelVendors">Fuel Vendors |
95 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 95 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
96 | </a> | 96 | </a> |
97 | </li> | 97 | </li> |
98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> | 98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> |
99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> | 99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> |
100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> | 100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> |
101 | </ul> | 101 | </ul> |
102 | <br> | 102 | <br> |
103 | <div class="tab-content customer-table" style="margin:0px"> | 103 | <div class="tab-content customer-table" style="margin:0px"> |
104 | <div class="tab-pane active" id="companyView"> | 104 | <div class="tab-pane active" id="companyView"> |
105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> | 105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> |
106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> | 106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> |
107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> | 107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> |
108 | {{row.companyName}} | 108 | {{row.companyName}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> | 110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> |
111 | {{row.companyAircraftSize}} | 111 | {{row.companyAircraftSize}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> | 113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> |
114 | {{row.newContactNumber}} | 114 | {{row.newContactNumber}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> | 116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> |
117 | {{row.primaryContactName}} | 117 | {{row.primaryContactName}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> | 119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> |
120 | {{row.baseIcao}} | 120 | {{row.baseIcao}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> | 122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> |
123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> | 123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> |
124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> | 124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> |
125 | </td> | 125 | </td> |
126 | <td class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> | 126 | <td class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> |
127 | <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> | 127 | <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> |
128 | </td> | 128 | </td> |
129 | <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})"> | 129 | <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})"> |
130 | {{row.marginAllIn | number : 4}} | 130 | {{row.marginAllIn | number : 4}} |
131 | </td> | 131 | </td> |
132 | <td data-title="''"> | 132 | <td data-title="''"> |
133 | <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName)">Setup Fuel</button> | 133 | <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.certificateType)">Setup Fuel</button> |
134 | </td> | 134 | </td> |
135 | </tr> | 135 | </tr> |
136 | </table> | 136 | </table> |
137 | 137 | ||
138 | <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button> | 138 | <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button> |
139 | 139 | ||
140 | </div> | 140 | </div> |
141 | </div> | 141 | </div> |
142 | </div> | 142 | </div> |
143 | </div> | 143 | </div> |
144 | <!-- /widget-content --> | 144 | <!-- /widget-content --> |
145 | </div> | 145 | </div> |
146 | <!-- /widget --> | 146 | <!-- /widget --> |
147 | </div> | 147 | </div> |
148 | <!-- /span8 --> | 148 | <!-- /span8 --> |
149 | </div> | 149 | </div> |
150 | <!-- /row --> | 150 | <!-- /row --> |
151 | </div> | 151 | </div> |
152 | <!-- /container --> | 152 | <!-- /container --> |
153 | </div> | 153 | </div> |
154 | <!-- /main --> | 154 | <!-- /main --> |
155 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 155 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
156 | <div class="modal-dialog modal-lg"> | 156 | <div class="modal-dialog modal-lg"> |
157 | <div class="modal-content"> | 157 | <div class="modal-content"> |
158 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 158 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
159 | <div> | 159 | <div> |
160 | <div class="row" style="margin: 0;"> | 160 | <div class="row" style="margin: 0;"> |
161 | <div> | 161 | <div> |
162 | <div class="widget" style="margin-bottom: 0;"> | 162 | <div class="widget" style="margin-bottom: 0;"> |
163 | <div class="widget-header"> | 163 | <div class="widget-header"> |
164 | <i class="icon-pencil"></i> | 164 | <i class="icon-pencil"></i> |
165 | <i class="fa fa-tasks" aria-hidden="true"></i> | 165 | <i class="fa fa-tasks" aria-hidden="true"></i> |
166 | <h3>Add a New Company</h3> | 166 | <h3>Add a New Company</h3> |
167 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 167 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
168 | <div style="color: #ff9a01;">Activate     | 168 | <div style="color: #ff9a01;">Activate     |
169 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 169 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
170 | </div> | 170 | </div> |
171 | </div> | 171 | </div> |
172 | <div class="clearfix"></div> | 172 | <div class="clearfix"></div> |
173 | </div> | 173 | </div> |
174 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 174 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
175 | <div class="col-xs-12"> | 175 | <div class="col-xs-12"> |
176 | <div class="col-md-8"> | 176 | <div class="col-md-8"> |
177 | <div class="pull-left"> | 177 | <div class="pull-left"> |
178 | <label class="new-input-label"><b>Company Name *</b></label> | 178 | <label class="new-input-label"><b>Company Name *</b></label> |
179 | </div> | 179 | </div> |
180 | <div class="pull-left" style="margin-left: 15px;"> | 180 | <div class="pull-left" style="margin-left: 15px;"> |
181 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> | 181 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> |
182 | 182 | ||
183 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 183 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
184 | </div> | 184 | </div> |
185 | <div class="clearfix"></div> | 185 | <div class="clearfix"></div> |
186 | </div> | 186 | </div> |
187 | <div class="col-md-4"> | 187 | <div class="col-md-4"> |
188 | 188 | ||
189 | <div class="pull-right"> | 189 | <div class="pull-right"> |
190 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 190 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
191 | </div> | 191 | </div> |
192 | <div class="pull-right"> | 192 | <div class="pull-right"> |
193 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 193 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
194 | </div> | 194 | </div> |
195 | <div class="clearfix"></div> | 195 | <div class="clearfix"></div> |
196 | </div> | 196 | </div> |
197 | </div> | 197 | </div> |
198 | <div class="clearfix"></div><br> | 198 | <div class="clearfix"></div><br> |
199 | <div class="col-xs-12"> | 199 | <div class="col-xs-12"> |
200 | <div class="col-md-7"> | 200 | <div class="col-md-7"> |
201 | <div class="pull-left"> | 201 | <div class="pull-left"> |
202 | <label class="new-input-label"><b>Relationship </b></label> | 202 | <label class="new-input-label"><b>Relationship </b></label> |
203 | </div> | 203 | </div> |
204 | <div class="pull-left" style="margin-left: 32px;"> | 204 | <div class="pull-left" style="margin-left: 32px;"> |
205 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 205 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> |
206 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 206 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> |
207 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 207 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
208 | </div> | 208 | </div> |
209 | <div class="clearfix"></div> | 209 | <div class="clearfix"></div> |
210 | </div> | 210 | </div> |
211 | <div class="col-md-2 Airport" style="text-align: right;"> | 211 | <div class="col-md-2 Airport" style="text-align: right;"> |
212 | <b>Certificate Type</b> | 212 | <b>Certificate Type</b> |
213 | </div> | 213 | </div> |
214 | <div class="col-md-3 Airport"> | 214 | <div class="col-md-3 Airport"> |
215 | <select required class="form-control" ng-model="data.certificateType"> | 215 | <select required class="form-control" ng-model="data.certificateType"> |
216 | <option value="" disabled selected hidden>Select...</option> | 216 | <option value="" disabled selected hidden>Select...</option> |
217 | <option value="corporate">Part 91 (Corporate)</option> | 217 | <option value="corporate">Part 91 (Corporate)</option> |
218 | <option value="charter">Part 135 (Charter)</option> | 218 | <option value="charter">Part 135 (Charter)</option> |
219 | <option value="scheduled">Part 121 (Scheduled)</option> | 219 | <option value="scheduled">Part 121 (Scheduled)</option> |
220 | <option value="military">Military</option> | 220 | <option value="military">Military</option> |
221 | <option value="government">Government</option> | 221 | <option value="government">Government</option> |
222 | </select> | 222 | </select> |
223 | </div> | 223 | </div> |
224 | <div class="clearfix"></div> | 224 | <div class="clearfix"></div> |
225 | </div> | 225 | </div> |
226 | <div class="clearfix"></div> | 226 | <div class="clearfix"></div> |
227 | <br/> | 227 | <br/> |
228 | <div class="col-xs-12"> | 228 | <div class="col-xs-12"> |
229 | <div class="col-md-6"> | 229 | <div class="col-md-6"> |
230 | <div class="pull-left" style="width: 110px;"> | 230 | <div class="pull-left" style="width: 110px;"> |
231 | <b>JET A Margin *</b> | 231 | <b>JET A Margin *</b> |
232 | </div> | 232 | </div> |
233 | <div class="pull-left"> | 233 | <div class="pull-left"> |
234 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 234 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> |
235 | <option value="" disabled>Select...</option> | 235 | <option value="" disabled>Select...</option> |
236 | </select> | 236 | </select> |
237 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 237 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
238 | 238 | ||
239 | <div class="clearfix"></div> | 239 | <div class="clearfix"></div> |
240 | </div> | 240 | </div> |
241 | </div> | 241 | </div> |
242 | 242 | ||
243 | <div class="col-md-3 Airport" style="text-align: right;"> | 243 | <div class="col-md-3 Airport" style="text-align: right;"> |
244 | <b>AVGAS 100LL Margin</b> | 244 | <b>AVGAS 100LL Margin</b> |
245 | </div> | 245 | </div> |
246 | <div class="col-md-3 Airport"> | 246 | <div class="col-md-3 Airport"> |
247 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 247 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
248 | <option value="" disabled>Select...</option> | 248 | <option value="" disabled>Select...</option> |
249 | </select> | 249 | </select> |
250 | </div> | 250 | </div> |
251 | <div class="clearfix"></div> | 251 | <div class="clearfix"></div> |
252 | </div> | 252 | </div> |
253 | <div class="clearfix"></div> | 253 | <div class="clearfix"></div> |
254 | <br/> | 254 | <br/> |
255 | <div class="col-xs-12"> | 255 | <div class="col-xs-12"> |
256 | <div class="col-md-12"> | 256 | <div class="col-md-12"> |
257 | <div class="pull-left" style="width: 110px;"> | 257 | <div class="pull-left" style="width: 110px;"> |
258 | <label class="new-input-label"><b>Address</b></label> | 258 | <label class="new-input-label"><b>Address</b></label> |
259 | </div> | 259 | </div> |
260 | <div class="pull-left" style="width: calc(100% - 110px);"> | 260 | <div class="pull-left" style="width: calc(100% - 110px);"> |
261 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 261 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
262 | </div> | 262 | </div> |
263 | <div class="clearfix"></div> | 263 | <div class="clearfix"></div> |
264 | </div> | 264 | </div> |
265 | </div> | 265 | </div> |
266 | <div class="clearfix"></div> | 266 | <div class="clearfix"></div> |
267 | <br/> | 267 | <br/> |
268 | <div class="col-xs-12"> | 268 | <div class="col-xs-12"> |
269 | <div class="col-md-12"> | 269 | <div class="col-md-12"> |
270 | <div class="pull-left" style="width: 110px;"> | 270 | <div class="pull-left" style="width: 110px;"> |
271 | <label class="new-input-label"><b>Address2</b></label> | 271 | <label class="new-input-label"><b>Address2</b></label> |
272 | </div> | 272 | </div> |
273 | <div class="pull-left" style="width: calc(100% - 110px);"> | 273 | <div class="pull-left" style="width: calc(100% - 110px);"> |
274 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 274 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
275 | </div> | 275 | </div> |
276 | <div class="clearfix"></div> | 276 | <div class="clearfix"></div> |
277 | </div> | 277 | </div> |
278 | </div> | 278 | </div> |
279 | <div class="clearfix"></div> | 279 | <div class="clearfix"></div> |
280 | <br/> | 280 | <br/> |
281 | <div class="col-xs-12"> | 281 | <div class="col-xs-12"> |
282 | 282 | ||
283 | <div class="col-md-6"> | 283 | <div class="col-md-6"> |
284 | <div class="pull-left" style="width: 110px;"> | 284 | <div class="pull-left" style="width: 110px;"> |
285 | <label class="new-input-label"><b>City</b></label> | 285 | <label class="new-input-label"><b>City</b></label> |
286 | </div> | 286 | </div> |
287 | <div class="pull-left" style="width: calc(100% - 110px);"> | 287 | <div class="pull-left" style="width: calc(100% - 110px);"> |
288 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 288 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
289 | </div> | 289 | </div> |
290 | <div class="clearfix"></div> | 290 | <div class="clearfix"></div> |
291 | </div> | 291 | </div> |
292 | <div class="col-md-3"> | 292 | <div class="col-md-3"> |
293 | <div class="pull-left" style="width: 40px;"> | 293 | <div class="pull-left" style="width: 40px;"> |
294 | <label class="new-input-label"><b>State</b></label> | 294 | <label class="new-input-label"><b>State</b></label> |
295 | </div> | 295 | </div> |
296 | <div class="pull-left" style="width: calc(100% - 110px);"> | 296 | <div class="pull-left" style="width: calc(100% - 110px);"> |
297 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 297 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
298 | </div> | 298 | </div> |
299 | <div class="clearfix"></div> | 299 | <div class="clearfix"></div> |
300 | </div> | 300 | </div> |
301 | <div class="col-md-3"> | 301 | <div class="col-md-3"> |
302 | <div class="pull-left"> | 302 | <div class="pull-left"> |
303 | <label class="new-input-label"><b>Zip Code</b></label> | 303 | <label class="new-input-label"><b>Zip Code</b></label> |
304 | </div> | 304 | </div> |
305 | <div class="pull-right" style="width: calc(100% - 60px);"> | 305 | <div class="pull-right" style="width: calc(100% - 60px);"> |
306 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 306 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
307 | </div> | 307 | </div> |
308 | <div class="clearfix"></div> | 308 | <div class="clearfix"></div> |
309 | </div> | 309 | </div> |
310 | </div> | 310 | </div> |
311 | <div class="clearfix"></div> | 311 | <div class="clearfix"></div> |
312 | <br/> | 312 | <br/> |
313 | <div class="col-xs-12"> | 313 | <div class="col-xs-12"> |
314 | 314 | ||
315 | <div class="col-md-6"> | 315 | <div class="col-md-6"> |
316 | <div class="pull-left" style="width: 110px;"> | 316 | <div class="pull-left" style="width: 110px;"> |
317 | <label class="new-input-label"><b>Country</b></label> | 317 | <label class="new-input-label"><b>Country</b></label> |
318 | </div> | 318 | </div> |
319 | <div class="pull-left" style="width: calc(100% - 110px);"> | 319 | <div class="pull-left" style="width: calc(100% - 110px);"> |
320 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 320 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
321 | </div> | 321 | </div> |
322 | <div class="clearfix"></div> | 322 | <div class="clearfix"></div> |
323 | </div> | 323 | </div> |
324 | <div class="col-md-6"> | 324 | <div class="col-md-6"> |
325 | <div class="pull-left" style="width: 110px;"> | 325 | <div class="pull-left" style="width: 110px;"> |
326 | <label class="new-input-label"><b>Internal Note</b></label> | 326 | <label class="new-input-label"><b>Internal Note</b></label> |
327 | </div> | 327 | </div> |
328 | <div class="pull-left" style="width: calc(100% - 110px);"> | 328 | <div class="pull-left" style="width: calc(100% - 110px);"> |
329 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 329 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
330 | </div> | 330 | </div> |
331 | <div class="clearfix"></div> | 331 | <div class="clearfix"></div> |
332 | </div> | 332 | </div> |
333 | </div> | 333 | </div> |
334 | <div class="clearfix"></div> | 334 | <div class="clearfix"></div> |
335 | <!-- <br/> | 335 | <!-- <br/> |
336 | <div class="col-xs-12"> | 336 | <div class="col-xs-12"> |
337 | <div class="col-md-2 Airport"></div> | 337 | <div class="col-md-2 Airport"></div> |
338 | <div class="col-md-10 Airport"> | 338 | <div class="col-md-10 Airport"> |
339 | <div class="pull-right"> | 339 | <div class="pull-right"> |
340 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 340 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
341 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 341 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
342 | </div> | 342 | </div> |
343 | </div> | 343 | </div> |
344 | </div> --> | 344 | </div> --> |
345 | </div> | 345 | </div> |
346 | </div> | 346 | </div> |
347 | <div class="clearfix"></div> | 347 | <div class="clearfix"></div> |
348 | </div> | 348 | </div> |
349 | </div> | 349 | </div> |
350 | </div> | 350 | </div> |
351 | </div> | 351 | </div> |
352 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 352 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
353 | <div> | 353 | <div> |
354 | <div class="row" style="margin: 0;"> | 354 | <div class="row" style="margin: 0;"> |
355 | <div> | 355 | <div> |
356 | <div class="widget" style="margin-bottom: 0;"> | 356 | <div class="widget" style="margin-bottom: 0;"> |
357 | <div class="widget-header"> | 357 | <div class="widget-header"> |
358 | <i class="icon-pencil"></i> | 358 | <i class="icon-pencil"></i> |
359 | <i class="fa fa-tasks" aria-hidden="true"></i> | 359 | <i class="fa fa-tasks" aria-hidden="true"></i> |
360 | <h3>Add a New Company</h3> | 360 | <h3>Add a New Company</h3> |
361 | <div class="clearfix"></div> | 361 | <div class="clearfix"></div> |
362 | </div> | 362 | </div> |
363 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 363 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
364 | <div class="col-xs-12"> | 364 | <div class="col-xs-12"> |
365 | <div class="widget-header"> | 365 | <div class="widget-header"> |
366 | <i class="fa fa-list"></i> | 366 | <i class="fa fa-list"></i> |
367 | <h3>Aircraft List</h3> | 367 | <h3>Aircraft List</h3> |
368 | </div> | 368 | </div> |
369 | <div class="widget-content" style="padding:0px;border: 0px; "> | 369 | <div class="widget-content" style="padding:0px;border: 0px; "> |
370 | <div class="table-responsive"> | 370 | <div class="table-responsive"> |
371 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> | 371 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> |
372 | <thead> | 372 | <thead> |
373 | <tr> | 373 | <tr> |
374 | <th>Tail</th> | 374 | <th>Tail</th> |
375 | <th>Make</th> | 375 | <th>Make</th> |
376 | <th>Model</th> | 376 | <th>Model</th> |
377 | <th>Size</th> | 377 | <th>Size</th> |
378 | <th>Margin</th> | 378 | <th>Margin</th> |
379 | </tr> | 379 | </tr> |
380 | </thead> | 380 | </thead> |
381 | <tbody> | 381 | <tbody> |
382 | <tr> | 382 | <tr> |
383 | <td> | 383 | <td> |
384 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> | 384 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> |
385 | </td> | 385 | </td> |
386 | <td style="width: 25%;"> | 386 | <td style="width: 25%;"> |
387 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> | 387 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> |
388 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> | 388 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
389 | </select> | 389 | </select> |
390 | </td> | 390 | </td> |
391 | <td style="width: 20%;"> | 391 | <td style="width: 20%;"> |
392 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> | 392 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> |
393 | <option ng-repeat="model in aircraftModalList">{{model}}</option> | 393 | <option ng-repeat="model in aircraftModalList">{{model}}</option> |
394 | </select> | 394 | </select> |
395 | </td> | 395 | </td> |
396 | <td style="width: 25%;"> | 396 | <td style="width: 25%;"> |
397 | <select class="form-control" ng-model="aircraft.size"> | 397 | <select class="form-control" ng-model="aircraft.size"> |
398 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> | 398 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> |
399 | </select> | 399 | </select> |
400 | </td> | 400 | </td> |
401 | <td> | 401 | <td> |
402 | <select class="form-control"> | 402 | <select class="form-control"> |
403 | <option>Margin1</option> | 403 | <option>Margin1</option> |
404 | <option>Margin2</option> | 404 | <option>Margin2</option> |
405 | </select> | 405 | </select> |
406 | </td> | 406 | </td> |
407 | </tr> | 407 | </tr> |
408 | </tbody> | 408 | </tbody> |
409 | 409 | ||
410 | </table> --> | 410 | </table> --> |
411 | <table class="table table-striped table-bordered"> | 411 | <table class="table table-striped table-bordered"> |
412 | <thead> | 412 | <thead> |
413 | <tr> | 413 | <tr> |
414 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 414 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
415 | <th>Tail</th> | 415 | <th>Tail</th> |
416 | <th>Make</th> | 416 | <th>Make</th> |
417 | <th>Model</th> | 417 | <th>Model</th> |
418 | <th>Size</th> | 418 | <th>Size</th> |
419 | <th>JET A Margin</th> | 419 | <th>JET A Margin</th> |
420 | <th>AVGS 100LL Margin</th> | 420 | <th>AVGS 100LL Margin</th> |
421 | </tr> | 421 | </tr> |
422 | </thead> | 422 | </thead> |
423 | <tbody> | 423 | <tbody> |
424 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 424 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
425 | <!-- <td> | 425 | <!-- <td> |
426 | <input type="checkbox" ng-model="aircraftData.selected"/> | 426 | <input type="checkbox" ng-model="aircraftData.selected"/> |
427 | </td> --> | 427 | </td> --> |
428 | <td style="width: 15%"> | 428 | <td style="width: 15%"> |
429 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 429 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
430 | </td> | 430 | </td> |
431 | <td style="width: 17%"> | 431 | <td style="width: 17%"> |
432 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 432 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
433 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> | 433 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> |
434 | <option value="" disabled>Select...</option> | 434 | <option value="" disabled>Select...</option> |
435 | </select> | 435 | </select> |
436 | </td> | 436 | </td> |
437 | <td style="width: 17%"> | 437 | <td style="width: 17%"> |
438 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 438 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
439 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 439 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
440 | <option value="" disabled>Select...</option> | 440 | <option value="" disabled>Select...</option> |
441 | </select> | 441 | </select> |
442 | </td><!-- {{size.aircraftSize.id}} --> | 442 | </td><!-- {{size.aircraftSize.id}} --> |
443 | <td style="width: 17%"> | 443 | <td style="width: 17%"> |
444 | <select class="form-control" ng-model="aircraftData.sizeId"> | 444 | <select class="form-control" ng-model="aircraftData.sizeId"> |
445 | <option value="" disabled>Select</option> | 445 | <option value="" disabled>Select</option> |
446 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 446 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
447 | </select> | 447 | </select> |
448 | 448 | ||
449 | </td> | 449 | </td> |
450 | <td style="width: 17%"> | 450 | <td style="width: 17%"> |
451 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 451 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
452 | <option value="" disabled>Select</option> | 452 | <option value="" disabled>Select</option> |
453 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 453 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
454 | </select> | 454 | </select> |
455 | 455 | ||
456 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]" ng-options="margin.id as margin.marginName for margin in jetMarginList"> | 456 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]" ng-options="margin.id as margin.marginName for margin in jetMarginList"> |
457 | <option value="" disabled>Select...</option> | 457 | <option value="" disabled>Select...</option> |
458 | </select> --> | 458 | </select> --> |
459 | </td> | 459 | </td> |
460 | <td style="width: 17%"> | 460 | <td style="width: 17%"> |
461 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 461 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
462 | <option value="" disabled>Select</option> | 462 | <option value="" disabled>Select</option> |
463 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 463 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
464 | </select> | 464 | </select> |
465 | <!-- | 465 | <!-- |
466 | <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 466 | <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
467 | <option value="" disabled>Select...</option> | 467 | <option value="" disabled>Select...</option> |
468 | </select> --> | 468 | </select> --> |
469 | </td> | 469 | </td> |
470 | </tr> | 470 | </tr> |
471 | </tbody> | 471 | </tbody> |
472 | </table> | 472 | </table> |
473 | </div> | 473 | </div> |
474 | <div class="clearfix"></div> | 474 | <div class="clearfix"></div> |
475 | </div> | 475 | </div> |
476 | </div> | 476 | </div> |
477 | <div class="clearfix"></div> | 477 | <div class="clearfix"></div> |
478 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 478 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
479 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 479 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
480 | </div> | 480 | </div> |
481 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> | 481 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> |
482 | <div class="pull-right"> | 482 | <div class="pull-right"> |
483 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> | 483 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> |
484 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> | 484 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> |
485 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> | 485 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> |
486 | </div> | 486 | </div> |
487 | </div> --> | 487 | </div> --> |
488 | </div> | 488 | </div> |
489 | </div> | 489 | </div> |
490 | <div class="clearfix"></div> | 490 | <div class="clearfix"></div> |
491 | </div> | 491 | </div> |
492 | </div> | 492 | </div> |
493 | </div> | 493 | </div> |
494 | </div> | 494 | </div> |
495 | <!-- <div class="modal-body step-3" data-step="3"> | 495 | <!-- <div class="modal-body step-3" data-step="3"> |
496 | This is the final step. | 496 | This is the final step. |
497 | </div> --> | 497 | </div> --> |
498 | <div class="modal-footer" style="border-top: 0;"> | 498 | <div class="modal-footer" style="border-top: 0;"> |
499 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 499 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
500 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 500 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
501 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 501 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
502 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 502 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
503 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 503 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
504 | </div> | 504 | </div> |
505 | </div> | 505 | </div> |
506 | </div> | 506 | </div> |
507 | </form> | 507 | </form> |
508 | 508 | ||
509 | <!-- SetUp fuel order --> | 509 | <!-- SetUp fuel order --> |
510 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 510 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
511 | <div class="modal-dialog modal-lg"> | 511 | <div class="modal-dialog modal-lg"> |
512 | <div class="modal-content"> | 512 | <div class="modal-content"> |
513 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 513 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
514 | <div> | 514 | <div> |
515 | <div class="row" style="margin: 0;"> | 515 | <div class="row" style="margin: 0;"> |
516 | <div> | 516 | <div> |
517 | <div class="widget" style="margin-bottom: 0;"> | 517 | <div class="widget" style="margin-bottom: 0;"> |
518 | <div class="widget-header"> | 518 | <div class="widget-header"> |
519 | <i class="icon-pencil"></i> | 519 | <i class="icon-pencil"></i> |
520 | <i class="fa fa-tasks" aria-hidden="true"></i> | 520 | <i class="fa fa-tasks" aria-hidden="true"></i> |
521 | <h3>Add a Fuel Order</h3> | 521 | <h3>Add a Fuel Order</h3> |
522 | <div class="clearfix"></div> | 522 | <div class="clearfix"></div> |
523 | </div> | 523 | </div> |
524 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 524 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
525 | <div class="col-xs-12"> | 525 | <div class="col-xs-12"> |
526 | <div class="col-xs-12"> | 526 | <div class="col-xs-12"> |
527 | 527 | ||
528 | <div class="col-md-6"> | 528 | <div class="col-md-6"> |
529 | <div class="pull-left" style="width: 110px;"> | 529 | <div class="pull-left" style="width: 110px;"> |
530 | <label class="new-input-label"><b>Company</b></label> | 530 | <label class="new-input-label"><b>Company</b></label> |
531 | </div> | 531 | </div> |
532 | <div class="pull-left" style="width: calc(100% - 110px);"> | 532 | <div class="pull-left" style="width: calc(100% - 110px);"> |
533 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 533 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
534 | <option value="" selected disabled>Select Company</option> | 534 | <option value="" selected disabled>Select Company</option> |
535 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 535 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
536 | </select> --> | 536 | </select> --> |
537 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> | 537 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> |
538 | </div> | 538 | </div> |
539 | <div class="clearfix"></div> | 539 | <div class="clearfix"></div> |
540 | </div> | 540 | </div> |
541 | <div class="col-md-6"> | 541 | <div class="col-md-6"> |
542 | <div class="pull-left" style="width: 110px;"> | 542 | <div class="pull-left" style="width: 110px;"> |
543 | <label class="new-input-label"><b>Product</b></label> | 543 | <label class="new-input-label"><b>Product</b></label> |
544 | </div> | 544 | </div> |
545 | <div class="pull-left" style="width: calc(100% - 110px);"> | 545 | <div class="pull-left" style="width: calc(100% - 110px);"> |
546 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote)" required> | 546 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> |
547 | <option value="" selected disabled>Select Product</option> | 547 | <option value="" selected disabled>Select Product</option> |
548 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 548 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
549 | </select> | 549 | </select> |
550 | </div> | 550 | </div> |
551 | <div class="clearfix"></div> | 551 | <div class="clearfix"></div> |
552 | </div> | 552 | </div> |
553 | 553 | ||
554 | </div> | 554 | </div> |
555 | <div class="clearfix"></div> | 555 | <div class="clearfix"></div> |
556 | <br/> | 556 | <br/> |
557 | 557 | ||
558 | 558 | ||
559 | <div class="col-xs-12"> | 559 | <div class="col-xs-12"> |
560 | 560 | ||
561 | <div class="col-md-6"> | 561 | <div class="col-md-6"> |
562 | <div class="pull-left" style="width: 110px;"> | 562 | <div class="pull-left" style="width: 110px;"> |
563 | <label class="new-input-label"><b>Aircraft</b></label> | 563 | <label class="new-input-label"><b>Aircraft</b></label> |
564 | </div> | 564 | </div> |
565 | <div class="pull-left" style="width: calc(100% - 110px);"> | 565 | <div class="pull-left" style="width: calc(100% - 110px);"> |
566 | <select class="form-control" ng-model="order.aircraftName" required> | 566 | <select class="form-control" ng-model="order.aircraftName" required> |
567 | <option selected disabled value="">Select Aircraft</option> | 567 | <option selected disabled value="">Select Aircraft</option> |
568 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 568 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
569 | </select> | 569 | </select> |
570 | </div> | 570 | </div> |
571 | <div class="clearfix"></div> | 571 | <div class="clearfix"></div> |
572 | </div> | 572 | </div> |
573 | <div class="col-md-6"> | 573 | <div class="col-md-6"> |
574 | <div class="pull-left" style="width: 110px;"> | 574 | <div class="pull-left" style="width: 110px;"> |
575 | <label class="new-input-label"><b>Volume</b></label> | 575 | <label class="new-input-label"><b>Volume</b></label> |
576 | </div> | 576 | </div> |
577 | <div class="pull-left" style="width: calc(100% - 110px);"> | 577 | <div class="pull-left" style="width: calc(100% - 110px);"> |
578 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.volume,'v')" class="form-control" placeholder="" required> | 578 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
579 | </div> | 579 | </div> |
580 | <div class="clearfix"></div> | 580 | <div class="clearfix"></div> |
581 | </div> | 581 | </div> |
582 | 582 | ||
583 | </div> | 583 | </div> |
584 | <div class="clearfix"></div> | 584 | <div class="clearfix"></div> |
585 | <br/> | 585 | <br/> |
586 | 586 | ||
587 | <div class="col-xs-12"> | 587 | <div class="col-xs-12"> |
588 | 588 | ||
589 | <div class="col-md-6"> | 589 | <div class="col-md-6"> |
590 | <div class="pull-left" style="width: 110px;"> | 590 | <div class="pull-left" style="width: 110px;"> |
591 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 591 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
592 | </div> | 592 | </div> |
593 | <div class="pull-left" style="width: calc(100% - 110px);"> | 593 | <div class="pull-left" style="width: calc(100% - 110px);"> |
594 | <div style="width: 50%; float: left;"> | 594 | <div style="width: 50%; float: left;"> |
595 | Date | 595 | Date |
596 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 596 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
597 | </div> | 597 | </div> |
598 | <div style="width: 50%; float: left;"> | 598 | <div style="width: 50%; float: left;"> |
599 | Time | 599 | Time |
600 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 600 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
601 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 601 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
602 | </select> | 602 | </select> |
603 | 603 | ||
604 | </div> | 604 | </div> |
605 | </div> | 605 | </div> |
606 | <div class="clearfix"></div> | 606 | <div class="clearfix"></div> |
607 | </div> | 607 | </div> |
608 | 608 | ||
609 | <div class="col-md-6" style="margin-top: 22px;"> | 609 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
610 | <div class="pull-left" style="width: 110px;"> | 610 | <div class="pull-left" style="width: 110px;"> |
611 | <label class="new-input-label"><b>Invoiced</b></label> | 611 | <label class="new-input-label"><b>Invoiced</b></label> |
612 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 612 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
613 | </div> | 613 | </div> |
614 | <div class="pull-left" style="width: calc(100% - 110px);"> | 614 | <div class="pull-left" style="width: calc(100% - 110px);"> |
615 | <input type="text" ng-model="order.invoiced" ng-keyup="addTotal(order.invoiced,'i')" class="form-control" placeholder=""> | 615 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
616 | </div> | 616 | </div> |
617 | <div class="clearfix"></div> | 617 | <div class="clearfix"></div> |
618 | </div> | 618 | </div> |
619 | </div> | 619 | </div> |
620 | <div class="clearfix"></div><br> | 620 | <div class="clearfix"></div><br> |
621 | 621 | ||
622 | 622 | ||
623 | <div class="col-xs-12"> | 623 | <div class="col-xs-12"> |
624 | 624 | ||
625 | <div class="col-md-6"> | 625 | <div class="col-md-6"> |
626 | <div class="pull-left" style="width: 110px;"> | 626 | <div class="pull-left" style="width: 110px;"> |
627 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 627 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
628 | </div> | 628 | </div> |
629 | <div class="pull-left" style="width: calc(100% - 110px);"> | 629 | <div class="pull-left" style="width: calc(100% - 110px);"> |
630 | <div style="width: 50%; float: left;"> | 630 | <div style="width: 50%; float: left;"> |
631 | Date | 631 | Date |
632 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 632 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
633 | </div> | 633 | </div> |
634 | <div style="width: 50%; float: left;"> | 634 | <div style="width: 50%; float: left;"> |
635 | Time | 635 | Time |
636 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 636 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
637 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 637 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
638 | </select> | 638 | </select> |
639 | 639 | ||
640 | </div> | 640 | </div> |
641 | </div> | 641 | </div> |
642 | <div class="clearfix"></div> | 642 | <div class="clearfix"></div> |
643 | </div> | 643 | </div> |
644 | 644 | ||
645 | <div class="col-md-6" style="margin-top: 22px;"> | 645 | <div class="col-md-6" style="margin-top: 22px;"> |
646 | <div class="pull-left" style="width: 110px;"> | 646 | <div class="pull-left" style="width: 110px;"> |
647 | <label class="new-input-label"><b>Total</b></label> | 647 | <label class="new-input-label"><b>Total</b></label> |
648 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 648 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
649 | </div> | 649 | </div> |
650 | <div class="pull-left" style="width: calc(100% - 110px);"> | 650 | <div class="pull-left" style="width: calc(100% - 110px);"> |
651 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 651 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
652 | </div> | 652 | </div> |
653 | </div> | 653 | </div> |
654 | </div> | 654 | </div> |
655 | <div class="clearfix"></div><br> | 655 | <div class="clearfix"></div><br> |
656 | 656 | ||
657 | 657 | ||
658 | <div class="col-xs-12"> | 658 | <div class="col-xs-12"> |
659 | 659 | ||
660 | <div class="col-md-6"> | 660 | <div class="col-md-6"> |
661 | <div class="pull-left" style="width: 110px;"> | 661 | <div class="pull-left" style="width: 110px;"> |
662 | <label class="new-input-label"><b>Fuel on</b></label> | 662 | <label class="new-input-label"><b>Fuel on</b></label> |
663 | </div> | 663 | </div> |
664 | <div class="pull-left" style="width: calc(100% - 110px);"> | 664 | <div class="pull-left" style="width: calc(100% - 110px);"> |
665 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 665 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
666 | <option value="" disabled selected hidden>Select...</option> | 666 | <option value="" disabled selected hidden>Select...</option> |
667 | <option value="Arrival">Arrival</option> | 667 | <option value="Arrival">Arrival</option> |
668 | <option value="Departure">Departure</option> | 668 | <option value="Departure">Departure</option> |
669 | </select> | 669 | </select> |
670 | </div> | 670 | </div> |
671 | <div class="clearfix"></div> | 671 | <div class="clearfix"></div> |
672 | </div> | 672 | </div> |
673 | 673 | ||
674 | <div class="col-md-6"> | 674 | <div class="col-md-6"> |
675 | <div class="pull-left" style="width: 110px;"> | 675 | <div class="pull-left" style="width: 110px;"> |
676 | <label class="new-input-label"><b>FBO Cost</b></label> | 676 | <label class="new-input-label"><b>FBO Cost</b></label> |
677 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 677 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
678 | </div> | 678 | </div> |
679 | <div class="pull-left" style="width: calc(100% - 110px);"> | 679 | <div class="pull-left" style="width: calc(100% - 110px);"> |
680 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 680 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> |
681 | </div> | 681 | </div> |
682 | <div class="clearfix"></div> | 682 | <div class="clearfix"></div> |
683 | </div> | 683 | </div> |
684 | </div> | 684 | </div> |
685 | <div class="clearfix"></div><br> | 685 | <div class="clearfix"></div><br> |
686 | 686 | ||
687 | <div class="col-xs-12"> | 687 | <div class="col-xs-12"> |
688 | <div class="col-md-6"> | 688 | <div class="col-md-6"> |
689 | <div class="pull-left" style="width: 110px;"> | 689 | <div class="pull-left" style="width: 110px;"> |
690 | <label class="new-input-label"><b>Source</b></label> | 690 | <label class="new-input-label"><b>Source</b></label> |
691 | </div> | 691 | </div> |
692 | <div class="pull-left" style="width: calc(100% - 110px);"> | 692 | <div class="pull-left" style="width: calc(100% - 110px);"> |
693 | <select class="form-control" ng-model="order.source" style="width: 100%;"> | 693 | <select class="form-control" ng-model="order.source" style="width: 100%;"> |
694 | <option value="" disabled selected hidden>Select Source</option> | 694 | <option value="" disabled selected hidden>Select Source</option> |
695 | <option value="Tenant">Tenant</option> | 695 | <option value="Tenant">Tenant</option> |
696 | <option value="CAA">CAA</option> | 696 | <option value="CAA">CAA</option> |
697 | <option value="Tenant/CAA">Tenant/CAA</option> | 697 | <option value="Tenant/CAA">Tenant/CAA</option> |
698 | </select> | 698 | </select> |
699 | </div> | 699 | </div> |
700 | <div class="clearfix"></div> | 700 | <div class="clearfix"></div> |
701 | </div> | 701 | </div> |
702 | </div> | 702 | </div> |
703 | <div class="clearfix"></div> | 703 | <div class="clearfix"></div> |
704 | <br/> | 704 | <br/> |
705 | <div class="col-xs-12"> | 705 | <div class="col-xs-12"> |
706 | 706 | ||
707 | 707 | ||
708 | <div class="col-md-6"> | 708 | <div class="col-md-6"> |
709 | <div class="pull-left" style="width: 110px;"> | 709 | <div class="pull-left" style="width: 110px;"> |
710 | <label class="new-input-label"><b>Certificate Type</b></label> | 710 | <label class="new-input-label"><b>Certificate Type</b></label> |
711 | </div> | 711 | </div> |
712 | <div class="pull-left" style="width: calc(100% - 110px);"> | 712 | <div class="pull-left" style="width: calc(100% - 110px);"> |
713 | <select class="form-control" ng-model="order.certificateType" style="width: 100%;"> | 713 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
714 | <option value="" disabled selected hidden>Select...</option> | 714 | <option value="" disabled selected hidden>Select...</option> |
715 | <option value="corporate">Part 91 (Corporate)</option> | 715 | <option value="corporate">Part 91 (Corporate)</option> |
716 | <option value="charter">Part 135 (Charter)</option> | 716 | <option value="charter">Part 135 (Charter)</option> |
717 | <option value="scheduled">Part 121 (Scheduled)</option> | 717 | <option value="scheduled">Part 121 (Scheduled)</option> |
718 | <option value="military">Military</option> | 718 | <option value="military">Military</option> |
719 | <option value="government">Government</option> | 719 | <option value="government">Government</option> |
720 | </select> | 720 | </select> |
721 | </div> | 721 | </div> |
722 | <div class="clearfix"></div> | 722 | <div class="clearfix"></div> |
723 | </div> | 723 | </div> |
724 | <div class="col-md-6"> | 724 | <div class="col-md-6"> |
725 | <div class="pull-left" style="width: 110px;"> | 725 | <div class="pull-left" style="width: 110px;"> |
726 | <label class="new-input-label"><b>Status</b></label> | 726 | <label class="new-input-label"><b>Status</b></label> |
727 | </div> | 727 | </div> |
728 | <div class="pull-left" style="width: calc(100% - 110px);"> | 728 | <div class="pull-left" style="width: calc(100% - 110px);"> |
729 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 729 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
730 | <option value="" disabled selected hidden>pending</option> | 730 | <option value="" disabled selected hidden>pending</option> |
731 | <!-- <option value="pending">pending</option> --> | 731 | <option value="pending">pending</option> |
732 | <option value="invoiced">invoiced</option> | 732 | <option value="invoiced">invoiced</option> |
733 | <option value="paid">paid</option> | 733 | <option value="paid">paid</option> |
734 | <option value="cancelled">cancelled</option> | 734 | <!-- <option value="cancelled">cancelled</option> |
735 | <option value="archived">archived</option> | 735 | <option value="archived">archived</option> --> |
736 | </select> | 736 | </select> |
737 | </div> | 737 | </div> |
738 | <div class="clearfix"></div> | 738 | <div class="clearfix"></div> |
739 | </div> | 739 | </div> |
740 | </div> | 740 | </div> |
741 | <div class="clearfix"></div><br> | 741 | <div class="clearfix"></div><br> |
742 | 742 | ||
743 | </div> | 743 | </div> |
744 | </div> | 744 | </div> |
745 | </div> | 745 | </div> |
746 | </div> | 746 | </div> |
747 | </div> | 747 | </div> |
748 | </div> | 748 | </div> |
749 | <div class="modal-footer" style="border-top: 0;"> | 749 | <div class="modal-footer" style="border-top: 0;"> |
750 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 750 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
751 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> | 751 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> |
752 | </div> | 752 | </div> |
753 | </div> | 753 | </div> |
754 | </div> | 754 | </div> |
755 | </div> | 755 | </div> |
756 | </form> | 756 | </form> |
757 | 757 | ||
758 | 758 | ||
759 | <div class="myLoader" ng-show="showLoader"> | 759 | <div class="myLoader" ng-show="showLoader"> |
760 | <img src="../img/hourglass.gif" width="50px;"> | 760 | <img src="../img/hourglass.gif" width="50px;"> |
761 | </div> | 761 | </div> |
762 | <script src="js/multi-step-modal.js"></script> | 762 | <script src="js/multi-step-modal.js"></script> |
763 | <script> | 763 | <script> |
764 | sendEvent = function(sel, step) { | 764 | sendEvent = function(sel, step) { |
765 | $(sel).trigger('next.m.' + step); | 765 | $(sel).trigger('next.m.' + step); |
766 | } | 766 | } |
767 | </script> | 767 | </script> |