Commit 4f1de64cdb37fdb65a7ac175911bd7221cf2f75c
1 parent
169fc146e9
Exists in
master
final phase task
Showing
6 changed files
with
224 additions
and
61 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 | /*function getAllCompanies(){ | 54 | /*function getAllCompanies(){ |
55 | CustomersService.getAllCompanies().then(function(result) { | 55 | CustomersService.getAllCompanies().then(function(result) { |
56 | $scope.companyList = result; | 56 | $scope.companyList = result; |
57 | for(var i=0; i<$scope.companyList.length; i++){ | 57 | for(var i=0; i<$scope.companyList.length; i++){ |
58 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 58 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
59 | } | 59 | } |
60 | }) | 60 | }) |
61 | 61 | ||
62 | }*/ | 62 | }*/ |
63 | 63 | ||
64 | $scope.statusFilter = [ | 64 | $scope.statusFilter = [ |
65 | { | 65 | { |
66 | id : "", | 66 | id : "", |
67 | title : "Show All" | 67 | title : "Show All" |
68 | }, | 68 | }, |
69 | { | 69 | { |
70 | id : "true", | 70 | id : "true", |
71 | title : "Active" | 71 | title : "Active" |
72 | }, | 72 | }, |
73 | { | 73 | { |
74 | id : "false", | 74 | id : "false", |
75 | title : "Inactive" | 75 | title : "Inactive" |
76 | } | 76 | } |
77 | ] | 77 | ] |
78 | 78 | ||
79 | function getAllCompanies() { | 79 | function getAllCompanies() { |
80 | CustomersService.getAllCompanies().then(function(result) { | 80 | CustomersService.getAllCompanies().then(function(result) { |
81 | $scope.companyList = result; | 81 | $scope.companyList = result; |
82 | //console.log("result",result) | 82 | //console.log("result",result) |
83 | for (var i = 0; i < $scope.companyList.length; i++) { | 83 | for (var i = 0; i < $scope.companyList.length; i++) { |
84 | if ($scope.companyList[i].companyContact != null) { | 84 | if ($scope.companyList[i].companyContact != null) { |
85 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 85 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
86 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 86 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | if ($scope.companyList[i].primaryContact != null) { | 89 | if ($scope.companyList[i].primaryContact != null) { |
90 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 90 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
91 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 91 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
92 | } | 92 | } |
93 | } | 93 | } |
94 | if ($scope.companyList[i].margin != null) { | 94 | if ($scope.companyList[i].margin != null) { |
95 | if ($scope.companyList[i].margin.marginName != null) { | 95 | if ($scope.companyList[i].margin.marginName != null) { |
96 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 96 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
97 | } | 97 | } |
98 | } | 98 | } |
99 | } | 99 | } |
100 | $scope.displayCompanyList = new NgTableParams({ | 100 | $scope.displayCompanyList = new NgTableParams({ |
101 | page : 1, | 101 | page : 1, |
102 | count : 10, | 102 | count : 10, |
103 | }, { | 103 | }, { |
104 | data : $scope.companyList | 104 | data : $scope.companyList |
105 | }); | 105 | }); |
106 | $scope.showLoader = false; | 106 | $scope.showLoader = false; |
107 | }) | 107 | }) |
108 | } | 108 | } |
109 | 109 | ||
110 | getAllCompanies(); | 110 | getAllCompanies(); |
111 | 111 | ||
112 | $scope.getAircraftMakeAndModel=function (data) { | ||
113 | for(var i = 0; i < $scope.aircraftList.length; i++){ | ||
114 | if($scope.aircraftList[i].tail === data){ | ||
115 | $scope.order.aircraftMake = $scope.aircraftList[i].make; | ||
116 | $scope.order.aircraftModel = $scope.aircraftList[i].model; | ||
117 | } | ||
118 | |||
119 | } | ||
120 | } | ||
121 | |||
112 | $scope.editMargin = function(customer) { | 122 | $scope.editMargin = function(customer) { |
113 | //console.log('customer', customer); | 123 | //console.log('customer', customer); |
114 | $scope.showLoader = true; | 124 | $scope.showLoader = true; |
115 | event.stopPropagation(); | 125 | event.stopPropagation(); |
116 | 126 | ||
117 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin | 127 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin |
118 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" | 128 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" |
119 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" | 129 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" |
120 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant | 130 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant |
121 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor | 131 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor |
122 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; | 132 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; |
123 | 133 | ||
124 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { | 134 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { |
125 | if (result != null && result.success) { | 135 | if (result != null && result.success) { |
126 | $scope.showLoader = false; | 136 | $scope.showLoader = false; |
127 | toastr.success('' + result.success + '', { | 137 | toastr.success('' + result.success + '', { |
128 | closeButton : true | 138 | closeButton : true |
129 | }) | 139 | }) |
130 | getAllCompanies(); | 140 | getAllCompanies(); |
131 | } else { | 141 | } else { |
132 | $scope.showLoader = false; | 142 | $scope.showLoader = false; |
133 | toastr.error('' + result.statusText + '', { | 143 | toastr.error('' + result.statusText + '', { |
134 | closeButton : true | 144 | closeButton : true |
135 | }) | 145 | }) |
136 | } | 146 | } |
137 | }) | 147 | }) |
138 | } | 148 | } |
139 | 149 | ||
140 | getData(); | 150 | getData(); |
141 | function getData() { | 151 | function getData() { |
142 | $scope.showLoader = true; | 152 | $scope.showLoader = true; |
143 | CustomersService.getAircraftMake().then(function(result) { | 153 | CustomersService.getAircraftMake().then(function(result) { |
144 | //console.log("==aircrafts===",result) | 154 | //console.log("==aircrafts===",result) |
145 | $scope.aircraftMakeList = result; | 155 | $scope.aircraftMakeList = result; |
146 | $scope.showLoader = false; | 156 | $scope.showLoader = false; |
147 | }) | 157 | }) |
148 | } | 158 | } |
149 | // CustomersService.getMargin().then(function(result) { | 159 | // CustomersService.getMargin().then(function(result) { |
150 | // $scope.marginList = result; | 160 | // $scope.marginList = result; |
151 | // }) | 161 | // }) |
152 | $scope.marginFilterOptions = []; | 162 | $scope.marginFilterOptions = []; |
153 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 163 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
154 | $scope.showLoader = true; | 164 | $scope.showLoader = true; |
155 | $scope.jetMarginList = result; | 165 | $scope.jetMarginList = result; |
156 | //console.log("jet margin",result,$scope.userProfileId) | 166 | //console.log("jet margin",result,$scope.userProfileId) |
157 | $scope.marginFilterOptions.push({ | 167 | $scope.marginFilterOptions.push({ |
158 | 'id' : '', | 168 | 'id' : '', |
159 | 'title' : 'Show All' | 169 | 'title' : 'Show All' |
160 | }); | 170 | }); |
161 | for (var i = 0; i < result.length; i++) { | 171 | for (var i = 0; i < result.length; i++) { |
162 | $scope.marginFilterOptions.push({ | 172 | $scope.marginFilterOptions.push({ |
163 | 'id' : result[i].id, | 173 | 'id' : result[i].id, |
164 | 'title' : result[i].marginName | 174 | 'title' : result[i].marginName |
165 | }) | 175 | }) |
166 | } | 176 | } |
167 | $scope.showLoader = false; | 177 | $scope.showLoader = false; |
168 | }) | 178 | }) |
169 | 179 | ||
170 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 180 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
171 | $scope.avgsMarginList = result; | 181 | $scope.avgsMarginList = result; |
172 | // console.log('avgsMarginList',result) | 182 | // console.log('avgsMarginList',result) |
173 | }) | 183 | }) |
174 | 184 | ||
175 | 185 | ||
176 | $scope.showCompanyError = false; | 186 | $scope.showCompanyError = false; |
177 | $scope.showMarginError = false; | 187 | $scope.showMarginError = false; |
178 | 188 | ||
179 | $scope.removeValidation = function() { | 189 | $scope.removeValidation = function() { |
180 | $scope.showCompanyError = false; | 190 | $scope.showCompanyError = false; |
181 | $('.companyNameInput').removeClass('customErrorInput'); | 191 | $('.companyNameInput').removeClass('customErrorInput'); |
182 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 192 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
183 | $('.companyNameInput').addClass('customErrorInput'); | 193 | $('.companyNameInput').addClass('customErrorInput'); |
184 | $scope.showCompanyError = true; | 194 | $scope.showCompanyError = true; |
185 | } | 195 | } |
186 | } | 196 | } |
187 | 197 | ||
188 | $scope.removeMarginValidation = function() { | 198 | $scope.removeMarginValidation = function() { |
189 | $scope.showMarginError = false; | 199 | $scope.showMarginError = false; |
190 | $('.marginSelectBox').removeClass('customErrorInput'); | 200 | $('.marginSelectBox').removeClass('customErrorInput'); |
191 | } | 201 | } |
192 | 202 | ||
193 | var companyData; | 203 | var companyData; |
194 | $scope.addFirstData = function(sel, step) { | 204 | $scope.addFirstData = function(sel, step) { |
195 | $scope.showLoader = true; | 205 | $scope.showLoader = true; |
196 | if ($scope.data.companyName == undefined) { | 206 | if ($scope.data.companyName == undefined) { |
197 | $scope.showCompanyError = true; | 207 | $scope.showCompanyError = true; |
198 | $('.companyNameInput').addClass('customErrorInput'); | 208 | $('.companyNameInput').addClass('customErrorInput'); |
199 | } else if ($scope.data.masterMargin == undefined) { | 209 | } else if ($scope.data.masterMargin == undefined) { |
200 | $scope.showMarginError = true; | 210 | $scope.showMarginError = true; |
201 | $('.marginSelectBox').addClass('customErrorInput'); | 211 | $('.marginSelectBox').addClass('customErrorInput'); |
202 | } else { | 212 | } else { |
203 | $scope.aircraftDetails = [ { | 213 | $scope.aircraftDetails = [ { |
204 | 'tail' : '', | 214 | 'tail' : '', |
205 | 'make' : '', | 215 | 'make' : '', |
206 | 'model' : '', | 216 | 'model' : '', |
207 | 'sizeId' : '', | 217 | 'sizeId' : '', |
208 | 'marginId' : $scope.data.masterMargin, | 218 | 'marginId' : $scope.data.masterMargin, |
209 | 'avgasMarginId' : $scope.data.avgasMargin | 219 | 'avgasMarginId' : $scope.data.avgasMargin |
210 | } ]; | 220 | } ]; |
211 | 221 | ||
212 | $(sel).trigger('next.m.' + step); | 222 | $(sel).trigger('next.m.' + step); |
213 | getData(); | 223 | getData(); |
214 | } | 224 | } |
215 | $scope.showLoader = false; | 225 | $scope.showLoader = false; |
216 | } | 226 | } |
217 | 227 | ||
218 | $scope.addNew = function() { | 228 | $scope.addNew = function() { |
219 | $scope.showLoader = true; | 229 | $scope.showLoader = true; |
220 | $scope.aircraftDetails.push({ | 230 | $scope.aircraftDetails.push({ |
221 | 'tail' : '', | 231 | 'tail' : '', |
222 | 'make' : '', | 232 | 'make' : '', |
223 | 'model' : '', | 233 | 'model' : '', |
224 | 'sizeId' : '', | 234 | 'sizeId' : '', |
225 | 'marginId' : $scope.data.masterMargin, | 235 | 'marginId' : $scope.data.masterMargin, |
226 | 'avgasMarginId' : $scope.data.avgasMargin | 236 | 'avgasMarginId' : $scope.data.avgasMargin |
227 | }); | 237 | }); |
228 | $scope.showLoader = false; | 238 | $scope.showLoader = false; |
229 | }; | 239 | }; |
230 | 240 | ||
231 | $scope.aircraftIdx = ''; | 241 | $scope.aircraftIdx = ''; |
232 | $scope.checkTail = function(tail, idx){ | 242 | $scope.checkTail = function(tail, idx){ |
233 | var data = "tail=" + tail; | 243 | var data = "tail=" + tail; |
234 | $scope.aircraftIdx = idx; | 244 | $scope.aircraftIdx = idx; |
235 | CustomersService.checkTailRegistration(data).then(function(result) { | 245 | CustomersService.checkTailRegistration(data).then(function(result) { |
236 | if(result.error) { | 246 | if(result.error) { |
237 | $scope.aircraftMessage = result.error; | 247 | $scope.aircraftMessage = result.error; |
238 | $scope.openAddAirCraftError(); | 248 | $scope.openAddAirCraftError(); |
239 | } else if(result.warning) { | 249 | } else if(result.warning) { |
240 | $scope.aircraftMessage = result.warning; | 250 | $scope.aircraftMessage = result.warning; |
241 | $scope.openAddAirCraftWarning(); | 251 | $scope.openAddAirCraftWarning(); |
242 | } | 252 | } |
243 | }) | 253 | }) |
244 | } | 254 | } |
245 | 255 | ||
246 | $scope.openAddAirCraftError = function() { | 256 | $scope.openAddAirCraftError = function() { |
247 | $('#addAirCraftError').css('display', 'block'); | 257 | $('#addAirCraftError').css('display', 'block'); |
248 | } | 258 | } |
249 | 259 | ||
250 | $scope.openAddAirCraftWarning = function() { | 260 | $scope.openAddAirCraftWarning = function() { |
251 | $('#addAirCraftWarning').css('display', 'block'); | 261 | $('#addAirCraftWarning').css('display', 'block'); |
252 | } | 262 | } |
253 | $scope.acceptAirCraftError = function() { | 263 | $scope.acceptAirCraftError = function() { |
254 | $('#addAirCraftWarning').css('display', 'none'); | 264 | $('#addAirCraftWarning').css('display', 'none'); |
255 | } | 265 | } |
256 | 266 | ||
257 | $scope.cancelAirCraftError = function() { | 267 | $scope.cancelAirCraftError = function() { |
258 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 268 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
259 | $('#addAirCraftWarning').css('display', 'none'); | 269 | $('#addAirCraftWarning').css('display', 'none'); |
260 | $('#addAirCraftError').css('display', 'none'); | 270 | $('#addAirCraftError').css('display', 'none'); |
261 | } | 271 | } |
262 | 272 | ||
263 | 273 | ||
264 | /*$scope.getModal = function(makeId, index) { | 274 | /*$scope.getModal = function(makeId, index) { |
265 | $scope.showLoader = true; | 275 | $scope.showLoader = true; |
266 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 276 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
267 | $scope.showLoader = false; | 277 | $scope.showLoader = false; |
268 | $scope.aircraftDetails[index].aircraftModalList = result; | 278 | $scope.aircraftDetails[index].aircraftModalList = result; |
269 | }) | 279 | }) |
270 | }*/ | 280 | }*/ |
271 | $scope.getModal = function(makeId, index) { | 281 | $scope.getModal = function(makeId, index) { |
272 | $scope.showLoader = true; | 282 | $scope.showLoader = true; |
273 | $scope.aircraft.make = makeId; | 283 | $scope.aircraft.make = makeId; |
274 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 284 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
275 | $scope.showLoader = false; | 285 | $scope.showLoader = false; |
276 | $scope.aircraftDetails[index].aircraftModalList = result; | 286 | $scope.aircraftDetails[index].aircraftModalList = result; |
277 | }) | 287 | }) |
278 | } | 288 | } |
279 | 289 | ||
280 | 290 | ||
281 | $scope.selectedOption = ''; | 291 | $scope.selectedOption = ''; |
282 | $scope.getSize = function(model, index) { | 292 | $scope.getSize = function(model, index) { |
283 | $scope.showLoader = true; | 293 | $scope.showLoader = true; |
284 | $scope.aircraft.model = model; | 294 | $scope.aircraft.model = model; |
285 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 295 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
286 | $scope.showLoader = false; | 296 | $scope.showLoader = false; |
287 | $scope.aircraftDetails[index].aircraftSizeList = result; | 297 | $scope.aircraftDetails[index].aircraftSizeList = result; |
288 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | 298 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); |
289 | 299 | ||
290 | }) | 300 | }) |
291 | } | 301 | } |
292 | 302 | ||
293 | /*$scope.getSize = function(model, index) { | 303 | /*$scope.getSize = function(model, index) { |
294 | $scope.showLoader = true; | 304 | $scope.showLoader = true; |
295 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 305 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
296 | $scope.showLoader = false; | 306 | $scope.showLoader = false; |
297 | $scope.aircraftDetails[index].aircraftSizeList = result; | 307 | $scope.aircraftDetails[index].aircraftSizeList = result; |
298 | }) | 308 | }) |
299 | }*/ | 309 | }*/ |
300 | 310 | ||
301 | $scope.getFuelType = function(size, index) { | 311 | $scope.getFuelType = function(size, index) { |
302 | $scope.showLoader = true; | 312 | $scope.showLoader = true; |
303 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 313 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
304 | ViewCompanyService.checkFuelType(data).then(function(result){ | 314 | ViewCompanyService.checkFuelType(data).then(function(result){ |
305 | $scope.showLoader = false; | 315 | $scope.showLoader = false; |
306 | if (result.type == "JetA") { | 316 | if (result.type == "JetA") { |
307 | $scope.jetShow[index] = false; | 317 | $scope.jetShow[index] = false; |
308 | $scope.marginShow[index] = true; | 318 | $scope.marginShow[index] = true; |
309 | } else if (result.type == "Avgas") { | 319 | } else if (result.type == "Avgas") { |
310 | $scope.jetShow[index] = true; | 320 | $scope.jetShow[index] = true; |
311 | $scope.marginShow[index] = false; | 321 | $scope.marginShow[index] = false; |
312 | }else { | 322 | }else { |
313 | $scope.jetShow[index] = true; | 323 | $scope.jetShow[index] = true; |
314 | $scope.marginShow[index] = true; | 324 | $scope.marginShow[index] = true; |
315 | } | 325 | } |
316 | }) | 326 | }) |
317 | } | 327 | } |
318 | 328 | ||
319 | $scope.aircraftListData = {}; | 329 | $scope.aircraftListData = {}; |
320 | $scope.addData = []; | 330 | $scope.addData = []; |
321 | $scope.tailArray = []; | 331 | $scope.tailArray = []; |
322 | function check(array){ | 332 | function check(array){ |
323 | return (new Set(array)).size !== array.length; | 333 | return (new Set(array)).size !== array.length; |
324 | } | 334 | } |
325 | $scope.saveCompanyData = function() { | 335 | $scope.saveCompanyData = function() { |
326 | // console.log("company data --",$scope.data) | 336 | // console.log("company data --",$scope.data) |
327 | CustomersService.addCompany($scope.data).then(function(result) { | 337 | CustomersService.addCompany($scope.data).then(function(result) { |
328 | $scope.tailArray = []; | 338 | $scope.tailArray = []; |
329 | $scope.addData =[]; | 339 | $scope.addData =[]; |
330 | $scope.accountId = result; | 340 | $scope.accountId = result; |
331 | $scope.aircraft.accountId = $scope.accountId; | 341 | $scope.aircraft.accountId = $scope.accountId; |
332 | 342 | ||
333 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 343 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
334 | $scope.addData.push({ | 344 | $scope.addData.push({ |
335 | 'tail' : $scope.aircraftDetails[i].tail, | 345 | 'tail' : $scope.aircraftDetails[i].tail, |
336 | 'make' : $scope.aircraftDetails[i].make, | 346 | 'make' : $scope.aircraftDetails[i].make, |
337 | 'model' : $scope.aircraftDetails[i].model, | 347 | 'model' : $scope.aircraftDetails[i].model, |
338 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 348 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
339 | 'marginId' : $scope.aircraftDetails[i].marginId, | 349 | 'marginId' : $scope.aircraftDetails[i].marginId, |
340 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId | 350 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId |
341 | }); | 351 | }); |
342 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 352 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
343 | } | 353 | } |
344 | 354 | ||
345 | if (check($scope.tailArray)) { | 355 | if (check($scope.tailArray)) { |
346 | toastr.error('Duplicate Tail Added.', { | 356 | toastr.error('Duplicate Tail Added.', { |
347 | closeButton: true | 357 | closeButton: true |
348 | }) | 358 | }) |
349 | }else{ | 359 | }else{ |
350 | $scope.aircraftListData.aircraftList = $scope.addData; | 360 | $scope.aircraftListData.aircraftList = $scope.addData; |
351 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 361 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
352 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { | 362 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { |
353 | $scope.aircraftListData.aircraftList = []; | 363 | $scope.aircraftListData.aircraftList = []; |
354 | }*/ | 364 | }*/ |
355 | 365 | ||
356 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 366 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
357 | 367 | ||
358 | if (result != null && result.success) { | 368 | if (result != null && result.success) { |
359 | 369 | ||
360 | toastr.success('' + result.success + '', { | 370 | toastr.success('' + result.success + '', { |
361 | closeButton : true | 371 | closeButton : true |
362 | }) | 372 | }) |
363 | $('#demo-modal-3').css('display', 'none'); | 373 | $('#demo-modal-3').css('display', 'none'); |
364 | $('.modal-backdrop').css('display', 'none'); | 374 | $('.modal-backdrop').css('display', 'none'); |
365 | getAllCompanies(); | 375 | getAllCompanies(); |
366 | location.reload(); | 376 | location.reload(); |
367 | } else { | 377 | } else { |
368 | toastr.error('' + result.statusText + '', { | 378 | toastr.error('' + result.statusText + '', { |
369 | closeButton : true | 379 | closeButton : true |
370 | }) | 380 | }) |
371 | } | 381 | } |
372 | }); | 382 | }); |
373 | } | 383 | } |
374 | }) | 384 | }) |
375 | } | 385 | } |
376 | 386 | ||
377 | /*add a fuel order*/ | 387 | /*add a fuel order*/ |
378 | $scope.getOrders = function() { | 388 | $scope.getOrders = function() { |
379 | fuelOrdersService.getOrders().then(function(result) { | 389 | fuelOrdersService.getOrders().then(function(result) { |
380 | $scope.orderdata = result; | 390 | $scope.orderdata = result; |
381 | for (var i = 0; i < $scope.orderdata.length; i++) { | 391 | for (var i = 0; i < $scope.orderdata.length; i++) { |
382 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 392 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
383 | 393 | ||
384 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 394 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
385 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 395 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
386 | // str = str.slice(4,16) | 396 | // str = str.slice(4,16) |
387 | $scope.orderdata[i].upliftDateString = str | 397 | $scope.orderdata[i].upliftDateString = str |
388 | // console.log(str); | 398 | // console.log(str); |
389 | 399 | ||
390 | } | 400 | } |
391 | 401 | ||
392 | $scope.displayFuelOrderList = new NgTableParams({ | 402 | $scope.displayFuelOrderList = new NgTableParams({ |
393 | page : 1, | 403 | page : 1, |
394 | count : 10, | 404 | count : 10, |
395 | }, { | 405 | }, { |
396 | data : $scope.orderdata | 406 | data : $scope.orderdata |
397 | }); | 407 | }); |
398 | $(document).ready(function() { | 408 | $(document).ready(function() { |
399 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 409 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
400 | 410 | ||
401 | for (var i = 0; i < myselect.length; i++) { | 411 | for (var i = 0; i < myselect.length; i++) { |
402 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 412 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
403 | colourIndex = colourIndex + 1; | 413 | colourIndex = colourIndex + 1; |
404 | // console.log(colourIndex); | 414 | // console.log(colourIndex); |
405 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 415 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
406 | $(myselect[i]).css('background-color', getColor); | 416 | $(myselect[i]).css('background-color', getColor); |
407 | // console.log('colour', getColor); | 417 | // console.log('colour', getColor); |
408 | myselect[i].blur(); | 418 | myselect[i].blur(); |
409 | } | 419 | } |
410 | 420 | ||
411 | }) | 421 | }) |
412 | 422 | ||
413 | }) | 423 | }) |
414 | } | 424 | } |
415 | 425 | ||
416 | $scope.getOrders(); | 426 | $scope.getOrders(); |
417 | $scope.tiervalue=function(){ | 427 | $scope.tiervalue=function(){ |
418 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 428 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
419 | } | 429 | } |
420 | 430 | ||
421 | $scope.setCost = function(cost){ | 431 | $scope.setCost = function(cost){ |
422 | if(cost != null) { | 432 | if(cost != null) { |
423 | var obj =JSON.parse(cost); | 433 | var obj =JSON.parse(cost); |
424 | $scope.order.fboCost = obj.cost; | 434 | $scope.order.fboCost = obj.cost; |
425 | } | 435 | } |
426 | } | 436 | } |
427 | 437 | ||
428 | $scope.cancelOrder = function() { | 438 | $scope.cancelOrder = function() { |
429 | $scope.order = {}; | 439 | $scope.order = {}; |
430 | } | 440 | } |
431 | 441 | ||
432 | $scope.dispatchFuel = function(){ | 442 | $scope.dispatchFuel = function(){ |
433 | $scope.showLoader = true; | 443 | $scope.showLoader = true; |
434 | $scope.fuelData = {}; | 444 | $scope.fuelData = {}; |
435 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 445 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
436 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; | 446 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; |
437 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 447 | // var aircraftObj =JSON.parse($scope.order.aircraftName); |
438 | $scope.fuelData.aircraftName = aircraftObj.tail; | 448 | $scope.fuelData.aircraftName = $scope.order.aircraftName; |
439 | $scope.fuelData.make = aircraftObj.make; | 449 | $scope.fuelData.make = $scope.order.aircraftMake; |
440 | $scope.fuelData.model = aircraftObj.model; | 450 | $scope.fuelData.model = $scope.order.aircraftModel; |
441 | //$scope.fuelData.fuelOn = $scope.order.fuelOn; | 451 | //$scope.fuelData.fuelOn = $scope.order.fuelOn; |
442 | $scope.fuelData.invoiced = $scope.order.invoiced; | 452 | $scope.fuelData.invoiced = $scope.order.invoiced; |
443 | $scope.fuelData.volume = $scope.order.volume; | 453 | $scope.fuelData.volume = $scope.order.volume; |
444 | // $scope.fuelData.source = $scope.order.source; | 454 | // $scope.fuelData.source = $scope.order.source; |
445 | 455 | ||
446 | $scope.fuelData.total = $scope.order.total; | 456 | $scope.fuelData.total = $scope.order.total; |
447 | //tier no use | 457 | //tier no use |
448 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 458 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
449 | 459 | ||
450 | var obj =JSON.parse($scope.order.priceQuote); | 460 | var obj =JSON.parse($scope.order.priceQuote); |
451 | $scope.fuelData.priceQuote = obj.papTotal; | 461 | $scope.fuelData.priceQuote = obj.papTotal; |
452 | $scope.fuelData.fboCost = obj.cost; | 462 | $scope.fuelData.fboCost = obj.cost; |
453 | $scope.fuelData.productName = obj.productName; | 463 | $scope.fuelData.productName = obj.productName; |
454 | 464 | ||
455 | $scope.fuelData.etaTime = $scope.order.etaTime; | 465 | $scope.fuelData.etaTime = $scope.order.etaTime; |
456 | $scope.fuelData.etdTime = $scope.order.etdTime; | 466 | $scope.fuelData.etdTime = $scope.order.etdTime; |
457 | $scope.fuelData.certificateType = $scope.order.certificateType; | 467 | $scope.fuelData.certificateType = $scope.order.certificateType; |
458 | var currentDate = new Date(); | 468 | var currentDate = new Date(); |
459 | var hours = currentDate.getHours(); | 469 | var hours = currentDate.getHours(); |
460 | var min = currentDate.getMinutes(); | 470 | var min = currentDate.getMinutes(); |
461 | var sec = currentDate.getSeconds(); | 471 | var sec = currentDate.getSeconds(); |
462 | if ($scope.order.upliftDate != '') { | 472 | if ($scope.order.upliftDate != '') { |
463 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 473 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
464 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 474 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
465 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 475 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
466 | } | 476 | } |
467 | 477 | ||
468 | 478 | ||
469 | if ($scope.order.departingDate != '') { | 479 | if ($scope.order.departingDate != '') { |
470 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 480 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
471 | $scope.order.departingDate = new Date($scope.order.departingDate); | 481 | $scope.order.departingDate = new Date($scope.order.departingDate); |
472 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 482 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
473 | } | 483 | } |
474 | 484 | ||
475 | if($scope.order.status === null || $scope.order.status === undefined){ | 485 | if($scope.order.status === null || $scope.order.status === undefined){ |
476 | 486 | ||
477 | $scope.fuelData.status = "pending"; //default status | 487 | $scope.fuelData.status = "pending"; //default status |
478 | 488 | ||
479 | }else { | 489 | }else { |
480 | 490 | ||
481 | $scope.fuelData.status = $scope.order.status; | 491 | $scope.fuelData.status = $scope.order.status; |
482 | } | 492 | } |
483 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ | 493 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ |
484 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon | 494 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon |
485 | }else { | 495 | }else { |
486 | $scope.fuelData.fuelOn = $scope.order.fuelOn ; | 496 | $scope.fuelData.fuelOn = $scope.order.fuelOn ; |
487 | } | 497 | } |
488 | if($scope.baseTenant && $scope.contractFuelVendor ){ | 498 | if($scope.baseTenant && $scope.contractFuelVendor ){ |
489 | $scope.fuelData.source = "Tenant/CAA" ; | 499 | $scope.fuelData.source = "Tenant/CAA" ; |
490 | }else if($scope.baseTenant) | 500 | }else if($scope.baseTenant) |
491 | { | 501 | { |
492 | $scope.fuelData.source = "Tenant/Base Customer"; | 502 | $scope.fuelData.source = "Tenant/Base Customer"; |
493 | }else if($scope.contractFuelVendor){ | 503 | }else if($scope.contractFuelVendor){ |
494 | $scope.fuelData.source = "CAA Member"; | 504 | $scope.fuelData.source = "CAA Member"; |
495 | } | 505 | } |
496 | 506 | ||
497 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 507 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
498 | //console.log("=====$scope.fueldata======",$scope.fuelData) | ||
499 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 508 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
500 | $scope.showLoader = false; | 509 | $scope.showLoader = false; |
501 | $scope.order = {}; | 510 | $scope.order = {}; |
502 | $scope.dispatchOrder.fuelOrderList = []; | 511 | $scope.dispatchOrder.fuelOrderList = []; |
503 | $('#demo-modal-4').css('display', ''); | 512 | $('#demo-modal-4').css('display', ''); |
504 | $scope.getOrders(); | 513 | $scope.getOrders(); |
505 | toastr.success('Fuel Order Dispatched Successfully', { | 514 | toastr.success('Fuel Order Dispatched Successfully', { |
506 | closeButton: true | 515 | closeButton: true |
507 | }) | 516 | }) |
508 | }) | 517 | }) |
509 | } | 518 | } |
510 | 519 | ||
511 | $scope.addTotal = function(value, valueOf) { | 520 | $scope.addTotal = function(value, valueOf) { |
512 | if (value != undefined && valueOf != undefined) { | 521 | if (value != undefined && valueOf != undefined) { |
513 | value = JSON.parse(value) | 522 | value = JSON.parse(value) |
514 | $scope.order.total = Math.abs(value.papTotal) * valueOf; | 523 | $scope.order.total = Math.abs(value.papTotal) * valueOf; |
515 | } | 524 | } |
516 | } | 525 | } |
517 | 526 | ||
518 | $scope.getAircraft = function(company) { | 527 | $scope.getAircraft = function(company) { |
519 | $scope.selectedCompanyName = company; | 528 | $scope.selectedCompanyName = company; |
520 | //$scope.showLoader = true; | 529 | //$scope.showLoader = true; |
521 | // console.log("id",company) | 530 | // console.log("id",company) |
522 | for (var i = 0; i < $scope.companyList.length; i++) { | 531 | for (var i = 0; i < $scope.companyList.length; i++) { |
523 | if ($scope.companyList[i].companyName == company) { | 532 | if ($scope.companyList[i].companyName == company) { |
524 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { | 533 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { |
525 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 534 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
526 | $scope.marginList = margins; | 535 | $scope.marginList = margins; |
527 | //console.log('$scope.marginList', $scope.marginList); | 536 | //console.log('$scope.marginList', $scope.marginList); |
528 | }) | 537 | }) |
529 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 538 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
530 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 539 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
531 | $scope.marginList = margins; | 540 | $scope.marginList = margins; |
532 | }) | 541 | }) |
533 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 542 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
534 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 543 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
535 | $scope.marginList = margins; | 544 | $scope.marginList = margins; |
536 | }) | 545 | }) |
537 | } | 546 | } |
538 | $scope.selectedCompanyId = $scope.companyList[i].id; | 547 | $scope.selectedCompanyId = $scope.companyList[i].id; |
539 | $scope.marginId = $scope.companyList[i].margin.id; | 548 | $scope.marginId = $scope.companyList[i].margin.id; |
540 | if ($scope.selectedCompanyId != '') { | 549 | if ($scope.selectedCompanyId != '') { |
541 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 550 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
542 | $scope.aircraftList = aircraft; | 551 | $scope.aircraftList = aircraft; |
543 | //console.log("===tail search====",aircraft); | 552 | //console.log("===tail search====",aircraft); |
544 | }) | 553 | }) |
545 | } | 554 | } |
546 | if ($scope.marginId != '') { | 555 | if ($scope.marginId != '') { |
547 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 556 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
548 | $scope.tierList = tiers; | 557 | $scope.tierList = tiers; |
549 | // $scope.showLoader = false; | 558 | // $scope.showLoader = false; |
550 | }) | 559 | }) |
551 | } else { | 560 | } else { |
552 | // $scope.showLoader = false; | 561 | // $scope.showLoader = false; |
553 | } | 562 | } |
554 | } | 563 | } |
555 | } | 564 | } |
556 | 565 | ||
557 | } | 566 | } |
558 | 567 | ||
559 | $scope.sourceList = [ { | 568 | $scope.sourceList = [ { |
560 | source : "Direct Jet-A" | 569 | source : "Direct Jet-A" |
561 | }, { | 570 | }, { |
562 | source : "Direct AVGAS 100LL" | 571 | source : "Direct AVGAS 100LL" |
563 | } ]; | 572 | } ]; |
564 | $scope.cancelData = function() { | 573 | $scope.cancelData = function() { |
565 | $scope.order = {}; | 574 | $scope.order = {}; |
566 | $('#demo-modal-4').css('display', ''); | 575 | $('#demo-modal-4').css('display', ''); |
567 | } | 576 | } |
568 | 577 | ||
569 | $scope.setFuel = function(companyName,baseTenant,contractFuelVendor,fuelerlinxCustomer,certificateType) { | 578 | $scope.setFuel = function(companyName,baseTenant,contractFuelVendor,fuelerlinxCustomer,certificateType) { |
570 | $('#demo-modal-4').css('display', 'block'); | 579 | $('#demo-modal-4').css('display', 'block'); |
571 | $scope.order.defaultCompanyName = companyName; | 580 | $scope.order.defaultCompanyName = companyName; |
572 | $scope.order.certificateType = certificateType; | 581 | $scope.order.certificateType = certificateType; |
573 | $scope.baseTenant = baseTenant; | 582 | $scope.baseTenant = baseTenant; |
574 | $scope.contractFuelVendor = contractFuelVendor; | 583 | $scope.contractFuelVendor = contractFuelVendor; |
575 | $scope.fuelerlinxCustomer = fuelerlinxCustomer; | 584 | $scope.fuelerlinxCustomer = fuelerlinxCustomer; |
576 | //console.log("===values of checkbox===",baseTenant,contractFuelVendor,fuelerlinxCustomer) | 585 | //console.log("===values of checkbox===",baseTenant,contractFuelVendor,fuelerlinxCustomer) |
577 | $scope.getAircraft(companyName); | 586 | $scope.getAircraft(companyName); |
578 | // event.stopPropagation(); | 587 | // event.stopPropagation(); |
579 | // $state.go('app.updateFuelManager'); | 588 | // $state.go('app.updateFuelManager'); |
580 | } | 589 | } |
581 | 590 | ||
582 | /* ng table */ | 591 | /* ng table */ |
583 | 592 | ||
584 | $scope.exportCompany = function() { | 593 | $scope.exportCompany = function() { |
585 | $scope.showLoader = true; | 594 | $scope.showLoader = true; |
586 | var fileName = "companies.csv"; | 595 | var fileName = "companies.csv"; |
587 | var a = document.createElement("a"); | 596 | var a = document.createElement("a"); |
588 | document.body.appendChild(a); | 597 | document.body.appendChild(a); |
589 | CustomersService.exportCompany().then(function(result) { | 598 | CustomersService.exportCompany().then(function(result) { |
590 | var file = new Blob([ result ], { | 599 | var file = new Blob([ result ], { |
591 | type : 'application/csv' | 600 | type : 'application/csv' |
592 | }); | 601 | }); |
593 | var fileURL = URL.createObjectURL(file); | 602 | var fileURL = URL.createObjectURL(file); |
594 | a.href = fileURL; | 603 | a.href = fileURL; |
595 | a.download = fileName; | 604 | a.download = fileName; |
596 | a.click(); | 605 | a.click(); |
597 | $scope.showLoader = false; | 606 | $scope.showLoader = false; |
598 | }) | 607 | }) |
599 | } | 608 | } |
600 | getCompanyName(); | 609 | getCompanyName(); |
601 | function getCompanyName() { | 610 | function getCompanyName() { |
602 | CustomersService.getCompanyName().then(function(result) { | 611 | CustomersService.getCompanyName().then(function(result) { |
603 | $scope.compNameList = result; | 612 | $scope.compNameList = result; |
604 | //console.log("kd",result) | 613 | //console.log("kd",result) |
605 | }) | 614 | }) |
606 | } | 615 | } |
607 | 616 | ||
608 | // old api not use | 617 | // old api not use |
609 | /*$scope.checkJetWithTail = function(tail, index) { | 618 | /*$scope.checkJetWithTail = function(tail, index) { |
610 | ViewCompanyService.checkJetType(tail).then(function(result) { | 619 | ViewCompanyService.checkJetType(tail).then(function(result) { |
611 | if (result.jetA == "true") { | 620 | if (result.jetA == "true") { |
612 | $scope.jetShow[index] = false; | 621 | $scope.jetShow[index] = false; |
613 | $scope.marginShow[index] = true; | 622 | $scope.marginShow[index] = true; |
614 | } else { | 623 | } else { |
615 | $scope.jetShow[index] = true; | 624 | $scope.jetShow[index] = true; |
616 | $scope.marginShow[index] = false; | 625 | $scope.marginShow[index] = false; |
617 | } | 626 | } |
618 | }) | 627 | }) |
619 | }*/ | 628 | }*/ |
620 | 629 | ||
621 | 630 | ||
622 | $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"}, | 631 | $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"}, |
623 | {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"}, | 632 | {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"}, |
624 | {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"}, | 633 | {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"}, |
625 | {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"}, | 634 | {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"}, |
626 | {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"}, | 635 | {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"}, |
627 | {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"},]; | 636 | {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"},]; |
628 | 637 | ||
629 | $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"}, | 638 | $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"}, |
630 | {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"}, | 639 | {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"}, |
631 | {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"}, | 640 | {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"}, |
632 | {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"}, | 641 | {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"}, |
633 | {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"}, | 642 | {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"}, |
634 | {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"},]; | 643 | {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"},]; |
635 | 644 |
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 | <i class="fa fa-search-plus" style="color:red" ng-if="row.fboPreferred == true"></i> {{row.companyName}} | 108 | <i class="fa fa-search-plus" style="color:red" ng-if="row.fboPreferred == true"></i> {{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 style="width: 130px;" class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> | 126 | <td style="width: 130px;" 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,row.baseTenant,row.contractFuelVendor,row.fuelerlinxCustomer,row.certificateType)">Setup Fuel</button> | 133 | <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.baseTenant,row.contractFuelVendor,row.fuelerlinxCustomer,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 | 371 | ||
372 | <!-- <table class="table table-striped table-bordered"> | 372 | <!-- <table class="table table-striped table-bordered"> |
373 | <thead> | 373 | <thead> |
374 | <tr> | 374 | <tr> |
375 | <th>Tail</th> | 375 | <th>Tail</th> |
376 | <th>Make</th> | 376 | <th>Make</th> |
377 | <th>Model</th> | 377 | <th>Model</th> |
378 | <th>Size</th> | 378 | <th>Size</th> |
379 | <th>JET A Margin</th> | 379 | <th>JET A Margin</th> |
380 | <th>AVGS 100LL Margin</th> | 380 | <th>AVGS 100LL Margin</th> |
381 | </tr> | 381 | </tr> |
382 | </thead> | 382 | </thead> |
383 | <tbody> | 383 | <tbody> |
384 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 384 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
385 | <td style="width: 15%"> | 385 | <td style="width: 15%"> |
386 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 386 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
387 | </td> | 387 | </td> |
388 | <td style="width: 17%"> | 388 | <td style="width: 17%"> |
389 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 389 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
390 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> | 390 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> |
391 | <option value="" disabled>Select...</option> | 391 | <option value="" disabled>Select...</option> |
392 | </select> | 392 | </select> |
393 | </td> | 393 | </td> |
394 | <td style="width: 17%"> | 394 | <td style="width: 17%"> |
395 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 395 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
396 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 396 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
397 | <option value="" disabled>Select...</option> | 397 | <option value="" disabled>Select...</option> |
398 | </select> | 398 | </select> |
399 | </td> | 399 | </td> |
400 | <td style="width: 17%"> | 400 | <td style="width: 17%"> |
401 | <select class="form-control" ng-model="aircraftData.sizeId"> | 401 | <select class="form-control" ng-model="aircraftData.sizeId"> |
402 | <option value="" disabled>Select</option> | 402 | <option value="" disabled>Select</option> |
403 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 403 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
404 | </select> | 404 | </select> |
405 | 405 | ||
406 | </td> | 406 | </td> |
407 | <td style="width: 17%"> | 407 | <td style="width: 17%"> |
408 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 408 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
409 | <option value="" disabled>Select</option> | 409 | <option value="" disabled>Select</option> |
410 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 410 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
411 | </select> | 411 | </select> |
412 | 412 | ||
413 | 413 | ||
414 | </td> | 414 | </td> |
415 | <td style="width: 17%"> | 415 | <td style="width: 17%"> |
416 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 416 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
417 | <option value="" disabled>Select</option> | 417 | <option value="" disabled>Select</option> |
418 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 418 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
419 | </select> | 419 | </select> |
420 | 420 | ||
421 | </td> | 421 | </td> |
422 | </tr> | 422 | </tr> |
423 | </tbody> | 423 | </tbody> |
424 | </table> | 424 | </table> |
425 | </div> | 425 | </div> |
426 | <div class="clearfix"></div> | 426 | <div class="clearfix"></div> |
427 | </div> | 427 | </div> |
428 | </div> | 428 | </div> |
429 | <div class="clearfix"></div> | 429 | <div class="clearfix"></div> |
430 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 430 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
431 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 431 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
432 | </div> --> | 432 | </div> --> |
433 | 433 | ||
434 | <table class="table table-striped table-bordered"> | 434 | <table class="table table-striped table-bordered"> |
435 | <thead> | 435 | <thead> |
436 | <tr> | 436 | <tr> |
437 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 437 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
438 | <th>Tail</th> | 438 | <th>Tail</th> |
439 | <th>Make</th> | 439 | <th>Make</th> |
440 | <th>Model</th> | 440 | <th>Model</th> |
441 | <th>Size</th> | 441 | <th>Size</th> |
442 | <th>JET A Margin</th> | 442 | <th>JET A Margin</th> |
443 | <th>AVGS 100LL Margin</th> | 443 | <th>AVGS 100LL Margin</th> |
444 | </tr> | 444 | </tr> |
445 | </thead> | 445 | </thead> |
446 | <tbody> | 446 | <tbody> |
447 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 447 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
448 | <!-- <td> | 448 | <!-- <td> |
449 | <input type="checkbox" ng-model="aircraftData.selected"/> | 449 | <input type="checkbox" ng-model="aircraftData.selected"/> |
450 | </td> --> | 450 | </td> --> |
451 | <!-- <td style="width: 15%"> | 451 | <!-- <td style="width: 15%"> |
452 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 452 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
453 | </td> --> | 453 | </td> --> |
454 | <td style="width: 15%"> | 454 | <td style="width: 15%"> |
455 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> | 455 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> |
456 | </td> | 456 | </td> |
457 | <td style="width: 17%"> | 457 | <td style="width: 17%"> |
458 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> | 458 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> |
459 | <option value="" disabled>Select</option> | 459 | <option value="" disabled>Select</option> |
460 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 460 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
461 | </select> | 461 | </select> |
462 | </td> | 462 | </td> |
463 | <td style="width: 17%"> | 463 | <td style="width: 17%"> |
464 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 464 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
465 | <option value="" disabled>Select</option> | 465 | <option value="" disabled>Select</option> |
466 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 466 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
467 | </select> | 467 | </select> |
468 | </td> | 468 | </td> |
469 | <td style="width: 17%"> | 469 | <td style="width: 17%"> |
470 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> | 470 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> |
471 | <option value="" disabled>Select</option> | 471 | <option value="" disabled>Select</option> |
472 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> | 472 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> |
473 | </select> | 473 | </select> |
474 | 474 | ||
475 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> --> | 475 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> --> |
476 | 476 | ||
477 | </td> | 477 | </td> |
478 | <td style="width: 17%"> | 478 | <td style="width: 17%"> |
479 | 479 | ||
480 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 480 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
481 | <option value="" disabled>Select</option> | 481 | <option value="" disabled>Select</option> |
482 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 482 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
483 | </select> | 483 | </select> |
484 | 484 | ||
485 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> | 485 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> |
486 | 486 | ||
487 | <option value="" disabled>Select...</option> | 487 | <option value="" disabled>Select...</option> |
488 | </select> --> | 488 | </select> --> |
489 | 489 | ||
490 | </td> | 490 | </td> |
491 | <td style="width: 17%"> | 491 | <td style="width: 17%"> |
492 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 492 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
493 | <option value="" disabled>Select</option> | 493 | <option value="" disabled>Select</option> |
494 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 494 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
495 | </select> | 495 | </select> |
496 | 496 | ||
497 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> | 497 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> |
498 | <option value="" disabled>Select...</option> | 498 | <option value="" disabled>Select...</option> |
499 | </select> --> | 499 | </select> --> |
500 | </td> | 500 | </td> |
501 | </tr> | 501 | </tr> |
502 | </tbody> | 502 | </tbody> |
503 | </table> | 503 | </table> |
504 | </div> | 504 | </div> |
505 | <div class="clearfix"></div> | 505 | <div class="clearfix"></div> |
506 | </div> | 506 | </div> |
507 | </div> | 507 | </div> |
508 | <div class="clearfix"></div> | 508 | <div class="clearfix"></div> |
509 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 509 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
510 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> | 510 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> |
511 | </div> | 511 | </div> |
512 | </div> | 512 | </div> |
513 | </div> | 513 | </div> |
514 | <div class="clearfix"></div> | 514 | <div class="clearfix"></div> |
515 | </div> | 515 | </div> |
516 | </div> | 516 | </div> |
517 | </div> | 517 | </div> |
518 | </div> | 518 | </div> |
519 | <!-- <div class="modal-body step-3" data-step="3"> | 519 | <!-- <div class="modal-body step-3" data-step="3"> |
520 | This is the final step. | 520 | This is the final step. |
521 | </div> --> | 521 | </div> --> |
522 | <div class="modal-footer" style="border-top: 0;"> | 522 | <div class="modal-footer" style="border-top: 0;"> |
523 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 523 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
524 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 524 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
525 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 525 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
526 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 526 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
527 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 527 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
528 | </div> | 528 | </div> |
529 | </div> | 529 | </div> |
530 | </div> | 530 | </div> |
531 | </form> | 531 | </form> |
532 | 532 | ||
533 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> | 533 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> |
534 | <div class="customModalInner" style="max-width: 400px;"> | 534 | <div class="customModalInner" style="max-width: 400px;"> |
535 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 535 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
536 | <table> | 536 | <table> |
537 | <tr> | 537 | <tr> |
538 | <td> | 538 | <td> |
539 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 539 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
540 | </td> | 540 | </td> |
541 | </tr> | 541 | </tr> |
542 | </table> | 542 | </table> |
543 | </div> | 543 | </div> |
544 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 544 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
545 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button> | 545 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button> |
546 | </div> | 546 | </div> |
547 | </div> | 547 | </div> |
548 | </div> | 548 | </div> |
549 | 549 | ||
550 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> | 550 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> |
551 | <div class="customModalInner" style="max-width: 400px;"> | 551 | <div class="customModalInner" style="max-width: 400px;"> |
552 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 552 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
553 | <table> | 553 | <table> |
554 | <tr> | 554 | <tr> |
555 | <td> | 555 | <td> |
556 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 556 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
557 | </td> | 557 | </td> |
558 | </tr> | 558 | </tr> |
559 | </table> | 559 | </table> |
560 | </div> | 560 | </div> |
561 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 561 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
562 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> | 562 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> |
563 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> | 563 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> |
564 | </div> | 564 | </div> |
565 | </div> | 565 | </div> |
566 | </div> | 566 | </div> |
567 | 567 | ||
568 | 568 | ||
569 | 569 | ||
570 | <!-- SetUp fuel order --> | 570 | <!-- SetUp fuel order --> |
571 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 571 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
572 | <div class="modal-dialog modal-lg"> | 572 | <div class="modal-dialog modal-lg"> |
573 | <div class="modal-content"> | 573 | <div class="modal-content"> |
574 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 574 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
575 | <div> | 575 | <div> |
576 | <div class="row" style="margin: 0;"> | 576 | <div class="row" style="margin: 0;"> |
577 | <div> | 577 | <div> |
578 | <div class="widget" style="margin-bottom: 0;"> | 578 | <div class="widget" style="margin-bottom: 0;"> |
579 | <div class="widget-header"> | 579 | <div class="widget-header"> |
580 | <i class="icon-pencil"></i> | 580 | <i class="icon-pencil"></i> |
581 | <i class="fa fa-tasks" aria-hidden="true"></i> | 581 | <i class="fa fa-tasks" aria-hidden="true"></i> |
582 | <h3>Add a Fuel Order</h3> | 582 | <h3>Add a Fuel Order</h3> |
583 | <div class="clearfix"></div> | 583 | <div class="clearfix"></div> |
584 | </div> | 584 | </div> |
585 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 585 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
586 | <div class="col-xs-12"> | 586 | <div class="col-xs-12"> |
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"><b>Company</b></label> | 591 | <label class="new-input-label"><b>Company</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 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 594 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
595 | <option value="" selected disabled>Select Company</option> | 595 | <option value="" selected disabled>Select Company</option> |
596 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 596 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
597 | </select> --> | 597 | </select> --> |
598 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> | 598 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> |
599 | </div> | 599 | </div> |
600 | <div class="clearfix"></div> | 600 | <div class="clearfix"></div> |
601 | </div> | 601 | </div> |
602 | <div class="col-md-6"> | 602 | <div class="col-md-6"> |
603 | <div class="pull-left" style="width: 110px;"> | 603 | <div class="pull-left" style="width: 110px;"> |
604 | <label class="new-input-label"><b>Product</b></label> | 604 | <label class="new-input-label"><b>Product</b></label> |
605 | </div> | 605 | </div> |
606 | <div class="pull-left" style="width: calc(100% - 110px);"> | 606 | <div class="pull-left" style="width: calc(100% - 110px);"> |
607 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> | 607 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> |
608 | <option value="" selected disabled>Select Product</option> | 608 | <option value="" selected disabled>Select Product</option> |
609 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 609 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
610 | </select> | 610 | </select> |
611 | </div> | 611 | </div> |
612 | <div class="clearfix"></div> | 612 | <div class="clearfix"></div> |
613 | </div> | 613 | </div> |
614 | 614 | ||
615 | </div> | 615 | </div> |
616 | <div class="clearfix"></div> | 616 | <div class="clearfix"></div> |
617 | <br/> | 617 | <br/> |
618 | 618 | ||
619 | 619 | ||
620 | <div class="col-xs-12"> | 620 | <div class="col-xs-12"> |
621 | 621 | ||
622 | <div class="col-md-6"> | 622 | <div class="col-md-6"> |
623 | <div class="pull-left" style="width: 110px;"> | 623 | <div class="pull-left" style="width: 110px;"> |
624 | <label class="new-input-label"><b>Aircraft</b></label> | 624 | <label class="new-input-label"><b>Aircraft</b></label> |
625 | </div> | 625 | </div> |
626 | <div class="pull-left" style="width: calc(100% - 110px);"> | 626 | <div class="pull-left" style="width: calc(100% - 110px);"> |
627 | <select class="form-control" ng-model="order.aircraftName" required> | 627 | <select class="form-control" ng-model="order.aircraftName" ng-change="getAircraftMakeAndModel(order.aircraftName)" required> |
628 | <option selected disabled value="">Select Aircraft</option> | 628 | <option selected disabled value="">Select Aircraft</option> |
629 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 629 | <option ng-repeat="list in aircraftList">{{list.tail}}</option> |
630 | </select> | ||
631 | </div> | ||
632 | <div class="clearfix"></div> | ||
633 | </div> | ||
634 | <div class="col-md-6"> | ||
635 | <div class="pull-left" style="width: 110px;"> | ||
636 | <label class="new-input-label"><b>Make</b></label> | ||
637 | </div> | ||
638 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
639 | <select class="form-control" ng-model="order.aircraftMake" disabled required> | ||
640 | <option selected disabled value="">Select Make</option> | ||
641 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.make}}</option> --> | ||
642 | <option ng-repeat="list in aircraftList">{{list.make}}</option> | ||
643 | </select> | ||
644 | </div> | ||
645 | <div class="clearfix"></div> | ||
646 | </div> | ||
647 | |||
648 | </div> | ||
649 | <div class="clearfix"></div> | ||
650 | <br/> | ||
651 | |||
652 | <div class="col-xs-12"> | ||
653 | |||
654 | <div class="col-md-6"> | ||
655 | <div class="pull-left" style="width: 110px;"> | ||
656 | <label class="new-input-label"><b>Model</b></label> | ||
657 | </div> | ||
658 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
659 | <select class="form-control" ng-model="order.aircraftModel" disabled required> | ||
660 | <option selected disabled value="">Select Model</option> | ||
661 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.model}}</option> --> | ||
662 | <option ng-repeat="list in aircraftList">{{list.model}}</option> | ||
630 | </select> | 663 | </select> |
631 | </div> | 664 | </div> |
632 | <div class="clearfix"></div> | 665 | <div class="clearfix"></div> |
633 | </div> | 666 | </div> |
634 | <div class="col-md-6"> | 667 | <div class="col-md-6"> |
635 | <div class="pull-left" style="width: 110px;"> | 668 | <div class="pull-left" style="width: 110px;"> |
636 | <label class="new-input-label"><b>Volume</b></label> | 669 | <label class="new-input-label"><b>Volume</b></label> |
637 | </div> | 670 | </div> |
638 | <div class="pull-left" style="width: calc(100% - 110px);"> | 671 | <div class="pull-left" style="width: calc(100% - 110px);"> |
639 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 672 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
640 | </div> | 673 | </div> |
641 | <div class="clearfix"></div> | 674 | <div class="clearfix"></div> |
642 | </div> | 675 | </div> |
643 | 676 | ||
644 | </div> | 677 | </div> |
645 | <div class="clearfix"></div> | 678 | <div class="clearfix"></div> |
646 | <br/> | 679 | <br/> |
647 | 680 | ||
648 | <div class="col-xs-12"> | 681 | <div class="col-xs-12"> |
649 | 682 | ||
650 | <div class="col-md-6"> | 683 | <div class="col-md-6"> |
651 | <div class="pull-left" style="width: 110px;"> | 684 | <div class="pull-left" style="width: 110px;"> |
652 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 685 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
653 | </div> | 686 | </div> |
654 | <div class="pull-left" style="width: calc(100% - 110px);"> | 687 | <div class="pull-left" style="width: calc(100% - 110px);"> |
655 | <div style="width: 50%; float: left;"> | 688 | <div style="width: 50%; float: left;"> |
656 | Date | 689 | Date |
657 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 690 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
658 | </div> | 691 | </div> |
659 | <div style="width: 50%; float: left;"> | 692 | <div style="width: 50%; float: left;"> |
660 | Time | 693 | Time |
661 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 694 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
662 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 695 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
663 | </select> | 696 | </select> |
664 | 697 | ||
665 | </div> | 698 | </div> |
666 | </div> | 699 | </div> |
667 | <div class="clearfix"></div> | 700 | <div class="clearfix"></div> |
668 | </div> | 701 | </div> |
669 | 702 | ||
670 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 703 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
671 | <div class="pull-left" style="width: 110px;"> | 704 | <div class="pull-left" style="width: 110px;"> |
672 | <label class="new-input-label"><b>Invoiced</b></label> | 705 | <label class="new-input-label"><b>Invoiced</b></label> |
673 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 706 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
674 | </div> | 707 | </div> |
675 | <div class="pull-left" style="width: calc(100% - 110px);"> | 708 | <div class="pull-left" style="width: calc(100% - 110px);"> |
676 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 709 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
677 | </div> | 710 | </div> |
678 | <div class="clearfix"></div> | 711 | <div class="clearfix"></div> |
679 | </div> | 712 | </div> |
680 | </div> | 713 | </div> |
681 | <div class="clearfix"></div><br> | 714 | <div class="clearfix"></div><br> |
682 | 715 | ||
683 | 716 | ||
684 | <div class="col-xs-12"> | 717 | <div class="col-xs-12"> |
685 | 718 | ||
686 | <div class="col-md-6"> | 719 | <div class="col-md-6"> |
687 | <div class="pull-left" style="width: 110px;"> | 720 | <div class="pull-left" style="width: 110px;"> |
688 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 721 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
689 | </div> | 722 | </div> |
690 | <div class="pull-left" style="width: calc(100% - 110px);"> | 723 | <div class="pull-left" style="width: calc(100% - 110px);"> |
691 | <div style="width: 50%; float: left;"> | 724 | <div style="width: 50%; float: left;"> |
692 | Date | 725 | Date |
693 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 726 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
694 | </div> | 727 | </div> |
695 | <div style="width: 50%; float: left;"> | 728 | <div style="width: 50%; float: left;"> |
696 | Time | 729 | Time |
697 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 730 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
698 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 731 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
699 | </select> | 732 | </select> |
700 | 733 | ||
701 | </div> | 734 | </div> |
702 | </div> | 735 | </div> |
703 | <div class="clearfix"></div> | 736 | <div class="clearfix"></div> |
704 | </div> | 737 | </div> |
705 | 738 | ||
706 | <div class="col-md-6" style="margin-top: 22px;"> | 739 | <div class="col-md-6" style="margin-top: 22px;"> |
707 | <div class="pull-left" style="width: 110px;"> | 740 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Total</b></label> | 741 | <label class="new-input-label"><b>Total</b></label> |
709 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 742 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
710 | </div> | 743 | </div> |
711 | <div class="pull-left" style="width: calc(100% - 110px);"> | 744 | <div class="pull-left" style="width: calc(100% - 110px);"> |
712 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 745 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
713 | </div> | 746 | </div> |
714 | </div> | 747 | </div> |
715 | </div> | 748 | </div> |
716 | <div class="clearfix"></div><br> | 749 | <div class="clearfix"></div><br> |
717 | 750 | ||
718 | <div class="col-xs-12"> | 751 | <div class="col-xs-12"> |
719 | 752 | ||
720 | <div class="col-md-6"> | 753 | <div class="col-md-6"> |
721 | <div class="pull-left" style="width: 110px;"> | 754 | <div class="pull-left" style="width: 110px;"> |
722 | <label class="new-input-label"><b>Fuel on</b></label> | 755 | <label class="new-input-label"><b>Fuel on</b></label> |
723 | </div> | 756 | </div> |
724 | <div class="pull-left" style="width: calc(100% - 110px);"> | 757 | <div class="pull-left" style="width: calc(100% - 110px);"> |
725 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 758 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
726 | <option value="" disabled selected hidden>Arrival</option> | 759 | <option value="" disabled selected hidden>Arrival</option> |
727 | <option value="Arrival">Arrival</option> | 760 | <option value="Arrival">Arrival</option> |
728 | <option value="Departure">Departure</option> | 761 | <option value="Departure">Departure</option> |
729 | </select> | 762 | </select> |
730 | </div> | 763 | </div> |
731 | <div class="clearfix"></div> | 764 | <div class="clearfix"></div> |
732 | </div> | 765 | </div> |
733 | 766 | ||
734 | <div class="col-md-6"> | 767 | <div class="col-md-6"> |
735 | <div class="pull-left" style="width: 110px;"> | 768 | <div class="pull-left" style="width: 110px;"> |
736 | <label class="new-input-label"><b>FBO Cost</b></label> | 769 | <label class="new-input-label"><b>FBO Cost</b></label> |
737 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 770 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
738 | </div> | 771 | </div> |
739 | <div class="pull-left" style="width: calc(100% - 110px);"> | 772 | <div class="pull-left" style="width: calc(100% - 110px);"> |
740 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> | 773 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> |
741 | </div> | 774 | </div> |
742 | <div class="clearfix"></div> | 775 | <div class="clearfix"></div> |
743 | </div> | 776 | </div> |
744 | </div> | 777 | </div> |
745 | <div class="clearfix"></div><br> | 778 | <div class="clearfix"></div><br> |
746 | 779 | ||
747 | <div class="col-xs-12"> | 780 | <div class="col-xs-12"> |
748 | <div class="col-md-6"> | 781 | <div class="col-md-6"> |
749 | <div class="pull-left" style="width: 110px;"> | 782 | <div class="pull-left" style="width: 110px;"> |
750 | <label class="new-input-label"><b>Source</b></label> | 783 | <label class="new-input-label"><b>Source</b></label> |
751 | </div> | 784 | </div> |
752 | <div class="pull-left" style="width: calc(100% - 110px);"> | 785 | <div class="pull-left" style="width: calc(100% - 110px);"> |
753 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> | 786 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> |
754 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> | 787 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> |
755 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> | 788 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> |
756 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | 789 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> |
757 | <option value="" disabled selected hidden>Select Source</option> | 790 | <option value="" disabled selected hidden>Select Source</option> |
758 | <option value="Tenant">Tenant</option> | 791 | <option value="Tenant">Tenant</option> |
759 | <option value="CAA">CAA</option> | 792 | <option value="CAA">CAA</option> |
760 | <option value="Tenant/CAA">Tenant/CAA</option> | 793 | <option value="Tenant/CAA">Tenant/CAA</option> |
761 | </select> --> | 794 | </select> --> |
762 | </div> | 795 | </div> |
763 | <div class="clearfix"></div> | 796 | <div class="clearfix"></div> |
764 | </div> | 797 | </div> |
765 | </div> | 798 | </div> |
766 | <div class="clearfix"></div> | 799 | <div class="clearfix"></div> |
767 | <br/> | 800 | <br/> |
768 | <div class="col-xs-12"> | 801 | <div class="col-xs-12"> |
769 | 802 | ||
770 | 803 | ||
771 | <div class="col-md-6"> | 804 | <div class="col-md-6"> |
772 | <div class="pull-left" style="width: 110px;"> | 805 | <div class="pull-left" style="width: 110px;"> |
773 | <label class="new-input-label"><b>Certificate Type</b></label> | 806 | <label class="new-input-label"><b>Certificate Type</b></label> |
774 | </div> | 807 | </div> |
775 | <div class="pull-left" style="width: calc(100% - 110px);"> | 808 | <div class="pull-left" style="width: calc(100% - 110px);"> |
776 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 809 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
777 | <option value="" disabled selected hidden>Select...</option> | 810 | <option value="" disabled selected hidden>Select...</option> |
778 | <option value="corporate">Part 91 (Corporate)</option> | 811 | <option value="corporate">Part 91 (Corporate)</option> |
779 | <option value="charter">Part 135 (Charter)</option> | 812 | <option value="charter">Part 135 (Charter)</option> |
780 | <option value="scheduled">Part 121 (Scheduled)</option> | 813 | <option value="scheduled">Part 121 (Scheduled)</option> |
781 | <option value="military">Military</option> | 814 | <option value="military">Military</option> |
782 | <option value="government">Government</option> | 815 | <option value="government">Government</option> |
783 | </select> | 816 | </select> |
784 | </div> | 817 | </div> |
785 | <div class="clearfix"></div> | 818 | <div class="clearfix"></div> |
786 | </div> | 819 | </div> |
787 | <div class="col-md-6"> | 820 | <div class="col-md-6"> |
788 | <div class="pull-left" style="width: 110px;"> | 821 | <div class="pull-left" style="width: 110px;"> |
789 | <label class="new-input-label"><b>Status</b></label> | 822 | <label class="new-input-label"><b>Status</b></label> |
790 | </div> | 823 | </div> |
791 | <div class="pull-left" style="width: calc(100% - 110px);"> | 824 | <div class="pull-left" style="width: calc(100% - 110px);"> |
792 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 825 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
793 | <option value="" disabled selected hidden>pending</option> | 826 | <option value="" disabled selected hidden>pending</option> |
794 | <option value="pending">pending</option> | 827 | <option value="pending">pending</option> |
795 | <option value="invoiced">invoiced</option> | 828 | <option value="invoiced">invoiced</option> |
796 | <option value="paid">paid</option> | 829 | <option value="paid">paid</option> |
797 | <!-- <option value="cancelled">cancelled</option> | 830 | <!-- <option value="cancelled">cancelled</option> |
798 | <option value="archived">archived</option> --> | 831 | <option value="archived">archived</option> --> |
799 | </select> | 832 | </select> |
800 | </div> | 833 | </div> |
801 | <div class="clearfix"></div> | 834 | <div class="clearfix"></div> |
802 | </div> | 835 | </div> |
803 | </div> | 836 | </div> |
804 | <div class="clearfix"></div><br> | 837 | <div class="clearfix"></div><br> |
805 | 838 | ||
806 | </div> | 839 | </div> |
807 | </div> | 840 | </div> |
808 | </div> | 841 | </div> |
809 | </div> | 842 | </div> |
810 | </div> | 843 | </div> |
811 | </div> | 844 | </div> |
812 | <div class="modal-footer" style="border-top: 0;"> | 845 | <div class="modal-footer" style="border-top: 0;"> |
813 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 846 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
814 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> | 847 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> |
815 | </div> | 848 | </div> |
816 | </div> | 849 | </div> |
817 | </div> | 850 | </div> |
818 | </div> | 851 | </div> |
819 | </form> | 852 | </form> |
820 | 853 | ||
821 | 854 | ||
822 | <div class="myLoader" ng-show="showLoader"> | 855 | <div class="myLoader" ng-show="showLoader"> |
823 | <img src="../img/hourglass.gif" width="50px;"> | 856 | <img src="../img/hourglass.gif" width="50px;"> |
824 | </div> | 857 | </div> |
825 | <script src="js/multi-step-modal.js"></script> | 858 | <script src="js/multi-step-modal.js"></script> |
826 | <script> | 859 | <script> |
827 | sendEvent = function(sel, step) { | 860 | sendEvent = function(sel, step) { |
828 | $(sel).trigger('next.m.' + step); | 861 | $(sel).trigger('next.m.' + step); |
829 | } | 862 | } |
830 | </script> | 863 | </script> |
app/partials/enterFuelOrder/enterFuelOrder.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]); | 5 | .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]); |
6 | 6 | ||
7 | function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) { | 7 | function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) { |
8 | $scope.showLoader = true; | 8 | $scope.showLoader = true; |
9 | 9 | ||
10 | $scope.companyList = {}; | 10 | $scope.companyList = {}; |
11 | 11 | ||
12 | enterFuelOrderService.getAllCompanies().then(function(result) { | 12 | enterFuelOrderService.getAllCompanies().then(function(result) { |
13 | $scope.showLoader = false; | 13 | $scope.showLoader = false; |
14 | $scope.companyList = result; | 14 | $scope.companyList = result; |
15 | //console.log("===company====",result) | 15 | console.log("===company====",result) |
16 | }) | 16 | }) |
17 | 17 | ||
18 | $scope.order = {}; | 18 | $scope.order = {}; |
19 | $scope.dispatchOrder = {}; | 19 | $scope.dispatchOrder = {}; |
20 | $scope.dispatchOrder.fuelOrderList = []; | 20 | $scope.dispatchOrder.fuelOrderList = []; |
21 | $scope.order.upliftDate = ''; | 21 | $scope.order.upliftDate = ''; |
22 | //$scope.order.departingDate = ''; | 22 | //$scope.order.departingDate = ''; |
23 | $scope.selectedCompanyName = ''; | 23 | $scope.selectedCompanyName = ''; |
24 | $scope.selectedCompanyId = ''; | 24 | $scope.selectedCompanyId = ''; |
25 | $scope.marginId = ''; | 25 | $scope.marginId = ''; |
26 | $scope.selectedTier = ''; | 26 | $scope.selectedTier = ''; |
27 | $scope.order.aircraftMake = ''; | ||
28 | $scope.order.aircraftModel = ''; | ||
27 | 29 | ||
28 | $scope.getAircraft = function(company){ | 30 | $scope.getAircraft = function(company){ |
29 | $scope.selectedCompanyName = company; | 31 | $scope.selectedCompanyName = company; |
30 | 32 | $scope.order.aircraftMake = ''; | |
31 | 33 | $scope.order.aircraftModel = ''; | |
34 | //console.log("===company====",company) | ||
32 | $scope.showLoader = true; | 35 | $scope.showLoader = true; |
33 | for (var i = 0; i < $scope.companyList.length; i++) { | 36 | for (var i = 0; i < $scope.companyList.length; i++) { |
34 | if ($scope.companyList[i].companyName == company) { | 37 | if ($scope.companyList[i].companyName == company) { |
35 | $scope.order.certificateType = $scope.companyList[i].certificateType; | 38 | $scope.order.certificateType = $scope.companyList[i].certificateType; |
36 | $scope.baseTenant = $scope.companyList[i].baseTenant; | 39 | $scope.baseTenant = $scope.companyList[i].baseTenant; |
37 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; | 40 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; |
38 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; | 41 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; |
39 | 42 | ||
40 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ | 43 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ |
41 | enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 44 | enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
42 | $scope.marginList = margins; | 45 | $scope.marginList = margins; |
43 | }) | 46 | }) |
44 | } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) { | 47 | } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) { |
45 | enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 48 | enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
46 | $scope.marginList = margins; | 49 | $scope.marginList = margins; |
47 | }) | 50 | }) |
48 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) { | 51 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) { |
49 | enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 52 | enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
50 | $scope.marginList = margins; | 53 | $scope.marginList = margins; |
51 | }) | 54 | }) |
52 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) { | 55 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) { |
53 | enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) { | 56 | enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) { |
54 | $scope.marginList = margins; | 57 | $scope.marginList = margins; |
55 | }) | 58 | }) |
56 | } | 59 | } |
57 | $scope.selectedCompanyId = $scope.companyList[i].id; | 60 | $scope.selectedCompanyId = $scope.companyList[i].id; |
58 | 61 | ||
59 | if ($scope.selectedCompanyId != '') { | 62 | if ($scope.selectedCompanyId != '') { |
60 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 63 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
61 | $scope.aircraftList = aircraft; | 64 | $scope.aircraftList = aircraft; |
62 | }) | 65 | }) |
63 | } | 66 | } |
64 | if($scope.companyList[i].margin == null) { | 67 | if($scope.companyList[i].margin == null) { |
65 | $scope.tierList = []; | 68 | $scope.tierList = []; |
66 | $scope.tierList.push({ | 69 | $scope.tierList.push({ |
67 | 'minTierBreak': '0', 'maxTierBreak': 'โ' | 70 | 'minTierBreak': '0', 'maxTierBreak': 'โ' |
68 | }); | 71 | }); |
69 | $scope.showLoader = false; | 72 | $scope.showLoader = false; |
70 | } else { | 73 | } else { |
71 | $scope.marginId = $scope.companyList[i].margin.id; | 74 | $scope.marginId = $scope.companyList[i].margin.id; |
72 | if ($scope.marginId != '') { | 75 | if ($scope.marginId != '') { |
73 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { | 76 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { |
74 | $scope.tierList = tiers; | 77 | $scope.tierList = tiers; |
75 | $scope.showLoader = false; | 78 | $scope.showLoader = false; |
76 | $scope.selectedTier = $scope.tierList[0]; | 79 | $scope.selectedTier = $scope.tierList[0]; |
77 | }) | 80 | }) |
78 | }else{ | 81 | }else{ |
79 | $scope.showLoader = false; | 82 | $scope.showLoader = false; |
80 | } | 83 | } |
81 | } | 84 | } |
82 | } | 85 | } |
83 | } | 86 | } |
84 | 87 | ||
85 | } | 88 | } |
86 | 89 | ||
90 | $scope.getAircraftMakeAndModel=function (data) { | ||
91 | for(var i = 0; i < $scope.aircraftList.length; i++){ | ||
92 | if($scope.aircraftList[i].tail === data){ | ||
93 | $scope.order.aircraftMake = $scope.aircraftList[i].make; | ||
94 | $scope.order.aircraftModel = $scope.aircraftList[i].model; | ||
95 | } | ||
96 | |||
97 | } | ||
98 | } | ||
99 | |||
100 | |||
101 | |||
87 | $scope.tiervalue=function(){ | 102 | $scope.tiervalue=function(){ |
88 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 103 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
89 | } | 104 | } |
90 | 105 | ||
91 | 106 | ||
92 | 107 | ||
93 | 108 | ||
94 | $scope.cancelOrder = function() { | 109 | $scope.cancelOrder = function() { |
95 | $scope.order = {}; | 110 | $scope.order = {}; |
96 | } | 111 | } |
97 | 112 | ||
98 | 113 | ||
99 | $scope.setCost = function(cost){ | 114 | $scope.setCost = function(cost){ |
100 | if(cost != null) { | 115 | if(cost != null) { |
101 | var obj =JSON.parse(cost); | 116 | var obj =JSON.parse(cost); |
102 | $scope.order.fboCost = obj.cost; | 117 | $scope.order.fboCost = obj.cost; |
103 | } | 118 | } |
104 | } | 119 | } |
105 | 120 | ||
106 | 121 | ||
107 | $scope.addTotal = function(value, valueOf) { | 122 | $scope.addTotal = function(value, valueOf) { |
108 | if (value != undefined && valueOf != undefined) { | 123 | if (value != undefined && valueOf != undefined) { |
109 | value = JSON.parse(value) | 124 | value = JSON.parse(value) |
110 | $scope.order.total = Math.abs(value.papTotal) * valueOf; | 125 | $scope.order.total = Math.abs(value.papTotal) * valueOf; |
111 | } | 126 | } |
112 | } | 127 | } |
113 | 128 | ||
114 | $scope.dispatchFuel = function(){ | 129 | $scope.dispatchFuel = function(){ |
115 | $scope.showLoader = true; | 130 | $scope.showLoader = true; |
116 | 131 | ||
117 | $scope.order.companyId = $scope.selectedCompanyId; | 132 | $scope.order.companyId = $scope.selectedCompanyId; |
118 | $scope.order.companyName = $scope.order.companyName; | 133 | $scope.order.companyName = $scope.order.companyName; |
119 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 134 | //var aircraftObj =JSON.parse($scope.order.aircraftName); |
120 | $scope.order.aircraftName = aircraftObj.tail; | 135 | $scope.order.aircraftName = $scope.order.aircraftName; |
121 | $scope.order.make = aircraftObj.make; | 136 | $scope.order.make = $scope.order.aircraftMake; |
122 | $scope.order.model = aircraftObj.model; | 137 | $scope.order.model = $scope.order.aircraftModel; |
123 | //$scope.order.fuelOn = $scope.order.fuelOn; | 138 | //$scope.order.fuelOn = $scope.order.fuelOn; |
124 | 139 | ||
125 | $scope.order.invoiced = $scope.order.invoiced; | 140 | $scope.order.invoiced = $scope.order.invoiced; |
126 | $scope.order.volume = $scope.order.volume; | 141 | $scope.order.volume = $scope.order.volume; |
127 | // $scope.order.source = $scope.order.source; | 142 | // $scope.order.source = $scope.order.source; |
128 | 143 | ||
129 | $scope.order.total = $scope.order.total; | 144 | $scope.order.total = $scope.order.total; |
130 | 145 | ||
131 | var obj =JSON.parse($scope.order.priceQuote); | 146 | var obj =JSON.parse($scope.order.priceQuote); |
132 | $scope.order.priceQuote = obj.papTotal; | 147 | $scope.order.priceQuote = obj.papTotal; |
133 | $scope.order.fboCost = obj.cost; | 148 | $scope.order.fboCost = obj.cost; |
134 | $scope.order.productName = obj.productName; | 149 | $scope.order.productName = obj.productName; |
135 | 150 | ||
136 | $scope.order.etaTime = $scope.order.etaTime; | 151 | $scope.order.etaTime = $scope.order.etaTime; |
137 | $scope.order.etdTime = $scope.order.etdTime; | 152 | $scope.order.etdTime = $scope.order.etdTime; |
138 | $scope.order.certificateType = $scope.order.certificateType; | 153 | $scope.order.certificateType = $scope.order.certificateType; |
139 | var currentDate = new Date(); | 154 | var currentDate = new Date(); |
140 | var hours = currentDate.getHours(); | 155 | var hours = currentDate.getHours(); |
141 | var min = currentDate.getMinutes(); | 156 | var min = currentDate.getMinutes(); |
142 | var sec = currentDate.getSeconds(); | 157 | var sec = currentDate.getSeconds(); |
143 | if ($scope.order.upliftDate != '') { | 158 | if ($scope.order.upliftDate != '') { |
144 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 159 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
145 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 160 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
146 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 161 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
147 | } | 162 | } |
148 | 163 | ||
149 | 164 | ||
150 | if ($scope.order.departingDate != '') { | 165 | if ($scope.order.departingDate != '') { |
151 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 166 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
152 | $scope.order.departingDate = new Date($scope.order.departingDate); | 167 | $scope.order.departingDate = new Date($scope.order.departingDate); |
153 | $scope.order.departingDate = $scope.order.departingDate.getTime(); | 168 | $scope.order.departingDate = $scope.order.departingDate.getTime(); |
154 | } | 169 | } |
155 | 170 | ||
156 | if($scope.order.status === null || $scope.order.status === undefined){ | 171 | if($scope.order.status === null || $scope.order.status === undefined){ |
157 | 172 | ||
158 | $scope.order.status = "pending"; //default status | 173 | $scope.order.status = "pending"; //default status |
159 | 174 | ||
160 | }else { | 175 | }else { |
161 | 176 | ||
162 | $scope.order.status = $scope.order.status; | 177 | $scope.order.status = $scope.order.status; |
163 | } | 178 | } |
164 | if($scope.order.fuelOn === null || $scope.order.fuelOn ===undefined){ | 179 | if($scope.order.fuelOn === null || $scope.order.fuelOn ===undefined){ |
165 | $scope.order.fuelOn = "Arrival"; //default fuelon | 180 | $scope.order.fuelOn = "Arrival"; //default fuelon |
166 | }else { | 181 | }else { |
167 | $scope.order.fuelOn = $scope.order.fuelOn ; | 182 | $scope.order.fuelOn = $scope.order.fuelOn ; |
168 | } | 183 | } |
169 | 184 | ||
170 | if($scope.baseTenant && $scope.contractFuelVendor ){ | 185 | if($scope.baseTenant && $scope.contractFuelVendor ){ |
171 | $scope.order.source = "Tenant/CAA" ; | 186 | $scope.order.source = "Tenant/CAA" ; |
172 | }else if($scope.baseTenant) | 187 | }else if($scope.baseTenant) |
173 | { | 188 | { |
174 | $scope.order.source = "Tenant/Base Customer"; | 189 | $scope.order.source = "Tenant/Base Customer"; |
175 | }else if($scope.contractFuelVendor){ | 190 | }else if($scope.contractFuelVendor){ |
176 | $scope.order.source = "CAA Member"; | 191 | $scope.order.source = "CAA Member"; |
177 | } | 192 | } |
178 | 193 | ||
179 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 194 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
180 | 195 | //console.log("==$scope.order==",$scope.order) | |
181 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 196 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
182 | $scope.showLoader = false; | 197 | $scope.showLoader = false; |
183 | $scope.order = {}; | 198 | $scope.order = {}; |
184 | $scope.dispatchOrder={}; | 199 | $scope.dispatchOrder={}; |
185 | $scope.order.source=''; | 200 | $scope.order.source=''; |
186 | $scope.baseTenant=false; | 201 | $scope.baseTenant=false; |
187 | $scope.contractFuelVendor=false; | 202 | $scope.contractFuelVendor=false; |
188 | toastr.success('Fuel Order Created Successfully', { | 203 | toastr.success('Fuel Order Created Successfully', { |
189 | closeButton: true | 204 | closeButton: true |
190 | }) | 205 | }) |
191 | }) | 206 | }) |
192 | } | 207 | } |
193 | 208 | ||
194 | 209 | ||
195 | $scope.etaTimeList=[]; | 210 | $scope.etaTimeList=[]; |
196 | $scope.etdTimeList =[]; | 211 | $scope.etdTimeList =[]; |
197 | 212 | ||
198 | $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"}, | 213 | $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"}, |
199 | {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"}, | 214 | {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"}, |
200 | {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"}, | 215 | {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"}, |
201 | {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"}, | 216 | {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"}, |
202 | {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"}, | 217 | {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"}, |
203 | {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"},]; | 218 | {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"},]; |
204 | 219 | ||
205 | $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"}, | 220 | $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"}, |
206 | {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"}, | 221 | {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"}, |
207 | {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"}, | 222 | {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"}, |
208 | {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"}, | 223 | {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"}, |
209 | {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"}, | 224 | {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"}, |
210 | {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"},]; | 225 | {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"},]; |
211 | 226 | ||
212 | } | 227 | } |
app/partials/enterFuelOrder/enterFuelOrder.html
1 | <style type="text/css"> | 1 | <style type="text/css"> |
2 | .subnavbar .mainnav > li:nth-child(4) > a{ | 2 | .subnavbar .mainnav > li:nth-child(4) > a{ |
3 | color: #c44646; | 3 | color: #c44646; |
4 | } | 4 | } |
5 | .customInputWrap{ | 5 | .customInputWrap{ |
6 | margin-top: 15px; | 6 | margin-top: 15px; |
7 | } | 7 | } |
8 | .customInputWrap label{ | 8 | .customInputWrap label{ |
9 | font-weight: normal; | 9 | font-weight: normal; |
10 | margin-bottom: 0; | 10 | margin-bottom: 0; |
11 | } | 11 | } |
12 | </style> | 12 | </style> |
13 | <div class="myLoader" ng-show="showLoader"> | 13 | <div class="myLoader" ng-show="showLoader"> |
14 | <img src="../img/hourglass.gif" width="50px;"> | 14 | <img src="../img/hourglass.gif" width="50px;"> |
15 | </div> | 15 | </div> |
16 | 16 | ||
17 | <div class="container"> | 17 | <div class="container"> |
18 | <div class="row"> | 18 | <div class="row"> |
19 | <div class="col-xs-8"> | 19 | <div class="col-xs-8"> |
20 | <div class="widget stacked"> | 20 | <div class="widget stacked"> |
21 | <div class="widget-header"> | 21 | <div class="widget-header"> |
22 | <i class="fa fa-tasks" aria-hidden="true"></i> | 22 | <i class="fa fa-tasks" aria-hidden="true"></i> |
23 | <h3>Create Fuel Order</h3> | 23 | <h3>Create Fuel Order</h3> |
24 | </div> | 24 | </div> |
25 | <div class="widget-content new-widget-content"> | 25 | <div class="widget-content new-widget-content"> |
26 | <form name="orderform" novalidate> | 26 | <form name="orderform" novalidate> |
27 | 27 | ||
28 | <div class="customInputWrap"> | 28 | <div class="customInputWrap"> |
29 | <div class="col-xs-12"> | 29 | <div class="col-xs-12"> |
30 | 30 | ||
31 | <div class="col-md-6"> | 31 | <div class="col-md-6"> |
32 | <div class="pull-left" style="width: 110px;"> | 32 | <div class="pull-left" style="width: 110px;"> |
33 | <label class="new-input-label"><b>Company</b></label> | 33 | <label class="new-input-label"><b>Company</b></label> |
34 | </div> | 34 | </div> |
35 | <div class="pull-left" style="width: calc(100% - 110px);"> | 35 | <div class="pull-left" style="width: calc(100% - 110px);"> |
36 | <select class="form-control" ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 36 | <select class="form-control" ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
37 | <option value="" selected disabled>Select Company</option> | 37 | <option value="" selected disabled>Select Company</option> |
38 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 38 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
39 | </select> | 39 | </select> |
40 | </div> | 40 | </div> |
41 | <div class="clearfix"></div> | 41 | <div class="clearfix"></div> |
42 | </div> | 42 | </div> |
43 | <div class="col-md-6"> | 43 | <div class="col-md-6"> |
44 | <div class="pull-left" style="width: 110px;"> | 44 | <div class="pull-left" style="width: 110px;"> |
45 | <label class="new-input-label"><b>Product</b></label> | 45 | <label class="new-input-label"><b>Product</b></label> |
46 | </div> | 46 | </div> |
47 | <div class="pull-left" style="width: calc(100% - 110px);"> | 47 | <div class="pull-left" style="width: calc(100% - 110px);"> |
48 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> | 48 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> |
49 | <option value="" selected disabled>Select Product</option> | 49 | <option value="" selected disabled>Select Product</option> |
50 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 50 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
51 | </select> | 51 | </select> |
52 | </div> | 52 | </div> |
53 | <div class="clearfix"></div> | 53 | <div class="clearfix"></div> |
54 | </div> | 54 | </div> |
55 | 55 | ||
56 | </div> | 56 | </div> |
57 | <div class="clearfix"></div> | 57 | <div class="clearfix"></div> |
58 | <br/> | 58 | <br/> |
59 | 59 | ||
60 | 60 | ||
61 | <div class="col-xs-12"> | 61 | <div class="col-xs-12"> |
62 | 62 | ||
63 | <div class="col-md-6"> | 63 | <div class="col-md-6"> |
64 | <div class="pull-left" style="width: 110px;"> | 64 | <div class="pull-left" style="width: 110px;"> |
65 | <label class="new-input-label"><b>Aircraft</b></label> | 65 | <label class="new-input-label"><b>Aircraft</b></label> |
66 | </div> | 66 | </div> |
67 | <div class="pull-left" style="width: calc(100% - 110px);"> | 67 | <div class="pull-left" style="width: calc(100% - 110px);"> |
68 | <select class="form-control" ng-model="order.aircraftName" required> | 68 | <select class="form-control" ng-model="order.aircraftName" ng-change="getAircraftMakeAndModel(order.aircraftName)" required> |
69 | <option selected disabled value="">Select Aircraft</option> | 69 | <option selected disabled value="">Select Aircraft</option> |
70 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 70 | <option ng-repeat="list in aircraftList">{{list.tail}}</option> |
71 | </select> | 71 | </select> |
72 | </div> | 72 | </div> |
73 | <div class="clearfix"></div> | 73 | <div class="clearfix"></div> |
74 | </div> | 74 | </div> |
75 | <div class="col-md-6"> | 75 | <div class="col-md-6"> |
76 | <div class="pull-left" style="width: 110px;"> | 76 | <div class="pull-left" style="width: 110px;"> |
77 | <label class="new-input-label"><b>Make</b></label> | ||
78 | </div> | ||
79 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
80 | <select class="form-control" ng-model="order.aircraftMake" disabled required> | ||
81 | <option selected disabled value="">Select Make</option> | ||
82 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.make}}</option> --> | ||
83 | <option ng-repeat="list in aircraftList">{{list.make}}</option> | ||
84 | </select> | ||
85 | </div> | ||
86 | <div class="clearfix"></div> | ||
87 | </div> | ||
88 | |||
89 | </div> | ||
90 | <div class="clearfix"></div> | ||
91 | <br/> | ||
92 | |||
93 | <div class="col-xs-12"> | ||
94 | |||
95 | <div class="col-md-6"> | ||
96 | <div class="pull-left" style="width: 110px;"> | ||
97 | <label class="new-input-label"><b>Model</b></label> | ||
98 | </div> | ||
99 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
100 | <select class="form-control" ng-model="order.aircraftModel" disabled required> | ||
101 | <option selected disabled value="">Select Model</option> | ||
102 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.model}}</option> --> | ||
103 | <option ng-repeat="list in aircraftList">{{list.model}}</option> | ||
104 | </select> | ||
105 | </div> | ||
106 | <div class="clearfix"></div> | ||
107 | </div> | ||
108 | <div class="col-md-6"> | ||
109 | <div class="pull-left" style="width: 110px;"> | ||
77 | <label class="new-input-label"><b>Volume</b></label> | 110 | <label class="new-input-label"><b>Volume</b></label> |
78 | </div> | 111 | </div> |
79 | <div class="pull-left" style="width: calc(100% - 110px);"> | 112 | <div class="pull-left" style="width: calc(100% - 110px);"> |
80 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 113 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
81 | </div> | 114 | </div> |
82 | <div class="clearfix"></div> | 115 | <div class="clearfix"></div> |
83 | </div> | 116 | </div> |
84 | 117 | ||
85 | </div> | 118 | </div> |
86 | <div class="clearfix"></div> | 119 | <div class="clearfix"></div> |
87 | <br/> | 120 | <br/> |
88 | 121 | ||
89 | <div class="col-xs-12"> | 122 | <div class="col-xs-12"> |
90 | 123 | ||
91 | <div class="col-md-6"> | 124 | <div class="col-md-6"> |
92 | <div class="pull-left" style="width: 110px;"> | 125 | <div class="pull-left" style="width: 110px;"> |
93 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 126 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
94 | </div> | 127 | </div> |
95 | <div class="pull-left" style="width: calc(100% - 110px);"> | 128 | <div class="pull-left" style="width: calc(100% - 110px);"> |
96 | <div style="width: 50%; float: left;"> | 129 | <div style="width: 50%; float: left;"> |
97 | Date | 130 | Date |
98 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 131 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
99 | </div> | 132 | </div> |
100 | <div style="width: 50%; float: left;"> | 133 | <div style="width: 50%; float: left;"> |
101 | Time | 134 | Time |
102 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 135 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
103 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 136 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
104 | </select> | 137 | </select> |
105 | 138 | ||
106 | </div> | 139 | </div> |
107 | </div> | 140 | </div> |
108 | <div class="clearfix"></div> | 141 | <div class="clearfix"></div> |
109 | </div> | 142 | </div> |
110 | 143 | ||
111 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 144 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
112 | <div class="pull-left" style="width: 110px;"> | 145 | <div class="pull-left" style="width: 110px;"> |
113 | <label class="new-input-label"><b>Invoiced</b></label> | 146 | <label class="new-input-label"><b>Invoiced</b></label> |
114 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 147 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
115 | </div> | 148 | </div> |
116 | <div class="pull-left" style="width: calc(100% - 110px);"> | 149 | <div class="pull-left" style="width: calc(100% - 110px);"> |
117 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 150 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
118 | </div> | 151 | </div> |
119 | <div class="clearfix"></div> | 152 | <div class="clearfix"></div> |
120 | </div> | 153 | </div> |
121 | </div> | 154 | </div> |
122 | <div class="clearfix"></div><br> | 155 | <div class="clearfix"></div><br> |
123 | 156 | ||
124 | 157 | ||
125 | <div class="col-xs-12"> | 158 | <div class="col-xs-12"> |
126 | 159 | ||
127 | <div class="col-md-6"> | 160 | <div class="col-md-6"> |
128 | <div class="pull-left" style="width: 110px;"> | 161 | <div class="pull-left" style="width: 110px;"> |
129 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 162 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
130 | </div> | 163 | </div> |
131 | <div class="pull-left" style="width: calc(100% - 110px);"> | 164 | <div class="pull-left" style="width: calc(100% - 110px);"> |
132 | <div style="width: 50%; float: left;"> | 165 | <div style="width: 50%; float: left;"> |
133 | Date | 166 | Date |
134 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 167 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
135 | </div> | 168 | </div> |
136 | <div style="width: 50%; float: left;"> | 169 | <div style="width: 50%; float: left;"> |
137 | Time | 170 | Time |
138 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 171 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
139 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 172 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
140 | </select> | 173 | </select> |
141 | </div> | 174 | </div> |
142 | </div> | 175 | </div> |
143 | <div class="clearfix"></div> | 176 | <div class="clearfix"></div> |
144 | </div> | 177 | </div> |
145 | 178 | ||
146 | <div class="col-md-6" style="margin-top: 22px;"> | 179 | <div class="col-md-6" style="margin-top: 22px;"> |
147 | <div class="pull-left" style="width: 110px;"> | 180 | <div class="pull-left" style="width: 110px;"> |
148 | <label class="new-input-label"><b>Total</b></label> | 181 | <label class="new-input-label"><b>Total</b></label> |
149 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 182 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
150 | </div> | 183 | </div> |
151 | <div class="pull-left" style="width: calc(100% - 110px);"> | 184 | <div class="pull-left" style="width: calc(100% - 110px);"> |
152 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 185 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
153 | </div> | 186 | </div> |
154 | </div> | 187 | </div> |
155 | </div> | 188 | </div> |
156 | <div class="clearfix"></div><br> | 189 | <div class="clearfix"></div><br> |
157 | 190 | ||
158 | 191 | ||
159 | <div class="col-xs-12"> | 192 | <div class="col-xs-12"> |
160 | 193 | ||
161 | <div class="col-md-6"> | 194 | <div class="col-md-6"> |
162 | <div class="pull-left" style="width: 110px;"> | 195 | <div class="pull-left" style="width: 110px;"> |
163 | <label class="new-input-label"><b>Fuel on</b></label> | 196 | <label class="new-input-label"><b>Fuel on</b></label> |
164 | </div> | 197 | </div> |
165 | <div class="pull-left" style="width: calc(100% - 110px);"> | 198 | <div class="pull-left" style="width: calc(100% - 110px);"> |
166 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 199 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
167 | <option value="" disabled selected hidden>Arrival</option> | 200 | <option value="" disabled selected hidden>Arrival</option> |
168 | <option value="Arrival">Arrival</option> | 201 | <option value="Arrival">Arrival</option> |
169 | <option value="Departure">Departure</option> | 202 | <option value="Departure">Departure</option> |
170 | </select> | 203 | </select> |
171 | </div> | 204 | </div> |
172 | <div class="clearfix"></div> | 205 | <div class="clearfix"></div> |
173 | </div> | 206 | </div> |
174 | 207 | ||
175 | <div class="col-md-6"> | 208 | <div class="col-md-6"> |
176 | <div class="pull-left" style="width: 110px;"> | 209 | <div class="pull-left" style="width: 110px;"> |
177 | <label class="new-input-label"><b>FBO Cost</b></label> | 210 | <label class="new-input-label"><b>FBO Cost</b></label> |
178 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 211 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
179 | </div> | 212 | </div> |
180 | <div class="pull-left" style="width: calc(100% - 110px);"> | 213 | <div class="pull-left" style="width: calc(100% - 110px);"> |
181 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 214 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
182 | </div> | 215 | </div> |
183 | <div class="clearfix"></div> | 216 | <div class="clearfix"></div> |
184 | </div> | 217 | </div> |
185 | </div> | 218 | </div> |
186 | <div class="clearfix"></div><br> | 219 | <div class="clearfix"></div><br> |
187 | 220 | ||
188 | <div class="col-xs-12"> | 221 | <div class="col-xs-12"> |
189 | <div class="col-md-6"> | 222 | <div class="col-md-6"> |
190 | <div class="pull-left" style="width: 110px;"> | 223 | <div class="pull-left" style="width: 110px;"> |
191 | <label class="new-input-label"><b>Source</b></label> | 224 | <label class="new-input-label"><b>Source</b></label> |
192 | </div> | 225 | </div> |
193 | <div class="pull-left" style="width: calc(100% - 110px);"> | 226 | <div class="pull-left" style="width: calc(100% - 110px);"> |
194 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> | 227 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> |
195 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> | 228 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> |
196 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> | 229 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> |
197 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | 230 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> |
198 | <option value="" disabled selected hidden>Select Source</option> | 231 | <option value="" disabled selected hidden>Select Source</option> |
199 | <option value="Tenant">Tenant</option> | 232 | <option value="Tenant">Tenant</option> |
200 | <option value="CAA">CAA</option> | 233 | <option value="CAA">CAA</option> |
201 | <option value="Tenant/CAA">Tenant/CAA</option> | 234 | <option value="Tenant/CAA">Tenant/CAA</option> |
202 | </select> --> | 235 | </select> --> |
203 | </div> | 236 | </div> |
204 | <div class="clearfix"></div> | 237 | <div class="clearfix"></div> |
205 | </div> | 238 | </div> |
206 | </div> | 239 | </div> |
207 | <div class="clearfix"></div> | 240 | <div class="clearfix"></div> |
208 | <br/> | 241 | <br/> |
209 | <div class="col-xs-12"> | 242 | <div class="col-xs-12"> |
210 | 243 | ||
211 | 244 | ||
212 | <div class="col-md-6"> | 245 | <div class="col-md-6"> |
213 | <div class="pull-left" style="width: 110px;"> | 246 | <div class="pull-left" style="width: 110px;"> |
214 | <label class="new-input-label"><b>Certificate Type</b></label> | 247 | <label class="new-input-label"><b>Certificate Type</b></label> |
215 | </div> | 248 | </div> |
216 | <div class="pull-left" style="width: calc(100% - 110px);"> | 249 | <div class="pull-left" style="width: calc(100% - 110px);"> |
217 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 250 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
218 | <option value="" disabled selected hidden>Select...</option> | 251 | <option value="" disabled selected hidden>Select...</option> |
219 | <option value="corporate">Part 91 (Corporate)</option> | 252 | <option value="corporate">Part 91 (Corporate)</option> |
220 | <option value="charter">Part 135 (Charter)</option> | 253 | <option value="charter">Part 135 (Charter)</option> |
221 | <option value="scheduled">Part 121 (Scheduled)</option> | 254 | <option value="scheduled">Part 121 (Scheduled)</option> |
222 | <option value="military">Military</option> | 255 | <option value="military">Military</option> |
223 | <option value="government">Government</option> | 256 | <option value="government">Government</option> |
224 | </select> | 257 | </select> |
225 | </div> | 258 | </div> |
226 | <div class="clearfix"></div> | 259 | <div class="clearfix"></div> |
227 | </div> | 260 | </div> |
228 | <div class="col-md-6"> | 261 | <div class="col-md-6"> |
229 | <div class="pull-left" style="width: 110px;"> | 262 | <div class="pull-left" style="width: 110px;"> |
230 | <label class="new-input-label"><b>Status</b></label> | 263 | <label class="new-input-label"><b>Status</b></label> |
231 | </div> | 264 | </div> |
232 | <div class="pull-left" style="width: calc(100% - 110px);"> | 265 | <div class="pull-left" style="width: calc(100% - 110px);"> |
233 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 266 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
234 | <option value="" selected disabled hidden>pending</option> | 267 | <option value="" selected disabled hidden>pending</option> |
235 | <option value="pending">pending</option> | 268 | <option value="pending">pending</option> |
236 | <option value="invoiced">invoiced</option> | 269 | <option value="invoiced">invoiced</option> |
237 | <option value="paid">paid</option> | 270 | <option value="paid">paid</option> |
238 | <!-- <option value="cancelled">cancelled</option> | 271 | <!-- <option value="cancelled">cancelled</option> |
239 | <option value="archived">archived</option> --> | 272 | <option value="archived">archived</option> --> |
240 | </select> | 273 | </select> |
241 | </div> | 274 | </div> |
242 | <div class="clearfix"></div> | 275 | <div class="clearfix"></div> |
243 | </div> | 276 | </div> |
244 | </div> | 277 | </div> |
245 | <div class="clearfix"></div><br> | 278 | <div class="clearfix"></div><br> |
246 | 279 | ||
247 | <div class="customInputWrap text-right"> | 280 | <div class="customInputWrap text-right"> |
248 | <div class="col-xs-12"> | 281 | <div class="col-xs-12"> |
249 | <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;"> | 282 | <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;"> |
250 | <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid"> | 283 | <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid"> |
251 | </div> | 284 | </div> |
252 | <div class="clearfix"></div> | 285 | <div class="clearfix"></div> |
253 | </div> | 286 | </div> |
254 | 287 | ||
255 | </form> | 288 | </form> |
256 | </div> | 289 | </div> |
257 | </div> | 290 | </div> |
258 | </div> | 291 | </div> |
259 | </div> | 292 | </div> |
260 | </div> | 293 | </div> |
261 | 294 |
app/partials/fuelOrders/fuelOrders.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','$stateParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); | 5 | .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','$stateParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); |
6 | 6 | ||
7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,$stateParams,fuelOrdersService,CustomersService,ViewCompanyService) { | 7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,$stateParams,fuelOrdersService,CustomersService,ViewCompanyService) { |
8 | 8 | ||
9 | $scope.showFuelOrderModal = false; | 9 | $scope.showFuelOrderModal = false; |
10 | $scope.optionSelected; | 10 | $scope.optionSelected; |
11 | $scope.orderdata = {}; | 11 | $scope.orderdata = {}; |
12 | $scope.showLoader = false; | 12 | $scope.showLoader = false; |
13 | $scope.jetShow = []; | 13 | $scope.jetShow = []; |
14 | $scope.marginShow = []; | 14 | $scope.marginShow = []; |
15 | 15 | ||
16 | $scope.jetShow[0] = true; | 16 | $scope.jetShow[0] = true; |
17 | $scope.marginShow[0] = true; | 17 | $scope.marginShow[0] = true; |
18 | 18 | ||
19 | $scope.data = {}; | 19 | $scope.data = {}; |
20 | $scope.order = {}; | 20 | $scope.order = {}; |
21 | $scope.dispatchOrder = {}; | 21 | $scope.dispatchOrder = {}; |
22 | $scope.dispatchOrder.fuelOrderList = []; | 22 | $scope.dispatchOrder.fuelOrderList = []; |
23 | $scope.defaultStatus = ''; | 23 | $scope.defaultStatus = ''; |
24 | $scope.statusFilterOptions = []; | 24 | $scope.statusFilterOptions = []; |
25 | $scope.statusFilterOptions.push({ | 25 | $scope.statusFilterOptions.push({ |
26 | 'id': '', 'title': 'Show All' | 26 | 'id': '', 'title': 'Show All' |
27 | },{ | 27 | },{ |
28 | 'id': 'pending', 'title': 'Pending' | 28 | 'id': 'pending', 'title': 'Pending' |
29 | },{ | 29 | },{ |
30 | 'id': 'invoiced', 'title': 'Invoiced' | 30 | 'id': 'invoiced', 'title': 'Invoiced' |
31 | },{ | 31 | },{ |
32 | 'id': 'paid', 'title': 'Paid' | 32 | 'id': 'paid', 'title': 'Paid' |
33 | },{ | 33 | },{ |
34 | 'id': 'cancelled', 'title': 'Cancelled' | 34 | 'id': 'cancelled', 'title': 'Cancelled' |
35 | },{ | 35 | },{ |
36 | 'id': 'archived', 'title': 'Archived' | 36 | 'id': 'archived', 'title': 'Archived' |
37 | } | 37 | } |
38 | 38 | ||
39 | ); | 39 | ); |
40 | 40 | ||
41 | if($stateParams.status =="paid"){ | 41 | if($stateParams.status =="paid"){ |
42 | $scope.defaultStatus = "paid"; | 42 | $scope.defaultStatus = "paid"; |
43 | } | 43 | } |
44 | 44 | ||
45 | getAllCompanies(); | 45 | getAllCompanies(); |
46 | 46 | ||
47 | function getAllCompanies(){ | 47 | function getAllCompanies(){ |
48 | fuelOrdersService.getAllCompanies().then(function(result) { | 48 | fuelOrdersService.getAllCompanies().then(function(result) { |
49 | $scope.companyList = result; | 49 | $scope.companyList = result; |
50 | for (var i = 0; i < $scope.companyList.length; i++) { | 50 | for (var i = 0; i < $scope.companyList.length; i++) { |
51 | if ($scope.companyList[i].companyContact != null) { | 51 | if ($scope.companyList[i].companyContact != null) { |
52 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 52 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
53 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 53 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
54 | } | 54 | } |
55 | } | 55 | } |
56 | if ($scope.companyList[i].primaryContact != null) { | 56 | if ($scope.companyList[i].primaryContact != null) { |
57 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 57 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
58 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 58 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | if ($scope.companyList[i].margin != null) { | 61 | if ($scope.companyList[i].margin != null) { |
62 | if ($scope.companyList[i].margin.marginName != null) { | 62 | if ($scope.companyList[i].margin.marginName != null) { |
63 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 63 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
64 | } | 64 | } |
65 | } | 65 | } |
66 | } | 66 | } |
67 | $scope.displayCompanyList = new NgTableParams({ | 67 | $scope.displayCompanyList = new NgTableParams({ |
68 | page: 1, | 68 | page: 1, |
69 | count: 10, | 69 | count: 10, |
70 | }, { | 70 | }, { |
71 | data: $scope.companyList | 71 | data: $scope.companyList |
72 | }); | 72 | }); |
73 | $scope.showLoader = false; | 73 | $scope.showLoader = false; |
74 | }) | 74 | }) |
75 | } | 75 | } |
76 | 76 | ||
77 | 77 | ||
78 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | 78 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) |
79 | $scope.reset2 = function(){ | 79 | $scope.reset2 = function(){ |
80 | $("input").val(""); | 80 | $("input").val(""); |
81 | $scope.removeMarginValidation(); | 81 | $scope.removeMarginValidation(); |
82 | } | 82 | } |
83 | 83 | ||
84 | function colourFunction() { | 84 | function colourFunction() { |
85 | var myselect = document.getElementById('colorfulSelectbox'), | 85 | var myselect = document.getElementById('colorfulSelectbox'), |
86 | colour = myselect.options[myselect.selectedIndex].className; | 86 | colour = myselect.options[myselect.selectedIndex].className; |
87 | myselect.style.background = colour; | 87 | myselect.style.background = colour; |
88 | myselect.blur(); | 88 | myselect.blur(); |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | /*setInterval(function(){ | 92 | /*setInterval(function(){ |
93 | colourFunction(); | 93 | colourFunction(); |
94 | }, 1)*/ | 94 | }, 1)*/ |
95 | 95 | ||
96 | 96 | ||
97 | $scope.attachmentFilterOptions = []; | 97 | $scope.attachmentFilterOptions = []; |
98 | $scope.attachmentFilterOptions.push({ | 98 | $scope.attachmentFilterOptions.push({ |
99 | 'id': '', 'title': 'Show All' | 99 | 'id': '', 'title': 'Show All' |
100 | },{ | 100 | },{ |
101 | 'id': '!null', 'title': 'Attachments' | 101 | 'id': '!null', 'title': 'Attachments' |
102 | },{ | 102 | },{ |
103 | 'id': 'null', 'title': 'No Attachments' | 103 | 'id': 'null', 'title': 'No Attachments' |
104 | } | 104 | } |
105 | ); | 105 | ); |
106 | 106 | ||
107 | // $(document).ready(function() { | 107 | // $(document).ready(function() { |
108 | // $scope.showLoader = true; | 108 | // $scope.showLoader = true; |
109 | // $('#example').DataTable(); | 109 | // $('#example').DataTable(); |
110 | // $scope.showLoader = false; | 110 | // $scope.showLoader = false; |
111 | // }); | 111 | // }); |
112 | 112 | ||
113 | $scope.getOrders = function() { | 113 | $scope.getOrders = function() { |
114 | fuelOrdersService.getOrders().then(function(result) { | 114 | fuelOrdersService.getOrders().then(function(result) { |
115 | $scope.orderdata = result; | 115 | $scope.orderdata = result; |
116 | for(var i=0 ; i < $scope.orderdata.length ; i++){ | 116 | for(var i=0 ; i < $scope.orderdata.length ; i++){ |
117 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 117 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
118 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); | 118 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); |
119 | $scope.orderdata[i].fuelingDate = new Date($scope.orderdata[i].fuelingDate); | 119 | $scope.orderdata[i].fuelingDate = new Date($scope.orderdata[i].fuelingDate); |
120 | 120 | ||
121 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); | 121 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); |
122 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); | 122 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); |
123 | // var fuelingDateStr = "" + ($scope.orderdata[i].fuelingDate.getMonth() + 1) + "/" + $scope.orderdata[i].fuelingDate.getDate() + "/" + $scope.orderdata[i].fuelingDate.getFullYear(); | 123 | // var fuelingDateStr = "" + ($scope.orderdata[i].fuelingDate.getMonth() + 1) + "/" + $scope.orderdata[i].fuelingDate.getDate() + "/" + $scope.orderdata[i].fuelingDate.getFullYear(); |
124 | $scope.orderdata[i].upliftDateString = str; | 124 | $scope.orderdata[i].upliftDateString = str; |
125 | $scope.orderdata[i].departingDateString = departingStr; | 125 | $scope.orderdata[i].departingDateString = departingStr; |
126 | // $scope.orderdata[i].fuelingDate = fuelingDateStr; | 126 | // $scope.orderdata[i].fuelingDate = fuelingDateStr; |
127 | 127 | ||
128 | 128 | ||
129 | } | 129 | } |
130 | // console.log("==result===",$scope.orderdata) | 130 | // console.log("==result===",$scope.orderdata) |
131 | 131 | ||
132 | $scope.displayFuelOrderList = new NgTableParams({ | 132 | $scope.displayFuelOrderList = new NgTableParams({ |
133 | page: 1, | 133 | page: 1, |
134 | count: 50, | 134 | count: 50, |
135 | }, { | 135 | }, { |
136 | data: $scope.orderdata | 136 | data: $scope.orderdata |
137 | }); | 137 | }); |
138 | $(document).ready(function(){ | 138 | $(document).ready(function(){ |
139 | function changeSelectboxBg(){ | 139 | function changeSelectboxBg(){ |
140 | setInterval(function(){ | 140 | setInterval(function(){ |
141 | if ($('.table select').is(':focus')) { | 141 | if ($('.table select').is(':focus')) { |
142 | 142 | ||
143 | }else{ | 143 | }else{ |
144 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 144 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
145 | 145 | ||
146 | for (var i = 0; i < myselect.length; i++) { | 146 | for (var i = 0; i < myselect.length; i++) { |
147 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 147 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
148 | colourIndex = colourIndex + 1; | 148 | colourIndex = colourIndex + 1; |
149 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); | 149 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); |
150 | $(myselect[i]).css('background-color', getColor); | 150 | $(myselect[i]).css('background-color', getColor); |
151 | myselect[i].blur(); | 151 | myselect[i].blur(); |
152 | } | 152 | } |
153 | } | 153 | } |
154 | }, 1000) | 154 | }, 1000) |
155 | } | 155 | } |
156 | changeSelectboxBg(); | 156 | changeSelectboxBg(); |
157 | // console.log("=====$scope.displayFuelOrderList====",$scope.displayFuelOrderList) | 157 | // console.log("=====$scope.displayFuelOrderList====",$scope.displayFuelOrderList) |
158 | 158 | ||
159 | /*$('.pagination , .recordCountSelect').click(function(){ | 159 | /*$('.pagination , .recordCountSelect').click(function(){ |
160 | changeSelectboxBg(); | 160 | changeSelectboxBg(); |
161 | }) | 161 | }) |
162 | $('.input-filter').keydown(function(){ | 162 | $('.input-filter').keydown(function(){ |
163 | console.log('function..........'); | 163 | console.log('function..........'); |
164 | changeSelectboxBg(); | 164 | changeSelectboxBg(); |
165 | })*/ | 165 | })*/ |
166 | }) | 166 | }) |
167 | }) | 167 | }) |
168 | } | 168 | } |
169 | 169 | ||
170 | $scope.getOrders(); | 170 | $scope.getOrders(); |
171 | $scope.optionSelected=''; | 171 | $scope.optionSelected=''; |
172 | var checkFlag = 0; | ||
172 | $scope.onFWSelect = function() { | 173 | $scope.onFWSelect = function() { |
173 | if($scope.optionSelected == 'dt'){ | 174 | if (checkFlag != 0) { |
174 | $('#demo-modal-4').css('display', 'block'); | 175 | $(document).ready(function(){ |
175 | $scope.optionSelected=''; | 176 | $('body').css('position', 'fixed'); |
176 | 177 | }) | |
177 | } | 178 | if($scope.optionSelected == 'dt'){ |
178 | if($scope.optionSelected == 'efo'){ | 179 | $('#demo-modal-4').css('display', 'block'); |
179 | $scope.showLoader = true; | 180 | $scope.optionSelected=''; |
180 | var fileName = "orders.csv"; | 181 | |
181 | var a = document.createElement("a"); | 182 | } |
182 | document.body.appendChild(a); | 183 | if($scope.optionSelected == 'efo'){ |
183 | fuelOrdersService.exportCompany().then(function(result) { | 184 | $scope.showLoader = true; |
184 | var file = new Blob([result], {type: 'application/csv'}); | 185 | var fileName = "orders.csv"; |
185 | var fileURL = URL.createObjectURL(file); | 186 | var a = document.createElement("a"); |
186 | a.href = fileURL; | 187 | document.body.appendChild(a); |
187 | a.download = fileName; | 188 | fuelOrdersService.exportCompany().then(function(result) { |
188 | a.click(); | 189 | var file = new Blob([result], {type: 'application/csv'}); |
189 | $scope.showLoader = false; | 190 | var fileURL = URL.createObjectURL(file); |
190 | $scope.optionSelected=''; | 191 | a.href = fileURL; |
191 | }) | 192 | a.download = fileName; |
192 | } | 193 | a.click(); |
193 | } | 194 | $scope.showLoader = false; |
195 | $scope.optionSelected=''; | ||
196 | $(document).ready(function(){ | ||
197 | $('body').css('position', 'initial'); | ||
198 | }) | ||
199 | }) | ||
200 | } | ||
201 | checkFlag += 1; | ||
202 | }else{ | ||
203 | checkFlag += 1; | ||
204 | } | ||
205 | |||
206 | } | ||
194 | $scope.attachmentrowid = "" | 207 | $scope.attachmentrowid = "" |
195 | 208 | ||
196 | 209 | ||
197 | $scope.attachment = function(id, value, url) { | 210 | $scope.attachment = function(id, value, url) { |
198 | $scope.attachmentrowid = id | 211 | $scope.attachmentrowid = id |
199 | if(value == 'uploadAttachment'){ | 212 | if(value == 'uploadAttachment'){ |
200 | $('#demo-modal-6').css('display', 'block'); | 213 | $('#demo-modal-6').css('display', 'block'); |
201 | }else if(value == 'viewAttachment'){ | 214 | }else if(value == 'viewAttachment'){ |
202 | var win = window.open(url, '_blank'); | 215 | var win = window.open(url, '_blank'); |
203 | win.focus(); | 216 | win.focus(); |
204 | }else if(value == 'deleteAttachment'){ | 217 | }else if(value == 'deleteAttachment'){ |
205 | $('#delete1').css('display', 'block'); | 218 | $('#delete1').css('display', 'block'); |
206 | } | 219 | } |
207 | } | 220 | } |
208 | 221 | ||
209 | $scope.cancelDeleteAttachment = function() { | 222 | $scope.cancelDeleteAttachment = function() { |
210 | $('#delete1').css('display', ''); | 223 | $('#delete1').css('display', ''); |
211 | } | 224 | } |
212 | 225 | ||
213 | $scope.deleteAttachment = function() { | 226 | $scope.deleteAttachment = function() { |
214 | $scope.showLoader = true; | 227 | $scope.showLoader = true; |
215 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { | 228 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { |
216 | 229 | ||
217 | if(result.success){ | 230 | if(result.success){ |
218 | toastr.success(''+result.success+'', { | 231 | toastr.success(''+result.success+'', { |
219 | closeButton: true | 232 | closeButton: true |
220 | }) | 233 | }) |
221 | } | 234 | } |
222 | }) | 235 | }) |
223 | $scope.showLoader = false; | 236 | $scope.showLoader = false; |
224 | $('#delete1').css('display', ''); | 237 | $('#delete1').css('display', ''); |
225 | } | 238 | } |
226 | 239 | ||
227 | $scope.saveUploadAttachment = function(attachmentData) { | 240 | $scope.saveUploadAttachment = function(attachmentData) { |
228 | $scope.showLoader = true; | 241 | $scope.showLoader = true; |
229 | $scope.data.media = attachmentData | 242 | $scope.data.media = attachmentData |
230 | $scope.data.id = $scope.attachmentrowid | 243 | $scope.data.id = $scope.attachmentrowid |
231 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { | 244 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { |
232 | if(result){ | 245 | if(result){ |
233 | toastr.success(''+"Upload Successful"+'', { | 246 | toastr.success(''+"Upload Successful"+'', { |
234 | closeButton: true | 247 | closeButton: true |
235 | }) | 248 | }) |
236 | } | 249 | } |
237 | 250 | ||
238 | }) | 251 | }) |
239 | $scope.showLoader = false; | 252 | $scope.showLoader = false; |
240 | $('#demo-modal-6').css('display', 'none'); | 253 | $('#demo-modal-6').css('display', 'none'); |
241 | } | 254 | } |
242 | 255 | ||
243 | $scope.cancelUploadAttachment = function() { | 256 | $scope.cancelUploadAttachment = function() { |
244 | $('#demo-modal-6').css('display', 'none'); | 257 | $('#demo-modal-6').css('display', 'none'); |
245 | } | 258 | } |
246 | 259 | ||
247 | $scope.editdata = {}; | 260 | $scope.editdata = {}; |
248 | 261 | ||
249 | 262 | ||
250 | $scope.editTableRow = function(rowData){ | 263 | $scope.editTableRow = function(rowData){ |
251 | //console.log('row data', rowData); | 264 | //console.log('row data', rowData); |
265 | $(document).ready(function(){ | ||
266 | $('body').css('position', 'fixed'); | ||
267 | }) | ||
252 | $scope.editdata = rowData; | 268 | $scope.editdata = rowData; |
253 | $('#demo-modal-5').css('display', 'block'); | 269 | $('#demo-modal-5').css('display', 'block'); |
254 | } | 270 | } |
255 | 271 | ||
256 | $scope.updateTotal = function(value, valueOf){ | 272 | $scope.updateTotal = function(value, valueOf){ |
257 | if(valueOf == 'v'){ | 273 | if(valueOf == 'v'){ |
258 | $scope.editdata.total = value * $scope.editdata.invoiced | 274 | $scope.editdata.total = value * $scope.editdata.invoiced |
259 | }else if(valueOf == 'i'){ | 275 | }else if(valueOf == 'i'){ |
260 | $scope.editdata.total = $scope.editdata.requestedVolume * value | 276 | $scope.editdata.total = $scope.editdata.requestedVolume * value |
261 | } | 277 | } |
262 | } | 278 | } |
263 | 279 | ||
264 | $scope.setCost = function(cost){ | 280 | $scope.setCost = function(cost){ |
265 | if(cost != null) { | 281 | if(cost != null) { |
266 | var obj =JSON.parse(cost); | 282 | var obj =JSON.parse(cost); |
267 | $scope.order.fboCost = obj.cost; | 283 | $scope.order.fboCost = obj.cost; |
268 | } | 284 | } |
269 | 285 | ||
270 | } | 286 | } |
271 | 287 | ||
272 | $scope.addTotal = function(value, valueOf) { | 288 | $scope.addTotal = function(value, valueOf) { |
273 | if (value != undefined && valueOf != undefined) { | 289 | if (value != undefined && valueOf != undefined) { |
274 | value = JSON.parse(value) | 290 | value = JSON.parse(value) |
275 | $scope.order.total = Math.abs(value.papTotal) * valueOf; | 291 | $scope.order.total = Math.abs(value.papTotal) * valueOf; |
276 | } | 292 | } |
277 | } | 293 | } |
278 | 294 | ||
279 | $scope.addFuelData = function() { | 295 | $scope.addFuelData = function() { |
280 | $scope.showLoader = true; | 296 | $scope.showLoader = true; |
281 | $scope.fuelData = {}; | 297 | $scope.fuelData = {}; |
282 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 298 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
283 | 299 | ||
284 | $scope.fuelData.companyName = $scope.order.companyName; | 300 | $scope.fuelData.companyName = $scope.order.companyName; |
285 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 301 | //var aircraftObj =JSON.parse($scope.order.aircraftName); |
286 | $scope.fuelData.aircraftName = aircraftObj.tail; | 302 | $scope.fuelData.aircraftName = $scope.order.aircraftName; |
287 | $scope.fuelData.make = aircraftObj.make; | 303 | $scope.fuelData.make = $scope.order.aircraftMake; |
288 | $scope.fuelData.model = aircraftObj.model; | 304 | $scope.fuelData.model = $scope.order.aircraftModel; |
289 | // $scope.fuelData.fuelOn = $scope.order.fuelOn; | 305 | // $scope.fuelData.fuelOn = $scope.order.fuelOn; |
290 | $scope.fuelData.invoiced = $scope.order.invoiced; | 306 | $scope.fuelData.invoiced = $scope.order.invoiced; |
291 | $scope.fuelData.volume = $scope.order.volume; | 307 | $scope.fuelData.volume = $scope.order.volume; |
292 | // $scope.fuelData.source = $scope.order.source; | 308 | // $scope.fuelData.source = $scope.order.source; |
293 | 309 | ||
294 | $scope.fuelData.total = $scope.order.total; | 310 | $scope.fuelData.total = $scope.order.total; |
295 | //tier no use | 311 | //tier no use |
296 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 312 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
297 | 313 | ||
298 | var obj =JSON.parse($scope.order.priceQuote); | 314 | var obj =JSON.parse($scope.order.priceQuote); |
299 | $scope.fuelData.priceQuote = obj.papTotal; | 315 | $scope.fuelData.priceQuote = obj.papTotal; |
300 | $scope.fuelData.fboCost = obj.cost; | 316 | $scope.fuelData.fboCost = obj.cost; |
301 | $scope.fuelData.productName = obj.productName; | 317 | $scope.fuelData.productName = obj.productName; |
302 | 318 | ||
303 | $scope.fuelData.etaTime = $scope.order.etaTime; | 319 | $scope.fuelData.etaTime = $scope.order.etaTime; |
304 | $scope.fuelData.etdTime = $scope.order.etdTime; | 320 | $scope.fuelData.etdTime = $scope.order.etdTime; |
305 | $scope.fuelData.certificateType = $scope.order.certificateType; | 321 | $scope.fuelData.certificateType = $scope.order.certificateType; |
306 | var currentDate = new Date(); | 322 | var currentDate = new Date(); |
307 | var hours = currentDate.getHours(); | 323 | var hours = currentDate.getHours(); |
308 | var min = currentDate.getMinutes(); | 324 | var min = currentDate.getMinutes(); |
309 | var sec = currentDate.getSeconds(); | 325 | var sec = currentDate.getSeconds(); |
310 | if ($scope.order.upliftDate != '') { | 326 | if ($scope.order.upliftDate != '') { |
311 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 327 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
312 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 328 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
313 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 329 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
314 | } | 330 | } |
315 | 331 | ||
316 | 332 | ||
317 | if ($scope.order.departingDate != '') { | 333 | if ($scope.order.departingDate != '') { |
318 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 334 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
319 | $scope.order.departingDate = new Date($scope.order.departingDate); | 335 | $scope.order.departingDate = new Date($scope.order.departingDate); |
320 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 336 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
321 | } | 337 | } |
322 | 338 | ||
323 | if($scope.order.status === null || $scope.order.status === undefined){ | 339 | if($scope.order.status === null || $scope.order.status === undefined){ |
324 | 340 | ||
325 | $scope.fuelData.status = "pending"; //default status | 341 | $scope.fuelData.status = "pending"; //default status |
326 | 342 | ||
327 | }else { | 343 | }else { |
328 | 344 | ||
329 | $scope.fuelData.status = $scope.order.status; | 345 | $scope.fuelData.status = $scope.order.status; |
330 | } | 346 | } |
331 | 347 | ||
332 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ | 348 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ |
333 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon | 349 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon |
334 | }else { | 350 | }else { |
335 | $scope.fuelData.fuelOn = $scope.order.fuelOn ; | 351 | $scope.fuelData.fuelOn = $scope.order.fuelOn ; |
336 | } | 352 | } |
337 | 353 | ||
338 | if($scope.baseTenant && $scope.contractFuelVendor ){ | 354 | if($scope.baseTenant && $scope.contractFuelVendor ){ |
339 | $scope.fuelData.source = "Tenant/CAA" ; | 355 | $scope.fuelData.source = "Tenant/CAA" ; |
340 | }else if($scope.baseTenant) | 356 | }else if($scope.baseTenant) |
341 | { | 357 | { |
342 | $scope.fuelData.source = "Tenant/Base Customer"; | 358 | $scope.fuelData.source = "Tenant/Base Customer"; |
343 | }else if($scope.contractFuelVendor){ | 359 | }else if($scope.contractFuelVendor){ |
344 | $scope.fuelData.source = "CAA Member"; | 360 | $scope.fuelData.source = "CAA Member"; |
345 | } | 361 | } |
346 | 362 | ||
347 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 363 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
348 | // console.log("=====$scope.fueldata======",$scope.fuelData) | ||
349 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 364 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
350 | $scope.showLoader = false; | 365 | $scope.showLoader = false; |
351 | $scope.order = {}; | 366 | $scope.order = {}; |
352 | $scope.dispatchOrder.fuelOrderList = []; | 367 | $scope.dispatchOrder.fuelOrderList = []; |
353 | $scope.fuelData.source=''; | 368 | $scope.fuelData.source=''; |
354 | $scope.baseTenant=false; | 369 | $scope.baseTenant=false; |
355 | $scope.contractFuelVendor=false; | 370 | $scope.contractFuelVendor=false; |
356 | $('#demo-modal-4').css('display', ''); | 371 | $('#demo-modal-4').css('display', ''); |
357 | $scope.getOrders(); | 372 | $scope.getOrders(); |
358 | toastr.success('Fuel Order Dispatched Successfully', { | 373 | toastr.success('Fuel Order Dispatched Successfully', { |
359 | closeButton: true | 374 | closeButton: true |
360 | }) | 375 | }) |
376 | /*for datepicker position */ | ||
377 | $(document).ready(function(){ | ||
378 | $('body').css('position', 'initial'); | ||
379 | }) | ||
361 | }) | 380 | }) |
362 | 381 | ||
363 | 382 | ||
364 | } | 383 | } |
365 | 384 | ||
366 | $scope.updateStatus = function(row, status) { | 385 | $scope.updateStatus = function(row, status) { |
367 | 386 | ||
368 | $scope.showLoader = true; | 387 | $scope.showLoader = true; |
369 | $scope.fuelData = {}; | 388 | $scope.fuelData = {}; |
370 | $scope.fuelData.aircraftName = row.aircraftName | 389 | $scope.fuelData.aircraftName = row.aircraftName |
371 | $scope.fuelData.companyName = row.companyName | 390 | $scope.fuelData.companyName = row.companyName |
372 | $scope.fuelData.departingDate = row.departingDate | 391 | $scope.fuelData.departingDate = row.departingDate |
373 | $scope.fuelData.fboCost = row.fboCost | 392 | $scope.fuelData.fboCost = row.fboCost |
374 | $scope.fuelData.id = row.id | 393 | $scope.fuelData.id = row.id |
375 | $scope.fuelData.invoiced = row.invoiced | 394 | $scope.fuelData.invoiced = row.invoiced |
376 | $scope.fuelData.priceQuote = row.priceQuote | 395 | $scope.fuelData.priceQuote = row.priceQuote |
377 | $scope.fuelData.volume = row.requestedVolume | 396 | $scope.fuelData.volume = row.requestedVolume |
378 | $scope.fuelData.source = row.source | 397 | $scope.fuelData.source = row.source |
379 | $scope.fuelData.status = status | 398 | $scope.fuelData.status = status |
380 | $scope.fuelData.tierBreak = row.tierBreak | 399 | $scope.fuelData.tierBreak = row.tierBreak |
381 | $scope.fuelData.total = row.total | 400 | $scope.fuelData.total = row.total |
382 | $scope.fuelData.upliftDate = row.upliftDate | 401 | $scope.fuelData.upliftDate = row.upliftDate |
383 | 402 | ||
384 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 403 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
385 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 404 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
386 | $scope.showLoader = false; | 405 | $scope.showLoader = false; |
387 | $scope.editdata = {}; | 406 | $scope.editdata = {}; |
388 | $scope.fuelData = {}; | 407 | $scope.fuelData = {}; |
389 | $scope.dispatchOrder.fuelOrderList = []; | 408 | $scope.dispatchOrder.fuelOrderList = []; |
390 | $('#demo-modal-5').css('display', ''); | 409 | $('#demo-modal-5').css('display', ''); |
391 | $scope.getOrders(); | 410 | $scope.getOrders(); |
392 | toastr.success('Fuel Order Updated Successfully', { | 411 | toastr.success('Fuel Order Updated Successfully', { |
393 | closeButton: true | 412 | closeButton: true |
394 | }); | 413 | }); |
395 | }) | 414 | }) |
396 | 415 | ||
397 | } | 416 | } |
398 | $scope.fuelData = {}; | 417 | $scope.fuelData = {}; |
399 | $scope.updateData = function() { | 418 | $scope.updateData = function() { |
400 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ | 419 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ |
401 | $scope.showLoader = true; | 420 | $scope.showLoader = true; |
402 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; | 421 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; |
403 | $scope.fuelData.companyName = $scope.editdata.companyName; | 422 | $scope.fuelData.companyName = $scope.editdata.companyName; |
404 | $scope.fuelData.fboCost = $scope.editdata.fboCost; | 423 | $scope.fuelData.fboCost = $scope.editdata.fboCost; |
405 | $scope.fuelData.id = $scope.editdata.id; | 424 | $scope.fuelData.id = $scope.editdata.id; |
406 | $scope.fuelData.invoiced = $scope.editdata.invoiced; | 425 | $scope.fuelData.invoiced = $scope.editdata.invoiced; |
407 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; | 426 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; |
408 | $scope.fuelData.volume = $scope.editdata.requestedVolume; | 427 | $scope.fuelData.volume = $scope.editdata.requestedVolume; |
409 | $scope.fuelData.source = $scope.editdata.source; | 428 | $scope.fuelData.source = $scope.editdata.source; |
410 | $scope.fuelData.status = $scope.editdata.status; | 429 | $scope.fuelData.status = $scope.editdata.status; |
411 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; | 430 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; |
412 | $scope.fuelData.total = $scope.editdata.total; | 431 | $scope.fuelData.total = $scope.editdata.total; |
413 | 432 | ||
414 | var currentDate = new Date(); | 433 | var currentDate = new Date(); |
415 | var hours = currentDate.getHours(); | 434 | var hours = currentDate.getHours(); |
416 | var min = currentDate.getMinutes(); | 435 | var min = currentDate.getMinutes(); |
417 | var sec = currentDate.getSeconds(); | 436 | var sec = currentDate.getSeconds(); |
418 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString + ' ' + hours + ':' + min + ':' + sec; | 437 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString + ' ' + hours + ':' + min + ':' + sec; |
419 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); | 438 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); |
420 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); | 439 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); |
421 | 440 | ||
422 | $scope.editdata.departingDateString = $scope.editdata.departingDateString + ' ' + hours + ':' + min + ':' + sec; | 441 | $scope.editdata.departingDateString = $scope.editdata.departingDateString + ' ' + hours + ':' + min + ':' + sec; |
423 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); | 442 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); |
424 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); | 443 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); |
425 | 444 | ||
426 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; | 445 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; |
427 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; | 446 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; |
428 | $scope.fuelData.productName = $scope.editdata.productName; | 447 | $scope.fuelData.productName = $scope.editdata.productName; |
429 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); | 448 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); |
430 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ | 449 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ |
431 | $scope.fuelData.etaTime = $scope.editdata.etaTime; | 450 | $scope.fuelData.etaTime = $scope.editdata.etaTime; |
432 | $scope.fuelData.etdTime = $scope.editdata.etdTime; | 451 | $scope.fuelData.etdTime = $scope.editdata.etdTime; |
433 | $scope.fuelData.certificateType = $scope.editdata.certificateType; | 452 | $scope.fuelData.certificateType = $scope.editdata.certificateType; |
434 | // $scope.fuelData.fuelOn = $scope.editdata.fuelOn; | 453 | // $scope.fuelData.fuelOn = $scope.editdata.fuelOn; |
435 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ | 454 | if($scope.fuelData.fuelOn === null || $scope.fuelData.fuelOn ===undefined){ |
436 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon | 455 | $scope.fuelData.fuelOn = "Arrival"; //default fuelon |
437 | }else { | 456 | }else { |
438 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn ; | 457 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn ; |
439 | } | 458 | } |
440 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 459 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
441 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 460 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
442 | $scope.showLoader = false; | 461 | $scope.showLoader = false; |
443 | $scope.editdata = {}; | 462 | $scope.editdata = {}; |
444 | $('#demo-modal-5').css('display', ''); | 463 | $('#demo-modal-5').css('display', ''); |
445 | $scope.getOrders(); | 464 | $scope.getOrders(); |
446 | toastr.success('Fuel Order Updated Successfully', { | 465 | toastr.success('Fuel Order Updated Successfully', { |
447 | closeButton: true | 466 | closeButton: true |
448 | }) | 467 | }) |
468 | /*for datepicker position */ | ||
469 | $(document).ready(function(){ | ||
470 | $('body').css('position', 'initial'); | ||
471 | }) | ||
449 | }) | 472 | }) |
450 | |||
451 | |||
452 | |||
453 | 473 | ||
454 | }else | 474 | }else |
455 | { | 475 | { |
456 | toastr.error('Please select Arrival Time and Departure time both.', { | 476 | toastr.error('Please select Arrival Time and Departure time both.', { |
457 | closeButton: true | 477 | closeButton: true |
458 | }) | 478 | }) |
459 | } | 479 | } |
460 | 480 | ||
461 | } | 481 | } |
462 | 482 | ||
463 | $scope.getAircraft = function(company){ | 483 | $scope.getAircraft = function(company){ |
464 | 484 | ||
465 | $scope.selectedCompanyName = company; | 485 | $scope.selectedCompanyName = company; |
466 | //$scope.showLoader = true; | 486 | //$scope.showLoader = true; |
467 | for (var i = 0; i < $scope.companyList.length; i++) { | 487 | for (var i = 0; i < $scope.companyList.length; i++) { |
468 | if ($scope.companyList[i].companyName == company) { | 488 | if ($scope.companyList[i].companyName == company) { |
469 | $scope.order.certificateType = $scope.companyList[i].certificateType; | 489 | $scope.order.certificateType = $scope.companyList[i].certificateType; |
470 | $scope.baseTenant = $scope.companyList[i].baseTenant; | 490 | $scope.baseTenant = $scope.companyList[i].baseTenant; |
471 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; | 491 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; |
472 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; | 492 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; |
473 | 493 | ||
474 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ | 494 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ |
475 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 495 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
476 | $scope.marginList = margins; | 496 | $scope.marginList = margins; |
477 | }) | 497 | }) |
478 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 498 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
479 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 499 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
480 | $scope.marginList = margins; | 500 | $scope.marginList = margins; |
481 | }) | 501 | }) |
482 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 502 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
483 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 503 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
484 | $scope.marginList = margins; | 504 | $scope.marginList = margins; |
485 | }) | 505 | }) |
486 | } | 506 | } |
487 | $scope.selectedCompanyId = $scope.companyList[i].id; | 507 | $scope.selectedCompanyId = $scope.companyList[i].id; |
488 | $scope.marginId = $scope.companyList[i].margin.id; | 508 | $scope.marginId = $scope.companyList[i].margin.id; |
489 | if ($scope.selectedCompanyId != '') { | 509 | if ($scope.selectedCompanyId != '') { |
490 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 510 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
491 | $scope.aircraftList = aircraft; | 511 | $scope.aircraftList = aircraft; |
492 | }) | 512 | }) |
493 | } | 513 | } |
494 | if ($scope.marginId != '') { | 514 | if ($scope.marginId != '') { |
495 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 515 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
496 | $scope.tierList = tiers; | 516 | $scope.tierList = tiers; |
497 | // $scope.showLoader = false; | 517 | // $scope.showLoader = false; |
498 | }) | 518 | }) |
499 | }else{ | 519 | }else{ |
500 | // $scope.showLoader = false; | 520 | // $scope.showLoader = false; |
501 | } | 521 | } |
502 | } | 522 | } |
503 | } | 523 | } |
504 | 524 | ||
505 | } | 525 | } |
506 | 526 | ||
527 | $scope.getAircraftMakeAndModel=function (data) { | ||
528 | for(var i = 0; i < $scope.aircraftList.length; i++){ | ||
529 | if($scope.aircraftList[i].tail === data){ | ||
530 | $scope.order.aircraftMake = $scope.aircraftList[i].make; | ||
531 | $scope.order.aircraftModel = $scope.aircraftList[i].model; | ||
532 | } | ||
533 | |||
534 | } | ||
535 | } | ||
507 | 536 | ||
508 | 537 | ||
509 | $scope.cancelData = function() { | 538 | $scope.cancelData = function() { |
539 | $(document).ready(function(){ | ||
540 | $('body').css('position', 'initial'); | ||
541 | }) | ||
510 | $('#demo-modal-4').css('display', ''); | 542 | $('#demo-modal-4').css('display', ''); |
511 | } | 543 | } |
512 | $scope.canceleditdata = function() { | 544 | $scope.canceleditdata = function() { |
545 | $(document).ready(function(){ | ||
546 | $('body').css('position', 'initial'); | ||
547 | }) | ||
513 | $('#demo-modal-5').css('display', ''); | 548 | $('#demo-modal-5').css('display', ''); |
514 | } | 549 | } |
515 | 550 | ||
516 | 551 | ||
517 | 552 | ||
518 | $scope.companyList = {}; | 553 | $scope.companyList = {}; |
519 | 554 | ||
520 | fuelOrdersService.getAllCompanies().then(function(result) { | 555 | fuelOrdersService.getAllCompanies().then(function(result) { |
521 | $scope.showLoader = true; | 556 | $scope.showLoader = true; |
522 | $scope.companyList = result; | 557 | $scope.companyList = result; |
523 | $scope.showLoader = false; | 558 | $scope.showLoader = false; |
524 | }) | 559 | }) |
525 | 560 | ||
526 | /*Add a company services API used from customersService */ | 561 | /*Add a company services API used from customersService */ |
527 | getCompanyName(); | 562 | getCompanyName(); |
528 | function getCompanyName(){ | 563 | function getCompanyName(){ |
529 | CustomersService.getCompanyName().then(function(result) { | 564 | CustomersService.getCompanyName().then(function(result) { |
530 | $scope.showLoader = true; | 565 | $scope.showLoader = true; |
531 | $scope.compNameList = result; | 566 | $scope.compNameList = result; |
532 | $scope.showLoader = false; | 567 | $scope.showLoader = false; |
533 | }) | 568 | }) |
534 | } | 569 | } |
535 | 570 | ||
536 | $scope.marginFilterOptions = []; | 571 | $scope.marginFilterOptions = []; |
537 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 572 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
538 | $scope.showLoader = true; | 573 | $scope.showLoader = true; |
539 | $scope.jetMarginList = result; | 574 | $scope.jetMarginList = result; |
540 | $scope.marginFilterOptions.push({ | 575 | $scope.marginFilterOptions.push({ |
541 | 'id': '', 'title': 'Show All' | 576 | 'id': '', 'title': 'Show All' |
542 | }); | 577 | }); |
543 | for (var i = 0; i < result.length; i++) { | 578 | for (var i = 0; i < result.length; i++) { |
544 | $scope.marginFilterOptions.push({ | 579 | $scope.marginFilterOptions.push({ |
545 | 'id': result[i].id, | 580 | 'id': result[i].id, |
546 | 'title': result[i].marginName | 581 | 'title': result[i].marginName |
547 | }) | 582 | }) |
548 | } | 583 | } |
549 | $scope.showLoader = false; | 584 | $scope.showLoader = false; |
550 | }) | 585 | }) |
551 | 586 | ||
552 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 587 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
553 | $scope.avgsMarginList = result; | 588 | $scope.avgsMarginList = result; |
554 | }) | 589 | }) |
555 | 590 | ||
556 | $scope.showCompanyError = false; | 591 | $scope.showCompanyError = false; |
557 | $scope.showMarginError = false; | 592 | $scope.showMarginError = false; |
558 | 593 | ||
559 | $scope.removeValidation = function(){ | 594 | $scope.removeValidation = function(){ |
560 | $scope.showCompanyError = false; | 595 | $scope.showCompanyError = false; |
561 | $('.companyNameInput').removeClass('customErrorInput'); | 596 | $('.companyNameInput').removeClass('customErrorInput'); |
562 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 597 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
563 | $('.companyNameInput').addClass('customErrorInput'); | 598 | $('.companyNameInput').addClass('customErrorInput'); |
564 | $scope.showCompanyError = true; | 599 | $scope.showCompanyError = true; |
565 | } | 600 | } |
566 | } | 601 | } |
567 | 602 | ||
568 | $scope.removeMarginValidation = function(){ | 603 | $scope.removeMarginValidation = function(){ |
569 | $scope.showMarginError = false; | 604 | $scope.showMarginError = false; |
570 | $('.marginSelectBox').removeClass('customErrorInput'); | 605 | $('.marginSelectBox').removeClass('customErrorInput'); |
571 | } | 606 | } |
572 | 607 | ||
573 | getData(); | 608 | getData(); |
574 | function getData(){ | 609 | function getData(){ |
575 | $scope.showLoader = true; | 610 | $scope.showLoader = true; |
576 | CustomersService.getAircraftMake().then(function(result) { | 611 | CustomersService.getAircraftMake().then(function(result) { |
577 | $scope.aircraftMakeList = result; | 612 | $scope.aircraftMakeList = result; |
578 | $scope.showLoader = false; | 613 | $scope.showLoader = false; |
579 | }) | 614 | }) |
580 | } | 615 | } |
581 | var companyData; | 616 | var companyData; |
582 | $scope.addFirstData = function(sel, step){ | 617 | $scope.addFirstData = function(sel, step){ |
583 | $scope.showLoader = true; | 618 | $scope.showLoader = true; |
584 | if($scope.data.companyName == undefined){ | 619 | if($scope.data.companyName == undefined){ |
585 | $scope.showCompanyError = true; | 620 | $scope.showCompanyError = true; |
586 | $('.companyNameInput').addClass('customErrorInput'); | 621 | $('.companyNameInput').addClass('customErrorInput'); |
587 | }else if($scope.data.masterMargin == undefined){ | 622 | }else if($scope.data.masterMargin == undefined){ |
588 | $scope.showMarginError = true; | 623 | $scope.showMarginError = true; |
589 | $('.marginSelectBox').addClass('customErrorInput'); | 624 | $('.marginSelectBox').addClass('customErrorInput'); |
590 | }else{ | 625 | }else{ |
591 | $scope.aircraftDetails = [{ | 626 | $scope.aircraftDetails = [{ |
592 | 'tail':'', | 627 | 'tail':'', |
593 | 'make': '', | 628 | 'make': '', |
594 | 'model': '', | 629 | 'model': '', |
595 | 'sizeId' : '', | 630 | 'sizeId' : '', |
596 | 'marginId': $scope.data.masterMargin, | 631 | 'marginId': $scope.data.masterMargin, |
597 | 'avgasMarginId': $scope.data.avgasMargin | 632 | 'avgasMarginId': $scope.data.avgasMargin |
598 | }]; | 633 | }]; |
599 | 634 | ||
600 | $(sel).trigger('next.m.' + step); | 635 | $(sel).trigger('next.m.' + step); |
601 | getData(); | 636 | getData(); |
602 | } | 637 | } |
603 | $scope.showLoader = false; | 638 | $scope.showLoader = false; |
604 | } | 639 | } |
605 | $scope.addNew = function(){ | 640 | $scope.addNew = function(){ |
606 | $scope.showLoader = true; | 641 | $scope.showLoader = true; |
607 | $scope.aircraftDetails.push({ | 642 | $scope.aircraftDetails.push({ |
608 | 'tail':'', | 643 | 'tail':'', |
609 | 'make': '', | 644 | 'make': '', |
610 | 'model': '', | 645 | 'model': '', |
611 | 'sizeId' : '', | 646 | 'sizeId' : '', |
612 | 'marginId': $scope.data.masterMargin, | 647 | 'marginId': $scope.data.masterMargin, |
613 | 'avgasMarginId': $scope.data.avgasMargin | 648 | 'avgasMarginId': $scope.data.avgasMargin |
614 | }); | 649 | }); |
615 | $scope.showLoader = false; | 650 | $scope.showLoader = false; |
616 | }; | 651 | }; |
617 | 652 | ||
618 | $scope.aircraft = {}; | 653 | $scope.aircraft = {}; |
619 | $scope.getModal = function(makeId, index){ | 654 | $scope.getModal = function(makeId, index){ |
620 | $scope.showLoader = true; | 655 | $scope.showLoader = true; |
621 | $scope.aircraft.make = makeId; | 656 | $scope.aircraft.make = makeId; |
622 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 657 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
623 | $scope.showLoader = false; | 658 | $scope.showLoader = false; |
624 | $scope.aircraftDetails[index].aircraftModalList = result; | 659 | $scope.aircraftDetails[index].aircraftModalList = result; |
625 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 660 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
626 | }) | 661 | }) |
627 | } | 662 | } |
628 | 663 | ||
629 | $scope.getSize = function(model, index){ | 664 | $scope.getSize = function(model, index){ |
630 | $scope.showLoader = true; | 665 | $scope.showLoader = true; |
631 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 666 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
632 | $scope.showLoader = false; | 667 | $scope.showLoader = false; |
633 | $scope.aircraftDetails[index].aircraftSizeList = result; | 668 | $scope.aircraftDetails[index].aircraftSizeList = result; |
634 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | 669 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
635 | }) | 670 | }) |
636 | } | 671 | } |
637 | 672 | ||
638 | $scope.aircraftListData = {}; | 673 | $scope.aircraftListData = {}; |
639 | $scope.addData = []; | 674 | $scope.addData = []; |
640 | 675 | ||
641 | $scope.saveCompanyData = function(){ | 676 | $scope.saveCompanyData = function(){ |
642 | CustomersService.addCompany($scope.data).then(function(result) { | 677 | CustomersService.addCompany($scope.data).then(function(result) { |
643 | $scope.accountId = result; | 678 | $scope.accountId = result; |
644 | $scope.aircraft.accountId = $scope.accountId; | 679 | $scope.aircraft.accountId = $scope.accountId; |
645 | 680 | ||
646 | for(var i=0; i<$scope.aircraftDetails.length;i++){ | 681 | for(var i=0; i<$scope.aircraftDetails.length;i++){ |
647 | $scope.addData.push({ | 682 | $scope.addData.push({ |
648 | 'tail': $scope.aircraftDetails[i].tail, | 683 | 'tail': $scope.aircraftDetails[i].tail, |
649 | 'make': $scope.aircraftDetails[i].make, | 684 | 'make': $scope.aircraftDetails[i].make, |
650 | 'model': $scope.aircraftDetails[i].model, | 685 | 'model': $scope.aircraftDetails[i].model, |
651 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 686 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
652 | 'marginId': $scope.aircraftDetails[i].marginId, | 687 | 'marginId': $scope.aircraftDetails[i].marginId, |
653 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 688 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
654 | }); | 689 | }); |
655 | } | 690 | } |
656 | $scope.aircraftListData.aircraftList = $scope.addData; | 691 | $scope.aircraftListData.aircraftList = $scope.addData; |
657 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 692 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
658 | 693 | ||
659 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ | 694 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ |
660 | $scope.aircraftListData.aircraftList = []; | 695 | $scope.aircraftListData.aircraftList = []; |
661 | } | 696 | } |
662 | 697 | ||
663 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 698 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
664 | 699 | ||
665 | if(result != null && result.success){ | 700 | if(result != null && result.success){ |
666 | toastr.success(''+result.success+'', { | 701 | toastr.success(''+result.success+'', { |
667 | closeButton: true | 702 | closeButton: true |
668 | }) | 703 | }) |
669 | $('#demo-modal-3').modal('hide'); | 704 | $('#demo-modal-3').modal('hide'); |
670 | getAllCompanies(); | 705 | getAllCompanies(); |
671 | }else{ | 706 | }else{ |
672 | toastr.error(''+result.statusText+'', { | 707 | toastr.error(''+result.statusText+'', { |
673 | closeButton: true | 708 | closeButton: true |
674 | }) | 709 | }) |
675 | } | 710 | } |
676 | }); | 711 | }); |
677 | 712 | ||
678 | }) | 713 | }) |
679 | 714 | ||
680 | 715 | ||
681 | } | 716 | } |
682 | 717 | ||
683 | $scope.checkJetWithTail = function(tail, index){ | 718 | $scope.checkJetWithTail = function(tail, index){ |
684 | 719 | ||
685 | ViewCompanyService.checkJetType(tail).then(function(result) { | 720 | ViewCompanyService.checkJetType(tail).then(function(result) { |
686 | if(result.jetA == "true"){ | 721 | if(result.jetA == "true"){ |
687 | $scope.jetShow[index] = false; | 722 | $scope.jetShow[index] = false; |
688 | $scope.marginShow[index] = true; | 723 | $scope.marginShow[index] = true; |
689 | }else{ | 724 | }else{ |
690 | $scope.jetShow[index] = true; | 725 | $scope.jetShow[index] = true; |
691 | $scope.marginShow[index] = false; | 726 | $scope.marginShow[index] = false; |
692 | } | 727 | } |
693 | }) | 728 | }) |
694 | } | 729 | } |
695 | 730 | ||
696 | $scope.etaTimeList=[]; | 731 | $scope.etaTimeList=[]; |
697 | $scope.etdTimeList =[]; | 732 | $scope.etdTimeList =[]; |
698 | 733 | ||
699 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; | 734 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; |
700 | $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"}, | 735 | $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"}, |
701 | {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"}, | 736 | {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"}, |
702 | {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"}, | 737 | {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"}, |
703 | {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"}, | 738 | {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"}, |
704 | {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"}, | 739 | {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"}, |
705 | {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"},]; | 740 | {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"},]; |
706 | 741 | ||
707 | $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"}, | 742 | $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"}, |
708 | {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"}, | 743 | {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"}, |
709 | {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"}, | 744 | {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"}, |
710 | {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"}, | 745 | {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"}, |
711 | {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"}, | 746 | {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"}, |
712 | {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"},]; | 747 | {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"},]; |
713 | 748 | ||
714 | $scope.data = {}; | 749 | $scope.data = {}; |
app/partials/fuelOrders/fuelOrders.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(4) > a{ | 2 | .subnavbar .mainnav > li:nth-child(4) > a{ |
3 | color: #c44646; | 3 | color: #c44646; |
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 | 42 | ||
43 | -webkit-border-top-left-radius: 5px; | 43 | -webkit-border-top-left-radius: 5px; |
44 | -webkit-border-bottom-left-radius: 5px; | 44 | -webkit-border-bottom-left-radius: 5px; |
45 | -moz-border-radius-topleft: 5px; | 45 | -moz-border-radius-topleft: 5px; |
46 | -moz-border-radius-bottomleft: 5px; | 46 | -moz-border-radius-bottomleft: 5px; |
47 | border-top-left-radius: 5px; | 47 | border-top-left-radius: 5px; |
48 | border-bottom-left-radius: 5px; | 48 | border-bottom-left-radius: 5px; |
49 | border-right: 1px solid rgba(0,0,0,0.15); | 49 | border-right: 1px solid rgba(0,0,0,0.15); |
50 | } | 50 | } |
51 | 51 | ||
52 | .button1:hover span, .button1.active span { | 52 | .button1:hover span, .button1.active span { |
53 | background-color:rgb(0,102,26); | 53 | background-color:rgb(0,102,26); |
54 | border-right: 1px solid rgba(0,0,0,0.3); | 54 | border-right: 1px solid rgba(0,0,0,0.3); |
55 | } | 55 | } |
56 | 56 | ||
57 | .button1:active { | 57 | .button1:active { |
58 | margin-top: 2px; | 58 | margin-top: 2px; |
59 | margin-bottom: 13px; | 59 | margin-bottom: 13px; |
60 | 60 | ||
61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
66 | } | 66 | } |
67 | 67 | ||
68 | .button1.turquoise { | 68 | .button1.turquoise { |
69 | background: #449d44; | 69 | background: #449d44; |
70 | } | 70 | } |
71 | </style> | 71 | </style> |
72 | 72 | ||
73 | <div class="myLoader" ng-show="showLoader"> | 73 | <div class="myLoader" ng-show="showLoader"> |
74 | <img src="../img/hourglass.gif" width="50px;"> | 74 | <img src="../img/hourglass.gif" width="50px;"> |
75 | </div> | 75 | </div> |
76 | 76 | ||
77 | 77 | ||
78 | <div class="main"> | 78 | <div class="main"> |
79 | <div class="container"> | 79 | <div class="container"> |
80 | <div class="row"> | 80 | <div class="row"> |
81 | <div class="col-md-12"> | 81 | <div class="col-md-12"> |
82 | <div class="widget stacked "> | 82 | <div class="widget stacked "> |
83 | <div class="widget-content"> | 83 | <div class="widget-content"> |
84 | <div class="tabbable"> | 84 | <div class="tabbable"> |
85 | <ul class="nav nav-tabs"> | 85 | <ul class="nav nav-tabs"> |
86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> | 86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> |
87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> | 87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> |
88 | <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> | 88 | <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> |
89 | </ul> | 89 | </ul> |
90 | <br> | 90 | <br> |
91 | <div class="tab-content customer-table" style="margin:0px"> | 91 | <div class="tab-content customer-table" style="margin:0px"> |
92 | <div class="tab-pane active" id="companyView"> | 92 | <div class="tab-pane active" id="companyView"> |
93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> | 93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> |
94 | <tr ng-repeat="row in $data | orderBy : '-fuelingDate' | filter:searchText" style="cursor: pointer;" > | 94 | <tr ng-repeat="row in $data | orderBy : '-fuelingDate' | filter:searchText" style="cursor: pointer;" > |
95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> | 95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> |
96 | {{row.companyName}} | 96 | {{row.companyName}} |
97 | </td> | 97 | </td> |
98 | <td data-title="'Fueling Date'" filter="{fuelingDate: 'text'}" sortable="'fuelingDate'" ng-click="editTableRow(row)"> | 98 | <td data-title="'Fueling Date'" filter="{fuelingDate: 'text'}" sortable="'fuelingDate'" ng-click="editTableRow(row)"> |
99 | {{row.fuelingDate |date:'MM/dd/yyyy'}} | 99 | {{row.fuelingDate |date:'MM/dd/yyyy'}} |
100 | </td> | 100 | </td> |
101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> | 101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> |
102 | {{row.aircraftName}} | 102 | {{row.aircraftName}} |
103 | </td> | 103 | </td> |
104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> | 104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> |
105 | {{row.source}} | 105 | {{row.source}} |
106 | </td> | 106 | </td> |
107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> | 107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> |
108 | {{row.requestedVolume}} | 108 | {{row.requestedVolume}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> | 110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> |
111 | {{row.fboCost | number : 4}} | 111 | {{row.fboCost | number : 4}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> | 113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> |
114 | {{row.priceQuote | number : 4}} | 114 | {{row.priceQuote | number : 4}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> | 116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> |
117 | {{row.invoiced | number : 4}} | 117 | {{row.invoiced | number : 4}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> | 119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> |
120 | {{row.total | number : 4}} | 120 | {{row.total | number : 4}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> | 122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> |
123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)" ng-init="{{defaultStatus != '' ? row.status = defaultStatus : '' }}"> | 123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)" ng-init="{{defaultStatus != '' ? row.status = defaultStatus : '' }}"> |
124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> | 124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> |
125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> | 125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> |
126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> | 126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> |
127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> | 127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> |
128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> | 128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> |
129 | </select> | 129 | </select> |
130 | 130 | ||
131 | </td> | 131 | </td> |
132 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> | 132 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> |
133 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > | 133 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > |
134 | <option value="" disabled selected="selected" >Invoice</option> | 134 | <option value="" disabled selected="selected" >Invoice</option> |
135 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> | 135 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> |
136 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> | 136 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> |
137 | <option value="0" disabled >_____________</option> | 137 | <option value="0" disabled >_____________</option> |
138 | <option value="uploadAttachment" >Upload</option> | 138 | <option value="uploadAttachment" >Upload</option> |
139 | </select> | 139 | </select> |
140 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> | 140 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> |
141 | </td> | 141 | </td> |
142 | </tr> | 142 | </tr> |
143 | </table> | 143 | </table> |
144 | 144 | ||
145 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> | 145 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> |
146 | <option value="" disabled selected="selected">Fuel Widget</option> | 146 | <option value="" disabled selected="selected">Fuel Widget</option> |
147 | <option value="dt" >Direct Transaction</option> | 147 | <option value="dt" >Direct Fuel Order</option> |
148 | <option value="efo" >Export Fuel Orders</option> | 148 | <option value="efo" >Export Fuel Orders</option> |
149 | </select> | 149 | </select> |
150 | 150 | ||
151 | </div> | 151 | </div> |
152 | </div> | 152 | </div> |
153 | </div> | 153 | </div> |
154 | </div> | 154 | </div> |
155 | <!-- /widget-content --> | 155 | <!-- /widget-content --> |
156 | </div> | 156 | </div> |
157 | <!-- /widget --> | 157 | <!-- /widget --> |
158 | </div> | 158 | </div> |
159 | <!-- /span8 --> | 159 | <!-- /span8 --> |
160 | </div> | 160 | </div> |
161 | <!-- /row --> | 161 | <!-- /row --> |
162 | </div> | 162 | </div> |
163 | <!-- /container --> | 163 | <!-- /container --> |
164 | 164 | ||
165 | 165 | ||
166 | </div> | 166 | </div> |
167 | <!-- /main --> | 167 | <!-- /main --> |
168 | 168 | ||
169 | 169 | ||
170 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 170 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
171 | <div class="modal-dialog modal-lg"> | 171 | <div class="modal-dialog modal-lg"> |
172 | <div class="modal-content"> | 172 | <div class="modal-content"> |
173 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 173 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
174 | <div> | 174 | <div> |
175 | <div class="row" style="margin: 0;"> | 175 | <div class="row" style="margin: 0;"> |
176 | <div> | 176 | <div> |
177 | <div class="widget" style="margin-bottom: 0;"> | 177 | <div class="widget" style="margin-bottom: 0;"> |
178 | <div class="widget-header"> | 178 | <div class="widget-header"> |
179 | <i class="icon-pencil"></i> | 179 | <i class="icon-pencil"></i> |
180 | <i class="fa fa-tasks" aria-hidden="true"></i> | 180 | <i class="fa fa-tasks" aria-hidden="true"></i> |
181 | <h3>Add a New Company</h3> | 181 | <h3>Add a New Company</h3> |
182 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 182 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
183 | <div style="color: #ff9a01;">Activate     | 183 | <div style="color: #ff9a01;">Activate     |
184 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 184 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
185 | </div> | 185 | </div> |
186 | </div> | 186 | </div> |
187 | <div class="clearfix"></div> | 187 | <div class="clearfix"></div> |
188 | </div> | 188 | </div> |
189 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 189 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
190 | <div class="col-xs-12"> | 190 | <div class="col-xs-12"> |
191 | <div class="col-md-8"> | 191 | <div class="col-md-8"> |
192 | <div class="pull-left"> | 192 | <div class="pull-left"> |
193 | <label class="new-input-label"><b>Company Name *</b></label> | 193 | <label class="new-input-label"><b>Company Name *</b></label> |
194 | </div> | 194 | </div> |
195 | <div class="pull-left" style="margin-left: 15px;"> | 195 | <div class="pull-left" style="margin-left: 15px;"> |
196 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> | 196 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> |
197 | <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"> | 197 | <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"> |
198 | 198 | ||
199 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 199 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
200 | </div> | 200 | </div> |
201 | <div class="clearfix"></div> | 201 | <div class="clearfix"></div> |
202 | </div> | 202 | </div> |
203 | <div class="col-md-4"> | 203 | <div class="col-md-4"> |
204 | 204 | ||
205 | <div class="pull-right"> | 205 | <div class="pull-right"> |
206 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 206 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
207 | </div> | 207 | </div> |
208 | <div class="pull-right"> | 208 | <div class="pull-right"> |
209 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 209 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
210 | </div> | 210 | </div> |
211 | <div class="clearfix"></div> | 211 | <div class="clearfix"></div> |
212 | </div> | 212 | </div> |
213 | </div> | 213 | </div> |
214 | <div class="clearfix"></div><br> | 214 | <div class="clearfix"></div><br> |
215 | <div class="col-xs-12"> | 215 | <div class="col-xs-12"> |
216 | <div class="col-md-7"> | 216 | <div class="col-md-7"> |
217 | <div class="pull-left"> | 217 | <div class="pull-left"> |
218 | <label class="new-input-label"><b>Relationship </b></label> | 218 | <label class="new-input-label"><b>Relationship </b></label> |
219 | </div> | 219 | </div> |
220 | <div class="pull-left" style="margin-left: 32px;"> | 220 | <div class="pull-left" style="margin-left: 32px;"> |
221 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 221 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> |
222 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 222 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> |
223 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 223 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
224 | </div> | 224 | </div> |
225 | <div class="clearfix"></div> | 225 | <div class="clearfix"></div> |
226 | </div> | 226 | </div> |
227 | <div class="col-md-2 Airport" style="text-align: right;"> | 227 | <div class="col-md-2 Airport" style="text-align: right;"> |
228 | <b>Certificate Type</b> | 228 | <b>Certificate Type</b> |
229 | </div> | 229 | </div> |
230 | <div class="col-md-3 Airport"> | 230 | <div class="col-md-3 Airport"> |
231 | <select required class="form-control" ng-model="data.certificateType"> | 231 | <select required class="form-control" ng-model="data.certificateType"> |
232 | <option value="" disabled selected hidden>Select...</option> | 232 | <option value="" disabled selected hidden>Select...</option> |
233 | <option value="corporate">Part 91 (Corporate)</option> | 233 | <option value="corporate">Part 91 (Corporate)</option> |
234 | <option value="charter">Part 135 (Charter)</option> | 234 | <option value="charter">Part 135 (Charter)</option> |
235 | <option value="scheduled">Part 121 (Scheduled)</option> | 235 | <option value="scheduled">Part 121 (Scheduled)</option> |
236 | <option value="military">Military</option> | 236 | <option value="military">Military</option> |
237 | <option value="government">Government</option> | 237 | <option value="government">Government</option> |
238 | </select> | 238 | </select> |
239 | </div> | 239 | </div> |
240 | <div class="clearfix"></div> | 240 | <div class="clearfix"></div> |
241 | </div> | 241 | </div> |
242 | <div class="clearfix"></div> | 242 | <div class="clearfix"></div> |
243 | <br/> | 243 | <br/> |
244 | <div class="col-xs-12"> | 244 | <div class="col-xs-12"> |
245 | <div class="col-md-6"> | 245 | <div class="col-md-6"> |
246 | <div class="pull-left" style="width: 110px;"> | 246 | <div class="pull-left" style="width: 110px;"> |
247 | <b>JET A Margin *</b> | 247 | <b>JET A Margin *</b> |
248 | </div> | 248 | </div> |
249 | <div class="pull-left"> | 249 | <div class="pull-left"> |
250 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 250 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> |
251 | <option value="" disabled>Select...</option> | 251 | <option value="" disabled>Select...</option> |
252 | </select> | 252 | </select> |
253 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 253 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
254 | 254 | ||
255 | <div class="clearfix"></div> | 255 | <div class="clearfix"></div> |
256 | </div> | 256 | </div> |
257 | </div> | 257 | </div> |
258 | 258 | ||
259 | <div class="col-md-3 Airport" style="text-align: right;"> | 259 | <div class="col-md-3 Airport" style="text-align: right;"> |
260 | <b>AVGAS 100LL Margin</b> | 260 | <b>AVGAS 100LL Margin</b> |
261 | </div> | 261 | </div> |
262 | <div class="col-md-3 Airport"> | 262 | <div class="col-md-3 Airport"> |
263 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 263 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
264 | <option value="" disabled>Select...</option> | 264 | <option value="" disabled>Select...</option> |
265 | </select> | 265 | </select> |
266 | </div> | 266 | </div> |
267 | <div class="clearfix"></div> | 267 | <div class="clearfix"></div> |
268 | </div> | 268 | </div> |
269 | <div class="clearfix"></div> | 269 | <div class="clearfix"></div> |
270 | <br/> | 270 | <br/> |
271 | <div class="col-xs-12"> | 271 | <div class="col-xs-12"> |
272 | <div class="col-md-12"> | 272 | <div class="col-md-12"> |
273 | <div class="pull-left" style="width: 110px;"> | 273 | <div class="pull-left" style="width: 110px;"> |
274 | <label class="new-input-label"><b>Address</b></label> | 274 | <label class="new-input-label"><b>Address</b></label> |
275 | </div> | 275 | </div> |
276 | <div class="pull-left" style="width: calc(100% - 110px);"> | 276 | <div class="pull-left" style="width: calc(100% - 110px);"> |
277 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 277 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
278 | </div> | 278 | </div> |
279 | <div class="clearfix"></div> | 279 | <div class="clearfix"></div> |
280 | </div> | 280 | </div> |
281 | </div> | 281 | </div> |
282 | <div class="clearfix"></div> | 282 | <div class="clearfix"></div> |
283 | <br/> | 283 | <br/> |
284 | <div class="col-xs-12"> | 284 | <div class="col-xs-12"> |
285 | <div class="col-md-12"> | 285 | <div class="col-md-12"> |
286 | <div class="pull-left" style="width: 110px;"> | 286 | <div class="pull-left" style="width: 110px;"> |
287 | <label class="new-input-label"><b>Address2</b></label> | 287 | <label class="new-input-label"><b>Address2</b></label> |
288 | </div> | 288 | </div> |
289 | <div class="pull-left" style="width: calc(100% - 110px);"> | 289 | <div class="pull-left" style="width: calc(100% - 110px);"> |
290 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 290 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
291 | </div> | 291 | </div> |
292 | <div class="clearfix"></div> | 292 | <div class="clearfix"></div> |
293 | </div> | 293 | </div> |
294 | </div> | 294 | </div> |
295 | <div class="clearfix"></div> | 295 | <div class="clearfix"></div> |
296 | <br/> | 296 | <br/> |
297 | <div class="col-xs-12"> | 297 | <div class="col-xs-12"> |
298 | 298 | ||
299 | <div class="col-md-6"> | 299 | <div class="col-md-6"> |
300 | <div class="pull-left" style="width: 110px;"> | 300 | <div class="pull-left" style="width: 110px;"> |
301 | <label class="new-input-label"><b>City</b></label> | 301 | <label class="new-input-label"><b>City</b></label> |
302 | </div> | 302 | </div> |
303 | <div class="pull-left" style="width: calc(100% - 110px);"> | 303 | <div class="pull-left" style="width: calc(100% - 110px);"> |
304 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 304 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
305 | </div> | 305 | </div> |
306 | <div class="clearfix"></div> | 306 | <div class="clearfix"></div> |
307 | </div> | 307 | </div> |
308 | <div class="col-md-3"> | 308 | <div class="col-md-3"> |
309 | <div class="pull-left" style="width: 40px;"> | 309 | <div class="pull-left" style="width: 40px;"> |
310 | <label class="new-input-label"><b>State</b></label> | 310 | <label class="new-input-label"><b>State</b></label> |
311 | </div> | 311 | </div> |
312 | <div class="pull-left" style="width: calc(100% - 110px);"> | 312 | <div class="pull-left" style="width: calc(100% - 110px);"> |
313 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 313 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
314 | </div> | 314 | </div> |
315 | <div class="clearfix"></div> | 315 | <div class="clearfix"></div> |
316 | </div> | 316 | </div> |
317 | <div class="col-md-3"> | 317 | <div class="col-md-3"> |
318 | <div class="pull-left"> | 318 | <div class="pull-left"> |
319 | <label class="new-input-label"><b>Zip Code</b></label> | 319 | <label class="new-input-label"><b>Zip Code</b></label> |
320 | </div> | 320 | </div> |
321 | <div class="pull-right" style="width: calc(100% - 60px);"> | 321 | <div class="pull-right" style="width: calc(100% - 60px);"> |
322 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 322 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
323 | </div> | 323 | </div> |
324 | <div class="clearfix"></div> | 324 | <div class="clearfix"></div> |
325 | </div> | 325 | </div> |
326 | </div> | 326 | </div> |
327 | <div class="clearfix"></div> | 327 | <div class="clearfix"></div> |
328 | <br/> | 328 | <br/> |
329 | <div class="col-xs-12"> | 329 | <div class="col-xs-12"> |
330 | 330 | ||
331 | <div class="col-md-6"> | 331 | <div class="col-md-6"> |
332 | <div class="pull-left" style="width: 110px;"> | 332 | <div class="pull-left" style="width: 110px;"> |
333 | <label class="new-input-label"><b>Country</b></label> | 333 | <label class="new-input-label"><b>Country</b></label> |
334 | </div> | 334 | </div> |
335 | <div class="pull-left" style="width: calc(100% - 110px);"> | 335 | <div class="pull-left" style="width: calc(100% - 110px);"> |
336 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 336 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
337 | </div> | 337 | </div> |
338 | <div class="clearfix"></div> | 338 | <div class="clearfix"></div> |
339 | </div> | 339 | </div> |
340 | <div class="col-md-6"> | 340 | <div class="col-md-6"> |
341 | <div class="pull-left" style="width: 110px;"> | 341 | <div class="pull-left" style="width: 110px;"> |
342 | <label class="new-input-label"><b>Internal Note</b></label> | 342 | <label class="new-input-label"><b>Internal Note</b></label> |
343 | </div> | 343 | </div> |
344 | <div class="pull-left" style="width: calc(100% - 110px);"> | 344 | <div class="pull-left" style="width: calc(100% - 110px);"> |
345 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 345 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
346 | </div> | 346 | </div> |
347 | <div class="clearfix"></div> | 347 | <div class="clearfix"></div> |
348 | </div> | 348 | </div> |
349 | </div> | 349 | </div> |
350 | <div class="clearfix"></div> | 350 | <div class="clearfix"></div> |
351 | <!-- <br/> | 351 | <!-- <br/> |
352 | <div class="col-xs-12"> | 352 | <div class="col-xs-12"> |
353 | <div class="col-md-2 Airport"></div> | 353 | <div class="col-md-2 Airport"></div> |
354 | <div class="col-md-10 Airport"> | 354 | <div class="col-md-10 Airport"> |
355 | <div class="pull-right"> | 355 | <div class="pull-right"> |
356 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 356 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
357 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 357 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
358 | </div> | 358 | </div> |
359 | </div> | 359 | </div> |
360 | </div> --> | 360 | </div> --> |
361 | </div> | 361 | </div> |
362 | </div> | 362 | </div> |
363 | <div class="clearfix"></div> | 363 | <div class="clearfix"></div> |
364 | </div> | 364 | </div> |
365 | </div> | 365 | </div> |
366 | </div> | 366 | </div> |
367 | </div> | 367 | </div> |
368 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 368 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
369 | <div> | 369 | <div> |
370 | <div class="row" style="margin: 0;"> | 370 | <div class="row" style="margin: 0;"> |
371 | <div> | 371 | <div> |
372 | <div class="widget" style="margin-bottom: 0;"> | 372 | <div class="widget" style="margin-bottom: 0;"> |
373 | <div class="widget-header"> | 373 | <div class="widget-header"> |
374 | <i class="icon-pencil"></i> | 374 | <i class="icon-pencil"></i> |
375 | <i class="fa fa-tasks" aria-hidden="true"></i> | 375 | <i class="fa fa-tasks" aria-hidden="true"></i> |
376 | <h3>Add a New Company</h3> | 376 | <h3>Add a New Company</h3> |
377 | <div class="clearfix"></div> | 377 | <div class="clearfix"></div> |
378 | </div> | 378 | </div> |
379 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 379 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
380 | <div class="col-xs-12"> | 380 | <div class="col-xs-12"> |
381 | <div class="widget-header"> | 381 | <div class="widget-header"> |
382 | <i class="fa fa-list"></i> | 382 | <i class="fa fa-list"></i> |
383 | <h3>Aircraft List</h3> | 383 | <h3>Aircraft List</h3> |
384 | </div> | 384 | </div> |
385 | <div class="widget-content" style="padding:0px;border: 0px; "> | 385 | <div class="widget-content" style="padding:0px;border: 0px; "> |
386 | <div class="table-responsive"> | 386 | <div class="table-responsive"> |
387 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> | 387 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> |
388 | <thead> | 388 | <thead> |
389 | <tr> | 389 | <tr> |
390 | <th>Tail</th> | 390 | <th>Tail</th> |
391 | <th>Make</th> | 391 | <th>Make</th> |
392 | <th>Model</th> | 392 | <th>Model</th> |
393 | <th>Size</th> | 393 | <th>Size</th> |
394 | <th>Margin</th> | 394 | <th>Margin</th> |
395 | </tr> | 395 | </tr> |
396 | </thead> | 396 | </thead> |
397 | <tbody> | 397 | <tbody> |
398 | <tr> | 398 | <tr> |
399 | <td> | 399 | <td> |
400 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> | 400 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> |
401 | </td> | 401 | </td> |
402 | <td style="width: 25%;"> | 402 | <td style="width: 25%;"> |
403 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> | 403 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> |
404 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> | 404 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
405 | </select> | 405 | </select> |
406 | </td> | 406 | </td> |
407 | <td style="width: 20%;"> | 407 | <td style="width: 20%;"> |
408 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> | 408 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> |
409 | <option ng-repeat="model in aircraftModalList">{{model}}</option> | 409 | <option ng-repeat="model in aircraftModalList">{{model}}</option> |
410 | </select> | 410 | </select> |
411 | </td> | 411 | </td> |
412 | <td style="width: 25%;"> | 412 | <td style="width: 25%;"> |
413 | <select class="form-control" ng-model="aircraft.size"> | 413 | <select class="form-control" ng-model="aircraft.size"> |
414 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> | 414 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> |
415 | </select> | 415 | </select> |
416 | </td> | 416 | </td> |
417 | <td> | 417 | <td> |
418 | <select class="form-control"> | 418 | <select class="form-control"> |
419 | <option>Margin1</option> | 419 | <option>Margin1</option> |
420 | <option>Margin2</option> | 420 | <option>Margin2</option> |
421 | </select> | 421 | </select> |
422 | </td> | 422 | </td> |
423 | </tr> | 423 | </tr> |
424 | </tbody> | 424 | </tbody> |
425 | 425 | ||
426 | </table> --> | 426 | </table> --> |
427 | <table class="table table-striped table-bordered"> | 427 | <table class="table table-striped table-bordered"> |
428 | <thead> | 428 | <thead> |
429 | <tr> | 429 | <tr> |
430 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 430 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
431 | <th>Tail</th> | 431 | <th>Tail</th> |
432 | <th>Make</th> | 432 | <th>Make</th> |
433 | <th>Model</th> | 433 | <th>Model</th> |
434 | <th>Size</th> | 434 | <th>Size</th> |
435 | <th>JET A Margin</th> | 435 | <th>JET A Margin</th> |
436 | <th>AVGS 100LL Margin</th> | 436 | <th>AVGS 100LL Margin</th> |
437 | </tr> | 437 | </tr> |
438 | </thead> | 438 | </thead> |
439 | <tbody> | 439 | <tbody> |
440 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 440 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
441 | <!-- <td> | 441 | <!-- <td> |
442 | <input type="checkbox" ng-model="aircraftData.selected"/> | 442 | <input type="checkbox" ng-model="aircraftData.selected"/> |
443 | </td> --> | 443 | </td> --> |
444 | <td style="width: 15%"> | 444 | <td style="width: 15%"> |
445 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 445 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
446 | </td> | 446 | </td> |
447 | <td style="width: 17%"> | 447 | <td style="width: 17%"> |
448 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 448 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
449 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 449 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
450 | <option value="" disabled>Select...</option> | 450 | <option value="" disabled>Select...</option> |
451 | </select> | 451 | </select> |
452 | </td> | 452 | </td> |
453 | <td style="width: 17%"> | 453 | <td style="width: 17%"> |
454 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 454 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
455 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 455 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
456 | <option value="" disabled>Select...</option> | 456 | <option value="" disabled>Select...</option> |
457 | </select> | 457 | </select> |
458 | </td> | 458 | </td> |
459 | <td style="width: 17%"> | 459 | <td style="width: 17%"> |
460 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> | 460 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> |
461 | <option value="" disabled>Select...</option> | 461 | <option value="" disabled>Select...</option> |
462 | </select> --> | 462 | </select> --> |
463 | <select class="form-control" ng-model="aircraftData.sizeId"> | 463 | <select class="form-control" ng-model="aircraftData.sizeId"> |
464 | <option value="" disabled>Select</option> | 464 | <option value="" disabled>Select</option> |
465 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 465 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
466 | </select> | 466 | </select> |
467 | <!-- <select class="form-control" ng-model="aircraftData.size"> | 467 | <!-- <select class="form-control" ng-model="aircraftData.size"> |
468 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | 468 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> |
469 | </select> --> | 469 | </select> --> |
470 | </td> | 470 | </td> |
471 | <td style="width: 17%"> | 471 | <td style="width: 17%"> |
472 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> | 472 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> |
473 | <option value="" disabled>Select...</option> | 473 | <option value="" disabled>Select...</option> |
474 | </select> --> | 474 | </select> --> |
475 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 475 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
476 | <option value="" disabled>Select</option> | 476 | <option value="" disabled>Select</option> |
477 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 477 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
478 | </select> | 478 | </select> |
479 | </td> | 479 | </td> |
480 | <td style="width: 17%"> | 480 | <td style="width: 17%"> |
481 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 481 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
482 | <option value="" disabled>Select...</option> | 482 | <option value="" disabled>Select...</option> |
483 | </select> --> | 483 | </select> --> |
484 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 484 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
485 | <option value="" disabled>Select</option> | 485 | <option value="" disabled>Select</option> |
486 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 486 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
487 | </select> | 487 | </select> |
488 | </td> | 488 | </td> |
489 | </tr> | 489 | </tr> |
490 | </tbody> | 490 | </tbody> |
491 | </table> | 491 | </table> |
492 | </div> | 492 | </div> |
493 | <div class="clearfix"></div> | 493 | <div class="clearfix"></div> |
494 | </div> | 494 | </div> |
495 | </div> | 495 | </div> |
496 | <div class="clearfix"></div> | 496 | <div class="clearfix"></div> |
497 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 497 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
498 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 498 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
499 | </div> | 499 | </div> |
500 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> | 500 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> |
501 | <div class="pull-right"> | 501 | <div class="pull-right"> |
502 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> | 502 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> |
503 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> | 503 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> |
504 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> | 504 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> |
505 | </div> | 505 | </div> |
506 | </div> --> | 506 | </div> --> |
507 | </div> | 507 | </div> |
508 | </div> | 508 | </div> |
509 | <div class="clearfix"></div> | 509 | <div class="clearfix"></div> |
510 | </div> | 510 | </div> |
511 | </div> | 511 | </div> |
512 | </div> | 512 | </div> |
513 | </div> | 513 | </div> |
514 | <!-- <div class="modal-body step-3" data-step="3"> | 514 | <!-- <div class="modal-body step-3" data-step="3"> |
515 | This is the final step. | 515 | This is the final step. |
516 | </div> --> | 516 | </div> --> |
517 | <div class="modal-footer" style="border-top: 0;"> | 517 | <div class="modal-footer" style="border-top: 0;"> |
518 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 518 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
519 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 519 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
520 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 520 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
521 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 521 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
522 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 522 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
523 | </div> | 523 | </div> |
524 | </div> | 524 | </div> |
525 | </div> | 525 | </div> |
526 | </form> | 526 | </form> |
527 | 527 | ||
528 | 528 | ||
529 | 529 | ||
530 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 530 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
531 | <div class="modal-dialog modal-lg"> | 531 | <div class="modal-dialog modal-lg"> |
532 | <div class="modal-content"> | 532 | <div class="modal-content"> |
533 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 533 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
534 | <div> | 534 | <div> |
535 | <div class="row" style="margin: 0;"> | 535 | <div class="row" style="margin: 0;"> |
536 | <div> | 536 | <div> |
537 | <div class="widget" style="margin-bottom: 0;"> | 537 | <div class="widget" style="margin-bottom: 0;"> |
538 | <div class="widget-header"> | 538 | <div class="widget-header"> |
539 | <i class="icon-pencil"></i> | 539 | <i class="icon-pencil"></i> |
540 | <i class="fa fa-tasks" aria-hidden="true"></i> | 540 | <i class="fa fa-tasks" aria-hidden="true"></i> |
541 | <h3>Add a Fuel Order</h3> | 541 | <h3>Add a Fuel Order</h3> |
542 | <div class="clearfix"></div> | 542 | <div class="clearfix"></div> |
543 | </div> | 543 | </div> |
544 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 544 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
545 | <div class="col-xs-12"> | 545 | <div class="col-xs-12"> |
546 | <div class="col-xs-12"> | 546 | <div class="col-xs-12"> |
547 | 547 | ||
548 | <div class="col-md-6"> | 548 | <div class="col-md-6"> |
549 | <div class="pull-left" style="width: 110px;"> | 549 | <div class="pull-left" style="width: 110px;"> |
550 | <label class="new-input-label"><b>Company</b></label> | 550 | <label class="new-input-label"><b>Company</b></label> |
551 | </div> | 551 | </div> |
552 | <div class="pull-left" style="width: calc(100% - 110px);"> | 552 | <div class="pull-left" style="width: calc(100% - 110px);"> |
553 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 553 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
554 | <option value="" selected disabled>Select Company</option> | 554 | <option value="" selected disabled>Select Company</option> |
555 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 555 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
556 | </select> | 556 | </select> |
557 | </div> | 557 | </div> |
558 | <div class="clearfix"></div> | 558 | <div class="clearfix"></div> |
559 | </div> | 559 | </div> |
560 | <div class="col-md-6"> | 560 | <div class="col-md-6"> |
561 | <div class="pull-left" style="width: 110px;"> | 561 | <div class="pull-left" style="width: 110px;"> |
562 | <label class="new-input-label"><b>Product</b></label> | 562 | <label class="new-input-label"><b>Product</b></label> |
563 | </div> | 563 | </div> |
564 | <div class="pull-left" style="width: calc(100% - 110px);"> | 564 | <div class="pull-left" style="width: calc(100% - 110px);"> |
565 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> | 565 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> |
566 | <option value="" selected disabled>Select Product</option> | 566 | <option value="" selected disabled>Select Product</option> |
567 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 567 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
568 | </select> | 568 | </select> |
569 | </div> | 569 | </div> |
570 | <div class="clearfix"></div> | 570 | <div class="clearfix"></div> |
571 | </div> | 571 | </div> |
572 | 572 | ||
573 | </div> | 573 | </div> |
574 | <div class="clearfix"></div> | 574 | <div class="clearfix"></div> |
575 | <br/> | 575 | <br/> |
576 | 576 | ||
577 | 577 | ||
578 | <div class="col-xs-12"> | 578 | <div class="col-xs-12"> |
579 | 579 | ||
580 | <div class="col-md-6"> | 580 | <div class="col-md-6"> |
581 | <div class="pull-left" style="width: 110px;"> | 581 | <div class="pull-left" style="width: 110px;"> |
582 | <label class="new-input-label"><b>Aircraft</b></label> | 582 | <label class="new-input-label"><b>Aircraft</b></label> |
583 | </div> | 583 | </div> |
584 | <div class="pull-left" style="width: calc(100% - 110px);"> | 584 | <div class="pull-left" style="width: calc(100% - 110px);"> |
585 | <select class="form-control" ng-model="order.aircraftName" required> | 585 | <select class="form-control" ng-model="order.aircraftName" ng-change="getAircraftMakeAndModel(order.aircraftName)" required> |
586 | <option selected disabled value="">Select Aircraft</option> | 586 | <option selected disabled value="">Select Aircraft</option> |
587 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 587 | <option ng-repeat="list in aircraftList">{{list.tail}}</option> |
588 | </select> | ||
589 | </div> | ||
590 | <div class="clearfix"></div> | ||
591 | </div> | ||
592 | <div class="col-md-6"> | ||
593 | <div class="pull-left" style="width: 110px;"> | ||
594 | <label class="new-input-label"><b>Make</b></label> | ||
595 | </div> | ||
596 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
597 | <select class="form-control" ng-model="order.aircraftMake" disabled required> | ||
598 | <option selected disabled value="">Select Make</option> | ||
599 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.make}}</option> --> | ||
600 | <option ng-repeat="list in aircraftList">{{list.make}}</option> | ||
601 | </select> | ||
602 | </div> | ||
603 | <div class="clearfix"></div> | ||
604 | </div> | ||
605 | |||
606 | </div> | ||
607 | <div class="clearfix"></div> | ||
608 | <br/> | ||
609 | |||
610 | <div class="col-xs-12"> | ||
611 | |||
612 | <div class="col-md-6"> | ||
613 | <div class="pull-left" style="width: 110px;"> | ||
614 | <label class="new-input-label"><b>Model</b></label> | ||
615 | </div> | ||
616 | <div class="pull-left" style="width: calc(100% - 110px);"> | ||
617 | <select class="form-control" ng-model="order.aircraftModel" disabled required> | ||
618 | <option selected disabled value="">Select Model</option> | ||
619 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.model}}</option> --> | ||
620 | <option ng-repeat="list in aircraftList">{{list.model}}</option> | ||
588 | </select> | 621 | </select> |
589 | </div> | 622 | </div> |
590 | <div class="clearfix"></div> | 623 | <div class="clearfix"></div> |
591 | </div> | 624 | </div> |
592 | <div class="col-md-6"> | 625 | <div class="col-md-6"> |
593 | <div class="pull-left" style="width: 110px;"> | 626 | <div class="pull-left" style="width: 110px;"> |
594 | <label class="new-input-label"><b>Volume</b></label> | 627 | <label class="new-input-label"><b>Volume</b></label> |
595 | </div> | 628 | </div> |
596 | <div class="pull-left" style="width: calc(100% - 110px);"> | 629 | <div class="pull-left" style="width: calc(100% - 110px);"> |
597 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 630 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
598 | </div> | 631 | </div> |
599 | <div class="clearfix"></div> | 632 | <div class="clearfix"></div> |
600 | </div> | 633 | </div> |
601 | 634 | ||
602 | </div> | 635 | </div> |
603 | <div class="clearfix"></div> | 636 | <div class="clearfix"></div> |
604 | <br/> | 637 | <br/> |
605 | 638 | ||
606 | <div class="col-xs-12"> | 639 | <div class="col-xs-12"> |
607 | 640 | ||
608 | <div class="col-md-6"> | 641 | <div class="col-md-6"> |
609 | <div class="pull-left" style="width: 110px;"> | 642 | <div class="pull-left" style="width: 110px;"> |
610 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 643 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
611 | </div> | 644 | </div> |
612 | <div class="pull-left" style="width: calc(100% - 110px);"> | 645 | <div class="pull-left" style="width: calc(100% - 110px);"> |
613 | <div style="width: 50%; float: left;"> | 646 | <div style="width: 50%; float: left;"> |
614 | Date | 647 | Date |
615 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 648 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
616 | </div> | 649 | </div> |
617 | <div style="width: 50%; float: left;"> | 650 | <div style="width: 50%; float: left;"> |
618 | Time | 651 | Time |
619 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 652 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
620 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 653 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
621 | </select> | 654 | </select> |
622 | 655 | ||
623 | </div> | 656 | </div> |
624 | </div> | 657 | </div> |
625 | <div class="clearfix"></div> | 658 | <div class="clearfix"></div> |
626 | </div> | 659 | </div> |
627 | 660 | ||
628 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 661 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
629 | <div class="pull-left" style="width: 110px;"> | 662 | <div class="pull-left" style="width: 110px;"> |
630 | <label class="new-input-label"><b>Invoiced</b></label> | 663 | <label class="new-input-label"><b>Invoiced</b></label> |
631 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 664 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
632 | </div> | 665 | </div> |
633 | <div class="pull-left" style="width: calc(100% - 110px);"> | 666 | <div class="pull-left" style="width: calc(100% - 110px);"> |
634 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 667 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
635 | </div> | 668 | </div> |
636 | <div class="clearfix"></div> | 669 | <div class="clearfix"></div> |
637 | </div> | 670 | </div> |
638 | </div> | 671 | </div> |
639 | <div class="clearfix"></div><br> | 672 | <div class="clearfix"></div><br> |
640 | 673 | ||
641 | 674 | ||
642 | <div class="col-xs-12"> | 675 | <div class="col-xs-12"> |
643 | 676 | ||
644 | <div class="col-md-6"> | 677 | <div class="col-md-6"> |
645 | <div class="pull-left" style="width: 110px;"> | 678 | <div class="pull-left" style="width: 110px;"> |
646 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 679 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
647 | </div> | 680 | </div> |
648 | <div class="pull-left" style="width: calc(100% - 110px);"> | 681 | <div class="pull-left" style="width: calc(100% - 110px);"> |
649 | <div style="width: 50%; float: left;"> | 682 | <div style="width: 50%; float: left;"> |
650 | Date | 683 | Date |
651 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 684 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
652 | </div> | 685 | </div> |
653 | <div style="width: 50%; float: left;"> | 686 | <div style="width: 50%; float: left;"> |
654 | Time | 687 | Time |
655 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 688 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
656 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 689 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
657 | </select> | 690 | </select> |
658 | 691 | ||
659 | </div> | 692 | </div> |
660 | </div> | 693 | </div> |
661 | <div class="clearfix"></div> | 694 | <div class="clearfix"></div> |
662 | </div> | 695 | </div> |
663 | 696 | ||
664 | <div class="col-md-6" style="margin-top: 22px;"> | 697 | <div class="col-md-6" style="margin-top: 22px;"> |
665 | <div class="pull-left" style="width: 110px;"> | 698 | <div class="pull-left" style="width: 110px;"> |
666 | <label class="new-input-label"><b>Total</b></label> | 699 | <label class="new-input-label"><b>Total</b></label> |
667 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 700 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
668 | </div> | 701 | </div> |
669 | <div class="pull-left" style="width: calc(100% - 110px);"> | 702 | <div class="pull-left" style="width: calc(100% - 110px);"> |
670 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 703 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
671 | </div> | 704 | </div> |
672 | </div> | 705 | </div> |
673 | </div> | 706 | </div> |
674 | <div class="clearfix"></div><br> | 707 | <div class="clearfix"></div><br> |
675 | 708 | ||
676 | 709 | ||
677 | <div class="col-xs-12"> | 710 | <div class="col-xs-12"> |
678 | 711 | ||
679 | <div class="col-md-6"> | 712 | <div class="col-md-6"> |
680 | <div class="pull-left" style="width: 110px;"> | 713 | <div class="pull-left" style="width: 110px;"> |
681 | <label class="new-input-label"><b>Fuel on</b></label> | 714 | <label class="new-input-label"><b>Fuel on</b></label> |
682 | </div> | 715 | </div> |
683 | <div class="pull-left" style="width: calc(100% - 110px);"> | 716 | <div class="pull-left" style="width: calc(100% - 110px);"> |
684 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 717 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
685 | <option value="" disabled selected hidden>Arrival</option> | 718 | <option value="" disabled selected hidden>Arrival</option> |
686 | <option value="Arrival">Arrival</option> | 719 | <option value="Arrival">Arrival</option> |
687 | <option value="Departure">Departure</option> | 720 | <option value="Departure">Departure</option> |
688 | </select> | 721 | </select> |
689 | </div> | 722 | </div> |
690 | <div class="clearfix"></div> | 723 | <div class="clearfix"></div> |
691 | </div> | 724 | </div> |
692 | 725 | ||
693 | <div class="col-md-6"> | 726 | <div class="col-md-6"> |
694 | <div class="pull-left" style="width: 110px;"> | 727 | <div class="pull-left" style="width: 110px;"> |
695 | <label class="new-input-label"><b>FBO Cost</b></label> | 728 | <label class="new-input-label"><b>FBO Cost</b></label> |
696 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 729 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
697 | </div> | 730 | </div> |
698 | <div class="pull-left" style="width: calc(100% - 110px);"> | 731 | <div class="pull-left" style="width: calc(100% - 110px);"> |
699 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 732 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
700 | </div> | 733 | </div> |
701 | <div class="clearfix"></div> | 734 | <div class="clearfix"></div> |
702 | </div> | 735 | </div> |
703 | </div> | 736 | </div> |
704 | <div class="clearfix"></div><br> | 737 | <div class="clearfix"></div><br> |
705 | 738 | ||
706 | <div class="col-xs-12"> | 739 | <div class="col-xs-12"> |
707 | <div class="col-md-6"> | 740 | <div class="col-md-6"> |
708 | <div class="pull-left" style="width: 110px;"> | 741 | <div class="pull-left" style="width: 110px;"> |
709 | <label class="new-input-label"><b>Source</b></label> | 742 | <label class="new-input-label"><b>Source</b></label> |
710 | </div> | 743 | </div> |
711 | <div class="pull-left" style="width: calc(100% - 110px);"> | 744 | <div class="pull-left" style="width: calc(100% - 110px);"> |
712 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> | 745 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> |
713 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> | 746 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> |
714 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> | 747 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> |
715 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | 748 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> |
716 | <option value="" disabled selected hidden>Select Source</option> | 749 | <option value="" disabled selected hidden>Select Source</option> |
717 | <option value="Tenant">Tenant</option> | 750 | <option value="Tenant">Tenant</option> |
718 | <option value="CAA">CAA</option> | 751 | <option value="CAA">CAA</option> |
719 | <option value="Tenant/CAA">Tenant/CAA</option> | 752 | <option value="Tenant/CAA">Tenant/CAA</option> |
720 | </select> --> | 753 | </select> --> |
721 | </div> | 754 | </div> |
722 | <div class="clearfix"></div> | 755 | <div class="clearfix"></div> |
723 | </div> | 756 | </div> |
724 | </div> | 757 | </div> |
725 | <div class="clearfix"></div> | 758 | <div class="clearfix"></div> |
726 | <br/> | 759 | <br/> |
727 | <div class="col-xs-12"> | 760 | <div class="col-xs-12"> |
728 | 761 | ||
729 | 762 | ||
730 | <div class="col-md-6"> | 763 | <div class="col-md-6"> |
731 | <div class="pull-left" style="width: 110px;"> | 764 | <div class="pull-left" style="width: 110px;"> |
732 | <label class="new-input-label"><b>Certificate Type</b></label> | 765 | <label class="new-input-label"><b>Certificate Type</b></label> |
733 | </div> | 766 | </div> |
734 | <div class="pull-left" style="width: calc(100% - 110px);"> | 767 | <div class="pull-left" style="width: calc(100% - 110px);"> |
735 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 768 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
736 | <option value="" disabled selected hidden>Select...</option> | 769 | <option value="" disabled selected hidden>Select...</option> |
737 | <option value="corporate">Part 91 (Corporate)</option> | 770 | <option value="corporate">Part 91 (Corporate)</option> |
738 | <option value="charter">Part 135 (Charter)</option> | 771 | <option value="charter">Part 135 (Charter)</option> |
739 | <option value="scheduled">Part 121 (Scheduled)</option> | 772 | <option value="scheduled">Part 121 (Scheduled)</option> |
740 | <option value="military">Military</option> | 773 | <option value="military">Military</option> |
741 | <option value="government">Government</option> | 774 | <option value="government">Government</option> |
742 | </select> | 775 | </select> |
743 | </div> | 776 | </div> |
744 | <div class="clearfix"></div> | 777 | <div class="clearfix"></div> |
745 | </div> | 778 | </div> |
746 | <div class="col-md-6"> | 779 | <div class="col-md-6"> |
747 | <div class="pull-left" style="width: 110px;"> | 780 | <div class="pull-left" style="width: 110px;"> |
748 | <label class="new-input-label"><b>Status</b></label> | 781 | <label class="new-input-label"><b>Status</b></label> |
749 | </div> | 782 | </div> |
750 | <div class="pull-left" style="width: calc(100% - 110px);"> | 783 | <div class="pull-left" style="width: calc(100% - 110px);"> |
751 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 784 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
752 | <option value="" disabled selected hidden>pending</option> | 785 | <option value="" disabled selected hidden>pending</option> |
753 | <option value="pending">pending</option> | 786 | <option value="pending">pending</option> |
754 | <option value="invoiced">invoiced</option> | 787 | <option value="invoiced">invoiced</option> |
755 | <option value="paid">paid</option> | 788 | <option value="paid">paid</option> |
756 | <!-- <option value="cancelled">cancelled</option> | 789 | <!-- <option value="cancelled">cancelled</option> |
757 | <option value="archived">archived</option> --> | 790 | <option value="archived">archived</option> --> |
758 | </select> | 791 | </select> |
759 | </div> | 792 | </div> |
760 | <div class="clearfix"></div> | 793 | <div class="clearfix"></div> |
761 | </div> | 794 | </div> |
762 | </div> | 795 | </div> |
763 | <div class="clearfix"></div><br> | 796 | <div class="clearfix"></div><br> |
764 | 797 | ||
765 | </div> | 798 | </div> |
766 | </div> | 799 | </div> |
767 | </div> | 800 | </div> |
768 | </div> | 801 | </div> |
769 | </div> | 802 | </div> |
770 | </div> | 803 | </div> |
771 | <div class="modal-footer" style="border-top: 0;"> | 804 | <div class="modal-footer" style="border-top: 0;"> |
772 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 805 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
773 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> | 806 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> |
774 | </div> | 807 | </div> |
775 | </div> | 808 | </div> |
776 | </div> | 809 | </div> |
777 | </div> | 810 | </div> |
778 | </form> | 811 | </form> |
779 | 812 | ||
780 | 813 | ||
781 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> | 814 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> |
782 | <div class="modal-dialog modal-lg"> | 815 | <div class="modal-dialog modal-lg"> |
783 | <div class="modal-content"> | 816 | <div class="modal-content"> |
784 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 817 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
785 | <div> | 818 | <div> |
786 | <div class="row" style="margin: 0;"> | 819 | <div class="row" style="margin: 0;"> |
787 | <div> | 820 | <div> |
788 | <div class="widget" style="margin-bottom: 0;"> | 821 | <div class="widget" style="margin-bottom: 0;"> |
789 | <div class="widget-header"> | 822 | <div class="widget-header"> |
790 | <i class="icon-pencil"></i> | 823 | <i class="icon-pencil"></i> |
791 | <i class="fa fa-tasks" aria-hidden="true"></i> | 824 | <i class="fa fa-tasks" aria-hidden="true"></i> |
792 | <h3>Update Fuel Order</h3> | 825 | <h3>Update Fuel Order</h3> |
793 | <div class="clearfix"></div> | 826 | <div class="clearfix"></div> |
794 | </div> | 827 | </div> |
795 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 828 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
796 | <div class="col-xs-12"> | 829 | <div class="col-xs-12"> |
797 | <div class="col-xs-12"> | 830 | <div class="col-xs-12"> |
798 | 831 | ||
799 | <div class="col-md-6"> | 832 | <div class="col-md-6"> |
800 | <div class="pull-left" style="width: 110px;"> | 833 | <div class="pull-left" style="width: 110px;"> |
801 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 834 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
802 | </div> | 835 | </div> |
803 | <div class="pull-left" style="width: calc(100% - 110px);"> | 836 | <div class="pull-left" style="width: calc(100% - 110px);"> |
804 | <div style="width: 50%; float: left;"> | 837 | <div style="width: 50%; float: left;"> |
805 | Date | 838 | Date |
806 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> | 839 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> |
807 | </div> | 840 | </div> |
808 | <div style="width: 50%; float: left;"> | 841 | <div style="width: 50%; float: left;"> |
809 | Time | 842 | Time |
810 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> | 843 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> |
811 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 844 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
812 | </select> | 845 | </select> |
813 | 846 | ||
814 | </div> | 847 | </div> |
815 | </div> | 848 | </div> |
816 | <div class="clearfix"></div> | 849 | <div class="clearfix"></div> |
817 | </div> | 850 | </div> |
818 | <div class="col-md-6" style="margin-top: 25px;"> | 851 | <div class="col-md-6" style="margin-top: 25px;"> |
819 | <div class="pull-left" style="width: 110px;"> | 852 | <div class="pull-left" style="width: 110px;"> |
820 | <label class="new-input-label"><b>Volume</b></label> | 853 | <label class="new-input-label"><b>Volume</b></label> |
821 | </div> | 854 | </div> |
822 | <div class="pull-left" style="width: calc(100% - 110px);"> | 855 | <div class="pull-left" style="width: calc(100% - 110px);"> |
823 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> | 856 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> |
824 | </div> | 857 | </div> |
825 | <div class="clearfix"></div> | 858 | <div class="clearfix"></div> |
826 | </div> | 859 | </div> |
827 | </div> | 860 | </div> |
828 | <div class="clearfix"></div><br> | 861 | <div class="clearfix"></div><br> |
829 | 862 | ||
830 | <div class="col-xs-12"> | 863 | <div class="col-xs-12"> |
831 | 864 | ||
832 | <div class="col-md-6"> | 865 | <div class="col-md-6"> |
833 | <div class="pull-left" style="width: 110px;"> | 866 | <div class="pull-left" style="width: 110px;"> |
834 | <label class="new-input-label"><b>ETD</b></label> | 867 | <label class="new-input-label"><b>ETD</b></label> |
835 | </div> | 868 | </div> |
836 | <div class="pull-left" style="width: calc(100% - 110px);"> | 869 | <div class="pull-left" style="width: calc(100% - 110px);"> |
837 | <div style="width: 50%; float: left;"> | 870 | <div style="width: 50%; float: left;"> |
838 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> | 871 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> |
839 | </div> | 872 | </div> |
840 | <div style="width: 50%; float: left;"> | 873 | <div style="width: 50%; float: left;"> |
841 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> | 874 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> |
842 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 875 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
843 | </select> | 876 | </select> |
844 | </div> | 877 | </div> |
845 | </div> | 878 | </div> |
846 | <div class="clearfix"></div> | 879 | <div class="clearfix"></div> |
847 | </div> | 880 | </div> |
848 | <div class="col-md-6"> | 881 | <div class="col-md-6"> |
849 | <div class="pull-left" style="width: 110px;"> | 882 | <div class="pull-left" style="width: 110px;"> |
850 | <label class="new-input-label"><b>Fuel on</b></label> | 883 | <label class="new-input-label"><b>Fuel on</b></label> |
851 | </div> | 884 | </div> |
852 | <div class="pull-left" style="width: calc(100% - 110px);"> | 885 | <div class="pull-left" style="width: calc(100% - 110px);"> |
853 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> | 886 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> |
854 | <option value="" disabled selected hidden>Arrival</option> | 887 | <option value="" disabled selected hidden>Arrival</option> |
855 | <option value="Arrival">Arrival</option> | 888 | <option value="Arrival">Arrival</option> |
856 | <option value="Departure">Departure</option> | 889 | <option value="Departure">Departure</option> |
857 | </select> | 890 | </select> |
858 | </div> | 891 | </div> |
859 | <div class="clearfix"></div> | 892 | <div class="clearfix"></div> |
860 | </div> | 893 | </div> |
861 | </div> | 894 | </div> |
862 | <div class="clearfix"></div><br> | 895 | <div class="clearfix"></div><br> |
863 | 896 | ||
864 | <div class="col-xs-12"> | 897 | <div class="col-xs-12"> |
865 | 898 | ||
866 | <div class="col-md-6"> | 899 | <div class="col-md-6"> |
867 | <div class="pull-left" style="width: 110px;"> | 900 | <div class="pull-left" style="width: 110px;"> |
868 | <label class="new-input-label"><b>Company</b></label> | 901 | <label class="new-input-label"><b>Company</b></label> |
869 | </div> | 902 | </div> |
870 | <div class="pull-left" style="width: calc(100% - 110px);"> | 903 | <div class="pull-left" style="width: calc(100% - 110px);"> |
871 | {{editdata.companyName}} | 904 | {{editdata.companyName}} |
872 | </div> | 905 | </div> |
873 | <div class="clearfix"></div> | 906 | <div class="clearfix"></div> |
874 | </div> | 907 | </div> |
875 | <div class="col-md-6"> | 908 | <div class="col-md-6"> |
876 | <div class="pull-left" style="width: 110px;"> | 909 | <div class="pull-left" style="width: 110px;"> |
877 | <label class="new-input-label"><b>Invoiced</b></label> | 910 | <label class="new-input-label"><b>Invoiced</b></label> |
878 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 911 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
879 | </div> | 912 | </div> |
880 | <div class="pull-left" style="width: calc(100% - 110px);"> | 913 | <div class="pull-left" style="width: calc(100% - 110px);"> |
881 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> | 914 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> |
882 | </div> | 915 | </div> |
883 | <div class="clearfix"></div> | 916 | <div class="clearfix"></div> |
884 | </div> | 917 | </div> |
885 | 918 | ||
886 | </div> | 919 | </div> |
887 | <div class="clearfix"></div> | 920 | <div class="clearfix"></div> |
888 | <br/> | 921 | <br/> |
889 | 922 | ||
890 | 923 | ||
891 | <div class="col-xs-12"> | 924 | <div class="col-xs-12"> |
892 | 925 | ||
893 | <div class="col-md-6"> | 926 | <div class="col-md-6"> |
894 | <div class="pull-left" style="width: 110px;"> | 927 | <div class="pull-left" style="width: 110px;"> |
895 | <label class="new-input-label"><b>Tail #</b></label> | 928 | <label class="new-input-label"><b>Tail #</b></label> |
896 | </div> | 929 | </div> |
897 | <div class="pull-left" style="width: calc(100% - 110px);"> | 930 | <div class="pull-left" style="width: calc(100% - 110px);"> |
898 | {{editdata.aircraftName}} | 931 | {{editdata.aircraftName}} |
899 | </div> | 932 | </div> |
900 | <div class="clearfix"></div> | 933 | <div class="clearfix"></div> |
901 | </div> | 934 | </div> |
902 | <div class="col-md-6"> | 935 | <div class="col-md-6"> |
903 | <div class="pull-left" style="width: 110px;"> | 936 | <div class="pull-left" style="width: 110px;"> |
904 | <label class="new-input-label"><b>Total</b></label> | 937 | <label class="new-input-label"><b>Total</b></label> |
905 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 938 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
906 | </div> | 939 | </div> |
907 | <div class="pull-left" style="width: calc(100% - 110px);"> | 940 | <div class="pull-left" style="width: calc(100% - 110px);"> |
908 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> | 941 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> |
909 | </div> | 942 | </div> |
910 | <div class="clearfix"></div> | 943 | <div class="clearfix"></div> |
911 | </div> | 944 | </div> |
912 | </div> | 945 | </div> |
913 | <div class="clearfix"></div> | 946 | <div class="clearfix"></div> |
914 | <br/> | 947 | <br/> |
915 | <div class="col-xs-12"> | 948 | <div class="col-xs-12"> |
916 | 949 | ||
917 | 950 | ||
918 | <div class="col-md-6"> | 951 | <div class="col-md-6"> |
919 | <div class="pull-left" style="width: 110px;"> | 952 | <div class="pull-left" style="width: 110px;"> |
920 | <label class="new-input-label"><b>Source</b></label> | 953 | <label class="new-input-label"><b>Source</b></label> |
921 | </div> | 954 | </div> |
922 | <div class="pull-left" style="width: calc(100% - 110px);"> | 955 | <div class="pull-left" style="width: calc(100% - 110px);"> |
923 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> | 956 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> |
924 | <option value="" disabled selected hidden>Select Source</option> | 957 | <option value="" disabled selected hidden>Select Source</option> |
925 | <option value="Tenant">Tenant</option> | 958 | <option value="Tenant">Tenant</option> |
926 | <option value="CAA">CAA</option> | 959 | <option value="CAA">CAA</option> |
927 | <option value="Tenant/CAA">Tenant/CAA</option> | 960 | <option value="Tenant/CAA">Tenant/CAA</option> |
928 | </select> | 961 | </select> |
929 | </div> | 962 | </div> |
930 | <div class="clearfix"></div> | 963 | <div class="clearfix"></div> |
931 | </div> | 964 | </div> |
932 | <div class="col-md-6"> | 965 | <div class="col-md-6"> |
933 | <div class="pull-left" style="width: 110px;"> | 966 | <div class="pull-left" style="width: 110px;"> |
934 | <label class="new-input-label"><b>Product</b></label> | 967 | <label class="new-input-label"><b>Product</b></label> |
935 | </div> | 968 | </div> |
936 | <div class="pull-left" style="width: calc(100% - 110px);"> | 969 | <div class="pull-left" style="width: calc(100% - 110px);"> |
937 | {{editdata.productName}} | 970 | {{editdata.productName}} |
938 | </div> | 971 | </div> |
939 | <div class="clearfix"></div> | 972 | <div class="clearfix"></div> |
940 | </div> | 973 | </div> |
941 | </div> | 974 | </div> |
942 | <div class="clearfix"></div> | 975 | <div class="clearfix"></div> |
943 | <br/> | 976 | <br/> |
944 | 977 | ||
945 | <div class="col-xs-12"> | 978 | <div class="col-xs-12"> |
946 | 979 | ||
947 | <div class="col-md-6"> | 980 | <div class="col-md-6"> |
948 | <div class="pull-left" style="width: 110px;"> | 981 | <div class="pull-left" style="width: 110px;"> |
949 | <label class="new-input-label"><b>Status</b></label> | 982 | <label class="new-input-label"><b>Status</b></label> |
950 | </div> | 983 | </div> |
951 | <div class="pull-left" style="width: calc(100% - 110px);"> | 984 | <div class="pull-left" style="width: calc(100% - 110px);"> |
952 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> | 985 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> |
953 | <option value="" disabled selected hidden>Select Status</option> | 986 | <option value="" disabled selected hidden>Select Status</option> |
954 | <option value="pending">pending</option> | 987 | <option value="pending">pending</option> |
955 | <option value="invoiced">invoiced</option> | 988 | <option value="invoiced">invoiced</option> |
956 | <option value="paid">paid</option> | 989 | <option value="paid">paid</option> |
957 | <option value="cancelled">cancelled</option> | 990 | <option value="cancelled">cancelled</option> |
958 | <option value="archived">archived</option> | 991 | <option value="archived">archived</option> |
959 | </select> | 992 | </select> |
960 | </div> | 993 | </div> |
961 | <div class="clearfix"></div> | 994 | <div class="clearfix"></div> |
962 | </div> | 995 | </div> |
963 | <div class="col-md-6"> | 996 | <div class="col-md-6"> |
964 | <div class="pull-left" style="width: 110px;"> | 997 | <div class="pull-left" style="width: 110px;"> |
965 | <label class="new-input-label"><b>Certificate Type</b></label> | 998 | <label class="new-input-label"><b>Certificate Type</b></label> |
966 | </div> | 999 | </div> |
967 | <div class="pull-left" style="width: calc(100% - 110px);"> | 1000 | <div class="pull-left" style="width: calc(100% - 110px);"> |
968 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> | 1001 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> |
969 | <option value="" disabled selected hidden>Select...</option> | 1002 | <option value="" disabled selected hidden>Select...</option> |
970 | <option value="corporate">Part 91 (Corporate)</option> | 1003 | <option value="corporate">Part 91 (Corporate)</option> |
971 | <option value="charter">Part 135 (Charter)</option> | 1004 | <option value="charter">Part 135 (Charter)</option> |
972 | <option value="scheduled">Part 121 (Scheduled)</option> | 1005 | <option value="scheduled">Part 121 (Scheduled)</option> |
973 | <option value="military">Military</option> | 1006 | <option value="military">Military</option> |
974 | <option value="government">Government</option> | 1007 | <option value="government">Government</option> |
975 | </select> | 1008 | </select> |
976 | </div> | 1009 | </div> |
977 | 1010 | ||
978 | </div> | 1011 | </div> |
979 | <div class="clearfix"></div> | 1012 | <div class="clearfix"></div> |
980 | <br/> | 1013 | <br/> |
981 | <div class="col-xs-12"> | 1014 | <div class="col-xs-12"> |
982 | </div> | 1015 | </div> |
983 | <div class="clearfix"></div> | 1016 | <div class="clearfix"></div> |
984 | <br/> | 1017 | <br/> |
985 | <div class="col-xs-12"> | 1018 | <div class="col-xs-12"> |
986 | 1019 | ||
987 | </div> | 1020 | </div> |
988 | <div class="clearfix"></div> | 1021 | <div class="clearfix"></div> |
989 | 1022 | ||
990 | </div> | 1023 | </div> |
991 | </div> | 1024 | </div> |
992 | <div class="clearfix"></div> | 1025 | <div class="clearfix"></div> |
993 | </div> | 1026 | </div> |
994 | </div> | 1027 | </div> |
995 | </div> | 1028 | </div> |
996 | </div> | 1029 | </div> |
997 | 1030 | ||
998 | <div class="modal-footer" style="border-top: 0;"> | 1031 | <div class="modal-footer" style="border-top: 0;"> |
999 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> | 1032 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> |
1000 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> | 1033 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> |
1001 | </div> | 1034 | </div> |
1002 | </div> | 1035 | </div> |
1003 | </div> | 1036 | </div> |
1004 | </div> | 1037 | </div> |
1005 | </form> | 1038 | </form> |
1006 | 1039 | ||
1007 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> | 1040 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> |
1008 | <div class="modal-dialog modal-xs"> | 1041 | <div class="modal-dialog modal-xs"> |
1009 | <div class="modal-content"> | 1042 | <div class="modal-content"> |
1010 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 1043 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
1011 | <div> | 1044 | <div> |
1012 | <div class="row" style="margin: 0;"> | 1045 | <div class="row" style="margin: 0;"> |
1013 | <div> | 1046 | <div> |
1014 | <div class="widget" style="margin-bottom: 0;"> | 1047 | <div class="widget" style="margin-bottom: 0;"> |
1015 | <div class="widget-header"> | 1048 | <div class="widget-header"> |
1016 | <i class="icon-pencil"></i> | 1049 | <i class="icon-pencil"></i> |
1017 | <i class="fa fa-tasks" aria-hidden="true"></i> | 1050 | <i class="fa fa-tasks" aria-hidden="true"></i> |
1018 | <h3>Upload Attachment</h3> | 1051 | <h3>Upload Attachment</h3> |
1019 | <div class="clearfix"></div> | 1052 | <div class="clearfix"></div> |
1020 | </div> | 1053 | </div> |
1021 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 1054 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
1022 | <div class="col-xs-6"> | 1055 | <div class="col-xs-6"> |
1023 | <div class="col-xs-6"> | 1056 | <div class="col-xs-6"> |
1024 | 1057 | ||
1025 | <div class="col-md-6"> | 1058 | <div class="col-md-6"> |
1026 | <div class="pull-left" style="width: 110px;"> | 1059 | <div class="pull-left" style="width: 110px;"> |
1027 | <label class="new-input-label"><b>Upload</b></label> | 1060 | <label class="new-input-label"><b>Upload</b></label> |
1028 | <br> | 1061 | <br> |
1029 | <br> | 1062 | <br> |
1030 | </div> | 1063 | </div> |
1031 | <div class="pull-left" style="width: calc(100% - 110px);"> | 1064 | <div class="pull-left" style="width: calc(100% - 110px);"> |
1032 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> | 1065 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> |
1033 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> | 1066 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> |
1034 | </div> | 1067 | </div> |
1035 | <div class="clearfix"></div> | 1068 | <div class="clearfix"></div> |
1036 | </div> | 1069 | </div> |
1037 | </div> | 1070 | </div> |
1038 | <div class="clearfix"></div><br> | 1071 | <div class="clearfix"></div><br> |
1039 | 1072 | ||
1040 | </div> | 1073 | </div> |
1041 | </div> | 1074 | </div> |
1042 | <div class="clearfix"></div> | 1075 | <div class="clearfix"></div> |
1043 | </div> | 1076 | </div> |
1044 | </div> | 1077 | </div> |
1045 | </div> | 1078 | </div> |
1046 | </div> | 1079 | </div> |
1047 | 1080 | ||
1048 | <div class="modal-footer" style="border-top: 0;"> | 1081 | <div class="modal-footer" style="border-top: 0;"> |
1049 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> | 1082 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> |
1050 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> | 1083 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> |
1051 | </div> | 1084 | </div> |
1052 | </div> | 1085 | </div> |
1053 | </div> | 1086 | </div> |
1054 | </div> | 1087 | </div> |
1055 | </form> | 1088 | </form> |
1056 | 1089 | ||
1057 | <div class="customConfirmPopBackdrop" id="delete1"> | 1090 | <div class="customConfirmPopBackdrop" id="delete1"> |
1058 | <div class="customModalInner" style="max-width: 400px;"> | 1091 | <div class="customModalInner" style="max-width: 400px;"> |
1059 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1092 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1060 | <table> | 1093 | <table> |
1061 | <tr> | 1094 | <tr> |
1062 | <td> | 1095 | <td> |
1063 | <img src="img/info.png" style="width: 50px;"> | 1096 | <img src="img/info.png" style="width: 50px;"> |
1064 | </td> | 1097 | </td> |
1065 | <td> | 1098 | <td> |
1066 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> | 1099 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> |
1067 | </td> | 1100 | </td> |
1068 | </tr> | 1101 | </tr> |
1069 | </table> | 1102 | </table> |
1070 | </div> | 1103 | </div> |
1071 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1104 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1072 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> | 1105 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> |
1073 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> | 1106 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> |
1074 | </div> | 1107 | </div> |
1075 | </div> | 1108 | </div> |
1076 | </div> | 1109 | </div> |
1077 | 1110 | ||
1078 | 1111 | ||
1079 | 1112 | ||
1080 | <div class="myLoader" ng-show="showLoader"> | 1113 | <div class="myLoader" ng-show="showLoader"> |
1081 | <img src="../img/hourglass.gif" width="50px;"> | 1114 | <img src="../img/hourglass.gif" width="50px;"> |
1082 | </div> | 1115 | </div> |
1083 | <script src="js/multi-step-modal.js"></script> | 1116 | <script src="js/multi-step-modal.js"></script> |
1084 | <script> | 1117 | <script> |
1085 | sendEvent = function(sel, step) { | 1118 | sendEvent = function(sel, step) { |
1086 | $(sel).trigger('next.m.' + step); | 1119 | $(sel).trigger('next.m.' + step); |
1087 | } | 1120 | } |
1088 | </script> | 1121 | </script> |
1089 | 1122 | ||
1090 | <script> | 1123 | <script> |
1091 | angular.module("KendoDemos", [ "kendo.directives" ]) | 1124 | angular.module("KendoDemos", [ "kendo.directives" ]) |
1092 | .controller("MyCtrl", function($scope){ | 1125 | .controller("MyCtrl", function($scope){ |
1093 | $scope.getType = function(x) { | 1126 | $scope.getType = function(x) { |
1094 | return typeof x; | 1127 | return typeof x; |
1095 | }; | 1128 | }; |
1096 | $scope.isDate = function(x) { | 1129 | $scope.isDate = function(x) { |
1097 | return x instanceof Date; | 1130 | return x instanceof Date; |
1098 | }; | 1131 | }; |
1099 | }) | 1132 | }) |
1100 | </script> | ||
1133 | </script> | ||
1134 | <style type="text/css"> | ||
1135 | .ui-datepicker-div{ | ||
1136 | border-bottom: 2px solid #000; | ||
1137 | } |