Commit 169fc146e9143f76fb1e5b4720f7642e76a98eb8

Authored by Kuldeep Arora
1 parent 1b4bc24a75
Exists in master

final omit ui

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