Commit 88abaa681d190af2c08b66e89033703359cabe36

Authored by Kuldeep Arora
1 parent d1e8d9afb3
Exists in master

size auto-populate fixed under company

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