Commit 0a364e561ce142bababd90c45dd3528432fdfe3a
1 parent
039002959d
Exists in
master
minor
Showing
3 changed files
with
3 additions
and
1 deletions
Show diff stats
app/partials/customers/customers.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | //Load controller | 3 | //Load controller |
4 | angular.module('acufuel') | 4 | angular.module('acufuel') |
5 | .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]); | 5 | .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]); |
6 | 6 | ||
7 | function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) { | 7 | function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) { |
8 | $(document).ready(function() { | 8 | $(document).ready(function() { |
9 | // $('#example').DataTable(); | 9 | // $('#example').DataTable(); |
10 | }); | 10 | }); |
11 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | 11 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) |
12 | $scope.reset2 = function() { | 12 | $scope.reset2 = function() { |
13 | $("input").val(""); | 13 | $("input").val(""); |
14 | $scope.removeMarginValidation(); | 14 | $scope.removeMarginValidation(); |
15 | } | 15 | } |
16 | 16 | ||
17 | $scope.order = {}; | 17 | $scope.order = {}; |
18 | $scope.order.upliftDate = ''; | 18 | $scope.order.upliftDate = ''; |
19 | $scope.data = {}; | 19 | $scope.data = {}; |
20 | $scope.aircraft = {}; | 20 | $scope.aircraft = {}; |
21 | $scope.data.activate = true; | 21 | $scope.data.activate = true; |
22 | $scope.showLoader = true; | 22 | $scope.showLoader = true; |
23 | $scope.jetShow = []; | 23 | $scope.jetShow = []; |
24 | $scope.marginShow = []; | 24 | $scope.marginShow = []; |
25 | 25 | ||
26 | $scope.jetShow[0] = true; | 26 | $scope.jetShow[0] = true; |
27 | $scope.marginShow[0] = true; | 27 | $scope.marginShow[0] = true; |
28 | $scope.dispatchOrder = {}; | 28 | $scope.dispatchOrder = {}; |
29 | $scope.dispatchOrder.fuelOrderList = []; | 29 | $scope.dispatchOrder.fuelOrderList = []; |
30 | $scope.statusFilterOptions = []; | 30 | $scope.statusFilterOptions = []; |
31 | $scope.companyList = {}; | 31 | $scope.companyList = {}; |
32 | $scope.statusFilterOptions.push({ | 32 | $scope.statusFilterOptions.push({ |
33 | 'id' : '', | 33 | 'id' : '', |
34 | 'title' : 'Show All' | 34 | 'title' : 'Show All' |
35 | }, { | 35 | }, { |
36 | 'id' : 'pending', | 36 | 'id' : 'pending', |
37 | 'title' : 'Pending' | 37 | 'title' : 'Pending' |
38 | }, { | 38 | }, { |
39 | 'id' : 'invoiced', | 39 | 'id' : 'invoiced', |
40 | 'title' : 'Invoiced' | 40 | 'title' : 'Invoiced' |
41 | }, { | 41 | }, { |
42 | 'id' : 'paid', | 42 | 'id' : 'paid', |
43 | 'title' : 'Paid' | 43 | 'title' : 'Paid' |
44 | }, { | 44 | }, { |
45 | 'id' : 'cancelled', | 45 | 'id' : 'cancelled', |
46 | 'title' : 'Cancelled' | 46 | 'title' : 'Cancelled' |
47 | }, { | 47 | }, { |
48 | 'id' : 'archived', | 48 | 'id' : 'archived', |
49 | 'title' : 'Archived' | 49 | 'title' : 'Archived' |
50 | } | 50 | } |
51 | 51 | ||
52 | ); | 52 | ); |
53 | 53 | ||
54 | /*function getAllCompanies(){ | 54 | /*function getAllCompanies(){ |
55 | CustomersService.getAllCompanies().then(function(result) { | 55 | CustomersService.getAllCompanies().then(function(result) { |
56 | $scope.companyList = result; | 56 | $scope.companyList = result; |
57 | for(var i=0; i<$scope.companyList.length; i++){ | 57 | for(var i=0; i<$scope.companyList.length; i++){ |
58 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 58 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
59 | } | 59 | } |
60 | }) | 60 | }) |
61 | 61 | ||
62 | }*/ | 62 | }*/ |
63 | 63 | ||
64 | $scope.statusFilter = [ | 64 | $scope.statusFilter = [ |
65 | { | 65 | { |
66 | id : "", | 66 | id : "", |
67 | title : "Show All" | 67 | title : "Show All" |
68 | }, | 68 | }, |
69 | { | 69 | { |
70 | id : "true", | 70 | id : "true", |
71 | title : "Active" | 71 | title : "Active" |
72 | }, | 72 | }, |
73 | { | 73 | { |
74 | id : "false", | 74 | id : "false", |
75 | title : "Inactive" | 75 | title : "Inactive" |
76 | } | 76 | } |
77 | ] | 77 | ] |
78 | 78 | ||
79 | function getAllCompanies() { | 79 | function getAllCompanies() { |
80 | CustomersService.getAllCompanies().then(function(result) { | 80 | CustomersService.getAllCompanies().then(function(result) { |
81 | $scope.companyList = result; | 81 | $scope.companyList = result; |
82 | for (var i = 0; i < $scope.companyList.length; i++) { | 82 | for (var i = 0; i < $scope.companyList.length; i++) { |
83 | if ($scope.companyList[i].companyContact != null) { | 83 | if ($scope.companyList[i].companyContact != null) { |
84 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 84 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
85 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 85 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
86 | } | 86 | } |
87 | } | 87 | } |
88 | if ($scope.companyList[i].primaryContact != null) { | 88 | if ($scope.companyList[i].primaryContact != null) { |
89 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 89 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
90 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 90 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
91 | } | 91 | } |
92 | } | 92 | } |
93 | if ($scope.companyList[i].margin != null) { | 93 | if ($scope.companyList[i].margin != null) { |
94 | if ($scope.companyList[i].margin.marginName != null) { | 94 | if ($scope.companyList[i].margin.marginName != null) { |
95 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 95 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
96 | } | 96 | } |
97 | } | 97 | } |
98 | } | 98 | } |
99 | $scope.displayCompanyList = new NgTableParams({ | 99 | $scope.displayCompanyList = new NgTableParams({ |
100 | page : 1, | 100 | page : 1, |
101 | count : 10, | 101 | count : 10, |
102 | }, { | 102 | }, { |
103 | data : $scope.companyList | 103 | data : $scope.companyList |
104 | }); | 104 | }); |
105 | $scope.showLoader = false; | 105 | $scope.showLoader = false; |
106 | }) | 106 | }) |
107 | } | 107 | } |
108 | 108 | ||
109 | getAllCompanies(); | 109 | getAllCompanies(); |
110 | 110 | ||
111 | $scope.editMargin = function(customer) { | 111 | $scope.editMargin = function(customer) { |
112 | //console.log('customer', customer); | 112 | //console.log('customer', customer); |
113 | $scope.showLoader = true; | 113 | $scope.showLoader = true; |
114 | event.stopPropagation(); | 114 | event.stopPropagation(); |
115 | 115 | ||
116 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin | 116 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin |
117 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" | 117 | + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" |
118 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" | 118 | + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" |
119 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant | 119 | + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant |
120 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor | 120 | + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor |
121 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; | 121 | + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; |
122 | 122 | ||
123 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { | 123 | ViewCompanyService.updateCompany(companyMargin).then(function(result) { |
124 | if (result != null && result.success) { | 124 | if (result != null && result.success) { |
125 | $scope.showLoader = false; | 125 | $scope.showLoader = false; |
126 | toastr.success('' + result.success + '', { | 126 | toastr.success('' + result.success + '', { |
127 | closeButton : true | 127 | closeButton : true |
128 | }) | 128 | }) |
129 | getAllCompanies(); | 129 | getAllCompanies(); |
130 | } else { | 130 | } else { |
131 | $scope.showLoader = false; | 131 | $scope.showLoader = false; |
132 | toastr.error('' + result.statusText + '', { | 132 | toastr.error('' + result.statusText + '', { |
133 | closeButton : true | 133 | closeButton : true |
134 | }) | 134 | }) |
135 | } | 135 | } |
136 | }) | 136 | }) |
137 | } | 137 | } |
138 | 138 | ||
139 | getData(); | 139 | getData(); |
140 | function getData() { | 140 | function getData() { |
141 | $scope.showLoader = true; | 141 | $scope.showLoader = true; |
142 | CustomersService.getAircraftMake().then(function(result) { | 142 | CustomersService.getAircraftMake().then(function(result) { |
143 | //console.log("==aircrafts===",result) | 143 | //console.log("==aircrafts===",result) |
144 | $scope.aircraftMakeList = result; | 144 | $scope.aircraftMakeList = result; |
145 | $scope.showLoader = false; | 145 | $scope.showLoader = false; |
146 | }) | 146 | }) |
147 | } | 147 | } |
148 | // CustomersService.getMargin().then(function(result) { | 148 | // CustomersService.getMargin().then(function(result) { |
149 | // $scope.marginList = result; | 149 | // $scope.marginList = result; |
150 | // }) | 150 | // }) |
151 | $scope.marginFilterOptions = []; | 151 | $scope.marginFilterOptions = []; |
152 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 152 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
153 | $scope.showLoader = true; | 153 | $scope.showLoader = true; |
154 | $scope.jetMarginList = result; | 154 | $scope.jetMarginList = result; |
155 | //console.log("jet margin",result,$scope.userProfileId) | 155 | //console.log("jet margin",result,$scope.userProfileId) |
156 | $scope.marginFilterOptions.push({ | 156 | $scope.marginFilterOptions.push({ |
157 | 'id' : '', | 157 | 'id' : '', |
158 | 'title' : 'Show All' | 158 | 'title' : 'Show All' |
159 | }); | 159 | }); |
160 | for (var i = 0; i < result.length; i++) { | 160 | for (var i = 0; i < result.length; i++) { |
161 | $scope.marginFilterOptions.push({ | 161 | $scope.marginFilterOptions.push({ |
162 | 'id' : result[i].id, | 162 | 'id' : result[i].id, |
163 | 'title' : result[i].marginName | 163 | 'title' : result[i].marginName |
164 | }) | 164 | }) |
165 | } | 165 | } |
166 | $scope.showLoader = false; | 166 | $scope.showLoader = false; |
167 | }) | 167 | }) |
168 | 168 | ||
169 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 169 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
170 | $scope.avgsMarginList = result; | 170 | $scope.avgsMarginList = result; |
171 | // console.log('avgsMarginList',result) | 171 | // console.log('avgsMarginList',result) |
172 | }) | 172 | }) |
173 | 173 | ||
174 | 174 | ||
175 | $scope.showCompanyError = false; | 175 | $scope.showCompanyError = false; |
176 | $scope.showMarginError = false; | 176 | $scope.showMarginError = false; |
177 | 177 | ||
178 | $scope.removeValidation = function() { | 178 | $scope.removeValidation = function() { |
179 | $scope.showCompanyError = false; | 179 | $scope.showCompanyError = false; |
180 | $('.companyNameInput').removeClass('customErrorInput'); | 180 | $('.companyNameInput').removeClass('customErrorInput'); |
181 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 181 | if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
182 | $('.companyNameInput').addClass('customErrorInput'); | 182 | $('.companyNameInput').addClass('customErrorInput'); |
183 | $scope.showCompanyError = true; | 183 | $scope.showCompanyError = true; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | $scope.removeMarginValidation = function() { | 187 | $scope.removeMarginValidation = function() { |
188 | $scope.showMarginError = false; | 188 | $scope.showMarginError = false; |
189 | $('.marginSelectBox').removeClass('customErrorInput'); | 189 | $('.marginSelectBox').removeClass('customErrorInput'); |
190 | } | 190 | } |
191 | 191 | ||
192 | var companyData; | 192 | var companyData; |
193 | $scope.addFirstData = function(sel, step) { | 193 | $scope.addFirstData = function(sel, step) { |
194 | $scope.showLoader = true; | 194 | $scope.showLoader = true; |
195 | if ($scope.data.companyName == undefined) { | 195 | if ($scope.data.companyName == undefined) { |
196 | $scope.showCompanyError = true; | 196 | $scope.showCompanyError = true; |
197 | $('.companyNameInput').addClass('customErrorInput'); | 197 | $('.companyNameInput').addClass('customErrorInput'); |
198 | } else if ($scope.data.masterMargin == undefined) { | 198 | } else if ($scope.data.masterMargin == undefined) { |
199 | $scope.showMarginError = true; | 199 | $scope.showMarginError = true; |
200 | $('.marginSelectBox').addClass('customErrorInput'); | 200 | $('.marginSelectBox').addClass('customErrorInput'); |
201 | } else { | 201 | } else { |
202 | $scope.aircraftDetails = [ { | 202 | $scope.aircraftDetails = [ { |
203 | 'tail' : '', | 203 | 'tail' : '', |
204 | 'make' : '', | 204 | 'make' : '', |
205 | 'model' : '', | 205 | 'model' : '', |
206 | 'sizeId' : '', | 206 | 'sizeId' : '', |
207 | 'marginId' : $scope.data.masterMargin, | 207 | 'marginId' : $scope.data.masterMargin, |
208 | 'avgasMarginId' : $scope.data.avgasMargin | 208 | 'avgasMarginId' : $scope.data.avgasMargin |
209 | } ]; | 209 | } ]; |
210 | 210 | ||
211 | $(sel).trigger('next.m.' + step); | 211 | $(sel).trigger('next.m.' + step); |
212 | getData(); | 212 | getData(); |
213 | } | 213 | } |
214 | $scope.showLoader = false; | 214 | $scope.showLoader = false; |
215 | } | 215 | } |
216 | 216 | ||
217 | $scope.addNew = function() { | 217 | $scope.addNew = function() { |
218 | $scope.showLoader = true; | 218 | $scope.showLoader = true; |
219 | $scope.aircraftDetails.push({ | 219 | $scope.aircraftDetails.push({ |
220 | 'tail' : '', | 220 | 'tail' : '', |
221 | 'make' : '', | 221 | 'make' : '', |
222 | 'model' : '', | 222 | 'model' : '', |
223 | 'sizeId' : '', | 223 | 'sizeId' : '', |
224 | 'marginId' : $scope.data.masterMargin, | 224 | 'marginId' : $scope.data.masterMargin, |
225 | 'avgasMarginId' : $scope.data.avgasMargin | 225 | 'avgasMarginId' : $scope.data.avgasMargin |
226 | }); | 226 | }); |
227 | $scope.showLoader = false; | 227 | $scope.showLoader = false; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | $scope.aircraftIdx = ''; | 230 | $scope.aircraftIdx = ''; |
231 | $scope.checkTail = function(tail, idx){ | 231 | $scope.checkTail = function(tail, idx){ |
232 | var data = "tail=" + tail; | 232 | var data = "tail=" + tail; |
233 | $scope.aircraftIdx = idx; | 233 | $scope.aircraftIdx = idx; |
234 | CustomersService.checkTailRegistration(data).then(function(result) { | 234 | CustomersService.checkTailRegistration(data).then(function(result) { |
235 | if(result.error) { | 235 | if(result.error) { |
236 | $scope.aircraftMessage = result.error; | 236 | $scope.aircraftMessage = result.error; |
237 | $scope.openAddAirCraftError(); | 237 | $scope.openAddAirCraftError(); |
238 | } else if(result.warning) { | 238 | } else if(result.warning) { |
239 | $scope.aircraftMessage = result.warning; | 239 | $scope.aircraftMessage = result.warning; |
240 | $scope.openAddAirCraftWarning(); | 240 | $scope.openAddAirCraftWarning(); |
241 | } | 241 | } |
242 | }) | 242 | }) |
243 | } | 243 | } |
244 | 244 | ||
245 | $scope.openAddAirCraftError = function() { | 245 | $scope.openAddAirCraftError = function() { |
246 | $('#addAirCraftError').css('display', 'block'); | 246 | $('#addAirCraftError').css('display', 'block'); |
247 | } | 247 | } |
248 | 248 | ||
249 | $scope.openAddAirCraftWarning = function() { | 249 | $scope.openAddAirCraftWarning = function() { |
250 | $('#addAirCraftWarning').css('display', 'block'); | 250 | $('#addAirCraftWarning').css('display', 'block'); |
251 | } | 251 | } |
252 | $scope.acceptAirCraftError = function() { | 252 | $scope.acceptAirCraftError = function() { |
253 | $('#addAirCraftWarning').css('display', 'none'); | 253 | $('#addAirCraftWarning').css('display', 'none'); |
254 | } | 254 | } |
255 | 255 | ||
256 | $scope.cancelAirCraftError = function() { | 256 | $scope.cancelAirCraftError = function() { |
257 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 257 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
258 | $('#addAirCraftWarning').css('display', 'none'); | 258 | $('#addAirCraftWarning').css('display', 'none'); |
259 | $('#addAirCraftError').css('display', 'none'); | 259 | $('#addAirCraftError').css('display', 'none'); |
260 | } | 260 | } |
261 | 261 | ||
262 | 262 | ||
263 | /*$scope.getModal = function(makeId, index) { | 263 | /*$scope.getModal = function(makeId, index) { |
264 | $scope.showLoader = true; | 264 | $scope.showLoader = true; |
265 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 265 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
266 | $scope.showLoader = false; | 266 | $scope.showLoader = false; |
267 | $scope.aircraftDetails[index].aircraftModalList = result; | 267 | $scope.aircraftDetails[index].aircraftModalList = result; |
268 | }) | 268 | }) |
269 | }*/ | 269 | }*/ |
270 | $scope.getModal = function(makeId, index) { | 270 | $scope.getModal = function(makeId, index) { |
271 | $scope.showLoader = true; | 271 | $scope.showLoader = true; |
272 | $scope.aircraft.make = makeId; | 272 | $scope.aircraft.make = makeId; |
273 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 273 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
274 | $scope.showLoader = false; | 274 | $scope.showLoader = false; |
275 | $scope.aircraftDetails[index].aircraftModalList = result; | 275 | $scope.aircraftDetails[index].aircraftModalList = result; |
276 | }) | 276 | }) |
277 | } | 277 | } |
278 | 278 | ||
279 | 279 | ||
280 | $scope.selectedOption = ''; | 280 | $scope.selectedOption = ''; |
281 | $scope.getSize = function(model, index) { | 281 | $scope.getSize = function(model, index) { |
282 | $scope.showLoader = true; | 282 | $scope.showLoader = true; |
283 | $scope.aircraft.model = model; | 283 | $scope.aircraft.model = model; |
284 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 284 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
285 | $scope.showLoader = false; | 285 | $scope.showLoader = false; |
286 | $scope.aircraftDetails[index].aircraftSizeList = result; | 286 | $scope.aircraftDetails[index].aircraftSizeList = result; |
287 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | ||
287 | 288 | ||
288 | }) | 289 | }) |
289 | } | 290 | } |
290 | 291 | ||
291 | /*$scope.getSize = function(model, index) { | 292 | /*$scope.getSize = function(model, index) { |
292 | $scope.showLoader = true; | 293 | $scope.showLoader = true; |
293 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 294 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
294 | $scope.showLoader = false; | 295 | $scope.showLoader = false; |
295 | $scope.aircraftDetails[index].aircraftSizeList = result; | 296 | $scope.aircraftDetails[index].aircraftSizeList = result; |
296 | }) | 297 | }) |
297 | }*/ | 298 | }*/ |
298 | 299 | ||
299 | $scope.getFuelType = function(size, index) { | 300 | $scope.getFuelType = function(size, index) { |
300 | $scope.showLoader = true; | 301 | $scope.showLoader = true; |
301 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 302 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
302 | ViewCompanyService.checkFuelType(data).then(function(result){ | 303 | ViewCompanyService.checkFuelType(data).then(function(result){ |
303 | $scope.showLoader = false; | 304 | $scope.showLoader = false; |
304 | if (result.type == "JetA") { | 305 | if (result.type == "JetA") { |
305 | $scope.jetShow[index] = false; | 306 | $scope.jetShow[index] = false; |
306 | $scope.marginShow[index] = true; | 307 | $scope.marginShow[index] = true; |
307 | } else if (result.type == "Avgas") { | 308 | } else if (result.type == "Avgas") { |
308 | $scope.jetShow[index] = true; | 309 | $scope.jetShow[index] = true; |
309 | $scope.marginShow[index] = false; | 310 | $scope.marginShow[index] = false; |
310 | }else { | 311 | }else { |
311 | $scope.jetShow[index] = true; | 312 | $scope.jetShow[index] = true; |
312 | $scope.marginShow[index] = true; | 313 | $scope.marginShow[index] = true; |
313 | } | 314 | } |
314 | }) | 315 | }) |
315 | } | 316 | } |
316 | 317 | ||
317 | $scope.aircraftListData = {}; | 318 | $scope.aircraftListData = {}; |
318 | $scope.addData = []; | 319 | $scope.addData = []; |
319 | $scope.tailArray = []; | 320 | $scope.tailArray = []; |
320 | function check(array){ | 321 | function check(array){ |
321 | return (new Set(array)).size !== array.length; | 322 | return (new Set(array)).size !== array.length; |
322 | } | 323 | } |
323 | $scope.saveCompanyData = function() { | 324 | $scope.saveCompanyData = function() { |
324 | // console.log("company data --",$scope.data) | 325 | // console.log("company data --",$scope.data) |
325 | CustomersService.addCompany($scope.data).then(function(result) { | 326 | CustomersService.addCompany($scope.data).then(function(result) { |
326 | $scope.tailArray = []; | 327 | $scope.tailArray = []; |
327 | $scope.addData =[]; | 328 | $scope.addData =[]; |
328 | $scope.accountId = result; | 329 | $scope.accountId = result; |
329 | $scope.aircraft.accountId = $scope.accountId; | 330 | $scope.aircraft.accountId = $scope.accountId; |
330 | 331 | ||
331 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 332 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
332 | $scope.addData.push({ | 333 | $scope.addData.push({ |
333 | 'tail' : $scope.aircraftDetails[i].tail, | 334 | 'tail' : $scope.aircraftDetails[i].tail, |
334 | 'make' : $scope.aircraftDetails[i].make, | 335 | 'make' : $scope.aircraftDetails[i].make, |
335 | 'model' : $scope.aircraftDetails[i].model, | 336 | 'model' : $scope.aircraftDetails[i].model, |
336 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 337 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
337 | 'marginId' : $scope.aircraftDetails[i].marginId, | 338 | 'marginId' : $scope.aircraftDetails[i].marginId, |
338 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId | 339 | 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId |
339 | }); | 340 | }); |
340 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 341 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
341 | } | 342 | } |
342 | 343 | ||
343 | if (check($scope.tailArray)) { | 344 | if (check($scope.tailArray)) { |
344 | toastr.error('Duplicate Tail Added.', { | 345 | toastr.error('Duplicate Tail Added.', { |
345 | closeButton: true | 346 | closeButton: true |
346 | }) | 347 | }) |
347 | }else{ | 348 | }else{ |
348 | $scope.aircraftListData.aircraftList = $scope.addData; | 349 | $scope.aircraftListData.aircraftList = $scope.addData; |
349 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 350 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
350 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { | 351 | /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { |
351 | $scope.aircraftListData.aircraftList = []; | 352 | $scope.aircraftListData.aircraftList = []; |
352 | }*/ | 353 | }*/ |
353 | 354 | ||
354 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 355 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
355 | 356 | ||
356 | if (result != null && result.success) { | 357 | if (result != null && result.success) { |
357 | 358 | ||
358 | toastr.success('' + result.success + '', { | 359 | toastr.success('' + result.success + '', { |
359 | closeButton : true | 360 | closeButton : true |
360 | }) | 361 | }) |
361 | $('#demo-modal-3').css('display', 'none'); | 362 | $('#demo-modal-3').css('display', 'none'); |
362 | $('.modal-backdrop').css('display', 'none'); | 363 | $('.modal-backdrop').css('display', 'none'); |
363 | getAllCompanies(); | 364 | getAllCompanies(); |
364 | location.reload(); | 365 | location.reload(); |
365 | } else { | 366 | } else { |
366 | toastr.error('' + result.statusText + '', { | 367 | toastr.error('' + result.statusText + '', { |
367 | closeButton : true | 368 | closeButton : true |
368 | }) | 369 | }) |
369 | } | 370 | } |
370 | }); | 371 | }); |
371 | } | 372 | } |
372 | }) | 373 | }) |
373 | } | 374 | } |
374 | 375 | ||
375 | /*add a fuel order*/ | 376 | /*add a fuel order*/ |
376 | $scope.getOrders = function() { | 377 | $scope.getOrders = function() { |
377 | fuelOrdersService.getOrders().then(function(result) { | 378 | fuelOrdersService.getOrders().then(function(result) { |
378 | //console.log("==get orders===",result) | 379 | //console.log("==get orders===",result) |
379 | $scope.orderdata = result; | 380 | $scope.orderdata = result; |
380 | for (var i = 0; i < $scope.orderdata.length; i++) { | 381 | for (var i = 0; i < $scope.orderdata.length; i++) { |
381 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 382 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
382 | 383 | ||
383 | // 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() |
384 | 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() |
385 | // str = str.slice(4,16) | 386 | // str = str.slice(4,16) |
386 | $scope.orderdata[i].upliftDateString = str | 387 | $scope.orderdata[i].upliftDateString = str |
387 | // console.log(str); | 388 | // console.log(str); |
388 | 389 | ||
389 | } | 390 | } |
390 | 391 | ||
391 | $scope.displayFuelOrderList = new NgTableParams({ | 392 | $scope.displayFuelOrderList = new NgTableParams({ |
392 | page : 1, | 393 | page : 1, |
393 | count : 10, | 394 | count : 10, |
394 | }, { | 395 | }, { |
395 | data : $scope.orderdata | 396 | data : $scope.orderdata |
396 | }); | 397 | }); |
397 | $(document).ready(function() { | 398 | $(document).ready(function() { |
398 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 399 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
399 | 400 | ||
400 | for (var i = 0; i < myselect.length; i++) { | 401 | for (var i = 0; i < myselect.length; i++) { |
401 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 402 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
402 | colourIndex = colourIndex + 1; | 403 | colourIndex = colourIndex + 1; |
403 | // console.log(colourIndex); | 404 | // console.log(colourIndex); |
404 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 405 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
405 | $(myselect[i]).css('background-color', getColor); | 406 | $(myselect[i]).css('background-color', getColor); |
406 | // console.log('colour', getColor); | 407 | // console.log('colour', getColor); |
407 | myselect[i].blur(); | 408 | myselect[i].blur(); |
408 | } | 409 | } |
409 | 410 | ||
410 | }) | 411 | }) |
411 | 412 | ||
412 | }) | 413 | }) |
413 | } | 414 | } |
414 | 415 | ||
415 | $scope.getOrders(); | 416 | $scope.getOrders(); |
416 | $scope.tiervalue=function(){ | 417 | $scope.tiervalue=function(){ |
417 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 418 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
418 | } | 419 | } |
419 | 420 | ||
420 | $scope.setCost = function(cost){ | 421 | $scope.setCost = function(cost){ |
421 | if(cost != null) { | 422 | if(cost != null) { |
422 | var obj =JSON.parse(cost); | 423 | var obj =JSON.parse(cost); |
423 | $scope.order.fboCost = obj.cost; | 424 | $scope.order.fboCost = obj.cost; |
424 | } | 425 | } |
425 | } | 426 | } |
426 | 427 | ||
427 | $scope.cancelOrder = function() { | 428 | $scope.cancelOrder = function() { |
428 | $scope.order = {}; | 429 | $scope.order = {}; |
429 | } | 430 | } |
430 | 431 | ||
431 | $scope.dispatchFuel = function(){ | 432 | $scope.dispatchFuel = function(){ |
432 | $scope.showLoader = true; | 433 | $scope.showLoader = true; |
433 | $scope.fuelData = {}; | 434 | $scope.fuelData = {}; |
434 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 435 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
435 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; | 436 | $scope.fuelData.companyName =$scope.order.defaultCompanyName; |
436 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 437 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
437 | $scope.fuelData.aircraftName = aircraftObj.tail; | 438 | $scope.fuelData.aircraftName = aircraftObj.tail; |
438 | $scope.fuelData.make = aircraftObj.make; | 439 | $scope.fuelData.make = aircraftObj.make; |
439 | $scope.fuelData.model = aircraftObj.model; | 440 | $scope.fuelData.model = aircraftObj.model; |
440 | $scope.fuelData.fuelOn = $scope.order.fuelOn; | 441 | $scope.fuelData.fuelOn = $scope.order.fuelOn; |
441 | $scope.fuelData.invoiced = $scope.order.invoiced; | 442 | $scope.fuelData.invoiced = $scope.order.invoiced; |
442 | $scope.fuelData.volume = $scope.order.volume; | 443 | $scope.fuelData.volume = $scope.order.volume; |
443 | $scope.fuelData.source = $scope.order.source; | 444 | $scope.fuelData.source = $scope.order.source; |
444 | 445 | ||
445 | $scope.fuelData.total = $scope.order.total; | 446 | $scope.fuelData.total = $scope.order.total; |
446 | //tier no use | 447 | //tier no use |
447 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 448 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
448 | 449 | ||
449 | var obj =JSON.parse($scope.order.priceQuote); | 450 | var obj =JSON.parse($scope.order.priceQuote); |
450 | $scope.fuelData.priceQuote = obj.papTotal; | 451 | $scope.fuelData.priceQuote = obj.papTotal; |
451 | $scope.fuelData.fboCost = obj.cost; | 452 | $scope.fuelData.fboCost = obj.cost; |
452 | $scope.fuelData.productName = obj.productName; | 453 | $scope.fuelData.productName = obj.productName; |
453 | 454 | ||
454 | $scope.fuelData.etaTime = $scope.order.etaTime; | 455 | $scope.fuelData.etaTime = $scope.order.etaTime; |
455 | $scope.fuelData.etdTime = $scope.order.etdTime; | 456 | $scope.fuelData.etdTime = $scope.order.etdTime; |
456 | $scope.fuelData.certificateType = $scope.order.certificateType; | 457 | $scope.fuelData.certificateType = $scope.order.certificateType; |
457 | var currentDate = new Date(); | 458 | var currentDate = new Date(); |
458 | var hours = currentDate.getHours(); | 459 | var hours = currentDate.getHours(); |
459 | var min = currentDate.getMinutes(); | 460 | var min = currentDate.getMinutes(); |
460 | var sec = currentDate.getSeconds(); | 461 | var sec = currentDate.getSeconds(); |
461 | if ($scope.order.upliftDate != '') { | 462 | if ($scope.order.upliftDate != '') { |
462 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 463 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
463 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 464 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
464 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 465 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
465 | } | 466 | } |
466 | 467 | ||
467 | 468 | ||
468 | if ($scope.order.departingDate != '') { | 469 | if ($scope.order.departingDate != '') { |
469 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 470 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
470 | $scope.order.departingDate = new Date($scope.order.departingDate); | 471 | $scope.order.departingDate = new Date($scope.order.departingDate); |
471 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 472 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
472 | } | 473 | } |
473 | 474 | ||
474 | if($scope.order.status === null || $scope.order.status === undefined){ | 475 | if($scope.order.status === null || $scope.order.status === undefined){ |
475 | 476 | ||
476 | $scope.fuelData.status = "pending"; //default status | 477 | $scope.fuelData.status = "pending"; //default status |
477 | 478 | ||
478 | }else { | 479 | }else { |
479 | 480 | ||
480 | $scope.fuelData.status = $scope.order.status; | 481 | $scope.fuelData.status = $scope.order.status; |
481 | } | 482 | } |
482 | 483 | ||
483 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 484 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
484 | // console.log("=====$scope.fueldata======",$scope.fuelData) | 485 | // console.log("=====$scope.fueldata======",$scope.fuelData) |
485 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 486 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
486 | $scope.showLoader = false; | 487 | $scope.showLoader = false; |
487 | $scope.order = {}; | 488 | $scope.order = {}; |
488 | $scope.dispatchOrder.fuelOrderList = []; | 489 | $scope.dispatchOrder.fuelOrderList = []; |
489 | $('#demo-modal-4').css('display', ''); | 490 | $('#demo-modal-4').css('display', ''); |
490 | $scope.getOrders(); | 491 | $scope.getOrders(); |
491 | toastr.success('Fuel Order Dispatched Successfully', { | 492 | toastr.success('Fuel Order Dispatched Successfully', { |
492 | closeButton: true | 493 | closeButton: true |
493 | }) | 494 | }) |
494 | }) | 495 | }) |
495 | } | 496 | } |
496 | 497 | ||
497 | $scope.addTotal = function(value, valueOf) { | 498 | $scope.addTotal = function(value, valueOf) { |
498 | if (value != undefined && valueOf != undefined) { | 499 | if (value != undefined && valueOf != undefined) { |
499 | value = JSON.parse(value) | 500 | value = JSON.parse(value) |
500 | $scope.order.total = value.cost * valueOf; | 501 | $scope.order.total = value.cost * valueOf; |
501 | } | 502 | } |
502 | } | 503 | } |
503 | 504 | ||
504 | $scope.getAircraft = function(company) { | 505 | $scope.getAircraft = function(company) { |
505 | $scope.selectedCompanyName = company; | 506 | $scope.selectedCompanyName = company; |
506 | //$scope.showLoader = true; | 507 | //$scope.showLoader = true; |
507 | // console.log("id",company) | 508 | // console.log("id",company) |
508 | for (var i = 0; i < $scope.companyList.length; i++) { | 509 | for (var i = 0; i < $scope.companyList.length; i++) { |
509 | if ($scope.companyList[i].companyName == company) { | 510 | if ($scope.companyList[i].companyName == company) { |
510 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { | 511 | if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { |
511 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 512 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
512 | $scope.marginList = margins; | 513 | $scope.marginList = margins; |
513 | //console.log('$scope.marginList', $scope.marginList); | 514 | //console.log('$scope.marginList', $scope.marginList); |
514 | }) | 515 | }) |
515 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 516 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
516 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 517 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
517 | $scope.marginList = margins; | 518 | $scope.marginList = margins; |
518 | }) | 519 | }) |
519 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 520 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
520 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 521 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
521 | $scope.marginList = margins; | 522 | $scope.marginList = margins; |
522 | }) | 523 | }) |
523 | } | 524 | } |
524 | $scope.selectedCompanyId = $scope.companyList[i].id; | 525 | $scope.selectedCompanyId = $scope.companyList[i].id; |
525 | $scope.marginId = $scope.companyList[i].margin.id; | 526 | $scope.marginId = $scope.companyList[i].margin.id; |
526 | if ($scope.selectedCompanyId != '') { | 527 | if ($scope.selectedCompanyId != '') { |
527 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 528 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
528 | $scope.aircraftList = aircraft; | 529 | $scope.aircraftList = aircraft; |
529 | //console.log("===tail search====",aircraft); | 530 | //console.log("===tail search====",aircraft); |
530 | }) | 531 | }) |
531 | } | 532 | } |
532 | if ($scope.marginId != '') { | 533 | if ($scope.marginId != '') { |
533 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 534 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
534 | $scope.tierList = tiers; | 535 | $scope.tierList = tiers; |
535 | // $scope.showLoader = false; | 536 | // $scope.showLoader = false; |
536 | }) | 537 | }) |
537 | } else { | 538 | } else { |
538 | // $scope.showLoader = false; | 539 | // $scope.showLoader = false; |
539 | } | 540 | } |
540 | } | 541 | } |
541 | } | 542 | } |
542 | 543 | ||
543 | } | 544 | } |
544 | 545 | ||
545 | $scope.sourceList = [ { | 546 | $scope.sourceList = [ { |
546 | source : "Direct Jet-A" | 547 | source : "Direct Jet-A" |
547 | }, { | 548 | }, { |
548 | source : "Direct AVGAS 100LL" | 549 | source : "Direct AVGAS 100LL" |
549 | } ]; | 550 | } ]; |
550 | $scope.cancelData = function() { | 551 | $scope.cancelData = function() { |
551 | $scope.order = {}; | 552 | $scope.order = {}; |
552 | $('#demo-modal-4').css('display', ''); | 553 | $('#demo-modal-4').css('display', ''); |
553 | } | 554 | } |
554 | 555 | ||
555 | $scope.setFuel = function(companyName,certificateType) { | 556 | $scope.setFuel = function(companyName,certificateType) { |
556 | $('#demo-modal-4').css('display', 'block'); | 557 | $('#demo-modal-4').css('display', 'block'); |
557 | $scope.order.defaultCompanyName = companyName; | 558 | $scope.order.defaultCompanyName = companyName; |
558 | $scope.order.certificateType = certificateType; | 559 | $scope.order.certificateType = certificateType; |
559 | $scope.getAircraft(companyName); | 560 | $scope.getAircraft(companyName); |
560 | // event.stopPropagation(); | 561 | // event.stopPropagation(); |
561 | // $state.go('app.updateFuelManager'); | 562 | // $state.go('app.updateFuelManager'); |
562 | } | 563 | } |
563 | 564 | ||
564 | /* ng table */ | 565 | /* ng table */ |
565 | 566 | ||
566 | $scope.exportCompany = function() { | 567 | $scope.exportCompany = function() { |
567 | $scope.showLoader = true; | 568 | $scope.showLoader = true; |
568 | var fileName = "companies.csv"; | 569 | var fileName = "companies.csv"; |
569 | var a = document.createElement("a"); | 570 | var a = document.createElement("a"); |
570 | document.body.appendChild(a); | 571 | document.body.appendChild(a); |
571 | CustomersService.exportCompany().then(function(result) { | 572 | CustomersService.exportCompany().then(function(result) { |
572 | var file = new Blob([ result ], { | 573 | var file = new Blob([ result ], { |
573 | type : 'application/csv' | 574 | type : 'application/csv' |
574 | }); | 575 | }); |
575 | var fileURL = URL.createObjectURL(file); | 576 | var fileURL = URL.createObjectURL(file); |
576 | a.href = fileURL; | 577 | a.href = fileURL; |
577 | a.download = fileName; | 578 | a.download = fileName; |
578 | a.click(); | 579 | a.click(); |
579 | $scope.showLoader = false; | 580 | $scope.showLoader = false; |
580 | }) | 581 | }) |
581 | } | 582 | } |
582 | getCompanyName(); | 583 | getCompanyName(); |
583 | function getCompanyName() { | 584 | function getCompanyName() { |
584 | CustomersService.getCompanyName().then(function(result) { | 585 | CustomersService.getCompanyName().then(function(result) { |
585 | $scope.compNameList = result; | 586 | $scope.compNameList = result; |
586 | //console.log("kd",result) | 587 | //console.log("kd",result) |
587 | }) | 588 | }) |
588 | } | 589 | } |
589 | 590 | ||
590 | // old api not use | 591 | // old api not use |
591 | /*$scope.checkJetWithTail = function(tail, index) { | 592 | /*$scope.checkJetWithTail = function(tail, index) { |
592 | ViewCompanyService.checkJetType(tail).then(function(result) { | 593 | ViewCompanyService.checkJetType(tail).then(function(result) { |
593 | if (result.jetA == "true") { | 594 | if (result.jetA == "true") { |
594 | $scope.jetShow[index] = false; | 595 | $scope.jetShow[index] = false; |
595 | $scope.marginShow[index] = true; | 596 | $scope.marginShow[index] = true; |
596 | } else { | 597 | } else { |
597 | $scope.jetShow[index] = true; | 598 | $scope.jetShow[index] = true; |
598 | $scope.marginShow[index] = false; | 599 | $scope.marginShow[index] = false; |
599 | } | 600 | } |
600 | }) | 601 | }) |
601 | }*/ | 602 | }*/ |
602 | 603 | ||
603 | 604 | ||
604 | $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"}, | 605 | $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
605 | {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"}, | 606 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
606 | {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"}, | 607 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
607 | {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"}, | 608 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
608 | {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"}, | 609 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
609 | {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"},]; | 610 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
610 | 611 | ||
611 | $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"}, | 612 | $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
612 | {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"}, | 613 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
613 | {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"}, | 614 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
614 | {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"}, | 615 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
615 | {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"}, | 616 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
616 | {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"},]; | 617 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
617 | 618 | ||
618 | } | 619 | } |
app/partials/viewCompany/viewCompany.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | //Load controller | 3 | //Load controller |
4 | angular.module('acufuel') | 4 | angular.module('acufuel') |
5 | 5 | ||
6 | .controller('viewCompanyController', ['$scope', '$uibModal', '$stateParams', 'ViewCompanyService', 'CustomersService', 'updateFuelManagerService', 'ViewFuelVendorService', 'ViewcontactService', '$state', 'fuelOrdersService', 'enterFuelOrderService', 'NgTableParams', function($scope, $uibModal, $stateParams, ViewCompanyService, CustomersService, updateFuelManagerService, ViewFuelVendorService, ViewcontactService, $state, fuelOrdersService, enterFuelOrderService, NgTableParams) { | 6 | .controller('viewCompanyController', ['$scope', '$uibModal', '$stateParams', 'ViewCompanyService', 'CustomersService', 'updateFuelManagerService', 'ViewFuelVendorService', 'ViewcontactService', '$state', 'fuelOrdersService', 'enterFuelOrderService', 'NgTableParams', function($scope, $uibModal, $stateParams, ViewCompanyService, CustomersService, updateFuelManagerService, ViewFuelVendorService, ViewcontactService, $state, fuelOrdersService, enterFuelOrderService, NgTableParams) { |
7 | $scope.data = {}; | 7 | $scope.data = {}; |
8 | $scope.data.priceEmail = true; | 8 | $scope.data.priceEmail = true; |
9 | $scope.aircraft = {}; | 9 | $scope.aircraft = {}; |
10 | $scope.primayData = {}; | 10 | $scope.primayData = {}; |
11 | $scope.showLoader = false; | 11 | $scope.showLoader = false; |
12 | $scope.showUpdateBtn = false; | 12 | $scope.showUpdateBtn = false; |
13 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); | 13 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); |
14 | $scope.selected = []; | 14 | $scope.selected = []; |
15 | $scope.jetShow = []; | 15 | $scope.jetShow = []; |
16 | $scope.marginShow = []; | 16 | $scope.marginShow = []; |
17 | $scope.compId = $stateParams.id; | 17 | $scope.compId = $stateParams.id; |
18 | $scope.jetShow[0] = true; | 18 | $scope.jetShow[0] = true; |
19 | $scope.marginShow[0] = true; | 19 | $scope.marginShow[0] = true; |
20 | $scope.dispatchOrder = {}; | 20 | $scope.dispatchOrder = {}; |
21 | $scope.dispatchOrder.fuelOrderList = []; | 21 | $scope.dispatchOrder.fuelOrderList = []; |
22 | $scope.statusFilterOptions = []; | 22 | $scope.statusFilterOptions = []; |
23 | $scope.companyList = {}; | 23 | $scope.companyList = {}; |
24 | $scope.statusFilterOptions.push({ | 24 | $scope.statusFilterOptions.push({ |
25 | 'id': '', | 25 | 'id': '', |
26 | 'title': 'Show All' | 26 | 'title': 'Show All' |
27 | }, { | 27 | }, { |
28 | 'id': 'pending', | 28 | 'id': 'pending', |
29 | 'title': 'Pending' | 29 | 'title': 'Pending' |
30 | }, { | 30 | }, { |
31 | 'id': 'invoiced', | 31 | 'id': 'invoiced', |
32 | 'title': 'Invoiced' | 32 | 'title': 'Invoiced' |
33 | }, { | 33 | }, { |
34 | 'id': 'paid', | 34 | 'id': 'paid', |
35 | 'title': 'Paid' | 35 | 'title': 'Paid' |
36 | }, { | 36 | }, { |
37 | 'id': 'cancelled', | 37 | 'id': 'cancelled', |
38 | 'title': 'Cancelled' | 38 | 'title': 'Cancelled' |
39 | }, { | 39 | }, { |
40 | 'id': 'archived', | 40 | 'id': 'archived', |
41 | 'title': 'Archived' | 41 | 'title': 'Archived' |
42 | } | 42 | } |
43 | 43 | ||
44 | ); | 44 | ); |
45 | 45 | ||
46 | $scope.order = {}; | 46 | $scope.order = {}; |
47 | $scope.order.companyName = ''; | 47 | $scope.order.companyName = ''; |
48 | $scope.order.upliftDate = ''; | 48 | $scope.order.upliftDate = ''; |
49 | /*Get AllCompany api is used from CustomersService*/ | 49 | /*Get AllCompany api is used from CustomersService*/ |
50 | getAllCompanies(); | 50 | getAllCompanies(); |
51 | 51 | ||
52 | function getAllCompanies() { | 52 | function getAllCompanies() { |
53 | CustomersService.getAllCompanies().then(function(result) { | 53 | CustomersService.getAllCompanies().then(function(result) { |
54 | //console.log('log', result[2].id); | 54 | //console.log('log', result[2].id); |
55 | $scope.companyList = result; | 55 | $scope.companyList = result; |
56 | 56 | ||
57 | for (var i = 0; i < $scope.companyList.length; i++) { | 57 | for (var i = 0; i < $scope.companyList.length; i++) { |
58 | if ($scope.companyList[i].companyContact != null) { | 58 | if ($scope.companyList[i].companyContact != null) { |
59 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 59 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
60 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 60 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
61 | } | 61 | } |
62 | } | 62 | } |
63 | if ($scope.companyList[i].primaryContact != null) { | 63 | if ($scope.companyList[i].primaryContact != null) { |
64 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 64 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
65 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 65 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
66 | } | 66 | } |
67 | } | 67 | } |
68 | if ($scope.companyList[i].margin != null) { | 68 | if ($scope.companyList[i].margin != null) { |
69 | if ($scope.companyList[i].margin.marginName != null) { | 69 | if ($scope.companyList[i].margin.marginName != null) { |
70 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 70 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | } | 73 | } |
74 | $scope.displayCompanyList = new NgTableParams({ | 74 | $scope.displayCompanyList = new NgTableParams({ |
75 | page: 1, | 75 | page: 1, |
76 | count: 10, | 76 | count: 10, |
77 | }, { | 77 | }, { |
78 | data: $scope.companyList | 78 | data: $scope.companyList |
79 | }); | 79 | }); |
80 | $scope.showLoader = false; | 80 | $scope.showLoader = false; |
81 | }) | 81 | }) |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | $(document).ready(function() { | 85 | $(document).ready(function() { |
86 | $("#reset").click(function() { | 86 | $("#reset").click(function() { |
87 | $("input").val(""); | 87 | $("input").val(""); |
88 | }); | 88 | }); |
89 | }); | 89 | }); |
90 | 90 | ||
91 | $scope.values = [{ | 91 | $scope.values = [{ |
92 | 'id': 1, | 92 | 'id': 1, |
93 | 'first': 'Tenant/Base Customer' | 93 | 'first': 'Tenant/Base Customer' |
94 | }, | 94 | }, |
95 | { | 95 | { |
96 | 'id': 2, | 96 | 'id': 2, |
97 | 'first': 'FuelerLinx Customer' | 97 | 'first': 'FuelerLinx Customer' |
98 | }, | 98 | }, |
99 | { | 99 | { |
100 | 'id': 3, | 100 | 'id': 3, |
101 | 'first': 'CAA Member' | 101 | 'first': 'CAA Member' |
102 | } | 102 | } |
103 | ]; | 103 | ]; |
104 | 104 | ||
105 | 105 | ||
106 | 106 | ||
107 | $scope.changeValue = function(selected) { | 107 | $scope.changeValue = function(selected) { |
108 | $scope.showUpdateBtn = true; | 108 | $scope.showUpdateBtn = true; |
109 | // console.log("data to be true", selected); | 109 | // console.log("data to be true", selected); |
110 | for (var i = 0; i < selected.length; i++) { | 110 | for (var i = 0; i < selected.length; i++) { |
111 | // console.log(selected[i]) | 111 | // console.log(selected[i]) |
112 | if (selected[i] == 'Tenant/Base Customer') { | 112 | if (selected[i] == 'Tenant/Base Customer') { |
113 | $scope.companyData.baseTenant = true; | 113 | $scope.companyData.baseTenant = true; |
114 | } else { | 114 | } else { |
115 | $scope.companyData.baseTenant = false; | 115 | $scope.companyData.baseTenant = false; |
116 | } | 116 | } |
117 | if (selected[i] == 'FuelerLinx Customer') { | 117 | if (selected[i] == 'FuelerLinx Customer') { |
118 | $scope.companyData.fuelerlinxCustomer = true; | 118 | $scope.companyData.fuelerlinxCustomer = true; |
119 | } else { | 119 | } else { |
120 | $scope.companyData.fuelerlinxCustomer = false; | 120 | $scope.companyData.fuelerlinxCustomer = false; |
121 | } | 121 | } |
122 | 122 | ||
123 | if (selected[i] == 'CAA Member') { | 123 | if (selected[i] == 'CAA Member') { |
124 | $scope.companyData.contractFuelVendor = true; | 124 | $scope.companyData.contractFuelVendor = true; |
125 | } else { | 125 | } else { |
126 | $scope.companyData.contractFuelVendor = false; | 126 | $scope.companyData.contractFuelVendor = false; |
127 | } | 127 | } |
128 | 128 | ||
129 | // console.log($scope.companyData) | 129 | // console.log($scope.companyData) |
130 | 130 | ||
131 | } | 131 | } |
132 | 132 | ||
133 | } | 133 | } |
134 | 134 | ||
135 | // $scope.selected =[ | 135 | // $scope.selected =[ |
136 | // {'id': 1, 'first': 'Tenant/Base Customer'}, | 136 | // {'id': 1, 'first': 'Tenant/Base Customer'}, |
137 | // {'id': 2, 'first': 'FuelerLinx Customer'}, | 137 | // {'id': 2, 'first': 'FuelerLinx Customer'}, |
138 | // {'id': 3, 'first': 'CAA Member'} | 138 | // {'id': 3, 'first': 'CAA Member'} |
139 | // ]; | 139 | // ]; |
140 | 140 | ||
141 | // CustomersService.getMargin().then(function(result) { | 141 | // CustomersService.getMargin().then(function(result) { |
142 | // $scope.marginList = result; | 142 | // $scope.marginList = result; |
143 | // }) | 143 | // }) |
144 | 144 | ||
145 | var value = ""; | 145 | var value = ""; |
146 | var companyId = $stateParams.id; | 146 | var companyId = $stateParams.id; |
147 | 147 | ||
148 | $scope.companyData = {}; | 148 | $scope.companyData = {}; |
149 | $scope.multipleMsg = false; | 149 | $scope.multipleMsg = false; |
150 | $scope.companyData.masterMargin = ""; | 150 | $scope.companyData.masterMargin = ""; |
151 | $scope.isGlobal = false; | 151 | $scope.isGlobal = false; |
152 | getCompanyDetail(); | 152 | getCompanyDetail(); |
153 | 153 | ||
154 | function getCompanyDetail() { | 154 | function getCompanyDetail() { |
155 | $scope.showLoader = true; | 155 | $scope.showLoader = true; |
156 | ViewCompanyService.getCompany(companyId).then(function(result) { | 156 | ViewCompanyService.getCompany(companyId).then(function(result) { |
157 | $scope.companyData = result; | 157 | $scope.companyData = result; |
158 | $scope.isGlobal = result.global; | 158 | $scope.isGlobal = result.global; |
159 | if (result.global == true) { | 159 | if (result.global == true) { |
160 | $scope.companyData.global = true; | 160 | $scope.companyData.global = true; |
161 | } | 161 | } |
162 | if (result.margin != null) { | 162 | if (result.margin != null) { |
163 | $scope.companyData.masterMargin = result.margin.id; | 163 | $scope.companyData.masterMargin = result.margin.id; |
164 | } | 164 | } |
165 | if (result.marginAVGAS != null) { | 165 | if (result.marginAVGAS != null) { |
166 | $scope.companyData.avgasMargin = result.marginAVGAS.id; | 166 | $scope.companyData.avgasMargin = result.marginAVGAS.id; |
167 | } | 167 | } |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | if ($scope.companyData.baseTenant) { | 171 | if ($scope.companyData.baseTenant) { |
172 | 172 | ||
173 | $scope.selected.push({ | 173 | $scope.selected.push({ |
174 | 'first': 'Tenant/Base Customer' | 174 | 'first': 'Tenant/Base Customer' |
175 | }) | 175 | }) |
176 | // console.log("$scope.selected",$scope.selected) | 176 | // console.log("$scope.selected",$scope.selected) |
177 | 177 | ||
178 | } | 178 | } |
179 | 179 | ||
180 | if ($scope.companyData.fuelerlinxCustomer) { | 180 | if ($scope.companyData.fuelerlinxCustomer) { |
181 | $scope.selected.push({ | 181 | $scope.selected.push({ |
182 | 'first': 'FuelerLinx Customer' | 182 | 'first': 'FuelerLinx Customer' |
183 | }) | 183 | }) |
184 | // console.log("$scope.selected",$scope.selected) | 184 | // console.log("$scope.selected",$scope.selected) |
185 | } | 185 | } |
186 | 186 | ||
187 | if ($scope.companyData.contractFuelVendor) { | 187 | if ($scope.companyData.contractFuelVendor) { |
188 | $scope.selected.push({ | 188 | $scope.selected.push({ |
189 | 'first': 'CAA Member' | 189 | 'first': 'CAA Member' |
190 | }) | 190 | }) |
191 | // console.log("$scope.selected",$scope.selected) | 191 | // console.log("$scope.selected",$scope.selected) |
192 | } | 192 | } |
193 | 193 | ||
194 | // console.log("$scope.companyData",$scope.companyData) | 194 | // console.log("$scope.companyData",$scope.companyData) |
195 | getAircraftList(); | 195 | getAircraftList(); |
196 | $scope.order.companyName = $scope.companyData.companyName; | 196 | $scope.order.companyName = $scope.companyData.companyName; |
197 | $scope.getAircraft(result.companyName); | 197 | $scope.getAircraft(result.companyName); |
198 | $scope.showLoader = false; | 198 | $scope.showLoader = false; |
199 | }) | 199 | }) |
200 | } | 200 | } |
201 | 201 | ||
202 | 202 | ||
203 | $scope.changeCompanyStatus = function() { | 203 | $scope.changeCompanyStatus = function() { |
204 | $('#delete3').css('display', 'block'); | 204 | $('#delete3').css('display', 'block'); |
205 | if ($scope.companyData.activate == true) { | 205 | if ($scope.companyData.activate == true) { |
206 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' | 206 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' |
207 | } else { | 207 | } else { |
208 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' | 208 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' |
209 | } | 209 | } |
210 | } | 210 | } |
211 | 211 | ||
212 | $scope.companyStatus = function() { | 212 | $scope.companyStatus = function() { |
213 | $scope.showLoader = true; | 213 | $scope.showLoader = true; |
214 | var statusData = "status=" + $scope.companyData.activate; | 214 | var statusData = "status=" + $scope.companyData.activate; |
215 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { | 215 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { |
216 | if (result.success) { | 216 | if (result.success) { |
217 | $('#delete3').css('display', 'none'); | 217 | $('#delete3').css('display', 'none'); |
218 | toastr.success('' + result.success + '', { | 218 | toastr.success('' + result.success + '', { |
219 | closeButton: true | 219 | closeButton: true |
220 | }) | 220 | }) |
221 | getContactList(); | 221 | getContactList(); |
222 | } | 222 | } |
223 | }) | 223 | }) |
224 | $scope.showLoader = false; | 224 | $scope.showLoader = false; |
225 | } | 225 | } |
226 | 226 | ||
227 | 227 | ||
228 | $scope.cancelStatus = function() { | 228 | $scope.cancelStatus = function() { |
229 | $('#delete3').css('display', 'none'); | 229 | $('#delete3').css('display', 'none'); |
230 | $scope.companyData.activate = !$scope.companyData.activate; | 230 | $scope.companyData.activate = !$scope.companyData.activate; |
231 | } | 231 | } |
232 | 232 | ||
233 | getContactList(); | 233 | getContactList(); |
234 | 234 | ||
235 | function getContactList() { | 235 | function getContactList() { |
236 | ViewCompanyService.getContact(companyId).then(function(result) { | 236 | ViewCompanyService.getContact(companyId).then(function(result) { |
237 | $scope.companyContactList = result; | 237 | $scope.companyContactList = result; |
238 | }) | 238 | }) |
239 | } | 239 | } |
240 | $scope.aircraftmargins = []; | 240 | $scope.aircraftmargins = []; |
241 | 241 | ||
242 | $scope.abc = false; | 242 | $scope.abc = false; |
243 | $scope.xyz = false; | 243 | $scope.xyz = false; |
244 | function getAircraftList() { | 244 | function getAircraftList() { |
245 | ViewCompanyService.getAircraft(companyId).then(function(result) { | 245 | ViewCompanyService.getAircraft(companyId).then(function(result) { |
246 | 246 | ||
247 | $scope.contactAircraftList = result; | 247 | $scope.contactAircraftList = result; |
248 | console.log("===contactAircraftList===",result) | 248 | console.log("===contactAircraftList===",result) |
249 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 249 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
250 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 250 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
251 | $scope.aircraftmargins.push({ | 251 | $scope.aircraftmargins.push({ |
252 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 252 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
253 | }) | 253 | }) |
254 | $scope.contactAircraftList[i].fuelType = "Jet-A"; | 254 | $scope.contactAircraftList[i].fuelType = "Jet-A"; |
255 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; | 255 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; |
256 | $scope.abc = true; | 256 | $scope.abc = true; |
257 | 257 | ||
258 | }else{ | 258 | }else{ |
259 | $scope.contactAircraftList[i].fuelType = "100LL"; | 259 | $scope.contactAircraftList[i].fuelType = "100LL"; |
260 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; | 260 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; |
261 | $scope.xyz = true; | 261 | $scope.xyz = true; |
262 | } | 262 | } |
263 | 263 | ||
264 | } | 264 | } |
265 | if ($scope.aircraftmargins.length > 0) { | 265 | if ($scope.aircraftmargins.length > 0) { |
266 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 266 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
267 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 267 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
268 | $scope.multiple = true; | 268 | $scope.multiple = true; |
269 | $scope.multipleMsg = true; | 269 | $scope.multipleMsg = true; |
270 | if ($scope.multiple) { | 270 | if ($scope.multiple) { |
271 | $scope.companyData.masterMargin = "multiple"; | 271 | $scope.companyData.masterMargin = "multiple"; |
272 | } | 272 | } |
273 | } | 273 | } |
274 | } | 274 | } |
275 | } | 275 | } |
276 | }) | 276 | }) |
277 | } | 277 | } |
278 | 278 | ||
279 | 279 | ||
280 | 280 | ||
281 | $scope.contactData = {}; | 281 | $scope.contactData = {}; |
282 | $scope.contactData.contactList = []; | 282 | $scope.contactData.contactList = []; |
283 | $scope.addContact = function() { | 283 | $scope.addContact = function() { |
284 | $scope.showLoader = true; | 284 | $scope.showLoader = true; |
285 | $scope.data.companyId = companyId; | 285 | $scope.data.companyId = companyId; |
286 | $scope.contactData.contactList.push($scope.data); | 286 | $scope.contactData.contactList.push($scope.data); |
287 | ViewCompanyService.addContact($scope.contactData).then(function(result) { | 287 | ViewCompanyService.addContact($scope.contactData).then(function(result) { |
288 | //console.log("data==",$scope.contactData) | 288 | //console.log("data==",$scope.contactData) |
289 | // console.log(result) | 289 | // console.log(result) |
290 | if (result.status == 200) { | 290 | if (result.status == 200) { |
291 | 291 | ||
292 | $('#contact-modal-3').modal('hide'); | 292 | $('#contact-modal-3').modal('hide'); |
293 | $scope.primayData.id = result.data; | 293 | $scope.primayData.id = result.data; |
294 | $scope.data = {}; | 294 | $scope.data = {}; |
295 | $scope.sendPrimaryContact(); | 295 | $scope.sendPrimaryContact(); |
296 | getContactList(); | 296 | getContactList(); |
297 | $scope.contactData.contactList = []; | 297 | $scope.contactData.contactList = []; |
298 | $scope.data.email = ''; | 298 | $scope.data.email = ''; |
299 | toastr.success('Created Successfully', { | 299 | toastr.success('Created Successfully', { |
300 | closeButton: true | 300 | closeButton: true |
301 | }) | 301 | }) |
302 | } else { | 302 | } else { |
303 | toastr.error('' + result.statusText + '', { | 303 | toastr.error('' + result.statusText + '', { |
304 | closeButton: true | 304 | closeButton: true |
305 | }) | 305 | }) |
306 | } | 306 | } |
307 | }) | 307 | }) |
308 | $scope.showLoader = false; | 308 | $scope.showLoader = false; |
309 | } | 309 | } |
310 | 310 | ||
311 | getData(); | 311 | getData(); |
312 | 312 | ||
313 | function getData() { | 313 | function getData() { |
314 | $scope.showLoader = true; | 314 | $scope.showLoader = true; |
315 | CustomersService.getAircraftMake().then(function(result) { | 315 | CustomersService.getAircraftMake().then(function(result) { |
316 | $scope.aircraftMakeList = result; | 316 | $scope.aircraftMakeList = result; |
317 | // console.log("make",result) | 317 | // console.log("make",result) |
318 | }) | 318 | }) |
319 | $scope.showLoader = false; | 319 | $scope.showLoader = false; |
320 | } | 320 | } |
321 | 321 | ||
322 | $scope.clearAircrafts = function() { | 322 | $scope.clearAircrafts = function() { |
323 | $scope.aircraftDetails = []; | 323 | $scope.aircraftDetails = []; |
324 | $scope.aircraftDetails = [{ | 324 | $scope.aircraftDetails = [{ |
325 | 'tail': '', | 325 | 'tail': '', |
326 | 'make': '', | 326 | 'make': '', |
327 | 'model': '', | 327 | 'model': '', |
328 | 'sizeId': '', | 328 | 'sizeId': '', |
329 | 'marginId': '', | 329 | 'marginId': '', |
330 | 'avgasMarginId': '' | 330 | 'avgasMarginId': '' |
331 | }]; | 331 | }]; |
332 | } | 332 | } |
333 | 333 | ||
334 | $scope.addNew = function() { | 334 | $scope.addNew = function() { |
335 | $scope.aircraftDetails.push({ | 335 | $scope.aircraftDetails.push({ |
336 | 'tail': '', | 336 | 'tail': '', |
337 | 'make': '', | 337 | 'make': '', |
338 | 'model': '', | 338 | 'model': '', |
339 | 'sizeId': '', | 339 | 'sizeId': '', |
340 | 'marginId': '', | 340 | 'marginId': '', |
341 | 'avgasMarginId': '' | 341 | 'avgasMarginId': '' |
342 | }); | 342 | }); |
343 | // console.log($scope.aircraftDetails) | 343 | // console.log($scope.aircraftDetails) |
344 | }; | 344 | }; |
345 | 345 | ||
346 | $scope.getModal = function(makeId, index) { | 346 | $scope.getModal = function(makeId, index) { |
347 | $scope.showLoader = true; | 347 | $scope.showLoader = true; |
348 | $scope.aircraft.make = makeId; | 348 | $scope.aircraft.make = makeId; |
349 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 349 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
350 | $scope.showLoader = false; | 350 | $scope.showLoader = false; |
351 | $scope.aircraftDetails[index].aircraftModalList = result; | 351 | $scope.aircraftDetails[index].aircraftModalList = result; |
352 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 352 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
353 | }) | 353 | }) |
354 | } | 354 | } |
355 | 355 | ||
356 | $scope.selectedOption = ''; | 356 | $scope.selectedOption = ''; |
357 | $scope.getSize = function(model, index) { | 357 | $scope.getSize = function(model, index) { |
358 | $scope.showLoader = true; | 358 | $scope.showLoader = true; |
359 | $scope.aircraft.model = model; | 359 | $scope.aircraft.model = model; |
360 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 360 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
361 | $scope.showLoader = false; | 361 | $scope.showLoader = false; |
362 | $scope.aircraftDetails[index].aircraftSizeList = result; | 362 | $scope.aircraftDetails[index].aircraftSizeList = result; |
363 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | ||
363 | 364 | ||
364 | }) | 365 | }) |
365 | } | 366 | } |
366 | 367 | ||
367 | $scope.getFuelType = function(size, index) { | 368 | $scope.getFuelType = function(size, index) { |
368 | $scope.showLoader = true; | 369 | $scope.showLoader = true; |
369 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 370 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
370 | ViewCompanyService.checkFuelType(data).then(function(result){ | 371 | ViewCompanyService.checkFuelType(data).then(function(result){ |
371 | $scope.showLoader = false; | 372 | $scope.showLoader = false; |
372 | if (result.type == "JetA") { | 373 | if (result.type == "JetA") { |
373 | $scope.jetShow[index] = false; | 374 | $scope.jetShow[index] = false; |
374 | $scope.marginShow[index] = true; | 375 | $scope.marginShow[index] = true; |
375 | } else if (result.type == "Avgas") { | 376 | } else if (result.type == "Avgas") { |
376 | $scope.jetShow[index] = true; | 377 | $scope.jetShow[index] = true; |
377 | $scope.marginShow[index] = false; | 378 | $scope.marginShow[index] = false; |
378 | }else { | 379 | }else { |
379 | $scope.jetShow[index] = true; | 380 | $scope.jetShow[index] = true; |
380 | $scope.marginShow[index] = true; | 381 | $scope.marginShow[index] = true; |
381 | } | 382 | } |
382 | }) | 383 | }) |
383 | } | 384 | } |
384 | 385 | ||
385 | $scope.aircraftListData = {}; | 386 | $scope.aircraftListData = {}; |
386 | $scope.addData = []; | 387 | $scope.addData = []; |
387 | $scope.tailArray = []; | 388 | $scope.tailArray = []; |
388 | function check(array){ | 389 | function check(array){ |
389 | return (new Set(array)).size !== array.length; | 390 | return (new Set(array)).size !== array.length; |
390 | } | 391 | } |
391 | $scope.saveCompanyData = function() { | 392 | $scope.saveCompanyData = function() { |
392 | $scope.tailArray = []; | 393 | $scope.tailArray = []; |
393 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 394 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
394 | $scope.addData.push({ | 395 | $scope.addData.push({ |
395 | 'tail': $scope.aircraftDetails[i].tail, | 396 | 'tail': $scope.aircraftDetails[i].tail, |
396 | 'make': $scope.aircraftDetails[i].make, | 397 | 'make': $scope.aircraftDetails[i].make, |
397 | 'model': $scope.aircraftDetails[i].model, | 398 | 'model': $scope.aircraftDetails[i].model, |
398 | 'sizeId': $scope.aircraftDetails[i].sizeId, | 399 | 'sizeId': $scope.aircraftDetails[i].sizeId, |
399 | 'marginId': $scope.aircraftDetails[i].marginId, | 400 | 'marginId': $scope.aircraftDetails[i].marginId, |
400 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 401 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
401 | }); | 402 | }); |
402 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 403 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
403 | } | 404 | } |
404 | console.log('check', check($scope.tailArray)); | 405 | console.log('check', check($scope.tailArray)); |
405 | if (check($scope.tailArray)) { | 406 | if (check($scope.tailArray)) { |
406 | toastr.error('Duplicate Tail Added.', { | 407 | toastr.error('Duplicate Tail Added.', { |
407 | closeButton: true | 408 | closeButton: true |
408 | }) | 409 | }) |
409 | }else{ | 410 | }else{ |
410 | $scope.aircraftListData.aircraftList = $scope.addData; | 411 | $scope.aircraftListData.aircraftList = $scope.addData; |
411 | $scope.aircraftListData.accountId = companyId; | 412 | $scope.aircraftListData.accountId = companyId; |
412 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 413 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
413 | if (result != null && result.success) { | 414 | if (result != null && result.success) { |
414 | toastr.success('' + result.success + '', { | 415 | toastr.success('' + result.success + '', { |
415 | closeButton: true | 416 | closeButton: true |
416 | }) | 417 | }) |
417 | $('#aircraft-modal-3').css('display', 'none'); | 418 | $('#aircraft-modal-3').css('display', 'none'); |
418 | $('.modal-backdrop').css('display', 'none'); | 419 | $('.modal-backdrop').css('display', 'none'); |
419 | getAircraftList(); | 420 | getAircraftList(); |
420 | } else { | 421 | } else { |
421 | toastr.error('' + result.statusText + '', { | 422 | toastr.error('' + result.statusText + '', { |
422 | closeButton: true | 423 | closeButton: true |
423 | }) | 424 | }) |
424 | } | 425 | } |
425 | }); | 426 | }); |
426 | } | 427 | } |
427 | 428 | ||
428 | } | 429 | } |
429 | 430 | ||
430 | $scope.showNoteData = true; | 431 | $scope.showNoteData = true; |
431 | $scope.showCompanyName = true; | 432 | $scope.showCompanyName = true; |
432 | $scope.showAddress = true; | 433 | $scope.showAddress = true; |
433 | $scope.showNote = function() { | 434 | $scope.showNote = function() { |
434 | $scope.showNoteData = false; | 435 | $scope.showNoteData = false; |
435 | $scope.showUpdateBtn = true; | 436 | $scope.showUpdateBtn = true; |
436 | } | 437 | } |
437 | 438 | ||
438 | $scope.company = function() { | 439 | $scope.company = function() { |
439 | $scope.showCompanyName = false; | 440 | $scope.showCompanyName = false; |
440 | $scope.showUpdateBtn = true; | 441 | $scope.showUpdateBtn = true; |
441 | } | 442 | } |
442 | 443 | ||
443 | $scope.base = function() { | 444 | $scope.base = function() { |
444 | $scope.showUpdateBtn = true; | 445 | $scope.showUpdateBtn = true; |
445 | } | 446 | } |
446 | 447 | ||
447 | $scope.addressChange = function() { | 448 | $scope.addressChange = function() { |
448 | $scope.showAddress = false; | 449 | $scope.showAddress = false; |
449 | $scope.showUpdateBtn = true; | 450 | $scope.showUpdateBtn = true; |
450 | } | 451 | } |
451 | 452 | ||
452 | $scope.editData = function(inputName) { | 453 | $scope.editData = function(inputName) { |
453 | //console.log($scope.companyData) | 454 | //console.log($scope.companyData) |
454 | $scope.showLoader = true; | 455 | $scope.showLoader = true; |
455 | /*if(inputName == 'showNoteData'){ | 456 | /*if(inputName == 'showNoteData'){ |
456 | $scope.showNoteData = true; | 457 | $scope.showNoteData = true; |
457 | }else if(inputName == 'showCompanyName'){ | 458 | }else if(inputName == 'showCompanyName'){ |
458 | $scope.showCompanyName = true; | 459 | $scope.showCompanyName = true; |
459 | }else if(inputName == 'showAddress'){ | 460 | }else if(inputName == 'showAddress'){ |
460 | $scope.showAddress = true; | 461 | $scope.showAddress = true; |
461 | }*/ | 462 | }*/ |
462 | $scope.showNoteData = true; | 463 | $scope.showNoteData = true; |
463 | $scope.showCompanyName = true; | 464 | $scope.showCompanyName = true; |
464 | $scope.showAddress = true; | 465 | $scope.showAddress = true; |
465 | 466 | ||
466 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + | 467 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + |
467 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + | 468 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + |
468 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + | 469 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + |
469 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + | 470 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + |
470 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + | 471 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + |
471 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; | 472 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; |
472 | 473 | ||
473 | ViewCompanyService.updateCompany(companyData).then(function(result) { | 474 | ViewCompanyService.updateCompany(companyData).then(function(result) { |
474 | if (result != null && result.success) { | 475 | if (result != null && result.success) { |
475 | toastr.success('' + result.success + '', { | 476 | toastr.success('' + result.success + '', { |
476 | closeButton: true | 477 | closeButton: true |
477 | }) | 478 | }) |
478 | $scope.showUpdateBtn = false; | 479 | $scope.showUpdateBtn = false; |
479 | getCompanyDetail(); | 480 | getCompanyDetail(); |
480 | } else { | 481 | } else { |
481 | toastr.error('Error Updating Company', { | 482 | toastr.error('Error Updating Company', { |
482 | closeButton: true | 483 | closeButton: true |
483 | }) | 484 | }) |
484 | $scope.showUpdateBtn = true; | 485 | $scope.showUpdateBtn = true; |
485 | } | 486 | } |
486 | $scope.showLoader = false; | 487 | $scope.showLoader = false; |
487 | }) | 488 | }) |
488 | } | 489 | } |
489 | 490 | ||
490 | $scope.cancelUpdateData = function() { | 491 | $scope.cancelUpdateData = function() { |
491 | $scope.showNoteData = true; | 492 | $scope.showNoteData = true; |
492 | $scope.showCompanyName = true; | 493 | $scope.showCompanyName = true; |
493 | $scope.showAddress = true; | 494 | $scope.showAddress = true; |
494 | $scope.showUpdateBtn = false; | 495 | $scope.showUpdateBtn = false; |
495 | } | 496 | } |
496 | 497 | ||
497 | $scope.sendMail = function() { | 498 | $scope.sendMail = function() { |
498 | $scope.showLoader = true; | 499 | $scope.showLoader = true; |
499 | $('#confirm1').css('display', 'none'); | 500 | $('#confirm1').css('display', 'none'); |
500 | ViewCompanyService.sendMail(companyId).then(function(result) { | 501 | ViewCompanyService.sendMail(companyId).then(function(result) { |
501 | if (result != null && result.success) { | 502 | if (result != null && result.success) { |
502 | toastr.success('' + result.success + '', { | 503 | toastr.success('' + result.success + '', { |
503 | closeButton: true | 504 | closeButton: true |
504 | }) | 505 | }) |
505 | } else { | 506 | } else { |
506 | toastr.error('Error Sending Email', { | 507 | toastr.error('Error Sending Email', { |
507 | closeButton: true | 508 | closeButton: true |
508 | }) | 509 | }) |
509 | } | 510 | } |
510 | $scope.showLoader = false; | 511 | $scope.showLoader = false; |
511 | }) | 512 | }) |
512 | } | 513 | } |
513 | 514 | ||
514 | $scope.openConfirmMail = function() { | 515 | $scope.openConfirmMail = function() { |
515 | $('#confirm1').css('display', 'block'); | 516 | $('#confirm1').css('display', 'block'); |
516 | } | 517 | } |
517 | 518 | ||
518 | 519 | ||
519 | $scope.cancelAndCloseConfirm = function() { | 520 | $scope.cancelAndCloseConfirm = function() { |
520 | $('#confirm1').css('display', 'none'); | 521 | $('#confirm1').css('display', 'none'); |
521 | } | 522 | } |
522 | 523 | ||
523 | $scope.primaryContact = false; | 524 | $scope.primaryContact = false; |
524 | $scope.cancelPrimaryContact = function() { | 525 | $scope.cancelPrimaryContact = function() { |
525 | $('#primaryContact').css('display', 'none'); | 526 | $('#primaryContact').css('display', 'none'); |
526 | $scope.primaryContact = false; | 527 | $scope.primaryContact = false; |
527 | } | 528 | } |
528 | 529 | ||
529 | $scope.checkPrimaryContact = function() { | 530 | $scope.checkPrimaryContact = function() { |
530 | if ($scope.primaryContact == true) { | 531 | if ($scope.primaryContact == true) { |
531 | $scope.primaryContact = true; | 532 | $scope.primaryContact = true; |
532 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { | 533 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { |
533 | //console.log(result) | 534 | //console.log(result) |
534 | if (result.status == 422) { | 535 | if (result.status == 422) { |
535 | $('#primaryContact').css('display', 'block'); | 536 | $('#primaryContact').css('display', 'block'); |
536 | } | 537 | } |
537 | }) | 538 | }) |
538 | } | 539 | } |
539 | } | 540 | } |
540 | 541 | ||
541 | $scope.sendPrimaryContact = function() { | 542 | $scope.sendPrimaryContact = function() { |
542 | $('#primaryContact').css('display', 'none'); | 543 | $('#primaryContact').css('display', 'none'); |
543 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { | 544 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { |
544 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; | 545 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; |
545 | 546 | ||
546 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { | 547 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { |
547 | // console.log(result) | 548 | // console.log(result) |
548 | }) | 549 | }) |
549 | } | 550 | } |
550 | 551 | ||
551 | } | 552 | } |
552 | 553 | ||
553 | $scope.updateData = "" | 554 | $scope.updateData = "" |
554 | $scope.showUpdateContact = function(data, value) { | 555 | $scope.showUpdateContact = function(data, value) { |
555 | $('#updateContact').css('display', 'block'); | 556 | $('#updateContact').css('display', 'block'); |
556 | $scope.updateData = data; | 557 | $scope.updateData = data; |
557 | // console.log($scope.updateData) | 558 | // console.log($scope.updateData) |
558 | if ($scope.updateData.email == null) { | 559 | if ($scope.updateData.email == null) { |
559 | $scope.updateData.content = data.contactNumber; | 560 | $scope.updateData.content = data.contactNumber; |
560 | } else { | 561 | } else { |
561 | $scope.updateData.content = data.email; | 562 | $scope.updateData.content = data.email; |
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
565 | $scope.showUpdateEmail = function(data, value) { | 566 | $scope.showUpdateEmail = function(data, value) { |
566 | $('#updateEmail').css('display', 'block'); | 567 | $('#updateEmail').css('display', 'block'); |
567 | $scope.updateData = data; | 568 | $scope.updateData = data; |
568 | // console.log($scope.updateData) | 569 | // console.log($scope.updateData) |
569 | if ($scope.updateData.email == null) { | 570 | if ($scope.updateData.email == null) { |
570 | $scope.updateData.content = data.contactNumber; | 571 | $scope.updateData.content = data.contactNumber; |
571 | } else { | 572 | } else { |
572 | $scope.updateData.content = data.email; | 573 | $scope.updateData.content = data.email; |
573 | } | 574 | } |
574 | } | 575 | } |
575 | 576 | ||
576 | $scope.acceptUpdateField = function(newContactName) { | 577 | $scope.acceptUpdateField = function(newContactName) { |
577 | // console.log($scope.updateData) | 578 | // console.log($scope.updateData) |
578 | if ($scope.updateData.content == undefined) { | 579 | if ($scope.updateData.content == undefined) { |
579 | toastr.error('Please add some content', { | 580 | toastr.error('Please add some content', { |
580 | closeButton: true | 581 | closeButton: true |
581 | }) | 582 | }) |
582 | } else { | 583 | } else { |
583 | if (newContactName == 'phone') { | 584 | if (newContactName == 'phone') { |
584 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 585 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
585 | "&title=" + $scope.updateData.title; | 586 | "&title=" + $scope.updateData.title; |
586 | } else { | 587 | } else { |
587 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 588 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
588 | "&title=" + $scope.updateData.title; | 589 | "&title=" + $scope.updateData.title; |
589 | } | 590 | } |
590 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { | 591 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { |
591 | if (result != null && result.success) { | 592 | if (result != null && result.success) { |
592 | $('#updateContact').css('display', 'none'); | 593 | $('#updateContact').css('display', 'none'); |
593 | $('#updateEmail').css('display', 'none'); | 594 | $('#updateEmail').css('display', 'none'); |
594 | getCompanyDetail(); | 595 | getCompanyDetail(); |
595 | } | 596 | } |
596 | }) | 597 | }) |
597 | } | 598 | } |
598 | } | 599 | } |
599 | 600 | ||
600 | $scope.deleteContent = function(data){ | 601 | $scope.deleteContent = function(data){ |
601 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { | 602 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { |
602 | if (result != null && result.success) { | 603 | if (result != null && result.success) { |
603 | toastr.success('' + result.success + '', { | 604 | toastr.success('' + result.success + '', { |
604 | closeButton: true | 605 | closeButton: true |
605 | }) | 606 | }) |
606 | getCompanyDetail(); | 607 | getCompanyDetail(); |
607 | } | 608 | } |
608 | }) | 609 | }) |
609 | } | 610 | } |
610 | 611 | ||
611 | $scope.cancelUpdateField = function() { | 612 | $scope.cancelUpdateField = function() { |
612 | $('#updateContact').css('display', 'none'); | 613 | $('#updateContact').css('display', 'none'); |
613 | $('#updateEmail').css('display', 'none'); | 614 | $('#updateEmail').css('display', 'none'); |
614 | } | 615 | } |
615 | 616 | ||
616 | $scope.showEditTier2 = function(number) { | 617 | $scope.showEditTier2 = function(number) { |
617 | // console.log(number) | 618 | // console.log(number) |
618 | $scope.contactNumber = number; | 619 | $scope.contactNumber = number; |
619 | } | 620 | } |
620 | 621 | ||
621 | 622 | ||
622 | 623 | ||
623 | $scope.addCustomPhone = function(value) { | 624 | $scope.addCustomPhone = function(value) { |
624 | //console.log(value) | 625 | //console.log(value) |
625 | if (value != null) { | 626 | if (value != null) { |
626 | $('#customFieldPhone').css('display', 'block'); | 627 | $('#customFieldPhone').css('display', 'block'); |
627 | } | 628 | } |
628 | $scope.custom = {}; | 629 | $scope.custom = {}; |
629 | } | 630 | } |
630 | 631 | ||
631 | $scope.addCustomEmail = function(value) { | 632 | $scope.addCustomEmail = function(value) { |
632 | //console.log(value) | 633 | //console.log(value) |
633 | if (value != null) { | 634 | if (value != null) { |
634 | $('#customFieldEmail').css('display', 'block'); | 635 | $('#customFieldEmail').css('display', 'block'); |
635 | } | 636 | } |
636 | $scope.custom = {}; | 637 | $scope.custom = {}; |
637 | } | 638 | } |
638 | 639 | ||
639 | $scope.cancelCustomField = function() { | 640 | $scope.cancelCustomField = function() { |
640 | $('#customFieldEmail').css('display', 'none'); | 641 | $('#customFieldEmail').css('display', 'none'); |
641 | $('#customFieldPhone').css('display', 'none'); | 642 | $('#customFieldPhone').css('display', 'none'); |
642 | } | 643 | } |
643 | 644 | ||
644 | $scope.acceptCustomField = function(contactName) { | 645 | $scope.acceptCustomField = function(contactName) { |
645 | if ($scope.custom.content == undefined) { | 646 | if ($scope.custom.content == undefined) { |
646 | toastr.error('Please add some content', { | 647 | toastr.error('Please add some content', { |
647 | closeButton: true | 648 | closeButton: true |
648 | }) | 649 | }) |
649 | } else { | 650 | } else { |
650 | if (contactName == 'phone') { | 651 | if (contactName == 'phone') { |
651 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + | 652 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + |
652 | "&title=" + $scope.custom.title; | 653 | "&title=" + $scope.custom.title; |
653 | } else { | 654 | } else { |
654 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + | 655 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + |
655 | "&title=" + $scope.custom.title; | 656 | "&title=" + $scope.custom.title; |
656 | } | 657 | } |
657 | // console.log(customData.email) | 658 | // console.log(customData.email) |
658 | ViewCompanyService.addCustomField(customData).then(function(result) { | 659 | ViewCompanyService.addCustomField(customData).then(function(result) { |
659 | // console.log(result) | 660 | // console.log(result) |
660 | if (result != null && result.success) { | 661 | if (result != null && result.success) { |
661 | $('#customFieldEmail').css('display', 'none'); | 662 | $('#customFieldEmail').css('display', 'none'); |
662 | $('#customFieldPhone').css('display', 'none'); | 663 | $('#customFieldPhone').css('display', 'none'); |
663 | $scope.custom = {}; | 664 | $scope.custom = {}; |
664 | getCompanyDetail(); | 665 | getCompanyDetail(); |
665 | } | 666 | } |
666 | }) | 667 | }) |
667 | } | 668 | } |
668 | } | 669 | } |
669 | 670 | ||
670 | /* omit strike out*/ | 671 | /* omit strike out*/ |
671 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 672 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
672 | $scope.fuelPricing = result; | 673 | $scope.fuelPricing = result; |
673 | $scope.omitData; | 674 | $scope.omitData; |
674 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ | 675 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ |
675 | $scope.omitData = result; | 676 | $scope.omitData = result; |
676 | //console.log("omit data===", $scope.omitData); | 677 | //console.log("omit data===", $scope.omitData); |
677 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ | 678 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ |
678 | for(var j = 0; j<$scope.omitData.length; j++){ | 679 | for(var j = 0; j<$scope.omitData.length; j++){ |
679 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ | 680 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ |
680 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; | 681 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; |
681 | } | 682 | } |
682 | } | 683 | } |
683 | } | 684 | } |
684 | 685 | ||
685 | }) | 686 | }) |
686 | 687 | ||
687 | // console.log("$scope.fuelPricing",$scope.fuelPricing) | 688 | // console.log("$scope.fuelPricing",$scope.fuelPricing) |
688 | for (var i = 0; i < $scope.fuelPricing.length; i++) { | 689 | for (var i = 0; i < $scope.fuelPricing.length; i++) { |
689 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); | 690 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); |
690 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) | 691 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) |
691 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { | 692 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { |
692 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 693 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
693 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 694 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
694 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 695 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
695 | var dday = newTime.getUTCDate(); | 696 | var dday = newTime.getUTCDate(); |
696 | var dyear = newTime.getUTCFullYear(); | 697 | var dyear = newTime.getUTCFullYear(); |
697 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; | 698 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; |
698 | } | 699 | } |
699 | // for (var j = 0; j<$scope.omitData.length; j++) { | 700 | // for (var j = 0; j<$scope.omitData.length; j++) { |
700 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ | 701 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ |
701 | 702 | ||
702 | // } | 703 | // } |
703 | // } | 704 | // } |
704 | } | 705 | } |
705 | }) | 706 | }) |
706 | 707 | ||
707 | var deleteAircraftId = ""; | 708 | var deleteAircraftId = ""; |
708 | $scope.deleteAircraft = function(id) { | 709 | $scope.deleteAircraft = function(id) { |
709 | $('#delete1').css('display', 'block'); | 710 | $('#delete1').css('display', 'block'); |
710 | deleteAircraftId = id; | 711 | deleteAircraftId = id; |
711 | } | 712 | } |
712 | 713 | ||
713 | $scope.aircraftDelete = function() { | 714 | $scope.aircraftDelete = function() { |
714 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { | 715 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { |
715 | // console.log(result) | 716 | // console.log(result) |
716 | getAircraftList(); | 717 | getAircraftList(); |
717 | getCompanyDetail(); | 718 | getCompanyDetail(); |
718 | $('#delete1').css('display', 'none'); | 719 | $('#delete1').css('display', 'none'); |
719 | }) | 720 | }) |
720 | } | 721 | } |
721 | 722 | ||
722 | $scope.cancelDelete = function() { | 723 | $scope.cancelDelete = function() { |
723 | $('#delete1').css('display', 'none'); | 724 | $('#delete1').css('display', 'none'); |
724 | } | 725 | } |
725 | 726 | ||
726 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 727 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
727 | $scope.jetMarginList = result; | 728 | $scope.jetMarginList = result; |
728 | }) | 729 | }) |
729 | 730 | ||
730 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 731 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
731 | $scope.avgsMarginList = result; | 732 | $scope.avgsMarginList = result; |
732 | }) | 733 | }) |
733 | 734 | ||
734 | $scope.changePriceEmail = function(id, index) { | 735 | $scope.changePriceEmail = function(id, index) { |
735 | event.stopPropagation(); | 736 | event.stopPropagation(); |
736 | var contactId = id; | 737 | var contactId = id; |
737 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; | 738 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; |
738 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { | 739 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { |
739 | if (result.success) { | 740 | if (result.success) { |
740 | $('#toogleMail').css('display', 'block'); | 741 | $('#toogleMail').css('display', 'block'); |
741 | if ($scope.companyContactList[index].priceEmail == true) { | 742 | if ($scope.companyContactList[index].priceEmail == true) { |
742 | $scope.messageText = 'You have enabled price distribution for this contact'; | 743 | $scope.messageText = 'You have enabled price distribution for this contact'; |
743 | } else { | 744 | } else { |
744 | $scope.messageText = 'You have disabled price distribution for this contact'; | 745 | $scope.messageText = 'You have disabled price distribution for this contact'; |
745 | } | 746 | } |
746 | } | 747 | } |
747 | }) | 748 | }) |
748 | } | 749 | } |
749 | 750 | ||
750 | $scope.cancelToogle = function() { | 751 | $scope.cancelToogle = function() { |
751 | $('#toogleMail').css('display', 'none'); | 752 | $('#toogleMail').css('display', 'none'); |
752 | } | 753 | } |
753 | 754 | ||
754 | $scope.checkboxStatus = function(value) { | 755 | $scope.checkboxStatus = function(value) { |
755 | // console.log("checkbox",value) | 756 | // console.log("checkbox",value) |
756 | $scope.showUpdateBtn = true; | 757 | $scope.showUpdateBtn = true; |
757 | } | 758 | } |
758 | 759 | ||
759 | $scope.fuelercheckboxStatus = function(value) { | 760 | $scope.fuelercheckboxStatus = function(value) { |
760 | $('#fuelerchange').css('display', 'block'); | 761 | $('#fuelerchange').css('display', 'block'); |
761 | if (value == true) { | 762 | if (value == true) { |
762 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' | 763 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' |
763 | } else { | 764 | } else { |
764 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' | 765 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' |
765 | } | 766 | } |
766 | 767 | ||
767 | 768 | ||
768 | } | 769 | } |
769 | 770 | ||
770 | $scope.fuelerCancelStatus = function() { | 771 | $scope.fuelerCancelStatus = function() { |
771 | $('#fuelerchange').css('display', 'none'); | 772 | $('#fuelerchange').css('display', 'none'); |
772 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; | 773 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; |
773 | } | 774 | } |
774 | 775 | ||
775 | $scope.fuelerAcceptStatus = function() { | 776 | $scope.fuelerAcceptStatus = function() { |
776 | $('#fuelerchange').css('display', 'none'); | 777 | $('#fuelerchange').css('display', 'none'); |
777 | $scope.showLoader = true; | 778 | $scope.showLoader = true; |
778 | var statusData; | 779 | var statusData; |
779 | if ($scope.companyData.fuelerlinxCustomer == false) { | 780 | if ($scope.companyData.fuelerlinxCustomer == false) { |
780 | statusData = "status=true"; | 781 | statusData = "status=true"; |
781 | } else { | 782 | } else { |
782 | statusData = "status=false"; | 783 | statusData = "status=false"; |
783 | } | 784 | } |
784 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { | 785 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { |
785 | if (result.success) { | 786 | if (result.success) { |
786 | $scope.showLoader = false; | 787 | $scope.showLoader = false; |
787 | 788 | ||
788 | $scope.editData(); | 789 | $scope.editData(); |
789 | getContactList(); | 790 | getContactList(); |
790 | 791 | ||
791 | } | 792 | } |
792 | }) | 793 | }) |
793 | } | 794 | } |
794 | 795 | ||
795 | 796 | ||
796 | $scope.updateOmit = function(fuel, omit) { | 797 | $scope.updateOmit = function(fuel, omit) { |
797 | $scope.fuelData = {}; | 798 | $scope.fuelData = {}; |
798 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); | 799 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); |
799 | $scope.fuelData.customMarginId = fuel.id; | 800 | $scope.fuelData.customMarginId = fuel.id; |
800 | $scope.fuelData.omit = fuel.omit; | 801 | $scope.fuelData.omit = fuel.omit; |
801 | $scope.fuelData.papMargin = fuel.papMargin; | 802 | $scope.fuelData.papMargin = fuel.papMargin; |
802 | $scope.fuelData.papTotal = fuel.papTotal; | 803 | $scope.fuelData.papTotal = fuel.papTotal; |
803 | $scope.fuelData.cost = fuel.cost; | 804 | $scope.fuelData.cost = fuel.cost; |
804 | $scope.fuelData.companyId = $scope.compId ; | 805 | $scope.fuelData.companyId = $scope.compId ; |
805 | if($scope.fuelData.omit == true) | 806 | if($scope.fuelData.omit == true) |
806 | { | 807 | { |
807 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 808 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
808 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { | 809 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { |
809 | if (result.success) { | 810 | if (result.success) { |
810 | toastr.success('' + result.success + '', { | 811 | toastr.success('' + result.success + '', { |
811 | closeButton: true | 812 | closeButton: true |
812 | }) | 813 | }) |
813 | } else { | 814 | } else { |
814 | toastr.error('' + result.statusText + '', { | 815 | toastr.error('' + result.statusText + '', { |
815 | closeButton: true | 816 | closeButton: true |
816 | }) | 817 | }) |
817 | } | 818 | } |
818 | }) | 819 | }) |
819 | }else{ | 820 | }else{ |
820 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 821 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
821 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ | 822 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ |
822 | if (result.success) { | 823 | if (result.success) { |
823 | toastr.success('' + result.success + '', { | 824 | toastr.success('' + result.success + '', { |
824 | closeButton: true | 825 | closeButton: true |
825 | }) | 826 | }) |
826 | } else { | 827 | } else { |
827 | toastr.error('' + result.statusText + '', { | 828 | toastr.error('' + result.statusText + '', { |
828 | closeButton: true | 829 | closeButton: true |
829 | }) | 830 | }) |
830 | } | 831 | } |
831 | }) | 832 | }) |
832 | } | 833 | } |
833 | } | 834 | } |
834 | 835 | ||
835 | 836 | ||
836 | //--fuel type based on tail is not in use-- | 837 | //--fuel type based on tail is not in use-- |
837 | // $scope.aircraftData = {} | 838 | // $scope.aircraftData = {} |
838 | /*$scope.checkJetWithTail = function(tail, index) { | 839 | /*$scope.checkJetWithTail = function(tail, index) { |
839 | 840 | ||
840 | console.log("tail==============",tail, index) | 841 | console.log("tail==============",tail, index) |
841 | ViewCompanyService.checkJetType(tail).then(function(result) { | 842 | ViewCompanyService.checkJetType(tail).then(function(result) { |
842 | console.log("result",result) | 843 | console.log("result",result) |
843 | if (result.jetA == "true") { | 844 | if (result.jetA == "true") { |
844 | $scope.jetShow[index] = false; | 845 | $scope.jetShow[index] = false; |
845 | $scope.marginShow[index] = true; | 846 | $scope.marginShow[index] = true; |
846 | } else { | 847 | } else { |
847 | $scope.jetShow[index] = true; | 848 | $scope.jetShow[index] = true; |
848 | $scope.marginShow[index] = false; | 849 | $scope.marginShow[index] = false; |
849 | } | 850 | } |
850 | }) | 851 | }) |
851 | }*/ | 852 | }*/ |
852 | 853 | ||
853 | 854 | ||
854 | /*add a fuel order*/ | 855 | /*add a fuel order*/ |
855 | 856 | ||
856 | 857 | ||
857 | $scope.getOrders = function() { | 858 | $scope.getOrders = function() { |
858 | fuelOrdersService.getOrders().then(function(result) { | 859 | fuelOrdersService.getOrders().then(function(result) { |
859 | 860 | ||
860 | $scope.orderdata = result; | 861 | $scope.orderdata = result; |
861 | for (var i = 0; i < $scope.orderdata.length; i++) { | 862 | for (var i = 0; i < $scope.orderdata.length; i++) { |
862 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 863 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
863 | 864 | ||
864 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 865 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
865 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 866 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
866 | // str = str.slice(4,16) | 867 | // str = str.slice(4,16) |
867 | $scope.orderdata[i].upliftDateString = str | 868 | $scope.orderdata[i].upliftDateString = str |
868 | // console.log(str); | 869 | // console.log(str); |
869 | 870 | ||
870 | } | 871 | } |
871 | 872 | ||
872 | $scope.displayFuelOrderList = new NgTableParams({ | 873 | $scope.displayFuelOrderList = new NgTableParams({ |
873 | page: 1, | 874 | page: 1, |
874 | count: 10, | 875 | count: 10, |
875 | }, { | 876 | }, { |
876 | data: $scope.orderdata | 877 | data: $scope.orderdata |
877 | }); | 878 | }); |
878 | $(document).ready(function() { | 879 | $(document).ready(function() { |
879 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 880 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
880 | 881 | ||
881 | for (var i = 0; i < myselect.length; i++) { | 882 | for (var i = 0; i < myselect.length; i++) { |
882 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 883 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
883 | colourIndex = colourIndex + 1; | 884 | colourIndex = colourIndex + 1; |
884 | // console.log(colourIndex); | 885 | // console.log(colourIndex); |
885 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 886 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
886 | $(myselect[i]).css('background-color', getColor); | 887 | $(myselect[i]).css('background-color', getColor); |
887 | // console.log('colour', getColor); | 888 | // console.log('colour', getColor); |
888 | myselect[i].blur(); | 889 | myselect[i].blur(); |
889 | } | 890 | } |
890 | 891 | ||
891 | }) | 892 | }) |
892 | 893 | ||
893 | }) | 894 | }) |
894 | } | 895 | } |
895 | 896 | ||
896 | $scope.getOrders(); | 897 | $scope.getOrders(); |
897 | 898 | ||
898 | $scope.tiervalue=function(){ | 899 | $scope.tiervalue=function(){ |
899 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 900 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
900 | } | 901 | } |
901 | 902 | ||
902 | $scope.setCost = function(cost){ | 903 | $scope.setCost = function(cost){ |
903 | if(cost != null) { | 904 | if(cost != null) { |
904 | var obj =JSON.parse(cost); | 905 | var obj =JSON.parse(cost); |
905 | $scope.order.fboCost = obj.cost; | 906 | $scope.order.fboCost = obj.cost; |
906 | } | 907 | } |
907 | } | 908 | } |
908 | 909 | ||
909 | $scope.cancelOrder = function() { | 910 | $scope.cancelOrder = function() { |
910 | $scope.order = {}; | 911 | $scope.order = {}; |
911 | } | 912 | } |
912 | 913 | ||
913 | $scope.dispatchFuel = function(){ | 914 | $scope.dispatchFuel = function(){ |
914 | $scope.showLoader = true; | 915 | $scope.showLoader = true; |
915 | $scope.order.companyId = $scope.compId; | 916 | $scope.order.companyId = $scope.compId; |
916 | if ($scope.order.upliftDate != '') { | 917 | if ($scope.order.upliftDate != '') { |
917 | var currentDate = new Date(); | 918 | var currentDate = new Date(); |
918 | var hours = currentDate.getHours(); | 919 | var hours = currentDate.getHours(); |
919 | var min = currentDate.getMinutes(); | 920 | var min = currentDate.getMinutes(); |
920 | var sec = currentDate.getSeconds(); | 921 | var sec = currentDate.getSeconds(); |
921 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 922 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
922 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 923 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
923 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 924 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
924 | } | 925 | } |
925 | $scope.order.status = 'pending'; | 926 | $scope.order.status = 'pending'; |
926 | var obj =JSON.parse($scope.order.priceQuote); | 927 | var obj =JSON.parse($scope.order.priceQuote); |
927 | $scope.order.priceQuote = obj.papTotal; | 928 | $scope.order.priceQuote = obj.papTotal; |
928 | $scope.order.fboCost = obj.cost; | 929 | $scope.order.fboCost = obj.cost; |
929 | $scope.order.total = obj.papTotal * $scope.order.volume; | 930 | $scope.order.total = obj.papTotal * $scope.order.volume; |
930 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 931 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
931 | $scope.order.aircraftName = aircraftObj.tail; | 932 | $scope.order.aircraftName = aircraftObj.tail; |
932 | $scope.order.make = aircraftObj.make; | 933 | $scope.order.make = aircraftObj.make; |
933 | $scope.order.model = aircraftObj.model; | 934 | $scope.order.model = aircraftObj.model; |
934 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 935 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
935 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 936 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
936 | $scope.showLoader = false; | 937 | $scope.showLoader = false; |
937 | $scope.order = {}; | 938 | $scope.order = {}; |
938 | $('#demo-modal-4').css('display', ''); | 939 | $('#demo-modal-4').css('display', ''); |
939 | toastr.success('Fuel Order Dispatched Successfully', { | 940 | toastr.success('Fuel Order Dispatched Successfully', { |
940 | closeButton: true | 941 | closeButton: true |
941 | }) | 942 | }) |
942 | }) | 943 | }) |
943 | } | 944 | } |
944 | 945 | ||
945 | $scope.addTotal = function(value, valueOf) { | 946 | $scope.addTotal = function(value, valueOf) { |
946 | if (valueOf == 'v') { | 947 | if (valueOf == 'v') { |
947 | $scope.order.total = value * $scope.order.invoiced | 948 | $scope.order.total = value * $scope.order.invoiced |
948 | } else if (valueOf == 'i') { | 949 | } else if (valueOf == 'i') { |
949 | $scope.order.total = $scope.order.volume * value | 950 | $scope.order.total = $scope.order.volume * value |
950 | } | 951 | } |
951 | } | 952 | } |
952 | 953 | ||
953 | $scope.getAircraft = function(company) { | 954 | $scope.getAircraft = function(company) { |
954 | $scope.selectedCompanyName = company; | 955 | $scope.selectedCompanyName = company; |
955 | 956 | ||
956 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { | 957 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { |
957 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { | 958 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { |
958 | $scope.marginList = margins; | 959 | $scope.marginList = margins; |
959 | //console.log('$scope.marginList', $scope.marginList); | 960 | //console.log('$scope.marginList', $scope.marginList); |
960 | }) | 961 | }) |
961 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { | 962 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { |
962 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { | 963 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { |
963 | $scope.marginList = margins; | 964 | $scope.marginList = margins; |
964 | }) | 965 | }) |
965 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { | 966 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { |
966 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { | 967 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { |
967 | $scope.marginList = margins; | 968 | $scope.marginList = margins; |
968 | }) | 969 | }) |
969 | } | 970 | } |
970 | 971 | ||
971 | 972 | ||
972 | $scope.selectedCompanyId = $scope.companyData.id; | 973 | $scope.selectedCompanyId = $scope.companyData.id; |
973 | $scope.marginId = $scope.companyData.margin.id; | 974 | $scope.marginId = $scope.companyData.margin.id; |
974 | if ($scope.selectedCompanyId != '') { | 975 | if ($scope.selectedCompanyId != '') { |
975 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 976 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
976 | $scope.aircraftList = aircraft; | 977 | $scope.aircraftList = aircraft; |
977 | }) | 978 | }) |
978 | } | 979 | } |
979 | if ($scope.marginId != '') { | 980 | if ($scope.marginId != '') { |
980 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 981 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
981 | $scope.tierList = tiers; | 982 | $scope.tierList = tiers; |
982 | // $scope.showLoader = false; | 983 | // $scope.showLoader = false; |
983 | }) | 984 | }) |
984 | } | 985 | } |
985 | 986 | ||
986 | } | 987 | } |
987 | 988 | ||
988 | $scope.setCost = function(cost) { | 989 | $scope.setCost = function(cost) { |
989 | // console.log(cost); | 990 | // console.log(cost); |
990 | if (cost != null) { | 991 | if (cost != null) { |
991 | var obj = JSON.parse(cost); | 992 | var obj = JSON.parse(cost); |
992 | // console.log("0bj",obj) | 993 | // console.log("0bj",obj) |
993 | $scope.order.fboCost = obj.cost; | 994 | $scope.order.fboCost = obj.cost; |
994 | } | 995 | } |
995 | 996 | ||
996 | } | 997 | } |
997 | 998 | ||
998 | $scope.sourceList = [{ | 999 | $scope.sourceList = [{ |
999 | source: "Direct Jet-A" | 1000 | source: "Direct Jet-A" |
1000 | }, { | 1001 | }, { |
1001 | source: "Direct AVGAS 100LL" | 1002 | source: "Direct AVGAS 100LL" |
1002 | }]; | 1003 | }]; |
1003 | $scope.cancelData = function() { | 1004 | $scope.cancelData = function() { |
1004 | $('#demo-modal-4').css('display', ''); | 1005 | $('#demo-modal-4').css('display', ''); |
1005 | } | 1006 | } |
1006 | 1007 | ||
1007 | $scope.setFuel = function() { | 1008 | $scope.setFuel = function() { |
1008 | $('#demo-modal-4').css('display', 'block'); | 1009 | $('#demo-modal-4').css('display', 'block'); |
1009 | 1010 | ||
1010 | } | 1011 | } |
1011 | 1012 | ||
1012 | /*delete company*/ | 1013 | /*delete company*/ |
1013 | var deletecompanyId = ""; | 1014 | var deletecompanyId = ""; |
1014 | $scope.deleteComp = function(companyDataid) { | 1015 | $scope.deleteComp = function(companyDataid) { |
1015 | $('#delete2').css('display', 'block'); | 1016 | $('#delete2').css('display', 'block'); |
1016 | //console.log("asda",companyDataid) | 1017 | //console.log("asda",companyDataid) |
1017 | deletecompanyId = companyDataid; | 1018 | deletecompanyId = companyDataid; |
1018 | } | 1019 | } |
1019 | $scope.aircraftIdx = ''; | 1020 | $scope.aircraftIdx = ''; |
1020 | $scope.checkTail = function(tail, idx){ | 1021 | $scope.checkTail = function(tail, idx){ |
1021 | var data = "tail=" + tail + "&id=" + companyId; | 1022 | var data = "tail=" + tail + "&id=" + companyId; |
1022 | $scope.aircraftIdx = idx; | 1023 | $scope.aircraftIdx = idx; |
1023 | ViewCompanyService.checkTail(data).then(function(result) { | 1024 | ViewCompanyService.checkTail(data).then(function(result) { |
1024 | if(result.error) { | 1025 | if(result.error) { |
1025 | $scope.aircraftMessage = result.error; | 1026 | $scope.aircraftMessage = result.error; |
1026 | $scope.openAddAirCraftError(); | 1027 | $scope.openAddAirCraftError(); |
1027 | } else if(result.warning) { | 1028 | } else if(result.warning) { |
1028 | $scope.aircraftMessage = result.warning; | 1029 | $scope.aircraftMessage = result.warning; |
1029 | $scope.openAddAirCraftWarning(); | 1030 | $scope.openAddAirCraftWarning(); |
1030 | } | 1031 | } |
1031 | }) | 1032 | }) |
1032 | } | 1033 | } |
1033 | 1034 | ||
1034 | $scope.openAddAirCraftError = function() { | 1035 | $scope.openAddAirCraftError = function() { |
1035 | $('#addAirCraftError').css('display', 'block'); | 1036 | $('#addAirCraftError').css('display', 'block'); |
1036 | } | 1037 | } |
1037 | 1038 | ||
1038 | $scope.openAddAirCraftWarning = function() { | 1039 | $scope.openAddAirCraftWarning = function() { |
1039 | $('#addAirCraftWarning').css('display', 'block'); | 1040 | $('#addAirCraftWarning').css('display', 'block'); |
1040 | } | 1041 | } |
1041 | $scope.acceptAirCraftError = function() { | 1042 | $scope.acceptAirCraftError = function() { |
1042 | $('#addAirCraftWarning').css('display', 'none'); | 1043 | $('#addAirCraftWarning').css('display', 'none'); |
1043 | } | 1044 | } |
1044 | 1045 | ||
1045 | $scope.cancelAirCraftError = function() { | 1046 | $scope.cancelAirCraftError = function() { |
1046 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 1047 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
1047 | $('#addAirCraftWarning').css('display', 'none'); | 1048 | $('#addAirCraftWarning').css('display', 'none'); |
1048 | $('#addAirCraftError').css('display', 'none'); | 1049 | $('#addAirCraftError').css('display', 'none'); |
1049 | } | 1050 | } |
1050 | 1051 | ||
1051 | $scope.deleteCompanyData = function() { | 1052 | $scope.deleteCompanyData = function() { |
1052 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { | 1053 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { |
1053 | 1054 | ||
1054 | $('#delete2').css('display', 'none'); | 1055 | $('#delete2').css('display', 'none'); |
1055 | if (result.success) { | 1056 | if (result.success) { |
1056 | toastr.success('' + result.success + '', { | 1057 | toastr.success('' + result.success + '', { |
1057 | closeButton: true | 1058 | closeButton: true |
1058 | 1059 | ||
1059 | }) | 1060 | }) |
1060 | } else { | 1061 | } else { |
1061 | toastr.error('' + result.statusText + '', { | 1062 | toastr.error('' + result.statusText + '', { |
1062 | closeButton: true | 1063 | closeButton: true |
1063 | 1064 | ||
1064 | }) | 1065 | }) |
1065 | } | 1066 | } |
1066 | $state.go('app.customers') | 1067 | $state.go('app.customers') |
1067 | }) | 1068 | }) |
1068 | } | 1069 | } |
1069 | $scope.cancelDelete = function() { | 1070 | $scope.cancelDelete = function() { |
1070 | $('#delete2').css('display', 'none'); | 1071 | $('#delete2').css('display', 'none'); |
1071 | } | 1072 | } |
1072 | 1073 | ||
1073 | 1074 | ||
1074 | $scope.editJetMargin = function(aircraftData, type) { | 1075 | $scope.editJetMargin = function(aircraftData, type) { |
1075 | $scope.showLoader = true; | 1076 | $scope.showLoader = true; |
1076 | if (type == 'jet') { | 1077 | if (type == 'jet') { |
1077 | 1078 | ||
1078 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; | 1079 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; |
1079 | 1080 | ||
1080 | } else { | 1081 | } else { |
1081 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; | 1082 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; |
1082 | } | 1083 | } |
1083 | 1084 | ||
1084 | var id = aircraftData.id; | 1085 | var id = aircraftData.id; |
1085 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { | 1086 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { |
1086 | if (result != null && result.success) { | 1087 | if (result != null && result.success) { |
1087 | $scope.showLoader = false; | 1088 | $scope.showLoader = false; |
1088 | toastr.success('' + result.success + '', { | 1089 | toastr.success('' + result.success + '', { |
1089 | closeButton: true | 1090 | closeButton: true |
1090 | }) | 1091 | }) |
1091 | // getAircraftWithMarginList(); | 1092 | // getAircraftWithMarginList(); |
1092 | getAircraftList(); | 1093 | getAircraftList(); |
1093 | } else { | 1094 | } else { |
1094 | $scope.showLoader = false; | 1095 | $scope.showLoader = false; |
1095 | toastr.error('' + result.statusText + '', { | 1096 | toastr.error('' + result.statusText + '', { |
1096 | closeButton: true | 1097 | closeButton: true |
1097 | }) | 1098 | }) |
1098 | } | 1099 | } |
1099 | }) | 1100 | }) |
1100 | } | 1101 | } |
1101 | 1102 | ||
1102 | 1103 | ||
1103 | /* //not used currently | 1104 | /* //not used currently |
1104 | function getAircraftWithMarginList() { | 1105 | function getAircraftWithMarginList() { |
1105 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { | 1106 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { |
1106 | $scope.contactAircraftList = result; | 1107 | $scope.contactAircraftList = result; |
1107 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 1108 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
1108 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 1109 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
1109 | $scope.aircraftmargins.push({ | 1110 | $scope.aircraftmargins.push({ |
1110 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 1111 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
1111 | }) | 1112 | }) |
1112 | } | 1113 | } |
1113 | } | 1114 | } |
1114 | if ($scope.aircraftmargins.length > 0) { | 1115 | if ($scope.aircraftmargins.length > 0) { |
1115 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 1116 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
1116 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 1117 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
1117 | $scope.multiple = true; | 1118 | $scope.multiple = true; |
1118 | $scope.multipleMsg = true; | 1119 | $scope.multipleMsg = true; |
1119 | if ($scope.multiple) { | 1120 | if ($scope.multiple) { |
1120 | $scope.companyData.masterMargin = "multiple"; | 1121 | $scope.companyData.masterMargin = "multiple"; |
1121 | } | 1122 | } |
1122 | } | 1123 | } |
1123 | } | 1124 | } |
1124 | } | 1125 | } |
1125 | }) | 1126 | }) |
1126 | }*/ | 1127 | }*/ |
1127 | 1128 | ||
1128 | 1129 | ||
1129 | }]); | 1130 | }]); |
app/partials/viewCompany/viewCompany.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ca5c6a; | 3 | color: #ca5c6a; |
4 | } | 4 | } |
5 | .widget-content{ | 5 | .widget-content{ |
6 | padding: 10px !important; | 6 | padding: 10px !important; |
7 | } | 7 | } |
8 | .widget-content input[type="text"], .widget-content select{ | 8 | .widget-content input[type="text"], .widget-content select{ |
9 | height: 31px; | 9 | height: 31px; |
10 | padding: 0; | 10 | padding: 0; |
11 | } | 11 | } |
12 | .new-label span{ | 12 | .new-label span{ |
13 | float: left; | 13 | float: left; |
14 | line-height: 31px; | 14 | line-height: 31px; |
15 | } | 15 | } |
16 | .new-label span:first-child{ | 16 | .new-label span:first-child{ |
17 | margin-right: 5px; | 17 | margin-right: 5px; |
18 | font-weight: bold; | 18 | font-weight: bold; |
19 | } | 19 | } |
20 | .new-label span:last-child{ | 20 | .new-label span:last-child{ |
21 | margin-left: 5px; | 21 | margin-left: 5px; |
22 | } | 22 | } |
23 | .new-label select{ | 23 | .new-label select{ |
24 | display: -webkit-inline-box; | 24 | display: -webkit-inline-box; |
25 | display: inline-box; | 25 | display: inline-box; |
26 | float: left; | 26 | float: left; |
27 | } | 27 | } |
28 | .new-address p{ | 28 | .new-address p{ |
29 | margin-bottom: 0; | 29 | margin-bottom: 0; |
30 | } | 30 | } |
31 | .new-add-select{ | 31 | .new-add-select{ |
32 | padding-left: 15px; | 32 | padding-left: 15px; |
33 | margin: 10px 0; | 33 | margin: 10px 0; |
34 | } | 34 | } |
35 | .new-add-select select{ | 35 | .new-add-select select{ |
36 | width: 100px; | 36 | width: 100px; |
37 | } | 37 | } |
38 | .widget{ | 38 | .widget{ |
39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
42 | } | 42 | } |
43 | .optionclass { | 43 | .optionclass { |
44 | background: #fff; | 44 | background: #fff; |
45 | } | 45 | } |
46 | .timess { | 46 | .timess { |
47 | float: right !important; | 47 | float: right !important; |
48 | margin-top: 10px !important; | 48 | margin-top: 10px !important; |
49 | margin-right: 10px !important; | 49 | margin-right: 10px !important; |
50 | color: #999 !important; | 50 | color: #999 !important; |
51 | cursor: pointer !important; | 51 | cursor: pointer !important; |
52 | } | 52 | } |
53 | 53 | ||
54 | .button1 { | 54 | .button1 { |
55 | display: inline-block; | 55 | display: inline-block; |
56 | height: 35px; | 56 | height: 35px; |
57 | line-height: 35px; | 57 | line-height: 35px; |
58 | padding-right: 15px; | 58 | padding-right: 15px; |
59 | padding-left: 50px; | 59 | padding-left: 50px; |
60 | position: relative; | 60 | position: relative; |
61 | background-color:rgb(41,127,184); | 61 | background-color:rgb(41,127,184); |
62 | color:rgb(255,255,255); | 62 | color:rgb(255,255,255); |
63 | text-decoration: none; | 63 | text-decoration: none; |
64 | text-transform: uppercase; | 64 | text-transform: uppercase; |
65 | letter-spacing: 1px; | 65 | letter-spacing: 1px; |
66 | margin-bottom: 15px; | 66 | margin-bottom: 15px; |
67 | border: 0; | 67 | border: 0; |
68 | 68 | ||
69 | 69 | ||
70 | border-radius: 5px; | 70 | border-radius: 5px; |
71 | -moz-border-radius: 5px; | 71 | -moz-border-radius: 5px; |
72 | -webkit-border-radius: 5px; | 72 | -webkit-border-radius: 5px; |
73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
76 | 76 | ||
77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
82 | } | 82 | } |
83 | 83 | ||
84 | .button1 span { | 84 | .button1 span { |
85 | position: absolute; | 85 | position: absolute; |
86 | left: 0; | 86 | left: 0; |
87 | top: 0; | 87 | top: 0; |
88 | width: 35px; | 88 | width: 35px; |
89 | background-color:rgba(0,0,0,0.5); | 89 | background-color:rgba(0,0,0,0.5); |
90 | 90 | ||
91 | -webkit-border-top-left-radius: 5px; | 91 | -webkit-border-top-left-radius: 5px; |
92 | -webkit-border-bottom-left-radius: 5px; | 92 | -webkit-border-bottom-left-radius: 5px; |
93 | -moz-border-radius-topleft: 5px; | 93 | -moz-border-radius-topleft: 5px; |
94 | -moz-border-radius-bottomleft: 5px; | 94 | -moz-border-radius-bottomleft: 5px; |
95 | border-top-left-radius: 5px; | 95 | border-top-left-radius: 5px; |
96 | border-bottom-left-radius: 5px; | 96 | border-bottom-left-radius: 5px; |
97 | border-right: 1px solid rgba(0,0,0,0.15); | 97 | border-right: 1px solid rgba(0,0,0,0.15); |
98 | } | 98 | } |
99 | 99 | ||
100 | .button1:hover span, .button1.active span { | 100 | .button1:hover span, .button1.active span { |
101 | background-color:rgb(0,102,26); | 101 | background-color:rgb(0,102,26); |
102 | border-right: 1px solid rgba(0,0,0,0.3); | 102 | border-right: 1px solid rgba(0,0,0,0.3); |
103 | } | 103 | } |
104 | 104 | ||
105 | .button1:active { | 105 | .button1:active { |
106 | margin-top: 2px; | 106 | margin-top: 2px; |
107 | margin-bottom: 13px; | 107 | margin-bottom: 13px; |
108 | 108 | ||
109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
114 | } | 114 | } |
115 | 115 | ||
116 | .button1.turquoise { | 116 | .button1.turquoise { |
117 | background: #449d44; | 117 | background: #449d44; |
118 | } | 118 | } |
119 | 119 | ||
120 | </style> | 120 | </style> |
121 | 121 | ||
122 | <div class="myLoader" ng-show="showLoader"> | 122 | <div class="myLoader" ng-show="showLoader"> |
123 | <img src="../img/hourglass.gif" width="50px;"> | 123 | <img src="../img/hourglass.gif" width="50px;"> |
124 | </div> | 124 | </div> |
125 | 125 | ||
126 | <div class="col-xs-12 col-md-12"> | 126 | <div class="col-xs-12 col-md-12"> |
127 | <div class="row" style="margin-left:0px"> | 127 | <div class="row" style="margin-left:0px"> |
128 | <div class="col-md-12"> | 128 | <div class="col-md-12"> |
129 | <div class="widget"> | 129 | <div class="widget"> |
130 | <div class="widget-header"> | 130 | <div class="widget-header"> |
131 | <i class="fa fa-building-o" aria-hidden="true"></i> | 131 | <i class="fa fa-building-o" aria-hidden="true"></i> |
132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true"></i></h3> | 132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true"></i></h3> |
133 | <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> | 133 | <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> |
134 | </div> | 134 | </div> |
135 | <!-- /widget-header --> | 135 | <!-- /widget-header --> |
136 | <div class="widget-content"> | 136 | <div class="widget-content"> |
137 | <div class="row" style="margin-left:0px"> | 137 | <div class="row" style="margin-left:0px"> |
138 | <div class="col-md-6" ng-show="isGlobal"> | 138 | <div class="col-md-6" ng-show="isGlobal"> |
139 | <div class="widget"> | 139 | <div class="widget"> |
140 | <div class="widget-header"> | 140 | <div class="widget-header"> |
141 | <i class="fa fa-building-o" aria-hidden="true"></i> | 141 | <i class="fa fa-building-o" aria-hidden="true"></i> |
142 | <h3>Company Details</h3> | 142 | <h3>Company Details</h3> |
143 | <label>BASE ICAO</label> | 143 | <label>BASE ICAO</label> |
144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
145 | 145 | ||
146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
148 | </div> | 148 | </div> |
149 | 149 | ||
150 | </div> | 150 | </div> |
151 | <div class="widget-content" style="min-height: 350px;"> | 151 | <div class="widget-content" style="min-height: 350px;"> |
152 | <div class="row" style="margin-left:0px;"> | 152 | <div class="row" style="margin-left:0px;"> |
153 | <div class="col-md-7" style="padding-left: 0;"> | 153 | <div class="col-md-7" style="padding-left: 0;"> |
154 | <h4 ng-show="showCompanyName"> | 154 | <h4 ng-show="showCompanyName"> |
155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> |
156 | </h4> | 156 | </h4> |
157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
158 | </div> | 158 | </div> |
159 | <div class="col-md-5"> | 159 | <div class="col-md-5"> |
160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
165 | <option class="optionclass" value="military">Military</option> | 165 | <option class="optionclass" value="military">Military</option> |
166 | <option class="optionclass" value="government">Government</option> | 166 | <option class="optionclass" value="government">Government</option> |
167 | </select> | 167 | </select> |
168 | </div> | 168 | </div> |
169 | </div> | 169 | </div> |
170 | <div> | 170 | <div> |
171 | <p class="new-label"> | 171 | <p class="new-label"> |
172 | <span>JET A Margin </span> | 172 | <span>JET A Margin </span> |
173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
174 | <option ng-if="multiple" value="multiple">Multiple</option> | 174 | <option ng-if="multiple" value="multiple">Multiple</option> |
175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
176 | </select> | 176 | </select> |
177 | <span ng-show="multipleMsg"> See Aircrart List</span> | 177 | <span ng-show="multipleMsg"> See Aircrart List</span> |
178 | <div class="clearfix"></div> | 178 | <div class="clearfix"></div> |
179 | </p> | 179 | </p> |
180 | </div> | 180 | </div> |
181 | <div> | 181 | <div> |
182 | <p class="new-label"> | 182 | <p class="new-label"> |
183 | <span>AVGAS 100LL </span> | 183 | <span>AVGAS 100LL </span> |
184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
185 | <option value="">N/A</option> | 185 | <option value="">N/A</option> |
186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
187 | </select> | 187 | </select> |
188 | <div class="clearfix"></div> | 188 | <div class="clearfix"></div> |
189 | </p> | 189 | </p> |
190 | </div> | 190 | </div> |
191 | <div> | 191 | <div> |
192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> | 192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> |
193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> | 193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> |
194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> | 194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> |
195 | {{val.first}} | 195 | {{val.first}} |
196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> | 196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> |
197 | </ui-select-choices> | 197 | </ui-select-choices> |
198 | </ui-select> | 198 | </ui-select> |
199 | </div> | 199 | </div> |
200 | </br> | 200 | </br> |
201 | <div class="new-address"> | 201 | <div class="new-address"> |
202 | </div> | 202 | </div> |
203 | <div> | 203 | <div> |
204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
207 | </div> | 207 | </div> |
208 | <div class="pull-left"> | 208 | <div class="pull-left"> |
209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
211 | </div> | 211 | </div> |
212 | <div class="pull-right"> | 212 | <div class="pull-right"> |
213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
215 | </div> | 215 | </div> |
216 | <div class="clearfix"></div> | 216 | <div class="clearfix"></div> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
220 | <div class="col-md-6" ng-hide="isGlobal"> | 220 | <div class="col-md-6" ng-hide="isGlobal"> |
221 | <div class="widget"> | 221 | <div class="widget"> |
222 | <div class="widget-header"> | 222 | <div class="widget-header"> |
223 | <i class="fa fa-building-o" aria-hidden="true"></i> | 223 | <i class="fa fa-building-o" aria-hidden="true"></i> |
224 | <h3>Company Details</h3> | 224 | <h3>Company Details</h3> |
225 | <label>BASE ICAO</label> | 225 | <label>BASE ICAO</label> |
226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
227 | 227 | ||
228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
230 | </div> | 230 | </div> |
231 | 231 | ||
232 | </div> | 232 | </div> |
233 | <div class="widget-content"> | 233 | <div class="widget-content"> |
234 | <div class="row" style="margin-left:0px;"> | 234 | <div class="row" style="margin-left:0px;"> |
235 | <div class="col-md-7" style="padding-left: 0;"> | 235 | <div class="col-md-7" style="padding-left: 0;"> |
236 | <h4 ng-show="showCompanyName"> | 236 | <h4 ng-show="showCompanyName"> |
237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> |
238 | </h4> | 238 | </h4> |
239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
240 | </div> | 240 | </div> |
241 | <div class="col-md-5"> | 241 | <div class="col-md-5"> |
242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
247 | <option class="optionclass" value="military">Military</option> | 247 | <option class="optionclass" value="military">Military</option> |
248 | <option class="optionclass" value="government">Government</option> | 248 | <option class="optionclass" value="government">Government</option> |
249 | </select> | 249 | </select> |
250 | </div> | 250 | </div> |
251 | </div> | 251 | </div> |
252 | <div> | 252 | <div> |
253 | <p class="new-label"> | 253 | <p class="new-label"> |
254 | <span>JET A Margin </span> | 254 | <span>JET A Margin </span> |
255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
256 | <option ng-if="multiple" value="multiple">Multiple</option> | 256 | <option ng-if="multiple" value="multiple">Multiple</option> |
257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
258 | </select> | 258 | </select> |
259 | <span ng-show="multipleMsg"> See Aircraft List</span> | 259 | <span ng-show="multipleMsg"> See Aircraft List</span> |
260 | <div class="clearfix"></div> | 260 | <div class="clearfix"></div> |
261 | </p> | 261 | </p> |
262 | </div> | 262 | </div> |
263 | <div> | 263 | <div> |
264 | <p class="new-label"> | 264 | <p class="new-label"> |
265 | <span>AVGAS 100LL </span> | 265 | <span>AVGAS 100LL </span> |
266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
267 | <option value="">N/A</option> | 267 | <option value="">N/A</option> |
268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
269 | </select> | 269 | </select> |
270 | <div class="clearfix"></div> | 270 | <div class="clearfix"></div> |
271 | </p> | 271 | </p> |
272 | </div> | 272 | </div> |
273 | <div class="row" style="margin-left:0px;"> | 273 | <div class="row" style="margin-left:0px;"> |
274 | <div class="col-md-5" style="padding-left: 0;"> | 274 | <div class="col-md-5" style="padding-left: 0;"> |
275 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer | 275 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer |
276 | </div> | 276 | </div> |
277 | <div class="col-md-5" style="padding-left: 0;"> | 277 | <div class="col-md-5" style="padding-left: 0;"> |
278 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer | 278 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div> | 281 | <div> |
282 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member | 282 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member |
283 | </div> | 283 | </div> |
284 | </br> | 284 | </br> |
285 | <div class="new-address"> | 285 | <div class="new-address"> |
286 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> | 286 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> |
287 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, | 287 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, |
288 | {{companyData.addressTwo}}</span> <span ng-hide="companyData.city == 'null'"><br/>{{companyData.city}},</span> <span ng-hide="companyData.state == 'null'">{{companyData.state}}</span> <span ng-hide="companyData.zipcode == 'null'">{{companyData.zipcode}}</span> <span ng-hide="companyData.country == 'null'"></br>{{companyData.country}}</span> <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | 288 | {{companyData.addressTwo}}</span> <span ng-hide="companyData.city == 'null'"><br/>{{companyData.city}},</span> <span ng-hide="companyData.state == 'null'">{{companyData.state}}</span> <span ng-hide="companyData.zipcode == 'null'">{{companyData.zipcode}}</span> <span ng-hide="companyData.country == 'null'"></br>{{companyData.country}}</span> <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> |
289 | 289 | ||
290 | <div ng-hide="showAddress" style="margin-bottom:10px;"> | 290 | <div ng-hide="showAddress" style="margin-bottom:10px;"> |
291 | <label>Address1</label> | 291 | <label>Address1</label> |
292 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> | 292 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> |
293 | <label>Address2</label> | 293 | <label>Address2</label> |
294 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> | 294 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> |
295 | <label>City</label> | 295 | <label>City</label> |
296 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> | 296 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> |
297 | <label>State</label> | 297 | <label>State</label> |
298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> | 298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> |
299 | <label>ZipCode</label> | 299 | <label>ZipCode</label> |
300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> | 300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> |
301 | <label>Country</label> | 301 | <label>Country</label> |
302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> | 302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> |
303 | </div> | 303 | </div> |
304 | 304 | ||
305 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> | 305 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> |
306 | <i class="fa fa-phone" ng-hide="showEditContact"></i> | 306 | <i class="fa fa-phone" ng-hide="showEditContact"></i> |
307 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> | 307 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> |
308 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 308 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
309 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> | 309 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> |
310 | </p> | 310 | </p> |
311 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> | 311 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> |
312 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> | 312 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> |
313 | <span ng-hide="showEditEmail">{{data.email}} </span> | 313 | <span ng-hide="showEditEmail">{{data.email}} </span> |
314 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 314 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
315 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> | 315 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> |
316 | </p> | 316 | </p> |
317 | </div> | 317 | </div> |
318 | <div style="margin-top:5px; margin-bottom:5px;"> | 318 | <div style="margin-top:5px; margin-bottom:5px;"> |
319 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> | 319 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> |
320 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> | 320 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> |
321 | </div> | 321 | </div> |
322 | <div> | 322 | <div> |
323 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 323 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
324 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 324 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
325 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 325 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
326 | </div> | 326 | </div> |
327 | <div class="pull-left"> | 327 | <div class="pull-left"> |
328 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 328 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
329 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 329 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
330 | </div> | 330 | </div> |
331 | <div class="pull-right"> | 331 | <div class="pull-right"> |
332 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 332 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
333 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 333 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
334 | </div> | 334 | </div> |
335 | <div class="clearfix"></div> | 335 | <div class="clearfix"></div> |
336 | </div> | 336 | </div> |
337 | </div> | 337 | </div> |
338 | </div> | 338 | </div> |
339 | <div class="col-md-6"> | 339 | <div class="col-md-6"> |
340 | <div class="widget" style="min-height: 350px;"> | 340 | <div class="widget" style="min-height: 350px;"> |
341 | <div class="widget-header"> | 341 | <div class="widget-header"> |
342 | <i class="fa fa-plane"></i> | 342 | <i class="fa fa-plane"></i> |
343 | <h3>Aircraft List</h3> | 343 | <h3>Aircraft List</h3> |
344 | <div class="pull-right"> | 344 | <div class="pull-right"> |
345 | <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft </button> | 345 | <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft </button> |
346 | </div> | 346 | </div> |
347 | </div> | 347 | </div> |
348 | <div class="widget-content" style="padding:0px;min-height: 350px;"> | 348 | <div class="widget-content" style="padding:0px;min-height: 350px;"> |
349 | <div class="table-responsive"> | 349 | <div class="table-responsive"> |
350 | <table class="table table-bordered table-hover table-striped"> | 350 | <table class="table table-bordered table-hover table-striped"> |
351 | <thead> | 351 | <thead> |
352 | <tr> | 352 | <tr> |
353 | <th>Tail #</th> | 353 | <th>Tail #</th> |
354 | <th>Make</th> | 354 | <th>Make</th> |
355 | <th>Model</th> | 355 | <th>Model</th> |
356 | <th>Fuel Type</th> | 356 | <th>Fuel Type</th> |
357 | <th>Margin</th> | 357 | <th>Margin</th> |
358 | <th>Value</th> | 358 | <th>Value</th> |
359 | <th>All In</th> | 359 | <th>All In</th> |
360 | <!-- <th>AVGAS</th> --> | 360 | <!-- <th>AVGAS</th> --> |
361 | <!-- <th>All In</th> --> | 361 | <!-- <th>All In</th> --> |
362 | <th></th> | 362 | <th></th> |
363 | </tr> | 363 | </tr> |
364 | </thead> | 364 | </thead> |
365 | <tbody> | 365 | <tbody> |
366 | <tr ng-repeat="aircraft in contactAircraftList"> | 366 | <tr ng-repeat="aircraft in contactAircraftList"> |
367 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> | 367 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> |
368 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> | 368 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> |
369 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> | 369 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> |
370 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> | 370 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> |
371 | <td> | 371 | <td> |
372 | <select ng-show="abc && aircraft.fuelType=='Jet-A'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsMargin.id" ng-change="editJetMargin(aircraft,'jet')" ng-options="margin.id as margin.marginName for margin in jetMarginList" required> | 372 | <select ng-show="abc && aircraft.fuelType=='Jet-A'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsMargin.id" ng-change="editJetMargin(aircraft,'jet')" ng-options="margin.id as margin.marginName for margin in jetMarginList" required> |
373 | <option value="">N/A</option> | 373 | <option value="">N/A</option> |
374 | </select> | 374 | </select> |
375 | <!-- </td> | 375 | <!-- </td> |
376 | <td> --> | 376 | <td> --> |
377 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> | 377 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> |
378 | <option value="">N/A</option> | 378 | <option value="">N/A</option> |
379 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 379 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
380 | </select> | 380 | </select> |
381 | </td> | 381 | </td> |
382 | <td ng-style="aircraft.global"> | 382 | <td ng-style="aircraft.global"> |
383 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> | 383 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> |
384 | =${{aircraft.marginValue}} | 384 | =${{aircraft.marginValue}} |
385 | </span> | 385 | </span> |
386 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} | 386 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} |
387 | </span> | 387 | </span> |
388 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} | 388 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} |
389 | </span> | 389 | </span> |
390 | </td> | 390 | </td> |
391 | <td> | 391 | <td> |
392 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> | 392 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> |
393 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> | 393 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> |
394 | 394 | ||
395 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> | 395 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> |
396 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> | 396 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> |
397 | </td> | 397 | </td> |
398 | <td> | 398 | <td> |
399 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> | 399 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> |
400 | </td> | 400 | </td> |
401 | </tr> | 401 | </tr> |
402 | </tbody> | 402 | </tbody> |
403 | </table> | 403 | </table> |
404 | </div> | 404 | </div> |
405 | </div> | 405 | </div> |
406 | </div> | 406 | </div> |
407 | </div> | 407 | </div> |
408 | </div> | 408 | </div> |
409 | <div class="row" style="margin-left:0px"> | 409 | <div class="row" style="margin-left:0px"> |
410 | <div class="col-md-6"> | 410 | <div class="col-md-6"> |
411 | <div class="widget"> | 411 | <div class="widget"> |
412 | <div class="widget-header"> | 412 | <div class="widget-header"> |
413 | <i class="fa fa-user"></i> | 413 | <i class="fa fa-user"></i> |
414 | <h3>Contact List</h3> | 414 | <h3>Contact List</h3> |
415 | <div class="pull-right"> | 415 | <div class="pull-right"> |
416 | <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> | 416 | <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> |
417 | </div> | 417 | </div> |
418 | </div> | 418 | </div> |
419 | <div class="widget-content" style="padding:0px"> | 419 | <div class="widget-content" style="padding:0px"> |
420 | <div class="table-responsive"> | 420 | <div class="table-responsive"> |
421 | <table class="table table-bordered table-hover table-striped"> | 421 | <table class="table table-bordered table-hover table-striped"> |
422 | <thead> | 422 | <thead> |
423 | <tr> | 423 | <tr> |
424 | <th>Price Email</th> | 424 | <th>Price Email</th> |
425 | <th>First Name</th> | 425 | <th>First Name</th> |
426 | <th>Last Name</th> | 426 | <th>Last Name</th> |
427 | <th>Title</th> | 427 | <th>Title</th> |
428 | </tr> | 428 | </tr> |
429 | </thead> | 429 | </thead> |
430 | <tbody> | 430 | <tbody> |
431 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> | 431 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> |
432 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> | 432 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> |
433 | <td> | 433 | <td> |
434 | {{contact.firstName}} | 434 | {{contact.firstName}} |
435 | </td> | 435 | </td> |
436 | <td>{{contact.lastName}}</td> | 436 | <td>{{contact.lastName}}</td> |
437 | <td>{{contact.title}}</td> | 437 | <td>{{contact.title}}</td> |
438 | </tr> | 438 | </tr> |
439 | </tbody> | 439 | </tbody> |
440 | </table> | 440 | </table> |
441 | </div> | 441 | </div> |
442 | </div> | 442 | </div> |
443 | </div> | 443 | </div> |
444 | </div> | 444 | </div> |
445 | <div class="col-md-6"> | 445 | <div class="col-md-6"> |
446 | <div class="widget"> | 446 | <div class="widget"> |
447 | <div class="widget-header"> | 447 | <div class="widget-header"> |
448 | <i class="fa fa-pencil"></i> | 448 | <i class="fa fa-pencil"></i> |
449 | <h3>Price Manager Reference</h3> | 449 | <h3>Price Manager Reference</h3> |
450 | </div> | 450 | </div> |
451 | <div class="widget-content"> | 451 | <div class="widget-content"> |
452 | <div class="table-responsive"> | 452 | <div class="table-responsive"> |
453 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> | 453 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> |
454 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> | 454 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> |
455 | <thead> | 455 | <thead> |
456 | <tr> | 456 | <tr> |
457 | <th>Omit</th> | 457 | <th>Omit</th> |
458 | <th>Product</th> | 458 | <th>Product</th> |
459 | <th>Cost</th> | 459 | <th>Cost</th> |
460 | <th>PAP (Margin)</th> | 460 | <th>PAP (Margin)</th> |
461 | <th>PAP (Total)</th> | 461 | <th>PAP (Total)</th> |
462 | <th style="color:#F90">Expires</th> | 462 | <th style="color:#F90">Expires</th> |
463 | </tr> | 463 | </tr> |
464 | </thead> | 464 | </thead> |
465 | <tbody> | 465 | <tbody> |
466 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> | 466 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> |
467 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> | 467 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> |
468 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> | 468 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> |
469 | <td>{{fuel.name}}</td> | 469 | <td>{{fuel.name}}</td> |
470 | <td>${{fuel.fuelPricing.cost | number :4}}</td> | 470 | <td>${{fuel.fuelPricing.cost | number :4}}</td> |
471 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> | 471 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> |
472 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> | 472 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> |
473 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> | 473 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> |
474 | </tr> | 474 | </tr> |
475 | 475 | ||
476 | </tbody> | 476 | </tbody> |
477 | </table> | 477 | </table> |
478 | </div> | 478 | </div> |
479 | </div> | 479 | </div> |
480 | </div> | 480 | </div> |
481 | </div> | 481 | </div> |
482 | </div> | 482 | </div> |
483 | </div> | 483 | </div> |
484 | <!-- /widget-content --> | 484 | <!-- /widget-content --> |
485 | </div> | 485 | </div> |
486 | <!-- /widget --> | 486 | <!-- /widget --> |
487 | </div> | 487 | </div> |
488 | <!-- /span6 --> | 488 | <!-- /span6 --> |
489 | </div> | 489 | </div> |
490 | <!-- /widget --> | 490 | <!-- /widget --> |
491 | </div> | 491 | </div> |
492 | <!-- /container --> | 492 | <!-- /container --> |
493 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> | 493 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> |
494 | <div class="modal-dialog modal-lg"> | 494 | <div class="modal-dialog modal-lg"> |
495 | <div class="modal-content"> | 495 | <div class="modal-content"> |
496 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 496 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
497 | <div> | 497 | <div> |
498 | <div class="row" style="margin: 0;"> | 498 | <div class="row" style="margin: 0;"> |
499 | <div> | 499 | <div> |
500 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | 500 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> |
501 | <div class="widget-header"> | 501 | <div class="widget-header"> |
502 | <i class="icon-pencil"></i> | 502 | <i class="icon-pencil"></i> |
503 | <i class="fa fa-tasks" aria-hidden="true"></i> | 503 | <i class="fa fa-tasks" aria-hidden="true"></i> |
504 | <h3>Add a New Contact</h3> | 504 | <h3>Add a New Contact</h3> |
505 | <div class="clearfix"></div> | 505 | <div class="clearfix"></div> |
506 | </div> | 506 | </div> |
507 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 507 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
508 | <div class="col-xs-12"> | 508 | <div class="col-xs-12"> |
509 | <div class="col-md-6"> | 509 | <div class="col-md-6"> |
510 | <div class="pull-left" style="width: 110px;"> | 510 | <div class="pull-left" style="width: 110px;"> |
511 | <label class="new-input-label"><b>First Name</b></label> | 511 | <label class="new-input-label"><b>First Name</b></label> |
512 | </div> | 512 | </div> |
513 | <div class="pull-left" style="margin-left: 15px;"> | 513 | <div class="pull-left" style="margin-left: 15px;"> |
514 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | 514 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> |
515 | </div> | 515 | </div> |
516 | <div class="clearfix"></div> | 516 | <div class="clearfix"></div> |
517 | </div> | 517 | </div> |
518 | <div class="col-md-6"> | 518 | <div class="col-md-6"> |
519 | 519 | ||
520 | <div class="pull-left" style="width: 110px;"> | 520 | <div class="pull-left" style="width: 110px;"> |
521 | <label class="new-input-label"><b>Last Name</b></label> | 521 | <label class="new-input-label"><b>Last Name</b></label> |
522 | </div> | 522 | </div> |
523 | <div class="pull-left" style="margin-left: 15px;"> | 523 | <div class="pull-left" style="margin-left: 15px;"> |
524 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | 524 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> |
525 | </div> | 525 | </div> |
526 | <div class="clearfix"></div> | 526 | <div class="clearfix"></div> |
527 | </div> | 527 | </div> |
528 | </div> | 528 | </div> |
529 | <div class="clearfix"></div><br> | 529 | <div class="clearfix"></div><br> |
530 | <div class="col-xs-12"> | 530 | <div class="col-xs-12"> |
531 | <div class="col-md-6"> | 531 | <div class="col-md-6"> |
532 | <div class="pull-left" style="width: 110px;"> | 532 | <div class="pull-left" style="width: 110px;"> |
533 | <label class="new-input-label"><b>Title</b></label> | 533 | <label class="new-input-label"><b>Title</b></label> |
534 | </div> | 534 | </div> |
535 | <div class="pull-left" style="margin-left: 15px;"> | 535 | <div class="pull-left" style="margin-left: 15px;"> |
536 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | 536 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> |
537 | </div> | 537 | </div> |
538 | <div class="clearfix"></div> | 538 | <div class="clearfix"></div> |
539 | </div> | 539 | </div> |
540 | <div class="col-md-6"> | 540 | <div class="col-md-6"> |
541 | 541 | ||
542 | <div class="pull-left" style="width: 110px;"> | 542 | <div class="pull-left" style="width: 110px;"> |
543 | <label class="new-input-label"><b>Email</b></label> | 543 | <label class="new-input-label"><b>Email</b></label> |
544 | </div> | 544 | </div> |
545 | <div class="pull-left" style="margin-left: 15px;"> | 545 | <div class="pull-left" style="margin-left: 15px;"> |
546 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | 546 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> |
547 | </div> | 547 | </div> |
548 | <div class="clearfix"></div> | 548 | <div class="clearfix"></div> |
549 | </div> | 549 | </div> |
550 | </div> | 550 | </div> |
551 | <div class="clearfix"></div><br> | 551 | <div class="clearfix"></div><br> |
552 | <div class="col-xs-12"> | 552 | <div class="col-xs-12"> |
553 | <div class="col-md-6"> | 553 | <div class="col-md-6"> |
554 | <div class="pull-left" style="width: 110px;"> | 554 | <div class="pull-left" style="width: 110px;"> |
555 | <label class="new-input-label"><b>Username</b></label> | 555 | <label class="new-input-label"><b>Username</b></label> |
556 | </div> | 556 | </div> |
557 | <div class="pull-left" style="margin-left: 15px;"> | 557 | <div class="pull-left" style="margin-left: 15px;"> |
558 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | 558 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> |
559 | </div> | 559 | </div> |
560 | <div class="clearfix"></div> | 560 | <div class="clearfix"></div> |
561 | </div> | 561 | </div> |
562 | <div class="col-md-6"> | 562 | <div class="col-md-6"> |
563 | 563 | ||
564 | <div class="pull-left" style="width: 110px;"> | 564 | <div class="pull-left" style="width: 110px;"> |
565 | <label class="new-input-label"><b>Password</b></label> | 565 | <label class="new-input-label"><b>Password</b></label> |
566 | </div> | 566 | </div> |
567 | <div class="pull-left" style="margin-left: 15px;"> | 567 | <div class="pull-left" style="margin-left: 15px;"> |
568 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | 568 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> |
569 | </div> | 569 | </div> |
570 | <div class="clearfix"></div> | 570 | <div class="clearfix"></div> |
571 | </div> | 571 | </div> |
572 | </div> | 572 | </div> |
573 | <div class="clearfix"></div><br> | 573 | <div class="clearfix"></div><br> |
574 | <div class="col-xs-12"> | 574 | <div class="col-xs-12"> |
575 | <div class="col-md-6"> | 575 | <div class="col-md-6"> |
576 | <div class="pull-left" style="width: 110px;"> | 576 | <div class="pull-left" style="width: 110px;"> |
577 | <label class="new-input-label"><b>Work Phone</b></label> | 577 | <label class="new-input-label"><b>Work Phone</b></label> |
578 | </div> | 578 | </div> |
579 | <div class="pull-left" style="margin-left: 15px;"> | 579 | <div class="pull-left" style="margin-left: 15px;"> |
580 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | 580 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> |
581 | </div> | 581 | </div> |
582 | <div class="clearfix"></div> | 582 | <div class="clearfix"></div> |
583 | </div> | 583 | </div> |
584 | <div class="col-md-6"> | 584 | <div class="col-md-6"> |
585 | 585 | ||
586 | <div class="pull-left" style="width: 110px;"> | 586 | <div class="pull-left" style="width: 110px;"> |
587 | <label class="new-input-label"><b>Mobile Phone</b></label> | 587 | <label class="new-input-label"><b>Mobile Phone</b></label> |
588 | </div> | 588 | </div> |
589 | <div class="pull-left" style="margin-left: 15px;"> | 589 | <div class="pull-left" style="margin-left: 15px;"> |
590 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | 590 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> |
591 | </div> | 591 | </div> |
592 | <div class="clearfix"></div> | 592 | <div class="clearfix"></div> |
593 | </div> | 593 | </div> |
594 | </div> | 594 | </div> |
595 | <div class="clearfix"></div><br> | 595 | <div class="clearfix"></div><br> |
596 | <!-- <div class="col-xs-12"> | 596 | <!-- <div class="col-xs-12"> |
597 | <div class="col-md-12"> | 597 | <div class="col-md-12"> |
598 | <div class="pull-left" style="width: 110px;"> | 598 | <div class="pull-left" style="width: 110px;"> |
599 | <label class="new-input-label"><b>Address</b></label> | 599 | <label class="new-input-label"><b>Address</b></label> |
600 | </div> | 600 | </div> |
601 | <div class="pull-right" style="width: calc(100% - 123px);"> | 601 | <div class="pull-right" style="width: calc(100% - 123px);"> |
602 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | 602 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> |
603 | </div> | 603 | </div> |
604 | <div class="clearfix"></div> | 604 | <div class="clearfix"></div> |
605 | </div> | 605 | </div> |
606 | </div> | 606 | </div> |
607 | <div class="clearfix"></div> --> | 607 | <div class="clearfix"></div> --> |
608 | <br/> | 608 | <br/> |
609 | <div class="col-xs-12"> | 609 | <div class="col-xs-12"> |
610 | <div class="col-md-3"> | 610 | <div class="col-md-3"> |
611 | <div class="pull-left my-toggle-switch"> | 611 | <div class="pull-left my-toggle-switch"> |
612 | <div style="color: #ff9a01;">Price Email     | 612 | <div style="color: #ff9a01;">Price Email     |
613 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> | 613 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> |
614 | </div> | 614 | </div> |
615 | </div> | 615 | </div> |
616 | <div class="clearfix"></div> | 616 | <div class="clearfix"></div> |
617 | </div> | 617 | </div> |
618 | <div class="col-md-3"> | 618 | <div class="col-md-3"> |
619 | <div class="pull-left my-toggle-switch"> | 619 | <div class="pull-left my-toggle-switch"> |
620 | <div style="color: #ff9a01;">Primary Contact     | 620 | <div style="color: #ff9a01;">Primary Contact     |
621 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> | 621 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> |
622 | </div> | 622 | </div> |
623 | </div> | 623 | </div> |
624 | <div class="clearfix"></div> | 624 | <div class="clearfix"></div> |
625 | </div> | 625 | </div> |
626 | <div class="col-md-6"> | 626 | <div class="col-md-6"> |
627 | <div class="pull-left" style="width: 110px;"> | 627 | <div class="pull-left" style="width: 110px;"> |
628 | <label class="new-input-label"><b>Internal Note</b></label> | 628 | <label class="new-input-label"><b>Internal Note</b></label> |
629 | </div> | 629 | </div> |
630 | <div class="pull-left" style="width: calc(100% - 110px);"> | 630 | <div class="pull-left" style="width: calc(100% - 110px);"> |
631 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | 631 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> |
632 | </div> | 632 | </div> |
633 | </div> | 633 | </div> |
634 | <div class="clearfix"></div> | 634 | <div class="clearfix"></div> |
635 | </div> | 635 | </div> |
636 | <div class="clearfix"></div><br> | 636 | <div class="clearfix"></div><br> |
637 | </div> | 637 | </div> |
638 | </div> | 638 | </div> |
639 | <div class="clearfix"></div> | 639 | <div class="clearfix"></div> |
640 | </div> | 640 | </div> |
641 | </div> | 641 | </div> |
642 | </div> | 642 | </div> |
643 | </div> | 643 | </div> |
644 | <div class="modal-footer" style="border-top: 0;"> | 644 | <div class="modal-footer" style="border-top: 0;"> |
645 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 645 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
646 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | 646 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> |
647 | </div> | 647 | </div> |
648 | </div> | 648 | </div> |
649 | </div> | 649 | </div> |
650 | </form> | 650 | </form> |
651 | <div class="clearfix"></div> | 651 | <div class="clearfix"></div> |
652 | 652 | ||
653 | <!-- SetUp fuel order --> | 653 | <!-- SetUp fuel order --> |
654 | <form class="modal" id="demo-modal-4" name="orderform"> | 654 | <form class="modal" id="demo-modal-4" name="orderform"> |
655 | <div class="modal-dialog modal-md"> | 655 | <div class="modal-dialog modal-md"> |
656 | <div class="modal-content"> | 656 | <div class="modal-content"> |
657 | <div class="modal-body" data-step="1" style="padding: 0;"> | 657 | <div class="modal-body" data-step="1" style="padding: 0;"> |
658 | <div> | 658 | <div> |
659 | <div class="row" style="margin: 0;"> | 659 | <div class="row" style="margin: 0;"> |
660 | <div> | 660 | <div> |
661 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 661 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
662 | <div class="widget-header"> | 662 | <div class="widget-header"> |
663 | <i class="icon-pencil"></i> | 663 | <i class="icon-pencil"></i> |
664 | <i class="fa fa-tasks" aria-hidden="true"></i> | 664 | <i class="fa fa-tasks" aria-hidden="true"></i> |
665 | <h3>Search and Dispatch Fuel</h3> | 665 | <h3>Search and Dispatch Fuel</h3> |
666 | <div class="clearfix"></div> | 666 | <div class="clearfix"></div> |
667 | </div> | 667 | </div> |
668 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 668 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
669 | <div class="col-xs-12"> | 669 | <div class="col-xs-12"> |
670 | <div class="col-xs-12"> | 670 | <div class="col-xs-12"> |
671 | <div class="pull-left" style="width: 110px;"> | 671 | <div class="pull-left" style="width: 110px;"> |
672 | <label class="new-input-label"><b>Company</b></label> | 672 | <label class="new-input-label"><b>Company</b></label> |
673 | </div> | 673 | </div> |
674 | <div class="pull-left" style="width: calc(100% - 110px);"> | 674 | <div class="pull-left" style="width: calc(100% - 110px);"> |
675 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> | 675 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> |
676 | </div> | 676 | </div> |
677 | <div class="clearfix"></div> | 677 | <div class="clearfix"></div> |
678 | </div> | 678 | </div> |
679 | <div class="clearfix"></div> | 679 | <div class="clearfix"></div> |
680 | <br> | 680 | <br> |
681 | <div class="col-xs-12"> | 681 | <div class="col-xs-12"> |
682 | <div class="col-md-6"> | 682 | <div class="col-md-6"> |
683 | <div class="pull-left" style="width: 110px;"> | 683 | <div class="pull-left" style="width: 110px;"> |
684 | <label class="new-input-label"><b>Aircraft</b></label> | 684 | <label class="new-input-label"><b>Aircraft</b></label> |
685 | </div> | 685 | </div> |
686 | <div class="pull-left" style="width: calc(100% - 110px);"> | 686 | <div class="pull-left" style="width: calc(100% - 110px);"> |
687 | <select class="form-control" ng-model="order.aircraftName" required> | 687 | <select class="form-control" ng-model="order.aircraftName" required> |
688 | <option selected disabled value="">Select Aircraft</option> | 688 | <option selected disabled value="">Select Aircraft</option> |
689 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 689 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
690 | </select> | 690 | </select> |
691 | </div> | 691 | </div> |
692 | <div class="clearfix"></div> | 692 | <div class="clearfix"></div> |
693 | </div> | 693 | </div> |
694 | <div class="col-md-6"> | 694 | <div class="col-md-6"> |
695 | <div class="pull-left" style="width: 110px;"> | 695 | <div class="pull-left" style="width: 110px;"> |
696 | <label class="new-input-label"><b>Requested Volume</b></label> | 696 | <label class="new-input-label"><b>Requested Volume</b></label> |
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" ng-model="order.volume" class="form-control" required> | 699 | <input type="text" ng-model="order.volume" class="form-control" required> |
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> | 704 | <div class="clearfix"></div> |
705 | <br/> | 705 | <br/> |
706 | <div class="col-xs-12"> | 706 | <div class="col-xs-12"> |
707 | <div class="pull-left" style="width: 110px;"> | 707 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Price Quote</b></label> | 708 | <label class="new-input-label"><b>Price Quote</b></label> |
709 | </div> | 709 | </div> |
710 | <div class="pull-left" style="width: calc(100% - 110px);"> | 710 | <div class="pull-left" style="width: calc(100% - 110px);"> |
711 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> | 711 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> |
712 | <option value="" selected disabled>Select Price Quote</option> | 712 | <option value="" selected disabled>Select Price Quote</option> |
713 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> | 713 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> |
714 | </select> | 714 | </select> |
715 | </div> | 715 | </div> |
716 | <div class="clearfix"></div> | 716 | <div class="clearfix"></div> |
717 | </div> | 717 | </div> |
718 | <div class="clearfix"></div> | 718 | <div class="clearfix"></div> |
719 | <br/> | 719 | <br/> |
720 | <div class="col-xs-12"> | 720 | <div class="col-xs-12"> |
721 | <div class="pull-left" style="width: 110px;"> | 721 | <div class="pull-left" style="width: 110px;"> |
722 | <label class="new-input-label"><b>Tier Break</b></label> | 722 | <label class="new-input-label"><b>Tier Break</b></label> |
723 | </div> | 723 | </div> |
724 | <div class="pull-left" style="width: calc(100% - 110px);"> | 724 | <div class="pull-left" style="width: calc(100% - 110px);"> |
725 | <select class="form-control" ng-model="order.tierBreak"> | 725 | <select class="form-control" ng-model="order.tierBreak"> |
726 | <option value="" selected disabled>Select Tier Break</option> | 726 | <option value="" selected disabled>Select Tier Break</option> |
727 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> | 727 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> |
728 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} | 728 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} |
729 | </option> | 729 | </option> |
730 | </select> | 730 | </select> |
731 | </div> | 731 | </div> |
732 | <div class="clearfix"></div> | 732 | <div class="clearfix"></div> |
733 | </div> | 733 | </div> |
734 | <div class="clearfix"></div> | 734 | <div class="clearfix"></div> |
735 | <br/> | 735 | <br/> |
736 | <div class="col-xs-12"> | 736 | <div class="col-xs-12"> |
737 | <div class="pull-left" style="width: 110px;"> | 737 | <div class="pull-left" style="width: 110px;"> |
738 | <label class="new-input-label"><b>Uplift Date</b></label> | 738 | <label class="new-input-label"><b>Uplift Date</b></label> |
739 | </div> | 739 | </div> |
740 | <div class="pull-left" style="width: calc(100% - 110px);"> | 740 | <div class="pull-left" style="width: calc(100% - 110px);"> |
741 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> | 741 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> |
742 | </div> | 742 | </div> |
743 | <div class="clearfix"></div> | 743 | <div class="clearfix"></div> |
744 | </div> | 744 | </div> |
745 | <div class="clearfix"></div> | 745 | <div class="clearfix"></div> |
746 | <br/> | 746 | <br/> |
747 | </div> | 747 | </div> |
748 | </div> | 748 | </div> |
749 | <div class="clearfix"></div> | 749 | <div class="clearfix"></div> |
750 | </div> | 750 | </div> |
751 | </div> | 751 | </div> |
752 | </div> | 752 | </div> |
753 | </div> | 753 | </div> |
754 | 754 | ||
755 | <div class="modal-footer" style="border-top: 0;"> | 755 | <div class="modal-footer" style="border-top: 0;"> |
756 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 756 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
757 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> | 757 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> |
758 | </div> | 758 | </div> |
759 | </div> | 759 | </div> |
760 | </div> | 760 | </div> |
761 | </div> | 761 | </div> |
762 | </form> | 762 | </form> |
763 | <div class="clearfix"></div> | 763 | <div class="clearfix"></div> |
764 | 764 | ||
765 | 765 | ||
766 | 766 | ||
767 | 767 | ||
768 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | 768 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> |
769 | <div class="modal-dialog modal-lg"> | 769 | <div class="modal-dialog modal-lg"> |
770 | <div class="modal-content"> | 770 | <div class="modal-content"> |
771 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 771 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
772 | <div> | 772 | <div> |
773 | <div class="row" style="margin: 0;"> | 773 | <div class="row" style="margin: 0;"> |
774 | <div> | 774 | <div> |
775 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 775 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
776 | <div class="widget-header"> | 776 | <div class="widget-header"> |
777 | <i class="icon-pencil"></i> | 777 | <i class="icon-pencil"></i> |
778 | <i class="fa fa-tasks" aria-hidden="true"></i> | 778 | <i class="fa fa-tasks" aria-hidden="true"></i> |
779 | <h3>Add a New Aircraft</h3> | 779 | <h3>Add a New Aircraft kd</h3> |
780 | <div class="clearfix"></div> | 780 | <div class="clearfix"></div> |
781 | </div> | 781 | </div> |
782 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 782 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
783 | <div class="col-xs-12"> | 783 | <div class="col-xs-12"> |
784 | <div class="widget-header"> | 784 | <div class="widget-header"> |
785 | <i class="fa fa-list"></i> | 785 | <i class="fa fa-list"></i> |
786 | <h3>Aircraft List</h3> | 786 | <h3>Aircraft List</h3> |
787 | </div> | 787 | </div> |
788 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | 788 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> |
789 | <div class="table-responsive"> | 789 | <div class="table-responsive"> |
790 | <table class="table table-striped table-bordered"> | 790 | <table class="table table-striped table-bordered"> |
791 | <thead> | 791 | <thead> |
792 | <tr> | 792 | <tr> |
793 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 793 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
794 | <th>Tail</th> | 794 | <th>Tail</th> |
795 | <th>Make</th> | 795 | <th>Make</th> |
796 | <th>Model</th> | 796 | <th>Model</th> |
797 | <th>Size</th> | 797 | <th>Size</th> |
798 | <th>JET A Margin</th> | 798 | <th>JET A Margin</th> |
799 | <th>AVGS 100LL Margin</th> | 799 | <th>AVGS 100LL Margin</th> |
800 | </tr> | 800 | </tr> |
801 | </thead> | 801 | </thead> |
802 | <tbody> | 802 | <tbody> |
803 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 803 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
804 | <!-- <td> | 804 | <!-- <td> |
805 | <input type="checkbox" ng-model="aircraftData.selected"/> | 805 | <input type="checkbox" ng-model="aircraftData.selected"/> |
806 | </td> --> | 806 | </td> --> |
807 | <!-- <td style="width: 15%"> | 807 | <!-- <td style="width: 15%"> |
808 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 808 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
809 | </td> --> | 809 | </td> --> |
810 | <td style="width: 15%"> | 810 | <td style="width: 15%"> |
811 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> | 811 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> |
812 | </td> | 812 | </td> |
813 | <td style="width: 17%"> | 813 | <td style="width: 17%"> |
814 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> | 814 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> |
815 | <option value="" disabled>Select</option> | 815 | <option value="" disabled>Select</option> |
816 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 816 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
817 | </select> | 817 | </select> |
818 | </td> | 818 | </td> |
819 | <td style="width: 17%"> | 819 | <td style="width: 17%"> |
820 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 820 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
821 | <option value="" disabled>Select</option> | 821 | <option value="" disabled>Select</option> |
822 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 822 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
823 | </select> | 823 | </select> |
824 | </td> | 824 | </td> |
825 | <td style="width: 17%"> | 825 | <td style="width: 17%"> |
826 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> | 826 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> |
827 | <option value="" disabled>Select</option> | 827 | <option value="" disabled>Select</option> |
828 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> | 828 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> |
829 | </select> | 829 | </select> |
830 | </td> | 830 | </td> |
831 | <td style="width: 17%"> | 831 | <td style="width: 17%"> |
832 | 832 | ||
833 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 833 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
834 | <option value="" disabled>Select</option> | 834 | <option value="" disabled>Select</option> |
835 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 835 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
836 | </select> | 836 | </select> |
837 | 837 | ||
838 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> | 838 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> |
839 | 839 | ||
840 | <option value="" disabled>Select...</option> | 840 | <option value="" disabled>Select...</option> |
841 | </select> --> | 841 | </select> --> |
842 | 842 | ||
843 | </td> | 843 | </td> |
844 | <td style="width: 17%"> | 844 | <td style="width: 17%"> |
845 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 845 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
846 | <option value="" disabled>Select</option> | 846 | <option value="" disabled>Select</option> |
847 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 847 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
848 | </select> | 848 | </select> |
849 | 849 | ||
850 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> | 850 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> |
851 | <option value="" disabled>Select...</option> | 851 | <option value="" disabled>Select...</option> |
852 | </select> --> | 852 | </select> --> |
853 | </td> | 853 | </td> |
854 | </tr> | 854 | </tr> |
855 | </tbody> | 855 | </tbody> |
856 | </table> | 856 | </table> |
857 | </div> | 857 | </div> |
858 | <div class="clearfix"></div> | 858 | <div class="clearfix"></div> |
859 | </div> | 859 | </div> |
860 | </div> | 860 | </div> |
861 | <div class="clearfix"></div> | 861 | <div class="clearfix"></div> |
862 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 862 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
863 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> | 863 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> |
864 | </div> | 864 | </div> |
865 | </div> | 865 | </div> |
866 | </div> | 866 | </div> |
867 | <div class="clearfix"></div> | 867 | <div class="clearfix"></div> |
868 | </div> | 868 | </div> |
869 | </div> | 869 | </div> |
870 | </div> | 870 | </div> |
871 | </div> | 871 | </div> |
872 | 872 | ||
873 | <div class="modal-footer" style="border-top: 0;"> | 873 | <div class="modal-footer" style="border-top: 0;"> |
874 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 874 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
875 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> | 875 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> |
876 | </div> | 876 | </div> |
877 | </div> | 877 | </div> |
878 | </div> | 878 | </div> |
879 | </form> | 879 | </form> |
880 | <div class="customConfirmPopBackdrop" id="fuelerchange" > | 880 | <div class="customConfirmPopBackdrop" id="fuelerchange" > |
881 | <div class="customModalInner" style="max-width: 550px;"> | 881 | <div class="customModalInner" style="max-width: 550px;"> |
882 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 882 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
883 | <table> | 883 | <table> |
884 | <tr> | 884 | <tr> |
885 | <td> | 885 | <td> |
886 | <img src="img/info.png" style="width: 50px;"> | 886 | <img src="img/info.png" style="width: 50px;"> |
887 | </td> | 887 | </td> |
888 | <td> | 888 | <td> |
889 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 889 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
890 | </td> | 890 | </td> |
891 | </tr> | 891 | </tr> |
892 | </table> | 892 | </table> |
893 | </div> | 893 | </div> |
894 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 894 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
895 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> | 895 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> |
896 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> | 896 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> |
897 | </div> | 897 | </div> |
898 | </div> | 898 | </div> |
899 | </div> | 899 | </div> |
900 | <div class="customConfirmPopBackdrop" id="confirm1"> | 900 | <div class="customConfirmPopBackdrop" id="confirm1"> |
901 | <div class="customModalInner" style="max-width: 400px;"> | 901 | <div class="customModalInner" style="max-width: 400px;"> |
902 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 902 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
903 | <table> | 903 | <table> |
904 | <tr> | 904 | <tr> |
905 | <td> | 905 | <td> |
906 | <img src="img/info.png" style="width: 50px;"> | 906 | <img src="img/info.png" style="width: 50px;"> |
907 | </td> | 907 | </td> |
908 | <td> | 908 | <td> |
909 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 909 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
910 | </td> | 910 | </td> |
911 | </tr> | 911 | </tr> |
912 | </table> | 912 | </table> |
913 | </div> | 913 | </div> |
914 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 914 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
915 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> | 915 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> |
916 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 916 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
917 | </div> | 917 | </div> |
918 | </div> | 918 | </div> |
919 | </div> | 919 | </div> |
920 | <div class="customConfirmPopBackdrop" id="primaryContact"> | 920 | <div class="customConfirmPopBackdrop" id="primaryContact"> |
921 | <div class="customModalInner" style="max-width: 400px;"> | 921 | <div class="customModalInner" style="max-width: 400px;"> |
922 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 922 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
923 | <table> | 923 | <table> |
924 | <tr> | 924 | <tr> |
925 | <td> | 925 | <td> |
926 | <img src="img/info.png" style="width: 50px;"> | 926 | <img src="img/info.png" style="width: 50px;"> |
927 | </td> | 927 | </td> |
928 | <td> | 928 | <td> |
929 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> | 929 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> |
930 | </td> | 930 | </td> |
931 | </tr> | 931 | </tr> |
932 | </table> | 932 | </table> |
933 | </div> | 933 | </div> |
934 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 934 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
935 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> | 935 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> |
936 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> | 936 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> |
937 | </div> | 937 | </div> |
938 | </div> | 938 | </div> |
939 | </div> | 939 | </div> |
940 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> | 940 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> |
941 | <div class="customModalInner" style="max-width: 400px;"> | 941 | <div class="customModalInner" style="max-width: 400px;"> |
942 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 942 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
943 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 943 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
944 | <div class="col-md-10"> | 944 | <div class="col-md-10"> |
945 | <form> | 945 | <form> |
946 | Email Type:<br> | 946 | Email Type:<br> |
947 | <input type="text" name="firstname" ng-model="custom.title"><br> | 947 | <input type="text" name="firstname" ng-model="custom.title"><br> |
948 | Email-Address:<br> | 948 | Email-Address:<br> |
949 | <input type="text" name="lastname" ng-model="custom.content"> | 949 | <input type="text" name="lastname" ng-model="custom.content"> |
950 | </form> | 950 | </form> |
951 | </div> | 951 | </div> |
952 | <div class="clearfix"></div> | 952 | <div class="clearfix"></div> |
953 | </div> | 953 | </div> |
954 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 954 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
955 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> | 955 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> |
956 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 956 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
957 | </div> | 957 | </div> |
958 | </div> | 958 | </div> |
959 | </div> | 959 | </div> |
960 | 960 | ||
961 | 961 | ||
962 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> | 962 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> |
963 | <div class="customModalInner" style="max-width: 400px;"> | 963 | <div class="customModalInner" style="max-width: 400px;"> |
964 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 964 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
965 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 965 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
966 | <div class="col-md-10"> | 966 | <div class="col-md-10"> |
967 | <form> | 967 | <form> |
968 | Phone Type:<br> | 968 | Phone Type:<br> |
969 | <input type="text" name="firstname" ng-model="custom.title"><br> | 969 | <input type="text" name="firstname" ng-model="custom.title"><br> |
970 | Number:<br> | 970 | Number:<br> |
971 | <input type="text" name="lastname" ng-model="custom.content"> | 971 | <input type="text" name="lastname" ng-model="custom.content"> |
972 | </form> | 972 | </form> |
973 | </div> | 973 | </div> |
974 | <div class="clearfix"></div> | 974 | <div class="clearfix"></div> |
975 | </div> | 975 | </div> |
976 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 976 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
977 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> | 977 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> |
978 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 978 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
979 | </div> | 979 | </div> |
980 | </div> | 980 | </div> |
981 | </div> | 981 | </div> |
982 | 982 | ||
983 | 983 | ||
984 | <div class="customConfirmPopBackdrop" id="updateContact"> | 984 | <div class="customConfirmPopBackdrop" id="updateContact"> |
985 | <div class="customModalInner" style="max-width: 400px;"> | 985 | <div class="customModalInner" style="max-width: 400px;"> |
986 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 986 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
987 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 987 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
988 | <div class="col-md-10"> | 988 | <div class="col-md-10"> |
989 | <form> | 989 | <form> |
990 | Phone Type:<br> | 990 | Phone Type:<br> |
991 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 991 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
992 | Number:<br> | 992 | Number:<br> |
993 | <input type="text" name="lastname" ng-model="updateData.content"> | 993 | <input type="text" name="lastname" ng-model="updateData.content"> |
994 | </form> | 994 | </form> |
995 | </div> | 995 | </div> |
996 | <div class="clearfix"></div> | 996 | <div class="clearfix"></div> |
997 | </div> | 997 | </div> |
998 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 998 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
999 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> | 999 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> |
1000 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1000 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1001 | </div> | 1001 | </div> |
1002 | </div> | 1002 | </div> |
1003 | </div> | 1003 | </div> |
1004 | 1004 | ||
1005 | <div class="customConfirmPopBackdrop" id="updateEmail"> | 1005 | <div class="customConfirmPopBackdrop" id="updateEmail"> |
1006 | <div class="customModalInner" style="max-width: 400px;"> | 1006 | <div class="customModalInner" style="max-width: 400px;"> |
1007 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1007 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1008 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1008 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
1009 | <div class="col-md-10"> | 1009 | <div class="col-md-10"> |
1010 | <form> | 1010 | <form> |
1011 | Email Type:<br> | 1011 | Email Type:<br> |
1012 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 1012 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
1013 | Email-Address:<br> | 1013 | Email-Address:<br> |
1014 | <input type="text" name="lastname" ng-model="updateData.content"> | 1014 | <input type="text" name="lastname" ng-model="updateData.content"> |
1015 | </form> | 1015 | </form> |
1016 | </div> | 1016 | </div> |
1017 | <div class="clearfix"></div> | 1017 | <div class="clearfix"></div> |
1018 | </div> | 1018 | </div> |
1019 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1019 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1020 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> | 1020 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> |
1021 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1021 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1022 | </div> | 1022 | </div> |
1023 | </div> | 1023 | </div> |
1024 | </div> | 1024 | </div> |
1025 | 1025 | ||
1026 | 1026 | ||
1027 | <div class="customConfirmPopBackdrop" id="delete1"> | 1027 | <div class="customConfirmPopBackdrop" id="delete1"> |
1028 | <div class="customModalInner" style="max-width: 400px;"> | 1028 | <div class="customModalInner" style="max-width: 400px;"> |
1029 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1029 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1030 | <table> | 1030 | <table> |
1031 | <tr> | 1031 | <tr> |
1032 | <td> | 1032 | <td> |
1033 | <img src="img/info.png" style="width: 50px;"> | 1033 | <img src="img/info.png" style="width: 50px;"> |
1034 | </td> | 1034 | </td> |
1035 | <td> | 1035 | <td> |
1036 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> | 1036 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> |
1037 | </td> | 1037 | </td> |
1038 | </tr> | 1038 | </tr> |
1039 | </table> | 1039 | </table> |
1040 | </div> | 1040 | </div> |
1041 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1041 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1042 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> | 1042 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> |
1043 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1043 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1044 | </div> | 1044 | </div> |
1045 | </div> | 1045 | </div> |
1046 | </div> | 1046 | </div> |
1047 | <div class="customConfirmPopBackdrop" id="delete2"> | 1047 | <div class="customConfirmPopBackdrop" id="delete2"> |
1048 | <div class="customModalInner" style="max-width: 400px;"> | 1048 | <div class="customModalInner" style="max-width: 400px;"> |
1049 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1049 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1050 | <table> | 1050 | <table> |
1051 | <tr> | 1051 | <tr> |
1052 | <td> | 1052 | <td> |
1053 | <img src="img/info.png" style="width: 50px;"> | 1053 | <img src="img/info.png" style="width: 50px;"> |
1054 | </td> | 1054 | </td> |
1055 | <td> | 1055 | <td> |
1056 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> | 1056 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> |
1057 | </td> | 1057 | </td> |
1058 | </tr> | 1058 | </tr> |
1059 | </table> | 1059 | </table> |
1060 | </div> | 1060 | </div> |
1061 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1061 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1062 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> | 1062 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> |
1063 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1063 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1064 | </div> | 1064 | </div> |
1065 | </div> | 1065 | </div> |
1066 | </div> | 1066 | </div> |
1067 | 1067 | ||
1068 | <div class="customConfirmPopBackdrop" id="delete3"> | 1068 | <div class="customConfirmPopBackdrop" id="delete3"> |
1069 | <div class="customModalInner" style="max-width: 400px;"> | 1069 | <div class="customModalInner" style="max-width: 400px;"> |
1070 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1070 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1071 | <table> | 1071 | <table> |
1072 | <tr> | 1072 | <tr> |
1073 | <td> | 1073 | <td> |
1074 | <img src="img/info.png" style="width: 50px;"> | 1074 | <img src="img/info.png" style="width: 50px;"> |
1075 | </td> | 1075 | </td> |
1076 | <td> | 1076 | <td> |
1077 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 1077 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
1078 | </td> | 1078 | </td> |
1079 | </tr> | 1079 | </tr> |
1080 | </table> | 1080 | </table> |
1081 | </div> | 1081 | </div> |
1082 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1082 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1083 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> | 1083 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> |
1084 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> | 1084 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> |
1085 | </div> | 1085 | </div> |
1086 | </div> | 1086 | </div> |
1087 | </div> | 1087 | </div> |
1088 | <div class="customConfirmPopBackdrop" id="toogleMail"> | 1088 | <div class="customConfirmPopBackdrop" id="toogleMail"> |
1089 | <div class="customModalInner" style="max-width: 400px;"> | 1089 | <div class="customModalInner" style="max-width: 400px;"> |
1090 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1090 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1091 | <table> | 1091 | <table> |
1092 | <tr> | 1092 | <tr> |
1093 | <!-- <td> | 1093 | <!-- <td> |
1094 | <img src="" style="width: 50px;"> | 1094 | <img src="" style="width: 50px;"> |
1095 | </td> --> | 1095 | </td> --> |
1096 | <td> | 1096 | <td> |
1097 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> | 1097 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> |
1098 | </td> | 1098 | </td> |
1099 | </tr> | 1099 | </tr> |
1100 | </table> | 1100 | </table> |
1101 | </div> | 1101 | </div> |
1102 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1102 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1103 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> | 1103 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> |
1104 | </div> | 1104 | </div> |
1105 | </div> | 1105 | </div> |
1106 | </div> | 1106 | </div> |
1107 | 1107 | ||
1108 | 1108 | ||
1109 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> | 1109 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> |
1110 | <div class="customModalInner" style="max-width: 400px;"> | 1110 | <div class="customModalInner" style="max-width: 400px;"> |
1111 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1111 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1112 | <table> | 1112 | <table> |
1113 | <tr> | 1113 | <tr> |
1114 | <td> | 1114 | <td> |
1115 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1115 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1116 | </td> | 1116 | </td> |
1117 | </tr> | 1117 | </tr> |
1118 | </table> | 1118 | </table> |
1119 | </div> | 1119 | </div> |
1120 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1120 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1121 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> | 1121 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> |
1122 | </div> | 1122 | </div> |
1123 | </div> | 1123 | </div> |
1124 | </div> | 1124 | </div> |
1125 | 1125 | ||
1126 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> | 1126 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> |
1127 | <div class="customModalInner" style="max-width: 400px;"> | 1127 | <div class="customModalInner" style="max-width: 400px;"> |
1128 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1128 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1129 | <table> | 1129 | <table> |
1130 | <tr> | 1130 | <tr> |
1131 | <td> | 1131 | <td> |
1132 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1132 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1133 | </td> | 1133 | </td> |
1134 | </tr> | 1134 | </tr> |
1135 | </table> | 1135 | </table> |
1136 | </div> | 1136 | </div> |
1137 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1137 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1138 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> | 1138 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> |
1139 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> | 1139 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> |
1140 | </div> | 1140 | </div> |
1141 | </div> | 1141 | </div> |
1142 | </div> | 1142 | </div> |
1143 | 1143 | ||
1144 | <div class="myLoader" ng-show="showLoader"> | 1144 | <div class="myLoader" ng-show="showLoader"> |
1145 | <img src="../img/hourglass.gif" width="50px;"> | 1145 | <img src="../img/hourglass.gif" width="50px;"> |
1146 | </div> | 1146 | </div> |
1147 | 1147 | ||
1148 | <!-- Le javascript | 1148 | <!-- Le javascript |
1149 | ================================================== --> | 1149 | ================================================== --> |
1150 | <!-- Placed at the end of the document so the pages load faster --> | 1150 | <!-- Placed at the end of the document so the pages load faster --> |
1151 | <!-- <script | 1151 | <!-- <script |
1152 | CKEDITOR.replace( 'editor2', { | 1152 | CKEDITOR.replace( 'editor2', { |
1153 | height: 250, | 1153 | height: 250, |
1154 | extraPlugins: 'divarea' | 1154 | extraPlugins: 'divarea' |
1155 | } ); | 1155 | } ); |
1156 | </script> --> | 1156 | </script> --> |
1157 | 1157 |