Commit 359303f5328008312b1a6bbea2b00fdfdbaf41b1

Authored by Kuldeep Arora
1 parent ea94f521f2
Exists in master

Adding company/aircrafts -#87uwt(testing)

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