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