Commit 0173d74ad393b69b7f4dfbe43c818c5a6717b19d
1 parent
0a364e561c
Exists in
master
source autopopulate in fuel order screens
Showing
8 changed files
with
77 additions
and
23 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 | for (var i = 0; i < $scope.companyList.length; i++) { | 82 | for (var i = 0; i < $scope.companyList.length; i++) { |
83 | if ($scope.companyList[i].companyContact != null) { | 83 | if ($scope.companyList[i].companyContact != null) { |
84 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 84 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
85 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 85 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
86 | } | 86 | } |
87 | } | 87 | } |
88 | if ($scope.companyList[i].primaryContact != null) { | 88 | if ($scope.companyList[i].primaryContact != null) { |
89 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 89 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
90 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 90 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
91 | } | 91 | } |
92 | } | 92 | } |
93 | if ($scope.companyList[i].margin != null) { | 93 | if ($scope.companyList[i].margin != null) { |
94 | if ($scope.companyList[i].margin.marginName != null) { | 94 | if ($scope.companyList[i].margin.marginName != null) { |
95 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 95 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
96 | } | 96 | } |
97 | } | 97 | } |
98 | } | 98 | } |
99 | $scope.displayCompanyList = new NgTableParams({ | 99 | $scope.displayCompanyList = new NgTableParams({ |
100 | page : 1, | 100 | page : 1, |
101 | count : 10, | 101 | count : 10, |
102 | }, { | 102 | }, { |
103 | data : $scope.companyList | 103 | data : $scope.companyList |
104 | }); | 104 | }); |
105 | $scope.showLoader = false; | 105 | $scope.showLoader = false; |
106 | }) | 106 | }) |
107 | } | 107 | } |
108 | 108 | ||
109 | getAllCompanies(); | 109 | getAllCompanies(); |
110 | 110 | ||
111 | $scope.editMargin = function(customer) { | 111 | $scope.editMargin = function(customer) { |
112 | //console.log('customer', customer); | 112 | //console.log('customer', customer); |
113 | $scope.showLoader = true; | 113 | $scope.showLoader = true; |
114 | event.stopPropagation(); | 114 | event.stopPropagation(); |
115 | 115 | ||
116 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin | 116 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin |
117 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" | 117 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" |
118 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" | 118 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" |
119 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant | 119 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant |
120 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor | 120 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor |
121 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; | 121 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; |
122 | 122 | ||
123 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { | 123 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { |
124 | if (result != null && result.success) { | 124 | if (result != null && result.success) { |
125 | $scope.showLoader = false; | 125 | $scope.showLoader = false; |
126 | toastr.success('' + result.success + '', { | 126 | toastr.success('' + result.success + '', { |
127 | closeButton : true | 127 | closeButton : true |
128 | }) | 128 | }) |
129 | getAllCompanies(); | 129 | getAllCompanies(); |
130 | } else { | 130 | } else { |
131 | $scope.showLoader = false; | 131 | $scope.showLoader = false; |
132 | toastr.error('' + result.statusText + '', { | 132 | toastr.error('' + result.statusText + '', { |
133 | closeButton : true | 133 | closeButton : true |
134 | }) | 134 | }) |
135 | } | 135 | } |
136 | }) | 136 | }) |
137 | } | 137 | } |
138 | 138 | ||
139 | getData(); | 139 | getData(); |
140 | function getData() { | 140 | function getData() { |
141 | $scope.showLoader = true; | 141 | $scope.showLoader = true; |
142 | CustomersService.getAircraftMake().then(function(result) { | 142 | CustomersService.getAircraftMake().then(function(result) { |
143 | //console.log("==aircrafts===",result) | 143 | //console.log("==aircrafts===",result) |
144 | $scope.aircraftMakeList = result; | 144 | $scope.aircraftMakeList = result; |
145 | $scope.showLoader = false; | 145 | $scope.showLoader = false; |
146 | }) | 146 | }) |
147 | } | 147 | } |
148 | // CustomersService.getMargin().then(function(result) { | 148 | // CustomersService.getMargin().then(function(result) { |
149 | // $scope.marginList = result; | 149 | // $scope.marginList = result; |
150 | // }) | 150 | // }) |
151 | $scope.marginFilterOptions = []; | 151 | $scope.marginFilterOptions = []; |
152 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 152 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
153 | $scope.showLoader = true; | 153 | $scope.showLoader = true; |
154 | $scope.jetMarginList = result; | 154 | $scope.jetMarginList = result; |
155 | //console.log("jet margin",result,$scope.userProfileId) | 155 | //console.log("jet margin",result,$scope.userProfileId) |
156 | $scope.marginFilterOptions.push({ | 156 | $scope.marginFilterOptions.push({ |
157 | 'id' : '', | 157 | 'id' : '', |
158 | 'title' : 'Show All' | 158 | 'title' : 'Show All' |
159 | }); | 159 | }); |
160 | for (var i = 0; i < result.length; i++) { | 160 | for (var i = 0; i < result.length; i++) { |
161 | $scope.marginFilterOptions.push({ | 161 | $scope.marginFilterOptions.push({ |
162 | 'id' : result[i].id, | 162 | 'id' : result[i].id, |
163 | 'title' : result[i].marginName | 163 | 'title' : result[i].marginName |
164 | }) | 164 | }) |
165 | } | 165 | } |
166 | $scope.showLoader = false; | 166 | $scope.showLoader = false; |
167 | }) | 167 | }) |
168 | 168 | ||
169 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 169 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
170 | $scope.avgsMarginList = result; | 170 | $scope.avgsMarginList = result; |
171 | // console.log('avgsMarginList',result) | 171 | // console.log('avgsMarginList',result) |
172 | }) | 172 | }) |
173 | 173 | ||
174 | 174 | ||
175 | $scope.showCompanyError = false; | 175 | $scope.showCompanyError = false; |
176 | $scope.showMarginError = false; | 176 | $scope.showMarginError = false; |
177 | 177 | ||
178 | $scope.removeValidation = function() { | 178 | $scope.removeValidation = function() { |
179 | $scope.showCompanyError = false; | 179 | $scope.showCompanyError = false; |
180 | $('.companyNameInput').removeClass('customErrorInput'); | 180 | $('.companyNameInput').removeClass('customErrorInput'); |
181 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 181 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
182 | $('.companyNameInput').addClass('customErrorInput'); | 182 | $('.companyNameInput').addClass('customErrorInput'); |
183 | $scope.showCompanyError = true; | 183 | $scope.showCompanyError = true; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | $scope.removeMarginValidation = function() { | 187 | $scope.removeMarginValidation = function() { |
188 | $scope.showMarginError = false; | 188 | $scope.showMarginError = false; |
189 | $('.marginSelectBox').removeClass('customErrorInput'); | 189 | $('.marginSelectBox').removeClass('customErrorInput'); |
190 | } | 190 | } |
191 | 191 | ||
192 | var companyData; | 192 | var companyData; |
193 | $scope.addFirstData = function(sel, step) { | 193 | $scope.addFirstData = function(sel, step) { |
194 | $scope.showLoader = true; | 194 | $scope.showLoader = true; |
195 | if ($scope.data.companyName == undefined) { | 195 | if ($scope.data.companyName == undefined) { |
196 | $scope.showCompanyError = true; | 196 | $scope.showCompanyError = true; |
197 | $('.companyNameInput').addClass('customErrorInput'); | 197 | $('.companyNameInput').addClass('customErrorInput'); |
198 | } else if ($scope.data.masterMargin == undefined) { | 198 | } else if ($scope.data.masterMargin == undefined) { |
199 | $scope.showMarginError = true; | 199 | $scope.showMarginError = true; |
200 | $('.marginSelectBox').addClass('customErrorInput'); | 200 | $('.marginSelectBox').addClass('customErrorInput'); |
201 | } else { | 201 | } else { |
202 | $scope.aircraftDetails = [ { | 202 | $scope.aircraftDetails = [ { |
203 | 'tail' : '', | 203 | 'tail' : '', |
204 | 'make' : '', | 204 | 'make' : '', |
205 | 'model' : '', | 205 | 'model' : '', |
206 | 'sizeId' : '', | 206 | 'sizeId' : '', |
207 | 'marginId' : $scope.data.masterMargin, | 207 | 'marginId' : $scope.data.masterMargin, |
208 | 'avgasMarginId' : $scope.data.avgasMargin | 208 | 'avgasMarginId' : $scope.data.avgasMargin |
209 | } ]; | 209 | } ]; |
210 | 210 | ||
211 | $(sel).trigger('next.m.' + step); | 211 | $(sel).trigger('next.m.' + step); |
212 | getData(); | 212 | getData(); |
213 | } | 213 | } |
214 | $scope.showLoader = false; | 214 | $scope.showLoader = false; |
215 | } | 215 | } |
216 | 216 | ||
217 | $scope.addNew = function() { | 217 | $scope.addNew = function() { |
218 | $scope.showLoader = true; | 218 | $scope.showLoader = true; |
219 | $scope.aircraftDetails.push({ | 219 | $scope.aircraftDetails.push({ |
220 | 'tail' : '', | 220 | 'tail' : '', |
221 | 'make' : '', | 221 | 'make' : '', |
222 | 'model' : '', | 222 | 'model' : '', |
223 | 'sizeId' : '', | 223 | 'sizeId' : '', |
224 | 'marginId' : $scope.data.masterMargin, | 224 | 'marginId' : $scope.data.masterMargin, |
225 | 'avgasMarginId' : $scope.data.avgasMargin | 225 | 'avgasMarginId' : $scope.data.avgasMargin |
226 | }); | 226 | }); |
227 | $scope.showLoader = false; | 227 | $scope.showLoader = false; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | $scope.aircraftIdx = ''; | 230 | $scope.aircraftIdx = ''; |
231 | $scope.checkTail = function(tail, idx){ | 231 | $scope.checkTail = function(tail, idx){ |
232 | var data = "tail=" + tail; | 232 | var data = "tail=" + tail; |
233 | $scope.aircraftIdx = idx; | 233 | $scope.aircraftIdx = idx; |
234 | CustomersService.checkTailRegistration(data).then(function(result) { | 234 | CustomersService.checkTailRegistration(data).then(function(result) { |
235 | if(result.error) { | 235 | if(result.error) { |
236 | $scope.aircraftMessage = result.error; | 236 | $scope.aircraftMessage = result.error; |
237 | $scope.openAddAirCraftError(); | 237 | $scope.openAddAirCraftError(); |
238 | } else if(result.warning) { | 238 | } else if(result.warning) { |
239 | $scope.aircraftMessage = result.warning; | 239 | $scope.aircraftMessage = result.warning; |
240 | $scope.openAddAirCraftWarning(); | 240 | $scope.openAddAirCraftWarning(); |
241 | } | 241 | } |
242 | }) | 242 | }) |
243 | } | 243 | } |
244 | 244 | ||
245 | $scope.openAddAirCraftError = function() { | 245 | $scope.openAddAirCraftError = function() { |
246 | $('#addAirCraftError').css('display', 'block'); | 246 | $('#addAirCraftError').css('display', 'block'); |
247 | } | 247 | } |
248 | 248 | ||
249 | $scope.openAddAirCraftWarning = function() { | 249 | $scope.openAddAirCraftWarning = function() { |
250 | $('#addAirCraftWarning').css('display', 'block'); | 250 | $('#addAirCraftWarning').css('display', 'block'); |
251 | } | 251 | } |
252 | $scope.acceptAirCraftError = function() { | 252 | $scope.acceptAirCraftError = function() { |
253 | $('#addAirCraftWarning').css('display', 'none'); | 253 | $('#addAirCraftWarning').css('display', 'none'); |
254 | } | 254 | } |
255 | 255 | ||
256 | $scope.cancelAirCraftError = function() { | 256 | $scope.cancelAirCraftError = function() { |
257 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 257 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
258 | $('#addAirCraftWarning').css('display', 'none'); | 258 | $('#addAirCraftWarning').css('display', 'none'); |
259 | $('#addAirCraftError').css('display', 'none'); | 259 | $('#addAirCraftError').css('display', 'none'); |
260 | } | 260 | } |
261 | 261 | ||
262 | 262 | ||
263 | /*$scope.getModal = function(makeId, index) { | 263 | /*$scope.getModal = function(makeId, index) { |
264 | $scope.showLoader = true; | 264 | $scope.showLoader = true; |
265 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 265 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
266 | $scope.showLoader = false; | 266 | $scope.showLoader = false; |
267 | $scope.aircraftDetails[index].aircraftModalList = result; | 267 | $scope.aircraftDetails[index].aircraftModalList = result; |
268 | }) | 268 | }) |
269 | }*/ | 269 | }*/ |
270 | $scope.getModal = function(makeId, index) { | 270 | $scope.getModal = function(makeId, index) { |
271 | $scope.showLoader = true; | 271 | $scope.showLoader = true; |
272 | $scope.aircraft.make = makeId; | 272 | $scope.aircraft.make = makeId; |
273 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 273 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
274 | $scope.showLoader = false; | 274 | $scope.showLoader = false; |
275 | $scope.aircraftDetails[index].aircraftModalList = result; | 275 | $scope.aircraftDetails[index].aircraftModalList = result; |
276 | }) | 276 | }) |
277 | } | 277 | } |
278 | 278 | ||
279 | 279 | ||
280 | $scope.selectedOption = ''; | 280 | $scope.selectedOption = ''; |
281 | $scope.getSize = function(model, index) { | 281 | $scope.getSize = function(model, index) { |
282 | $scope.showLoader = true; | 282 | $scope.showLoader = true; |
283 | $scope.aircraft.model = model; | 283 | $scope.aircraft.model = model; |
284 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 284 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
285 | $scope.showLoader = false; | 285 | $scope.showLoader = false; |
286 | $scope.aircraftDetails[index].aircraftSizeList = result; | 286 | $scope.aircraftDetails[index].aircraftSizeList = result; |
287 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | 287 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); |
288 | 288 | ||
289 | }) | 289 | }) |
290 | } | 290 | } |
291 | 291 | ||
292 | /*$scope.getSize = function(model, index) { | 292 | /*$scope.getSize = function(model, index) { |
293 | $scope.showLoader = true; | 293 | $scope.showLoader = true; |
294 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 294 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
295 | $scope.showLoader = false; | 295 | $scope.showLoader = false; |
296 | $scope.aircraftDetails[index].aircraftSizeList = result; | 296 | $scope.aircraftDetails[index].aircraftSizeList = result; |
297 | }) | 297 | }) |
298 | }*/ | 298 | }*/ |
299 | 299 | ||
300 | $scope.getFuelType = function(size, index) { | 300 | $scope.getFuelType = function(size, index) { |
301 | $scope.showLoader = true; | 301 | $scope.showLoader = true; |
302 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 302 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
303 | ViewCompanyService.checkFuelType(data).then(function(result){ | 303 | ViewCompanyService.checkFuelType(data).then(function(result){ |
304 | $scope.showLoader = false; | 304 | $scope.showLoader = false; |
305 | if (result.type == "JetA") { | 305 | if (result.type == "JetA") { |
306 | $scope.jetShow[index] = false; | 306 | $scope.jetShow[index] = false; |
307 | $scope.marginShow[index] = true; | 307 | $scope.marginShow[index] = true; |
308 | } else if (result.type == "Avgas") { | 308 | } else if (result.type == "Avgas") { |
309 | $scope.jetShow[index] = true; | 309 | $scope.jetShow[index] = true; |
310 | $scope.marginShow[index] = false; | 310 | $scope.marginShow[index] = false; |
311 | }else { | 311 | }else { |
312 | $scope.jetShow[index] = true; | 312 | $scope.jetShow[index] = true; |
313 | $scope.marginShow[index] = true; | 313 | $scope.marginShow[index] = true; |
314 | } | 314 | } |
315 | }) | 315 | }) |
316 | } | 316 | } |
317 | 317 | ||
318 | $scope.aircraftListData = {}; | 318 | $scope.aircraftListData = {}; |
319 | $scope.addData = []; | 319 | $scope.addData = []; |
320 | $scope.tailArray = []; | 320 | $scope.tailArray = []; |
321 | function check(array){ | 321 | function check(array){ |
322 | return (new Set(array)).size !== array.length; | 322 | return (new Set(array)).size !== array.length; |
323 | } | 323 | } |
324 | $scope.saveCompanyData = function() { | 324 | $scope.saveCompanyData = function() { |
325 | // console.log("company data --",$scope.data) | 325 | // console.log("company data --",$scope.data) |
326 | CustomersService.addCompany($scope.data).then(function(result) { | 326 | CustomersService.addCompany($scope.data).then(function(result) { |
327 | $scope.tailArray = []; | 327 | $scope.tailArray = []; |
328 | $scope.addData =[]; | 328 | $scope.addData =[]; |
329 | $scope.accountId = result; | 329 | $scope.accountId = result; |
330 | $scope.aircraft.accountId = $scope.accountId; | 330 | $scope.aircraft.accountId = $scope.accountId; |
331 | 331 | ||
332 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 332 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
333 | $scope.addData.push({ | 333 | $scope.addData.push({ |
334 | 'tail' : $scope.aircraftDetails[i].tail, | 334 | 'tail' : $scope.aircraftDetails[i].tail, |
335 | 'make' : $scope.aircraftDetails[i].make, | 335 | 'make' : $scope.aircraftDetails[i].make, |
336 | 'model' : $scope.aircraftDetails[i].model, | 336 | 'model' : $scope.aircraftDetails[i].model, |
337 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 337 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
338 | 'marginId' : $scope.aircraftDetails[i].marginId, | 338 | 'marginId' : $scope.aircraftDetails[i].marginId, |
339 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId | 339 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId |
340 | }); | 340 | }); |
341 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 341 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
342 | } | 342 | } |
343 | 343 | ||
344 | if (check($scope.tailArray)) { | 344 | if (check($scope.tailArray)) { |
345 | toastr.error('Duplicate Tail Added.', { | 345 | toastr.error('Duplicate Tail Added.', { |
346 | closeButton: true | 346 | closeButton: true |
347 | }) | 347 | }) |
348 | }else{ | 348 | }else{ |
349 | $scope.aircraftListData.aircraftList = $scope.addData; | 349 | $scope.aircraftListData.aircraftList = $scope.addData; |
350 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 350 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
351 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { | 351 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { |
352 | $scope.aircraftListData.aircraftList = []; | 352 | $scope.aircraftListData.aircraftList = []; |
353 | }*/ | 353 | }*/ |
354 | 354 | ||
355 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 355 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
356 | 356 | ||
357 | if (result != null && result.success) { | 357 | if (result != null && result.success) { |
358 | 358 | ||
359 | toastr.success('' + result.success + '', { | 359 | toastr.success('' + result.success + '', { |
360 | closeButton : true | 360 | closeButton : true |
361 | }) | 361 | }) |
362 | $('#demo-modal-3').css('display', 'none'); | 362 | $('#demo-modal-3').css('display', 'none'); |
363 | $('.modal-backdrop').css('display', 'none'); | 363 | $('.modal-backdrop').css('display', 'none'); |
364 | getAllCompanies(); | 364 | getAllCompanies(); |
365 | location.reload(); | 365 | location.reload(); |
366 | } else { | 366 | } else { |
367 | toastr.error('' + result.statusText + '', { | 367 | toastr.error('' + result.statusText + '', { |
368 | closeButton : true | 368 | closeButton : true |
369 | }) | 369 | }) |
370 | } | 370 | } |
371 | }); | 371 | }); |
372 | } | 372 | } |
373 | }) | 373 | }) |
374 | } | 374 | } |
375 | 375 | ||
376 | /*add a fuel order*/ | 376 | /*add a fuel order*/ |
377 | $scope.getOrders = function() { | 377 | $scope.getOrders = function() { |
378 | fuelOrdersService.getOrders().then(function(result) { | 378 | fuelOrdersService.getOrders().then(function(result) { |
379 | //console.log("==get orders===",result) | 379 | //console.log("==get orders===",result) |
380 | $scope.orderdata = result; | 380 | $scope.orderdata = result; |
381 | for (var i = 0; i < $scope.orderdata.length; i++) { | 381 | for (var i = 0; i < $scope.orderdata.length; i++) { |
382 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 382 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
383 | 383 | ||
384 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 384 | // 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() | 385 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
386 | // str = str.slice(4,16) | 386 | // str = str.slice(4,16) |
387 | $scope.orderdata[i].upliftDateString = str | 387 | $scope.orderdata[i].upliftDateString = str |
388 | // console.log(str); | 388 | // console.log(str); |
389 | 389 | ||
390 | } | 390 | } |
391 | 391 | ||
392 | $scope.displayFuelOrderList = new NgTableParams({ | 392 | $scope.displayFuelOrderList = new NgTableParams({ |
393 | page : 1, | 393 | page : 1, |
394 | count : 10, | 394 | count : 10, |
395 | }, { | 395 | }, { |
396 | data : $scope.orderdata | 396 | data : $scope.orderdata |
397 | }); | 397 | }); |
398 | $(document).ready(function() { | 398 | $(document).ready(function() { |
399 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 399 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
400 | 400 | ||
401 | for (var i = 0; i < myselect.length; i++) { | 401 | for (var i = 0; i < myselect.length; i++) { |
402 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 402 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
403 | colourIndex = colourIndex + 1; | 403 | colourIndex = colourIndex + 1; |
404 | // console.log(colourIndex); | 404 | // console.log(colourIndex); |
405 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 405 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
406 | $(myselect[i]).css('background-color', getColor); | 406 | $(myselect[i]).css('background-color', getColor); |
407 | // console.log('colour', getColor); | 407 | // console.log('colour', getColor); |
408 | myselect[i].blur(); | 408 | myselect[i].blur(); |
409 | } | 409 | } |
410 | 410 | ||
411 | }) | 411 | }) |
412 | 412 | ||
413 | }) | 413 | }) |
414 | } | 414 | } |
415 | 415 | ||
416 | $scope.getOrders(); | 416 | $scope.getOrders(); |
417 | $scope.tiervalue=function(){ | 417 | $scope.tiervalue=function(){ |
418 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 418 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
419 | } | 419 | } |
420 | 420 | ||
421 | $scope.setCost = function(cost){ | 421 | $scope.setCost = function(cost){ |
422 | if(cost != null) { | 422 | if(cost != null) { |
423 | var obj =JSON.parse(cost); | 423 | var obj =JSON.parse(cost); |
424 | $scope.order.fboCost = obj.cost; | 424 | $scope.order.fboCost = obj.cost; |
425 | } | 425 | } |
426 | } | 426 | } |
427 | 427 | ||
428 | $scope.cancelOrder = function() { | 428 | $scope.cancelOrder = function() { |
429 | $scope.order = {}; | 429 | $scope.order = {}; |
430 | } | 430 | } |
431 | 431 | ||
432 | $scope.dispatchFuel = function(){ | 432 | $scope.dispatchFuel = function(){ |
433 | $scope.showLoader = true; | 433 | $scope.showLoader = true; |
434 | $scope.fuelData = {}; | 434 | $scope.fuelData = {}; |
435 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 435 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
436 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; | 436 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; |
437 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 437 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
438 | $scope.fuelData.aircraftName = aircraftObj.tail; | 438 | $scope.fuelData.aircraftName = aircraftObj.tail; |
439 | $scope.fuelData.make = aircraftObj.make; | 439 | $scope.fuelData.make = aircraftObj.make; |
440 | $scope.fuelData.model = aircraftObj.model; | 440 | $scope.fuelData.model = aircraftObj.model; |
441 | $scope.fuelData.fuelOn = $scope.order.fuelOn; | 441 | $scope.fuelData.fuelOn = $scope.order.fuelOn; |
442 | $scope.fuelData.invoiced = $scope.order.invoiced; | 442 | $scope.fuelData.invoiced = $scope.order.invoiced; |
443 | $scope.fuelData.volume = $scope.order.volume; | 443 | $scope.fuelData.volume = $scope.order.volume; |
444 | $scope.fuelData.source = $scope.order.source; | 444 | // $scope.fuelData.source = $scope.order.source; |
445 | 445 | ||
446 | $scope.fuelData.total = $scope.order.total; | 446 | $scope.fuelData.total = $scope.order.total; |
447 | //tier no use | 447 | //tier no use |
448 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 448 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
449 | 449 | ||
450 | var obj =JSON.parse($scope.order.priceQuote); | 450 | var obj =JSON.parse($scope.order.priceQuote); |
451 | $scope.fuelData.priceQuote = obj.papTotal; | 451 | $scope.fuelData.priceQuote = obj.papTotal; |
452 | $scope.fuelData.fboCost = obj.cost; | 452 | $scope.fuelData.fboCost = obj.cost; |
453 | $scope.fuelData.productName = obj.productName; | 453 | $scope.fuelData.productName = obj.productName; |
454 | 454 | ||
455 | $scope.fuelData.etaTime = $scope.order.etaTime; | 455 | $scope.fuelData.etaTime = $scope.order.etaTime; |
456 | $scope.fuelData.etdTime = $scope.order.etdTime; | 456 | $scope.fuelData.etdTime = $scope.order.etdTime; |
457 | $scope.fuelData.certificateType = $scope.order.certificateType; | 457 | $scope.fuelData.certificateType = $scope.order.certificateType; |
458 | var currentDate = new Date(); | 458 | var currentDate = new Date(); |
459 | var hours = currentDate.getHours(); | 459 | var hours = currentDate.getHours(); |
460 | var min = currentDate.getMinutes(); | 460 | var min = currentDate.getMinutes(); |
461 | var sec = currentDate.getSeconds(); | 461 | var sec = currentDate.getSeconds(); |
462 | if ($scope.order.upliftDate != '') { | 462 | if ($scope.order.upliftDate != '') { |
463 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 463 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
464 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 464 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
465 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 465 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
466 | } | 466 | } |
467 | 467 | ||
468 | 468 | ||
469 | if ($scope.order.departingDate != '') { | 469 | if ($scope.order.departingDate != '') { |
470 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 470 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
471 | $scope.order.departingDate = new Date($scope.order.departingDate); | 471 | $scope.order.departingDate = new Date($scope.order.departingDate); |
472 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 472 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
473 | } | 473 | } |
474 | 474 | ||
475 | if($scope.order.status === null || $scope.order.status === undefined){ | 475 | if($scope.order.status === null || $scope.order.status === undefined){ |
476 | 476 | ||
477 | $scope.fuelData.status = "pending"; //default status | 477 | $scope.fuelData.status = "pending"; //default status |
478 | 478 | ||
479 | }else { | 479 | }else { |
480 | 480 | ||
481 | $scope.fuelData.status = $scope.order.status; | 481 | $scope.fuelData.status = $scope.order.status; |
482 | } | 482 | } |
483 | 483 | ||
484 | if($scope.baseTenant && $scope.contractFuelVendor ){ | ||
485 | $scope.fuelData.source = "Tenant/Base Customer CAA Member" ; | ||
486 | }else if($scope.baseTenant) | ||
487 | { | ||
488 | $scope.fuelData.source = "Tenant/Base Customer"; | ||
489 | }else if($scope.contractFuelVendor){ | ||
490 | $scope.fuelData.source = "CAA Member"; | ||
491 | } | ||
492 | |||
484 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 493 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
485 | // console.log("=====$scope.fueldata======",$scope.fuelData) | 494 | //console.log("=====$scope.fueldata======",$scope.fuelData) |
486 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 495 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
487 | $scope.showLoader = false; | 496 | $scope.showLoader = false; |
488 | $scope.order = {}; | 497 | $scope.order = {}; |
489 | $scope.dispatchOrder.fuelOrderList = []; | 498 | $scope.dispatchOrder.fuelOrderList = []; |
490 | $('#demo-modal-4').css('display', ''); | 499 | $('#demo-modal-4').css('display', ''); |
491 | $scope.getOrders(); | 500 | $scope.getOrders(); |
492 | toastr.success('Fuel Order Dispatched Successfully', { | 501 | toastr.success('Fuel Order Dispatched Successfully', { |
493 | closeButton: true | 502 | closeButton: true |
494 | }) | 503 | }) |
495 | }) | 504 | }) |
496 | } | 505 | } |
497 | 506 | ||
498 | $scope.addTotal = function(value, valueOf) { | 507 | $scope.addTotal = function(value, valueOf) { |
499 | if (value != undefined && valueOf != undefined) { | 508 | if (value != undefined && valueOf != undefined) { |
500 | value = JSON.parse(value) | 509 | value = JSON.parse(value) |
501 | $scope.order.total = value.cost * valueOf; | 510 | $scope.order.total = value.cost * valueOf; |
502 | } | 511 | } |
503 | } | 512 | } |
504 | 513 | ||
505 | $scope.getAircraft = function(company) { | 514 | $scope.getAircraft = function(company) { |
506 | $scope.selectedCompanyName = company; | 515 | $scope.selectedCompanyName = company; |
507 | //$scope.showLoader = true; | 516 | //$scope.showLoader = true; |
508 | // console.log("id",company) | 517 | // console.log("id",company) |
509 | for (var i = 0; i < $scope.companyList.length; i++) { | 518 | for (var i = 0; i < $scope.companyList.length; i++) { |
510 | if ($scope.companyList[i].companyName == company) { | 519 | if ($scope.companyList[i].companyName == company) { |
511 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { | 520 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { |
512 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 521 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
513 | $scope.marginList = margins; | 522 | $scope.marginList = margins; |
514 | //console.log('$scope.marginList', $scope.marginList); | 523 | //console.log('$scope.marginList', $scope.marginList); |
515 | }) | 524 | }) |
516 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 525 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
517 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 526 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
518 | $scope.marginList = margins; | 527 | $scope.marginList = margins; |
519 | }) | 528 | }) |
520 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 529 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
521 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 530 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
522 | $scope.marginList = margins; | 531 | $scope.marginList = margins; |
523 | }) | 532 | }) |
524 | } | 533 | } |
525 | $scope.selectedCompanyId = $scope.companyList[i].id; | 534 | $scope.selectedCompanyId = $scope.companyList[i].id; |
526 | $scope.marginId = $scope.companyList[i].margin.id; | 535 | $scope.marginId = $scope.companyList[i].margin.id; |
527 | if ($scope.selectedCompanyId != '') { | 536 | if ($scope.selectedCompanyId != '') { |
528 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 537 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
529 | $scope.aircraftList = aircraft; | 538 | $scope.aircraftList = aircraft; |
530 | //console.log("===tail search====",aircraft); | 539 | //console.log("===tail search====",aircraft); |
531 | }) | 540 | }) |
532 | } | 541 | } |
533 | if ($scope.marginId != '') { | 542 | if ($scope.marginId != '') { |
534 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 543 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
535 | $scope.tierList = tiers; | 544 | $scope.tierList = tiers; |
536 | // $scope.showLoader = false; | 545 | // $scope.showLoader = false; |
537 | }) | 546 | }) |
538 | } else { | 547 | } else { |
539 | // $scope.showLoader = false; | 548 | // $scope.showLoader = false; |
540 | } | 549 | } |
541 | } | 550 | } |
542 | } | 551 | } |
543 | 552 | ||
544 | } | 553 | } |
545 | 554 | ||
546 | $scope.sourceList = [ { | 555 | $scope.sourceList = [ { |
547 | source : "Direct Jet-A" | 556 | source : "Direct Jet-A" |
548 | }, { | 557 | }, { |
549 | source : "Direct AVGAS 100LL" | 558 | source : "Direct AVGAS 100LL" |
550 | } ]; | 559 | } ]; |
551 | $scope.cancelData = function() { | 560 | $scope.cancelData = function() { |
552 | $scope.order = {}; | 561 | $scope.order = {}; |
553 | $('#demo-modal-4').css('display', ''); | 562 | $('#demo-modal-4').css('display', ''); |
554 | } | 563 | } |
555 | 564 | ||
556 | $scope.setFuel = function(companyName,certificateType) { | 565 | $scope.setFuel = function(companyName,baseTenant,contractFuelVendor,fuelerlinxCustomer,certificateType) { |
557 | $('#demo-modal-4').css('display', 'block'); | 566 | $('#demo-modal-4').css('display', 'block'); |
558 | $scope.order.defaultCompanyName = companyName; | 567 | $scope.order.defaultCompanyName = companyName; |
559 | $scope.order.certificateType = certificateType; | 568 | $scope.order.certificateType = certificateType; |
569 | $scope.baseTenant = baseTenant; | ||
570 | $scope.contractFuelVendor = contractFuelVendor; | ||
571 | $scope.fuelerlinxCustomer = fuelerlinxCustomer; | ||
572 | //console.log("===values of checkbox===",baseTenant,contractFuelVendor,fuelerlinxCustomer) | ||
560 | $scope.getAircraft(companyName); | 573 | $scope.getAircraft(companyName); |
561 | // event.stopPropagation(); | 574 | // event.stopPropagation(); |
562 | // $state.go('app.updateFuelManager'); | 575 | // $state.go('app.updateFuelManager'); |
563 | } | 576 | } |
564 | 577 | ||
565 | /* ng table */ | 578 | /* ng table */ |
566 | 579 | ||
567 | $scope.exportCompany = function() { | 580 | $scope.exportCompany = function() { |
568 | $scope.showLoader = true; | 581 | $scope.showLoader = true; |
569 | var fileName = "companies.csv"; | 582 | var fileName = "companies.csv"; |
570 | var a = document.createElement("a"); | 583 | var a = document.createElement("a"); |
571 | document.body.appendChild(a); | 584 | document.body.appendChild(a); |
572 | CustomersService.exportCompany().then(function(result) { | 585 | CustomersService.exportCompany().then(function(result) { |
573 | var file = new Blob([ result ], { | 586 | var file = new Blob([ result ], { |
574 | type : 'application/csv' | 587 | type : 'application/csv' |
575 | }); | 588 | }); |
576 | var fileURL = URL.createObjectURL(file); | 589 | var fileURL = URL.createObjectURL(file); |
577 | a.href = fileURL; | 590 | a.href = fileURL; |
578 | a.download = fileName; | 591 | a.download = fileName; |
579 | a.click(); | 592 | a.click(); |
580 | $scope.showLoader = false; | 593 | $scope.showLoader = false; |
581 | }) | 594 | }) |
582 | } | 595 | } |
583 | getCompanyName(); | 596 | getCompanyName(); |
584 | function getCompanyName() { | 597 | function getCompanyName() { |
585 | CustomersService.getCompanyName().then(function(result) { | 598 | CustomersService.getCompanyName().then(function(result) { |
586 | $scope.compNameList = result; | 599 | $scope.compNameList = result; |
587 | //console.log("kd",result) | 600 | //console.log("kd",result) |
588 | }) | 601 | }) |
589 | } | 602 | } |
590 | 603 | ||
591 | // old api not use | 604 | // old api not use |
592 | /*$scope.checkJetWithTail = function(tail, index) { | 605 | /*$scope.checkJetWithTail = function(tail, index) { |
593 | ViewCompanyService.checkJetType(tail).then(function(result) { | 606 | ViewCompanyService.checkJetType(tail).then(function(result) { |
594 | if (result.jetA == "true") { | 607 | if (result.jetA == "true") { |
595 | $scope.jetShow[index] = false; | 608 | $scope.jetShow[index] = false; |
596 | $scope.marginShow[index] = true; | 609 | $scope.marginShow[index] = true; |
597 | } else { | 610 | } else { |
598 | $scope.jetShow[index] = true; | 611 | $scope.jetShow[index] = true; |
599 | $scope.marginShow[index] = false; | 612 | $scope.marginShow[index] = false; |
600 | } | 613 | } |
601 | }) | 614 | }) |
602 | }*/ | 615 | }*/ |
603 | 616 | ||
604 | 617 | ||
605 | $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"}, | 618 | $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"}, |
606 | {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"}, | 619 | {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"}, |
607 | {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"}, | 620 | {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"}, |
608 | {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"}, | 621 | {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"}, |
609 | {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"}, | 622 | {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"}, |
610 | {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"},]; | 623 | {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"},]; |
611 | 624 | ||
612 | $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"}, | 625 | $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"}, |
613 | {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"}, | 626 | {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"}, |
614 | {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"}, | 627 | {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"}, |
615 | {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"}, | 628 | {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"}, |
616 | {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"}, | 629 | {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"}, |
617 | {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"},]; | 630 | {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"},]; |
618 | 631 | ||
619 | } | 632 | } |
app/partials/customers/customers.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ca5c6a; | 3 | color: #ca5c6a; |
4 | } | 4 | } |
5 | 5 | ||
6 | .button1 { | 6 | .button1 { |
7 | display: inline-block; | 7 | display: inline-block; |
8 | height: 35px; | 8 | height: 35px; |
9 | line-height: 35px; | 9 | line-height: 35px; |
10 | padding-right: 15px; | 10 | padding-right: 15px; |
11 | padding-left: 50px; | 11 | padding-left: 50px; |
12 | position: relative; | 12 | position: relative; |
13 | background-color:rgb(41,127,184); | 13 | background-color:rgb(41,127,184); |
14 | color:rgb(255,255,255); | 14 | color:rgb(255,255,255); |
15 | text-decoration: none; | 15 | text-decoration: none; |
16 | text-transform: uppercase; | 16 | text-transform: uppercase; |
17 | letter-spacing: 1px; | 17 | letter-spacing: 1px; |
18 | margin-bottom: 15px; | 18 | margin-bottom: 15px; |
19 | border: 0; | 19 | border: 0; |
20 | 20 | ||
21 | 21 | ||
22 | border-radius: 5px; | 22 | border-radius: 5px; |
23 | -moz-border-radius: 5px; | 23 | -moz-border-radius: 5px; |
24 | -webkit-border-radius: 5px; | 24 | -webkit-border-radius: 5px; |
25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
28 | 28 | ||
29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
34 | } | 34 | } |
35 | 35 | ||
36 | .button1 span { | 36 | .button1 span { |
37 | position: absolute; | 37 | position: absolute; |
38 | left: 0; | 38 | left: 0; |
39 | top: 0; | 39 | top: 0; |
40 | width: 35px; | 40 | width: 35px; |
41 | background-color:rgba(0,0,0,0.5); | 41 | background-color:rgba(0,0,0,0.5); |
42 | -webkit-border-top-left-radius: 5px; | 42 | -webkit-border-top-left-radius: 5px; |
43 | -webkit-border-bottom-left-radius: 5px; | 43 | -webkit-border-bottom-left-radius: 5px; |
44 | -moz-border-radius-topleft: 5px; | 44 | -moz-border-radius-topleft: 5px; |
45 | -moz-border-radius-bottomleft: 5px; | 45 | -moz-border-radius-bottomleft: 5px; |
46 | border-top-left-radius: 5px; | 46 | border-top-left-radius: 5px; |
47 | border-bottom-left-radius: 5px; | 47 | border-bottom-left-radius: 5px; |
48 | border-right: 1px solid rgba(0,0,0,0.15); | 48 | border-right: 1px solid rgba(0,0,0,0.15); |
49 | } | 49 | } |
50 | 50 | ||
51 | .button1:hover span, .button1.active span { | 51 | .button1:hover span, .button1.active span { |
52 | background-color:rgb(0,102,26); | 52 | background-color:rgb(0,102,26); |
53 | border-right: 1px solid rgba(0,0,0,0.3); | 53 | border-right: 1px solid rgba(0,0,0,0.3); |
54 | } | 54 | } |
55 | 55 | ||
56 | .button1:active { | 56 | .button1:active { |
57 | margin-top: 2px; | 57 | margin-top: 2px; |
58 | margin-bottom: 13px; | 58 | margin-bottom: 13px; |
59 | 59 | ||
60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
65 | } | 65 | } |
66 | 66 | ||
67 | .button1.turquoise { | 67 | .button1.turquoise { |
68 | background: #449d44; | 68 | background: #449d44; |
69 | } | 69 | } |
70 | </style> | 70 | </style> |
71 | <div class="myLoader" ng-show="showLoader"> | 71 | <div class="myLoader" ng-show="showLoader"> |
72 | <img src="../img/hourglass.gif" width="50px;"> | 72 | <img src="../img/hourglass.gif" width="50px;"> |
73 | </div> | 73 | </div> |
74 | 74 | ||
75 | <div class="main"> | 75 | <div class="main"> |
76 | <div class="container"> | 76 | <div class="container"> |
77 | <div class="row"> | 77 | <div class="row"> |
78 | <div class="col-md-12"> | 78 | <div class="col-md-12"> |
79 | <div class="widget stacked "> | 79 | <div class="widget stacked "> |
80 | <div class="widget-content"> | 80 | <div class="widget-content"> |
81 | <div class="tabbable"> | 81 | <div class="tabbable"> |
82 | <ul class="nav nav-tabs"> | 82 | <ul class="nav nav-tabs"> |
83 | <li class="active"> | 83 | <li class="active"> |
84 | <a ui-sref="app.customers">Customer View | 84 | <a ui-sref="app.customers">Customer View |
85 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 85 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
86 | </a> | 86 | </a> |
87 | </li> | 87 | </li> |
88 | <li> | 88 | <li> |
89 | <a ui-sref="app.ContactView">Contact View | 89 | <a ui-sref="app.ContactView">Contact View |
90 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 90 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
91 | </a> | 91 | </a> |
92 | </li> | 92 | </li> |
93 | <li> | 93 | <li> |
94 | <a ui-sref="app.FuelVendors">Fuel Vendors | 94 | <a ui-sref="app.FuelVendors">Fuel Vendors |
95 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 95 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
96 | </a> | 96 | </a> |
97 | </li> | 97 | </li> |
98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> | 98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> |
99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> | 99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> |
100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> | 100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> |
101 | </ul> | 101 | </ul> |
102 | <br> | 102 | <br> |
103 | <div class="tab-content customer-table" style="margin:0px"> | 103 | <div class="tab-content customer-table" style="margin:0px"> |
104 | <div class="tab-pane active" id="companyView"> | 104 | <div class="tab-pane active" id="companyView"> |
105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> | 105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> |
106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> | 106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> |
107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> | 107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> |
108 | {{row.companyName}} | 108 | {{row.companyName}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> | 110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> |
111 | {{row.companyAircraftSize}} | 111 | {{row.companyAircraftSize}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> | 113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> |
114 | {{row.newContactNumber}} | 114 | {{row.newContactNumber}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> | 116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> |
117 | {{row.primaryContactName}} | 117 | {{row.primaryContactName}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> | 119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> |
120 | {{row.baseIcao}} | 120 | {{row.baseIcao}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> | 122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> |
123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> | 123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> |
124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> | 124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> |
125 | </td> | 125 | </td> |
126 | <td 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.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" 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" value="{{list}}">{{list.tail}}</option> |
630 | </select> | 630 | </select> |
631 | </div> | 631 | </div> |
632 | <div class="clearfix"></div> | 632 | <div class="clearfix"></div> |
633 | </div> | 633 | </div> |
634 | <div class="col-md-6"> | 634 | <div class="col-md-6"> |
635 | <div class="pull-left" style="width: 110px;"> | 635 | <div class="pull-left" style="width: 110px;"> |
636 | <label class="new-input-label"><b>Volume</b></label> | 636 | <label class="new-input-label"><b>Volume</b></label> |
637 | </div> | 637 | </div> |
638 | <div class="pull-left" style="width: calc(100% - 110px);"> | 638 | <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> | 639 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
640 | </div> | 640 | </div> |
641 | <div class="clearfix"></div> | 641 | <div class="clearfix"></div> |
642 | </div> | 642 | </div> |
643 | 643 | ||
644 | </div> | 644 | </div> |
645 | <div class="clearfix"></div> | 645 | <div class="clearfix"></div> |
646 | <br/> | 646 | <br/> |
647 | 647 | ||
648 | <div class="col-xs-12"> | 648 | <div class="col-xs-12"> |
649 | 649 | ||
650 | <div class="col-md-6"> | 650 | <div class="col-md-6"> |
651 | <div class="pull-left" style="width: 110px;"> | 651 | <div class="pull-left" style="width: 110px;"> |
652 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 652 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
653 | </div> | 653 | </div> |
654 | <div class="pull-left" style="width: calc(100% - 110px);"> | 654 | <div class="pull-left" style="width: calc(100% - 110px);"> |
655 | <div style="width: 50%; float: left;"> | 655 | <div style="width: 50%; float: left;"> |
656 | Date | 656 | Date |
657 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 657 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
658 | </div> | 658 | </div> |
659 | <div style="width: 50%; float: left;"> | 659 | <div style="width: 50%; float: left;"> |
660 | Time | 660 | Time |
661 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 661 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
662 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 662 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
663 | </select> | 663 | </select> |
664 | 664 | ||
665 | </div> | 665 | </div> |
666 | </div> | 666 | </div> |
667 | <div class="clearfix"></div> | 667 | <div class="clearfix"></div> |
668 | </div> | 668 | </div> |
669 | 669 | ||
670 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 670 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
671 | <div class="pull-left" style="width: 110px;"> | 671 | <div class="pull-left" style="width: 110px;"> |
672 | <label class="new-input-label"><b>Invoiced</b></label> | 672 | <label class="new-input-label"><b>Invoiced</b></label> |
673 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 673 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
674 | </div> | 674 | </div> |
675 | <div class="pull-left" style="width: calc(100% - 110px);"> | 675 | <div class="pull-left" style="width: calc(100% - 110px);"> |
676 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 676 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
677 | </div> | 677 | </div> |
678 | <div class="clearfix"></div> | 678 | <div class="clearfix"></div> |
679 | </div> | 679 | </div> |
680 | </div> | 680 | </div> |
681 | <div class="clearfix"></div><br> | 681 | <div class="clearfix"></div><br> |
682 | 682 | ||
683 | 683 | ||
684 | <div class="col-xs-12"> | 684 | <div class="col-xs-12"> |
685 | 685 | ||
686 | <div class="col-md-6"> | 686 | <div class="col-md-6"> |
687 | <div class="pull-left" style="width: 110px;"> | 687 | <div class="pull-left" style="width: 110px;"> |
688 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 688 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
689 | </div> | 689 | </div> |
690 | <div class="pull-left" style="width: calc(100% - 110px);"> | 690 | <div class="pull-left" style="width: calc(100% - 110px);"> |
691 | <div style="width: 50%; float: left;"> | 691 | <div style="width: 50%; float: left;"> |
692 | Date | 692 | Date |
693 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 693 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
694 | </div> | 694 | </div> |
695 | <div style="width: 50%; float: left;"> | 695 | <div style="width: 50%; float: left;"> |
696 | Time | 696 | Time |
697 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 697 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
698 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 698 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
699 | </select> | 699 | </select> |
700 | 700 | ||
701 | </div> | 701 | </div> |
702 | </div> | 702 | </div> |
703 | <div class="clearfix"></div> | 703 | <div class="clearfix"></div> |
704 | </div> | 704 | </div> |
705 | 705 | ||
706 | <div class="col-md-6" style="margin-top: 22px;"> | 706 | <div class="col-md-6" style="margin-top: 22px;"> |
707 | <div class="pull-left" style="width: 110px;"> | 707 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Total</b></label> | 708 | <label class="new-input-label"><b>Total</b></label> |
709 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 709 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
710 | </div> | 710 | </div> |
711 | <div class="pull-left" style="width: calc(100% - 110px);"> | 711 | <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}}"> | 712 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
713 | </div> | 713 | </div> |
714 | </div> | 714 | </div> |
715 | </div> | 715 | </div> |
716 | <div class="clearfix"></div><br> | 716 | <div class="clearfix"></div><br> |
717 | 717 | ||
718 | |||
719 | <div class="col-xs-12"> | 718 | <div class="col-xs-12"> |
720 | 719 | ||
721 | <div class="col-md-6"> | 720 | <div class="col-md-6"> |
722 | <div class="pull-left" style="width: 110px;"> | 721 | <div class="pull-left" style="width: 110px;"> |
723 | <label class="new-input-label"><b>Fuel on</b></label> | 722 | <label class="new-input-label"><b>Fuel on</b></label> |
724 | </div> | 723 | </div> |
725 | <div class="pull-left" style="width: calc(100% - 110px);"> | 724 | <div class="pull-left" style="width: calc(100% - 110px);"> |
726 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 725 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
727 | <option value="" disabled selected hidden>Select...</option> | 726 | <option value="" disabled selected hidden>Select...</option> |
728 | <option value="Arrival">Arrival</option> | 727 | <option value="Arrival">Arrival</option> |
729 | <option value="Departure">Departure</option> | 728 | <option value="Departure">Departure</option> |
730 | </select> | 729 | </select> |
731 | </div> | 730 | </div> |
732 | <div class="clearfix"></div> | 731 | <div class="clearfix"></div> |
733 | </div> | 732 | </div> |
734 | 733 | ||
735 | <div class="col-md-6"> | 734 | <div class="col-md-6"> |
736 | <div class="pull-left" style="width: 110px;"> | 735 | <div class="pull-left" style="width: 110px;"> |
737 | <label class="new-input-label"><b>FBO Cost</b></label> | 736 | <label class="new-input-label"><b>FBO Cost</b></label> |
738 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 737 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
739 | </div> | 738 | </div> |
740 | <div class="pull-left" style="width: calc(100% - 110px);"> | 739 | <div class="pull-left" style="width: calc(100% - 110px);"> |
741 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> | 740 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> |
742 | </div> | 741 | </div> |
743 | <div class="clearfix"></div> | 742 | <div class="clearfix"></div> |
744 | </div> | 743 | </div> |
745 | </div> | 744 | </div> |
746 | <div class="clearfix"></div><br> | 745 | <div class="clearfix"></div><br> |
747 | 746 | ||
748 | <div class="col-xs-12"> | 747 | <div class="col-xs-12"> |
749 | <div class="col-md-6"> | 748 | <div class="col-md-6"> |
750 | <div class="pull-left" style="width: 110px;"> | 749 | <div class="pull-left" style="width: 110px;"> |
751 | <label class="new-input-label"><b>Source</b></label> | 750 | <label class="new-input-label"><b>Source</b></label> |
752 | </div> | 751 | </div> |
753 | <div class="pull-left" style="width: calc(100% - 110px);"> | 752 | <div class="pull-left" style="width: calc(100% - 110px);"> |
754 | <select class="form-control" ng-model="order.source" style="width: 100%;"> | 753 | <div style="font-weight: normal;" ng-if="baseTenant">Tenant/Base Customer</br></div> |
754 | <div style="font-weight: normal;" ng-if="contractFuelVendor">CAA Member</div> | ||
755 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | ||
755 | <option value="" disabled selected hidden>Select Source</option> | 756 | <option value="" disabled selected hidden>Select Source</option> |
756 | <option value="Tenant">Tenant</option> | 757 | <option value="Tenant">Tenant</option> |
757 | <option value="CAA">CAA</option> | 758 | <option value="CAA">CAA</option> |
758 | <option value="Tenant/CAA">Tenant/CAA</option> | 759 | <option value="Tenant/CAA">Tenant/CAA</option> |
759 | </select> | 760 | </select> --> |
760 | </div> | 761 | </div> |
761 | <div class="clearfix"></div> | 762 | <div class="clearfix"></div> |
762 | </div> | 763 | </div> |
763 | </div> | 764 | </div> |
764 | <div class="clearfix"></div> | 765 | <div class="clearfix"></div> |
765 | <br/> | 766 | <br/> |
766 | <div class="col-xs-12"> | 767 | <div class="col-xs-12"> |
767 | 768 | ||
768 | 769 | ||
769 | <div class="col-md-6"> | 770 | <div class="col-md-6"> |
770 | <div class="pull-left" style="width: 110px;"> | 771 | <div class="pull-left" style="width: 110px;"> |
771 | <label class="new-input-label"><b>Certificate Type</b></label> | 772 | <label class="new-input-label"><b>Certificate Type</b></label> |
772 | </div> | 773 | </div> |
773 | <div class="pull-left" style="width: calc(100% - 110px);"> | 774 | <div class="pull-left" style="width: calc(100% - 110px);"> |
774 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 775 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
775 | <option value="" disabled selected hidden>Select...</option> | 776 | <option value="" disabled selected hidden>Select...</option> |
776 | <option value="corporate">Part 91 (Corporate)</option> | 777 | <option value="corporate">Part 91 (Corporate)</option> |
777 | <option value="charter">Part 135 (Charter)</option> | 778 | <option value="charter">Part 135 (Charter)</option> |
778 | <option value="scheduled">Part 121 (Scheduled)</option> | 779 | <option value="scheduled">Part 121 (Scheduled)</option> |
779 | <option value="military">Military</option> | 780 | <option value="military">Military</option> |
780 | <option value="government">Government</option> | 781 | <option value="government">Government</option> |
781 | </select> | 782 | </select> |
782 | </div> | 783 | </div> |
783 | <div class="clearfix"></div> | 784 | <div class="clearfix"></div> |
784 | </div> | 785 | </div> |
785 | <div class="col-md-6"> | 786 | <div class="col-md-6"> |
786 | <div class="pull-left" style="width: 110px;"> | 787 | <div class="pull-left" style="width: 110px;"> |
787 | <label class="new-input-label"><b>Status</b></label> | 788 | <label class="new-input-label"><b>Status</b></label> |
788 | </div> | 789 | </div> |
789 | <div class="pull-left" style="width: calc(100% - 110px);"> | 790 | <div class="pull-left" style="width: calc(100% - 110px);"> |
790 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 791 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
791 | <option value="" disabled selected hidden>pending</option> | 792 | <option value="" disabled selected hidden>pending</option> |
792 | <option value="pending">pending</option> | 793 | <option value="pending">pending</option> |
793 | <option value="invoiced">invoiced</option> | 794 | <option value="invoiced">invoiced</option> |
794 | <option value="paid">paid</option> | 795 | <option value="paid">paid</option> |
795 | <!-- <option value="cancelled">cancelled</option> | 796 | <!-- <option value="cancelled">cancelled</option> |
796 | <option value="archived">archived</option> --> | 797 | <option value="archived">archived</option> --> |
797 | </select> | 798 | </select> |
798 | </div> | 799 | </div> |
799 | <div class="clearfix"></div> | 800 | <div class="clearfix"></div> |
800 | </div> | 801 | </div> |
801 | </div> | 802 | </div> |
802 | <div class="clearfix"></div><br> | 803 | <div class="clearfix"></div><br> |
803 | 804 | ||
804 | </div> | 805 | </div> |
805 | </div> | 806 | </div> |
806 | </div> | 807 | </div> |
807 | </div> | 808 | </div> |
808 | </div> | 809 | </div> |
809 | </div> | 810 | </div> |
810 | <div class="modal-footer" style="border-top: 0;"> | 811 | <div class="modal-footer" style="border-top: 0;"> |
811 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 812 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
812 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> | 813 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> |
813 | </div> | 814 | </div> |
814 | </div> | 815 | </div> |
815 | </div> | 816 | </div> |
816 | </div> | 817 | </div> |
817 | </form> | 818 | </form> |
818 | 819 | ||
819 | 820 | ||
820 | <div class="myLoader" ng-show="showLoader"> | 821 | <div class="myLoader" ng-show="showLoader"> |
821 | <img src="../img/hourglass.gif" width="50px;"> | 822 | <img src="../img/hourglass.gif" width="50px;"> |
822 | </div> | 823 | </div> |
823 | <script src="js/multi-step-modal.js"></script> | 824 | <script src="js/multi-step-modal.js"></script> |
824 | <script> | 825 | <script> |
825 | sendEvent = function(sel, step) { | 826 | sendEvent = function(sel, step) { |
826 | $(sel).trigger('next.m.' + step); | 827 | $(sel).trigger('next.m.' + step); |
827 | } | 828 | } |
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 | }) | 16 | }) |
16 | 17 | ||
17 | $scope.order = {}; | 18 | $scope.order = {}; |
18 | $scope.dispatchOrder = {}; | 19 | $scope.dispatchOrder = {}; |
19 | $scope.dispatchOrder.fuelOrderList = []; | 20 | $scope.dispatchOrder.fuelOrderList = []; |
20 | $scope.order.upliftDate = ''; | 21 | $scope.order.upliftDate = ''; |
21 | //$scope.order.departingDate = ''; | 22 | //$scope.order.departingDate = ''; |
22 | $scope.selectedCompanyName = ''; | 23 | $scope.selectedCompanyName = ''; |
23 | $scope.selectedCompanyId = ''; | 24 | $scope.selectedCompanyId = ''; |
24 | $scope.marginId = ''; | 25 | $scope.marginId = ''; |
25 | $scope.selectedTier = ''; | 26 | $scope.selectedTier = ''; |
26 | 27 | ||
27 | $scope.getAircraft = function(company){ | 28 | $scope.getAircraft = function(company){ |
28 | $scope.selectedCompanyName = company; | 29 | $scope.selectedCompanyName = company; |
30 | |||
29 | 31 | ||
30 | $scope.showLoader = true; | 32 | $scope.showLoader = true; |
31 | for (var i = 0; i < $scope.companyList.length; i++) { | 33 | for (var i = 0; i < $scope.companyList.length; i++) { |
32 | if ($scope.companyList[i].companyName == company) { | 34 | if ($scope.companyList[i].companyName == company) { |
35 | $scope.order.certificateType = $scope.companyList[i].certificateType; | ||
36 | $scope.baseTenant = $scope.companyList[i].baseTenant; | ||
37 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; | ||
38 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; | ||
39 | |||
33 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ | 40 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ |
34 | enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 41 | enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
35 | $scope.marginList = margins; | 42 | $scope.marginList = margins; |
36 | }) | 43 | }) |
37 | } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) { | 44 | } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) { |
38 | enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 45 | enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
39 | $scope.marginList = margins; | 46 | $scope.marginList = margins; |
40 | }) | 47 | }) |
41 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) { | 48 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) { |
42 | enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 49 | enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
43 | $scope.marginList = margins; | 50 | $scope.marginList = margins; |
44 | }) | 51 | }) |
45 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) { | 52 | } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) { |
46 | enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) { | 53 | enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) { |
47 | $scope.marginList = margins; | 54 | $scope.marginList = margins; |
48 | }) | 55 | }) |
49 | } | 56 | } |
50 | $scope.selectedCompanyId = $scope.companyList[i].id; | 57 | $scope.selectedCompanyId = $scope.companyList[i].id; |
51 | 58 | ||
52 | if ($scope.selectedCompanyId != '') { | 59 | if ($scope.selectedCompanyId != '') { |
53 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 60 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
54 | $scope.aircraftList = aircraft; | 61 | $scope.aircraftList = aircraft; |
55 | }) | 62 | }) |
56 | } | 63 | } |
57 | if($scope.companyList[i].margin == null) { | 64 | if($scope.companyList[i].margin == null) { |
58 | $scope.tierList = []; | 65 | $scope.tierList = []; |
59 | $scope.tierList.push({ | 66 | $scope.tierList.push({ |
60 | 'minTierBreak': '0', 'maxTierBreak': 'โ' | 67 | 'minTierBreak': '0', 'maxTierBreak': 'โ' |
61 | }); | 68 | }); |
62 | $scope.showLoader = false; | 69 | $scope.showLoader = false; |
63 | } else { | 70 | } else { |
64 | $scope.marginId = $scope.companyList[i].margin.id; | 71 | $scope.marginId = $scope.companyList[i].margin.id; |
65 | if ($scope.marginId != '') { | 72 | if ($scope.marginId != '') { |
66 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { | 73 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { |
67 | $scope.tierList = tiers; | 74 | $scope.tierList = tiers; |
68 | $scope.showLoader = false; | 75 | $scope.showLoader = false; |
69 | $scope.selectedTier = $scope.tierList[0]; | 76 | $scope.selectedTier = $scope.tierList[0]; |
70 | }) | 77 | }) |
71 | }else{ | 78 | }else{ |
72 | $scope.showLoader = false; | 79 | $scope.showLoader = false; |
73 | } | 80 | } |
74 | } | 81 | } |
75 | } | 82 | } |
76 | } | 83 | } |
77 | 84 | ||
78 | } | 85 | } |
79 | 86 | ||
80 | $scope.tiervalue=function(){ | 87 | $scope.tiervalue=function(){ |
81 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 88 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
82 | } | 89 | } |
83 | 90 | ||
84 | 91 | ||
85 | 92 | ||
86 | 93 | ||
87 | $scope.cancelOrder = function() { | 94 | $scope.cancelOrder = function() { |
88 | $scope.order = {}; | 95 | $scope.order = {}; |
89 | } | 96 | } |
90 | 97 | ||
91 | 98 | ||
92 | $scope.setCost = function(cost){ | 99 | $scope.setCost = function(cost){ |
93 | if(cost != null) { | 100 | if(cost != null) { |
94 | var obj =JSON.parse(cost); | 101 | var obj =JSON.parse(cost); |
95 | $scope.order.fboCost = obj.cost; | 102 | $scope.order.fboCost = obj.cost; |
96 | } | 103 | } |
97 | } | 104 | } |
98 | 105 | ||
99 | /*$scope.addTotal = function(value, valueOf){ | 106 | /*$scope.addTotal = function(value, valueOf){ |
100 | if(valueOf == 'v'){ | 107 | if(valueOf == 'v'){ |
101 | $scope.order.total = value * $scope.order.invoiced | 108 | $scope.order.total = value * $scope.order.invoiced |
102 | }else if(valueOf == 'i'){ | 109 | }else if(valueOf == 'i'){ |
103 | $scope.order.total = $scope.order.volume * value | 110 | $scope.order.total = $scope.order.volume * value |
104 | } | 111 | } |
105 | } */ | 112 | } */ |
106 | $scope.addTotal = function(value, valueOf) { | 113 | $scope.addTotal = function(value, valueOf) { |
107 | if (value != undefined && valueOf != undefined) { | 114 | if (value != undefined && valueOf != undefined) { |
108 | value = JSON.parse(value) | 115 | value = JSON.parse(value) |
109 | $scope.order.total = value.cost * valueOf; | 116 | $scope.order.total = value.cost * valueOf; |
110 | } | 117 | } |
111 | } | 118 | } |
112 | 119 | ||
113 | $scope.dispatchFuel = function(){ | 120 | $scope.dispatchFuel = function(){ |
114 | $scope.showLoader = true; | 121 | $scope.showLoader = true; |
122 | |||
115 | $scope.order.companyId = $scope.selectedCompanyId; | 123 | $scope.order.companyId = $scope.selectedCompanyId; |
116 | $scope.order.companyName = $scope.order.companyName; | 124 | $scope.order.companyName = $scope.order.companyName; |
117 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 125 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
118 | $scope.order.aircraftName = aircraftObj.tail; | 126 | $scope.order.aircraftName = aircraftObj.tail; |
119 | $scope.order.make = aircraftObj.make; | 127 | $scope.order.make = aircraftObj.make; |
120 | $scope.order.model = aircraftObj.model; | 128 | $scope.order.model = aircraftObj.model; |
121 | $scope.order.fuelOn = $scope.order.fuelOn; | 129 | $scope.order.fuelOn = $scope.order.fuelOn; |
122 | 130 | ||
123 | $scope.order.invoiced = $scope.order.invoiced; | 131 | $scope.order.invoiced = $scope.order.invoiced; |
124 | $scope.order.volume = $scope.order.volume; | 132 | $scope.order.volume = $scope.order.volume; |
125 | $scope.order.source = $scope.order.source; | 133 | // $scope.order.source = $scope.order.source; |
126 | 134 | ||
127 | $scope.order.total = $scope.order.total; | 135 | $scope.order.total = $scope.order.total; |
128 | 136 | ||
129 | var obj =JSON.parse($scope.order.priceQuote); | 137 | var obj =JSON.parse($scope.order.priceQuote); |
130 | $scope.order.priceQuote = obj.papTotal; | 138 | $scope.order.priceQuote = obj.papTotal; |
131 | $scope.order.fboCost = obj.cost; | 139 | $scope.order.fboCost = obj.cost; |
132 | $scope.order.productName = obj.productName; | 140 | $scope.order.productName = obj.productName; |
133 | 141 | ||
134 | $scope.order.etaTime = $scope.order.etaTime; | 142 | $scope.order.etaTime = $scope.order.etaTime; |
135 | $scope.order.etdTime = $scope.order.etdTime; | 143 | $scope.order.etdTime = $scope.order.etdTime; |
136 | $scope.order.certificateType = $scope.order.certificateType; | 144 | $scope.order.certificateType = $scope.order.certificateType; |
137 | var currentDate = new Date(); | 145 | var currentDate = new Date(); |
138 | var hours = currentDate.getHours(); | 146 | var hours = currentDate.getHours(); |
139 | var min = currentDate.getMinutes(); | 147 | var min = currentDate.getMinutes(); |
140 | var sec = currentDate.getSeconds(); | 148 | var sec = currentDate.getSeconds(); |
141 | if ($scope.order.upliftDate != '') { | 149 | if ($scope.order.upliftDate != '') { |
142 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 150 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
143 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 151 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
144 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 152 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
145 | } | 153 | } |
146 | 154 | ||
147 | 155 | ||
148 | if ($scope.order.departingDate != '') { | 156 | if ($scope.order.departingDate != '') { |
149 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 157 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
150 | $scope.order.departingDate = new Date($scope.order.departingDate); | 158 | $scope.order.departingDate = new Date($scope.order.departingDate); |
151 | $scope.order.departingDate = $scope.order.departingDate.getTime(); | 159 | $scope.order.departingDate = $scope.order.departingDate.getTime(); |
152 | } | 160 | } |
153 | 161 | ||
154 | if($scope.order.status === null || $scope.order.status === undefined){ | 162 | if($scope.order.status === null || $scope.order.status === undefined){ |
155 | 163 | ||
156 | $scope.order.status = "pending"; //default status | 164 | $scope.order.status = "pending"; //default status |
157 | 165 | ||
158 | }else { | 166 | }else { |
159 | 167 | ||
160 | $scope.order.status = $scope.order.status; | 168 | $scope.order.status = $scope.order.status; |
161 | } | 169 | } |
170 | |||
171 | if($scope.baseTenant && $scope.contractFuelVendor ){ | ||
172 | $scope.order.source = "Tenant/Base Customer CAA Member" ; | ||
173 | }else if($scope.baseTenant) | ||
174 | { | ||
175 | $scope.order.source = "Tenant/Base Customer"; | ||
176 | }else if($scope.contractFuelVendor){ | ||
177 | $scope.order.source = "CAA Member"; | ||
178 | } | ||
179 | |||
162 | //console.log("===order====",$scope.order); | 180 | //console.log("===order====",$scope.order); |
163 | 181 | ||
164 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 182 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
165 | 183 | ||
166 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 184 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
167 | $scope.showLoader = false; | 185 | $scope.showLoader = false; |
168 | $scope.order = {}; | 186 | $scope.order = {}; |
169 | toastr.success('Fuel Order Created Successfully', { | 187 | toastr.success('Fuel Order Created Successfully', { |
170 | closeButton: true | 188 | closeButton: true |
171 | }) | 189 | }) |
172 | }) | 190 | }) |
173 | } | 191 | } |
174 | 192 | ||
175 | 193 | ||
176 | $scope.etaTimeList=[]; | 194 | $scope.etaTimeList=[]; |
177 | $scope.etdTimeList =[]; | 195 | $scope.etdTimeList =[]; |
178 | 196 | ||
179 | $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"}, | 197 | $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"}, |
180 | {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"}, | 198 | {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"}, |
181 | {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"}, | 199 | {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"}, |
182 | {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"}, | 200 | {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"}, |
183 | {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"}, | 201 | {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"}, |
184 | {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"},]; | 202 | {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"},]; |
185 | 203 | ||
186 | $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"}, | 204 | $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"}, |
187 | {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"}, | 205 | {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"}, |
188 | {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"}, | 206 | {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"}, |
189 | {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"}, | 207 | {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"}, |
190 | {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"}, | 208 | {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"}, |
191 | {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"},]; | 209 | {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"},]; |
192 | 210 | ||
193 | } | 211 | } |
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 ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 36 | <select ui-select2 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" 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" value="{{list}}">{{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>Volume</b></label> | 77 | <label class="new-input-label"><b>Volume</b></label> |
78 | </div> | 78 | </div> |
79 | <div class="pull-left" style="width: calc(100% - 110px);"> | 79 | <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> | 80 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
81 | </div> | 81 | </div> |
82 | <div class="clearfix"></div> | 82 | <div class="clearfix"></div> |
83 | </div> | 83 | </div> |
84 | 84 | ||
85 | </div> | 85 | </div> |
86 | <div class="clearfix"></div> | 86 | <div class="clearfix"></div> |
87 | <br/> | 87 | <br/> |
88 | 88 | ||
89 | <div class="col-xs-12"> | 89 | <div class="col-xs-12"> |
90 | 90 | ||
91 | <div class="col-md-6"> | 91 | <div class="col-md-6"> |
92 | <div class="pull-left" style="width: 110px;"> | 92 | <div class="pull-left" style="width: 110px;"> |
93 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 93 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
94 | </div> | 94 | </div> |
95 | <div class="pull-left" style="width: calc(100% - 110px);"> | 95 | <div class="pull-left" style="width: calc(100% - 110px);"> |
96 | <div style="width: 50%; float: left;"> | 96 | <div style="width: 50%; float: left;"> |
97 | Date | 97 | Date |
98 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 98 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
99 | </div> | 99 | </div> |
100 | <div style="width: 50%; float: left;"> | 100 | <div style="width: 50%; float: left;"> |
101 | Time | 101 | Time |
102 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 102 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
103 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 103 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
104 | </select> | 104 | </select> |
105 | 105 | ||
106 | </div> | 106 | </div> |
107 | </div> | 107 | </div> |
108 | <div class="clearfix"></div> | 108 | <div class="clearfix"></div> |
109 | </div> | 109 | </div> |
110 | 110 | ||
111 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 111 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
112 | <div class="pull-left" style="width: 110px;"> | 112 | <div class="pull-left" style="width: 110px;"> |
113 | <label class="new-input-label"><b>Invoiced</b></label> | 113 | <label class="new-input-label"><b>Invoiced</b></label> |
114 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 114 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
115 | </div> | 115 | </div> |
116 | <div class="pull-left" style="width: calc(100% - 110px);"> | 116 | <div class="pull-left" style="width: calc(100% - 110px);"> |
117 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 117 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
118 | </div> | 118 | </div> |
119 | <div class="clearfix"></div> | 119 | <div class="clearfix"></div> |
120 | </div> | 120 | </div> |
121 | </div> | 121 | </div> |
122 | <div class="clearfix"></div><br> | 122 | <div class="clearfix"></div><br> |
123 | 123 | ||
124 | 124 | ||
125 | <div class="col-xs-12"> | 125 | <div class="col-xs-12"> |
126 | 126 | ||
127 | <div class="col-md-6"> | 127 | <div class="col-md-6"> |
128 | <div class="pull-left" style="width: 110px;"> | 128 | <div class="pull-left" style="width: 110px;"> |
129 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 129 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
130 | </div> | 130 | </div> |
131 | <div class="pull-left" style="width: calc(100% - 110px);"> | 131 | <div class="pull-left" style="width: calc(100% - 110px);"> |
132 | <div style="width: 50%; float: left;"> | 132 | <div style="width: 50%; float: left;"> |
133 | Date | 133 | Date |
134 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 134 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
135 | </div> | 135 | </div> |
136 | <div style="width: 50%; float: left;"> | 136 | <div style="width: 50%; float: left;"> |
137 | Time | 137 | Time |
138 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 138 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
139 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 139 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
140 | </select> | 140 | </select> |
141 | </div> | 141 | </div> |
142 | </div> | 142 | </div> |
143 | <div class="clearfix"></div> | 143 | <div class="clearfix"></div> |
144 | </div> | 144 | </div> |
145 | 145 | ||
146 | <div class="col-md-6" style="margin-top: 22px;"> | 146 | <div class="col-md-6" style="margin-top: 22px;"> |
147 | <div class="pull-left" style="width: 110px;"> | 147 | <div class="pull-left" style="width: 110px;"> |
148 | <label class="new-input-label"><b>Total</b></label> | 148 | <label class="new-input-label"><b>Total</b></label> |
149 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 149 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
150 | </div> | 150 | </div> |
151 | <div class="pull-left" style="width: calc(100% - 110px);"> | 151 | <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}}"> | 152 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
153 | </div> | 153 | </div> |
154 | </div> | 154 | </div> |
155 | </div> | 155 | </div> |
156 | <div class="clearfix"></div><br> | 156 | <div class="clearfix"></div><br> |
157 | 157 | ||
158 | 158 | ||
159 | <div class="col-xs-12"> | 159 | <div class="col-xs-12"> |
160 | 160 | ||
161 | <div class="col-md-6"> | 161 | <div class="col-md-6"> |
162 | <div class="pull-left" style="width: 110px;"> | 162 | <div class="pull-left" style="width: 110px;"> |
163 | <label class="new-input-label"><b>Fuel on</b></label> | 163 | <label class="new-input-label"><b>Fuel on</b></label> |
164 | </div> | 164 | </div> |
165 | <div class="pull-left" style="width: calc(100% - 110px);"> | 165 | <div class="pull-left" style="width: calc(100% - 110px);"> |
166 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 166 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
167 | <option value="" disabled selected hidden>Select...</option> | 167 | <option value="" disabled selected hidden>Select...</option> |
168 | <option value="Arrival">Arrival</option> | 168 | <option value="Arrival">Arrival</option> |
169 | <option value="Departure">Departure</option> | 169 | <option value="Departure">Departure</option> |
170 | </select> | 170 | </select> |
171 | </div> | 171 | </div> |
172 | <div class="clearfix"></div> | 172 | <div class="clearfix"></div> |
173 | </div> | 173 | </div> |
174 | 174 | ||
175 | <div class="col-md-6"> | 175 | <div class="col-md-6"> |
176 | <div class="pull-left" style="width: 110px;"> | 176 | <div class="pull-left" style="width: 110px;"> |
177 | <label class="new-input-label"><b>FBO Cost</b></label> | 177 | <label class="new-input-label"><b>FBO Cost</b></label> |
178 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 178 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
179 | </div> | 179 | </div> |
180 | <div class="pull-left" style="width: calc(100% - 110px);"> | 180 | <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 /> | 181 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
182 | </div> | 182 | </div> |
183 | <div class="clearfix"></div> | 183 | <div class="clearfix"></div> |
184 | </div> | 184 | </div> |
185 | </div> | 185 | </div> |
186 | <div class="clearfix"></div><br> | 186 | <div class="clearfix"></div><br> |
187 | 187 | ||
188 | <div class="col-xs-12"> | 188 | <div class="col-xs-12"> |
189 | <div class="col-md-6"> | 189 | <div class="col-md-6"> |
190 | <div class="pull-left" style="width: 110px;"> | 190 | <div class="pull-left" style="width: 110px;"> |
191 | <label class="new-input-label"><b>Source</b></label> | 191 | <label class="new-input-label"><b>Source</b></label> |
192 | </div> | 192 | </div> |
193 | <div class="pull-left" style="width: calc(100% - 110px);"> | 193 | <div class="pull-left" style="width: calc(100% - 110px);"> |
194 | <select class="form-control" ng-model="order.source" style="width: 100%;"> | 194 | <div style="font-weight: normal;" ng-if="baseTenant">Tenant/Base Customer</br></div> |
195 | <div style="font-weight: normal;" ng-if="contractFuelVendor">CAA Member</div> | ||
196 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | ||
195 | <option value="" disabled selected hidden>Select Source</option> | 197 | <option value="" disabled selected hidden>Select Source</option> |
196 | <option value="Tenant">Tenant</option> | 198 | <option value="Tenant">Tenant</option> |
197 | <option value="CAA">CAA</option> | 199 | <option value="CAA">CAA</option> |
198 | <option value="Tenant/CAA">Tenant/CAA</option> | 200 | <option value="Tenant/CAA">Tenant/CAA</option> |
199 | </select> | 201 | </select> --> |
200 | </div> | 202 | </div> |
201 | <div class="clearfix"></div> | 203 | <div class="clearfix"></div> |
202 | </div> | 204 | </div> |
203 | </div> | 205 | </div> |
204 | <div class="clearfix"></div> | 206 | <div class="clearfix"></div> |
205 | <br/> | 207 | <br/> |
206 | <div class="col-xs-12"> | 208 | <div class="col-xs-12"> |
207 | 209 | ||
208 | 210 | ||
209 | <div class="col-md-6"> | 211 | <div class="col-md-6"> |
210 | <div class="pull-left" style="width: 110px;"> | 212 | <div class="pull-left" style="width: 110px;"> |
211 | <label class="new-input-label"><b>Certificate Type</b></label> | 213 | <label class="new-input-label"><b>Certificate Type</b></label> |
212 | </div> | 214 | </div> |
213 | <div class="pull-left" style="width: calc(100% - 110px);"> | 215 | <div class="pull-left" style="width: calc(100% - 110px);"> |
214 | <select class="form-control" ng-model="order.certificateType" style="width: 100%;"> | 216 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
215 | <option value="" disabled selected hidden>Select...</option> | 217 | <option value="" disabled selected hidden>Select...</option> |
216 | <option value="corporate">Part 91 (Corporate)</option> | 218 | <option value="corporate">Part 91 (Corporate)</option> |
217 | <option value="charter">Part 135 (Charter)</option> | 219 | <option value="charter">Part 135 (Charter)</option> |
218 | <option value="scheduled">Part 121 (Scheduled)</option> | 220 | <option value="scheduled">Part 121 (Scheduled)</option> |
219 | <option value="military">Military</option> | 221 | <option value="military">Military</option> |
220 | <option value="government">Government</option> | 222 | <option value="government">Government</option> |
221 | </select> | 223 | </select> |
222 | </div> | 224 | </div> |
223 | <div class="clearfix"></div> | 225 | <div class="clearfix"></div> |
224 | </div> | 226 | </div> |
225 | <div class="col-md-6"> | 227 | <div class="col-md-6"> |
226 | <div class="pull-left" style="width: 110px;"> | 228 | <div class="pull-left" style="width: 110px;"> |
227 | <label class="new-input-label"><b>Status</b></label> | 229 | <label class="new-input-label"><b>Status</b></label> |
228 | </div> | 230 | </div> |
229 | <div class="pull-left" style="width: calc(100% - 110px);"> | 231 | <div class="pull-left" style="width: calc(100% - 110px);"> |
230 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 232 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
231 | <option value="" selected disabled hidden>pending</option> | 233 | <option value="" selected disabled hidden>pending</option> |
232 | <option value="pending">pending</option> | 234 | <option value="pending">pending</option> |
233 | <option value="invoiced">invoiced</option> | 235 | <option value="invoiced">invoiced</option> |
234 | <option value="paid">paid</option> | 236 | <option value="paid">paid</option> |
235 | <!-- <option value="cancelled">cancelled</option> | 237 | <!-- <option value="cancelled">cancelled</option> |
236 | <option value="archived">archived</option> --> | 238 | <option value="archived">archived</option> --> |
237 | </select> | 239 | </select> |
238 | </div> | 240 | </div> |
239 | <div class="clearfix"></div> | 241 | <div class="clearfix"></div> |
240 | </div> | 242 | </div> |
241 | </div> | 243 | </div> |
242 | <div class="clearfix"></div><br> | 244 | <div class="clearfix"></div><br> |
243 | 245 | ||
244 | <div class="customInputWrap text-right"> | 246 | <div class="customInputWrap text-right"> |
245 | <div class="col-xs-12"> | 247 | <div class="col-xs-12"> |
246 | <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;"> | 248 | <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;"> |
247 | <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid"> | 249 | <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid"> |
248 | </div> | 250 | </div> |
249 | <div class="clearfix"></div> | 251 | <div class="clearfix"></div> |
250 | </div> | 252 | </div> |
251 | 253 | ||
252 | </form> | 254 | </form> |
253 | </div> | 255 | </div> |
254 | </div> | 256 | </div> |
255 | </div> | 257 | </div> |
256 | </div> | 258 | </div> |
257 | </div> | 259 | </div> |
258 | 260 |
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','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); | 5 | .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); |
6 | 6 | ||
7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService,CustomersService,ViewCompanyService) { | 7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,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 | 23 | ||
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 | getAllCompanies(); | 41 | getAllCompanies(); |
42 | 42 | ||
43 | function getAllCompanies(){ | 43 | function getAllCompanies(){ |
44 | fuelOrdersService.getAllCompanies().then(function(result) { | 44 | fuelOrdersService.getAllCompanies().then(function(result) { |
45 | $scope.companyList = result; | 45 | $scope.companyList = result; |
46 | for (var i = 0; i < $scope.companyList.length; i++) { | 46 | for (var i = 0; i < $scope.companyList.length; i++) { |
47 | if ($scope.companyList[i].companyContact != null) { | 47 | if ($scope.companyList[i].companyContact != null) { |
48 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 48 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
49 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 49 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | if ($scope.companyList[i].primaryContact != null) { | 52 | if ($scope.companyList[i].primaryContact != null) { |
53 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 53 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
54 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 54 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | if ($scope.companyList[i].margin != null) { | 57 | if ($scope.companyList[i].margin != null) { |
58 | if ($scope.companyList[i].margin.marginName != null) { | 58 | if ($scope.companyList[i].margin.marginName != null) { |
59 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 59 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | } | 62 | } |
63 | $scope.displayCompanyList = new NgTableParams({ | 63 | $scope.displayCompanyList = new NgTableParams({ |
64 | page: 1, | 64 | page: 1, |
65 | count: 10, | 65 | count: 10, |
66 | }, { | 66 | }, { |
67 | data: $scope.companyList | 67 | data: $scope.companyList |
68 | }); | 68 | }); |
69 | $scope.showLoader = false; | 69 | $scope.showLoader = false; |
70 | }) | 70 | }) |
71 | } | 71 | } |
72 | 72 | ||
73 | 73 | ||
74 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | 74 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) |
75 | $scope.reset2 = function(){ | 75 | $scope.reset2 = function(){ |
76 | $("input").val(""); | 76 | $("input").val(""); |
77 | $scope.removeMarginValidation(); | 77 | $scope.removeMarginValidation(); |
78 | } | 78 | } |
79 | 79 | ||
80 | function colourFunction() { | 80 | function colourFunction() { |
81 | var myselect = document.getElementById('colorfulSelectbox'), | 81 | var myselect = document.getElementById('colorfulSelectbox'), |
82 | colour = myselect.options[myselect.selectedIndex].className; | 82 | colour = myselect.options[myselect.selectedIndex].className; |
83 | myselect.style.background = colour; | 83 | myselect.style.background = colour; |
84 | myselect.blur(); | 84 | myselect.blur(); |
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||
88 | /*setInterval(function(){ | 88 | /*setInterval(function(){ |
89 | colourFunction(); | 89 | colourFunction(); |
90 | }, 1)*/ | 90 | }, 1)*/ |
91 | 91 | ||
92 | 92 | ||
93 | $scope.attachmentFilterOptions = []; | 93 | $scope.attachmentFilterOptions = []; |
94 | $scope.attachmentFilterOptions.push({ | 94 | $scope.attachmentFilterOptions.push({ |
95 | 'id': '', 'title': 'Show All' | 95 | 'id': '', 'title': 'Show All' |
96 | },{ | 96 | },{ |
97 | 'id': '!null', 'title': 'Attachments' | 97 | 'id': '!null', 'title': 'Attachments' |
98 | },{ | 98 | },{ |
99 | 'id': 'null', 'title': 'No Attachments' | 99 | 'id': 'null', 'title': 'No Attachments' |
100 | } | 100 | } |
101 | ); | 101 | ); |
102 | 102 | ||
103 | // $(document).ready(function() { | 103 | // $(document).ready(function() { |
104 | // $scope.showLoader = true; | 104 | // $scope.showLoader = true; |
105 | // $('#example').DataTable(); | 105 | // $('#example').DataTable(); |
106 | // $scope.showLoader = false; | 106 | // $scope.showLoader = false; |
107 | // }); | 107 | // }); |
108 | 108 | ||
109 | $scope.getOrders = function() { | 109 | $scope.getOrders = function() { |
110 | fuelOrdersService.getOrders().then(function(result) { | 110 | fuelOrdersService.getOrders().then(function(result) { |
111 | $scope.orderdata = result; | 111 | $scope.orderdata = result; |
112 | for(var i=0 ; i < $scope.orderdata.length ; i++){ | 112 | for(var i=0 ; i < $scope.orderdata.length ; i++){ |
113 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 113 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
114 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); | 114 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); |
115 | 115 | ||
116 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); | 116 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); |
117 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); | 117 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); |
118 | $scope.orderdata[i].upliftDateString = str; | 118 | $scope.orderdata[i].upliftDateString = str; |
119 | $scope.orderdata[i].departingDateString = departingStr; | 119 | $scope.orderdata[i].departingDateString = departingStr; |
120 | //not working in input type Time | 120 | //not working in input type Time |
121 | /*if ($scope.orderdata[i].etaTime != null) { | 121 | /*if ($scope.orderdata[i].etaTime != null) { |
122 | var now = new Date(); | 122 | var now = new Date(); |
123 | 123 | ||
124 | var hr = $scope.orderdata[i].etaTime.slice(0, 2); | 124 | var hr = $scope.orderdata[i].etaTime.slice(0, 2); |
125 | var mm = $scope.orderdata[i].etaTime.slice(3, 5); | 125 | var mm = $scope.orderdata[i].etaTime.slice(3, 5); |
126 | now.setHours(hr); | 126 | now.setHours(hr); |
127 | now.setMinutes(mm); | 127 | now.setMinutes(mm); |
128 | $scope.orderdata[i].etaTime = now; | 128 | $scope.orderdata[i].etaTime = now; |
129 | console.log("===eta====", now, hr, mm); | 129 | console.log("===eta====", now, hr, mm); |
130 | }*/ | 130 | }*/ |
131 | 131 | ||
132 | } | 132 | } |
133 | 133 | ||
134 | $scope.displayFuelOrderList = new NgTableParams({ | 134 | $scope.displayFuelOrderList = new NgTableParams({ |
135 | page: 1, | 135 | page: 1, |
136 | count: 10, | 136 | count: 10, |
137 | }, { | 137 | }, { |
138 | data: $scope.orderdata | 138 | data: $scope.orderdata |
139 | }); | 139 | }); |
140 | $(document).ready(function(){ | 140 | $(document).ready(function(){ |
141 | function changeSelectboxBg(){ | 141 | function changeSelectboxBg(){ |
142 | setInterval(function(){ | 142 | setInterval(function(){ |
143 | if ($('.table select').is(':focus')) { | 143 | if ($('.table select').is(':focus')) { |
144 | 144 | ||
145 | }else{ | 145 | }else{ |
146 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 146 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
147 | 147 | ||
148 | for (var i = 0; i < myselect.length; i++) { | 148 | for (var i = 0; i < myselect.length; i++) { |
149 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 149 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
150 | colourIndex = colourIndex + 1; | 150 | colourIndex = colourIndex + 1; |
151 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); | 151 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); |
152 | $(myselect[i]).css('background-color', getColor); | 152 | $(myselect[i]).css('background-color', getColor); |
153 | myselect[i].blur(); | 153 | myselect[i].blur(); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | }, 1000) | 156 | }, 1000) |
157 | } | 157 | } |
158 | changeSelectboxBg(); | 158 | changeSelectboxBg(); |
159 | 159 | ||
160 | /*$('.pagination , .recordCountSelect').click(function(){ | 160 | /*$('.pagination , .recordCountSelect').click(function(){ |
161 | changeSelectboxBg(); | 161 | changeSelectboxBg(); |
162 | }) | 162 | }) |
163 | $('.input-filter').keydown(function(){ | 163 | $('.input-filter').keydown(function(){ |
164 | console.log('function..........'); | 164 | console.log('function..........'); |
165 | changeSelectboxBg(); | 165 | changeSelectboxBg(); |
166 | })*/ | 166 | })*/ |
167 | }) | 167 | }) |
168 | }) | 168 | }) |
169 | } | 169 | } |
170 | 170 | ||
171 | $scope.getOrders(); | 171 | $scope.getOrders(); |
172 | $scope.optionSelected=''; | 172 | $scope.optionSelected=''; |
173 | $scope.onFWSelect = function() { | 173 | $scope.onFWSelect = function() { |
174 | if($scope.optionSelected == 'dt'){ | 174 | if($scope.optionSelected == 'dt'){ |
175 | $('#demo-modal-4').css('display', 'block'); | 175 | $('#demo-modal-4').css('display', 'block'); |
176 | $scope.optionSelected=''; | 176 | $scope.optionSelected=''; |
177 | 177 | ||
178 | } | 178 | } |
179 | if($scope.optionSelected == 'efo'){ | 179 | if($scope.optionSelected == 'efo'){ |
180 | $scope.showLoader = true; | 180 | $scope.showLoader = true; |
181 | var fileName = "orders.csv"; | 181 | var fileName = "orders.csv"; |
182 | var a = document.createElement("a"); | 182 | var a = document.createElement("a"); |
183 | document.body.appendChild(a); | 183 | document.body.appendChild(a); |
184 | fuelOrdersService.exportCompany().then(function(result) { | 184 | fuelOrdersService.exportCompany().then(function(result) { |
185 | var file = new Blob([result], {type: 'application/csv'}); | 185 | var file = new Blob([result], {type: 'application/csv'}); |
186 | var fileURL = URL.createObjectURL(file); | 186 | var fileURL = URL.createObjectURL(file); |
187 | a.href = fileURL; | 187 | a.href = fileURL; |
188 | a.download = fileName; | 188 | a.download = fileName; |
189 | a.click(); | 189 | a.click(); |
190 | $scope.showLoader = false; | 190 | $scope.showLoader = false; |
191 | $scope.optionSelected=''; | 191 | $scope.optionSelected=''; |
192 | }) | 192 | }) |
193 | } | 193 | } |
194 | } | 194 | } |
195 | $scope.attachmentrowid = "" | 195 | $scope.attachmentrowid = "" |
196 | 196 | ||
197 | 197 | ||
198 | $scope.attachment = function(id, value, url) { | 198 | $scope.attachment = function(id, value, url) { |
199 | $scope.attachmentrowid = id | 199 | $scope.attachmentrowid = id |
200 | if(value == 'uploadAttachment'){ | 200 | if(value == 'uploadAttachment'){ |
201 | $('#demo-modal-6').css('display', 'block'); | 201 | $('#demo-modal-6').css('display', 'block'); |
202 | }else if(value == 'viewAttachment'){ | 202 | }else if(value == 'viewAttachment'){ |
203 | var win = window.open(url, '_blank'); | 203 | var win = window.open(url, '_blank'); |
204 | win.focus(); | 204 | win.focus(); |
205 | }else if(value == 'deleteAttachment'){ | 205 | }else if(value == 'deleteAttachment'){ |
206 | $('#delete1').css('display', 'block'); | 206 | $('#delete1').css('display', 'block'); |
207 | } | 207 | } |
208 | } | 208 | } |
209 | 209 | ||
210 | $scope.cancelDeleteAttachment = function() { | 210 | $scope.cancelDeleteAttachment = function() { |
211 | $('#delete1').css('display', ''); | 211 | $('#delete1').css('display', ''); |
212 | } | 212 | } |
213 | 213 | ||
214 | $scope.deleteAttachment = function() { | 214 | $scope.deleteAttachment = function() { |
215 | $scope.showLoader = true; | 215 | $scope.showLoader = true; |
216 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { | 216 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { |
217 | 217 | ||
218 | if(result.success){ | 218 | if(result.success){ |
219 | toastr.success(''+result.success+'', { | 219 | toastr.success(''+result.success+'', { |
220 | closeButton: true | 220 | closeButton: true |
221 | }) | 221 | }) |
222 | } | 222 | } |
223 | }) | 223 | }) |
224 | $scope.showLoader = false; | 224 | $scope.showLoader = false; |
225 | $('#delete1').css('display', ''); | 225 | $('#delete1').css('display', ''); |
226 | } | 226 | } |
227 | 227 | ||
228 | $scope.saveUploadAttachment = function(attachmentData) { | 228 | $scope.saveUploadAttachment = function(attachmentData) { |
229 | $scope.showLoader = true; | 229 | $scope.showLoader = true; |
230 | $scope.data.media = attachmentData | 230 | $scope.data.media = attachmentData |
231 | $scope.data.id = $scope.attachmentrowid | 231 | $scope.data.id = $scope.attachmentrowid |
232 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { | 232 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { |
233 | if(result){ | 233 | if(result){ |
234 | toastr.success(''+"Upload Successful"+'', { | 234 | toastr.success(''+"Upload Successful"+'', { |
235 | closeButton: true | 235 | closeButton: true |
236 | }) | 236 | }) |
237 | } | 237 | } |
238 | 238 | ||
239 | }) | 239 | }) |
240 | $scope.showLoader = false; | 240 | $scope.showLoader = false; |
241 | $('#demo-modal-6').css('display', 'none'); | 241 | $('#demo-modal-6').css('display', 'none'); |
242 | } | 242 | } |
243 | 243 | ||
244 | $scope.cancelUploadAttachment = function() { | 244 | $scope.cancelUploadAttachment = function() { |
245 | $('#demo-modal-6').css('display', 'none'); | 245 | $('#demo-modal-6').css('display', 'none'); |
246 | } | 246 | } |
247 | 247 | ||
248 | $scope.editdata = {}; | 248 | $scope.editdata = {}; |
249 | 249 | ||
250 | 250 | ||
251 | $scope.editTableRow = function(rowData){ | 251 | $scope.editTableRow = function(rowData){ |
252 | //console.log('row data', rowData); | 252 | //console.log('row data', rowData); |
253 | $scope.editdata = rowData; | 253 | $scope.editdata = rowData; |
254 | $('#demo-modal-5').css('display', 'block'); | 254 | $('#demo-modal-5').css('display', 'block'); |
255 | } | 255 | } |
256 | 256 | ||
257 | $scope.updateTotal = function(value, valueOf){ | 257 | $scope.updateTotal = function(value, valueOf){ |
258 | if(valueOf == 'v'){ | 258 | if(valueOf == 'v'){ |
259 | $scope.editdata.total = value * $scope.editdata.invoiced | 259 | $scope.editdata.total = value * $scope.editdata.invoiced |
260 | }else if(valueOf == 'i'){ | 260 | }else if(valueOf == 'i'){ |
261 | $scope.editdata.total = $scope.editdata.requestedVolume * value | 261 | $scope.editdata.total = $scope.editdata.requestedVolume * value |
262 | } | 262 | } |
263 | } | 263 | } |
264 | 264 | ||
265 | $scope.setCost = function(cost){ | 265 | $scope.setCost = function(cost){ |
266 | if(cost != null) { | 266 | if(cost != null) { |
267 | var obj =JSON.parse(cost); | 267 | var obj =JSON.parse(cost); |
268 | $scope.order.fboCost = obj.cost; | 268 | $scope.order.fboCost = obj.cost; |
269 | } | 269 | } |
270 | 270 | ||
271 | } | 271 | } |
272 | 272 | ||
273 | $scope.addTotal = function(value, valueOf) { | 273 | $scope.addTotal = function(value, valueOf) { |
274 | if (value != undefined && valueOf != undefined) { | 274 | if (value != undefined && valueOf != undefined) { |
275 | value = JSON.parse(value) | 275 | value = JSON.parse(value) |
276 | $scope.order.total = value.cost * valueOf; | 276 | $scope.order.total = value.cost * valueOf; |
277 | } | 277 | } |
278 | } | 278 | } |
279 | 279 | ||
280 | $scope.addFuelData = function() { | 280 | $scope.addFuelData = function() { |
281 | $scope.showLoader = true; | 281 | // $scope.showLoader = true; |
282 | $scope.fuelData = {}; | 282 | $scope.fuelData = {}; |
283 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 283 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
284 | 284 | ||
285 | $scope.fuelData.companyName = $scope.order.companyName; | 285 | $scope.fuelData.companyName = $scope.order.companyName; |
286 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 286 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
287 | $scope.fuelData.aircraftName = aircraftObj.tail; | 287 | $scope.fuelData.aircraftName = aircraftObj.tail; |
288 | $scope.fuelData.make = aircraftObj.make; | 288 | $scope.fuelData.make = aircraftObj.make; |
289 | $scope.fuelData.model = aircraftObj.model; | 289 | $scope.fuelData.model = aircraftObj.model; |
290 | $scope.fuelData.fuelOn = $scope.order.fuelOn; | 290 | $scope.fuelData.fuelOn = $scope.order.fuelOn; |
291 | $scope.fuelData.invoiced = $scope.order.invoiced; | 291 | $scope.fuelData.invoiced = $scope.order.invoiced; |
292 | $scope.fuelData.volume = $scope.order.volume; | 292 | $scope.fuelData.volume = $scope.order.volume; |
293 | $scope.fuelData.source = $scope.order.source; | 293 | // $scope.fuelData.source = $scope.order.source; |
294 | 294 | ||
295 | $scope.fuelData.total = $scope.order.total; | 295 | $scope.fuelData.total = $scope.order.total; |
296 | //tier no use | 296 | //tier no use |
297 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 297 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
298 | 298 | ||
299 | var obj =JSON.parse($scope.order.priceQuote); | 299 | var obj =JSON.parse($scope.order.priceQuote); |
300 | $scope.fuelData.priceQuote = obj.papTotal; | 300 | $scope.fuelData.priceQuote = obj.papTotal; |
301 | $scope.fuelData.fboCost = obj.cost; | 301 | $scope.fuelData.fboCost = obj.cost; |
302 | $scope.fuelData.productName = obj.productName; | 302 | $scope.fuelData.productName = obj.productName; |
303 | 303 | ||
304 | $scope.fuelData.etaTime = $scope.order.etaTime; | 304 | $scope.fuelData.etaTime = $scope.order.etaTime; |
305 | $scope.fuelData.etdTime = $scope.order.etdTime; | 305 | $scope.fuelData.etdTime = $scope.order.etdTime; |
306 | $scope.fuelData.certificateType = $scope.order.certificateType; | 306 | $scope.fuelData.certificateType = $scope.order.certificateType; |
307 | var currentDate = new Date(); | 307 | var currentDate = new Date(); |
308 | var hours = currentDate.getHours(); | 308 | var hours = currentDate.getHours(); |
309 | var min = currentDate.getMinutes(); | 309 | var min = currentDate.getMinutes(); |
310 | var sec = currentDate.getSeconds(); | 310 | var sec = currentDate.getSeconds(); |
311 | if ($scope.order.upliftDate != '') { | 311 | if ($scope.order.upliftDate != '') { |
312 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 312 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
313 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 313 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
314 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 314 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||
318 | if ($scope.order.departingDate != '') { | 318 | if ($scope.order.departingDate != '') { |
319 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 319 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
320 | $scope.order.departingDate = new Date($scope.order.departingDate); | 320 | $scope.order.departingDate = new Date($scope.order.departingDate); |
321 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 321 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
322 | } | 322 | } |
323 | 323 | ||
324 | if($scope.order.status === null || $scope.order.status === undefined){ | 324 | if($scope.order.status === null || $scope.order.status === undefined){ |
325 | 325 | ||
326 | $scope.fuelData.status = "pending"; //default status | 326 | $scope.fuelData.status = "pending"; //default status |
327 | 327 | ||
328 | }else { | 328 | }else { |
329 | 329 | ||
330 | $scope.fuelData.status = $scope.order.status; | 330 | $scope.fuelData.status = $scope.order.status; |
331 | } | 331 | } |
332 | 332 | ||
333 | if($scope.baseTenant && $scope.contractFuelVendor ){ | ||
334 | $scope.fuelData.source = "Tenant/Base Customer CAA Member" ; | ||
335 | }else if($scope.baseTenant) | ||
336 | { | ||
337 | $scope.fuelData.source = "Tenant/Base Customer"; | ||
338 | }else if($scope.contractFuelVendor){ | ||
339 | $scope.fuelData.source = "CAA Member"; | ||
340 | } | ||
341 | |||
333 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 342 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
334 | // console.log("=====$scope.fueldata======",$scope.fuelData) | 343 | // console.log("=====$scope.fueldata======",$scope.fuelData) |
335 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 344 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
336 | $scope.showLoader = false; | 345 | $scope.showLoader = false; |
337 | $scope.order = {}; | 346 | $scope.order = {}; |
338 | $scope.dispatchOrder.fuelOrderList = []; | 347 | $scope.dispatchOrder.fuelOrderList = []; |
339 | $('#demo-modal-4').css('display', ''); | 348 | $('#demo-modal-4').css('display', ''); |
340 | $scope.getOrders(); | 349 | $scope.getOrders(); |
341 | toastr.success('Fuel Order Dispatched Successfully', { | 350 | toastr.success('Fuel Order Dispatched Successfully', { |
342 | closeButton: true | 351 | closeButton: true |
343 | }) | 352 | }) |
344 | }) | 353 | }) |
345 | 354 | ||
346 | 355 | ||
347 | } | 356 | } |
348 | 357 | ||
349 | $scope.updateStatus = function(row, status) { | 358 | $scope.updateStatus = function(row, status) { |
350 | $scope.showLoader = true; | 359 | $scope.showLoader = true; |
351 | $scope.fuelData = {}; | 360 | $scope.fuelData = {}; |
352 | $scope.fuelData.aircraftName = row.aircraftName | 361 | $scope.fuelData.aircraftName = row.aircraftName |
353 | $scope.fuelData.companyName = row.companyName | 362 | $scope.fuelData.companyName = row.companyName |
354 | $scope.fuelData.departingDate = row.departingDate | 363 | $scope.fuelData.departingDate = row.departingDate |
355 | $scope.fuelData.fboCost = row.fboCost | 364 | $scope.fuelData.fboCost = row.fboCost |
356 | $scope.fuelData.id = row.id | 365 | $scope.fuelData.id = row.id |
357 | $scope.fuelData.invoiced = row.invoiced | 366 | $scope.fuelData.invoiced = row.invoiced |
358 | $scope.fuelData.priceQuote = row.priceQuote | 367 | $scope.fuelData.priceQuote = row.priceQuote |
359 | $scope.fuelData.volume = row.requestedVolume | 368 | $scope.fuelData.volume = row.requestedVolume |
360 | $scope.fuelData.source = row.source | 369 | $scope.fuelData.source = row.source |
361 | $scope.fuelData.status = status | 370 | $scope.fuelData.status = status |
362 | $scope.fuelData.tierBreak = row.tierBreak | 371 | $scope.fuelData.tierBreak = row.tierBreak |
363 | $scope.fuelData.total = row.total | 372 | $scope.fuelData.total = row.total |
364 | $scope.fuelData.upliftDate = row.upliftDate | 373 | $scope.fuelData.upliftDate = row.upliftDate |
365 | 374 | ||
366 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 375 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
367 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 376 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
368 | $scope.showLoader = false; | 377 | $scope.showLoader = false; |
369 | $scope.editdata = {}; | 378 | $scope.editdata = {}; |
370 | $scope.fuelData = {}; | 379 | $scope.fuelData = {}; |
371 | $scope.dispatchOrder.fuelOrderList = []; | 380 | $scope.dispatchOrder.fuelOrderList = []; |
372 | $('#demo-modal-5').css('display', ''); | 381 | $('#demo-modal-5').css('display', ''); |
373 | $scope.getOrders(); | 382 | $scope.getOrders(); |
374 | toastr.success('Fuel Order Updated Successfully', { | 383 | toastr.success('Fuel Order Updated Successfully', { |
375 | closeButton: true | 384 | closeButton: true |
376 | }); | 385 | }); |
377 | }) | 386 | }) |
378 | 387 | ||
379 | } | 388 | } |
380 | $scope.fuelData = {}; | 389 | $scope.fuelData = {}; |
381 | $scope.updateData = function() { | 390 | $scope.updateData = function() { |
382 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ | 391 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ |
383 | if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) { | 392 | if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) { |
384 | $scope.showLoader = true; | 393 | $scope.showLoader = true; |
385 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; | 394 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; |
386 | $scope.fuelData.companyName = $scope.editdata.companyName; | 395 | $scope.fuelData.companyName = $scope.editdata.companyName; |
387 | $scope.fuelData.fboCost = $scope.editdata.fboCost; | 396 | $scope.fuelData.fboCost = $scope.editdata.fboCost; |
388 | $scope.fuelData.id = $scope.editdata.id; | 397 | $scope.fuelData.id = $scope.editdata.id; |
389 | $scope.fuelData.invoiced = $scope.editdata.invoiced; | 398 | $scope.fuelData.invoiced = $scope.editdata.invoiced; |
390 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; | 399 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; |
391 | $scope.fuelData.volume = $scope.editdata.requestedVolume; | 400 | $scope.fuelData.volume = $scope.editdata.requestedVolume; |
392 | $scope.fuelData.source = $scope.editdata.source; | 401 | $scope.fuelData.source = $scope.editdata.source; |
393 | $scope.fuelData.status = $scope.editdata.status; | 402 | $scope.fuelData.status = $scope.editdata.status; |
394 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; | 403 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; |
395 | $scope.fuelData.total = $scope.editdata.total; | 404 | $scope.fuelData.total = $scope.editdata.total; |
396 | 405 | ||
397 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); | 406 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); |
398 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); | 407 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); |
399 | 408 | ||
400 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); | 409 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); |
401 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); | 410 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); |
402 | 411 | ||
403 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; | 412 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; |
404 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; | 413 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; |
405 | $scope.fuelData.productName = $scope.editdata.productName; | 414 | $scope.fuelData.productName = $scope.editdata.productName; |
406 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); | 415 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); |
407 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ | 416 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ |
408 | $scope.fuelData.etaTime = $scope.editdata.etaTime; | 417 | $scope.fuelData.etaTime = $scope.editdata.etaTime; |
409 | $scope.fuelData.etdTime = $scope.editdata.etdTime; | 418 | $scope.fuelData.etdTime = $scope.editdata.etdTime; |
410 | $scope.fuelData.certificateType = $scope.editdata.certificateType; | 419 | $scope.fuelData.certificateType = $scope.editdata.certificateType; |
411 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn; | 420 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn; |
412 | 421 | ||
413 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 422 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
414 | // console.log("====fueldata===",$scope.dispatchOrder); | 423 | // console.log("====fueldata===",$scope.dispatchOrder); |
415 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 424 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
416 | // console.log('result', result); | 425 | // console.log('result', result); |
417 | $scope.showLoader = false; | 426 | $scope.showLoader = false; |
418 | $scope.editdata = {}; | 427 | $scope.editdata = {}; |
419 | $('#demo-modal-5').css('display', ''); | 428 | $('#demo-modal-5').css('display', ''); |
420 | $scope.getOrders(); | 429 | $scope.getOrders(); |
421 | toastr.success('Fuel Order Updated Successfully', { | 430 | toastr.success('Fuel Order Updated Successfully', { |
422 | closeButton: true | 431 | closeButton: true |
423 | }) | 432 | }) |
424 | }) | 433 | }) |
425 | 434 | ||
426 | 435 | ||
427 | } else{ | 436 | } else{ |
428 | { | 437 | { |
429 | toastr.error('Please select fuelOn.', { | 438 | toastr.error('Please select fuelOn.', { |
430 | closeButton: true | 439 | closeButton: true |
431 | }) | 440 | }) |
432 | } | 441 | } |
433 | } | 442 | } |
434 | 443 | ||
435 | }else | 444 | }else |
436 | { | 445 | { |
437 | toastr.error('Please select Arrival Time and Departure time both.', { | 446 | toastr.error('Please select Arrival Time and Departure time both.', { |
438 | closeButton: true | 447 | closeButton: true |
439 | }) | 448 | }) |
440 | } | 449 | } |
441 | 450 | ||
442 | } | 451 | } |
443 | 452 | ||
444 | $scope.getAircraft = function(company){ | 453 | $scope.getAircraft = function(company){ |
445 | 454 | ||
446 | $scope.selectedCompanyName = company; | 455 | $scope.selectedCompanyName = company; |
447 | //$scope.showLoader = true; | 456 | //$scope.showLoader = true; |
448 | for (var i = 0; i < $scope.companyList.length; i++) { | 457 | for (var i = 0; i < $scope.companyList.length; i++) { |
449 | if ($scope.companyList[i].companyName == company) { | 458 | if ($scope.companyList[i].companyName == company) { |
459 | $scope.order.certificateType = $scope.companyList[i].certificateType; | ||
460 | $scope.baseTenant = $scope.companyList[i].baseTenant; | ||
461 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; | ||
462 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; | ||
463 | |||
450 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ | 464 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ |
451 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 465 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
452 | $scope.marginList = margins; | 466 | $scope.marginList = margins; |
453 | }) | 467 | }) |
454 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 468 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
455 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 469 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
456 | $scope.marginList = margins; | 470 | $scope.marginList = margins; |
457 | }) | 471 | }) |
458 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 472 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
459 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 473 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
460 | $scope.marginList = margins; | 474 | $scope.marginList = margins; |
461 | }) | 475 | }) |
462 | } | 476 | } |
463 | $scope.selectedCompanyId = $scope.companyList[i].id; | 477 | $scope.selectedCompanyId = $scope.companyList[i].id; |
464 | $scope.marginId = $scope.companyList[i].margin.id; | 478 | $scope.marginId = $scope.companyList[i].margin.id; |
465 | if ($scope.selectedCompanyId != '') { | 479 | if ($scope.selectedCompanyId != '') { |
466 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 480 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
467 | $scope.aircraftList = aircraft; | 481 | $scope.aircraftList = aircraft; |
468 | }) | 482 | }) |
469 | } | 483 | } |
470 | if ($scope.marginId != '') { | 484 | if ($scope.marginId != '') { |
471 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 485 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
472 | $scope.tierList = tiers; | 486 | $scope.tierList = tiers; |
473 | // $scope.showLoader = false; | 487 | // $scope.showLoader = false; |
474 | }) | 488 | }) |
475 | }else{ | 489 | }else{ |
476 | // $scope.showLoader = false; | 490 | // $scope.showLoader = false; |
477 | } | 491 | } |
478 | } | 492 | } |
479 | } | 493 | } |
480 | 494 | ||
481 | } | 495 | } |
482 | 496 | ||
483 | 497 | ||
484 | 498 | ||
485 | $scope.cancelData = function() { | 499 | $scope.cancelData = function() { |
486 | $('#demo-modal-4').css('display', ''); | 500 | $('#demo-modal-4').css('display', ''); |
487 | } | 501 | } |
488 | $scope.canceleditdata = function() { | 502 | $scope.canceleditdata = function() { |
489 | $('#demo-modal-5').css('display', ''); | 503 | $('#demo-modal-5').css('display', ''); |
490 | } | 504 | } |
491 | 505 | ||
492 | 506 | ||
493 | 507 | ||
494 | $scope.companyList = {}; | 508 | $scope.companyList = {}; |
495 | 509 | ||
496 | fuelOrdersService.getAllCompanies().then(function(result) { | 510 | fuelOrdersService.getAllCompanies().then(function(result) { |
497 | $scope.showLoader = true; | 511 | $scope.showLoader = true; |
498 | $scope.companyList = result; | 512 | $scope.companyList = result; |
499 | $scope.showLoader = false; | 513 | $scope.showLoader = false; |
500 | }) | 514 | }) |
501 | 515 | ||
502 | /*Add a company services API used from customersService */ | 516 | /*Add a company services API used from customersService */ |
503 | getCompanyName(); | 517 | getCompanyName(); |
504 | function getCompanyName(){ | 518 | function getCompanyName(){ |
505 | CustomersService.getCompanyName().then(function(result) { | 519 | CustomersService.getCompanyName().then(function(result) { |
506 | $scope.showLoader = true; | 520 | $scope.showLoader = true; |
507 | $scope.compNameList = result; | 521 | $scope.compNameList = result; |
508 | $scope.showLoader = false; | 522 | $scope.showLoader = false; |
509 | }) | 523 | }) |
510 | } | 524 | } |
511 | 525 | ||
512 | $scope.marginFilterOptions = []; | 526 | $scope.marginFilterOptions = []; |
513 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 527 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
514 | $scope.showLoader = true; | 528 | $scope.showLoader = true; |
515 | $scope.jetMarginList = result; | 529 | $scope.jetMarginList = result; |
516 | $scope.marginFilterOptions.push({ | 530 | $scope.marginFilterOptions.push({ |
517 | 'id': '', 'title': 'Show All' | 531 | 'id': '', 'title': 'Show All' |
518 | }); | 532 | }); |
519 | for (var i = 0; i < result.length; i++) { | 533 | for (var i = 0; i < result.length; i++) { |
520 | $scope.marginFilterOptions.push({ | 534 | $scope.marginFilterOptions.push({ |
521 | 'id': result[i].id, | 535 | 'id': result[i].id, |
522 | 'title': result[i].marginName | 536 | 'title': result[i].marginName |
523 | }) | 537 | }) |
524 | } | 538 | } |
525 | $scope.showLoader = false; | 539 | $scope.showLoader = false; |
526 | }) | 540 | }) |
527 | 541 | ||
528 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 542 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
529 | $scope.avgsMarginList = result; | 543 | $scope.avgsMarginList = result; |
530 | }) | 544 | }) |
531 | 545 | ||
532 | $scope.showCompanyError = false; | 546 | $scope.showCompanyError = false; |
533 | $scope.showMarginError = false; | 547 | $scope.showMarginError = false; |
534 | 548 | ||
535 | $scope.removeValidation = function(){ | 549 | $scope.removeValidation = function(){ |
536 | $scope.showCompanyError = false; | 550 | $scope.showCompanyError = false; |
537 | $('.companyNameInput').removeClass('customErrorInput'); | 551 | $('.companyNameInput').removeClass('customErrorInput'); |
538 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 552 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
539 | $('.companyNameInput').addClass('customErrorInput'); | 553 | $('.companyNameInput').addClass('customErrorInput'); |
540 | $scope.showCompanyError = true; | 554 | $scope.showCompanyError = true; |
541 | } | 555 | } |
542 | } | 556 | } |
543 | 557 | ||
544 | $scope.removeMarginValidation = function(){ | 558 | $scope.removeMarginValidation = function(){ |
545 | $scope.showMarginError = false; | 559 | $scope.showMarginError = false; |
546 | $('.marginSelectBox').removeClass('customErrorInput'); | 560 | $('.marginSelectBox').removeClass('customErrorInput'); |
547 | } | 561 | } |
548 | 562 | ||
549 | getData(); | 563 | getData(); |
550 | function getData(){ | 564 | function getData(){ |
551 | $scope.showLoader = true; | 565 | $scope.showLoader = true; |
552 | CustomersService.getAircraftMake().then(function(result) { | 566 | CustomersService.getAircraftMake().then(function(result) { |
553 | $scope.aircraftMakeList = result; | 567 | $scope.aircraftMakeList = result; |
554 | $scope.showLoader = false; | 568 | $scope.showLoader = false; |
555 | }) | 569 | }) |
556 | } | 570 | } |
557 | var companyData; | 571 | var companyData; |
558 | $scope.addFirstData = function(sel, step){ | 572 | $scope.addFirstData = function(sel, step){ |
559 | $scope.showLoader = true; | 573 | $scope.showLoader = true; |
560 | if($scope.data.companyName == undefined){ | 574 | if($scope.data.companyName == undefined){ |
561 | $scope.showCompanyError = true; | 575 | $scope.showCompanyError = true; |
562 | $('.companyNameInput').addClass('customErrorInput'); | 576 | $('.companyNameInput').addClass('customErrorInput'); |
563 | }else if($scope.data.masterMargin == undefined){ | 577 | }else if($scope.data.masterMargin == undefined){ |
564 | $scope.showMarginError = true; | 578 | $scope.showMarginError = true; |
565 | $('.marginSelectBox').addClass('customErrorInput'); | 579 | $('.marginSelectBox').addClass('customErrorInput'); |
566 | }else{ | 580 | }else{ |
567 | $scope.aircraftDetails = [{ | 581 | $scope.aircraftDetails = [{ |
568 | 'tail':'', | 582 | 'tail':'', |
569 | 'make': '', | 583 | 'make': '', |
570 | 'model': '', | 584 | 'model': '', |
571 | 'sizeId' : '', | 585 | 'sizeId' : '', |
572 | 'marginId': $scope.data.masterMargin, | 586 | 'marginId': $scope.data.masterMargin, |
573 | 'avgasMarginId': $scope.data.avgasMargin | 587 | 'avgasMarginId': $scope.data.avgasMargin |
574 | }]; | 588 | }]; |
575 | 589 | ||
576 | $(sel).trigger('next.m.' + step); | 590 | $(sel).trigger('next.m.' + step); |
577 | getData(); | 591 | getData(); |
578 | } | 592 | } |
579 | $scope.showLoader = false; | 593 | $scope.showLoader = false; |
580 | } | 594 | } |
581 | $scope.addNew = function(){ | 595 | $scope.addNew = function(){ |
582 | $scope.showLoader = true; | 596 | $scope.showLoader = true; |
583 | $scope.aircraftDetails.push({ | 597 | $scope.aircraftDetails.push({ |
584 | 'tail':'', | 598 | 'tail':'', |
585 | 'make': '', | 599 | 'make': '', |
586 | 'model': '', | 600 | 'model': '', |
587 | 'sizeId' : '', | 601 | 'sizeId' : '', |
588 | 'marginId': $scope.data.masterMargin, | 602 | 'marginId': $scope.data.masterMargin, |
589 | 'avgasMarginId': $scope.data.avgasMargin | 603 | 'avgasMarginId': $scope.data.avgasMargin |
590 | }); | 604 | }); |
591 | $scope.showLoader = false; | 605 | $scope.showLoader = false; |
592 | }; | 606 | }; |
593 | 607 | ||
594 | $scope.aircraft = {}; | 608 | $scope.aircraft = {}; |
595 | $scope.getModal = function(makeId, index){ | 609 | $scope.getModal = function(makeId, index){ |
596 | $scope.showLoader = true; | 610 | $scope.showLoader = true; |
597 | $scope.aircraft.make = makeId; | 611 | $scope.aircraft.make = makeId; |
598 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 612 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
599 | $scope.showLoader = false; | 613 | $scope.showLoader = false; |
600 | $scope.aircraftDetails[index].aircraftModalList = result; | 614 | $scope.aircraftDetails[index].aircraftModalList = result; |
601 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 615 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
602 | }) | 616 | }) |
603 | } | 617 | } |
604 | 618 | ||
605 | $scope.getSize = function(model, index){ | 619 | $scope.getSize = function(model, index){ |
606 | $scope.showLoader = true; | 620 | $scope.showLoader = true; |
607 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 621 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
608 | $scope.showLoader = false; | 622 | $scope.showLoader = false; |
609 | $scope.aircraftDetails[index].aircraftSizeList = result; | 623 | $scope.aircraftDetails[index].aircraftSizeList = result; |
610 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | 624 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
611 | }) | 625 | }) |
612 | } | 626 | } |
613 | 627 | ||
614 | $scope.aircraftListData = {}; | 628 | $scope.aircraftListData = {}; |
615 | $scope.addData = []; | 629 | $scope.addData = []; |
616 | 630 | ||
617 | $scope.saveCompanyData = function(){ | 631 | $scope.saveCompanyData = function(){ |
618 | CustomersService.addCompany($scope.data).then(function(result) { | 632 | CustomersService.addCompany($scope.data).then(function(result) { |
619 | $scope.accountId = result; | 633 | $scope.accountId = result; |
620 | $scope.aircraft.accountId = $scope.accountId; | 634 | $scope.aircraft.accountId = $scope.accountId; |
621 | 635 | ||
622 | for(var i=0; i<$scope.aircraftDetails.length;i++){ | 636 | for(var i=0; i<$scope.aircraftDetails.length;i++){ |
623 | $scope.addData.push({ | 637 | $scope.addData.push({ |
624 | 'tail': $scope.aircraftDetails[i].tail, | 638 | 'tail': $scope.aircraftDetails[i].tail, |
625 | 'make': $scope.aircraftDetails[i].make, | 639 | 'make': $scope.aircraftDetails[i].make, |
626 | 'model': $scope.aircraftDetails[i].model, | 640 | 'model': $scope.aircraftDetails[i].model, |
627 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 641 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
628 | 'marginId': $scope.aircraftDetails[i].marginId, | 642 | 'marginId': $scope.aircraftDetails[i].marginId, |
629 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 643 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
630 | }); | 644 | }); |
631 | } | 645 | } |
632 | $scope.aircraftListData.aircraftList = $scope.addData; | 646 | $scope.aircraftListData.aircraftList = $scope.addData; |
633 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 647 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
634 | 648 | ||
635 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ | 649 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ |
636 | $scope.aircraftListData.aircraftList = []; | 650 | $scope.aircraftListData.aircraftList = []; |
637 | } | 651 | } |
638 | 652 | ||
639 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 653 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
640 | 654 | ||
641 | if(result != null && result.success){ | 655 | if(result != null && result.success){ |
642 | toastr.success(''+result.success+'', { | 656 | toastr.success(''+result.success+'', { |
643 | closeButton: true | 657 | closeButton: true |
644 | }) | 658 | }) |
645 | $('#demo-modal-3').modal('hide'); | 659 | $('#demo-modal-3').modal('hide'); |
646 | getAllCompanies(); | 660 | getAllCompanies(); |
647 | }else{ | 661 | }else{ |
648 | toastr.error(''+result.statusText+'', { | 662 | toastr.error(''+result.statusText+'', { |
649 | closeButton: true | 663 | closeButton: true |
650 | }) | 664 | }) |
651 | } | 665 | } |
652 | }); | 666 | }); |
653 | 667 | ||
654 | }) | 668 | }) |
655 | 669 | ||
656 | 670 | ||
657 | } | 671 | } |
658 | 672 | ||
659 | $scope.checkJetWithTail = function(tail, index){ | 673 | $scope.checkJetWithTail = function(tail, index){ |
660 | 674 | ||
661 | ViewCompanyService.checkJetType(tail).then(function(result) { | 675 | ViewCompanyService.checkJetType(tail).then(function(result) { |
662 | if(result.jetA == "true"){ | 676 | if(result.jetA == "true"){ |
663 | $scope.jetShow[index] = false; | 677 | $scope.jetShow[index] = false; |
664 | $scope.marginShow[index] = true; | 678 | $scope.marginShow[index] = true; |
665 | }else{ | 679 | }else{ |
666 | $scope.jetShow[index] = true; | 680 | $scope.jetShow[index] = true; |
667 | $scope.marginShow[index] = false; | 681 | $scope.marginShow[index] = false; |
668 | } | 682 | } |
669 | }) | 683 | }) |
670 | } | 684 | } |
671 | 685 | ||
672 | $scope.etaTimeList=[]; | 686 | $scope.etaTimeList=[]; |
673 | $scope.etdTimeList =[]; | 687 | $scope.etdTimeList =[]; |
674 | 688 | ||
675 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; | 689 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; |
676 | $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"}, | 690 | $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"}, |
677 | {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"}, | 691 | {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"}, |
678 | {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"}, | 692 | {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"}, |
679 | {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"}, | 693 | {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"}, |
680 | {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"}, | 694 | {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"}, |
681 | {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"},]; | 695 | {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"},]; |
682 | 696 | ||
683 | $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"}, | 697 | $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"}, |
684 | {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"}, | 698 | {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"}, |
685 | {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"}, | 699 | {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"}, |
686 | {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"}, | 700 | {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"}, |
687 | {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"}, | 701 | {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"}, |
688 | {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"},]; | 702 | {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"},]; |
689 | 703 | ||
690 | $scope.data = {}; | 704 | $scope.data = {}; |
691 | 705 | ||
692 | 706 | ||
693 | 707 | ||
694 | } | 708 | } |
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 | filter:searchText" style="cursor: pointer;" > | 94 | <tr ng-repeat="row in $data | 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="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> | 98 | <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> |
99 | {{row.upliftDateString}} | 99 | {{row.upliftDateString}} |
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)"> | 123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)"> |
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 | </td> | 130 | </td> |
131 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> | 131 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> |
132 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > | 132 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > |
133 | <option value="" disabled selected="selected" >Invoice</option> | 133 | <option value="" disabled selected="selected" >Invoice</option> |
134 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> | 134 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> |
135 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> | 135 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> |
136 | <option value="0" disabled >_____________</option> | 136 | <option value="0" disabled >_____________</option> |
137 | <option value="uploadAttachment" >Upload</option> | 137 | <option value="uploadAttachment" >Upload</option> |
138 | </select> | 138 | </select> |
139 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> | 139 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> |
140 | </td> | 140 | </td> |
141 | </tr> | 141 | </tr> |
142 | </table> | 142 | </table> |
143 | 143 | ||
144 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> | 144 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> |
145 | <option value="" disabled selected="selected">Fuel Widget</option> | 145 | <option value="" disabled selected="selected">Fuel Widget</option> |
146 | <option value="dt" >Direct Transaction</option> | 146 | <option value="dt" >Direct Transaction</option> |
147 | <option value="efo" >Export Fuel Orders</option> | 147 | <option value="efo" >Export Fuel Orders</option> |
148 | </select> | 148 | </select> |
149 | 149 | ||
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | </div> | 152 | </div> |
153 | </div> | 153 | </div> |
154 | <!-- /widget-content --> | 154 | <!-- /widget-content --> |
155 | </div> | 155 | </div> |
156 | <!-- /widget --> | 156 | <!-- /widget --> |
157 | </div> | 157 | </div> |
158 | <!-- /span8 --> | 158 | <!-- /span8 --> |
159 | </div> | 159 | </div> |
160 | <!-- /row --> | 160 | <!-- /row --> |
161 | </div> | 161 | </div> |
162 | <!-- /container --> | 162 | <!-- /container --> |
163 | 163 | ||
164 | 164 | ||
165 | </div> | 165 | </div> |
166 | <!-- /main --> | 166 | <!-- /main --> |
167 | 167 | ||
168 | 168 | ||
169 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 169 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
170 | <div class="modal-dialog modal-lg"> | 170 | <div class="modal-dialog modal-lg"> |
171 | <div class="modal-content"> | 171 | <div class="modal-content"> |
172 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 172 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
173 | <div> | 173 | <div> |
174 | <div class="row" style="margin: 0;"> | 174 | <div class="row" style="margin: 0;"> |
175 | <div> | 175 | <div> |
176 | <div class="widget" style="margin-bottom: 0;"> | 176 | <div class="widget" style="margin-bottom: 0;"> |
177 | <div class="widget-header"> | 177 | <div class="widget-header"> |
178 | <i class="icon-pencil"></i> | 178 | <i class="icon-pencil"></i> |
179 | <i class="fa fa-tasks" aria-hidden="true"></i> | 179 | <i class="fa fa-tasks" aria-hidden="true"></i> |
180 | <h3>Add a New Company</h3> | 180 | <h3>Add a New Company</h3> |
181 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 181 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
182 | <div style="color: #ff9a01;">Activate     | 182 | <div style="color: #ff9a01;">Activate     |
183 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 183 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
184 | </div> | 184 | </div> |
185 | </div> | 185 | </div> |
186 | <div class="clearfix"></div> | 186 | <div class="clearfix"></div> |
187 | </div> | 187 | </div> |
188 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 188 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
189 | <div class="col-xs-12"> | 189 | <div class="col-xs-12"> |
190 | <div class="col-md-8"> | 190 | <div class="col-md-8"> |
191 | <div class="pull-left"> | 191 | <div class="pull-left"> |
192 | <label class="new-input-label"><b>Company Name *</b></label> | 192 | <label class="new-input-label"><b>Company Name *</b></label> |
193 | </div> | 193 | </div> |
194 | <div class="pull-left" style="margin-left: 15px;"> | 194 | <div class="pull-left" style="margin-left: 15px;"> |
195 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> | 195 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> |
196 | <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"> | 196 | <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 | 197 | ||
198 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 198 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
199 | </div> | 199 | </div> |
200 | <div class="clearfix"></div> | 200 | <div class="clearfix"></div> |
201 | </div> | 201 | </div> |
202 | <div class="col-md-4"> | 202 | <div class="col-md-4"> |
203 | 203 | ||
204 | <div class="pull-right"> | 204 | <div class="pull-right"> |
205 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 205 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
206 | </div> | 206 | </div> |
207 | <div class="pull-right"> | 207 | <div class="pull-right"> |
208 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 208 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
209 | </div> | 209 | </div> |
210 | <div class="clearfix"></div> | 210 | <div class="clearfix"></div> |
211 | </div> | 211 | </div> |
212 | </div> | 212 | </div> |
213 | <div class="clearfix"></div><br> | 213 | <div class="clearfix"></div><br> |
214 | <div class="col-xs-12"> | 214 | <div class="col-xs-12"> |
215 | <div class="col-md-7"> | 215 | <div class="col-md-7"> |
216 | <div class="pull-left"> | 216 | <div class="pull-left"> |
217 | <label class="new-input-label"><b>Relationship </b></label> | 217 | <label class="new-input-label"><b>Relationship </b></label> |
218 | </div> | 218 | </div> |
219 | <div class="pull-left" style="margin-left: 32px;"> | 219 | <div class="pull-left" style="margin-left: 32px;"> |
220 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 220 | <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.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 221 | <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.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 222 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
223 | </div> | 223 | </div> |
224 | <div class="clearfix"></div> | 224 | <div class="clearfix"></div> |
225 | </div> | 225 | </div> |
226 | <div class="col-md-2 Airport" style="text-align: right;"> | 226 | <div class="col-md-2 Airport" style="text-align: right;"> |
227 | <b>Certificate Type</b> | 227 | <b>Certificate Type</b> |
228 | </div> | 228 | </div> |
229 | <div class="col-md-3 Airport"> | 229 | <div class="col-md-3 Airport"> |
230 | <select required class="form-control" ng-model="data.certificateType"> | 230 | <select required class="form-control" ng-model="data.certificateType"> |
231 | <option value="" disabled selected hidden>Select...</option> | 231 | <option value="" disabled selected hidden>Select...</option> |
232 | <option value="corporate">Part 91 (Corporate)</option> | 232 | <option value="corporate">Part 91 (Corporate)</option> |
233 | <option value="charter">Part 135 (Charter)</option> | 233 | <option value="charter">Part 135 (Charter)</option> |
234 | <option value="scheduled">Part 121 (Scheduled)</option> | 234 | <option value="scheduled">Part 121 (Scheduled)</option> |
235 | <option value="military">Military</option> | 235 | <option value="military">Military</option> |
236 | <option value="government">Government</option> | 236 | <option value="government">Government</option> |
237 | </select> | 237 | </select> |
238 | </div> | 238 | </div> |
239 | <div class="clearfix"></div> | 239 | <div class="clearfix"></div> |
240 | </div> | 240 | </div> |
241 | <div class="clearfix"></div> | 241 | <div class="clearfix"></div> |
242 | <br/> | 242 | <br/> |
243 | <div class="col-xs-12"> | 243 | <div class="col-xs-12"> |
244 | <div class="col-md-6"> | 244 | <div class="col-md-6"> |
245 | <div class="pull-left" style="width: 110px;"> | 245 | <div class="pull-left" style="width: 110px;"> |
246 | <b>JET A Margin *</b> | 246 | <b>JET A Margin *</b> |
247 | </div> | 247 | </div> |
248 | <div class="pull-left"> | 248 | <div class="pull-left"> |
249 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 249 | <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 | <option value="" disabled>Select...</option> | 250 | <option value="" disabled>Select...</option> |
251 | </select> | 251 | </select> |
252 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 252 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
253 | 253 | ||
254 | <div class="clearfix"></div> | 254 | <div class="clearfix"></div> |
255 | </div> | 255 | </div> |
256 | </div> | 256 | </div> |
257 | 257 | ||
258 | <div class="col-md-3 Airport" style="text-align: right;"> | 258 | <div class="col-md-3 Airport" style="text-align: right;"> |
259 | <b>AVGAS 100LL Margin</b> | 259 | <b>AVGAS 100LL Margin</b> |
260 | </div> | 260 | </div> |
261 | <div class="col-md-3 Airport"> | 261 | <div class="col-md-3 Airport"> |
262 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 262 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
263 | <option value="" disabled>Select...</option> | 263 | <option value="" disabled>Select...</option> |
264 | </select> | 264 | </select> |
265 | </div> | 265 | </div> |
266 | <div class="clearfix"></div> | 266 | <div class="clearfix"></div> |
267 | </div> | 267 | </div> |
268 | <div class="clearfix"></div> | 268 | <div class="clearfix"></div> |
269 | <br/> | 269 | <br/> |
270 | <div class="col-xs-12"> | 270 | <div class="col-xs-12"> |
271 | <div class="col-md-12"> | 271 | <div class="col-md-12"> |
272 | <div class="pull-left" style="width: 110px;"> | 272 | <div class="pull-left" style="width: 110px;"> |
273 | <label class="new-input-label"><b>Address</b></label> | 273 | <label class="new-input-label"><b>Address</b></label> |
274 | </div> | 274 | </div> |
275 | <div class="pull-left" style="width: calc(100% - 110px);"> | 275 | <div class="pull-left" style="width: calc(100% - 110px);"> |
276 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 276 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
277 | </div> | 277 | </div> |
278 | <div class="clearfix"></div> | 278 | <div class="clearfix"></div> |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div class="clearfix"></div> | 281 | <div class="clearfix"></div> |
282 | <br/> | 282 | <br/> |
283 | <div class="col-xs-12"> | 283 | <div class="col-xs-12"> |
284 | <div class="col-md-12"> | 284 | <div class="col-md-12"> |
285 | <div class="pull-left" style="width: 110px;"> | 285 | <div class="pull-left" style="width: 110px;"> |
286 | <label class="new-input-label"><b>Address2</b></label> | 286 | <label class="new-input-label"><b>Address2</b></label> |
287 | </div> | 287 | </div> |
288 | <div class="pull-left" style="width: calc(100% - 110px);"> | 288 | <div class="pull-left" style="width: calc(100% - 110px);"> |
289 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 289 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
290 | </div> | 290 | </div> |
291 | <div class="clearfix"></div> | 291 | <div class="clearfix"></div> |
292 | </div> | 292 | </div> |
293 | </div> | 293 | </div> |
294 | <div class="clearfix"></div> | 294 | <div class="clearfix"></div> |
295 | <br/> | 295 | <br/> |
296 | <div class="col-xs-12"> | 296 | <div class="col-xs-12"> |
297 | 297 | ||
298 | <div class="col-md-6"> | 298 | <div class="col-md-6"> |
299 | <div class="pull-left" style="width: 110px;"> | 299 | <div class="pull-left" style="width: 110px;"> |
300 | <label class="new-input-label"><b>City</b></label> | 300 | <label class="new-input-label"><b>City</b></label> |
301 | </div> | 301 | </div> |
302 | <div class="pull-left" style="width: calc(100% - 110px);"> | 302 | <div class="pull-left" style="width: calc(100% - 110px);"> |
303 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 303 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
304 | </div> | 304 | </div> |
305 | <div class="clearfix"></div> | 305 | <div class="clearfix"></div> |
306 | </div> | 306 | </div> |
307 | <div class="col-md-3"> | 307 | <div class="col-md-3"> |
308 | <div class="pull-left" style="width: 40px;"> | 308 | <div class="pull-left" style="width: 40px;"> |
309 | <label class="new-input-label"><b>State</b></label> | 309 | <label class="new-input-label"><b>State</b></label> |
310 | </div> | 310 | </div> |
311 | <div class="pull-left" style="width: calc(100% - 110px);"> | 311 | <div class="pull-left" style="width: calc(100% - 110px);"> |
312 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 312 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
313 | </div> | 313 | </div> |
314 | <div class="clearfix"></div> | 314 | <div class="clearfix"></div> |
315 | </div> | 315 | </div> |
316 | <div class="col-md-3"> | 316 | <div class="col-md-3"> |
317 | <div class="pull-left"> | 317 | <div class="pull-left"> |
318 | <label class="new-input-label"><b>Zip Code</b></label> | 318 | <label class="new-input-label"><b>Zip Code</b></label> |
319 | </div> | 319 | </div> |
320 | <div class="pull-right" style="width: calc(100% - 60px);"> | 320 | <div class="pull-right" style="width: calc(100% - 60px);"> |
321 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 321 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
322 | </div> | 322 | </div> |
323 | <div class="clearfix"></div> | 323 | <div class="clearfix"></div> |
324 | </div> | 324 | </div> |
325 | </div> | 325 | </div> |
326 | <div class="clearfix"></div> | 326 | <div class="clearfix"></div> |
327 | <br/> | 327 | <br/> |
328 | <div class="col-xs-12"> | 328 | <div class="col-xs-12"> |
329 | 329 | ||
330 | <div class="col-md-6"> | 330 | <div class="col-md-6"> |
331 | <div class="pull-left" style="width: 110px;"> | 331 | <div class="pull-left" style="width: 110px;"> |
332 | <label class="new-input-label"><b>Country</b></label> | 332 | <label class="new-input-label"><b>Country</b></label> |
333 | </div> | 333 | </div> |
334 | <div class="pull-left" style="width: calc(100% - 110px);"> | 334 | <div class="pull-left" style="width: calc(100% - 110px);"> |
335 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 335 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
336 | </div> | 336 | </div> |
337 | <div class="clearfix"></div> | 337 | <div class="clearfix"></div> |
338 | </div> | 338 | </div> |
339 | <div class="col-md-6"> | 339 | <div class="col-md-6"> |
340 | <div class="pull-left" style="width: 110px;"> | 340 | <div class="pull-left" style="width: 110px;"> |
341 | <label class="new-input-label"><b>Internal Note</b></label> | 341 | <label class="new-input-label"><b>Internal Note</b></label> |
342 | </div> | 342 | </div> |
343 | <div class="pull-left" style="width: calc(100% - 110px);"> | 343 | <div class="pull-left" style="width: calc(100% - 110px);"> |
344 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 344 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
345 | </div> | 345 | </div> |
346 | <div class="clearfix"></div> | 346 | <div class="clearfix"></div> |
347 | </div> | 347 | </div> |
348 | </div> | 348 | </div> |
349 | <div class="clearfix"></div> | 349 | <div class="clearfix"></div> |
350 | <!-- <br/> | 350 | <!-- <br/> |
351 | <div class="col-xs-12"> | 351 | <div class="col-xs-12"> |
352 | <div class="col-md-2 Airport"></div> | 352 | <div class="col-md-2 Airport"></div> |
353 | <div class="col-md-10 Airport"> | 353 | <div class="col-md-10 Airport"> |
354 | <div class="pull-right"> | 354 | <div class="pull-right"> |
355 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 355 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
356 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 356 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
357 | </div> | 357 | </div> |
358 | </div> | 358 | </div> |
359 | </div> --> | 359 | </div> --> |
360 | </div> | 360 | </div> |
361 | </div> | 361 | </div> |
362 | <div class="clearfix"></div> | 362 | <div class="clearfix"></div> |
363 | </div> | 363 | </div> |
364 | </div> | 364 | </div> |
365 | </div> | 365 | </div> |
366 | </div> | 366 | </div> |
367 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 367 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
368 | <div> | 368 | <div> |
369 | <div class="row" style="margin: 0;"> | 369 | <div class="row" style="margin: 0;"> |
370 | <div> | 370 | <div> |
371 | <div class="widget" style="margin-bottom: 0;"> | 371 | <div class="widget" style="margin-bottom: 0;"> |
372 | <div class="widget-header"> | 372 | <div class="widget-header"> |
373 | <i class="icon-pencil"></i> | 373 | <i class="icon-pencil"></i> |
374 | <i class="fa fa-tasks" aria-hidden="true"></i> | 374 | <i class="fa fa-tasks" aria-hidden="true"></i> |
375 | <h3>Add a New Company</h3> | 375 | <h3>Add a New Company</h3> |
376 | <div class="clearfix"></div> | 376 | <div class="clearfix"></div> |
377 | </div> | 377 | </div> |
378 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 378 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
379 | <div class="col-xs-12"> | 379 | <div class="col-xs-12"> |
380 | <div class="widget-header"> | 380 | <div class="widget-header"> |
381 | <i class="fa fa-list"></i> | 381 | <i class="fa fa-list"></i> |
382 | <h3>Aircraft List</h3> | 382 | <h3>Aircraft List</h3> |
383 | </div> | 383 | </div> |
384 | <div class="widget-content" style="padding:0px;border: 0px; "> | 384 | <div class="widget-content" style="padding:0px;border: 0px; "> |
385 | <div class="table-responsive"> | 385 | <div class="table-responsive"> |
386 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> | 386 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> |
387 | <thead> | 387 | <thead> |
388 | <tr> | 388 | <tr> |
389 | <th>Tail</th> | 389 | <th>Tail</th> |
390 | <th>Make</th> | 390 | <th>Make</th> |
391 | <th>Model</th> | 391 | <th>Model</th> |
392 | <th>Size</th> | 392 | <th>Size</th> |
393 | <th>Margin</th> | 393 | <th>Margin</th> |
394 | </tr> | 394 | </tr> |
395 | </thead> | 395 | </thead> |
396 | <tbody> | 396 | <tbody> |
397 | <tr> | 397 | <tr> |
398 | <td> | 398 | <td> |
399 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> | 399 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> |
400 | </td> | 400 | </td> |
401 | <td style="width: 25%;"> | 401 | <td style="width: 25%;"> |
402 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> | 402 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> |
403 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> | 403 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
404 | </select> | 404 | </select> |
405 | </td> | 405 | </td> |
406 | <td style="width: 20%;"> | 406 | <td style="width: 20%;"> |
407 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> | 407 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> |
408 | <option ng-repeat="model in aircraftModalList">{{model}}</option> | 408 | <option ng-repeat="model in aircraftModalList">{{model}}</option> |
409 | </select> | 409 | </select> |
410 | </td> | 410 | </td> |
411 | <td style="width: 25%;"> | 411 | <td style="width: 25%;"> |
412 | <select class="form-control" ng-model="aircraft.size"> | 412 | <select class="form-control" ng-model="aircraft.size"> |
413 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> | 413 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> |
414 | </select> | 414 | </select> |
415 | </td> | 415 | </td> |
416 | <td> | 416 | <td> |
417 | <select class="form-control"> | 417 | <select class="form-control"> |
418 | <option>Margin1</option> | 418 | <option>Margin1</option> |
419 | <option>Margin2</option> | 419 | <option>Margin2</option> |
420 | </select> | 420 | </select> |
421 | </td> | 421 | </td> |
422 | </tr> | 422 | </tr> |
423 | </tbody> | 423 | </tbody> |
424 | 424 | ||
425 | </table> --> | 425 | </table> --> |
426 | <table class="table table-striped table-bordered"> | 426 | <table class="table table-striped table-bordered"> |
427 | <thead> | 427 | <thead> |
428 | <tr> | 428 | <tr> |
429 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 429 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
430 | <th>Tail</th> | 430 | <th>Tail</th> |
431 | <th>Make</th> | 431 | <th>Make</th> |
432 | <th>Model</th> | 432 | <th>Model</th> |
433 | <th>Size</th> | 433 | <th>Size</th> |
434 | <th>JET A Margin</th> | 434 | <th>JET A Margin</th> |
435 | <th>AVGS 100LL Margin</th> | 435 | <th>AVGS 100LL Margin</th> |
436 | </tr> | 436 | </tr> |
437 | </thead> | 437 | </thead> |
438 | <tbody> | 438 | <tbody> |
439 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 439 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
440 | <!-- <td> | 440 | <!-- <td> |
441 | <input type="checkbox" ng-model="aircraftData.selected"/> | 441 | <input type="checkbox" ng-model="aircraftData.selected"/> |
442 | </td> --> | 442 | </td> --> |
443 | <td style="width: 15%"> | 443 | <td style="width: 15%"> |
444 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 444 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
445 | </td> | 445 | </td> |
446 | <td style="width: 17%"> | 446 | <td style="width: 17%"> |
447 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 447 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
448 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 448 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
449 | <option value="" disabled>Select...</option> | 449 | <option value="" disabled>Select...</option> |
450 | </select> | 450 | </select> |
451 | </td> | 451 | </td> |
452 | <td style="width: 17%"> | 452 | <td style="width: 17%"> |
453 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 453 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
454 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 454 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
455 | <option value="" disabled>Select...</option> | 455 | <option value="" disabled>Select...</option> |
456 | </select> | 456 | </select> |
457 | </td> | 457 | </td> |
458 | <td style="width: 17%"> | 458 | <td style="width: 17%"> |
459 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> | 459 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> |
460 | <option value="" disabled>Select...</option> | 460 | <option value="" disabled>Select...</option> |
461 | </select> --> | 461 | </select> --> |
462 | <select class="form-control" ng-model="aircraftData.sizeId"> | 462 | <select class="form-control" ng-model="aircraftData.sizeId"> |
463 | <option value="" disabled>Select</option> | 463 | <option value="" disabled>Select</option> |
464 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 464 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
465 | </select> | 465 | </select> |
466 | <!-- <select class="form-control" ng-model="aircraftData.size"> | 466 | <!-- <select class="form-control" ng-model="aircraftData.size"> |
467 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | 467 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> |
468 | </select> --> | 468 | </select> --> |
469 | </td> | 469 | </td> |
470 | <td style="width: 17%"> | 470 | <td style="width: 17%"> |
471 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> | 471 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> |
472 | <option value="" disabled>Select...</option> | 472 | <option value="" disabled>Select...</option> |
473 | </select> --> | 473 | </select> --> |
474 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 474 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
475 | <option value="" disabled>Select</option> | 475 | <option value="" disabled>Select</option> |
476 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 476 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
477 | </select> | 477 | </select> |
478 | </td> | 478 | </td> |
479 | <td style="width: 17%"> | 479 | <td style="width: 17%"> |
480 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 480 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
481 | <option value="" disabled>Select...</option> | 481 | <option value="" disabled>Select...</option> |
482 | </select> --> | 482 | </select> --> |
483 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 483 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
484 | <option value="" disabled>Select</option> | 484 | <option value="" disabled>Select</option> |
485 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 485 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
486 | </select> | 486 | </select> |
487 | </td> | 487 | </td> |
488 | </tr> | 488 | </tr> |
489 | </tbody> | 489 | </tbody> |
490 | </table> | 490 | </table> |
491 | </div> | 491 | </div> |
492 | <div class="clearfix"></div> | 492 | <div class="clearfix"></div> |
493 | </div> | 493 | </div> |
494 | </div> | 494 | </div> |
495 | <div class="clearfix"></div> | 495 | <div class="clearfix"></div> |
496 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 496 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
497 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 497 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
498 | </div> | 498 | </div> |
499 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> | 499 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> |
500 | <div class="pull-right"> | 500 | <div class="pull-right"> |
501 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> | 501 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> |
502 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> | 502 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> |
503 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> | 503 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> |
504 | </div> | 504 | </div> |
505 | </div> --> | 505 | </div> --> |
506 | </div> | 506 | </div> |
507 | </div> | 507 | </div> |
508 | <div class="clearfix"></div> | 508 | <div class="clearfix"></div> |
509 | </div> | 509 | </div> |
510 | </div> | 510 | </div> |
511 | </div> | 511 | </div> |
512 | </div> | 512 | </div> |
513 | <!-- <div class="modal-body step-3" data-step="3"> | 513 | <!-- <div class="modal-body step-3" data-step="3"> |
514 | This is the final step. | 514 | This is the final step. |
515 | </div> --> | 515 | </div> --> |
516 | <div class="modal-footer" style="border-top: 0;"> | 516 | <div class="modal-footer" style="border-top: 0;"> |
517 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 517 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
518 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 518 | <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-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 519 | <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', 3)">Continue</button> --> | 520 | <!-- <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-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 521 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
522 | </div> | 522 | </div> |
523 | </div> | 523 | </div> |
524 | </div> | 524 | </div> |
525 | </form> | 525 | </form> |
526 | 526 | ||
527 | 527 | ||
528 | 528 | ||
529 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 529 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
530 | <div class="modal-dialog modal-lg"> | 530 | <div class="modal-dialog modal-lg"> |
531 | <div class="modal-content"> | 531 | <div class="modal-content"> |
532 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 532 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
533 | <div> | 533 | <div> |
534 | <div class="row" style="margin: 0;"> | 534 | <div class="row" style="margin: 0;"> |
535 | <div> | 535 | <div> |
536 | <div class="widget" style="margin-bottom: 0;"> | 536 | <div class="widget" style="margin-bottom: 0;"> |
537 | <div class="widget-header"> | 537 | <div class="widget-header"> |
538 | <i class="icon-pencil"></i> | 538 | <i class="icon-pencil"></i> |
539 | <i class="fa fa-tasks" aria-hidden="true"></i> | 539 | <i class="fa fa-tasks" aria-hidden="true"></i> |
540 | <h3>Add a Fuel Order</h3> | 540 | <h3>Add a Fuel Order</h3> |
541 | <div class="clearfix"></div> | 541 | <div class="clearfix"></div> |
542 | </div> | 542 | </div> |
543 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 543 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
544 | <div class="col-xs-12"> | 544 | <div class="col-xs-12"> |
545 | <div class="col-xs-12"> | 545 | <div class="col-xs-12"> |
546 | 546 | ||
547 | <div class="col-md-6"> | 547 | <div class="col-md-6"> |
548 | <div class="pull-left" style="width: 110px;"> | 548 | <div class="pull-left" style="width: 110px;"> |
549 | <label class="new-input-label"><b>Company</b></label> | 549 | <label class="new-input-label"><b>Company</b></label> |
550 | </div> | 550 | </div> |
551 | <div class="pull-left" style="width: calc(100% - 110px);"> | 551 | <div class="pull-left" style="width: calc(100% - 110px);"> |
552 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 552 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
553 | <option value="" selected disabled>Select Company</option> | 553 | <option value="" selected disabled>Select Company</option> |
554 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 554 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
555 | </select> | 555 | </select> |
556 | </div> | 556 | </div> |
557 | <div class="clearfix"></div> | 557 | <div class="clearfix"></div> |
558 | </div> | 558 | </div> |
559 | <div class="col-md-6"> | 559 | <div class="col-md-6"> |
560 | <div class="pull-left" style="width: 110px;"> | 560 | <div class="pull-left" style="width: 110px;"> |
561 | <label class="new-input-label"><b>Product</b></label> | 561 | <label class="new-input-label"><b>Product</b></label> |
562 | </div> | 562 | </div> |
563 | <div class="pull-left" style="width: calc(100% - 110px);"> | 563 | <div class="pull-left" style="width: calc(100% - 110px);"> |
564 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> | 564 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> |
565 | <option value="" selected disabled>Select Product</option> | 565 | <option value="" selected disabled>Select Product</option> |
566 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 566 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
567 | </select> | 567 | </select> |
568 | </div> | 568 | </div> |
569 | <div class="clearfix"></div> | 569 | <div class="clearfix"></div> |
570 | </div> | 570 | </div> |
571 | 571 | ||
572 | </div> | 572 | </div> |
573 | <div class="clearfix"></div> | 573 | <div class="clearfix"></div> |
574 | <br/> | 574 | <br/> |
575 | 575 | ||
576 | 576 | ||
577 | <div class="col-xs-12"> | 577 | <div class="col-xs-12"> |
578 | 578 | ||
579 | <div class="col-md-6"> | 579 | <div class="col-md-6"> |
580 | <div class="pull-left" style="width: 110px;"> | 580 | <div class="pull-left" style="width: 110px;"> |
581 | <label class="new-input-label"><b>Aircraft</b></label> | 581 | <label class="new-input-label"><b>Aircraft</b></label> |
582 | </div> | 582 | </div> |
583 | <div class="pull-left" style="width: calc(100% - 110px);"> | 583 | <div class="pull-left" style="width: calc(100% - 110px);"> |
584 | <select class="form-control" ng-model="order.aircraftName" required> | 584 | <select class="form-control" ng-model="order.aircraftName" required> |
585 | <option selected disabled value="">Select Aircraft</option> | 585 | <option selected disabled value="">Select Aircraft</option> |
586 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 586 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
587 | </select> | 587 | </select> |
588 | </div> | 588 | </div> |
589 | <div class="clearfix"></div> | 589 | <div class="clearfix"></div> |
590 | </div> | 590 | </div> |
591 | <div class="col-md-6"> | 591 | <div class="col-md-6"> |
592 | <div class="pull-left" style="width: 110px;"> | 592 | <div class="pull-left" style="width: 110px;"> |
593 | <label class="new-input-label"><b>Volume</b></label> | 593 | <label class="new-input-label"><b>Volume</b></label> |
594 | </div> | 594 | </div> |
595 | <div class="pull-left" style="width: calc(100% - 110px);"> | 595 | <div class="pull-left" style="width: calc(100% - 110px);"> |
596 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 596 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
597 | </div> | 597 | </div> |
598 | <div class="clearfix"></div> | 598 | <div class="clearfix"></div> |
599 | </div> | 599 | </div> |
600 | 600 | ||
601 | </div> | 601 | </div> |
602 | <div class="clearfix"></div> | 602 | <div class="clearfix"></div> |
603 | <br/> | 603 | <br/> |
604 | 604 | ||
605 | <div class="col-xs-12"> | 605 | <div class="col-xs-12"> |
606 | 606 | ||
607 | <div class="col-md-6"> | 607 | <div class="col-md-6"> |
608 | <div class="pull-left" style="width: 110px;"> | 608 | <div class="pull-left" style="width: 110px;"> |
609 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 609 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
610 | </div> | 610 | </div> |
611 | <div class="pull-left" style="width: calc(100% - 110px);"> | 611 | <div class="pull-left" style="width: calc(100% - 110px);"> |
612 | <div style="width: 50%; float: left;"> | 612 | <div style="width: 50%; float: left;"> |
613 | Date | 613 | Date |
614 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 614 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
615 | </div> | 615 | </div> |
616 | <div style="width: 50%; float: left;"> | 616 | <div style="width: 50%; float: left;"> |
617 | Time | 617 | Time |
618 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 618 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
619 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 619 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
620 | </select> | 620 | </select> |
621 | 621 | ||
622 | </div> | 622 | </div> |
623 | </div> | 623 | </div> |
624 | <div class="clearfix"></div> | 624 | <div class="clearfix"></div> |
625 | </div> | 625 | </div> |
626 | 626 | ||
627 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 627 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
628 | <div class="pull-left" style="width: 110px;"> | 628 | <div class="pull-left" style="width: 110px;"> |
629 | <label class="new-input-label"><b>Invoiced</b></label> | 629 | <label class="new-input-label"><b>Invoiced</b></label> |
630 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 630 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
631 | </div> | 631 | </div> |
632 | <div class="pull-left" style="width: calc(100% - 110px);"> | 632 | <div class="pull-left" style="width: calc(100% - 110px);"> |
633 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 633 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
634 | </div> | 634 | </div> |
635 | <div class="clearfix"></div> | 635 | <div class="clearfix"></div> |
636 | </div> | 636 | </div> |
637 | </div> | 637 | </div> |
638 | <div class="clearfix"></div><br> | 638 | <div class="clearfix"></div><br> |
639 | 639 | ||
640 | 640 | ||
641 | <div class="col-xs-12"> | 641 | <div class="col-xs-12"> |
642 | 642 | ||
643 | <div class="col-md-6"> | 643 | <div class="col-md-6"> |
644 | <div class="pull-left" style="width: 110px;"> | 644 | <div class="pull-left" style="width: 110px;"> |
645 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 645 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
646 | </div> | 646 | </div> |
647 | <div class="pull-left" style="width: calc(100% - 110px);"> | 647 | <div class="pull-left" style="width: calc(100% - 110px);"> |
648 | <div style="width: 50%; float: left;"> | 648 | <div style="width: 50%; float: left;"> |
649 | Date | 649 | Date |
650 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 650 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
651 | </div> | 651 | </div> |
652 | <div style="width: 50%; float: left;"> | 652 | <div style="width: 50%; float: left;"> |
653 | Time | 653 | Time |
654 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 654 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
655 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 655 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
656 | </select> | 656 | </select> |
657 | 657 | ||
658 | </div> | 658 | </div> |
659 | </div> | 659 | </div> |
660 | <div class="clearfix"></div> | 660 | <div class="clearfix"></div> |
661 | </div> | 661 | </div> |
662 | 662 | ||
663 | <div class="col-md-6" style="margin-top: 22px;"> | 663 | <div class="col-md-6" style="margin-top: 22px;"> |
664 | <div class="pull-left" style="width: 110px;"> | 664 | <div class="pull-left" style="width: 110px;"> |
665 | <label class="new-input-label"><b>Total</b></label> | 665 | <label class="new-input-label"><b>Total</b></label> |
666 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 666 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
667 | </div> | 667 | </div> |
668 | <div class="pull-left" style="width: calc(100% - 110px);"> | 668 | <div class="pull-left" style="width: calc(100% - 110px);"> |
669 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 669 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
670 | </div> | 670 | </div> |
671 | </div> | 671 | </div> |
672 | </div> | 672 | </div> |
673 | <div class="clearfix"></div><br> | 673 | <div class="clearfix"></div><br> |
674 | 674 | ||
675 | 675 | ||
676 | <div class="col-xs-12"> | 676 | <div class="col-xs-12"> |
677 | 677 | ||
678 | <div class="col-md-6"> | 678 | <div class="col-md-6"> |
679 | <div class="pull-left" style="width: 110px;"> | 679 | <div class="pull-left" style="width: 110px;"> |
680 | <label class="new-input-label"><b>Fuel on</b></label> | 680 | <label class="new-input-label"><b>Fuel on</b></label> |
681 | </div> | 681 | </div> |
682 | <div class="pull-left" style="width: calc(100% - 110px);"> | 682 | <div class="pull-left" style="width: calc(100% - 110px);"> |
683 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 683 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
684 | <option value="" disabled selected hidden>Select...</option> | 684 | <option value="" disabled selected hidden>Select...</option> |
685 | <option value="Arrival">Arrival</option> | 685 | <option value="Arrival">Arrival</option> |
686 | <option value="Departure">Departure</option> | 686 | <option value="Departure">Departure</option> |
687 | </select> | 687 | </select> |
688 | </div> | 688 | </div> |
689 | <div class="clearfix"></div> | 689 | <div class="clearfix"></div> |
690 | </div> | 690 | </div> |
691 | 691 | ||
692 | <div class="col-md-6"> | 692 | <div class="col-md-6"> |
693 | <div class="pull-left" style="width: 110px;"> | 693 | <div class="pull-left" style="width: 110px;"> |
694 | <label class="new-input-label"><b>FBO Cost</b></label> | 694 | <label class="new-input-label"><b>FBO Cost</b></label> |
695 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 695 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
696 | </div> | 696 | </div> |
697 | <div class="pull-left" style="width: calc(100% - 110px);"> | 697 | <div class="pull-left" style="width: calc(100% - 110px);"> |
698 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 698 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
699 | </div> | 699 | </div> |
700 | <div class="clearfix"></div> | 700 | <div class="clearfix"></div> |
701 | </div> | 701 | </div> |
702 | </div> | 702 | </div> |
703 | <div class="clearfix"></div><br> | 703 | <div class="clearfix"></div><br> |
704 | 704 | ||
705 | <div class="col-xs-12"> | 705 | <div class="col-xs-12"> |
706 | <div class="col-md-6"> | 706 | <div class="col-md-6"> |
707 | <div class="pull-left" style="width: 110px;"> | 707 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Source</b></label> | 708 | <label class="new-input-label"><b>Source</b></label> |
709 | </div> | 709 | </div> |
710 | <div class="pull-left" style="width: calc(100% - 110px);"> | 710 | <div class="pull-left" style="width: calc(100% - 110px);"> |
711 | <select class="form-control" ng-model="order.source" style="width: 100%;"> | 711 | <div style="font-weight: normal;" ng-if="baseTenant">Tenant/Base Customer</br></div> |
712 | <div style="font-weight: normal;" ng-if="contractFuelVendor">CAA Member</div> | ||
713 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | ||
712 | <option value="" disabled selected hidden>Select Source</option> | 714 | <option value="" disabled selected hidden>Select Source</option> |
713 | <option value="Tenant">Tenant</option> | 715 | <option value="Tenant">Tenant</option> |
714 | <option value="CAA">CAA</option> | 716 | <option value="CAA">CAA</option> |
715 | <option value="Tenant/CAA">Tenant/CAA</option> | 717 | <option value="Tenant/CAA">Tenant/CAA</option> |
716 | </select> | 718 | </select> --> |
717 | </div> | 719 | </div> |
718 | <div class="clearfix"></div> | 720 | <div class="clearfix"></div> |
719 | </div> | 721 | </div> |
720 | </div> | 722 | </div> |
721 | <div class="clearfix"></div> | 723 | <div class="clearfix"></div> |
722 | <br/> | 724 | <br/> |
723 | <div class="col-xs-12"> | 725 | <div class="col-xs-12"> |
724 | 726 | ||
725 | 727 | ||
726 | <div class="col-md-6"> | 728 | <div class="col-md-6"> |
727 | <div class="pull-left" style="width: 110px;"> | 729 | <div class="pull-left" style="width: 110px;"> |
728 | <label class="new-input-label"><b>Certificate Type</b></label> | 730 | <label class="new-input-label"><b>Certificate Type</b></label> |
729 | </div> | 731 | </div> |
730 | <div class="pull-left" style="width: calc(100% - 110px);"> | 732 | <div class="pull-left" style="width: calc(100% - 110px);"> |
731 | <select class="form-control" ng-model="order.certificateType" style="width: 100%;"> | 733 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
732 | <option value="" disabled selected hidden>Select...</option> | 734 | <option value="" disabled selected hidden>Select...</option> |
733 | <option value="corporate">Part 91 (Corporate)</option> | 735 | <option value="corporate">Part 91 (Corporate)</option> |
734 | <option value="charter">Part 135 (Charter)</option> | 736 | <option value="charter">Part 135 (Charter)</option> |
735 | <option value="scheduled">Part 121 (Scheduled)</option> | 737 | <option value="scheduled">Part 121 (Scheduled)</option> |
736 | <option value="military">Military</option> | 738 | <option value="military">Military</option> |
737 | <option value="government">Government</option> | 739 | <option value="government">Government</option> |
738 | </select> | 740 | </select> |
739 | </div> | 741 | </div> |
740 | <div class="clearfix"></div> | 742 | <div class="clearfix"></div> |
741 | </div> | 743 | </div> |
742 | <div class="col-md-6"> | 744 | <div class="col-md-6"> |
743 | <div class="pull-left" style="width: 110px;"> | 745 | <div class="pull-left" style="width: 110px;"> |
744 | <label class="new-input-label"><b>Status</b></label> | 746 | <label class="new-input-label"><b>Status</b></label> |
745 | </div> | 747 | </div> |
746 | <div class="pull-left" style="width: calc(100% - 110px);"> | 748 | <div class="pull-left" style="width: calc(100% - 110px);"> |
747 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 749 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
748 | <option value="" disabled selected hidden>pending</option> | 750 | <option value="" disabled selected hidden>pending</option> |
749 | <option value="pending">pending</option> | 751 | <option value="pending">pending</option> |
750 | <option value="invoiced">invoiced</option> | 752 | <option value="invoiced">invoiced</option> |
751 | <option value="paid">paid</option> | 753 | <option value="paid">paid</option> |
752 | <!-- <option value="cancelled">cancelled</option> | 754 | <!-- <option value="cancelled">cancelled</option> |
753 | <option value="archived">archived</option> --> | 755 | <option value="archived">archived</option> --> |
754 | </select> | 756 | </select> |
755 | </div> | 757 | </div> |
756 | <div class="clearfix"></div> | 758 | <div class="clearfix"></div> |
757 | </div> | 759 | </div> |
758 | </div> | 760 | </div> |
759 | <div class="clearfix"></div><br> | 761 | <div class="clearfix"></div><br> |
760 | 762 | ||
761 | </div> | 763 | </div> |
762 | </div> | 764 | </div> |
763 | </div> | 765 | </div> |
764 | </div> | 766 | </div> |
765 | </div> | 767 | </div> |
766 | </div> | 768 | </div> |
767 | <div class="modal-footer" style="border-top: 0;"> | 769 | <div class="modal-footer" style="border-top: 0;"> |
768 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 770 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
769 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> | 771 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> |
770 | </div> | 772 | </div> |
771 | </div> | 773 | </div> |
772 | </div> | 774 | </div> |
773 | </div> | 775 | </div> |
774 | </form> | 776 | </form> |
775 | 777 | ||
776 | 778 | ||
777 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> | 779 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> |
778 | <div class="modal-dialog modal-lg"> | 780 | <div class="modal-dialog modal-lg"> |
779 | <div class="modal-content"> | 781 | <div class="modal-content"> |
780 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 782 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
781 | <div> | 783 | <div> |
782 | <div class="row" style="margin: 0;"> | 784 | <div class="row" style="margin: 0;"> |
783 | <div> | 785 | <div> |
784 | <div class="widget" style="margin-bottom: 0;"> | 786 | <div class="widget" style="margin-bottom: 0;"> |
785 | <div class="widget-header"> | 787 | <div class="widget-header"> |
786 | <i class="icon-pencil"></i> | 788 | <i class="icon-pencil"></i> |
787 | <i class="fa fa-tasks" aria-hidden="true"></i> | 789 | <i class="fa fa-tasks" aria-hidden="true"></i> |
788 | <h3>Update Fuel Order</h3> | 790 | <h3>Update Fuel Order</h3> |
789 | <div class="clearfix"></div> | 791 | <div class="clearfix"></div> |
790 | </div> | 792 | </div> |
791 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 793 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
792 | <div class="col-xs-12"> | 794 | <div class="col-xs-12"> |
793 | <div class="col-xs-12"> | 795 | <div class="col-xs-12"> |
794 | 796 | ||
795 | <div class="col-md-6"> | 797 | <div class="col-md-6"> |
796 | <div class="pull-left" style="width: 110px;"> | 798 | <div class="pull-left" style="width: 110px;"> |
797 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 799 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
798 | </div> | 800 | </div> |
799 | <div class="pull-left" style="width: calc(100% - 110px);"> | 801 | <div class="pull-left" style="width: calc(100% - 110px);"> |
800 | <div style="width: 50%; float: left;"> | 802 | <div style="width: 50%; float: left;"> |
801 | Date | 803 | Date |
802 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> | 804 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> |
803 | </div> | 805 | </div> |
804 | <div style="width: 50%; float: left;"> | 806 | <div style="width: 50%; float: left;"> |
805 | Time | 807 | Time |
806 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> | 808 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> |
807 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 809 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
808 | </select> | 810 | </select> |
809 | 811 | ||
810 | </div> | 812 | </div> |
811 | </div> | 813 | </div> |
812 | <div class="clearfix"></div> | 814 | <div class="clearfix"></div> |
813 | </div> | 815 | </div> |
814 | <div class="col-md-6" style="margin-top: 25px;"> | 816 | <div class="col-md-6" style="margin-top: 25px;"> |
815 | <div class="pull-left" style="width: 110px;"> | 817 | <div class="pull-left" style="width: 110px;"> |
816 | <label class="new-input-label"><b>Volume</b></label> | 818 | <label class="new-input-label"><b>Volume</b></label> |
817 | </div> | 819 | </div> |
818 | <div class="pull-left" style="width: calc(100% - 110px);"> | 820 | <div class="pull-left" style="width: calc(100% - 110px);"> |
819 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> | 821 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> |
820 | </div> | 822 | </div> |
821 | <div class="clearfix"></div> | 823 | <div class="clearfix"></div> |
822 | </div> | 824 | </div> |
823 | </div> | 825 | </div> |
824 | <div class="clearfix"></div><br> | 826 | <div class="clearfix"></div><br> |
825 | 827 | ||
826 | <div class="col-xs-12"> | 828 | <div class="col-xs-12"> |
827 | 829 | ||
828 | <div class="col-md-6"> | 830 | <div class="col-md-6"> |
829 | <div class="pull-left" style="width: 110px;"> | 831 | <div class="pull-left" style="width: 110px;"> |
830 | <label class="new-input-label"><b>ETD</b></label> | 832 | <label class="new-input-label"><b>ETD</b></label> |
831 | </div> | 833 | </div> |
832 | <div class="pull-left" style="width: calc(100% - 110px);"> | 834 | <div class="pull-left" style="width: calc(100% - 110px);"> |
833 | <div style="width: 50%; float: left;"> | 835 | <div style="width: 50%; float: left;"> |
834 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> | 836 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> |
835 | </div> | 837 | </div> |
836 | <div style="width: 50%; float: left;"> | 838 | <div style="width: 50%; float: left;"> |
837 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> | 839 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> |
838 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 840 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
839 | </select> | 841 | </select> |
840 | </div> | 842 | </div> |
841 | </div> | 843 | </div> |
842 | <div class="clearfix"></div> | 844 | <div class="clearfix"></div> |
843 | </div> | 845 | </div> |
844 | <div class="col-md-6"> | 846 | <div class="col-md-6"> |
845 | <div class="pull-left" style="width: 110px;"> | 847 | <div class="pull-left" style="width: 110px;"> |
846 | <label class="new-input-label"><b>Fuel on</b></label> | 848 | <label class="new-input-label"><b>Fuel on</b></label> |
847 | </div> | 849 | </div> |
848 | <div class="pull-left" style="width: calc(100% - 110px);"> | 850 | <div class="pull-left" style="width: calc(100% - 110px);"> |
849 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> | 851 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> |
850 | <option value="" disabled selected hidden>Select...</option> | 852 | <option value="" disabled selected hidden>Select...</option> |
851 | <option value="Arrival">Arrival</option> | 853 | <option value="Arrival">Arrival</option> |
852 | <option value="Departure">Departure</option> | 854 | <option value="Departure">Departure</option> |
853 | </select> | 855 | </select> |
854 | </div> | 856 | </div> |
855 | <div class="clearfix"></div> | 857 | <div class="clearfix"></div> |
856 | </div> | 858 | </div> |
857 | </div> | 859 | </div> |
858 | <div class="clearfix"></div><br> | 860 | <div class="clearfix"></div><br> |
859 | 861 | ||
860 | <div class="col-xs-12"> | 862 | <div class="col-xs-12"> |
861 | 863 | ||
862 | <div class="col-md-6"> | 864 | <div class="col-md-6"> |
863 | <div class="pull-left" style="width: 110px;"> | 865 | <div class="pull-left" style="width: 110px;"> |
864 | <label class="new-input-label"><b>Company</b></label> | 866 | <label class="new-input-label"><b>Company</b></label> |
865 | </div> | 867 | </div> |
866 | <div class="pull-left" style="width: calc(100% - 110px);"> | 868 | <div class="pull-left" style="width: calc(100% - 110px);"> |
867 | {{editdata.companyName}} | 869 | {{editdata.companyName}} |
868 | </div> | 870 | </div> |
869 | <div class="clearfix"></div> | 871 | <div class="clearfix"></div> |
870 | </div> | 872 | </div> |
871 | <div class="col-md-6"> | 873 | <div class="col-md-6"> |
872 | <div class="pull-left" style="width: 110px;"> | 874 | <div class="pull-left" style="width: 110px;"> |
873 | <label class="new-input-label"><b>Invoiced</b></label> | 875 | <label class="new-input-label"><b>Invoiced</b></label> |
874 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 876 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
875 | </div> | 877 | </div> |
876 | <div class="pull-left" style="width: calc(100% - 110px);"> | 878 | <div class="pull-left" style="width: calc(100% - 110px);"> |
877 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> | 879 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> |
878 | </div> | 880 | </div> |
879 | <div class="clearfix"></div> | 881 | <div class="clearfix"></div> |
880 | </div> | 882 | </div> |
881 | 883 | ||
882 | </div> | 884 | </div> |
883 | <div class="clearfix"></div> | 885 | <div class="clearfix"></div> |
884 | <br/> | 886 | <br/> |
885 | 887 | ||
886 | 888 | ||
887 | <div class="col-xs-12"> | 889 | <div class="col-xs-12"> |
888 | 890 | ||
889 | <div class="col-md-6"> | 891 | <div class="col-md-6"> |
890 | <div class="pull-left" style="width: 110px;"> | 892 | <div class="pull-left" style="width: 110px;"> |
891 | <label class="new-input-label"><b>Tail #</b></label> | 893 | <label class="new-input-label"><b>Tail #</b></label> |
892 | </div> | 894 | </div> |
893 | <div class="pull-left" style="width: calc(100% - 110px);"> | 895 | <div class="pull-left" style="width: calc(100% - 110px);"> |
894 | {{editdata.aircraftName}} | 896 | {{editdata.aircraftName}} |
895 | </div> | 897 | </div> |
896 | <div class="clearfix"></div> | 898 | <div class="clearfix"></div> |
897 | </div> | 899 | </div> |
898 | <div class="col-md-6"> | 900 | <div class="col-md-6"> |
899 | <div class="pull-left" style="width: 110px;"> | 901 | <div class="pull-left" style="width: 110px;"> |
900 | <label class="new-input-label"><b>Total</b></label> | 902 | <label class="new-input-label"><b>Total</b></label> |
901 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 903 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
902 | </div> | 904 | </div> |
903 | <div class="pull-left" style="width: calc(100% - 110px);"> | 905 | <div class="pull-left" style="width: calc(100% - 110px);"> |
904 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> | 906 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> |
905 | </div> | 907 | </div> |
906 | <div class="clearfix"></div> | 908 | <div class="clearfix"></div> |
907 | </div> | 909 | </div> |
908 | </div> | 910 | </div> |
909 | <div class="clearfix"></div> | 911 | <div class="clearfix"></div> |
910 | <br/> | 912 | <br/> |
911 | <div class="col-xs-12"> | 913 | <div class="col-xs-12"> |
912 | 914 | ||
913 | 915 | ||
914 | <div class="col-md-6"> | 916 | <div class="col-md-6"> |
915 | <div class="pull-left" style="width: 110px;"> | 917 | <div class="pull-left" style="width: 110px;"> |
916 | <label class="new-input-label"><b>Source</b></label> | 918 | <label class="new-input-label"><b>Source</b></label> |
917 | </div> | 919 | </div> |
918 | <div class="pull-left" style="width: calc(100% - 110px);"> | 920 | <div class="pull-left" style="width: calc(100% - 110px);"> |
919 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> | 921 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> |
920 | <option value="" disabled selected hidden>Select Source</option> | 922 | <option value="" disabled selected hidden>Select Source</option> |
921 | <option value="Tenant">Tenant</option> | 923 | <option value="Tenant">Tenant</option> |
922 | <option value="CAA">CAA</option> | 924 | <option value="CAA">CAA</option> |
923 | <option value="Tenant/CAA">Tenant/CAA</option> | 925 | <option value="Tenant/CAA">Tenant/CAA</option> |
924 | </select> | 926 | </select> |
925 | </div> | 927 | </div> |
926 | <div class="clearfix"></div> | 928 | <div class="clearfix"></div> |
927 | </div> | 929 | </div> |
928 | <div class="col-md-6"> | 930 | <div class="col-md-6"> |
929 | <div class="pull-left" style="width: 110px;"> | 931 | <div class="pull-left" style="width: 110px;"> |
930 | <label class="new-input-label"><b>Product</b></label> | 932 | <label class="new-input-label"><b>Product</b></label> |
931 | </div> | 933 | </div> |
932 | <div class="pull-left" style="width: calc(100% - 110px);"> | 934 | <div class="pull-left" style="width: calc(100% - 110px);"> |
933 | {{editdata.productName}} | 935 | {{editdata.productName}} |
934 | </div> | 936 | </div> |
935 | <div class="clearfix"></div> | 937 | <div class="clearfix"></div> |
936 | </div> | 938 | </div> |
937 | </div> | 939 | </div> |
938 | <div class="clearfix"></div> | 940 | <div class="clearfix"></div> |
939 | <br/> | 941 | <br/> |
940 | 942 | ||
941 | <div class="col-xs-12"> | 943 | <div class="col-xs-12"> |
942 | 944 | ||
943 | <div class="col-md-6"> | 945 | <div class="col-md-6"> |
944 | <div class="pull-left" style="width: 110px;"> | 946 | <div class="pull-left" style="width: 110px;"> |
945 | <label class="new-input-label"><b>Status</b></label> | 947 | <label class="new-input-label"><b>Status</b></label> |
946 | </div> | 948 | </div> |
947 | <div class="pull-left" style="width: calc(100% - 110px);"> | 949 | <div class="pull-left" style="width: calc(100% - 110px);"> |
948 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> | 950 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> |
949 | <option value="" disabled selected hidden>Select Status</option> | 951 | <option value="" disabled selected hidden>Select Status</option> |
950 | <option value="pending">pending</option> | 952 | <option value="pending">pending</option> |
951 | <option value="invoiced">invoiced</option> | 953 | <option value="invoiced">invoiced</option> |
952 | <option value="paid">paid</option> | 954 | <option value="paid">paid</option> |
953 | <option value="cancelled">cancelled</option> | 955 | <option value="cancelled">cancelled</option> |
954 | <option value="archived">archived</option> | 956 | <option value="archived">archived</option> |
955 | </select> | 957 | </select> |
956 | </div> | 958 | </div> |
957 | <div class="clearfix"></div> | 959 | <div class="clearfix"></div> |
958 | </div> | 960 | </div> |
959 | <div class="col-md-6"> | 961 | <div class="col-md-6"> |
960 | <div class="pull-left" style="width: 110px;"> | 962 | <div class="pull-left" style="width: 110px;"> |
961 | <label class="new-input-label"><b>Certificate Type</b></label> | 963 | <label class="new-input-label"><b>Certificate Type</b></label> |
962 | </div> | 964 | </div> |
963 | <div class="pull-left" style="width: calc(100% - 110px);"> | 965 | <div class="pull-left" style="width: calc(100% - 110px);"> |
964 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> | 966 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> |
965 | <option value="" disabled selected hidden>Select...</option> | 967 | <option value="" disabled selected hidden>Select...</option> |
966 | <option value="corporate">Part 91 (Corporate)</option> | 968 | <option value="corporate">Part 91 (Corporate)</option> |
967 | <option value="charter">Part 135 (Charter)</option> | 969 | <option value="charter">Part 135 (Charter)</option> |
968 | <option value="scheduled">Part 121 (Scheduled)</option> | 970 | <option value="scheduled">Part 121 (Scheduled)</option> |
969 | <option value="military">Military</option> | 971 | <option value="military">Military</option> |
970 | <option value="government">Government</option> | 972 | <option value="government">Government</option> |
971 | </select> | 973 | </select> |
972 | </div> | 974 | </div> |
973 | 975 | ||
974 | </div> | 976 | </div> |
975 | <div class="clearfix"></div> | 977 | <div class="clearfix"></div> |
976 | <br/> | 978 | <br/> |
977 | <div class="col-xs-12"> | 979 | <div class="col-xs-12"> |
978 | </div> | 980 | </div> |
979 | <div class="clearfix"></div> | 981 | <div class="clearfix"></div> |
980 | <br/> | 982 | <br/> |
981 | <div class="col-xs-12"> | 983 | <div class="col-xs-12"> |
982 | 984 | ||
983 | </div> | 985 | </div> |
984 | <div class="clearfix"></div> | 986 | <div class="clearfix"></div> |
985 | 987 | ||
986 | </div> | 988 | </div> |
987 | </div> | 989 | </div> |
988 | <div class="clearfix"></div> | 990 | <div class="clearfix"></div> |
989 | </div> | 991 | </div> |
990 | </div> | 992 | </div> |
991 | </div> | 993 | </div> |
992 | </div> | 994 | </div> |
993 | 995 | ||
994 | <div class="modal-footer" style="border-top: 0;"> | 996 | <div class="modal-footer" style="border-top: 0;"> |
995 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> | 997 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> |
996 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> | 998 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> |
997 | </div> | 999 | </div> |
998 | </div> | 1000 | </div> |
999 | </div> | 1001 | </div> |
1000 | </div> | 1002 | </div> |
1001 | </form> | 1003 | </form> |
1002 | 1004 | ||
1003 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> | 1005 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> |
1004 | <div class="modal-dialog modal-xs"> | 1006 | <div class="modal-dialog modal-xs"> |
1005 | <div class="modal-content"> | 1007 | <div class="modal-content"> |
1006 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 1008 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
1007 | <div> | 1009 | <div> |
1008 | <div class="row" style="margin: 0;"> | 1010 | <div class="row" style="margin: 0;"> |
1009 | <div> | 1011 | <div> |
1010 | <div class="widget" style="margin-bottom: 0;"> | 1012 | <div class="widget" style="margin-bottom: 0;"> |
1011 | <div class="widget-header"> | 1013 | <div class="widget-header"> |
1012 | <i class="icon-pencil"></i> | 1014 | <i class="icon-pencil"></i> |
1013 | <i class="fa fa-tasks" aria-hidden="true"></i> | 1015 | <i class="fa fa-tasks" aria-hidden="true"></i> |
1014 | <h3>Upload Attachment</h3> | 1016 | <h3>Upload Attachment</h3> |
1015 | <div class="clearfix"></div> | 1017 | <div class="clearfix"></div> |
1016 | </div> | 1018 | </div> |
1017 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 1019 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
1018 | <div class="col-xs-6"> | 1020 | <div class="col-xs-6"> |
1019 | <div class="col-xs-6"> | 1021 | <div class="col-xs-6"> |
1020 | 1022 | ||
1021 | <div class="col-md-6"> | 1023 | <div class="col-md-6"> |
1022 | <div class="pull-left" style="width: 110px;"> | 1024 | <div class="pull-left" style="width: 110px;"> |
1023 | <label class="new-input-label"><b>Upload</b></label> | 1025 | <label class="new-input-label"><b>Upload</b></label> |
1024 | <br> | 1026 | <br> |
1025 | <br> | 1027 | <br> |
1026 | </div> | 1028 | </div> |
1027 | <div class="pull-left" style="width: calc(100% - 110px);"> | 1029 | <div class="pull-left" style="width: calc(100% - 110px);"> |
1028 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> | 1030 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> |
1029 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> | 1031 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> |
1030 | </div> | 1032 | </div> |
1031 | <div class="clearfix"></div> | 1033 | <div class="clearfix"></div> |
1032 | </div> | 1034 | </div> |
1033 | </div> | 1035 | </div> |
1034 | <div class="clearfix"></div><br> | 1036 | <div class="clearfix"></div><br> |
1035 | 1037 | ||
1036 | </div> | 1038 | </div> |
1037 | </div> | 1039 | </div> |
1038 | <div class="clearfix"></div> | 1040 | <div class="clearfix"></div> |
1039 | </div> | 1041 | </div> |
1040 | </div> | 1042 | </div> |
1041 | </div> | 1043 | </div> |
1042 | </div> | 1044 | </div> |
1043 | 1045 | ||
1044 | <div class="modal-footer" style="border-top: 0;"> | 1046 | <div class="modal-footer" style="border-top: 0;"> |
1045 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> | 1047 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> |
1046 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> | 1048 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> |
1047 | </div> | 1049 | </div> |
1048 | </div> | 1050 | </div> |
1049 | </div> | 1051 | </div> |
1050 | </div> | 1052 | </div> |
1051 | </form> | 1053 | </form> |
1052 | 1054 | ||
1053 | <div class="customConfirmPopBackdrop" id="delete1"> | 1055 | <div class="customConfirmPopBackdrop" id="delete1"> |
1054 | <div class="customModalInner" style="max-width: 400px;"> | 1056 | <div class="customModalInner" style="max-width: 400px;"> |
1055 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1057 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1056 | <table> | 1058 | <table> |
1057 | <tr> | 1059 | <tr> |
1058 | <td> | 1060 | <td> |
1059 | <img src="img/info.png" style="width: 50px;"> | 1061 | <img src="img/info.png" style="width: 50px;"> |
1060 | </td> | 1062 | </td> |
1061 | <td> | 1063 | <td> |
1062 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> | 1064 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> |
1063 | </td> | 1065 | </td> |
1064 | </tr> | 1066 | </tr> |
1065 | </table> | 1067 | </table> |
1066 | </div> | 1068 | </div> |
1067 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1069 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1068 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> | 1070 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> |
1069 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> | 1071 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> |
1070 | </div> | 1072 | </div> |
1071 | </div> | 1073 | </div> |
1072 | </div> | 1074 | </div> |
1073 | 1075 | ||
1074 | 1076 | ||
1075 | 1077 | ||
1076 | <div class="myLoader" ng-show="showLoader"> | 1078 | <div class="myLoader" ng-show="showLoader"> |
1077 | <img src="../img/hourglass.gif" width="50px;"> | 1079 | <img src="../img/hourglass.gif" width="50px;"> |
1078 | </div> | 1080 | </div> |
1079 | <script src="js/multi-step-modal.js"></script> | 1081 | <script src="js/multi-step-modal.js"></script> |
1080 | <script> | 1082 | <script> |
1081 | sendEvent = function(sel, step) { | 1083 | sendEvent = function(sel, step) { |
1082 | $(sel).trigger('next.m.' + step); | 1084 | $(sel).trigger('next.m.' + step); |
1083 | } | 1085 | } |
1084 | </script> | 1086 | </script> |
1085 | 1087 | ||
1086 | <script> | 1088 | <script> |
1087 | angular.module("KendoDemos", [ "kendo.directives" ]) | 1089 | angular.module("KendoDemos", [ "kendo.directives" ]) |
1088 | .controller("MyCtrl", function($scope){ | 1090 | .controller("MyCtrl", function($scope){ |
1089 | $scope.getType = function(x) { | 1091 | $scope.getType = function(x) { |
1090 | return typeof x; | 1092 | return typeof x; |
1091 | }; | 1093 | }; |
1092 | $scope.isDate = function(x) { | 1094 | $scope.isDate = function(x) { |
1093 | return x instanceof Date; | 1095 | return x instanceof Date; |
1094 | }; | 1096 | }; |
1095 | }) | 1097 | }) |
1096 | </script> | 1098 | </script> |
app/partials/viewCompany/viewCompany.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 | 5 | ||
6 | .controller('viewCompanyController', ['$scope', '$uibModal', '$stateParams', 'ViewCompanyService', 'CustomersService', 'updateFuelManagerService', 'ViewFuelVendorService', 'ViewcontactService', '$state', 'fuelOrdersService', 'enterFuelOrderService', 'NgTableParams', function($scope, $uibModal, $stateParams, ViewCompanyService, CustomersService, updateFuelManagerService, ViewFuelVendorService, ViewcontactService, $state, fuelOrdersService, enterFuelOrderService, NgTableParams) { | 6 | .controller('viewCompanyController', ['$scope', '$uibModal', '$stateParams', 'ViewCompanyService', 'CustomersService', 'updateFuelManagerService', 'ViewFuelVendorService', 'ViewcontactService', '$state', 'fuelOrdersService', 'enterFuelOrderService', 'NgTableParams', function($scope, $uibModal, $stateParams, ViewCompanyService, CustomersService, updateFuelManagerService, ViewFuelVendorService, ViewcontactService, $state, fuelOrdersService, enterFuelOrderService, NgTableParams) { |
7 | $scope.data = {}; | 7 | $scope.data = {}; |
8 | $scope.data.priceEmail = true; | 8 | $scope.data.priceEmail = true; |
9 | $scope.aircraft = {}; | 9 | $scope.aircraft = {}; |
10 | $scope.primayData = {}; | 10 | $scope.primayData = {}; |
11 | $scope.showLoader = false; | 11 | $scope.showLoader = false; |
12 | $scope.showUpdateBtn = false; | 12 | $scope.showUpdateBtn = false; |
13 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); | 13 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); |
14 | $scope.selected = []; | 14 | $scope.selected = []; |
15 | $scope.jetShow = []; | 15 | $scope.jetShow = []; |
16 | $scope.marginShow = []; | 16 | $scope.marginShow = []; |
17 | $scope.compId = $stateParams.id; | 17 | $scope.compId = $stateParams.id; |
18 | $scope.jetShow[0] = true; | 18 | $scope.jetShow[0] = true; |
19 | $scope.marginShow[0] = true; | 19 | $scope.marginShow[0] = true; |
20 | $scope.dispatchOrder = {}; | 20 | $scope.dispatchOrder = {}; |
21 | $scope.dispatchOrder.fuelOrderList = []; | 21 | $scope.dispatchOrder.fuelOrderList = []; |
22 | $scope.statusFilterOptions = []; | 22 | $scope.statusFilterOptions = []; |
23 | $scope.companyList = {}; | 23 | $scope.companyList = {}; |
24 | $scope.statusFilterOptions.push({ | 24 | $scope.statusFilterOptions.push({ |
25 | 'id': '', | 25 | 'id': '', |
26 | 'title': 'Show All' | 26 | 'title': 'Show All' |
27 | }, { | 27 | }, { |
28 | 'id': 'pending', | 28 | 'id': 'pending', |
29 | 'title': 'Pending' | 29 | 'title': 'Pending' |
30 | }, { | 30 | }, { |
31 | 'id': 'invoiced', | 31 | 'id': 'invoiced', |
32 | 'title': 'Invoiced' | 32 | 'title': 'Invoiced' |
33 | }, { | 33 | }, { |
34 | 'id': 'paid', | 34 | 'id': 'paid', |
35 | 'title': 'Paid' | 35 | 'title': 'Paid' |
36 | }, { | 36 | }, { |
37 | 'id': 'cancelled', | 37 | 'id': 'cancelled', |
38 | 'title': 'Cancelled' | 38 | 'title': 'Cancelled' |
39 | }, { | 39 | }, { |
40 | 'id': 'archived', | 40 | 'id': 'archived', |
41 | 'title': 'Archived' | 41 | 'title': 'Archived' |
42 | } | 42 | } |
43 | 43 | ||
44 | ); | 44 | ); |
45 | 45 | ||
46 | $scope.order = {}; | 46 | $scope.order = {}; |
47 | $scope.order.companyName = ''; | 47 | $scope.order.companyName = ''; |
48 | $scope.order.upliftDate = ''; | 48 | $scope.order.upliftDate = ''; |
49 | /*Get AllCompany api is used from CustomersService*/ | 49 | /*Get AllCompany api is used from CustomersService*/ |
50 | getAllCompanies(); | 50 | getAllCompanies(); |
51 | 51 | ||
52 | function getAllCompanies() { | 52 | function getAllCompanies() { |
53 | CustomersService.getAllCompanies().then(function(result) { | 53 | CustomersService.getAllCompanies().then(function(result) { |
54 | //console.log('log', result[2].id); | 54 | //console.log('log', result[2].id); |
55 | $scope.companyList = result; | 55 | $scope.companyList = result; |
56 | 56 | ||
57 | for (var i = 0; i < $scope.companyList.length; i++) { | 57 | for (var i = 0; i < $scope.companyList.length; i++) { |
58 | if ($scope.companyList[i].companyContact != null) { | 58 | if ($scope.companyList[i].companyContact != null) { |
59 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 59 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
60 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 60 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
61 | } | 61 | } |
62 | } | 62 | } |
63 | if ($scope.companyList[i].primaryContact != null) { | 63 | if ($scope.companyList[i].primaryContact != null) { |
64 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 64 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
65 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 65 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
66 | } | 66 | } |
67 | } | 67 | } |
68 | if ($scope.companyList[i].margin != null) { | 68 | if ($scope.companyList[i].margin != null) { |
69 | if ($scope.companyList[i].margin.marginName != null) { | 69 | if ($scope.companyList[i].margin.marginName != null) { |
70 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 70 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | } | 73 | } |
74 | $scope.displayCompanyList = new NgTableParams({ | 74 | $scope.displayCompanyList = new NgTableParams({ |
75 | page: 1, | 75 | page: 1, |
76 | count: 10, | 76 | count: 10, |
77 | }, { | 77 | }, { |
78 | data: $scope.companyList | 78 | data: $scope.companyList |
79 | }); | 79 | }); |
80 | $scope.showLoader = false; | 80 | $scope.showLoader = false; |
81 | }) | 81 | }) |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | $(document).ready(function() { | 85 | $(document).ready(function() { |
86 | $("#reset").click(function() { | 86 | $("#reset").click(function() { |
87 | $("input").val(""); | 87 | $("input").val(""); |
88 | }); | 88 | }); |
89 | }); | 89 | }); |
90 | 90 | ||
91 | $scope.values = [{ | 91 | $scope.values = [{ |
92 | 'id': 1, | 92 | 'id': 1, |
93 | 'first': 'Tenant/Base Customer' | 93 | 'first': 'Tenant/Base Customer' |
94 | }, | 94 | }, |
95 | { | 95 | { |
96 | 'id': 2, | 96 | 'id': 2, |
97 | 'first': 'FuelerLinx Customer' | 97 | 'first': 'FuelerLinx Customer' |
98 | }, | 98 | }, |
99 | { | 99 | { |
100 | 'id': 3, | 100 | 'id': 3, |
101 | 'first': 'CAA Member' | 101 | 'first': 'CAA Member' |
102 | } | 102 | } |
103 | ]; | 103 | ]; |
104 | 104 | ||
105 | 105 | ||
106 | 106 | ||
107 | $scope.changeValue = function(selected) { | 107 | $scope.changeValue = function(selected) { |
108 | $scope.showUpdateBtn = true; | 108 | $scope.showUpdateBtn = true; |
109 | // console.log("data to be true", selected); | 109 | // console.log("data to be true", selected); |
110 | for (var i = 0; i < selected.length; i++) { | 110 | for (var i = 0; i < selected.length; i++) { |
111 | // console.log(selected[i]) | 111 | // console.log(selected[i]) |
112 | if (selected[i] == 'Tenant/Base Customer') { | 112 | if (selected[i] == 'Tenant/Base Customer') { |
113 | $scope.companyData.baseTenant = true; | 113 | $scope.companyData.baseTenant = true; |
114 | } else { | 114 | } else { |
115 | $scope.companyData.baseTenant = false; | 115 | $scope.companyData.baseTenant = false; |
116 | } | 116 | } |
117 | if (selected[i] == 'FuelerLinx Customer') { | 117 | if (selected[i] == 'FuelerLinx Customer') { |
118 | $scope.companyData.fuelerlinxCustomer = true; | 118 | $scope.companyData.fuelerlinxCustomer = true; |
119 | } else { | 119 | } else { |
120 | $scope.companyData.fuelerlinxCustomer = false; | 120 | $scope.companyData.fuelerlinxCustomer = false; |
121 | } | 121 | } |
122 | 122 | ||
123 | if (selected[i] == 'CAA Member') { | 123 | if (selected[i] == 'CAA Member') { |
124 | $scope.companyData.contractFuelVendor = true; | 124 | $scope.companyData.contractFuelVendor = true; |
125 | } else { | 125 | } else { |
126 | $scope.companyData.contractFuelVendor = false; | 126 | $scope.companyData.contractFuelVendor = false; |
127 | } | 127 | } |
128 | 128 | ||
129 | // console.log($scope.companyData) | 129 | // console.log($scope.companyData) |
130 | 130 | ||
131 | } | 131 | } |
132 | 132 | ||
133 | } | 133 | } |
134 | 134 | ||
135 | // $scope.selected =[ | 135 | // $scope.selected =[ |
136 | // {'id': 1, 'first': 'Tenant/Base Customer'}, | 136 | // {'id': 1, 'first': 'Tenant/Base Customer'}, |
137 | // {'id': 2, 'first': 'FuelerLinx Customer'}, | 137 | // {'id': 2, 'first': 'FuelerLinx Customer'}, |
138 | // {'id': 3, 'first': 'CAA Member'} | 138 | // {'id': 3, 'first': 'CAA Member'} |
139 | // ]; | 139 | // ]; |
140 | 140 | ||
141 | // CustomersService.getMargin().then(function(result) { | 141 | // CustomersService.getMargin().then(function(result) { |
142 | // $scope.marginList = result; | 142 | // $scope.marginList = result; |
143 | // }) | 143 | // }) |
144 | 144 | ||
145 | var value = ""; | 145 | var value = ""; |
146 | var companyId = $stateParams.id; | 146 | var companyId = $stateParams.id; |
147 | 147 | ||
148 | $scope.companyData = {}; | 148 | $scope.companyData = {}; |
149 | $scope.multipleMsg = false; | 149 | $scope.multipleMsg = false; |
150 | $scope.companyData.masterMargin = ""; | 150 | $scope.companyData.masterMargin = ""; |
151 | $scope.isGlobal = false; | 151 | $scope.isGlobal = false; |
152 | getCompanyDetail(); | 152 | getCompanyDetail(); |
153 | 153 | ||
154 | function getCompanyDetail() { | 154 | function getCompanyDetail() { |
155 | $scope.showLoader = true; | 155 | $scope.showLoader = true; |
156 | ViewCompanyService.getCompany(companyId).then(function(result) { | 156 | ViewCompanyService.getCompany(companyId).then(function(result) { |
157 | console.log("===getCompanyDetail====",result) | ||
157 | $scope.companyData = result; | 158 | $scope.companyData = result; |
158 | $scope.isGlobal = result.global; | 159 | $scope.isGlobal = result.global; |
159 | if (result.global == true) { | 160 | if (result.global == true) { |
160 | $scope.companyData.global = true; | 161 | $scope.companyData.global = true; |
161 | } | 162 | } |
162 | if (result.margin != null) { | 163 | if (result.margin != null) { |
163 | $scope.companyData.masterMargin = result.margin.id; | 164 | $scope.companyData.masterMargin = result.margin.id; |
164 | } | 165 | } |
165 | if (result.marginAVGAS != null) { | 166 | if (result.marginAVGAS != null) { |
166 | $scope.companyData.avgasMargin = result.marginAVGAS.id; | 167 | $scope.companyData.avgasMargin = result.marginAVGAS.id; |
167 | } | 168 | } |
168 | 169 | ||
169 | 170 | ||
170 | 171 | ||
171 | if ($scope.companyData.baseTenant) { | 172 | if ($scope.companyData.baseTenant) { |
172 | 173 | ||
173 | $scope.selected.push({ | 174 | $scope.selected.push({ |
174 | 'first': 'Tenant/Base Customer' | 175 | 'first': 'Tenant/Base Customer' |
175 | }) | 176 | }) |
176 | // console.log("$scope.selected",$scope.selected) | 177 | // console.log("$scope.selected",$scope.selected) |
177 | 178 | ||
178 | } | 179 | } |
179 | 180 | ||
180 | if ($scope.companyData.fuelerlinxCustomer) { | 181 | if ($scope.companyData.fuelerlinxCustomer) { |
181 | $scope.selected.push({ | 182 | $scope.selected.push({ |
182 | 'first': 'FuelerLinx Customer' | 183 | 'first': 'FuelerLinx Customer' |
183 | }) | 184 | }) |
184 | // console.log("$scope.selected",$scope.selected) | 185 | // console.log("$scope.selected",$scope.selected) |
185 | } | 186 | } |
186 | 187 | ||
187 | if ($scope.companyData.contractFuelVendor) { | 188 | if ($scope.companyData.contractFuelVendor) { |
188 | $scope.selected.push({ | 189 | $scope.selected.push({ |
189 | 'first': 'CAA Member' | 190 | 'first': 'CAA Member' |
190 | }) | 191 | }) |
191 | // console.log("$scope.selected",$scope.selected) | 192 | // console.log("$scope.selected",$scope.selected) |
192 | } | 193 | } |
193 | 194 | ||
194 | // console.log("$scope.companyData",$scope.companyData) | 195 | // console.log("$scope.companyData",$scope.companyData) |
195 | getAircraftList(); | 196 | getAircraftList(); |
196 | $scope.order.companyName = $scope.companyData.companyName; | 197 | $scope.order.companyName = $scope.companyData.companyName; |
197 | $scope.getAircraft(result.companyName); | 198 | $scope.getAircraft(result.companyName); |
198 | $scope.showLoader = false; | 199 | $scope.showLoader = false; |
199 | }) | 200 | }) |
200 | } | 201 | } |
201 | 202 | ||
202 | 203 | ||
203 | $scope.changeCompanyStatus = function() { | 204 | $scope.changeCompanyStatus = function() { |
204 | $('#delete3').css('display', 'block'); | 205 | $('#delete3').css('display', 'block'); |
205 | if ($scope.companyData.activate == true) { | 206 | if ($scope.companyData.activate == true) { |
206 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' | 207 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' |
207 | } else { | 208 | } else { |
208 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' | 209 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' |
209 | } | 210 | } |
210 | } | 211 | } |
211 | 212 | ||
212 | $scope.companyStatus = function() { | 213 | $scope.companyStatus = function() { |
213 | $scope.showLoader = true; | 214 | $scope.showLoader = true; |
214 | var statusData = "status=" + $scope.companyData.activate; | 215 | var statusData = "status=" + $scope.companyData.activate; |
215 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { | 216 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { |
216 | if (result.success) { | 217 | if (result.success) { |
217 | $('#delete3').css('display', 'none'); | 218 | $('#delete3').css('display', 'none'); |
218 | toastr.success('' + result.success + '', { | 219 | toastr.success('' + result.success + '', { |
219 | closeButton: true | 220 | closeButton: true |
220 | }) | 221 | }) |
221 | getContactList(); | 222 | getContactList(); |
222 | } | 223 | } |
223 | }) | 224 | }) |
224 | $scope.showLoader = false; | 225 | $scope.showLoader = false; |
225 | } | 226 | } |
226 | 227 | ||
227 | 228 | ||
228 | $scope.cancelStatus = function() { | 229 | $scope.cancelStatus = function() { |
229 | $('#delete3').css('display', 'none'); | 230 | $('#delete3').css('display', 'none'); |
230 | $scope.companyData.activate = !$scope.companyData.activate; | 231 | $scope.companyData.activate = !$scope.companyData.activate; |
231 | } | 232 | } |
232 | 233 | ||
233 | getContactList(); | 234 | getContactList(); |
234 | 235 | ||
235 | function getContactList() { | 236 | function getContactList() { |
236 | ViewCompanyService.getContact(companyId).then(function(result) { | 237 | ViewCompanyService.getContact(companyId).then(function(result) { |
237 | $scope.companyContactList = result; | 238 | $scope.companyContactList = result; |
238 | }) | 239 | }) |
239 | } | 240 | } |
240 | $scope.aircraftmargins = []; | 241 | $scope.aircraftmargins = []; |
241 | 242 | ||
242 | $scope.abc = false; | 243 | $scope.abc = false; |
243 | $scope.xyz = false; | 244 | $scope.xyz = false; |
244 | function getAircraftList() { | 245 | function getAircraftList() { |
245 | ViewCompanyService.getAircraft(companyId).then(function(result) { | 246 | ViewCompanyService.getAircraft(companyId).then(function(result) { |
246 | 247 | ||
247 | $scope.contactAircraftList = result; | 248 | $scope.contactAircraftList = result; |
248 | console.log("===contactAircraftList===",result) | 249 | console.log("===contactAircraftList===",result) |
249 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 250 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
250 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 251 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
251 | $scope.aircraftmargins.push({ | 252 | $scope.aircraftmargins.push({ |
252 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 253 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
253 | }) | 254 | }) |
254 | $scope.contactAircraftList[i].fuelType = "Jet-A"; | 255 | $scope.contactAircraftList[i].fuelType = "Jet-A"; |
255 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; | 256 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; |
256 | $scope.abc = true; | 257 | $scope.abc = true; |
257 | 258 | ||
258 | }else{ | 259 | }else{ |
259 | $scope.contactAircraftList[i].fuelType = "100LL"; | 260 | $scope.contactAircraftList[i].fuelType = "100LL"; |
260 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; | 261 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; |
261 | $scope.xyz = true; | 262 | $scope.xyz = true; |
262 | } | 263 | } |
263 | 264 | ||
264 | } | 265 | } |
265 | if ($scope.aircraftmargins.length > 0) { | 266 | if ($scope.aircraftmargins.length > 0) { |
266 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 267 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
267 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 268 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
268 | $scope.multiple = true; | 269 | $scope.multiple = true; |
269 | $scope.multipleMsg = true; | 270 | $scope.multipleMsg = true; |
270 | if ($scope.multiple) { | 271 | if ($scope.multiple) { |
271 | $scope.companyData.masterMargin = "multiple"; | 272 | $scope.companyData.masterMargin = "multiple"; |
272 | } | 273 | } |
273 | } | 274 | } |
274 | } | 275 | } |
275 | } | 276 | } |
276 | }) | 277 | }) |
277 | } | 278 | } |
278 | 279 | ||
279 | 280 | ||
280 | 281 | ||
281 | $scope.contactData = {}; | 282 | $scope.contactData = {}; |
282 | $scope.contactData.contactList = []; | 283 | $scope.contactData.contactList = []; |
283 | $scope.addContact = function() { | 284 | $scope.addContact = function() { |
284 | $scope.showLoader = true; | 285 | $scope.showLoader = true; |
285 | $scope.data.companyId = companyId; | 286 | $scope.data.companyId = companyId; |
286 | $scope.contactData.contactList.push($scope.data); | 287 | $scope.contactData.contactList.push($scope.data); |
287 | ViewCompanyService.addContact($scope.contactData).then(function(result) { | 288 | ViewCompanyService.addContact($scope.contactData).then(function(result) { |
288 | //console.log("data==",$scope.contactData) | 289 | //console.log("data==",$scope.contactData) |
289 | // console.log(result) | 290 | // console.log(result) |
290 | if (result.status == 200) { | 291 | if (result.status == 200) { |
291 | 292 | ||
292 | $('#contact-modal-3').modal('hide'); | 293 | $('#contact-modal-3').modal('hide'); |
293 | $scope.primayData.id = result.data; | 294 | $scope.primayData.id = result.data; |
294 | $scope.data = {}; | 295 | $scope.data = {}; |
295 | $scope.sendPrimaryContact(); | 296 | $scope.sendPrimaryContact(); |
296 | getContactList(); | 297 | getContactList(); |
297 | $scope.contactData.contactList = []; | 298 | $scope.contactData.contactList = []; |
298 | $scope.data.email = ''; | 299 | $scope.data.email = ''; |
299 | toastr.success('Created Successfully', { | 300 | toastr.success('Created Successfully', { |
300 | closeButton: true | 301 | closeButton: true |
301 | }) | 302 | }) |
302 | } else { | 303 | } else { |
303 | toastr.error('' + result.statusText + '', { | 304 | toastr.error('' + result.statusText + '', { |
304 | closeButton: true | 305 | closeButton: true |
305 | }) | 306 | }) |
306 | } | 307 | } |
307 | }) | 308 | }) |
308 | $scope.showLoader = false; | 309 | $scope.showLoader = false; |
309 | } | 310 | } |
310 | 311 | ||
311 | getData(); | 312 | getData(); |
312 | 313 | ||
313 | function getData() { | 314 | function getData() { |
314 | $scope.showLoader = true; | 315 | $scope.showLoader = true; |
315 | CustomersService.getAircraftMake().then(function(result) { | 316 | CustomersService.getAircraftMake().then(function(result) { |
316 | $scope.aircraftMakeList = result; | 317 | $scope.aircraftMakeList = result; |
317 | // console.log("make",result) | 318 | // console.log("make",result) |
318 | }) | 319 | }) |
319 | $scope.showLoader = false; | 320 | $scope.showLoader = false; |
320 | } | 321 | } |
321 | 322 | ||
322 | $scope.clearAircrafts = function() { | 323 | $scope.clearAircrafts = function() { |
323 | $scope.aircraftDetails = []; | 324 | $scope.aircraftDetails = []; |
324 | $scope.aircraftDetails = [{ | 325 | $scope.aircraftDetails = [{ |
325 | 'tail': '', | 326 | 'tail': '', |
326 | 'make': '', | 327 | 'make': '', |
327 | 'model': '', | 328 | 'model': '', |
328 | 'sizeId': '', | 329 | 'sizeId': '', |
329 | 'marginId': '', | 330 | 'marginId': '', |
330 | 'avgasMarginId': '' | 331 | 'avgasMarginId': '' |
331 | }]; | 332 | }]; |
332 | } | 333 | } |
333 | 334 | ||
334 | $scope.addNew = function() { | 335 | $scope.addNew = function() { |
335 | $scope.aircraftDetails.push({ | 336 | $scope.aircraftDetails.push({ |
336 | 'tail': '', | 337 | 'tail': '', |
337 | 'make': '', | 338 | 'make': '', |
338 | 'model': '', | 339 | 'model': '', |
339 | 'sizeId': '', | 340 | 'sizeId': '', |
340 | 'marginId': '', | 341 | 'marginId': '', |
341 | 'avgasMarginId': '' | 342 | 'avgasMarginId': '' |
342 | }); | 343 | }); |
343 | // console.log($scope.aircraftDetails) | 344 | // console.log($scope.aircraftDetails) |
344 | }; | 345 | }; |
345 | 346 | ||
346 | $scope.getModal = function(makeId, index) { | 347 | $scope.getModal = function(makeId, index) { |
347 | $scope.showLoader = true; | 348 | $scope.showLoader = true; |
348 | $scope.aircraft.make = makeId; | 349 | $scope.aircraft.make = makeId; |
349 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 350 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
350 | $scope.showLoader = false; | 351 | $scope.showLoader = false; |
351 | $scope.aircraftDetails[index].aircraftModalList = result; | 352 | $scope.aircraftDetails[index].aircraftModalList = result; |
352 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 353 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
353 | }) | 354 | }) |
354 | } | 355 | } |
355 | 356 | ||
356 | $scope.selectedOption = ''; | 357 | $scope.selectedOption = ''; |
357 | $scope.getSize = function(model, index) { | 358 | $scope.getSize = function(model, index) { |
358 | $scope.showLoader = true; | 359 | $scope.showLoader = true; |
359 | $scope.aircraft.model = model; | 360 | $scope.aircraft.model = model; |
360 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 361 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
361 | $scope.showLoader = false; | 362 | $scope.showLoader = false; |
362 | $scope.aircraftDetails[index].aircraftSizeList = result; | 363 | $scope.aircraftDetails[index].aircraftSizeList = result; |
363 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | 364 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); |
364 | 365 | ||
365 | }) | 366 | }) |
366 | } | 367 | } |
367 | 368 | ||
368 | $scope.getFuelType = function(size, index) { | 369 | $scope.getFuelType = function(size, index) { |
369 | $scope.showLoader = true; | 370 | $scope.showLoader = true; |
370 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 371 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
371 | ViewCompanyService.checkFuelType(data).then(function(result){ | 372 | ViewCompanyService.checkFuelType(data).then(function(result){ |
372 | $scope.showLoader = false; | 373 | $scope.showLoader = false; |
373 | if (result.type == "JetA") { | 374 | if (result.type == "JetA") { |
374 | $scope.jetShow[index] = false; | 375 | $scope.jetShow[index] = false; |
375 | $scope.marginShow[index] = true; | 376 | $scope.marginShow[index] = true; |
376 | } else if (result.type == "Avgas") { | 377 | } else if (result.type == "Avgas") { |
377 | $scope.jetShow[index] = true; | 378 | $scope.jetShow[index] = true; |
378 | $scope.marginShow[index] = false; | 379 | $scope.marginShow[index] = false; |
379 | }else { | 380 | }else { |
380 | $scope.jetShow[index] = true; | 381 | $scope.jetShow[index] = true; |
381 | $scope.marginShow[index] = true; | 382 | $scope.marginShow[index] = true; |
382 | } | 383 | } |
383 | }) | 384 | }) |
384 | } | 385 | } |
385 | 386 | ||
386 | $scope.aircraftListData = {}; | 387 | $scope.aircraftListData = {}; |
387 | $scope.addData = []; | 388 | $scope.addData = []; |
388 | $scope.tailArray = []; | 389 | $scope.tailArray = []; |
389 | function check(array){ | 390 | function check(array){ |
390 | return (new Set(array)).size !== array.length; | 391 | return (new Set(array)).size !== array.length; |
391 | } | 392 | } |
392 | $scope.saveCompanyData = function() { | 393 | $scope.saveCompanyData = function() { |
393 | $scope.tailArray = []; | 394 | $scope.tailArray = []; |
394 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 395 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
395 | $scope.addData.push({ | 396 | $scope.addData.push({ |
396 | 'tail': $scope.aircraftDetails[i].tail, | 397 | 'tail': $scope.aircraftDetails[i].tail, |
397 | 'make': $scope.aircraftDetails[i].make, | 398 | 'make': $scope.aircraftDetails[i].make, |
398 | 'model': $scope.aircraftDetails[i].model, | 399 | 'model': $scope.aircraftDetails[i].model, |
399 | 'sizeId': $scope.aircraftDetails[i].sizeId, | 400 | 'sizeId': $scope.aircraftDetails[i].sizeId, |
400 | 'marginId': $scope.aircraftDetails[i].marginId, | 401 | 'marginId': $scope.aircraftDetails[i].marginId, |
401 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 402 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
402 | }); | 403 | }); |
403 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 404 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
404 | } | 405 | } |
405 | console.log('check', check($scope.tailArray)); | 406 | console.log('check', check($scope.tailArray)); |
406 | if (check($scope.tailArray)) { | 407 | if (check($scope.tailArray)) { |
407 | toastr.error('Duplicate Tail Added.', { | 408 | toastr.error('Duplicate Tail Added.', { |
408 | closeButton: true | 409 | closeButton: true |
409 | }) | 410 | }) |
410 | }else{ | 411 | }else{ |
411 | $scope.aircraftListData.aircraftList = $scope.addData; | 412 | $scope.aircraftListData.aircraftList = $scope.addData; |
412 | $scope.aircraftListData.accountId = companyId; | 413 | $scope.aircraftListData.accountId = companyId; |
413 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 414 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
414 | if (result != null && result.success) { | 415 | if (result != null && result.success) { |
415 | toastr.success('' + result.success + '', { | 416 | toastr.success('' + result.success + '', { |
416 | closeButton: true | 417 | closeButton: true |
417 | }) | 418 | }) |
418 | $('#aircraft-modal-3').css('display', 'none'); | 419 | $('#aircraft-modal-3').css('display', 'none'); |
419 | $('.modal-backdrop').css('display', 'none'); | 420 | $('.modal-backdrop').css('display', 'none'); |
420 | getAircraftList(); | 421 | getAircraftList(); |
421 | } else { | 422 | } else { |
422 | toastr.error('' + result.statusText + '', { | 423 | toastr.error('' + result.statusText + '', { |
423 | closeButton: true | 424 | closeButton: true |
424 | }) | 425 | }) |
425 | } | 426 | } |
426 | }); | 427 | }); |
427 | } | 428 | } |
428 | 429 | ||
429 | } | 430 | } |
430 | 431 | ||
431 | $scope.showNoteData = true; | 432 | $scope.showNoteData = true; |
432 | $scope.showCompanyName = true; | 433 | $scope.showCompanyName = true; |
433 | $scope.showAddress = true; | 434 | $scope.showAddress = true; |
434 | $scope.showNote = function() { | 435 | $scope.showNote = function() { |
435 | $scope.showNoteData = false; | 436 | $scope.showNoteData = false; |
436 | $scope.showUpdateBtn = true; | 437 | $scope.showUpdateBtn = true; |
437 | } | 438 | } |
438 | 439 | ||
439 | $scope.company = function() { | 440 | $scope.company = function() { |
440 | $scope.showCompanyName = false; | 441 | $scope.showCompanyName = false; |
441 | $scope.showUpdateBtn = true; | 442 | $scope.showUpdateBtn = true; |
442 | } | 443 | } |
443 | 444 | ||
444 | $scope.base = function() { | 445 | $scope.base = function() { |
445 | $scope.showUpdateBtn = true; | 446 | $scope.showUpdateBtn = true; |
446 | } | 447 | } |
447 | 448 | ||
448 | $scope.addressChange = function() { | 449 | $scope.addressChange = function() { |
449 | $scope.showAddress = false; | 450 | $scope.showAddress = false; |
450 | $scope.showUpdateBtn = true; | 451 | $scope.showUpdateBtn = true; |
451 | } | 452 | } |
452 | 453 | ||
453 | $scope.editData = function(inputName) { | 454 | $scope.editData = function(inputName) { |
455 | console.log("===input===",inputName) | ||
454 | //console.log($scope.companyData) | 456 | //console.log($scope.companyData) |
455 | $scope.showLoader = true; | 457 | $scope.showLoader = true; |
456 | /*if(inputName == 'showNoteData'){ | 458 | /*if(inputName == 'showNoteData'){ |
457 | $scope.showNoteData = true; | 459 | $scope.showNoteData = true; |
458 | }else if(inputName == 'showCompanyName'){ | 460 | }else if(inputName == 'showCompanyName'){ |
459 | $scope.showCompanyName = true; | 461 | $scope.showCompanyName = true; |
460 | }else if(inputName == 'showAddress'){ | 462 | }else if(inputName == 'showAddress'){ |
461 | $scope.showAddress = true; | 463 | $scope.showAddress = true; |
462 | }*/ | 464 | }*/ |
463 | $scope.showNoteData = true; | 465 | $scope.showNoteData = true; |
464 | $scope.showCompanyName = true; | 466 | $scope.showCompanyName = true; |
465 | $scope.showAddress = true; | 467 | $scope.showAddress = true; |
466 | 468 | ||
467 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + | 469 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + |
468 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + | 470 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + |
469 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + | 471 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + |
470 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + | 472 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + |
471 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + | 473 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + |
472 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; | 474 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; |
473 | 475 | ||
474 | ViewCompanyService.updateCompany(companyData).then(function(result) { | 476 | ViewCompanyService.updateCompany(companyData).then(function(result) { |
475 | if (result != null && result.success) { | 477 | if (result != null && result.success) { |
476 | toastr.success('' + result.success + '', { | 478 | toastr.success('' + result.success + '', { |
477 | closeButton: true | 479 | closeButton: true |
478 | }) | 480 | }) |
479 | $scope.showUpdateBtn = false; | 481 | $scope.showUpdateBtn = false; |
480 | getCompanyDetail(); | 482 | getCompanyDetail(); |
481 | } else { | 483 | } else { |
482 | toastr.error('Error Updating Company', { | 484 | toastr.error('Error Updating Company', { |
483 | closeButton: true | 485 | closeButton: true |
484 | }) | 486 | }) |
485 | $scope.showUpdateBtn = true; | 487 | $scope.showUpdateBtn = true; |
486 | } | 488 | } |
487 | $scope.showLoader = false; | 489 | $scope.showLoader = false; |
488 | }) | 490 | }) |
489 | } | 491 | } |
490 | 492 | ||
491 | $scope.cancelUpdateData = function() { | 493 | $scope.cancelUpdateData = function() { |
492 | $scope.showNoteData = true; | 494 | $scope.showNoteData = true; |
493 | $scope.showCompanyName = true; | 495 | $scope.showCompanyName = true; |
494 | $scope.showAddress = true; | 496 | $scope.showAddress = true; |
495 | $scope.showUpdateBtn = false; | 497 | $scope.showUpdateBtn = false; |
496 | } | 498 | } |
497 | 499 | ||
498 | $scope.sendMail = function() { | 500 | $scope.sendMail = function() { |
499 | $scope.showLoader = true; | 501 | $scope.showLoader = true; |
500 | $('#confirm1').css('display', 'none'); | 502 | $('#confirm1').css('display', 'none'); |
501 | ViewCompanyService.sendMail(companyId).then(function(result) { | 503 | ViewCompanyService.sendMail(companyId).then(function(result) { |
502 | if (result != null && result.success) { | 504 | if (result != null && result.success) { |
503 | toastr.success('' + result.success + '', { | 505 | toastr.success('' + result.success + '', { |
504 | closeButton: true | 506 | closeButton: true |
505 | }) | 507 | }) |
506 | } else { | 508 | } else { |
507 | toastr.error('Error Sending Email', { | 509 | toastr.error('Error Sending Email', { |
508 | closeButton: true | 510 | closeButton: true |
509 | }) | 511 | }) |
510 | } | 512 | } |
511 | $scope.showLoader = false; | 513 | $scope.showLoader = false; |
512 | }) | 514 | }) |
513 | } | 515 | } |
514 | 516 | ||
515 | $scope.openConfirmMail = function() { | 517 | $scope.openConfirmMail = function() { |
516 | $('#confirm1').css('display', 'block'); | 518 | $('#confirm1').css('display', 'block'); |
517 | } | 519 | } |
518 | 520 | ||
519 | 521 | ||
520 | $scope.cancelAndCloseConfirm = function() { | 522 | $scope.cancelAndCloseConfirm = function() { |
521 | $('#confirm1').css('display', 'none'); | 523 | $('#confirm1').css('display', 'none'); |
522 | } | 524 | } |
523 | 525 | ||
524 | $scope.primaryContact = false; | 526 | $scope.primaryContact = false; |
525 | $scope.cancelPrimaryContact = function() { | 527 | $scope.cancelPrimaryContact = function() { |
526 | $('#primaryContact').css('display', 'none'); | 528 | $('#primaryContact').css('display', 'none'); |
527 | $scope.primaryContact = false; | 529 | $scope.primaryContact = false; |
528 | } | 530 | } |
529 | 531 | ||
530 | $scope.checkPrimaryContact = function() { | 532 | $scope.checkPrimaryContact = function() { |
531 | if ($scope.primaryContact == true) { | 533 | if ($scope.primaryContact == true) { |
532 | $scope.primaryContact = true; | 534 | $scope.primaryContact = true; |
533 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { | 535 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { |
534 | //console.log(result) | 536 | //console.log(result) |
535 | if (result.status == 422) { | 537 | if (result.status == 422) { |
536 | $('#primaryContact').css('display', 'block'); | 538 | $('#primaryContact').css('display', 'block'); |
537 | } | 539 | } |
538 | }) | 540 | }) |
539 | } | 541 | } |
540 | } | 542 | } |
541 | 543 | ||
542 | $scope.sendPrimaryContact = function() { | 544 | $scope.sendPrimaryContact = function() { |
543 | $('#primaryContact').css('display', 'none'); | 545 | $('#primaryContact').css('display', 'none'); |
544 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { | 546 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { |
545 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; | 547 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; |
546 | 548 | ||
547 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { | 549 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { |
548 | // console.log(result) | 550 | // console.log(result) |
549 | }) | 551 | }) |
550 | } | 552 | } |
551 | 553 | ||
552 | } | 554 | } |
553 | 555 | ||
554 | $scope.updateData = "" | 556 | $scope.updateData = "" |
555 | $scope.showUpdateContact = function(data, value) { | 557 | $scope.showUpdateContact = function(data, value) { |
556 | $('#updateContact').css('display', 'block'); | 558 | $('#updateContact').css('display', 'block'); |
557 | $scope.updateData = data; | 559 | $scope.updateData = data; |
558 | // console.log($scope.updateData) | 560 | // console.log($scope.updateData) |
559 | if ($scope.updateData.email == null) { | 561 | if ($scope.updateData.email == null) { |
560 | $scope.updateData.content = data.contactNumber; | 562 | $scope.updateData.content = data.contactNumber; |
561 | } else { | 563 | } else { |
562 | $scope.updateData.content = data.email; | 564 | $scope.updateData.content = data.email; |
563 | } | 565 | } |
564 | } | 566 | } |
565 | 567 | ||
566 | $scope.showUpdateEmail = function(data, value) { | 568 | $scope.showUpdateEmail = function(data, value) { |
567 | $('#updateEmail').css('display', 'block'); | 569 | $('#updateEmail').css('display', 'block'); |
568 | $scope.updateData = data; | 570 | $scope.updateData = data; |
569 | // console.log($scope.updateData) | 571 | // console.log($scope.updateData) |
570 | if ($scope.updateData.email == null) { | 572 | if ($scope.updateData.email == null) { |
571 | $scope.updateData.content = data.contactNumber; | 573 | $scope.updateData.content = data.contactNumber; |
572 | } else { | 574 | } else { |
573 | $scope.updateData.content = data.email; | 575 | $scope.updateData.content = data.email; |
574 | } | 576 | } |
575 | } | 577 | } |
576 | 578 | ||
577 | $scope.acceptUpdateField = function(newContactName) { | 579 | $scope.acceptUpdateField = function(newContactName) { |
578 | // console.log($scope.updateData) | 580 | // console.log($scope.updateData) |
579 | if ($scope.updateData.content == undefined) { | 581 | if ($scope.updateData.content == undefined) { |
580 | toastr.error('Please add some content', { | 582 | toastr.error('Please add some content', { |
581 | closeButton: true | 583 | closeButton: true |
582 | }) | 584 | }) |
583 | } else { | 585 | } else { |
584 | if (newContactName == 'phone') { | 586 | if (newContactName == 'phone') { |
585 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 587 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
586 | "&title=" + $scope.updateData.title; | 588 | "&title=" + $scope.updateData.title; |
587 | } else { | 589 | } else { |
588 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 590 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
589 | "&title=" + $scope.updateData.title; | 591 | "&title=" + $scope.updateData.title; |
590 | } | 592 | } |
591 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { | 593 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { |
592 | if (result != null && result.success) { | 594 | if (result != null && result.success) { |
593 | $('#updateContact').css('display', 'none'); | 595 | $('#updateContact').css('display', 'none'); |
594 | $('#updateEmail').css('display', 'none'); | 596 | $('#updateEmail').css('display', 'none'); |
595 | getCompanyDetail(); | 597 | getCompanyDetail(); |
596 | } | 598 | } |
597 | }) | 599 | }) |
598 | } | 600 | } |
599 | } | 601 | } |
600 | 602 | ||
601 | $scope.deleteContent = function(data){ | 603 | $scope.deleteContent = function(data){ |
602 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { | 604 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { |
603 | if (result != null && result.success) { | 605 | if (result != null && result.success) { |
604 | toastr.success('' + result.success + '', { | 606 | toastr.success('' + result.success + '', { |
605 | closeButton: true | 607 | closeButton: true |
606 | }) | 608 | }) |
607 | getCompanyDetail(); | 609 | getCompanyDetail(); |
608 | } | 610 | } |
609 | }) | 611 | }) |
610 | } | 612 | } |
611 | 613 | ||
612 | $scope.cancelUpdateField = function() { | 614 | $scope.cancelUpdateField = function() { |
613 | $('#updateContact').css('display', 'none'); | 615 | $('#updateContact').css('display', 'none'); |
614 | $('#updateEmail').css('display', 'none'); | 616 | $('#updateEmail').css('display', 'none'); |
615 | } | 617 | } |
616 | 618 | ||
617 | $scope.showEditTier2 = function(number) { | 619 | $scope.showEditTier2 = function(number) { |
618 | // console.log(number) | 620 | // console.log(number) |
619 | $scope.contactNumber = number; | 621 | $scope.contactNumber = number; |
620 | } | 622 | } |
621 | 623 | ||
622 | 624 | ||
623 | 625 | ||
624 | $scope.addCustomPhone = function(value) { | 626 | $scope.addCustomPhone = function(value) { |
625 | //console.log(value) | 627 | //console.log(value) |
626 | if (value != null) { | 628 | if (value != null) { |
627 | $('#customFieldPhone').css('display', 'block'); | 629 | $('#customFieldPhone').css('display', 'block'); |
628 | } | 630 | } |
629 | $scope.custom = {}; | 631 | $scope.custom = {}; |
630 | } | 632 | } |
631 | 633 | ||
632 | $scope.addCustomEmail = function(value) { | 634 | $scope.addCustomEmail = function(value) { |
633 | //console.log(value) | 635 | //console.log(value) |
634 | if (value != null) { | 636 | if (value != null) { |
635 | $('#customFieldEmail').css('display', 'block'); | 637 | $('#customFieldEmail').css('display', 'block'); |
636 | } | 638 | } |
637 | $scope.custom = {}; | 639 | $scope.custom = {}; |
638 | } | 640 | } |
639 | 641 | ||
640 | $scope.cancelCustomField = function() { | 642 | $scope.cancelCustomField = function() { |
641 | $('#customFieldEmail').css('display', 'none'); | 643 | $('#customFieldEmail').css('display', 'none'); |
642 | $('#customFieldPhone').css('display', 'none'); | 644 | $('#customFieldPhone').css('display', 'none'); |
643 | } | 645 | } |
644 | 646 | ||
645 | $scope.acceptCustomField = function(contactName) { | 647 | $scope.acceptCustomField = function(contactName) { |
646 | if ($scope.custom.content == undefined) { | 648 | if ($scope.custom.content == undefined) { |
647 | toastr.error('Please add some content', { | 649 | toastr.error('Please add some content', { |
648 | closeButton: true | 650 | closeButton: true |
649 | }) | 651 | }) |
650 | } else { | 652 | } else { |
651 | if (contactName == 'phone') { | 653 | if (contactName == 'phone') { |
652 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + | 654 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + |
653 | "&title=" + $scope.custom.title; | 655 | "&title=" + $scope.custom.title; |
654 | } else { | 656 | } else { |
655 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + | 657 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + |
656 | "&title=" + $scope.custom.title; | 658 | "&title=" + $scope.custom.title; |
657 | } | 659 | } |
658 | // console.log(customData.email) | 660 | // console.log(customData.email) |
659 | ViewCompanyService.addCustomField(customData).then(function(result) { | 661 | ViewCompanyService.addCustomField(customData).then(function(result) { |
660 | // console.log(result) | 662 | // console.log(result) |
661 | if (result != null && result.success) { | 663 | if (result != null && result.success) { |
662 | $('#customFieldEmail').css('display', 'none'); | 664 | $('#customFieldEmail').css('display', 'none'); |
663 | $('#customFieldPhone').css('display', 'none'); | 665 | $('#customFieldPhone').css('display', 'none'); |
664 | $scope.custom = {}; | 666 | $scope.custom = {}; |
665 | getCompanyDetail(); | 667 | getCompanyDetail(); |
666 | } | 668 | } |
667 | }) | 669 | }) |
668 | } | 670 | } |
669 | } | 671 | } |
670 | 672 | ||
671 | /* omit strike out*/ | 673 | /* omit strike out*/ |
672 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 674 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
673 | $scope.fuelPricing = result; | 675 | $scope.fuelPricing = result; |
674 | $scope.omitData; | 676 | $scope.omitData; |
675 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ | 677 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ |
676 | $scope.omitData = result; | 678 | $scope.omitData = result; |
677 | //console.log("omit data===", $scope.omitData); | 679 | //console.log("omit data===", $scope.omitData); |
678 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ | 680 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ |
679 | for(var j = 0; j<$scope.omitData.length; j++){ | 681 | for(var j = 0; j<$scope.omitData.length; j++){ |
680 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ | 682 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ |
681 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; | 683 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; |
682 | } | 684 | } |
683 | } | 685 | } |
684 | } | 686 | } |
685 | 687 | ||
686 | }) | 688 | }) |
687 | 689 | ||
688 | // console.log("$scope.fuelPricing",$scope.fuelPricing) | 690 | // console.log("$scope.fuelPricing",$scope.fuelPricing) |
689 | for (var i = 0; i < $scope.fuelPricing.length; i++) { | 691 | for (var i = 0; i < $scope.fuelPricing.length; i++) { |
690 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); | 692 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); |
691 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) | 693 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) |
692 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { | 694 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { |
693 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 695 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
694 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 696 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
695 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 697 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
696 | var dday = newTime.getUTCDate(); | 698 | var dday = newTime.getUTCDate(); |
697 | var dyear = newTime.getUTCFullYear(); | 699 | var dyear = newTime.getUTCFullYear(); |
698 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; | 700 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; |
699 | } | 701 | } |
700 | // for (var j = 0; j<$scope.omitData.length; j++) { | 702 | // for (var j = 0; j<$scope.omitData.length; j++) { |
701 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ | 703 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ |
702 | 704 | ||
703 | // } | 705 | // } |
704 | // } | 706 | // } |
705 | } | 707 | } |
706 | }) | 708 | }) |
707 | 709 | ||
708 | var deleteAircraftId = ""; | 710 | var deleteAircraftId = ""; |
709 | $scope.deleteAircraft = function(id) { | 711 | $scope.deleteAircraft = function(id) { |
710 | $('#delete1').css('display', 'block'); | 712 | $('#delete1').css('display', 'block'); |
711 | deleteAircraftId = id; | 713 | deleteAircraftId = id; |
712 | } | 714 | } |
713 | 715 | ||
714 | $scope.aircraftDelete = function() { | 716 | $scope.aircraftDelete = function() { |
715 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { | 717 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { |
716 | // console.log(result) | 718 | // console.log(result) |
717 | getAircraftList(); | 719 | getAircraftList(); |
718 | getCompanyDetail(); | 720 | getCompanyDetail(); |
719 | $('#delete1').css('display', 'none'); | 721 | $('#delete1').css('display', 'none'); |
720 | }) | 722 | }) |
721 | } | 723 | } |
722 | 724 | ||
723 | $scope.cancelDelete = function() { | 725 | $scope.cancelDelete = function() { |
724 | $('#delete1').css('display', 'none'); | 726 | $('#delete1').css('display', 'none'); |
725 | } | 727 | } |
726 | 728 | ||
727 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 729 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
728 | $scope.jetMarginList = result; | 730 | $scope.jetMarginList = result; |
729 | }) | 731 | }) |
730 | 732 | ||
731 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 733 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
732 | $scope.avgsMarginList = result; | 734 | $scope.avgsMarginList = result; |
733 | }) | 735 | }) |
734 | 736 | ||
735 | $scope.changePriceEmail = function(id, index) { | 737 | $scope.changePriceEmail = function(id, index) { |
736 | event.stopPropagation(); | 738 | event.stopPropagation(); |
737 | var contactId = id; | 739 | var contactId = id; |
738 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; | 740 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; |
739 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { | 741 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { |
740 | if (result.success) { | 742 | if (result.success) { |
741 | $('#toogleMail').css('display', 'block'); | 743 | $('#toogleMail').css('display', 'block'); |
742 | if ($scope.companyContactList[index].priceEmail == true) { | 744 | if ($scope.companyContactList[index].priceEmail == true) { |
743 | $scope.messageText = 'You have enabled price distribution for this contact'; | 745 | $scope.messageText = 'You have enabled price distribution for this contact'; |
744 | } else { | 746 | } else { |
745 | $scope.messageText = 'You have disabled price distribution for this contact'; | 747 | $scope.messageText = 'You have disabled price distribution for this contact'; |
746 | } | 748 | } |
747 | } | 749 | } |
748 | }) | 750 | }) |
749 | } | 751 | } |
750 | 752 | ||
751 | $scope.cancelToogle = function() { | 753 | $scope.cancelToogle = function() { |
752 | $('#toogleMail').css('display', 'none'); | 754 | $('#toogleMail').css('display', 'none'); |
753 | } | 755 | } |
754 | 756 | ||
755 | $scope.checkboxStatus = function(value) { | 757 | $scope.checkboxStatus = function(value) { |
756 | // console.log("checkbox",value) | 758 | // console.log("checkbox",value) |
757 | $scope.showUpdateBtn = true; | 759 | $scope.showUpdateBtn = true; |
758 | } | 760 | } |
759 | 761 | ||
760 | $scope.fuelercheckboxStatus = function(value) { | 762 | $scope.fuelercheckboxStatus = function(value) { |
761 | $('#fuelerchange').css('display', 'block'); | 763 | $('#fuelerchange').css('display', 'block'); |
762 | if (value == true) { | 764 | if (value == true) { |
763 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' | 765 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' |
764 | } else { | 766 | } else { |
765 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' | 767 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' |
766 | } | 768 | } |
767 | 769 | ||
768 | 770 | ||
769 | } | 771 | } |
770 | 772 | ||
771 | $scope.fuelerCancelStatus = function() { | 773 | $scope.fuelerCancelStatus = function() { |
772 | $('#fuelerchange').css('display', 'none'); | 774 | $('#fuelerchange').css('display', 'none'); |
773 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; | 775 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; |
774 | } | 776 | } |
775 | 777 | ||
776 | $scope.fuelerAcceptStatus = function() { | 778 | $scope.fuelerAcceptStatus = function() { |
777 | $('#fuelerchange').css('display', 'none'); | 779 | $('#fuelerchange').css('display', 'none'); |
778 | $scope.showLoader = true; | 780 | $scope.showLoader = true; |
779 | var statusData; | 781 | var statusData; |
780 | if ($scope.companyData.fuelerlinxCustomer == false) { | 782 | if ($scope.companyData.fuelerlinxCustomer == false) { |
781 | statusData = "status=true"; | 783 | statusData = "status=true"; |
782 | } else { | 784 | } else { |
783 | statusData = "status=false"; | 785 | statusData = "status=false"; |
784 | } | 786 | } |
785 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { | 787 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { |
786 | if (result.success) { | 788 | if (result.success) { |
787 | $scope.showLoader = false; | 789 | $scope.showLoader = false; |
788 | 790 | ||
789 | $scope.editData(); | 791 | $scope.editData(); |
790 | getContactList(); | 792 | getContactList(); |
791 | 793 | ||
792 | } | 794 | } |
793 | }) | 795 | }) |
794 | } | 796 | } |
795 | 797 | ||
796 | 798 | ||
797 | $scope.updateOmit = function(fuel, omit) { | 799 | $scope.updateOmit = function(fuel, omit) { |
798 | $scope.fuelData = {}; | 800 | $scope.fuelData = {}; |
799 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); | 801 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); |
800 | $scope.fuelData.customMarginId = fuel.id; | 802 | $scope.fuelData.customMarginId = fuel.id; |
801 | $scope.fuelData.omit = fuel.omit; | 803 | $scope.fuelData.omit = fuel.omit; |
802 | $scope.fuelData.papMargin = fuel.papMargin; | 804 | $scope.fuelData.papMargin = fuel.papMargin; |
803 | $scope.fuelData.papTotal = fuel.papTotal; | 805 | $scope.fuelData.papTotal = fuel.papTotal; |
804 | $scope.fuelData.cost = fuel.cost; | 806 | $scope.fuelData.cost = fuel.cost; |
805 | $scope.fuelData.companyId = $scope.compId ; | 807 | $scope.fuelData.companyId = $scope.compId ; |
806 | if($scope.fuelData.omit == true) | 808 | if($scope.fuelData.omit == true) |
807 | { | 809 | { |
808 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 810 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
809 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { | 811 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { |
810 | if (result.success) { | 812 | if (result.success) { |
811 | toastr.success('' + result.success + '', { | 813 | toastr.success('' + result.success + '', { |
812 | closeButton: true | 814 | closeButton: true |
813 | }) | 815 | }) |
814 | } else { | 816 | } else { |
815 | toastr.error('' + result.statusText + '', { | 817 | toastr.error('' + result.statusText + '', { |
816 | closeButton: true | 818 | closeButton: true |
817 | }) | 819 | }) |
818 | } | 820 | } |
819 | }) | 821 | }) |
820 | }else{ | 822 | }else{ |
821 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 823 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
822 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ | 824 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ |
823 | if (result.success) { | 825 | if (result.success) { |
824 | toastr.success('' + result.success + '', { | 826 | toastr.success('' + result.success + '', { |
825 | closeButton: true | 827 | closeButton: true |
826 | }) | 828 | }) |
827 | } else { | 829 | } else { |
828 | toastr.error('' + result.statusText + '', { | 830 | toastr.error('' + result.statusText + '', { |
829 | closeButton: true | 831 | closeButton: true |
830 | }) | 832 | }) |
831 | } | 833 | } |
832 | }) | 834 | }) |
833 | } | 835 | } |
834 | } | 836 | } |
835 | 837 | ||
836 | 838 | ||
837 | //--fuel type based on tail is not in use-- | 839 | //--fuel type based on tail is not in use-- |
838 | // $scope.aircraftData = {} | 840 | // $scope.aircraftData = {} |
839 | /*$scope.checkJetWithTail = function(tail, index) { | 841 | /*$scope.checkJetWithTail = function(tail, index) { |
840 | 842 | ||
841 | console.log("tail==============",tail, index) | 843 | console.log("tail==============",tail, index) |
842 | ViewCompanyService.checkJetType(tail).then(function(result) { | 844 | ViewCompanyService.checkJetType(tail).then(function(result) { |
843 | console.log("result",result) | 845 | console.log("result",result) |
844 | if (result.jetA == "true") { | 846 | if (result.jetA == "true") { |
845 | $scope.jetShow[index] = false; | 847 | $scope.jetShow[index] = false; |
846 | $scope.marginShow[index] = true; | 848 | $scope.marginShow[index] = true; |
847 | } else { | 849 | } else { |
848 | $scope.jetShow[index] = true; | 850 | $scope.jetShow[index] = true; |
849 | $scope.marginShow[index] = false; | 851 | $scope.marginShow[index] = false; |
850 | } | 852 | } |
851 | }) | 853 | }) |
852 | }*/ | 854 | }*/ |
853 | 855 | ||
854 | 856 | ||
855 | /*add a fuel order*/ | 857 | /*add a fuel order*/ |
856 | 858 | ||
857 | 859 | ||
858 | $scope.getOrders = function() { | 860 | $scope.getOrders = function() { |
859 | fuelOrdersService.getOrders().then(function(result) { | 861 | fuelOrdersService.getOrders().then(function(result) { |
860 | 862 | ||
861 | $scope.orderdata = result; | 863 | $scope.orderdata = result; |
862 | for (var i = 0; i < $scope.orderdata.length; i++) { | 864 | for (var i = 0; i < $scope.orderdata.length; i++) { |
863 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 865 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
864 | 866 | ||
865 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 867 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
866 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 868 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
867 | // str = str.slice(4,16) | 869 | // str = str.slice(4,16) |
868 | $scope.orderdata[i].upliftDateString = str | 870 | $scope.orderdata[i].upliftDateString = str |
869 | // console.log(str); | 871 | // console.log(str); |
870 | 872 | ||
871 | } | 873 | } |
872 | 874 | ||
873 | $scope.displayFuelOrderList = new NgTableParams({ | 875 | $scope.displayFuelOrderList = new NgTableParams({ |
874 | page: 1, | 876 | page: 1, |
875 | count: 10, | 877 | count: 10, |
876 | }, { | 878 | }, { |
877 | data: $scope.orderdata | 879 | data: $scope.orderdata |
878 | }); | 880 | }); |
879 | $(document).ready(function() { | 881 | $(document).ready(function() { |
880 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 882 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
881 | 883 | ||
882 | for (var i = 0; i < myselect.length; i++) { | 884 | for (var i = 0; i < myselect.length; i++) { |
883 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 885 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
884 | colourIndex = colourIndex + 1; | 886 | colourIndex = colourIndex + 1; |
885 | // console.log(colourIndex); | 887 | // console.log(colourIndex); |
886 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 888 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
887 | $(myselect[i]).css('background-color', getColor); | 889 | $(myselect[i]).css('background-color', getColor); |
888 | // console.log('colour', getColor); | 890 | // console.log('colour', getColor); |
889 | myselect[i].blur(); | 891 | myselect[i].blur(); |
890 | } | 892 | } |
891 | 893 | ||
892 | }) | 894 | }) |
893 | 895 | ||
894 | }) | 896 | }) |
895 | } | 897 | } |
896 | 898 | ||
897 | $scope.getOrders(); | 899 | $scope.getOrders(); |
898 | 900 | ||
899 | $scope.tiervalue=function(){ | 901 | $scope.tiervalue=function(){ |
900 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 902 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
901 | } | 903 | } |
902 | 904 | ||
903 | $scope.setCost = function(cost){ | 905 | $scope.setCost = function(cost){ |
904 | if(cost != null) { | 906 | if(cost != null) { |
905 | var obj =JSON.parse(cost); | 907 | var obj =JSON.parse(cost); |
906 | $scope.order.fboCost = obj.cost; | 908 | $scope.order.fboCost = obj.cost; |
907 | } | 909 | } |
908 | } | 910 | } |
909 | 911 | ||
910 | $scope.cancelOrder = function() { | 912 | $scope.cancelOrder = function() { |
911 | $scope.order = {}; | 913 | $scope.order = {}; |
912 | } | 914 | } |
913 | 915 | ||
914 | $scope.dispatchFuel = function(){ | 916 | $scope.dispatchFuel = function(){ |
915 | $scope.showLoader = true; | 917 | $scope.showLoader = true; |
916 | $scope.order.companyId = $scope.compId; | 918 | $scope.order.companyId = $scope.compId; |
917 | if ($scope.order.upliftDate != '') { | 919 | if ($scope.order.upliftDate != '') { |
918 | var currentDate = new Date(); | 920 | var currentDate = new Date(); |
919 | var hours = currentDate.getHours(); | 921 | var hours = currentDate.getHours(); |
920 | var min = currentDate.getMinutes(); | 922 | var min = currentDate.getMinutes(); |
921 | var sec = currentDate.getSeconds(); | 923 | var sec = currentDate.getSeconds(); |
922 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 924 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
923 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 925 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
924 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 926 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
925 | } | 927 | } |
926 | $scope.order.status = 'pending'; | 928 | $scope.order.status = 'pending'; |
927 | var obj =JSON.parse($scope.order.priceQuote); | 929 | var obj =JSON.parse($scope.order.priceQuote); |
928 | $scope.order.priceQuote = obj.papTotal; | 930 | $scope.order.priceQuote = obj.papTotal; |
929 | $scope.order.fboCost = obj.cost; | 931 | $scope.order.fboCost = obj.cost; |
930 | $scope.order.total = obj.papTotal * $scope.order.volume; | 932 | $scope.order.total = obj.papTotal * $scope.order.volume; |
931 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 933 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
932 | $scope.order.aircraftName = aircraftObj.tail; | 934 | $scope.order.aircraftName = aircraftObj.tail; |
933 | $scope.order.make = aircraftObj.make; | 935 | $scope.order.make = aircraftObj.make; |
934 | $scope.order.model = aircraftObj.model; | 936 | $scope.order.model = aircraftObj.model; |
935 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 937 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
936 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 938 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
937 | $scope.showLoader = false; | 939 | $scope.showLoader = false; |
938 | $scope.order = {}; | 940 | $scope.order = {}; |
939 | $('#demo-modal-4').css('display', ''); | 941 | $('#demo-modal-4').css('display', ''); |
940 | toastr.success('Fuel Order Dispatched Successfully', { | 942 | toastr.success('Fuel Order Dispatched Successfully', { |
941 | closeButton: true | 943 | closeButton: true |
942 | }) | 944 | }) |
943 | }) | 945 | }) |
944 | } | 946 | } |
945 | 947 | ||
946 | $scope.addTotal = function(value, valueOf) { | 948 | $scope.addTotal = function(value, valueOf) { |
947 | if (valueOf == 'v') { | 949 | if (valueOf == 'v') { |
948 | $scope.order.total = value * $scope.order.invoiced | 950 | $scope.order.total = value * $scope.order.invoiced |
949 | } else if (valueOf == 'i') { | 951 | } else if (valueOf == 'i') { |
950 | $scope.order.total = $scope.order.volume * value | 952 | $scope.order.total = $scope.order.volume * value |
951 | } | 953 | } |
952 | } | 954 | } |
953 | 955 | ||
954 | $scope.getAircraft = function(company) { | 956 | $scope.getAircraft = function(company) { |
955 | $scope.selectedCompanyName = company; | 957 | $scope.selectedCompanyName = company; |
956 | 958 | ||
957 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { | 959 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { |
958 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { | 960 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { |
959 | $scope.marginList = margins; | 961 | $scope.marginList = margins; |
960 | //console.log('$scope.marginList', $scope.marginList); | 962 | //console.log('$scope.marginList', $scope.marginList); |
961 | }) | 963 | }) |
962 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { | 964 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { |
963 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { | 965 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { |
964 | $scope.marginList = margins; | 966 | $scope.marginList = margins; |
965 | }) | 967 | }) |
966 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { | 968 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { |
967 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { | 969 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { |
968 | $scope.marginList = margins; | 970 | $scope.marginList = margins; |
969 | }) | 971 | }) |
970 | } | 972 | } |
971 | 973 | ||
972 | 974 | ||
973 | $scope.selectedCompanyId = $scope.companyData.id; | 975 | $scope.selectedCompanyId = $scope.companyData.id; |
974 | $scope.marginId = $scope.companyData.margin.id; | 976 | $scope.marginId = $scope.companyData.margin.id; |
975 | if ($scope.selectedCompanyId != '') { | 977 | if ($scope.selectedCompanyId != '') { |
976 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 978 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
977 | $scope.aircraftList = aircraft; | 979 | $scope.aircraftList = aircraft; |
978 | }) | 980 | }) |
979 | } | 981 | } |
980 | if ($scope.marginId != '') { | 982 | if ($scope.marginId != '') { |
981 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 983 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
982 | $scope.tierList = tiers; | 984 | $scope.tierList = tiers; |
983 | // $scope.showLoader = false; | 985 | // $scope.showLoader = false; |
984 | }) | 986 | }) |
985 | } | 987 | } |
986 | 988 | ||
987 | } | 989 | } |
988 | 990 | ||
989 | $scope.setCost = function(cost) { | 991 | $scope.setCost = function(cost) { |
990 | // console.log(cost); | 992 | // console.log(cost); |
991 | if (cost != null) { | 993 | if (cost != null) { |
992 | var obj = JSON.parse(cost); | 994 | var obj = JSON.parse(cost); |
993 | // console.log("0bj",obj) | 995 | // console.log("0bj",obj) |
994 | $scope.order.fboCost = obj.cost; | 996 | $scope.order.fboCost = obj.cost; |
995 | } | 997 | } |
996 | 998 | ||
997 | } | 999 | } |
998 | 1000 | ||
999 | $scope.sourceList = [{ | 1001 | $scope.sourceList = [{ |
1000 | source: "Direct Jet-A" | 1002 | source: "Direct Jet-A" |
1001 | }, { | 1003 | }, { |
1002 | source: "Direct AVGAS 100LL" | 1004 | source: "Direct AVGAS 100LL" |
1003 | }]; | 1005 | }]; |
1004 | $scope.cancelData = function() { | 1006 | $scope.cancelData = function() { |
1005 | $('#demo-modal-4').css('display', ''); | 1007 | $('#demo-modal-4').css('display', ''); |
1006 | } | 1008 | } |
1007 | 1009 | ||
1008 | $scope.setFuel = function() { | 1010 | $scope.setFuel = function() { |
1009 | $('#demo-modal-4').css('display', 'block'); | 1011 | $('#demo-modal-4').css('display', 'block'); |
1010 | 1012 | ||
1011 | } | 1013 | } |
1012 | 1014 | ||
1013 | /*delete company*/ | 1015 | /*delete company*/ |
1014 | var deletecompanyId = ""; | 1016 | var deletecompanyId = ""; |
1015 | $scope.deleteComp = function(companyDataid) { | 1017 | $scope.deleteComp = function(companyDataid) { |
1016 | $('#delete2').css('display', 'block'); | 1018 | $('#delete2').css('display', 'block'); |
1017 | //console.log("asda",companyDataid) | 1019 | //console.log("asda",companyDataid) |
1018 | deletecompanyId = companyDataid; | 1020 | deletecompanyId = companyDataid; |
1019 | } | 1021 | } |
1020 | $scope.aircraftIdx = ''; | 1022 | $scope.aircraftIdx = ''; |
1021 | $scope.checkTail = function(tail, idx){ | 1023 | $scope.checkTail = function(tail, idx){ |
1022 | var data = "tail=" + tail + "&id=" + companyId; | 1024 | var data = "tail=" + tail + "&id=" + companyId; |
1023 | $scope.aircraftIdx = idx; | 1025 | $scope.aircraftIdx = idx; |
1024 | ViewCompanyService.checkTail(data).then(function(result) { | 1026 | ViewCompanyService.checkTail(data).then(function(result) { |
1025 | if(result.error) { | 1027 | if(result.error) { |
1026 | $scope.aircraftMessage = result.error; | 1028 | $scope.aircraftMessage = result.error; |
1027 | $scope.openAddAirCraftError(); | 1029 | $scope.openAddAirCraftError(); |
1028 | } else if(result.warning) { | 1030 | } else if(result.warning) { |
1029 | $scope.aircraftMessage = result.warning; | 1031 | $scope.aircraftMessage = result.warning; |
1030 | $scope.openAddAirCraftWarning(); | 1032 | $scope.openAddAirCraftWarning(); |
1031 | } | 1033 | } |
1032 | }) | 1034 | }) |
1033 | } | 1035 | } |
1034 | 1036 | ||
1035 | $scope.openAddAirCraftError = function() { | 1037 | $scope.openAddAirCraftError = function() { |
1036 | $('#addAirCraftError').css('display', 'block'); | 1038 | $('#addAirCraftError').css('display', 'block'); |
1037 | } | 1039 | } |
1038 | 1040 | ||
1039 | $scope.openAddAirCraftWarning = function() { | 1041 | $scope.openAddAirCraftWarning = function() { |
1040 | $('#addAirCraftWarning').css('display', 'block'); | 1042 | $('#addAirCraftWarning').css('display', 'block'); |
1041 | } | 1043 | } |
1042 | $scope.acceptAirCraftError = function() { | 1044 | $scope.acceptAirCraftError = function() { |
1043 | $('#addAirCraftWarning').css('display', 'none'); | 1045 | $('#addAirCraftWarning').css('display', 'none'); |
1044 | } | 1046 | } |
1045 | 1047 | ||
1046 | $scope.cancelAirCraftError = function() { | 1048 | $scope.cancelAirCraftError = function() { |
1047 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 1049 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
1048 | $('#addAirCraftWarning').css('display', 'none'); | 1050 | $('#addAirCraftWarning').css('display', 'none'); |
1049 | $('#addAirCraftError').css('display', 'none'); | 1051 | $('#addAirCraftError').css('display', 'none'); |
1050 | } | 1052 | } |
1051 | 1053 | ||
1052 | $scope.deleteCompanyData = function() { | 1054 | $scope.deleteCompanyData = function() { |
1053 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { | 1055 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { |
1054 | 1056 | ||
1055 | $('#delete2').css('display', 'none'); | 1057 | $('#delete2').css('display', 'none'); |
1056 | if (result.success) { | 1058 | if (result.success) { |
1057 | toastr.success('' + result.success + '', { | 1059 | toastr.success('' + result.success + '', { |
1058 | closeButton: true | 1060 | closeButton: true |
1059 | 1061 | ||
1060 | }) | 1062 | }) |
1061 | } else { | 1063 | } else { |
1062 | toastr.error('' + result.statusText + '', { | 1064 | toastr.error('' + result.statusText + '', { |
1063 | closeButton: true | 1065 | closeButton: true |
1064 | 1066 | ||
1065 | }) | 1067 | }) |
1066 | } | 1068 | } |
1067 | $state.go('app.customers') | 1069 | $state.go('app.customers') |
1068 | }) | 1070 | }) |
1069 | } | 1071 | } |
1070 | $scope.cancelDelete = function() { | 1072 | $scope.cancelDelete = function() { |
1071 | $('#delete2').css('display', 'none'); | 1073 | $('#delete2').css('display', 'none'); |
1072 | } | 1074 | } |
1073 | 1075 | ||
1074 | 1076 | ||
1075 | $scope.editJetMargin = function(aircraftData, type) { | 1077 | $scope.editJetMargin = function(aircraftData, type) { |
1076 | $scope.showLoader = true; | 1078 | $scope.showLoader = true; |
1077 | if (type == 'jet') { | 1079 | if (type == 'jet') { |
1078 | 1080 | ||
1079 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; | 1081 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; |
1080 | 1082 | ||
1081 | } else { | 1083 | } else { |
1082 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; | 1084 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; |
1083 | } | 1085 | } |
1084 | 1086 | ||
1085 | var id = aircraftData.id; | 1087 | var id = aircraftData.id; |
1086 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { | 1088 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { |
1087 | if (result != null && result.success) { | 1089 | if (result != null && result.success) { |
1088 | $scope.showLoader = false; | 1090 | $scope.showLoader = false; |
1089 | toastr.success('' + result.success + '', { | 1091 | toastr.success('' + result.success + '', { |
1090 | closeButton: true | 1092 | closeButton: true |
1091 | }) | 1093 | }) |
1092 | // getAircraftWithMarginList(); | 1094 | // getAircraftWithMarginList(); |
1093 | getAircraftList(); | 1095 | getAircraftList(); |
1094 | } else { | 1096 | } else { |
1095 | $scope.showLoader = false; | 1097 | $scope.showLoader = false; |
1096 | toastr.error('' + result.statusText + '', { | 1098 | toastr.error('' + result.statusText + '', { |
1097 | closeButton: true | 1099 | closeButton: true |
1098 | }) | 1100 | }) |
1099 | } | 1101 | } |
1100 | }) | 1102 | }) |
1101 | } | 1103 | } |
1102 | 1104 | ||
1103 | 1105 | ||
1104 | /* //not used currently | 1106 | /* //not used currently |
1105 | function getAircraftWithMarginList() { | 1107 | function getAircraftWithMarginList() { |
1106 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { | 1108 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { |
1107 | $scope.contactAircraftList = result; | 1109 | $scope.contactAircraftList = result; |
1108 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 1110 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
1109 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 1111 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
1110 | $scope.aircraftmargins.push({ | 1112 | $scope.aircraftmargins.push({ |
1111 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 1113 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
1112 | }) | 1114 | }) |
1113 | } | 1115 | } |
1114 | } | 1116 | } |
1115 | if ($scope.aircraftmargins.length > 0) { | 1117 | if ($scope.aircraftmargins.length > 0) { |
1116 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 1118 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
1117 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 1119 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
1118 | $scope.multiple = true; | 1120 | $scope.multiple = true; |
1119 | $scope.multipleMsg = true; | 1121 | $scope.multipleMsg = true; |
1120 | if ($scope.multiple) { | 1122 | if ($scope.multiple) { |
1121 | $scope.companyData.masterMargin = "multiple"; | 1123 | $scope.companyData.masterMargin = "multiple"; |
1122 | } | 1124 | } |
1123 | } | 1125 | } |
1124 | } | 1126 | } |
1125 | } | 1127 | } |
1126 | }) | 1128 | }) |
1127 | }*/ | 1129 | }*/ |
1128 | 1130 | ||
1129 | 1131 | ||
1130 | }]); | 1132 | }]); |
app/partials/viewCompany/viewCompany.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 | .widget-content{ | 5 | .widget-content{ |
6 | padding: 10px !important; | 6 | padding: 10px !important; |
7 | } | 7 | } |
8 | .widget-content input[type="text"], .widget-content select{ | 8 | .widget-content input[type="text"], .widget-content select{ |
9 | height: 31px; | 9 | height: 31px; |
10 | padding: 0; | 10 | padding: 0; |
11 | } | 11 | } |
12 | .new-label span{ | 12 | .new-label span{ |
13 | float: left; | 13 | float: left; |
14 | line-height: 31px; | 14 | line-height: 31px; |
15 | } | 15 | } |
16 | .new-label span:first-child{ | 16 | .new-label span:first-child{ |
17 | margin-right: 5px; | 17 | margin-right: 5px; |
18 | font-weight: bold; | 18 | font-weight: bold; |
19 | } | 19 | } |
20 | .new-label span:last-child{ | 20 | .new-label span:last-child{ |
21 | margin-left: 5px; | 21 | margin-left: 5px; |
22 | } | 22 | } |
23 | .new-label select{ | 23 | .new-label select{ |
24 | display: -webkit-inline-box; | 24 | display: -webkit-inline-box; |
25 | display: inline-box; | 25 | display: inline-box; |
26 | float: left; | 26 | float: left; |
27 | } | 27 | } |
28 | .new-address p{ | 28 | .new-address p{ |
29 | margin-bottom: 0; | 29 | margin-bottom: 0; |
30 | } | 30 | } |
31 | .new-add-select{ | 31 | .new-add-select{ |
32 | padding-left: 15px; | 32 | padding-left: 15px; |
33 | margin: 10px 0; | 33 | margin: 10px 0; |
34 | } | 34 | } |
35 | .new-add-select select{ | 35 | .new-add-select select{ |
36 | width: 100px; | 36 | width: 100px; |
37 | } | 37 | } |
38 | .widget{ | 38 | .widget{ |
39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
42 | } | 42 | } |
43 | .optionclass { | 43 | .optionclass { |
44 | background: #fff; | 44 | background: #fff; |
45 | } | 45 | } |
46 | .timess { | 46 | .timess { |
47 | float: right !important; | 47 | float: right !important; |
48 | margin-top: 10px !important; | 48 | margin-top: 10px !important; |
49 | margin-right: 10px !important; | 49 | margin-right: 10px !important; |
50 | color: #999 !important; | 50 | color: #999 !important; |
51 | cursor: pointer !important; | 51 | cursor: pointer !important; |
52 | } | 52 | } |
53 | 53 | ||
54 | .button1 { | 54 | .button1 { |
55 | display: inline-block; | 55 | display: inline-block; |
56 | height: 35px; | 56 | height: 35px; |
57 | line-height: 35px; | 57 | line-height: 35px; |
58 | padding-right: 15px; | 58 | padding-right: 15px; |
59 | padding-left: 50px; | 59 | padding-left: 50px; |
60 | position: relative; | 60 | position: relative; |
61 | background-color:rgb(41,127,184); | 61 | background-color:rgb(41,127,184); |
62 | color:rgb(255,255,255); | 62 | color:rgb(255,255,255); |
63 | text-decoration: none; | 63 | text-decoration: none; |
64 | text-transform: uppercase; | 64 | text-transform: uppercase; |
65 | letter-spacing: 1px; | 65 | letter-spacing: 1px; |
66 | margin-bottom: 15px; | 66 | margin-bottom: 15px; |
67 | border: 0; | 67 | border: 0; |
68 | 68 | ||
69 | 69 | ||
70 | border-radius: 5px; | 70 | border-radius: 5px; |
71 | -moz-border-radius: 5px; | 71 | -moz-border-radius: 5px; |
72 | -webkit-border-radius: 5px; | 72 | -webkit-border-radius: 5px; |
73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
76 | 76 | ||
77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
82 | } | 82 | } |
83 | 83 | ||
84 | .button1 span { | 84 | .button1 span { |
85 | position: absolute; | 85 | position: absolute; |
86 | left: 0; | 86 | left: 0; |
87 | top: 0; | 87 | top: 0; |
88 | width: 35px; | 88 | width: 35px; |
89 | background-color:rgba(0,0,0,0.5); | 89 | background-color:rgba(0,0,0,0.5); |
90 | 90 | ||
91 | -webkit-border-top-left-radius: 5px; | 91 | -webkit-border-top-left-radius: 5px; |
92 | -webkit-border-bottom-left-radius: 5px; | 92 | -webkit-border-bottom-left-radius: 5px; |
93 | -moz-border-radius-topleft: 5px; | 93 | -moz-border-radius-topleft: 5px; |
94 | -moz-border-radius-bottomleft: 5px; | 94 | -moz-border-radius-bottomleft: 5px; |
95 | border-top-left-radius: 5px; | 95 | border-top-left-radius: 5px; |
96 | border-bottom-left-radius: 5px; | 96 | border-bottom-left-radius: 5px; |
97 | border-right: 1px solid rgba(0,0,0,0.15); | 97 | border-right: 1px solid rgba(0,0,0,0.15); |
98 | } | 98 | } |
99 | 99 | ||
100 | .button1:hover span, .button1.active span { | 100 | .button1:hover span, .button1.active span { |
101 | background-color:rgb(0,102,26); | 101 | background-color:rgb(0,102,26); |
102 | border-right: 1px solid rgba(0,0,0,0.3); | 102 | border-right: 1px solid rgba(0,0,0,0.3); |
103 | } | 103 | } |
104 | 104 | ||
105 | .button1:active { | 105 | .button1:active { |
106 | margin-top: 2px; | 106 | margin-top: 2px; |
107 | margin-bottom: 13px; | 107 | margin-bottom: 13px; |
108 | 108 | ||
109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
114 | } | 114 | } |
115 | 115 | ||
116 | .button1.turquoise { | 116 | .button1.turquoise { |
117 | background: #449d44; | 117 | background: #449d44; |
118 | } | 118 | } |
119 | 119 | ||
120 | </style> | 120 | </style> |
121 | 121 | ||
122 | <div class="myLoader" ng-show="showLoader"> | 122 | <div class="myLoader" ng-show="showLoader"> |
123 | <img src="../img/hourglass.gif" width="50px;"> | 123 | <img src="../img/hourglass.gif" width="50px;"> |
124 | </div> | 124 | </div> |
125 | 125 | ||
126 | <div class="col-xs-12 col-md-12"> | 126 | <div class="col-xs-12 col-md-12"> |
127 | <div class="row" style="margin-left:0px"> | 127 | <div class="row" style="margin-left:0px"> |
128 | <div class="col-md-12"> | 128 | <div class="col-md-12"> |
129 | <div class="widget"> | 129 | <div class="widget"> |
130 | <div class="widget-header"> | 130 | <div class="widget-header"> |
131 | <i class="fa fa-building-o" aria-hidden="true"></i> | 131 | <i class="fa fa-building-o" aria-hidden="true"></i> |
132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true"></i></h3> | 132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true"></i></h3> |
133 | <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> | 133 | <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> |
134 | </div> | 134 | </div> |
135 | <!-- /widget-header --> | 135 | <!-- /widget-header --> |
136 | <div class="widget-content"> | 136 | <div class="widget-content"> |
137 | <div class="row" style="margin-left:0px"> | 137 | <div class="row" style="margin-left:0px"> |
138 | <div class="col-md-6" ng-show="isGlobal"> | 138 | <div class="col-md-6" ng-show="isGlobal"> |
139 | <div class="widget"> | 139 | <div class="widget"> |
140 | <div class="widget-header"> | 140 | <div class="widget-header"> |
141 | <i class="fa fa-building-o" aria-hidden="true"></i> | 141 | <i class="fa fa-building-o" aria-hidden="true"></i> |
142 | <h3>Company Details</h3> | 142 | <h3>Company Details</h3> |
143 | <label>BASE ICAO</label> | 143 | <label>BASE ICAO</label> |
144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
145 | 145 | ||
146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
148 | </div> | 148 | </div> |
149 | 149 | ||
150 | </div> | 150 | </div> |
151 | <div class="widget-content" style="min-height: 350px;"> | 151 | <div class="widget-content" style="min-height: 350px;"> |
152 | <div class="row" style="margin-left:0px;"> | 152 | <div class="row" style="margin-left:0px;"> |
153 | <div class="col-md-7" style="padding-left: 0;"> | 153 | <div class="col-md-7" style="padding-left: 0;"> |
154 | <h4 ng-show="showCompanyName"> | 154 | <h4 ng-show="showCompanyName"> |
155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> |
156 | </h4> | 156 | </h4> |
157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
158 | </div> | 158 | </div> |
159 | <div class="col-md-5"> | 159 | <div class="col-md-5"> |
160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
165 | <option class="optionclass" value="military">Military</option> | 165 | <option class="optionclass" value="military">Military</option> |
166 | <option class="optionclass" value="government">Government</option> | 166 | <option class="optionclass" value="government">Government</option> |
167 | </select> | 167 | </select> |
168 | </div> | 168 | </div> |
169 | </div> | 169 | </div> |
170 | <div> | 170 | <div> |
171 | <p class="new-label"> | 171 | <p class="new-label"> |
172 | <span>JET A Margin </span> | 172 | <span>JET A Margin </span> |
173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
174 | <option ng-if="multiple" value="multiple">Multiple</option> | 174 | <option ng-if="multiple" value="multiple">Multiple</option> |
175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
176 | </select> | 176 | </select> |
177 | <span ng-show="multipleMsg"> See Aircrart List</span> | 177 | <span ng-show="multipleMsg"> See Aircrart List</span> |
178 | <div class="clearfix"></div> | 178 | <div class="clearfix"></div> |
179 | </p> | 179 | </p> |
180 | </div> | 180 | </div> |
181 | <div> | 181 | <div> |
182 | <p class="new-label"> | 182 | <p class="new-label"> |
183 | <span>AVGAS 100LL </span> | 183 | <span>AVGAS 100LL </span> |
184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
185 | <option value="">N/A</option> | 185 | <option value="">N/A</option> |
186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
187 | </select> | 187 | </select> |
188 | <div class="clearfix"></div> | 188 | <div class="clearfix"></div> |
189 | </p> | 189 | </p> |
190 | </div> | 190 | </div> |
191 | <div> | 191 | <div> |
192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> | 192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> |
193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> | 193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> |
194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> | 194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> |
195 | {{val.first}} | 195 | {{val.first}} |
196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> | 196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> |
197 | </ui-select-choices> | 197 | </ui-select-choices> |
198 | </ui-select> | 198 | </ui-select> |
199 | </div> | 199 | </div> |
200 | </br> | 200 | </br> |
201 | <div class="new-address"> | 201 | <div class="new-address"> |
202 | </div> | 202 | </div> |
203 | <div> | 203 | <div> |
204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
207 | </div> | 207 | </div> |
208 | <div class="pull-left"> | 208 | <div class="pull-left"> |
209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
211 | </div> | 211 | </div> |
212 | <div class="pull-right"> | 212 | <div class="pull-right"> |
213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
215 | </div> | 215 | </div> |
216 | <div class="clearfix"></div> | 216 | <div class="clearfix"></div> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
220 | <div class="col-md-6" ng-hide="isGlobal"> | 220 | <div class="col-md-6" ng-hide="isGlobal"> |
221 | <div class="widget"> | 221 | <div class="widget"> |
222 | <div class="widget-header"> | 222 | <div class="widget-header"> |
223 | <i class="fa fa-building-o" aria-hidden="true"></i> | 223 | <i class="fa fa-building-o" aria-hidden="true"></i> |
224 | <h3>Company Details</h3> | 224 | <h3>Company Details</h3> |
225 | <label>BASE ICAO</label> | 225 | <label>BASE ICAO</label> |
226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
227 | 227 | ||
228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
230 | </div> | 230 | </div> |
231 | 231 | ||
232 | </div> | 232 | </div> |
233 | <div class="widget-content"> | 233 | <div class="widget-content"> |
234 | <div class="row" style="margin-left:0px;"> | 234 | <div class="row" style="margin-left:0px;"> |
235 | <div class="col-md-7" style="padding-left: 0;"> | 235 | <div class="col-md-7" style="padding-left: 0;"> |
236 | <h4 ng-show="showCompanyName"> | 236 | <h4 ng-show="showCompanyName"> |
237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> |
238 | </h4> | 238 | </h4> |
239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
240 | </div> | 240 | </div> |
241 | <div class="col-md-5"> | 241 | <div class="col-md-5"> |
242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
247 | <option class="optionclass" value="military">Military</option> | 247 | <option class="optionclass" value="military">Military</option> |
248 | <option class="optionclass" value="government">Government</option> | 248 | <option class="optionclass" value="government">Government</option> |
249 | </select> | 249 | </select> |
250 | </div> | 250 | </div> |
251 | </div> | 251 | </div> |
252 | <div> | 252 | <div> |
253 | <p class="new-label"> | 253 | <p class="new-label"> |
254 | <span>JET A Margin </span> | 254 | <span>JET A Margin </span> |
255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
256 | <option ng-if="multiple" value="multiple">Multiple</option> | 256 | <option ng-if="multiple" value="multiple">Multiple</option> |
257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
258 | </select> | 258 | </select> |
259 | <span ng-show="multipleMsg"> See Aircraft List</span> | 259 | <span ng-show="multipleMsg"> See Aircraft List</span> |
260 | <div class="clearfix"></div> | 260 | <div class="clearfix"></div> |
261 | </p> | 261 | </p> |
262 | </div> | 262 | </div> |
263 | <div> | 263 | <div> |
264 | <p class="new-label"> | 264 | <p class="new-label"> |
265 | <span>AVGAS 100LL </span> | 265 | <span>AVGAS 100LL </span> |
266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
267 | <option value="">N/A</option> | 267 | <option value="">N/A</option> |
268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
269 | </select> | 269 | </select> |
270 | <div class="clearfix"></div> | 270 | <div class="clearfix"></div> |
271 | </p> | 271 | </p> |
272 | </div> | 272 | </div> |
273 | <div class="row" style="margin-left:0px;"> | 273 | <div class="row" style="margin-left:0px;"> |
274 | <div class="col-md-5" style="padding-left: 0;"> | 274 | <div class="col-md-5" style="padding-left: 0;"> |
275 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer | 275 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer |
276 | </div> | 276 | </div> |
277 | <div class="col-md-5" style="padding-left: 0;"> | 277 | <!--fuelerlinxCustomer later use not to be deleted just hidden--> |
278 | <!-- <div class="col-md-5" style="padding-left: 0;"> | ||
278 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer | 279 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer |
279 | </div> | 280 | </div> |
280 | </div> | 281 | </div>--> |
281 | <div> | 282 | <div> |
282 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member | 283 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member |
283 | </div> | 284 | </div> |
285 | </div> | ||
284 | </br> | 286 | </br> |
285 | <div class="new-address"> | 287 | <div class="new-address"> |
286 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> | 288 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> |
287 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, | 289 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, |
288 | {{companyData.addressTwo}}</span> <span ng-hide="companyData.city == 'null'"><br/>{{companyData.city}},</span> <span ng-hide="companyData.state == 'null'">{{companyData.state}}</span> <span ng-hide="companyData.zipcode == 'null'">{{companyData.zipcode}}</span> <span ng-hide="companyData.country == 'null'"></br>{{companyData.country}}</span> <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | 290 | {{companyData.addressTwo}}</span> <span ng-hide="companyData.city == 'null'"><br/>{{companyData.city}},</span> <span ng-hide="companyData.state == 'null'">{{companyData.state}}</span> <span ng-hide="companyData.zipcode == 'null'">{{companyData.zipcode}}</span> <span ng-hide="companyData.country == 'null'"></br>{{companyData.country}}</span> <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> |
289 | 291 | ||
290 | <div ng-hide="showAddress" style="margin-bottom:10px;"> | 292 | <div ng-hide="showAddress" style="margin-bottom:10px;"> |
291 | <label>Address1</label> | 293 | <label>Address1</label> |
292 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> | 294 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> |
293 | <label>Address2</label> | 295 | <label>Address2</label> |
294 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> | 296 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> |
295 | <label>City</label> | 297 | <label>City</label> |
296 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> | 298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> |
297 | <label>State</label> | 299 | <label>State</label> |
298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> | 300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> |
299 | <label>ZipCode</label> | 301 | <label>ZipCode</label> |
300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> | 302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> |
301 | <label>Country</label> | 303 | <label>Country</label> |
302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> | 304 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> |
303 | </div> | 305 | </div> |
304 | 306 | ||
305 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> | 307 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> |
306 | <i class="fa fa-phone" ng-hide="showEditContact"></i> | 308 | <i class="fa fa-phone" ng-hide="showEditContact"></i> |
307 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> | 309 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> |
308 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 310 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
309 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> | 311 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> |
310 | </p> | 312 | </p> |
311 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> | 313 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> |
312 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> | 314 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> |
313 | <span ng-hide="showEditEmail">{{data.email}} </span> | 315 | <span ng-hide="showEditEmail">{{data.email}} </span> |
314 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 316 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
315 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> | 317 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> |
316 | </p> | 318 | </p> |
317 | </div> | 319 | </div> |
318 | <div style="margin-top:5px; margin-bottom:5px;"> | 320 | <div style="margin-top:5px; margin-bottom:5px;"> |
319 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> | 321 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> |
320 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> | 322 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> |
321 | </div> | 323 | </div> |
322 | <div> | 324 | <div> |
323 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 325 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
324 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 326 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
325 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 327 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
326 | </div> | 328 | </div> |
327 | <div class="pull-left"> | 329 | <div class="pull-left"> |
328 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 330 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
329 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 331 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
330 | </div> | 332 | </div> |
331 | <div class="pull-right"> | 333 | <div class="pull-right"> |
332 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 334 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
333 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 335 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
334 | </div> | 336 | </div> |
335 | <div class="clearfix"></div> | 337 | <div class="clearfix"></div> |
336 | </div> | 338 | </div> |
337 | </div> | 339 | </div> |
338 | </div> | 340 | </div> |
339 | <div class="col-md-6"> | 341 | <div class="col-md-6"> |
340 | <div class="widget" style="min-height: 350px;"> | 342 | <div class="widget" style="min-height: 350px;"> |
341 | <div class="widget-header"> | 343 | <div class="widget-header"> |
342 | <i class="fa fa-plane"></i> | 344 | <i class="fa fa-plane"></i> |
343 | <h3>Aircraft List</h3> | 345 | <h3>Aircraft List</h3> |
344 | <div class="pull-right"> | 346 | <div class="pull-right"> |
345 | <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft </button> | 347 | <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft </button> |
346 | </div> | 348 | </div> |
347 | </div> | 349 | </div> |
348 | <div class="widget-content" style="padding:0px;min-height: 350px;"> | 350 | <div class="widget-content" style="padding:0px;min-height: 350px;"> |
349 | <div class="table-responsive"> | 351 | <div class="table-responsive"> |
350 | <table class="table table-bordered table-hover table-striped"> | 352 | <table class="table table-bordered table-hover table-striped"> |
351 | <thead> | 353 | <thead> |
352 | <tr> | 354 | <tr> |
353 | <th>Tail #</th> | 355 | <th>Tail #</th> |
354 | <th>Make</th> | 356 | <th>Make</th> |
355 | <th>Model</th> | 357 | <th>Model</th> |
356 | <th>Fuel Type</th> | 358 | <th>Fuel Type</th> |
357 | <th>Margin</th> | 359 | <th>Margin</th> |
358 | <th>Value</th> | 360 | <th>Value</th> |
359 | <th>All In</th> | 361 | <th>All In</th> |
360 | <!-- <th>AVGAS</th> --> | 362 | <!-- <th>AVGAS</th> --> |
361 | <!-- <th>All In</th> --> | 363 | <!-- <th>All In</th> --> |
362 | <th></th> | 364 | <th></th> |
363 | </tr> | 365 | </tr> |
364 | </thead> | 366 | </thead> |
365 | <tbody> | 367 | <tbody> |
366 | <tr ng-repeat="aircraft in contactAircraftList"> | 368 | <tr ng-repeat="aircraft in contactAircraftList"> |
367 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> | 369 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> |
368 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> | 370 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> |
369 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> | 371 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> |
370 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> | 372 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> |
371 | <td> | 373 | <td> |
372 | <select ng-show="abc && aircraft.fuelType=='Jet-A'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsMargin.id" ng-change="editJetMargin(aircraft,'jet')" ng-options="margin.id as margin.marginName for margin in jetMarginList" required> | 374 | <select ng-show="abc && aircraft.fuelType=='Jet-A'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsMargin.id" ng-change="editJetMargin(aircraft,'jet')" ng-options="margin.id as margin.marginName for margin in jetMarginList" required> |
373 | <option value="">N/A</option> | 375 | <option value="">N/A</option> |
374 | </select> | 376 | </select> |
375 | <!-- </td> | 377 | <!-- </td> |
376 | <td> --> | 378 | <td> --> |
377 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> | 379 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> |
378 | <option value="">N/A</option> | 380 | <option value="">N/A</option> |
379 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 381 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
380 | </select> | 382 | </select> |
381 | </td> | 383 | </td> |
382 | <td ng-style="aircraft.global"> | 384 | <td ng-style="aircraft.global"> |
383 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> | 385 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> |
384 | =${{aircraft.marginValue}} | 386 | =${{aircraft.marginValue}} |
385 | </span> | 387 | </span> |
386 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} | 388 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} |
387 | </span> | 389 | </span> |
388 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} | 390 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} |
389 | </span> | 391 | </span> |
390 | </td> | 392 | </td> |
391 | <td> | 393 | <td> |
392 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> | 394 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> |
393 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> | 395 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> |
394 | 396 | ||
395 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> | 397 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> |
396 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> | 398 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> |
397 | </td> | 399 | </td> |
398 | <td> | 400 | <td> |
399 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> | 401 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> |
400 | </td> | 402 | </td> |
401 | </tr> | 403 | </tr> |
402 | </tbody> | 404 | </tbody> |
403 | </table> | 405 | </table> |
404 | </div> | 406 | </div> |
405 | </div> | 407 | </div> |
406 | </div> | 408 | </div> |
407 | </div> | 409 | </div> |
408 | </div> | 410 | </div> |
409 | <div class="row" style="margin-left:0px"> | 411 | <div class="row" style="margin-left:0px"> |
410 | <div class="col-md-6"> | 412 | <div class="col-md-6"> |
411 | <div class="widget"> | 413 | <div class="widget"> |
412 | <div class="widget-header"> | 414 | <div class="widget-header"> |
413 | <i class="fa fa-user"></i> | 415 | <i class="fa fa-user"></i> |
414 | <h3>Contact List</h3> | 416 | <h3>Contact List</h3> |
415 | <div class="pull-right"> | 417 | <div class="pull-right"> |
416 | <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> | 418 | <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> |
417 | </div> | 419 | </div> |
418 | </div> | 420 | </div> |
419 | <div class="widget-content" style="padding:0px"> | 421 | <div class="widget-content" style="padding:0px"> |
420 | <div class="table-responsive"> | 422 | <div class="table-responsive"> |
421 | <table class="table table-bordered table-hover table-striped"> | 423 | <table class="table table-bordered table-hover table-striped"> |
422 | <thead> | 424 | <thead> |
423 | <tr> | 425 | <tr> |
424 | <th>Price Email</th> | 426 | <th>Price Email</th> |
425 | <th>First Name</th> | 427 | <th>First Name</th> |
426 | <th>Last Name</th> | 428 | <th>Last Name</th> |
427 | <th>Title</th> | 429 | <th>Title</th> |
428 | </tr> | 430 | </tr> |
429 | </thead> | 431 | </thead> |
430 | <tbody> | 432 | <tbody> |
431 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> | 433 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> |
432 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> | 434 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> |
433 | <td> | 435 | <td> |
434 | {{contact.firstName}} | 436 | {{contact.firstName}} |
435 | </td> | 437 | </td> |
436 | <td>{{contact.lastName}}</td> | 438 | <td>{{contact.lastName}}</td> |
437 | <td>{{contact.title}}</td> | 439 | <td>{{contact.title}}</td> |
438 | </tr> | 440 | </tr> |
439 | </tbody> | 441 | </tbody> |
440 | </table> | 442 | </table> |
441 | </div> | 443 | </div> |
442 | </div> | 444 | </div> |
443 | </div> | 445 | </div> |
444 | </div> | 446 | </div> |
445 | <div class="col-md-6"> | 447 | <div class="col-md-6"> |
446 | <div class="widget"> | 448 | <div class="widget"> |
447 | <div class="widget-header"> | 449 | <div class="widget-header"> |
448 | <i class="fa fa-pencil"></i> | 450 | <i class="fa fa-pencil"></i> |
449 | <h3>Price Manager Reference</h3> | 451 | <h3>Price Manager Reference</h3> |
450 | </div> | 452 | </div> |
451 | <div class="widget-content"> | 453 | <div class="widget-content"> |
452 | <div class="table-responsive"> | 454 | <div class="table-responsive"> |
453 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> | 455 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> |
454 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> | 456 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> |
455 | <thead> | 457 | <thead> |
456 | <tr> | 458 | <tr> |
457 | <th>Omit</th> | 459 | <th>Omit</th> |
458 | <th>Product</th> | 460 | <th>Product</th> |
459 | <th>Cost</th> | 461 | <th>Cost</th> |
460 | <th>PAP (Margin)</th> | 462 | <th>PAP (Margin)</th> |
461 | <th>PAP (Total)</th> | 463 | <th>PAP (Total)</th> |
462 | <th style="color:#F90">Expires</th> | 464 | <th style="color:#F90">Expires</th> |
463 | </tr> | 465 | </tr> |
464 | </thead> | 466 | </thead> |
465 | <tbody> | 467 | <tbody> |
466 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> | 468 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> |
467 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> | 469 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> |
468 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> | 470 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> |
469 | <td>{{fuel.name}}</td> | 471 | <td>{{fuel.name}}</td> |
470 | <td>${{fuel.fuelPricing.cost | number :4}}</td> | 472 | <td>${{fuel.fuelPricing.cost | number :4}}</td> |
471 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> | 473 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> |
472 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> | 474 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> |
473 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> | 475 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> |
474 | </tr> | 476 | </tr> |
475 | 477 | ||
476 | </tbody> | 478 | </tbody> |
477 | </table> | 479 | </table> |
478 | </div> | 480 | </div> |
479 | </div> | 481 | </div> |
480 | </div> | 482 | </div> |
481 | </div> | 483 | </div> |
482 | </div> | 484 | </div> |
483 | </div> | 485 | </div> |
484 | <!-- /widget-content --> | 486 | <!-- /widget-content --> |
485 | </div> | 487 | </div> |
486 | <!-- /widget --> | 488 | <!-- /widget --> |
487 | </div> | 489 | </div> |
488 | <!-- /span6 --> | 490 | <!-- /span6 --> |
489 | </div> | 491 | </div> |
490 | <!-- /widget --> | 492 | <!-- /widget --> |
491 | </div> | 493 | </div> |
492 | <!-- /container --> | 494 | <!-- /container --> |
493 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> | 495 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> |
494 | <div class="modal-dialog modal-lg"> | 496 | <div class="modal-dialog modal-lg"> |
495 | <div class="modal-content"> | 497 | <div class="modal-content"> |
496 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 498 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
497 | <div> | 499 | <div> |
498 | <div class="row" style="margin: 0;"> | 500 | <div class="row" style="margin: 0;"> |
499 | <div> | 501 | <div> |
500 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | 502 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> |
501 | <div class="widget-header"> | 503 | <div class="widget-header"> |
502 | <i class="icon-pencil"></i> | 504 | <i class="icon-pencil"></i> |
503 | <i class="fa fa-tasks" aria-hidden="true"></i> | 505 | <i class="fa fa-tasks" aria-hidden="true"></i> |
504 | <h3>Add a New Contact</h3> | 506 | <h3>Add a New Contact</h3> |
505 | <div class="clearfix"></div> | 507 | <div class="clearfix"></div> |
506 | </div> | 508 | </div> |
507 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 509 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
508 | <div class="col-xs-12"> | 510 | <div class="col-xs-12"> |
509 | <div class="col-md-6"> | 511 | <div class="col-md-6"> |
510 | <div class="pull-left" style="width: 110px;"> | 512 | <div class="pull-left" style="width: 110px;"> |
511 | <label class="new-input-label"><b>First Name</b></label> | 513 | <label class="new-input-label"><b>First Name</b></label> |
512 | </div> | 514 | </div> |
513 | <div class="pull-left" style="margin-left: 15px;"> | 515 | <div class="pull-left" style="margin-left: 15px;"> |
514 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | 516 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> |
515 | </div> | 517 | </div> |
516 | <div class="clearfix"></div> | 518 | <div class="clearfix"></div> |
517 | </div> | 519 | </div> |
518 | <div class="col-md-6"> | 520 | <div class="col-md-6"> |
519 | 521 | ||
520 | <div class="pull-left" style="width: 110px;"> | 522 | <div class="pull-left" style="width: 110px;"> |
521 | <label class="new-input-label"><b>Last Name</b></label> | 523 | <label class="new-input-label"><b>Last Name</b></label> |
522 | </div> | 524 | </div> |
523 | <div class="pull-left" style="margin-left: 15px;"> | 525 | <div class="pull-left" style="margin-left: 15px;"> |
524 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | 526 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> |
525 | </div> | 527 | </div> |
526 | <div class="clearfix"></div> | 528 | <div class="clearfix"></div> |
527 | </div> | 529 | </div> |
528 | </div> | 530 | </div> |
529 | <div class="clearfix"></div><br> | 531 | <div class="clearfix"></div><br> |
530 | <div class="col-xs-12"> | 532 | <div class="col-xs-12"> |
531 | <div class="col-md-6"> | 533 | <div class="col-md-6"> |
532 | <div class="pull-left" style="width: 110px;"> | 534 | <div class="pull-left" style="width: 110px;"> |
533 | <label class="new-input-label"><b>Title</b></label> | 535 | <label class="new-input-label"><b>Title</b></label> |
534 | </div> | 536 | </div> |
535 | <div class="pull-left" style="margin-left: 15px;"> | 537 | <div class="pull-left" style="margin-left: 15px;"> |
536 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | 538 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> |
537 | </div> | 539 | </div> |
538 | <div class="clearfix"></div> | 540 | <div class="clearfix"></div> |
539 | </div> | 541 | </div> |
540 | <div class="col-md-6"> | 542 | <div class="col-md-6"> |
541 | 543 | ||
542 | <div class="pull-left" style="width: 110px;"> | 544 | <div class="pull-left" style="width: 110px;"> |
543 | <label class="new-input-label"><b>Email</b></label> | 545 | <label class="new-input-label"><b>Email</b></label> |
544 | </div> | 546 | </div> |
545 | <div class="pull-left" style="margin-left: 15px;"> | 547 | <div class="pull-left" style="margin-left: 15px;"> |
546 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | 548 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> |
547 | </div> | 549 | </div> |
548 | <div class="clearfix"></div> | 550 | <div class="clearfix"></div> |
549 | </div> | 551 | </div> |
550 | </div> | 552 | </div> |
551 | <div class="clearfix"></div><br> | 553 | <div class="clearfix"></div><br> |
552 | <div class="col-xs-12"> | 554 | <div class="col-xs-12"> |
553 | <div class="col-md-6"> | 555 | <div class="col-md-6"> |
554 | <div class="pull-left" style="width: 110px;"> | 556 | <div class="pull-left" style="width: 110px;"> |
555 | <label class="new-input-label"><b>Username</b></label> | 557 | <label class="new-input-label"><b>Username</b></label> |
556 | </div> | 558 | </div> |
557 | <div class="pull-left" style="margin-left: 15px;"> | 559 | <div class="pull-left" style="margin-left: 15px;"> |
558 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | 560 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> |
559 | </div> | 561 | </div> |
560 | <div class="clearfix"></div> | 562 | <div class="clearfix"></div> |
561 | </div> | 563 | </div> |
562 | <div class="col-md-6"> | 564 | <div class="col-md-6"> |
563 | 565 | ||
564 | <div class="pull-left" style="width: 110px;"> | 566 | <div class="pull-left" style="width: 110px;"> |
565 | <label class="new-input-label"><b>Password</b></label> | 567 | <label class="new-input-label"><b>Password</b></label> |
566 | </div> | 568 | </div> |
567 | <div class="pull-left" style="margin-left: 15px;"> | 569 | <div class="pull-left" style="margin-left: 15px;"> |
568 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | 570 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> |
569 | </div> | 571 | </div> |
570 | <div class="clearfix"></div> | 572 | <div class="clearfix"></div> |
571 | </div> | 573 | </div> |
572 | </div> | 574 | </div> |
573 | <div class="clearfix"></div><br> | 575 | <div class="clearfix"></div><br> |
574 | <div class="col-xs-12"> | 576 | <div class="col-xs-12"> |
575 | <div class="col-md-6"> | 577 | <div class="col-md-6"> |
576 | <div class="pull-left" style="width: 110px;"> | 578 | <div class="pull-left" style="width: 110px;"> |
577 | <label class="new-input-label"><b>Work Phone</b></label> | 579 | <label class="new-input-label"><b>Work Phone</b></label> |
578 | </div> | 580 | </div> |
579 | <div class="pull-left" style="margin-left: 15px;"> | 581 | <div class="pull-left" style="margin-left: 15px;"> |
580 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | 582 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> |
581 | </div> | 583 | </div> |
582 | <div class="clearfix"></div> | 584 | <div class="clearfix"></div> |
583 | </div> | 585 | </div> |
584 | <div class="col-md-6"> | 586 | <div class="col-md-6"> |
585 | 587 | ||
586 | <div class="pull-left" style="width: 110px;"> | 588 | <div class="pull-left" style="width: 110px;"> |
587 | <label class="new-input-label"><b>Mobile Phone</b></label> | 589 | <label class="new-input-label"><b>Mobile Phone</b></label> |
588 | </div> | 590 | </div> |
589 | <div class="pull-left" style="margin-left: 15px;"> | 591 | <div class="pull-left" style="margin-left: 15px;"> |
590 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | 592 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> |
591 | </div> | 593 | </div> |
592 | <div class="clearfix"></div> | 594 | <div class="clearfix"></div> |
593 | </div> | 595 | </div> |
594 | </div> | 596 | </div> |
595 | <div class="clearfix"></div><br> | 597 | <div class="clearfix"></div><br> |
596 | <!-- <div class="col-xs-12"> | 598 | <!-- <div class="col-xs-12"> |
597 | <div class="col-md-12"> | 599 | <div class="col-md-12"> |
598 | <div class="pull-left" style="width: 110px;"> | 600 | <div class="pull-left" style="width: 110px;"> |
599 | <label class="new-input-label"><b>Address</b></label> | 601 | <label class="new-input-label"><b>Address</b></label> |
600 | </div> | 602 | </div> |
601 | <div class="pull-right" style="width: calc(100% - 123px);"> | 603 | <div class="pull-right" style="width: calc(100% - 123px);"> |
602 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | 604 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> |
603 | </div> | 605 | </div> |
604 | <div class="clearfix"></div> | 606 | <div class="clearfix"></div> |
605 | </div> | 607 | </div> |
606 | </div> | 608 | </div> |
607 | <div class="clearfix"></div> --> | 609 | <div class="clearfix"></div> --> |
608 | <br/> | 610 | <br/> |
609 | <div class="col-xs-12"> | 611 | <div class="col-xs-12"> |
610 | <div class="col-md-3"> | 612 | <div class="col-md-3"> |
611 | <div class="pull-left my-toggle-switch"> | 613 | <div class="pull-left my-toggle-switch"> |
612 | <div style="color: #ff9a01;">Price Email     | 614 | <div style="color: #ff9a01;">Price Email     |
613 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> | 615 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> |
614 | </div> | 616 | </div> |
615 | </div> | 617 | </div> |
616 | <div class="clearfix"></div> | 618 | <div class="clearfix"></div> |
617 | </div> | 619 | </div> |
618 | <div class="col-md-3"> | 620 | <div class="col-md-3"> |
619 | <div class="pull-left my-toggle-switch"> | 621 | <div class="pull-left my-toggle-switch"> |
620 | <div style="color: #ff9a01;">Primary Contact     | 622 | <div style="color: #ff9a01;">Primary Contact     |
621 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> | 623 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> |
622 | </div> | 624 | </div> |
623 | </div> | 625 | </div> |
624 | <div class="clearfix"></div> | 626 | <div class="clearfix"></div> |
625 | </div> | 627 | </div> |
626 | <div class="col-md-6"> | 628 | <div class="col-md-6"> |
627 | <div class="pull-left" style="width: 110px;"> | 629 | <div class="pull-left" style="width: 110px;"> |
628 | <label class="new-input-label"><b>Internal Note</b></label> | 630 | <label class="new-input-label"><b>Internal Note</b></label> |
629 | </div> | 631 | </div> |
630 | <div class="pull-left" style="width: calc(100% - 110px);"> | 632 | <div class="pull-left" style="width: calc(100% - 110px);"> |
631 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | 633 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> |
632 | </div> | 634 | </div> |
633 | </div> | 635 | </div> |
634 | <div class="clearfix"></div> | 636 | <div class="clearfix"></div> |
635 | </div> | 637 | </div> |
636 | <div class="clearfix"></div><br> | 638 | <div class="clearfix"></div><br> |
637 | </div> | 639 | </div> |
638 | </div> | 640 | </div> |
639 | <div class="clearfix"></div> | 641 | <div class="clearfix"></div> |
640 | </div> | 642 | </div> |
641 | </div> | 643 | </div> |
642 | </div> | 644 | </div> |
643 | </div> | 645 | </div> |
644 | <div class="modal-footer" style="border-top: 0;"> | 646 | <div class="modal-footer" style="border-top: 0;"> |
645 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 647 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
646 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | 648 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> |
647 | </div> | 649 | </div> |
648 | </div> | 650 | </div> |
649 | </div> | 651 | </div> |
650 | </form> | 652 | </form> |
651 | <div class="clearfix"></div> | 653 | <div class="clearfix"></div> |
652 | 654 | ||
653 | <!-- SetUp fuel order --> | 655 | <!-- SetUp fuel order --> |
654 | <form class="modal" id="demo-modal-4" name="orderform"> | 656 | <form class="modal" id="demo-modal-4" name="orderform"> |
655 | <div class="modal-dialog modal-md"> | 657 | <div class="modal-dialog modal-md"> |
656 | <div class="modal-content"> | 658 | <div class="modal-content"> |
657 | <div class="modal-body" data-step="1" style="padding: 0;"> | 659 | <div class="modal-body" data-step="1" style="padding: 0;"> |
658 | <div> | 660 | <div> |
659 | <div class="row" style="margin: 0;"> | 661 | <div class="row" style="margin: 0;"> |
660 | <div> | 662 | <div> |
661 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 663 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
662 | <div class="widget-header"> | 664 | <div class="widget-header"> |
663 | <i class="icon-pencil"></i> | 665 | <i class="icon-pencil"></i> |
664 | <i class="fa fa-tasks" aria-hidden="true"></i> | 666 | <i class="fa fa-tasks" aria-hidden="true"></i> |
665 | <h3>Search and Dispatch Fuel</h3> | 667 | <h3>Search and Dispatch Fuel</h3> |
666 | <div class="clearfix"></div> | 668 | <div class="clearfix"></div> |
667 | </div> | 669 | </div> |
668 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 670 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
669 | <div class="col-xs-12"> | 671 | <div class="col-xs-12"> |
670 | <div class="col-xs-12"> | 672 | <div class="col-xs-12"> |
671 | <div class="pull-left" style="width: 110px;"> | 673 | <div class="pull-left" style="width: 110px;"> |
672 | <label class="new-input-label"><b>Company</b></label> | 674 | <label class="new-input-label"><b>Company</b></label> |
673 | </div> | 675 | </div> |
674 | <div class="pull-left" style="width: calc(100% - 110px);"> | 676 | <div class="pull-left" style="width: calc(100% - 110px);"> |
675 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> | 677 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> |
676 | </div> | 678 | </div> |
677 | <div class="clearfix"></div> | 679 | <div class="clearfix"></div> |
678 | </div> | 680 | </div> |
679 | <div class="clearfix"></div> | 681 | <div class="clearfix"></div> |
680 | <br> | 682 | <br> |
681 | <div class="col-xs-12"> | 683 | <div class="col-xs-12"> |
682 | <div class="col-md-6"> | 684 | <div class="col-md-6"> |
683 | <div class="pull-left" style="width: 110px;"> | 685 | <div class="pull-left" style="width: 110px;"> |
684 | <label class="new-input-label"><b>Aircraft</b></label> | 686 | <label class="new-input-label"><b>Aircraft</b></label> |
685 | </div> | 687 | </div> |
686 | <div class="pull-left" style="width: calc(100% - 110px);"> | 688 | <div class="pull-left" style="width: calc(100% - 110px);"> |
687 | <select class="form-control" ng-model="order.aircraftName" required> | 689 | <select class="form-control" ng-model="order.aircraftName" required> |
688 | <option selected disabled value="">Select Aircraft</option> | 690 | <option selected disabled value="">Select Aircraft</option> |
689 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 691 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
690 | </select> | 692 | </select> |
691 | </div> | 693 | </div> |
692 | <div class="clearfix"></div> | 694 | <div class="clearfix"></div> |
693 | </div> | 695 | </div> |
694 | <div class="col-md-6"> | 696 | <div class="col-md-6"> |
695 | <div class="pull-left" style="width: 110px;"> | 697 | <div class="pull-left" style="width: 110px;"> |
696 | <label class="new-input-label"><b>Requested Volume</b></label> | 698 | <label class="new-input-label"><b>Requested Volume</b></label> |
697 | </div> | 699 | </div> |
698 | <div class="pull-left" style="width: calc(100% - 110px);"> | 700 | <div class="pull-left" style="width: calc(100% - 110px);"> |
699 | <input type="text" ng-model="order.volume" class="form-control" required> | 701 | <input type="text" ng-model="order.volume" class="form-control" required> |
700 | </div> | 702 | </div> |
701 | <div class="clearfix"></div> | 703 | <div class="clearfix"></div> |
702 | </div> | 704 | </div> |
703 | </div> | 705 | </div> |
704 | <div class="clearfix"></div> | 706 | <div class="clearfix"></div> |
705 | <br/> | 707 | <br/> |
706 | <div class="col-xs-12"> | 708 | <div class="col-xs-12"> |
707 | <div class="pull-left" style="width: 110px;"> | 709 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Price Quote</b></label> | 710 | <label class="new-input-label"><b>Price Quote</b></label> |
709 | </div> | 711 | </div> |
710 | <div class="pull-left" style="width: calc(100% - 110px);"> | 712 | <div class="pull-left" style="width: calc(100% - 110px);"> |
711 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> | 713 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> |
712 | <option value="" selected disabled>Select Price Quote</option> | 714 | <option value="" selected disabled>Select Price Quote</option> |
713 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> | 715 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> |
714 | </select> | 716 | </select> |
715 | </div> | 717 | </div> |
716 | <div class="clearfix"></div> | 718 | <div class="clearfix"></div> |
717 | </div> | 719 | </div> |
718 | <div class="clearfix"></div> | 720 | <div class="clearfix"></div> |
719 | <br/> | 721 | <br/> |
720 | <div class="col-xs-12"> | 722 | <div class="col-xs-12"> |
721 | <div class="pull-left" style="width: 110px;"> | 723 | <div class="pull-left" style="width: 110px;"> |
722 | <label class="new-input-label"><b>Tier Break</b></label> | 724 | <label class="new-input-label"><b>Tier Break</b></label> |
723 | </div> | 725 | </div> |
724 | <div class="pull-left" style="width: calc(100% - 110px);"> | 726 | <div class="pull-left" style="width: calc(100% - 110px);"> |
725 | <select class="form-control" ng-model="order.tierBreak"> | 727 | <select class="form-control" ng-model="order.tierBreak"> |
726 | <option value="" selected disabled>Select Tier Break</option> | 728 | <option value="" selected disabled>Select Tier Break</option> |
727 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> | 729 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> |
728 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} | 730 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} |
729 | </option> | 731 | </option> |
730 | </select> | 732 | </select> |
731 | </div> | 733 | </div> |
732 | <div class="clearfix"></div> | 734 | <div class="clearfix"></div> |
733 | </div> | 735 | </div> |
734 | <div class="clearfix"></div> | 736 | <div class="clearfix"></div> |
735 | <br/> | 737 | <br/> |
736 | <div class="col-xs-12"> | 738 | <div class="col-xs-12"> |
737 | <div class="pull-left" style="width: 110px;"> | 739 | <div class="pull-left" style="width: 110px;"> |
738 | <label class="new-input-label"><b>Uplift Date</b></label> | 740 | <label class="new-input-label"><b>Uplift Date</b></label> |
739 | </div> | 741 | </div> |
740 | <div class="pull-left" style="width: calc(100% - 110px);"> | 742 | <div class="pull-left" style="width: calc(100% - 110px);"> |
741 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> | 743 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> |
742 | </div> | 744 | </div> |
743 | <div class="clearfix"></div> | 745 | <div class="clearfix"></div> |
744 | </div> | 746 | </div> |
745 | <div class="clearfix"></div> | 747 | <div class="clearfix"></div> |
746 | <br/> | 748 | <br/> |
747 | </div> | 749 | </div> |
748 | </div> | 750 | </div> |
749 | <div class="clearfix"></div> | 751 | <div class="clearfix"></div> |
750 | </div> | 752 | </div> |
751 | </div> | 753 | </div> |
752 | </div> | 754 | </div> |
753 | </div> | 755 | </div> |
754 | 756 | ||
755 | <div class="modal-footer" style="border-top: 0;"> | 757 | <div class="modal-footer" style="border-top: 0;"> |
756 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 758 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
757 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> | 759 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> |
758 | </div> | 760 | </div> |
759 | </div> | 761 | </div> |
760 | </div> | 762 | </div> |
761 | </div> | 763 | </div> |
762 | </form> | 764 | </form> |
763 | <div class="clearfix"></div> | 765 | <div class="clearfix"></div> |
764 | 766 | ||
765 | 767 | ||
766 | 768 | ||
767 | 769 | ||
768 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | 770 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> |
769 | <div class="modal-dialog modal-lg"> | 771 | <div class="modal-dialog modal-lg"> |
770 | <div class="modal-content"> | 772 | <div class="modal-content"> |
771 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 773 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
772 | <div> | 774 | <div> |
773 | <div class="row" style="margin: 0;"> | 775 | <div class="row" style="margin: 0;"> |
774 | <div> | 776 | <div> |
775 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 777 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
776 | <div class="widget-header"> | 778 | <div class="widget-header"> |
777 | <i class="icon-pencil"></i> | 779 | <i class="icon-pencil"></i> |
778 | <i class="fa fa-tasks" aria-hidden="true"></i> | 780 | <i class="fa fa-tasks" aria-hidden="true"></i> |
779 | <h3>Add a New Aircraft kd</h3> | 781 | <h3>Add a New Aircraft kd</h3> |
780 | <div class="clearfix"></div> | 782 | <div class="clearfix"></div> |
781 | </div> | 783 | </div> |
782 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 784 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
783 | <div class="col-xs-12"> | 785 | <div class="col-xs-12"> |
784 | <div class="widget-header"> | 786 | <div class="widget-header"> |
785 | <i class="fa fa-list"></i> | 787 | <i class="fa fa-list"></i> |
786 | <h3>Aircraft List</h3> | 788 | <h3>Aircraft List</h3> |
787 | </div> | 789 | </div> |
788 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | 790 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> |
789 | <div class="table-responsive"> | 791 | <div class="table-responsive"> |
790 | <table class="table table-striped table-bordered"> | 792 | <table class="table table-striped table-bordered"> |
791 | <thead> | 793 | <thead> |
792 | <tr> | 794 | <tr> |
793 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 795 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
794 | <th>Tail</th> | 796 | <th>Tail</th> |
795 | <th>Make</th> | 797 | <th>Make</th> |
796 | <th>Model</th> | 798 | <th>Model</th> |
797 | <th>Size</th> | 799 | <th>Size</th> |
798 | <th>JET A Margin</th> | 800 | <th>JET A Margin</th> |
799 | <th>AVGS 100LL Margin</th> | 801 | <th>AVGS 100LL Margin</th> |
800 | </tr> | 802 | </tr> |
801 | </thead> | 803 | </thead> |
802 | <tbody> | 804 | <tbody> |
803 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 805 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
804 | <!-- <td> | 806 | <!-- <td> |
805 | <input type="checkbox" ng-model="aircraftData.selected"/> | 807 | <input type="checkbox" ng-model="aircraftData.selected"/> |
806 | </td> --> | 808 | </td> --> |
807 | <!-- <td style="width: 15%"> | 809 | <!-- <td style="width: 15%"> |
808 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 810 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
809 | </td> --> | 811 | </td> --> |
810 | <td style="width: 15%"> | 812 | <td style="width: 15%"> |
811 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> | 813 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> |
812 | </td> | 814 | </td> |
813 | <td style="width: 17%"> | 815 | <td style="width: 17%"> |
814 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> | 816 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> |
815 | <option value="" disabled>Select</option> | 817 | <option value="" disabled>Select</option> |
816 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 818 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
817 | </select> | 819 | </select> |
818 | </td> | 820 | </td> |
819 | <td style="width: 17%"> | 821 | <td style="width: 17%"> |
820 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 822 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
821 | <option value="" disabled>Select</option> | 823 | <option value="" disabled>Select</option> |
822 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 824 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
823 | </select> | 825 | </select> |
824 | </td> | 826 | </td> |
825 | <td style="width: 17%"> | 827 | <td style="width: 17%"> |
826 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> | 828 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> |
827 | <option value="" disabled>Select</option> | 829 | <option value="" disabled>Select</option> |
828 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> | 830 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> |
829 | </select> | 831 | </select> |
830 | </td> | 832 | </td> |
831 | <td style="width: 17%"> | 833 | <td style="width: 17%"> |
832 | 834 | ||
833 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 835 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
834 | <option value="" disabled>Select</option> | 836 | <option value="" disabled>Select</option> |
835 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 837 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
836 | </select> | 838 | </select> |
837 | 839 | ||
838 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> | 840 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> |
839 | 841 | ||
840 | <option value="" disabled>Select...</option> | 842 | <option value="" disabled>Select...</option> |
841 | </select> --> | 843 | </select> --> |
842 | 844 | ||
843 | </td> | 845 | </td> |
844 | <td style="width: 17%"> | 846 | <td style="width: 17%"> |
845 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 847 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
846 | <option value="" disabled>Select</option> | 848 | <option value="" disabled>Select</option> |
847 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 849 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
848 | </select> | 850 | </select> |
849 | 851 | ||
850 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> | 852 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> |
851 | <option value="" disabled>Select...</option> | 853 | <option value="" disabled>Select...</option> |
852 | </select> --> | 854 | </select> --> |
853 | </td> | 855 | </td> |
854 | </tr> | 856 | </tr> |
855 | </tbody> | 857 | </tbody> |
856 | </table> | 858 | </table> |
857 | </div> | 859 | </div> |
858 | <div class="clearfix"></div> | 860 | <div class="clearfix"></div> |
859 | </div> | 861 | </div> |
860 | </div> | 862 | </div> |
861 | <div class="clearfix"></div> | 863 | <div class="clearfix"></div> |
862 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 864 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
863 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> | 865 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> |
864 | </div> | 866 | </div> |
865 | </div> | 867 | </div> |
866 | </div> | 868 | </div> |
867 | <div class="clearfix"></div> | 869 | <div class="clearfix"></div> |
868 | </div> | 870 | </div> |
869 | </div> | 871 | </div> |
870 | </div> | 872 | </div> |
871 | </div> | 873 | </div> |
872 | 874 | ||
873 | <div class="modal-footer" style="border-top: 0;"> | 875 | <div class="modal-footer" style="border-top: 0;"> |
874 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 876 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
875 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> | 877 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> |
876 | </div> | 878 | </div> |
877 | </div> | 879 | </div> |
878 | </div> | 880 | </div> |
879 | </form> | 881 | </form> |
880 | <div class="customConfirmPopBackdrop" id="fuelerchange" > | 882 | <div class="customConfirmPopBackdrop" id="fuelerchange" > |
881 | <div class="customModalInner" style="max-width: 550px;"> | 883 | <div class="customModalInner" style="max-width: 550px;"> |
882 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 884 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
883 | <table> | 885 | <table> |
884 | <tr> | 886 | <tr> |
885 | <td> | 887 | <td> |
886 | <img src="img/info.png" style="width: 50px;"> | 888 | <img src="img/info.png" style="width: 50px;"> |
887 | </td> | 889 | </td> |
888 | <td> | 890 | <td> |
889 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 891 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
890 | </td> | 892 | </td> |
891 | </tr> | 893 | </tr> |
892 | </table> | 894 | </table> |
893 | </div> | 895 | </div> |
894 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 896 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
895 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> | 897 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> |
896 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> | 898 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> |
897 | </div> | 899 | </div> |
898 | </div> | 900 | </div> |
899 | </div> | 901 | </div> |
900 | <div class="customConfirmPopBackdrop" id="confirm1"> | 902 | <div class="customConfirmPopBackdrop" id="confirm1"> |
901 | <div class="customModalInner" style="max-width: 400px;"> | 903 | <div class="customModalInner" style="max-width: 400px;"> |
902 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 904 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
903 | <table> | 905 | <table> |
904 | <tr> | 906 | <tr> |
905 | <td> | 907 | <td> |
906 | <img src="img/info.png" style="width: 50px;"> | 908 | <img src="img/info.png" style="width: 50px;"> |
907 | </td> | 909 | </td> |
908 | <td> | 910 | <td> |
909 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 911 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
910 | </td> | 912 | </td> |
911 | </tr> | 913 | </tr> |
912 | </table> | 914 | </table> |
913 | </div> | 915 | </div> |
914 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 916 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
915 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> | 917 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> |
916 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 918 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
917 | </div> | 919 | </div> |
918 | </div> | 920 | </div> |
919 | </div> | 921 | </div> |
920 | <div class="customConfirmPopBackdrop" id="primaryContact"> | 922 | <div class="customConfirmPopBackdrop" id="primaryContact"> |
921 | <div class="customModalInner" style="max-width: 400px;"> | 923 | <div class="customModalInner" style="max-width: 400px;"> |
922 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 924 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
923 | <table> | 925 | <table> |
924 | <tr> | 926 | <tr> |
925 | <td> | 927 | <td> |
926 | <img src="img/info.png" style="width: 50px;"> | 928 | <img src="img/info.png" style="width: 50px;"> |
927 | </td> | 929 | </td> |
928 | <td> | 930 | <td> |
929 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> | 931 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> |
930 | </td> | 932 | </td> |
931 | </tr> | 933 | </tr> |
932 | </table> | 934 | </table> |
933 | </div> | 935 | </div> |
934 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 936 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
935 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> | 937 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> |
936 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> | 938 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> |
937 | </div> | 939 | </div> |
938 | </div> | 940 | </div> |
939 | </div> | 941 | </div> |
940 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> | 942 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> |
941 | <div class="customModalInner" style="max-width: 400px;"> | 943 | <div class="customModalInner" style="max-width: 400px;"> |
942 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 944 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
943 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 945 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
944 | <div class="col-md-10"> | 946 | <div class="col-md-10"> |
945 | <form> | 947 | <form> |
946 | Email Type:<br> | 948 | Email Type:<br> |
947 | <input type="text" name="firstname" ng-model="custom.title"><br> | 949 | <input type="text" name="firstname" ng-model="custom.title"><br> |
948 | Email-Address:<br> | 950 | Email-Address:<br> |
949 | <input type="text" name="lastname" ng-model="custom.content"> | 951 | <input type="text" name="lastname" ng-model="custom.content"> |
950 | </form> | 952 | </form> |
951 | </div> | 953 | </div> |
952 | <div class="clearfix"></div> | 954 | <div class="clearfix"></div> |
953 | </div> | 955 | </div> |
954 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 956 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
955 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> | 957 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> |
956 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 958 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
957 | </div> | 959 | </div> |
958 | </div> | 960 | </div> |
959 | </div> | 961 | </div> |
960 | 962 | ||
961 | 963 | ||
962 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> | 964 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> |
963 | <div class="customModalInner" style="max-width: 400px;"> | 965 | <div class="customModalInner" style="max-width: 400px;"> |
964 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 966 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
965 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 967 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
966 | <div class="col-md-10"> | 968 | <div class="col-md-10"> |
967 | <form> | 969 | <form> |
968 | Phone Type:<br> | 970 | Phone Type:<br> |
969 | <input type="text" name="firstname" ng-model="custom.title"><br> | 971 | <input type="text" name="firstname" ng-model="custom.title"><br> |
970 | Number:<br> | 972 | Number:<br> |
971 | <input type="text" name="lastname" ng-model="custom.content"> | 973 | <input type="text" name="lastname" ng-model="custom.content"> |
972 | </form> | 974 | </form> |
973 | </div> | 975 | </div> |
974 | <div class="clearfix"></div> | 976 | <div class="clearfix"></div> |
975 | </div> | 977 | </div> |
976 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 978 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
977 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> | 979 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> |
978 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 980 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
979 | </div> | 981 | </div> |
980 | </div> | 982 | </div> |
981 | </div> | 983 | </div> |
982 | 984 | ||
983 | 985 | ||
984 | <div class="customConfirmPopBackdrop" id="updateContact"> | 986 | <div class="customConfirmPopBackdrop" id="updateContact"> |
985 | <div class="customModalInner" style="max-width: 400px;"> | 987 | <div class="customModalInner" style="max-width: 400px;"> |
986 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 988 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
987 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 989 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
988 | <div class="col-md-10"> | 990 | <div class="col-md-10"> |
989 | <form> | 991 | <form> |
990 | Phone Type:<br> | 992 | Phone Type:<br> |
991 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 993 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
992 | Number:<br> | 994 | Number:<br> |
993 | <input type="text" name="lastname" ng-model="updateData.content"> | 995 | <input type="text" name="lastname" ng-model="updateData.content"> |
994 | </form> | 996 | </form> |
995 | </div> | 997 | </div> |
996 | <div class="clearfix"></div> | 998 | <div class="clearfix"></div> |
997 | </div> | 999 | </div> |
998 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1000 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
999 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> | 1001 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> |
1000 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1002 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1001 | </div> | 1003 | </div> |
1002 | </div> | 1004 | </div> |
1003 | </div> | 1005 | </div> |
1004 | 1006 | ||
1005 | <div class="customConfirmPopBackdrop" id="updateEmail"> | 1007 | <div class="customConfirmPopBackdrop" id="updateEmail"> |
1006 | <div class="customModalInner" style="max-width: 400px;"> | 1008 | <div class="customModalInner" style="max-width: 400px;"> |
1007 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1009 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1008 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1010 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
1009 | <div class="col-md-10"> | 1011 | <div class="col-md-10"> |
1010 | <form> | 1012 | <form> |
1011 | Email Type:<br> | 1013 | Email Type:<br> |
1012 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 1014 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
1013 | Email-Address:<br> | 1015 | Email-Address:<br> |
1014 | <input type="text" name="lastname" ng-model="updateData.content"> | 1016 | <input type="text" name="lastname" ng-model="updateData.content"> |
1015 | </form> | 1017 | </form> |
1016 | </div> | 1018 | </div> |
1017 | <div class="clearfix"></div> | 1019 | <div class="clearfix"></div> |
1018 | </div> | 1020 | </div> |
1019 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1021 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1020 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> | 1022 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> |
1021 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1023 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1022 | </div> | 1024 | </div> |
1023 | </div> | 1025 | </div> |
1024 | </div> | 1026 | </div> |
1025 | 1027 | ||
1026 | 1028 | ||
1027 | <div class="customConfirmPopBackdrop" id="delete1"> | 1029 | <div class="customConfirmPopBackdrop" id="delete1"> |
1028 | <div class="customModalInner" style="max-width: 400px;"> | 1030 | <div class="customModalInner" style="max-width: 400px;"> |
1029 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1031 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1030 | <table> | 1032 | <table> |
1031 | <tr> | 1033 | <tr> |
1032 | <td> | 1034 | <td> |
1033 | <img src="img/info.png" style="width: 50px;"> | 1035 | <img src="img/info.png" style="width: 50px;"> |
1034 | </td> | 1036 | </td> |
1035 | <td> | 1037 | <td> |
1036 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> | 1038 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> |
1037 | </td> | 1039 | </td> |
1038 | </tr> | 1040 | </tr> |
1039 | </table> | 1041 | </table> |
1040 | </div> | 1042 | </div> |
1041 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1043 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1042 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> | 1044 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> |
1043 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1045 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1044 | </div> | 1046 | </div> |
1045 | </div> | 1047 | </div> |
1046 | </div> | 1048 | </div> |
1047 | <div class="customConfirmPopBackdrop" id="delete2"> | 1049 | <div class="customConfirmPopBackdrop" id="delete2"> |
1048 | <div class="customModalInner" style="max-width: 400px;"> | 1050 | <div class="customModalInner" style="max-width: 400px;"> |
1049 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1051 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1050 | <table> | 1052 | <table> |
1051 | <tr> | 1053 | <tr> |
1052 | <td> | 1054 | <td> |
1053 | <img src="img/info.png" style="width: 50px;"> | 1055 | <img src="img/info.png" style="width: 50px;"> |
1054 | </td> | 1056 | </td> |
1055 | <td> | 1057 | <td> |
1056 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> | 1058 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> |
1057 | </td> | 1059 | </td> |
1058 | </tr> | 1060 | </tr> |
1059 | </table> | 1061 | </table> |
1060 | </div> | 1062 | </div> |
1061 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1063 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1062 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> | 1064 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> |
1063 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1065 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1064 | </div> | 1066 | </div> |
1065 | </div> | 1067 | </div> |
1066 | </div> | 1068 | </div> |
1067 | 1069 | ||
1068 | <div class="customConfirmPopBackdrop" id="delete3"> | 1070 | <div class="customConfirmPopBackdrop" id="delete3"> |
1069 | <div class="customModalInner" style="max-width: 400px;"> | 1071 | <div class="customModalInner" style="max-width: 400px;"> |
1070 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1072 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1071 | <table> | 1073 | <table> |
1072 | <tr> | 1074 | <tr> |
1073 | <td> | 1075 | <td> |
1074 | <img src="img/info.png" style="width: 50px;"> | 1076 | <img src="img/info.png" style="width: 50px;"> |
1075 | </td> | 1077 | </td> |
1076 | <td> | 1078 | <td> |
1077 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 1079 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
1078 | </td> | 1080 | </td> |
1079 | </tr> | 1081 | </tr> |
1080 | </table> | 1082 | </table> |
1081 | </div> | 1083 | </div> |
1082 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1084 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1083 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> | 1085 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> |
1084 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> | 1086 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> |
1085 | </div> | 1087 | </div> |
1086 | </div> | 1088 | </div> |
1087 | </div> | 1089 | </div> |
1088 | <div class="customConfirmPopBackdrop" id="toogleMail"> | 1090 | <div class="customConfirmPopBackdrop" id="toogleMail"> |
1089 | <div class="customModalInner" style="max-width: 400px;"> | 1091 | <div class="customModalInner" style="max-width: 400px;"> |
1090 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1092 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1091 | <table> | 1093 | <table> |
1092 | <tr> | 1094 | <tr> |
1093 | <!-- <td> | 1095 | <!-- <td> |
1094 | <img src="" style="width: 50px;"> | 1096 | <img src="" style="width: 50px;"> |
1095 | </td> --> | 1097 | </td> --> |
1096 | <td> | 1098 | <td> |
1097 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> | 1099 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> |
1098 | </td> | 1100 | </td> |
1099 | </tr> | 1101 | </tr> |
1100 | </table> | 1102 | </table> |
1101 | </div> | 1103 | </div> |
1102 | <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;"> |
1103 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> | 1105 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> |
1104 | </div> | 1106 | </div> |
1105 | </div> | 1107 | </div> |
1106 | </div> | 1108 | </div> |
1107 | 1109 | ||
1108 | 1110 | ||
1109 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> | 1111 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> |
1110 | <div class="customModalInner" style="max-width: 400px;"> | 1112 | <div class="customModalInner" style="max-width: 400px;"> |
1111 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1113 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1112 | <table> | 1114 | <table> |
1113 | <tr> | 1115 | <tr> |
1114 | <td> | 1116 | <td> |
1115 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1117 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1116 | </td> | 1118 | </td> |
1117 | </tr> | 1119 | </tr> |
1118 | </table> | 1120 | </table> |
1119 | </div> | 1121 | </div> |
1120 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1122 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1121 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> | 1123 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> |
1122 | </div> | 1124 | </div> |
1123 | </div> | 1125 | </div> |
1124 | </div> | 1126 | </div> |
1125 | 1127 | ||
1126 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> | 1128 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> |
1127 | <div class="customModalInner" style="max-width: 400px;"> | 1129 | <div class="customModalInner" style="max-width: 400px;"> |
1128 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1130 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1129 | <table> | 1131 | <table> |
1130 | <tr> | 1132 | <tr> |
1131 | <td> | 1133 | <td> |
1132 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1134 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1133 | </td> | 1135 | </td> |
1134 | </tr> | 1136 | </tr> |
1135 | </table> | 1137 | </table> |
1136 | </div> | 1138 | </div> |
1137 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1139 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1138 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> | 1140 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> |
1139 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> | 1141 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> |
1140 | </div> | 1142 | </div> |
1141 | </div> | 1143 | </div> |
1142 | </div> | 1144 | </div> |
1143 | 1145 | ||
1144 | <div class="myLoader" ng-show="showLoader"> | 1146 | <div class="myLoader" ng-show="showLoader"> |
1145 | <img src="../img/hourglass.gif" width="50px;"> | 1147 | <img src="../img/hourglass.gif" width="50px;"> |
1146 | </div> | 1148 | </div> |
1147 | 1149 | ||
1148 | <!-- Le javascript | 1150 | <!-- Le javascript |
1149 | ================================================== --> | 1151 | ================================================== --> |
1150 | <!-- Placed at the end of the document so the pages load faster --> | 1152 | <!-- Placed at the end of the document so the pages load faster --> |
1151 | <!-- <script | 1153 | <!-- <script |
1152 | CKEDITOR.replace( 'editor2', { | 1154 | CKEDITOR.replace( 'editor2', { |
1153 | height: 250, | 1155 | height: 250, |
1154 | extraPlugins: 'divarea' | 1156 | extraPlugins: 'divarea' |
1155 | } ); | 1157 | } ); |
1156 | </script> --> | 1158 | </script> --> |
1157 | 1159 |