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