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