Commit 0f34b879815e734bcc3d4d4f5c96e82c8f5ae921
1 parent
ac6104d510
Exists in
master
desing and implementation for fulerlinx fboinsights preffered
Showing
5 changed files
with
576 additions
and
475 deletions
Show diff stats
app/partials/analytics/analytics.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | angular.module('acufuel') | 2 | angular.module('acufuel') |
3 | .controller('analyticsController', ['$scope', 'analyticsService', function($scope, analyticsService) { | 3 | .controller('analyticsController', ['$scope', 'analyticsService', function($scope, analyticsService) { |
4 | 4 | ||
5 | 5 | ||
6 | // Sand Signika Overview without drill down -KD | 6 | // Sand Signika Overview without drill down -KD |
7 | /* $scope.getAllRegionalPap = function() { | 7 | /* $scope.getAllRegionalPap = function() { |
8 | $scope.flag=true; | 8 | $scope.flag=true; |
9 | $scope.stateList = [{region:'Alabama',code:'AL'},{region:'Alaska',code:'AK'},{region:'Arizona',code:'AZ'},{region:'Arkansas',code:'AR'}, | 9 | $scope.stateList = [{region:'Alabama',code:'AL'},{region:'Alaska',code:'AK'},{region:'Arizona',code:'AZ'},{region:'Arkansas',code:'AR'}, |
10 | {region:'California',code:'CA' },{region:'Colorado',code:'CO'},{region:'Connecticut',code:'CT'},{region:'Delaware',code:'DE'}, | 10 | {region:'California',code:'CA' },{region:'Colorado',code:'CO'},{region:'Connecticut',code:'CT'},{region:'Delaware',code:'DE'}, |
11 | {region:'Florida' ,code:'FL'},{region:'Georgia' ,code:'GA'},{region:'Hawaii' ,code:'HI'},{region:'Idaho' ,code:'ID'}, | 11 | {region:'Florida' ,code:'FL'},{region:'Georgia' ,code:'GA'},{region:'Hawaii' ,code:'HI'},{region:'Idaho' ,code:'ID'}, |
12 | {region:'Illinois',code:'IL'},{region:'Indiana' ,code:'IN'},{region:'Iowa' ,code:'IA'},{region:'Kansas' ,code:'KS'}, | 12 | {region:'Illinois',code:'IL'},{region:'Indiana' ,code:'IN'},{region:'Iowa' ,code:'IA'},{region:'Kansas' ,code:'KS'}, |
13 | {region:'Kentucky' ,code:'KY'},{region:'Louisiana' ,code:'LA'},{region:'Maine' ,code:'ME'},{region:'Maryland' ,code:'MD'}, | 13 | {region:'Kentucky' ,code:'KY'},{region:'Louisiana' ,code:'LA'},{region:'Maine' ,code:'ME'},{region:'Maryland' ,code:'MD'}, |
14 | {region:'Massachusetts' ,code:'MA'},{region:'Michigan' ,code:'MI'},{region:'Minnesota' ,code:'MN'}, | 14 | {region:'Massachusetts' ,code:'MA'},{region:'Michigan' ,code:'MI'},{region:'Minnesota' ,code:'MN'}, |
15 | {region:'Mississippi' ,code:'MS'},{region:'Missouri' ,code:'MO'},{region:'Montana',code:'MT'},{region:'Nebraska' ,code:'NE'}, | 15 | {region:'Mississippi' ,code:'MS'},{region:'Missouri' ,code:'MO'},{region:'Montana',code:'MT'},{region:'Nebraska' ,code:'NE'}, |
16 | {region:'Nevada' ,code:'NV'},{region:'New Hampshire' ,code:'NH'},{region:'New Jersey' ,code:'NJ'},{region:'New Mexico' ,code:'NM'}, | 16 | {region:'Nevada' ,code:'NV'},{region:'New Hampshire' ,code:'NH'},{region:'New Jersey' ,code:'NJ'},{region:'New Mexico' ,code:'NM'}, |
17 | {region:'New York' ,code:'NY'},{region:'North Carolina' ,code:'NC'},{region:'North Dakota' ,code:'ND'},{region:'Ohio' ,code:'OH'}, | 17 | {region:'New York' ,code:'NY'},{region:'North Carolina' ,code:'NC'},{region:'North Dakota' ,code:'ND'},{region:'Ohio' ,code:'OH'}, |
18 | {region:'Oklahoma' ,code:'OK'},{region:'Oregon' ,code:'OR'},{region:'Pennsylvania',code:'PA'},{region:'Rhode Island' ,code:'RI'}, | 18 | {region:'Oklahoma' ,code:'OK'},{region:'Oregon' ,code:'OR'},{region:'Pennsylvania',code:'PA'},{region:'Rhode Island' ,code:'RI'}, |
19 | {region:'South Carolina' ,code:'SC'},{region:'South Dakota' ,code:'SD'},{region:'Tennessee' ,code:'TN'},{region:'Texas' ,code:'TX'}, | 19 | {region:'South Carolina' ,code:'SC'},{region:'South Dakota' ,code:'SD'},{region:'Tennessee' ,code:'TN'},{region:'Texas' ,code:'TX'}, |
20 | {region:'Utah' ,code:'UT'},{region:'Vermont' ,code:'VT'},{region:'Virginia' ,code:'VA'},{region:'Washington' ,code:'WA'}, | 20 | {region:'Utah' ,code:'UT'},{region:'Vermont' ,code:'VT'},{region:'Virginia' ,code:'VA'},{region:'Washington' ,code:'WA'}, |
21 | {region:'West Virginia' ,code:'WV'},{region:'Wisconsin' ,code:'WI'},{region:'Wyoming',code:'WY'}] | 21 | {region:'West Virginia' ,code:'WV'},{region:'Wisconsin' ,code:'WI'},{region:'Wyoming',code:'WY'}] |
22 | 22 | ||
23 | analyticsService.getAllRPP().then(function(result) { | 23 | analyticsService.getAllRPP().then(function(result) { |
24 | for (var i = 0; i < $scope.stateList.length; i++) { | 24 | for (var i = 0; i < $scope.stateList.length; i++) { |
25 | for (var j = 0; j<result.length; j++){ | 25 | for (var j = 0; j<result.length; j++){ |
26 | if ($scope.stateList[i].region === result[j].region) { | 26 | if ($scope.stateList[i].region === result[j].region) { |
27 | result[j].code = $scope.stateList[i].code; | 27 | result[j].code = $scope.stateList[i].code; |
28 | result[j].averagePAP = result[j].averagePAP.toFixed(2); | 28 | result[j].averagePAP = result[j].averagePAP.toFixed(2); |
29 | } | 29 | } |
30 | } | 30 | } |
31 | } | 31 | } |
32 | $scope.flag=false; | 32 | $scope.flag=false; |
33 | // Instantiate the map | 33 | // Instantiate the map |
34 | Highcharts.mapChart('regional-pap', { | 34 | Highcharts.mapChart('regional-pap', { |
35 | 35 | ||
36 | chart: { | 36 | chart: { |
37 | map: 'countries/us/us-all', | 37 | map: 'countries/us/us-all', |
38 | borderWidth: 1, | 38 | borderWidth: 1, |
39 | }, | 39 | }, |
40 | |||
41 | title: { | ||
42 | text: 'Regional PAP' | ||
43 | }, | ||
44 | |||
45 | exporting: { | ||
46 | sourceWidth: 600, | ||
47 | sourceHeight: 500 | ||
48 | }, | ||
49 | |||
50 | legend: { | ||
51 | layout: 'vertical', | ||
52 | borderWidth: 0, | ||
53 | backgroundColor: 'rgba(255,255,255,0.85)', | ||
54 | floating: true, | ||
55 | width:'12px', | ||
56 | height:'200px', | ||
57 | verticalAlign: 'bottom', | ||
58 | y: 0, | ||
59 | x: -230, | ||
60 | }, | ||
61 | |||
62 | mapNavigation: { | ||
63 | enabled: true | ||
64 | }, | ||
65 | 40 | ||
66 | colorAxis: { | 41 | title: { |
67 | min: 1, | 42 | text: 'Regional PAP' |
68 | type: 'logarithmic', | ||
69 | minColor: '#2b908f', | ||
70 | maxColor: '#000022', | ||
71 | stops: [ | ||
72 | [0, '#EFEFFF'], | ||
73 | [5, '#f45b5b'], | ||
74 | [10, 'rgb(117,0,0)'] | ||
75 | ] | ||
76 | }, | 43 | }, |
77 | 44 | ||
78 | series: [{ | 45 | exporting: { |
79 | animation: { | 46 | sourceWidth: 600, |
80 | duration: 1000 | 47 | sourceHeight: 500 |
81 | }, | 48 | }, |
82 | data: result, | ||
83 | joinBy: ['postal-code', 'code'], | ||
84 | dataLabels: { | ||
85 | enabled: true, | ||
86 | color: '#FFFFFF', | ||
87 | format: '{point.code}' | ||
88 | }, | ||
89 | name: 'Data' , | ||
90 | tooltip: { | ||
91 | pointFormat: '{point.region} : {point.averagePAP}' | ||
92 | }, | ||
93 | }] | ||
94 | }); | ||
95 | }) | ||
96 | } | ||
97 | 49 | ||
98 | $scope.getAllRegionalPap();*/ | 50 | legend: { |
51 | layout: 'vertical', | ||
52 | borderWidth: 0, | ||
53 | backgroundColor: 'rgba(255,255,255,0.85)', | ||
54 | floating: true, | ||
55 | width:'12px', | ||
56 | height:'200px', | ||
57 | verticalAlign: 'bottom', | ||
58 | y: 0, | ||
59 | x: -230, | ||
60 | }, | ||
99 | 61 | ||
100 | 62 | mapNavigation: { | |
101 | //Implemented drill down chart and Now used this on 07 Sep 2018 -KD | 63 | enabled: true |
64 | }, | ||
102 | 65 | ||
103 | /* | 66 | colorAxis: { |
104 | TODO: | 67 | min: 1, |
105 | - Check data labels after drilling. Label rank? New positions? | 68 | type: 'logarithmic', |
106 | */ | 69 | minColor: '#2b908f', |
107 | $scope.getAllRegionalPapDrilldown = function() { | 70 | maxColor: '#000022', |
108 | $scope.flag=true;//for spinner | 71 | stops: [ |
72 | [0, '#EFEFFF'], | ||
73 | [5, '#f45b5b'], | ||
74 | [10, 'rgb(117,0,0)'] | ||
75 | ] | ||
76 | }, | ||
77 | |||
78 | series: [{ | ||
79 | animation: { | ||
80 | duration: 1000 | ||
81 | }, | ||
82 | data: result, | ||
83 | joinBy: ['postal-code', 'code'], | ||
84 | dataLabels: { | ||
85 | enabled: true, | ||
86 | color: '#FFFFFF', | ||
87 | format: '{point.code}' | ||
88 | }, | ||
89 | name: 'Data' , | ||
90 | tooltip: { | ||
91 | pointFormat: '{point.region} : {point.averagePAP}' | ||
92 | }, | ||
93 | }] | ||
94 | }); | ||
95 | }) | ||
96 | } | ||
97 | |||
98 | $scope.getAllRegionalPap();*/ | ||
99 | |||
100 | |||
101 | //Implemented drill down chart and Now used this on 07 Sep 2018 -KD | ||
102 | |||
103 | /* | ||
104 | TODO: | ||
105 | - Check data labels after drilling. Label rank? New positions? | ||
106 | */ | ||
107 | $scope.getAllRegionalPapDrilldown = function() { | ||
108 | $scope.flag = true; //for spinner | ||
109 | var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); | 109 | var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); |
110 | var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); | 110 | var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); |
111 | // Some responsiveness | 111 | // Some responsiveness |
112 | //var small = $('#container').width() < 400; | 112 | //var small = $('#container').width() < 400; |
113 | 113 | ||
114 | analyticsService.getAllRPP().then(function(result) { | 114 | analyticsService.getAllRPP().then(function(result) { |
115 | for (var i = 0; i < data.length; i++) { | 115 | for (var i = 0; i < data.length; i++) { |
116 | for (var j = 0; j<result.length; j++){ | 116 | for (var j = 0; j < result.length; j++) { |
117 | if (data[i].name === result[j].region) { | 117 | if (data[i].name === result[j].region) { |
118 | |||
119 | data[i].value = result[j].averagePAP.toFixed(2); | ||
120 | |||
121 | } | ||
122 | } | ||
123 | |||
124 | } | ||
125 | 118 | ||
126 | $.each(data, function (i) { | 119 | data[i].value = result[j].averagePAP.toFixed(2); |
127 | this.drilldown = this.properties['hc-key']; | ||
128 | this.value = this.value; | ||
129 | }); | ||
130 | |||
131 | $scope.flag=false; | ||
132 | // Instantiate the map | ||
133 | Highcharts.mapChart('container', { | ||
134 | chart: { | ||
135 | events: { | ||
136 | drilldown: function (e) { | ||
137 | if (!e.seriesOptions) { | ||
138 | var chart = this, | ||
139 | mapKey = 'countries/us/' + e.point.drilldown + '-all', | ||
140 | |||
141 | // Handle error, the timeout is cleared on success | ||
142 | fail = setTimeout(function () { | ||
143 | if (!Highcharts.maps[mapKey]) { | ||
144 | chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name); | ||
145 | fail = setTimeout(function () { | ||
146 | chart.hideLoading(); | ||
147 | }, 1000); | ||
148 | } | ||
149 | }, 3000); | ||
150 | |||
151 | // Show the spinner | ||
152 | chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner | ||
153 | |||
154 | // Load the drilldown map | ||
155 | $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function () { | ||
156 | 120 | ||
157 | var region = e.point.name; | 121 | } |
158 | //called the get api region wise | 122 | } |
159 | analyticsService.getRPP(region).then(function(result) { | ||
160 | 123 | ||
161 | console.log("===region====",region,"====result====",result) | 124 | } |
162 | data = Highcharts.geojson(Highcharts.maps[mapKey]); | ||
163 | 125 | ||
164 | for (var i = 0; i < data.length; i++) { | 126 | $.each(data, function(i) { |
165 | for (var j = 0; j<result.length; j++){ | 127 | this.drilldown = this.properties['hc-key']; |
166 | 128 | this.value = this.value; | |
167 | //delete the County word from api result to match with map data | 129 | }); |
168 | result[j].region = result[j].region.replace("County",""); | ||
169 | 130 | ||
170 | if (data[i].name.trim() === result[j].region.trim()) { | 131 | $scope.flag = false; |
171 | 132 | // Instantiate the map | |
133 | Highcharts.mapChart('container', { | ||
134 | chart: { | ||
135 | events: { | ||
136 | drilldown: function(e) { | ||
137 | if (!e.seriesOptions) { | ||
138 | var chart = this, | ||
139 | mapKey = 'countries/us/' + e.point.drilldown + '-all', | ||
140 | |||
141 | // Handle error, the timeout is cleared on success | ||
142 | fail = setTimeout(function() { | ||
143 | if (!Highcharts.maps[mapKey]) { | ||
144 | chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name); | ||
145 | fail = setTimeout(function() { | ||
146 | chart.hideLoading(); | ||
147 | }, 10000); | ||
148 | } | ||
149 | }, 3000); | ||
150 | |||
151 | // Show the spinner | ||
152 | chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner | ||
153 | |||
154 | // Load the drilldown map | ||
155 | var region = e.point.name; | ||
156 | analyticsService.getRPP(region).then(function(result) { | ||
157 | $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function() { | ||
158 | //called the get api region wise | ||
159 | data = Highcharts.geojson(Highcharts.maps[mapKey]); | ||
160 | for (var i = 0; i < data.length; i++) { | ||
161 | for (var j = 0; j < result.length; j++) { | ||
162 | |||
163 | //delete the County word from api result to match with map data | ||
164 | result[j].region = result[j].region.replace("County", ""); | ||
165 | |||
166 | if (data[i].name.trim() === result[j].region.trim()) { | ||
167 | |||
172 | data[i].value = result[j].averagePAP.toFixed(2); | 168 | data[i].value = result[j].averagePAP.toFixed(2); |
173 | 169 | ||
174 | } | 170 | } |
175 | } | 171 | } |
176 | 172 | ||
177 | } | 173 | } |
178 | }) | 174 | // Set a non-random bogus value |
179 | 175 | $.each(data, function(i) { | |
180 | // Set a non-random bogus value | 176 | this.value = this.value; |
181 | 177 | }); | |
182 | $.each(data, function (i) { | 178 | // Hide loading and add series |
183 | this.value = this.value; | 179 | chart.hideLoading(); |
184 | }); | 180 | clearTimeout(fail); |
185 | 181 | chart.addSeriesAsDrilldown(e.point, { | |
186 | // Hide loading and add series | 182 | name: e.point.name, |
187 | chart.hideLoading(); | 183 | data: data, |
188 | clearTimeout(fail); | 184 | dataLabels: { |
189 | chart.addSeriesAsDrilldown(e.point, { | 185 | enabled: true, |
190 | name: e.point.name, | 186 | format: '{point.name}' |
191 | data: data, | 187 | } |
192 | dataLabels: { | 188 | }); |
193 | enabled: true, | 189 | }); |
194 | format: '{point.name}' | 190 | }) |
195 | } | 191 | } |
196 | }); | 192 | |
193 | this.setTitle(null, { | ||
194 | text: e.point.name | ||
195 | }); | ||
196 | }, | ||
197 | drillup: function() { | ||
198 | this.setTitle(null, { | ||
199 | text: '' | ||
197 | }); | 200 | }); |
198 | } | 201 | } |
199 | |||
200 | this.setTitle(null, { text: e.point.name }); | ||
201 | }, | ||
202 | drillup: function () { | ||
203 | this.setTitle(null, { text: '' }); | ||
204 | } | 202 | } |
205 | } | 203 | }, |
206 | }, | ||
207 | |||
208 | title: { | ||
209 | text: 'USA Map-Drilldown for Regional Pricing' | ||
210 | }, | ||
211 | |||
212 | subtitle: { | ||
213 | text: '', | ||
214 | floating: true, | ||
215 | align: 'right', | ||
216 | y: 50, | ||
217 | style: { | ||
218 | fontSize: '16px' | ||
219 | } | ||
220 | }, | ||
221 | |||
222 | /* legend: small ? {} : { | ||
223 | layout: 'vertical', | ||
224 | align: 'right', | ||
225 | verticalAlign: 'middle' | ||
226 | }, | ||
227 | |||
228 | colorAxis: { | ||
229 | min: 0, | ||
230 | minColor: '#E6E7E8', | ||
231 | maxColor: '#005645' | ||
232 | },*/ | ||
233 | |||
234 | mapNavigation: { | ||
235 | enabled: true, | ||
236 | buttonOptions: { | ||
237 | verticalAlign: 'bottom' | ||
238 | } | ||
239 | }, | ||
240 | 204 | ||
241 | plotOptions: { | 205 | title: { |
242 | map: { | 206 | text: 'USA Map-Drilldown for Regional Pricing' |
243 | states: { | 207 | }, |
244 | hover: { | 208 | |
245 | color: '#EEDD66' | 209 | subtitle: { |
246 | } | 210 | text: '', |
211 | floating: true, | ||
212 | align: 'right', | ||
213 | y: 50, | ||
214 | style: { | ||
215 | fontSize: '16px' | ||
247 | } | 216 | } |
248 | } | 217 | }, |
249 | }, | 218 | |
219 | /* legend: small ? {} : { | ||
220 | layout: 'vertical', | ||
221 | align: 'right', | ||
222 | verticalAlign: 'middle' | ||
223 | }, | ||
224 | |||
225 | colorAxis: { | ||
226 | min: 0, | ||
227 | minColor: '#E6E7E8', | ||
228 | maxColor: '#005645' | ||
229 | },*/ | ||
250 | 230 | ||
251 | series: [{ | 231 | mapNavigation: { |
252 | data: data, | ||
253 | name: 'USA', | ||
254 | dataLabels: { | ||
255 | enabled: true, | 232 | enabled: true, |
256 | format: '{point.properties.postal-code}' | 233 | buttonOptions: { |
257 | } | 234 | verticalAlign: 'bottom' |
258 | }, { | 235 | } |
259 | type: 'mapline', | 236 | }, |
260 | data: separators, | ||
261 | color: 'silver', | ||
262 | enableMouseTracking: false, | ||
263 | animation: { | ||
264 | duration: 500 | ||
265 | } | ||
266 | }], | ||
267 | 237 | ||
268 | drilldown: { | 238 | plotOptions: { |
269 | activeDataLabelStyle: { | 239 | map: { |
270 | color: '#FFFFFF', | 240 | states: { |
271 | textDecoration: 'none', | 241 | hover: { |
272 | textOutline: '1px #000000' | 242 | color: '#EEDD66' |
243 | } | ||
244 | } | ||
245 | } | ||
273 | }, | 246 | }, |
274 | drillUpButton: { | 247 | |
275 | relativeTo: 'spacingBox', | 248 | series: [{ |
276 | position: { | 249 | data: data, |
277 | x: 0, | 250 | name: 'USA', |
278 | y: 60 | 251 | dataLabels: { |
252 | enabled: true, | ||
253 | format: '{point.properties.postal-code}' | ||
254 | } | ||
255 | }, { | ||
256 | type: 'mapline', | ||
257 | data: separators, | ||
258 | color: 'silver', | ||
259 | enableMouseTracking: false, | ||
260 | animation: { | ||
261 | duration: 500 | ||
262 | } | ||
263 | }], | ||
264 | |||
265 | drilldown: { | ||
266 | activeDataLabelStyle: { | ||
267 | color: '#FFFFFF', | ||
268 | textDecoration: 'none', | ||
269 | textOutline: '1px #000000' | ||
270 | }, | ||
271 | drillUpButton: { | ||
272 | relativeTo: 'spacingBox', | ||
273 | position: { | ||
274 | x: 0, | ||
275 | y: 60 | ||
276 | } | ||
279 | } | 277 | } |
280 | } | 278 | } |
281 | } | 279 | }); |
280 | }) | ||
281 | } | ||
282 | |||
283 | $scope.getAllRegionalPapDrilldown(); | ||
284 | |||
285 | |||
286 | /*$(document).ready(function() { | ||
287 | $(function() { | ||
288 | jQuery('#map').vectorMap({ | ||
289 | map: 'us_lcc', | ||
290 | backgroundColor: '#ffce99', | ||
291 | color: '#dfdfdd', | ||
292 | hoverOpacity: 0, | ||
293 | selectedColor: '#5f8b98', | ||
294 | hoverColor: '#5f8b98', | ||
295 | enableZoom: true, | ||
296 | showTooltip: true, | ||
297 | scaleColors: ['#dfdfdd'], | ||
298 | //values: sample_data | ||
299 | onRegionClick: function(event, code) { | ||
300 | var map = $('#map').vectorMap('get', 'mapObject'); | ||
301 | var name = map.getRegionName(code); | ||
302 | getRegionPap(name); | ||
303 | }, | ||
304 | normalizeFunction: 'polynomial' | ||
305 | }); | ||
282 | }); | 306 | }); |
283 | }) | 307 | }) |
284 | } | ||
285 | 308 | ||
286 | $scope.getAllRegionalPapDrilldown(); | ||
287 | 309 | ||
288 | 310 | ||
311 | function getRegionPap(code) { | ||
312 | $scope.showLoader = true; | ||
313 | analyticsService.getRPP(code).then(function(result) { | ||
314 | $scope.rppData = result; | ||
315 | $scope.showLoader = false; | ||
316 | $('#popup1').css('display', 'block'); | ||
317 | }) | ||
318 | }*/ | ||
319 | |||
320 | |||
289 | $scope.cancelStatus = function() { | 321 | $scope.cancelStatus = function() { |
290 | $('#popup1').css('display', 'none'); | 322 | $('#popup1').css('display', 'none'); |
291 | } | 323 | } |
292 | $scope.ordersCost = 0; | 324 | $scope.ordersCost = 0; |
293 | $scope.ordersCount = 0; | 325 | $scope.ordersCount = 0; |
294 | 326 | ||
295 | $scope.orderCostAndCount = function() { | 327 | $scope.orderCostAndCount = function() { |
296 | analyticsService.orderCostAndCount().then(function(result) { | 328 | analyticsService.orderCostAndCount().then(function(result) { |
297 | $scope.ordersCost = result.cost; | 329 | $scope.ordersCost = result.cost; |
298 | $scope.ordersCount = result.count; | 330 | $scope.ordersCount = result.count; |
299 | }) | 331 | }) |
300 | } | 332 | } |
301 | 333 | ||
302 | $scope.drf = {}; | 334 | $scope.drf = {}; |
303 | $scope.hfp = {}; | 335 | $scope.hfp = {}; |
304 | $scope.cs = {}; | 336 | $scope.cs = {}; |
305 | $scope.mfsValues = []; | 337 | $scope.mfsValues = []; |
306 | $scope.msfarray = []; | 338 | $scope.msfarray = []; |
307 | $scope.getMFS = function() { | 339 | $scope.getMFS = function() { |
308 | //var makeId = makeId; | 340 | //var makeId = makeId; |
309 | analyticsService.getMFS().then(function(result) { | 341 | analyticsService.getMFS().then(function(result) { |
310 | $scope.mfsValues = result; | 342 | $scope.mfsValues = result; |
311 | $scope.optionsmfs = { | 343 | $scope.optionsmfs = { |
312 | chart: { | 344 | chart: { |
313 | type: 'multiBarChart', | 345 | type: 'multiBarChart', |
314 | height: 450, | 346 | height: 450, |
315 | reduceXTicks: false, | ||
316 | margin: { | 347 | margin: { |
317 | top: 45, | 348 | top: 45, |
318 | right: 20, | 349 | right: 20, |
319 | bottom: 45, | 350 | bottom: 45, |
320 | left: 45 | 351 | left: 45 |
321 | }, | 352 | }, |
322 | clipEdge: true, | 353 | clipEdge: true, |
323 | //staggerLabels: true, | 354 | //staggerLabels: true, |
324 | duration: 500, | 355 | duration: 500, |
325 | stacked: false, | 356 | stacked: false, |
326 | /*color: ["#FEDFC3", "#990000", "#000099", "#009900"],*/ | 357 | color: ["#FEDFC3", "#990000", "#000099", "#009900"], |
327 | color: ["#A9A9A9", "#000099", "#990000", "#009900"], | ||
328 | xAxis: { | 358 | xAxis: { |
329 | axisLabel: 'Months', | 359 | axisLabel: 'Months', |
330 | showMaxMin: false, | 360 | showMaxMin: false, |
331 | }, | 361 | }, |
332 | yAxis: { | 362 | yAxis: { |
333 | axisLabel: 'Orders', | 363 | axisLabel: 'Orders', |
334 | axisLabelDistance: -20, | 364 | axisLabelDistance: -20, |
335 | tickFormat: function(d) { | 365 | tickFormat: function(d) { |
336 | return d3.format(',.1f')(d); | 366 | return d3.format(',.1f')(d); |
337 | } | 367 | } |
338 | } | 368 | } |
339 | |||
340 | } | 369 | } |
341 | }; | 370 | }; |
342 | $scope.datamfs = $scope.mfsValues; | 371 | $scope.datamfs = $scope.mfsValues; |
343 | }) | 372 | }) |
344 | } | 373 | } |
345 | 374 | ||
346 | $scope.orderCostAndCount(); | 375 | $scope.orderCostAndCount(); |
347 | $scope.getMFS(); | 376 | $scope.getMFS(); |
348 | $scope.csValues = []; | 377 | $scope.csValues = []; |
349 | $scope.getCS = function() { | 378 | $scope.getCS = function() { |
350 | //var makeId = makeId; | 379 | //var makeId = makeId; |
351 | analyticsService.getCS().then(function(result) { | 380 | analyticsService.getCS().then(function(result) { |
352 | //console.log("===customersupports===",result) | ||
353 | $scope.csValues = result; | 381 | $scope.csValues = result; |
354 | $scope.optionscs = { | 382 | $scope.optionscs = { |
355 | chart: { | 383 | chart: { |
356 | type: 'pieChart', | 384 | type: 'pieChart', |
357 | height: 500, | 385 | height: 500, |
358 | // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], | 386 | // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], |
359 | x: function(d) { | 387 | x: function(d) { |
360 | return d.key; | 388 | return d.key; |
361 | }, | 389 | }, |
362 | y: function(d) { | 390 | y: function(d) { |
363 | return d.y; | 391 | return d.y; |
364 | }, | 392 | }, |
365 | showLabels: false, | 393 | showLabels: false, |
366 | segmentShowStroke: false, | 394 | segmentShowStroke: false, |
367 | animationSteps: 20, | 395 | animationSteps: 20, |
368 | animationEasing: "linear", | 396 | animationEasing: "linear", |
369 | animateScale: true, | 397 | animateScale: true, |
370 | duration: 500, | 398 | duration: 500, |
371 | labelThreshold: 0.01, | 399 | labelThreshold: 0.01, |
372 | labelSunbeamLayout: true, | 400 | labelSunbeamLayout: true, |
373 | legend: { | 401 | legend: { |
374 | margin: { | 402 | margin: { |
375 | top: 5, | 403 | top: 5, |
376 | right: 35, | 404 | right: 35, |
377 | bottom: 5, | 405 | bottom: 5, |
378 | left: 0 | 406 | left: 0 |
379 | } | 407 | } |
380 | } | 408 | } |
381 | } | 409 | } |
382 | }; | 410 | }; |
383 | $scope.datacs = $scope.csValues; | 411 | $scope.datacs = $scope.csValues; |
384 | }) | 412 | }) |
385 | } | 413 | } |
386 | 414 | ||
387 | $scope.getCS(); | 415 | $scope.getCS(); |
388 | 416 | ||
389 | 417 | ||
390 | $scope.hfpValuesOne = {}; | 418 | $scope.hfpValues = []; |
391 | $scope.hfpValuesOne.key = "JET-A Full Service"; | ||
392 | $scope.hfpValuesOne.values = []; | ||
393 | |||
394 | $scope.hfpValuesTwo = {}; | ||
395 | $scope.hfpValuesTwo.key = "100LL Full Service"; | ||
396 | $scope.hfpValuesTwo.values = []; | ||
397 | |||
398 | $scope.hfpFinalData = []; | ||
399 | |||
400 | $scope.getHfpChartData = function() { | 419 | $scope.getHfpChartData = function() { |
420 | //var makeId = makeId; | ||
401 | analyticsService.gethfpChart().then(function(result) { | 421 | analyticsService.gethfpChart().then(function(result) { |
402 | for(var i=0; i<result.length; i++) { | 422 | $scope.hfpValues = result; |
403 | if(result[i].includes("JET-A Full Service") ){ | 423 | //console.log('---kd result--',$scope.hfpValues); |
404 | let datePusha = result[i][0]; | ||
405 | let tempValue = result[i][1].toFixed(2); | ||
406 | let valePusha = parseFloat(tempValue); | ||
407 | $scope.hfpValuesOne.values.push([datePusha, valePusha]) | ||
408 | }else if(result[i].includes("100LL Full Service") ) { | ||
409 | let datePushb = result[i][0]; | ||
410 | let tempvalePushb = result[i][1].toFixed(2); | ||
411 | let valePushb = parseFloat(tempvalePushb); | ||
412 | $scope.hfpValuesTwo.values.push([datePushb, valePushb]) | ||
413 | } | ||
414 | } | ||
415 | $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo); | ||
416 | // console.log('$scope.hfpFinalData', $scope.hfpFinalData); | ||
417 | |||
418 | var chart = nv.models.lineChart() | ||
419 | .x(function(d) { return d[0] }) | ||
420 | //adjusting, 100% is 1.00, not 100 as it is in the data | ||
421 | .y(function(d) { return d[1]}) | ||
422 | .color(d3.scale.category10().range()) | ||
423 | .useInteractiveGuideline(true) | ||
424 | ; | ||
425 | |||
426 | chart.xAxis | ||
427 | .tickFormat(function(d) { | ||
428 | return d3.time.format('%x')(new Date(d)) | ||
429 | }); | ||
430 | |||
431 | chart.yAxis | ||
432 | .axisLabel("PaP / Retail Price") | ||
433 | .axisLabelDistance(-5) | ||
434 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | ||
435 | |||
436 | d3.select('#chart svg') | ||
437 | .datum($scope.hfpFinalData) | ||
438 | .transition().duration(500) | ||
439 | .call(chart) | ||
440 | ; | ||
441 | |||
442 | nv.utils.windowResize(chart.update); | ||
443 | |||
444 | return chart; | ||
445 | }); | ||
446 | } | ||
447 | $scope.getHfpChartData(); | ||
448 | 424 | ||
449 | /*Date Range Filter for Historic fuel Price*/ | 425 | /*Historic Fuel Price */ |
450 | $scope.submitDateHfp = function() { | 426 | |
427 | $scope.optionshfp = { | ||
428 | chart: { | ||
429 | type: 'cumulativeLineChart', | ||
430 | height: 450, | ||
431 | margin: { | ||
432 | top: 40, | ||
433 | right: 20, | ||
434 | bottom: 50, | ||
435 | left: 65 | ||
436 | }, | ||
437 | x: function(d) { | ||
438 | return d[0]; | ||
439 | }, | ||
440 | y: function(d) { | ||
441 | return d[1] / 100; | ||
442 | }, | ||
443 | average: function(d) { | ||
444 | return d.mean / 100; | ||
445 | }, | ||
446 | |||
447 | color: ["#FEDFC3"], | ||
448 | duration: 300, | ||
449 | useInteractiveGuideline: true, | ||
450 | clipVoronoi: false, | ||
451 | |||
452 | xAxis: { | ||
453 | axisLabel: '', | ||
454 | |||
455 | tickFormat: function(d) { | ||
456 | return d3.time.format('%m/%d/%y')(new Date(d)) | ||
457 | //return d3.time.format('%b \-%y')(new Date(d)) | ||
458 | }, | ||
459 | showMaxMin: false, | ||
460 | staggerLabels: true | ||
461 | }, | ||
451 | 462 | ||
452 | $scope.hfpValuesFirst = {}; | 463 | yAxis: { |
453 | $scope.hfpValuesFirst.key = "JET-A Full Service"; | 464 | axisLabel: 'PaP/Retail Price', |
454 | $scope.hfpValuesFirst.values = []; | ||
455 | 465 | ||
456 | $scope.hfpValuesSecond = {}; | 466 | tickFormat: function(d) { |
457 | $scope.hfpValuesSecond.key = "100LL Full Service"; | 467 | //return d3.format('')(d).toFixed(2); |
458 | $scope.hfpValuesSecond.values = []; | 468 | return '$ ' + d.toFixed(2) |
469 | }, | ||
470 | axisLabelDistance: 5 | ||
471 | } | ||
472 | } | ||
473 | }; | ||
474 | $scope.datahfp = [{ | ||
475 | key: "Long", | ||
476 | values: $scope.hfpValues, | ||
477 | mean: 0 | ||
478 | }]; | ||
459 | 479 | ||
460 | $scope.hfpRangeData = []; | 480 | }) |
481 | } | ||
461 | 482 | ||
462 | if ($scope.hfp.fromDate === undefined) { | 483 | $scope.getHfpChartData(); |
463 | 484 | ||
485 | |||
486 | /*Date Range Filter for Monthly fuel Sales*/ | ||
487 | $scope.submitDate = function() { | ||
488 | if ($scope.drf.fromDate === undefined) { | ||
464 | $scope.fillForm = true; | 489 | $scope.fillForm = true; |
465 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { | 490 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') { |
466 | $scope.fillForm = false; | 491 | $scope.fillForm = false; |
467 | var today = new Date(); | 492 | var today = new Date(); |
468 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59'; | 493 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); |
469 | //from date format | 494 | //from date format |
470 | $scope.dat1 = $scope.hfp.fromDate; | 495 | $scope.dat1 = $scope.drf.fromDate; |
471 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 496 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
472 | $scope.tmp = $scope.fd1[2]; | 497 | $scope.tmp = $scope.fd1[2]; |
473 | $scope.fd1[2] = $scope.fd1[1]; | 498 | $scope.fd1[2] = $scope.fd1[1]; |
474 | $scope.fd1[1] = $scope.tmp; | 499 | $scope.fd1[1] = $scope.tmp; |
475 | $scope.fd = $scope.fd1.join("-"); | 500 | $scope.fd = $scope.fd1.join("-"); |
476 | // console.log("===date====",$scope.fd,"===dad====",DefaultToDate) | 501 | analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) { |
477 | analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { | 502 | $scope.datamfs = []; |
478 | // console.log("===date range===",$scope.fd,DefaultToDate) | 503 | $scope.datamfs = result; |
479 | for(var i=0; i<result.length; i++) { | ||
480 | if(result[i].includes("JET-A Full Service") ){ | ||
481 | let datePusha = result[i][0]; | ||
482 | let tempValue = result[i][1].toFixed(2); | ||
483 | let valePusha = parseFloat(tempValue); | ||
484 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) | ||
485 | }else if(result[i].includes("100LL Full Service") ) { | ||
486 | let datePushb = result[i][0]; | ||
487 | let tempvalePushb = result[i][1].toFixed(2); | ||
488 | let valePushb = parseFloat(tempvalePushb); | ||
489 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) | ||
490 | } | ||
491 | } | ||
492 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); | ||
493 | //console.log('$scope.hfpRangeData', $scope.hfpRangeData); | ||
494 | |||
495 | var chart = nv.models.lineChart() | ||
496 | .x(function(d) { if(d.length >0){return d[0]}}) | ||
497 | //adjusting, 100% is 1.00, not 100 as it is in the data | ||
498 | .y(function(d) { return d[1]}) | ||
499 | .color(d3.scale.category10().range()) | ||
500 | .useInteractiveGuideline(true) | ||
501 | ; | ||
502 | |||
503 | chart.xAxis | ||
504 | .tickFormat(function(d) { | ||
505 | return d3.time.format('%x')(new Date(d)) | ||
506 | }); | ||
507 | |||
508 | chart.yAxis | ||
509 | .axisLabel("PaP / Retail Price") | ||
510 | .axisLabelDistance(-5) | ||
511 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | ||
512 | |||
513 | d3.select('#chart svg') | ||
514 | .datum($scope.hfpRangeData) | ||
515 | .transition().duration(500) | ||
516 | .call(chart) | ||
517 | ; | ||
518 | |||
519 | nv.utils.windowResize(chart.update); | ||
520 | |||
521 | return chart; | ||
522 | }) | 504 | }) |
523 | 505 | ||
524 | 506 | analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) { | |
525 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) { | 507 | $scope.ordersCost = result.cost; |
508 | $scope.ordersCount = result.count; | ||
509 | }) | ||
510 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) { | ||
526 | $scope.fillForm = false; | 511 | $scope.fillForm = false; |
527 | //from date format | 512 | //from date format |
528 | $scope.dat1 = $scope.hfp.fromDate; | 513 | $scope.dat1 = $scope.drf.fromDate; |
529 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 514 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
530 | $scope.tmp = $scope.fd1[2]; | 515 | $scope.tmp = $scope.fd1[2]; |
531 | $scope.fd1[2] = $scope.fd1[1]; | 516 | $scope.fd1[2] = $scope.fd1[1]; |
532 | $scope.fd1[1] = $scope.tmp; | 517 | $scope.fd1[1] = $scope.tmp; |
533 | $scope.fd = $scope.fd1.join("-"); | 518 | $scope.fd = $scope.fd1.join("-"); |
534 | //to date format | 519 | $scope.dat2 = $scope.drf.toDate; |
535 | $scope.dat2 = $scope.hfp.toDate; | ||
536 | $scope.td1 = $scope.dat2.split("/").reverse(); | 520 | $scope.td1 = $scope.dat2.split("/").reverse(); |
537 | $scope.tmp1 = $scope.td1[2]; | 521 | $scope.tmp1 = $scope.td1[2]; |
538 | $scope.td1[2] = $scope.td1[1]; | 522 | $scope.td1[2] = $scope.td1[1]; |
539 | $scope.td1[1] = $scope.tmp1; | 523 | $scope.td1[1] = $scope.tmp1; |
540 | $scope.td = $scope.td1.join("-") + " " + '23:59:59'; | 524 | $scope.td = $scope.td1.join("-"); |
541 | // console.log("===both dates==",$scope.td) | 525 | |
542 | analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { | 526 | analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) { |
543 | //console.log("===date range22===",result); | 527 | $scope.datamfs = []; |
544 | for(var i=0; i<result.length; i++) { | 528 | $scope.datamfs = result; |
545 | if(result[i].includes("JET-A Full Service") ){ | 529 | }) |
546 | let datePusha = result[i][0]; | 530 | |
547 | let tempValue = result[i][1].toFixed(2); | 531 | analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) { |
548 | let valePusha = parseFloat(tempValue); | 532 | $scope.ordersCost = result.cost; |
549 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) | 533 | $scope.ordersCount = result.count; |
550 | }else if(result[i].includes("100LL Full Service") ) { | ||
551 | let datePushb = result[i][0]; | ||
552 | let tempvalePushb = result[i][1].toFixed(2); | ||
553 | let valePushb = parseFloat(tempvalePushb); | ||
554 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) | ||
555 | } | ||
556 | } | ||
557 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); | ||
558 | // console.log('$scope.hfpRangeData', $scope.hfpRangeData); | ||
559 | |||
560 | var chart = nv.models.lineChart() | ||
561 | .x(function(d) { if(d.length >0){return d[0] }}) | ||
562 | //adjusting, 100% is 1.00, not 100 as it is in the data | ||
563 | .y(function(d) { return d[1]}) | ||
564 | .color(d3.scale.category10().range()) | ||
565 | .useInteractiveGuideline(true) | ||
566 | ; | ||
567 | |||
568 | chart.xAxis | ||
569 | .tickFormat(function(d) { | ||
570 | return d3.time.format('%x')(new Date(d)) | ||
571 | }); | ||
572 | |||
573 | chart.yAxis | ||
574 | .axisLabel("PaP / Retail Price") | ||
575 | .axisLabelDistance(-5) | ||
576 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | ||
577 | |||
578 | d3.select('#chart svg') | ||
579 | .datum($scope.hfpRangeData) | ||
580 | .transition().duration(500) | ||
581 | .call(chart) | ||
582 | ; | ||
583 | |||
584 | nv.utils.windowResize(chart.update); |
app/partials/analytics/analytics.service.js
1 | (function(){ | 1 | (function(){ |
2 | 'use strict'; | 2 | 'use strict'; |
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | .service('analyticsService', ['$q', '$http', 'BASE_URL',analyticsService]); | 4 | .service('analyticsService', ['$q', '$http', 'BASE_URL',analyticsService]); |
5 | 5 | ||
6 | function analyticsService($q, $http, BASE_URL) { | 6 | function analyticsService($q, $http, BASE_URL) { |
7 | var temp = {}; | 7 | var temp = {}; |
8 | 8 | ||
9 | 9 | ||
10 | this.getMFS = function(){ | 10 | this.getMFS = function(){ |
11 | var deferred = $q.defer(); | 11 | var deferred = $q.defer(); |
12 | $http({ | 12 | $http({ |
13 | method : 'GET', | 13 | method : 'GET', |
14 | url : BASE_URL.url + '/fuelOrder/analytics' | 14 | url : BASE_URL.url + '/fuelOrder/analytics' |
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 | console.log(result) | 19 | console.log(result) |
20 | deferred.resolve(result.data); | 20 | deferred.resolve(result.data); |
21 | }) | 21 | }) |
22 | return deferred.promise; | 22 | return deferred.promise; |
23 | } | 23 | } |
24 | 24 | ||
25 | this.orderCostAndCount = function(){ | 25 | this.orderCostAndCount = function(){ |
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 +'/fuelOrder/export/mfs' | 29 | // url : BASE_URL.url +'/fuelOrder/export/mfs' |
30 | url : BASE_URL.url + '/fuelOrder/orderCostAndCount' | 30 | url : BASE_URL.url + '/fuelOrder/orderCostAndCount' |
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 | console.log(result) | 35 | console.log(result) |
36 | deferred.resolve(result.data); | 36 | deferred.resolve(result.data); |
37 | }) | 37 | }) |
38 | return deferred.promise; | 38 | return deferred.promise; |
39 | } | 39 | } |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | this.getCS = function(){ | 43 | this.getCS = function(){ |
44 | var deferred = $q.defer(); | 44 | var deferred = $q.defer(); |
45 | $http({ | 45 | $http({ |
46 | method : 'GET', | 46 | method : 'GET', |
47 | url : BASE_URL.url +'/user/sources' | 47 | url : BASE_URL.url +'/user/sources' |
48 | }) | 48 | }) |
49 | .then(function (result){ | 49 | .then(function (result){ |
50 | deferred.resolve(result.data); | 50 | deferred.resolve(result.data); |
51 | },function (result){ | 51 | },function (result){ |
52 | console.log(result) | 52 | console.log(result) |
53 | deferred.resolve(result.data); | 53 | deferred.resolve(result.data); |
54 | }) | 54 | }) |
55 | return deferred.promise; | 55 | return deferred.promise; |
56 | } | 56 | } |
57 | 57 | ||
58 | /* With region Code */ | 58 | /* With region Code */ |
59 | /*this.getRPP = function(code){ | ||
60 | var deferred = $q.defer(); | ||
61 | $http({ | ||
62 | method : 'GET', | ||
63 | url : BASE_URL.url +'/fuelerlinx/getAircrafts/'+code | ||
64 | }) | ||
65 | .then(function (result){ | ||
66 | deferred.resolve(result.data); | ||
67 | },function (result){ | ||
68 | console.log(result) | ||
69 | deferred.resolve(result.data); | ||
70 | }) | ||
71 | return deferred.promise; | ||
72 | }*/ | ||
73 | |||
74 | this.getRPP = function(code){ | 59 | this.getRPP = function(code){ |
75 | var deferred = $q.defer(); | 60 | var deferred = $q.defer(); |
76 | $http({ | 61 | $http({ |
77 | method : 'GET', | 62 | method : 'GET', |
78 | url : BASE_URL.url +'/fuelerlinx/getCompleteRegionalPap/'+code | 63 | url : BASE_URL.url +'/fuelerlinx/getAircrafts/'+code |
79 | }) | 64 | }) |
80 | .then(function (result){ | 65 | .then(function (result){ |
81 | deferred.resolve(result.data); | 66 | deferred.resolve(result.data); |
82 | },function (result){ | 67 | },function (result){ |
83 | console.log(result) | 68 | console.log(result) |
84 | deferred.resolve(result.data); | 69 | deferred.resolve(result.data); |
85 | }) | 70 | }) |
86 | return deferred.promise; | 71 | return deferred.promise; |
87 | } | 72 | } |
73 | |||
74 | // this.getRPP = function(code){ | ||
75 | // var deferred = $q.defer(); | ||
76 | // $http({ | ||
77 | // method : 'GET', | ||
78 | // url : BASE_URL.url +'/fuelerlinx/getCompleteRegionalPap/'+code | ||
79 | // }) | ||
80 | // .then(function (result){ | ||
81 | // deferred.resolve(result.data); | ||
82 | // },function (result){ | ||
83 | // console.log(result) | ||
84 | // deferred.resolve(result.data); | ||
85 | // }) | ||
86 | // return deferred.promise; | ||
87 | // } | ||
88 | 88 | ||
89 | 89 | ||
90 | /* without region code */ | 90 | /* without region code */ |
91 | this.getAllRPP = function(){ | 91 | this.getAllRPP = function(){ |
92 | var deferred = $q.defer(); | 92 | var deferred = $q.defer(); |
93 | $http({ | 93 | $http({ |
94 | method : 'GET', | 94 | method : 'GET', |
95 | url : BASE_URL.url +'/fuelerlinx/getAllRegionalPap' | 95 | url : BASE_URL.url +'/fuelerlinx/getAllRegionalPap' |
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 | console.log(result) | 100 | console.log(result) |
101 | deferred.resolve(result.data); | 101 | deferred.resolve(result.data); |
102 | }) | 102 | }) |
103 | return deferred.promise; | 103 | return deferred.promise; |
104 | } | 104 | } |
105 | 105 | ||
106 | /*---date filter for Monthly fuel sales chart - dates are sending to the api */ | 106 | /*---date filter for Monthly fuel sales chart - dates are sending to the api */ |
107 | this.getDRFChart = function(fd,td){ | 107 | this.getDRFChart = function(fd,td){ |
108 | var deferred = $q.defer(); | 108 | var deferred = $q.defer(); |
109 | $http({ | 109 | $http({ |
110 | method : 'GET', | 110 | method : 'GET', |
111 | url : BASE_URL.url + '/fuelOrder/filterchart?fromDate='+fd+'&toDate='+td+'' | 111 | url : BASE_URL.url + '/fuelOrder/filterchart?fromDate='+fd+'&toDate='+td+'' |
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 | console.log(result) | 116 | console.log(result) |
117 | deferred.resolve(result.data); | 117 | deferred.resolve(result.data); |
118 | }) | 118 | }) |
119 | return deferred.promise; | 119 | return deferred.promise; |
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||
123 | this.orderCostAndCountByDate = function(fd,td){ | 123 | this.orderCostAndCountByDate = function(fd,td){ |
124 | var deferred = $q.defer(); | 124 | var deferred = $q.defer(); |
125 | $http({ | 125 | $http({ |
126 | method : 'GET', | 126 | method : 'GET', |
127 | url : BASE_URL.url + '/fuelOrder/orderCostAndCountByDate?fromDate='+fd+'&toDate='+td+'' | 127 | url : BASE_URL.url + '/fuelOrder/orderCostAndCountByDate?fromDate='+fd+'&toDate='+td+'' |
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 | console.log(result) | 132 | console.log(result) |
133 | deferred.resolve(result.data); | 133 | deferred.resolve(result.data); |
134 | }) | 134 | }) |
135 | return deferred.promise; | 135 | return deferred.promise; |
136 | } | 136 | } |
137 | 137 | ||
138 | /*---date filter for Historic Fuel price --- DRF--Date Range Filter */ | 138 | /*---date filter for Historic Fuel price --- DRF--Date Range Filter */ |
139 | this.getDRFHfpChart = function(fd,td){ | 139 | this.getDRFHfpChart = function(fd,td){ |
140 | var deferred = $q.defer(); | 140 | var deferred = $q.defer(); |
141 | $http({ | 141 | $http({ |
142 | method : 'GET', | 142 | method : 'GET', |
143 | url : BASE_URL.url + '/fuelOrder/hfp/filterchart?fromDate='+fd+'&toDate='+td+'' | 143 | url : BASE_URL.url + '/fuelOrder/hfp/filterchart?fromDate='+fd+'&toDate='+td+'' |
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 | console.log(result) | 148 | console.log(result) |
149 | deferred.resolve(result.data); | 149 | deferred.resolve(result.data); |
150 | }) | 150 | }) |
151 | return deferred.promise; | 151 | return deferred.promise; |
152 | } | 152 | } |
153 | 153 | ||
154 | 154 | ||
155 | this.gethfpChart = function(){ | 155 | this.gethfpChart = function(){ |
156 | var deferred = $q.defer(); | 156 | var deferred = $q.defer(); |
157 | $http({ | 157 | $http({ |
158 | method : 'GET', | 158 | method : 'GET', |
159 | url : BASE_URL.url + '/fuelOrder/hfp/' | 159 | url : BASE_URL.url + '/fuelOrder/hfp/' |
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 | console.log(result) | 164 | console.log(result) |
165 | deferred.resolve(result.data); | 165 | deferred.resolve(result.data); |
166 | }) | 166 | }) |
167 | return deferred.promise; | 167 | return deferred.promise; |
168 | } | 168 | } |
169 | 169 | ||
170 | /*---date filter for Customer Sources --- DRF--Date Range Filter */ | 170 | /*---date filter for Customer Sources --- DRF--Date Range Filter */ |
171 | this.getDRFCSChart = function(fd,td){ | 171 | this.getDRFCSChart = function(fd,td){ |
172 | var deferred = $q.defer(); | 172 | var deferred = $q.defer(); |
173 | $http({ | 173 | $http({ |
app/partials/customers/customers.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 | 5 | ||
6 | .button1 { | 6 | .button1 { |
7 | display: inline-block; | 7 | display: inline-block; |
8 | height: 35px; | 8 | height: 35px; |
9 | line-height: 35px; | 9 | line-height: 35px; |
10 | padding-right: 15px; | 10 | padding-right: 15px; |
11 | padding-left: 50px; | 11 | padding-left: 50px; |
12 | position: relative; | 12 | position: relative; |
13 | background-color:rgb(41,127,184); | 13 | background-color:rgb(41,127,184); |
14 | color:rgb(255,255,255); | 14 | color:rgb(255,255,255); |
15 | text-decoration: none; | 15 | text-decoration: none; |
16 | text-transform: uppercase; | 16 | text-transform: uppercase; |
17 | letter-spacing: 1px; | 17 | letter-spacing: 1px; |
18 | margin-bottom: 15px; | 18 | margin-bottom: 15px; |
19 | border: 0; | 19 | border: 0; |
20 | 20 | ||
21 | 21 | ||
22 | border-radius: 5px; | 22 | border-radius: 5px; |
23 | -moz-border-radius: 5px; | 23 | -moz-border-radius: 5px; |
24 | -webkit-border-radius: 5px; | 24 | -webkit-border-radius: 5px; |
25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
28 | 28 | ||
29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
34 | } | 34 | } |
35 | 35 | ||
36 | .button1 span { | 36 | .button1 span { |
37 | position: absolute; | 37 | position: absolute; |
38 | left: 0; | 38 | left: 0; |
39 | top: 0; | 39 | top: 0; |
40 | width: 35px; | 40 | width: 35px; |
41 | background-color:rgba(0,0,0,0.5); | 41 | background-color:rgba(0,0,0,0.5); |
42 | -webkit-border-top-left-radius: 5px; | 42 | -webkit-border-top-left-radius: 5px; |
43 | -webkit-border-bottom-left-radius: 5px; | 43 | -webkit-border-bottom-left-radius: 5px; |
44 | -moz-border-radius-topleft: 5px; | 44 | -moz-border-radius-topleft: 5px; |
45 | -moz-border-radius-bottomleft: 5px; | 45 | -moz-border-radius-bottomleft: 5px; |
46 | border-top-left-radius: 5px; | 46 | border-top-left-radius: 5px; |
47 | border-bottom-left-radius: 5px; | 47 | border-bottom-left-radius: 5px; |
48 | border-right: 1px solid rgba(0,0,0,0.15); | 48 | border-right: 1px solid rgba(0,0,0,0.15); |
49 | } | 49 | } |
50 | 50 | ||
51 | .button1:hover span, .button1.active span { | 51 | .button1:hover span, .button1.active span { |
52 | background-color:rgb(0,102,26); | 52 | background-color:rgb(0,102,26); |
53 | border-right: 1px solid rgba(0,0,0,0.3); | 53 | border-right: 1px solid rgba(0,0,0,0.3); |
54 | } | 54 | } |
55 | 55 | ||
56 | .button1:active { | 56 | .button1:active { |
57 | margin-top: 2px; | 57 | margin-top: 2px; |
58 | margin-bottom: 13px; | 58 | margin-bottom: 13px; |
59 | 59 | ||
60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 60 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 63 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 64 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
65 | } | 65 | } |
66 | 66 | ||
67 | .button1.turquoise { | 67 | .button1.turquoise { |
68 | background: #449d44; | 68 | background: #449d44; |
69 | } | 69 | } |
70 | </style> | 70 | </style> |
71 | <div class="myLoader" ng-show="showLoader"> | 71 | <div class="myLoader" ng-show="showLoader"> |
72 | <img src="../img/hourglass.gif" width="50px;"> | 72 | <img src="../img/hourglass.gif" width="50px;"> |
73 | </div> | 73 | </div> |
74 | 74 | ||
75 | <div class="main"> | 75 | <div class="main"> |
76 | <div class="container"> | 76 | <div class="container"> |
77 | <div class="row"> | 77 | <div class="row"> |
78 | <div class="col-md-12"> | 78 | <div class="col-md-12"> |
79 | <div class="widget stacked "> | 79 | <div class="widget stacked "> |
80 | <div class="widget-content"> | 80 | <div class="widget-content"> |
81 | <div class="tabbable"> | 81 | <div class="tabbable"> |
82 | <ul class="nav nav-tabs"> | 82 | <ul class="nav nav-tabs"> |
83 | <li class="active"> | 83 | <li class="active"> |
84 | <a ui-sref="app.customers">Customer View | 84 | <a ui-sref="app.customers">Customer View |
85 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 85 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
86 | </a> | 86 | </a> |
87 | </li> | 87 | </li> |
88 | <li> | 88 | <li> |
89 | <a ui-sref="app.ContactView">Contact View | 89 | <a ui-sref="app.ContactView">Contact View |
90 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 90 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
91 | </a> | 91 | </a> |
92 | </li> | 92 | </li> |
93 | <li> | 93 | <li> |
94 | <a ui-sref="app.FuelVendors">Fuel Vendors | 94 | <a ui-sref="app.FuelVendors">Fuel Vendors |
95 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 95 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
96 | </a> | 96 | </a> |
97 | </li> | 97 | </li> |
98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> | 98 | <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> |
99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> | 99 | <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> |
100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> | 100 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> |
101 | </ul> | 101 | </ul> |
102 | <br> | 102 | <br> |
103 | <div class="tab-content customer-table" style="margin:0px"> | 103 | <div class="tab-content customer-table" style="margin:0px"> |
104 | <div class="tab-pane active" id="companyView"> | 104 | <div class="tab-pane active" id="companyView"> |
105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> | 105 | <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> |
106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> | 106 | <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> |
107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> | 107 | <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> |
108 | {{row.companyName}} | 108 | <i class="fa fa-search-plus" style="color:red" ng-if="row.fboPreferred == true"></i> {{row.companyName}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> | 110 | <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> |
111 | {{row.companyAircraftSize}} | 111 | {{row.companyAircraftSize}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> | 113 | <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> |
114 | {{row.newContactNumber}} | 114 | {{row.newContactNumber}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> | 116 | <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> |
117 | {{row.primaryContactName}} | 117 | {{row.primaryContactName}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> | 119 | <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> |
120 | {{row.baseIcao}} | 120 | {{row.baseIcao}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> | 122 | <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> |
123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> | 123 | <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> |
124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> | 124 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> |
125 | </td> | 125 | </td> |
126 | <td style="width: 130px;" class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> | 126 | <td style="width: 130px;" class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> |
127 | <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> | 127 | <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> |
128 | </td> | 128 | </td> |
129 | <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})"> | 129 | <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})"> |
130 | {{row.marginAllIn | number : 4}} | 130 | {{row.marginAllIn | number : 4}} |
131 | </td> | 131 | </td> |
132 | <td data-title="''"> | 132 | <td data-title="''"> |
133 | <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.baseTenant,row.contractFuelVendor,row.fuelerlinxCustomer,row.certificateType)">Setup Fuel</button> | 133 | <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.baseTenant,row.contractFuelVendor,row.fuelerlinxCustomer,row.certificateType)">Setup Fuel</button> |
134 | </td> | 134 | </td> |
135 | </tr> | 135 | </tr> |
136 | </table> | 136 | </table> |
137 | 137 | ||
138 | <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button> | 138 | <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button> |
139 | 139 | ||
140 | </div> | 140 | </div> |
141 | </div> | 141 | </div> |
142 | </div> | 142 | </div> |
143 | </div> | 143 | </div> |
144 | <!-- /widget-content --> | 144 | <!-- /widget-content --> |
145 | </div> | 145 | </div> |
146 | <!-- /widget --> | 146 | <!-- /widget --> |
147 | </div> | 147 | </div> |
148 | <!-- /span8 --> | 148 | <!-- /span8 --> |
149 | </div> | 149 | </div> |
150 | <!-- /row --> | 150 | <!-- /row --> |
151 | </div> | 151 | </div> |
152 | <!-- /container --> | 152 | <!-- /container --> |
153 | </div> | 153 | </div> |
154 | <!-- /main --> | 154 | <!-- /main --> |
155 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 155 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
156 | <div class="modal-dialog modal-lg"> | 156 | <div class="modal-dialog modal-lg"> |
157 | <div class="modal-content"> | 157 | <div class="modal-content"> |
158 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 158 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
159 | <div> | 159 | <div> |
160 | <div class="row" style="margin: 0;"> | 160 | <div class="row" style="margin: 0;"> |
161 | <div> | 161 | <div> |
162 | <div class="widget" style="margin-bottom: 0;"> | 162 | <div class="widget" style="margin-bottom: 0;"> |
163 | <div class="widget-header"> | 163 | <div class="widget-header"> |
164 | <i class="icon-pencil"></i> | 164 | <i class="icon-pencil"></i> |
165 | <i class="fa fa-tasks" aria-hidden="true"></i> | 165 | <i class="fa fa-tasks" aria-hidden="true"></i> |
166 | <h3>Add a New Company</h3> | 166 | <h3>Add a New Company</h3> |
167 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 167 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
168 | <div style="color: #ff9a01;">Activate     | 168 | <div style="color: #ff9a01;">Activate     |
169 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 169 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
170 | </div> | 170 | </div> |
171 | </div> | 171 | </div> |
172 | <div class="clearfix"></div> | 172 | <div class="clearfix"></div> |
173 | </div> | 173 | </div> |
174 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 174 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
175 | <div class="col-xs-12"> | 175 | <div class="col-xs-12"> |
176 | <div class="col-md-8"> | 176 | <div class="col-md-8"> |
177 | <div class="pull-left"> | 177 | <div class="pull-left"> |
178 | <label class="new-input-label"><b>Company Name *</b></label> | 178 | <label class="new-input-label"><b>Company Name *</b></label> |
179 | </div> | 179 | </div> |
180 | <div class="pull-left" style="margin-left: 15px;"> | 180 | <div class="pull-left" style="margin-left: 15px;"> |
181 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> | 181 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> |
182 | 182 | ||
183 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 183 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
184 | </div> | 184 | </div> |
185 | <div class="clearfix"></div> | 185 | <div class="clearfix"></div> |
186 | </div> | 186 | </div> |
187 | <div class="col-md-4"> | 187 | <div class="col-md-4"> |
188 | 188 | ||
189 | <div class="pull-right"> | 189 | <div class="pull-right"> |
190 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 190 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
191 | </div> | 191 | </div> |
192 | <div class="pull-right"> | 192 | <div class="pull-right"> |
193 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 193 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
194 | </div> | 194 | </div> |
195 | <div class="clearfix"></div> | 195 | <div class="clearfix"></div> |
196 | </div> | 196 | </div> |
197 | </div> | 197 | </div> |
198 | <div class="clearfix"></div><br> | 198 | <div class="clearfix"></div><br> |
199 | <div class="col-xs-12"> | 199 | <div class="col-xs-12"> |
200 | <div class="col-md-7"> | 200 | <div class="col-md-7"> |
201 | <div class="pull-left"> | 201 | <div class="pull-left"> |
202 | <label class="new-input-label"><b>Relationship </b></label> | 202 | <label class="new-input-label"><b>Relationship </b></label> |
203 | </div> | 203 | </div> |
204 | <div class="pull-left" style="margin-left: 32px;"> | 204 | <div class="pull-left" style="margin-left: 32px;"> |
205 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 205 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> |
206 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 206 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> |
207 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 207 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
208 | </div> | 208 | </div> |
209 | <div class="clearfix"></div> | 209 | <div class="clearfix"></div> |
210 | </div> | 210 | </div> |
211 | <div class="col-md-2 Airport" style="text-align: right;"> | 211 | <div class="col-md-2 Airport" style="text-align: right;"> |
212 | <b>Certificate Type</b> | 212 | <b>Certificate Type</b> |
213 | </div> | 213 | </div> |
214 | <div class="col-md-3 Airport"> | 214 | <div class="col-md-3 Airport"> |
215 | <select required class="form-control" ng-model="data.certificateType"> | 215 | <select required class="form-control" ng-model="data.certificateType"> |
216 | <option value="" disabled selected hidden>Select...</option> | 216 | <option value="" disabled selected hidden>Select...</option> |
217 | <option value="corporate">Part 91 (Corporate)</option> | 217 | <option value="corporate">Part 91 (Corporate)</option> |
218 | <option value="charter">Part 135 (Charter)</option> | 218 | <option value="charter">Part 135 (Charter)</option> |
219 | <option value="scheduled">Part 121 (Scheduled)</option> | 219 | <option value="scheduled">Part 121 (Scheduled)</option> |
220 | <option value="military">Military</option> | 220 | <option value="military">Military</option> |
221 | <option value="government">Government</option> | 221 | <option value="government">Government</option> |
222 | </select> | 222 | </select> |
223 | </div> | 223 | </div> |
224 | <div class="clearfix"></div> | 224 | <div class="clearfix"></div> |
225 | </div> | 225 | </div> |
226 | <div class="clearfix"></div> | 226 | <div class="clearfix"></div> |
227 | <br/> | 227 | <br/> |
228 | <div class="col-xs-12"> | 228 | <div class="col-xs-12"> |
229 | <div class="col-md-6"> | 229 | <div class="col-md-6"> |
230 | <div class="pull-left" style="width: 110px;"> | 230 | <div class="pull-left" style="width: 110px;"> |
231 | <b>JET A Margin *</b> | 231 | <b>JET A Margin *</b> |
232 | </div> | 232 | </div> |
233 | <div class="pull-left"> | 233 | <div class="pull-left"> |
234 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 234 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> |
235 | <option value="" disabled>Select...</option> | 235 | <option value="" disabled>Select...</option> |
236 | </select> | 236 | </select> |
237 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 237 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
238 | 238 | ||
239 | <div class="clearfix"></div> | 239 | <div class="clearfix"></div> |
240 | </div> | 240 | </div> |
241 | </div> | 241 | </div> |
242 | 242 | ||
243 | <div class="col-md-3 Airport" style="text-align: right;"> | 243 | <div class="col-md-3 Airport" style="text-align: right;"> |
244 | <b>AVGAS 100LL Margin</b> | 244 | <b>AVGAS 100LL Margin</b> |
245 | </div> | 245 | </div> |
246 | <div class="col-md-3 Airport"> | 246 | <div class="col-md-3 Airport"> |
247 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 247 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
248 | <option value="" disabled>Select...</option> | 248 | <option value="" disabled>Select...</option> |
249 | </select> | 249 | </select> |
250 | </div> | 250 | </div> |
251 | <div class="clearfix"></div> | 251 | <div class="clearfix"></div> |
252 | </div> | 252 | </div> |
253 | <div class="clearfix"></div> | 253 | <div class="clearfix"></div> |
254 | <br/> | 254 | <br/> |
255 | <div class="col-xs-12"> | 255 | <div class="col-xs-12"> |
256 | <div class="col-md-12"> | 256 | <div class="col-md-12"> |
257 | <div class="pull-left" style="width: 110px;"> | 257 | <div class="pull-left" style="width: 110px;"> |
258 | <label class="new-input-label"><b>Address</b></label> | 258 | <label class="new-input-label"><b>Address</b></label> |
259 | </div> | 259 | </div> |
260 | <div class="pull-left" style="width: calc(100% - 110px);"> | 260 | <div class="pull-left" style="width: calc(100% - 110px);"> |
261 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 261 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
262 | </div> | 262 | </div> |
263 | <div class="clearfix"></div> | 263 | <div class="clearfix"></div> |
264 | </div> | 264 | </div> |
265 | </div> | 265 | </div> |
266 | <div class="clearfix"></div> | 266 | <div class="clearfix"></div> |
267 | <br/> | 267 | <br/> |
268 | <div class="col-xs-12"> | 268 | <div class="col-xs-12"> |
269 | <div class="col-md-12"> | 269 | <div class="col-md-12"> |
270 | <div class="pull-left" style="width: 110px;"> | 270 | <div class="pull-left" style="width: 110px;"> |
271 | <label class="new-input-label"><b>Address2</b></label> | 271 | <label class="new-input-label"><b>Address2</b></label> |
272 | </div> | 272 | </div> |
273 | <div class="pull-left" style="width: calc(100% - 110px);"> | 273 | <div class="pull-left" style="width: calc(100% - 110px);"> |
274 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 274 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
275 | </div> | 275 | </div> |
276 | <div class="clearfix"></div> | 276 | <div class="clearfix"></div> |
277 | </div> | 277 | </div> |
278 | </div> | 278 | </div> |
279 | <div class="clearfix"></div> | 279 | <div class="clearfix"></div> |
280 | <br/> | 280 | <br/> |
281 | <div class="col-xs-12"> | 281 | <div class="col-xs-12"> |
282 | 282 | ||
283 | <div class="col-md-6"> | 283 | <div class="col-md-6"> |
284 | <div class="pull-left" style="width: 110px;"> | 284 | <div class="pull-left" style="width: 110px;"> |
285 | <label class="new-input-label"><b>City</b></label> | 285 | <label class="new-input-label"><b>City</b></label> |
286 | </div> | 286 | </div> |
287 | <div class="pull-left" style="width: calc(100% - 110px);"> | 287 | <div class="pull-left" style="width: calc(100% - 110px);"> |
288 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 288 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
289 | </div> | 289 | </div> |
290 | <div class="clearfix"></div> | 290 | <div class="clearfix"></div> |
291 | </div> | 291 | </div> |
292 | <div class="col-md-3"> | 292 | <div class="col-md-3"> |
293 | <div class="pull-left" style="width: 40px;"> | 293 | <div class="pull-left" style="width: 40px;"> |
294 | <label class="new-input-label"><b>State</b></label> | 294 | <label class="new-input-label"><b>State</b></label> |
295 | </div> | 295 | </div> |
296 | <div class="pull-left" style="width: calc(100% - 110px);"> | 296 | <div class="pull-left" style="width: calc(100% - 110px);"> |
297 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 297 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
298 | </div> | 298 | </div> |
299 | <div class="clearfix"></div> | 299 | <div class="clearfix"></div> |
300 | </div> | 300 | </div> |
301 | <div class="col-md-3"> | 301 | <div class="col-md-3"> |
302 | <div class="pull-left"> | 302 | <div class="pull-left"> |
303 | <label class="new-input-label"><b>Zip Code</b></label> | 303 | <label class="new-input-label"><b>Zip Code</b></label> |
304 | </div> | 304 | </div> |
305 | <div class="pull-right" style="width: calc(100% - 60px);"> | 305 | <div class="pull-right" style="width: calc(100% - 60px);"> |
306 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 306 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
307 | </div> | 307 | </div> |
308 | <div class="clearfix"></div> | 308 | <div class="clearfix"></div> |
309 | </div> | 309 | </div> |
310 | </div> | 310 | </div> |
311 | <div class="clearfix"></div> | 311 | <div class="clearfix"></div> |
312 | <br/> | 312 | <br/> |
313 | <div class="col-xs-12"> | 313 | <div class="col-xs-12"> |
314 | 314 | ||
315 | <div class="col-md-6"> | 315 | <div class="col-md-6"> |
316 | <div class="pull-left" style="width: 110px;"> | 316 | <div class="pull-left" style="width: 110px;"> |
317 | <label class="new-input-label"><b>Country</b></label> | 317 | <label class="new-input-label"><b>Country</b></label> |
318 | </div> | 318 | </div> |
319 | <div class="pull-left" style="width: calc(100% - 110px);"> | 319 | <div class="pull-left" style="width: calc(100% - 110px);"> |
320 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 320 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
321 | </div> | 321 | </div> |
322 | <div class="clearfix"></div> | 322 | <div class="clearfix"></div> |
323 | </div> | 323 | </div> |
324 | <div class="col-md-6"> | 324 | <div class="col-md-6"> |
325 | <div class="pull-left" style="width: 110px;"> | 325 | <div class="pull-left" style="width: 110px;"> |
326 | <label class="new-input-label"><b>Internal Note</b></label> | 326 | <label class="new-input-label"><b>Internal Note</b></label> |
327 | </div> | 327 | </div> |
328 | <div class="pull-left" style="width: calc(100% - 110px);"> | 328 | <div class="pull-left" style="width: calc(100% - 110px);"> |
329 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 329 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
330 | </div> | 330 | </div> |
331 | <div class="clearfix"></div> | 331 | <div class="clearfix"></div> |
332 | </div> | 332 | </div> |
333 | </div> | 333 | </div> |
334 | <div class="clearfix"></div> | 334 | <div class="clearfix"></div> |
335 | <!-- <br/> | 335 | <!-- <br/> |
336 | <div class="col-xs-12"> | 336 | <div class="col-xs-12"> |
337 | <div class="col-md-2 Airport"></div> | 337 | <div class="col-md-2 Airport"></div> |
338 | <div class="col-md-10 Airport"> | 338 | <div class="col-md-10 Airport"> |
339 | <div class="pull-right"> | 339 | <div class="pull-right"> |
340 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 340 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
341 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 341 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
342 | </div> | 342 | </div> |
343 | </div> | 343 | </div> |
344 | </div> --> | 344 | </div> --> |
345 | </div> | 345 | </div> |
346 | </div> | 346 | </div> |
347 | <div class="clearfix"></div> | 347 | <div class="clearfix"></div> |
348 | </div> | 348 | </div> |
349 | </div> | 349 | </div> |
350 | </div> | 350 | </div> |
351 | </div> | 351 | </div> |
352 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 352 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
353 | <div> | 353 | <div> |
354 | <div class="row" style="margin: 0;"> | 354 | <div class="row" style="margin: 0;"> |
355 | <div> | 355 | <div> |
356 | <div class="widget" style="margin-bottom: 0;"> | 356 | <div class="widget" style="margin-bottom: 0;"> |
357 | <div class="widget-header"> | 357 | <div class="widget-header"> |
358 | <i class="icon-pencil"></i> | 358 | <i class="icon-pencil"></i> |
359 | <i class="fa fa-tasks" aria-hidden="true"></i> | 359 | <i class="fa fa-tasks" aria-hidden="true"></i> |
360 | <h3>Add a New Company</h3> | 360 | <h3>Add a New Company</h3> |
361 | <div class="clearfix"></div> | 361 | <div class="clearfix"></div> |
362 | </div> | 362 | </div> |
363 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 363 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
364 | <div class="col-xs-12"> | 364 | <div class="col-xs-12"> |
365 | <div class="widget-header"> | 365 | <div class="widget-header"> |
366 | <i class="fa fa-list"></i> | 366 | <i class="fa fa-list"></i> |
367 | <h3>Aircraft List</h3> | 367 | <h3>Aircraft List</h3> |
368 | </div> | 368 | </div> |
369 | <div class="widget-content" style="padding:0px;border: 0px; "> | 369 | <div class="widget-content" style="padding:0px;border: 0px; "> |
370 | <div class="table-responsive"> | 370 | <div class="table-responsive"> |
371 | 371 | ||
372 | <!-- <table class="table table-striped table-bordered"> | 372 | <!-- <table class="table table-striped table-bordered"> |
373 | <thead> | 373 | <thead> |
374 | <tr> | 374 | <tr> |
375 | <th>Tail</th> | 375 | <th>Tail</th> |
376 | <th>Make</th> | 376 | <th>Make</th> |
377 | <th>Model</th> | 377 | <th>Model</th> |
378 | <th>Size</th> | 378 | <th>Size</th> |
379 | <th>JET A Margin</th> | 379 | <th>JET A Margin</th> |
380 | <th>AVGS 100LL Margin</th> | 380 | <th>AVGS 100LL Margin</th> |
381 | </tr> | 381 | </tr> |
382 | </thead> | 382 | </thead> |
383 | <tbody> | 383 | <tbody> |
384 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 384 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
385 | <td style="width: 15%"> | 385 | <td style="width: 15%"> |
386 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 386 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
387 | </td> | 387 | </td> |
388 | <td style="width: 17%"> | 388 | <td style="width: 17%"> |
389 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 389 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
390 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> | 390 | <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> |
391 | <option value="" disabled>Select...</option> | 391 | <option value="" disabled>Select...</option> |
392 | </select> | 392 | </select> |
393 | </td> | 393 | </td> |
394 | <td style="width: 17%"> | 394 | <td style="width: 17%"> |
395 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 395 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
396 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 396 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
397 | <option value="" disabled>Select...</option> | 397 | <option value="" disabled>Select...</option> |
398 | </select> | 398 | </select> |
399 | </td> | 399 | </td> |
400 | <td style="width: 17%"> | 400 | <td style="width: 17%"> |
401 | <select class="form-control" ng-model="aircraftData.sizeId"> | 401 | <select class="form-control" ng-model="aircraftData.sizeId"> |
402 | <option value="" disabled>Select</option> | 402 | <option value="" disabled>Select</option> |
403 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 403 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
404 | </select> | 404 | </select> |
405 | 405 | ||
406 | </td> | 406 | </td> |
407 | <td style="width: 17%"> | 407 | <td style="width: 17%"> |
408 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 408 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
409 | <option value="" disabled>Select</option> | 409 | <option value="" disabled>Select</option> |
410 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 410 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
411 | </select> | 411 | </select> |
412 | 412 | ||
413 | 413 | ||
414 | </td> | 414 | </td> |
415 | <td style="width: 17%"> | 415 | <td style="width: 17%"> |
416 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 416 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
417 | <option value="" disabled>Select</option> | 417 | <option value="" disabled>Select</option> |
418 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 418 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
419 | </select> | 419 | </select> |
420 | 420 | ||
421 | </td> | 421 | </td> |
422 | </tr> | 422 | </tr> |
423 | </tbody> | 423 | </tbody> |
424 | </table> | 424 | </table> |
425 | </div> | 425 | </div> |
426 | <div class="clearfix"></div> | 426 | <div class="clearfix"></div> |
427 | </div> | 427 | </div> |
428 | </div> | 428 | </div> |
429 | <div class="clearfix"></div> | 429 | <div class="clearfix"></div> |
430 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 430 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
431 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 431 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
432 | </div> --> | 432 | </div> --> |
433 | 433 | ||
434 | <table class="table table-striped table-bordered"> | 434 | <table class="table table-striped table-bordered"> |
435 | <thead> | 435 | <thead> |
436 | <tr> | 436 | <tr> |
437 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 437 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
438 | <th>Tail</th> | 438 | <th>Tail</th> |
439 | <th>Make</th> | 439 | <th>Make</th> |
440 | <th>Model</th> | 440 | <th>Model</th> |
441 | <th>Size</th> | 441 | <th>Size</th> |
442 | <th>JET A Margin</th> | 442 | <th>JET A Margin</th> |
443 | <th>AVGS 100LL Margin</th> | 443 | <th>AVGS 100LL Margin</th> |
444 | </tr> | 444 | </tr> |
445 | </thead> | 445 | </thead> |
446 | <tbody> | 446 | <tbody> |
447 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 447 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
448 | <!-- <td> | 448 | <!-- <td> |
449 | <input type="checkbox" ng-model="aircraftData.selected"/> | 449 | <input type="checkbox" ng-model="aircraftData.selected"/> |
450 | </td> --> | 450 | </td> --> |
451 | <!-- <td style="width: 15%"> | 451 | <!-- <td style="width: 15%"> |
452 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 452 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
453 | </td> --> | 453 | </td> --> |
454 | <td style="width: 15%"> | 454 | <td style="width: 15%"> |
455 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> | 455 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> |
456 | </td> | 456 | </td> |
457 | <td style="width: 17%"> | 457 | <td style="width: 17%"> |
458 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> | 458 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> |
459 | <option value="" disabled>Select</option> | 459 | <option value="" disabled>Select</option> |
460 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 460 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
461 | </select> | 461 | </select> |
462 | </td> | 462 | </td> |
463 | <td style="width: 17%"> | 463 | <td style="width: 17%"> |
464 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 464 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
465 | <option value="" disabled>Select</option> | 465 | <option value="" disabled>Select</option> |
466 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 466 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
467 | </select> | 467 | </select> |
468 | </td> | 468 | </td> |
469 | <td style="width: 17%"> | 469 | <td style="width: 17%"> |
470 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> | 470 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> |
471 | <option value="" disabled>Select</option> | 471 | <option value="" disabled>Select</option> |
472 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> | 472 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</option> |
473 | </select> | 473 | </select> |
474 | 474 | ||
475 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> --> | 475 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> --> |
476 | 476 | ||
477 | </td> | 477 | </td> |
478 | <td style="width: 17%"> | 478 | <td style="width: 17%"> |
479 | 479 | ||
480 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 480 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
481 | <option value="" disabled>Select</option> | 481 | <option value="" disabled>Select</option> |
482 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 482 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
483 | </select> | 483 | </select> |
484 | 484 | ||
485 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> | 485 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> |
486 | 486 | ||
487 | <option value="" disabled>Select...</option> | 487 | <option value="" disabled>Select...</option> |
488 | </select> --> | 488 | </select> --> |
489 | 489 | ||
490 | </td> | 490 | </td> |
491 | <td style="width: 17%"> | 491 | <td style="width: 17%"> |
492 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 492 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
493 | <option value="" disabled>Select</option> | 493 | <option value="" disabled>Select</option> |
494 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 494 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
495 | </select> | 495 | </select> |
496 | 496 | ||
497 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> | 497 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> |
498 | <option value="" disabled>Select...</option> | 498 | <option value="" disabled>Select...</option> |
499 | </select> --> | 499 | </select> --> |
500 | </td> | 500 | </td> |
501 | </tr> | 501 | </tr> |
502 | </tbody> | 502 | </tbody> |
503 | </table> | 503 | </table> |
504 | </div> | 504 | </div> |
505 | <div class="clearfix"></div> | 505 | <div class="clearfix"></div> |
506 | </div> | 506 | </div> |
507 | </div> | 507 | </div> |
508 | <div class="clearfix"></div> | 508 | <div class="clearfix"></div> |
509 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 509 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
510 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> | 510 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> |
511 | </div> | 511 | </div> |
512 | </div> | 512 | </div> |
513 | </div> | 513 | </div> |
514 | <div class="clearfix"></div> | 514 | <div class="clearfix"></div> |
515 | </div> | 515 | </div> |
516 | </div> | 516 | </div> |
517 | </div> | 517 | </div> |
518 | </div> | 518 | </div> |
519 | <!-- <div class="modal-body step-3" data-step="3"> | 519 | <!-- <div class="modal-body step-3" data-step="3"> |
520 | This is the final step. | 520 | This is the final step. |
521 | </div> --> | 521 | </div> --> |
522 | <div class="modal-footer" style="border-top: 0;"> | 522 | <div class="modal-footer" style="border-top: 0;"> |
523 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 523 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
524 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 524 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
525 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 525 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
526 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 526 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
527 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 527 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
528 | </div> | 528 | </div> |
529 | </div> | 529 | </div> |
530 | </div> | 530 | </div> |
531 | </form> | 531 | </form> |
532 | 532 | ||
533 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> | 533 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> |
534 | <div class="customModalInner" style="max-width: 400px;"> | 534 | <div class="customModalInner" style="max-width: 400px;"> |
535 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 535 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
536 | <table> | 536 | <table> |
537 | <tr> | 537 | <tr> |
538 | <td> | 538 | <td> |
539 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 539 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
540 | </td> | 540 | </td> |
541 | </tr> | 541 | </tr> |
542 | </table> | 542 | </table> |
543 | </div> | 543 | </div> |
544 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 544 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
545 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button> | 545 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button> |
546 | </div> | 546 | </div> |
547 | </div> | 547 | </div> |
548 | </div> | 548 | </div> |
549 | 549 | ||
550 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> | 550 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> |
551 | <div class="customModalInner" style="max-width: 400px;"> | 551 | <div class="customModalInner" style="max-width: 400px;"> |
552 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 552 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
553 | <table> | 553 | <table> |
554 | <tr> | 554 | <tr> |
555 | <td> | 555 | <td> |
556 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 556 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
557 | </td> | 557 | </td> |
558 | </tr> | 558 | </tr> |
559 | </table> | 559 | </table> |
560 | </div> | 560 | </div> |
561 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 561 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
562 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> | 562 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> |
563 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> | 563 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> |
564 | </div> | 564 | </div> |
565 | </div> | 565 | </div> |
566 | </div> | 566 | </div> |
567 | 567 | ||
568 | 568 | ||
569 | 569 | ||
570 | <!-- SetUp fuel order --> | 570 | <!-- SetUp fuel order --> |
571 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 571 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
572 | <div class="modal-dialog modal-lg"> | 572 | <div class="modal-dialog modal-lg"> |
573 | <div class="modal-content"> | 573 | <div class="modal-content"> |
574 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 574 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
575 | <div> | 575 | <div> |
576 | <div class="row" style="margin: 0;"> | 576 | <div class="row" style="margin: 0;"> |
577 | <div> | 577 | <div> |
578 | <div class="widget" style="margin-bottom: 0;"> | 578 | <div class="widget" style="margin-bottom: 0;"> |
579 | <div class="widget-header"> | 579 | <div class="widget-header"> |
580 | <i class="icon-pencil"></i> | 580 | <i class="icon-pencil"></i> |
581 | <i class="fa fa-tasks" aria-hidden="true"></i> | 581 | <i class="fa fa-tasks" aria-hidden="true"></i> |
582 | <h3>Add a Fuel Order</h3> | 582 | <h3>Add a Fuel Order</h3> |
583 | <div class="clearfix"></div> | 583 | <div class="clearfix"></div> |
584 | </div> | 584 | </div> |
585 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 585 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
586 | <div class="col-xs-12"> | 586 | <div class="col-xs-12"> |
587 | <div class="col-xs-12"> | 587 | <div class="col-xs-12"> |
588 | 588 | ||
589 | <div class="col-md-6"> | 589 | <div class="col-md-6"> |
590 | <div class="pull-left" style="width: 110px;"> | 590 | <div class="pull-left" style="width: 110px;"> |
591 | <label class="new-input-label"><b>Company</b></label> | 591 | <label class="new-input-label"><b>Company</b></label> |
592 | </div> | 592 | </div> |
593 | <div class="pull-left" style="width: calc(100% - 110px);"> | 593 | <div class="pull-left" style="width: calc(100% - 110px);"> |
594 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 594 | <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
595 | <option value="" selected disabled>Select Company</option> | 595 | <option value="" selected disabled>Select Company</option> |
596 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 596 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
597 | </select> --> | 597 | </select> --> |
598 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> | 598 | <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> |
599 | </div> | 599 | </div> |
600 | <div class="clearfix"></div> | 600 | <div class="clearfix"></div> |
601 | </div> | 601 | </div> |
602 | <div class="col-md-6"> | 602 | <div class="col-md-6"> |
603 | <div class="pull-left" style="width: 110px;"> | 603 | <div class="pull-left" style="width: 110px;"> |
604 | <label class="new-input-label"><b>Product</b></label> | 604 | <label class="new-input-label"><b>Product</b></label> |
605 | </div> | 605 | </div> |
606 | <div class="pull-left" style="width: calc(100% - 110px);"> | 606 | <div class="pull-left" style="width: calc(100% - 110px);"> |
607 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> | 607 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> |
608 | <option value="" selected disabled>Select Product</option> | 608 | <option value="" selected disabled>Select Product</option> |
609 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 609 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
610 | </select> | 610 | </select> |
611 | </div> | 611 | </div> |
612 | <div class="clearfix"></div> | 612 | <div class="clearfix"></div> |
613 | </div> | 613 | </div> |
614 | 614 | ||
615 | </div> | 615 | </div> |
616 | <div class="clearfix"></div> | 616 | <div class="clearfix"></div> |
617 | <br/> | 617 | <br/> |
618 | 618 | ||
619 | 619 | ||
620 | <div class="col-xs-12"> | 620 | <div class="col-xs-12"> |
621 | 621 | ||
622 | <div class="col-md-6"> | 622 | <div class="col-md-6"> |
623 | <div class="pull-left" style="width: 110px;"> | 623 | <div class="pull-left" style="width: 110px;"> |
624 | <label class="new-input-label"><b>Aircraft</b></label> | 624 | <label class="new-input-label"><b>Aircraft</b></label> |
625 | </div> | 625 | </div> |
626 | <div class="pull-left" style="width: calc(100% - 110px);"> | 626 | <div class="pull-left" style="width: calc(100% - 110px);"> |
627 | <select class="form-control" ng-model="order.aircraftName" required> | 627 | <select class="form-control" ng-model="order.aircraftName" required> |
628 | <option selected disabled value="">Select Aircraft</option> | 628 | <option selected disabled value="">Select Aircraft</option> |
629 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 629 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
630 | </select> | 630 | </select> |
631 | </div> | 631 | </div> |
632 | <div class="clearfix"></div> | 632 | <div class="clearfix"></div> |
633 | </div> | 633 | </div> |
634 | <div class="col-md-6"> | 634 | <div class="col-md-6"> |
635 | <div class="pull-left" style="width: 110px;"> | 635 | <div class="pull-left" style="width: 110px;"> |
636 | <label class="new-input-label"><b>Volume</b></label> | 636 | <label class="new-input-label"><b>Volume</b></label> |
637 | </div> | 637 | </div> |
638 | <div class="pull-left" style="width: calc(100% - 110px);"> | 638 | <div class="pull-left" style="width: calc(100% - 110px);"> |
639 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 639 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
640 | </div> | 640 | </div> |
641 | <div class="clearfix"></div> | 641 | <div class="clearfix"></div> |
642 | </div> | 642 | </div> |
643 | 643 | ||
644 | </div> | 644 | </div> |
645 | <div class="clearfix"></div> | 645 | <div class="clearfix"></div> |
646 | <br/> | 646 | <br/> |
647 | 647 | ||
648 | <div class="col-xs-12"> | 648 | <div class="col-xs-12"> |
649 | 649 | ||
650 | <div class="col-md-6"> | 650 | <div class="col-md-6"> |
651 | <div class="pull-left" style="width: 110px;"> | 651 | <div class="pull-left" style="width: 110px;"> |
652 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 652 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
653 | </div> | 653 | </div> |
654 | <div class="pull-left" style="width: calc(100% - 110px);"> | 654 | <div class="pull-left" style="width: calc(100% - 110px);"> |
655 | <div style="width: 50%; float: left;"> | 655 | <div style="width: 50%; float: left;"> |
656 | Date | 656 | Date |
657 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 657 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
658 | </div> | 658 | </div> |
659 | <div style="width: 50%; float: left;"> | 659 | <div style="width: 50%; float: left;"> |
660 | Time | 660 | Time |
661 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 661 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
662 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 662 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
663 | </select> | 663 | </select> |
664 | 664 | ||
665 | </div> | 665 | </div> |
666 | </div> | 666 | </div> |
667 | <div class="clearfix"></div> | 667 | <div class="clearfix"></div> |
668 | </div> | 668 | </div> |
669 | 669 | ||
670 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 670 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
671 | <div class="pull-left" style="width: 110px;"> | 671 | <div class="pull-left" style="width: 110px;"> |
672 | <label class="new-input-label"><b>Invoiced</b></label> | 672 | <label class="new-input-label"><b>Invoiced</b></label> |
673 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 673 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
674 | </div> | 674 | </div> |
675 | <div class="pull-left" style="width: calc(100% - 110px);"> | 675 | <div class="pull-left" style="width: calc(100% - 110px);"> |
676 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 676 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
677 | </div> | 677 | </div> |
678 | <div class="clearfix"></div> | 678 | <div class="clearfix"></div> |
679 | </div> | 679 | </div> |
680 | </div> | 680 | </div> |
681 | <div class="clearfix"></div><br> | 681 | <div class="clearfix"></div><br> |
682 | 682 | ||
683 | 683 | ||
684 | <div class="col-xs-12"> | 684 | <div class="col-xs-12"> |
685 | 685 | ||
686 | <div class="col-md-6"> | 686 | <div class="col-md-6"> |
687 | <div class="pull-left" style="width: 110px;"> | 687 | <div class="pull-left" style="width: 110px;"> |
688 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 688 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
689 | </div> | 689 | </div> |
690 | <div class="pull-left" style="width: calc(100% - 110px);"> | 690 | <div class="pull-left" style="width: calc(100% - 110px);"> |
691 | <div style="width: 50%; float: left;"> | 691 | <div style="width: 50%; float: left;"> |
692 | Date | 692 | Date |
693 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 693 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
694 | </div> | 694 | </div> |
695 | <div style="width: 50%; float: left;"> | 695 | <div style="width: 50%; float: left;"> |
696 | Time | 696 | Time |
697 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 697 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
698 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 698 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
699 | </select> | 699 | </select> |
700 | 700 | ||
701 | </div> | 701 | </div> |
702 | </div> | 702 | </div> |
703 | <div class="clearfix"></div> | 703 | <div class="clearfix"></div> |
704 | </div> | 704 | </div> |
705 | 705 | ||
706 | <div class="col-md-6" style="margin-top: 22px;"> | 706 | <div class="col-md-6" style="margin-top: 22px;"> |
707 | <div class="pull-left" style="width: 110px;"> | 707 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Total</b></label> | 708 | <label class="new-input-label"><b>Total</b></label> |
709 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 709 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
710 | </div> | 710 | </div> |
711 | <div class="pull-left" style="width: calc(100% - 110px);"> | 711 | <div class="pull-left" style="width: calc(100% - 110px);"> |
712 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 712 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
713 | </div> | 713 | </div> |
714 | </div> | 714 | </div> |
715 | </div> | 715 | </div> |
716 | <div class="clearfix"></div><br> | 716 | <div class="clearfix"></div><br> |
717 | 717 | ||
718 | <div class="col-xs-12"> | 718 | <div class="col-xs-12"> |
719 | 719 | ||
720 | <div class="col-md-6"> | 720 | <div class="col-md-6"> |
721 | <div class="pull-left" style="width: 110px;"> | 721 | <div class="pull-left" style="width: 110px;"> |
722 | <label class="new-input-label"><b>Fuel on</b></label> | 722 | <label class="new-input-label"><b>Fuel on</b></label> |
723 | </div> | 723 | </div> |
724 | <div class="pull-left" style="width: calc(100% - 110px);"> | 724 | <div class="pull-left" style="width: calc(100% - 110px);"> |
725 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 725 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
726 | <option value="" disabled selected hidden>Select...</option> | 726 | <option value="" disabled selected hidden>Select...</option> |
727 | <option value="Arrival">Arrival</option> | 727 | <option value="Arrival">Arrival</option> |
728 | <option value="Departure">Departure</option> | 728 | <option value="Departure">Departure</option> |
729 | </select> | 729 | </select> |
730 | </div> | 730 | </div> |
731 | <div class="clearfix"></div> | 731 | <div class="clearfix"></div> |
732 | </div> | 732 | </div> |
733 | 733 | ||
734 | <div class="col-md-6"> | 734 | <div class="col-md-6"> |
735 | <div class="pull-left" style="width: 110px;"> | 735 | <div class="pull-left" style="width: 110px;"> |
736 | <label class="new-input-label"><b>FBO Cost</b></label> | 736 | <label class="new-input-label"><b>FBO Cost</b></label> |
737 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 737 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
738 | </div> | 738 | </div> |
739 | <div class="pull-left" style="width: calc(100% - 110px);"> | 739 | <div class="pull-left" style="width: calc(100% - 110px);"> |
740 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> | 740 | <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> |
741 | </div> | 741 | </div> |
742 | <div class="clearfix"></div> | 742 | <div class="clearfix"></div> |
743 | </div> | 743 | </div> |
744 | </div> | 744 | </div> |
745 | <div class="clearfix"></div><br> | 745 | <div class="clearfix"></div><br> |
746 | 746 | ||
747 | <div class="col-xs-12"> | 747 | <div class="col-xs-12"> |
748 | <div class="col-md-6"> | 748 | <div class="col-md-6"> |
749 | <div class="pull-left" style="width: 110px;"> | 749 | <div class="pull-left" style="width: 110px;"> |
750 | <label class="new-input-label"><b>Source</b></label> | 750 | <label class="new-input-label"><b>Source</b></label> |
751 | </div> | 751 | </div> |
752 | <div class="pull-left" style="width: calc(100% - 110px);"> | 752 | <div class="pull-left" style="width: calc(100% - 110px);"> |
753 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> | 753 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> |
754 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> | 754 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> |
755 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> | 755 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> |
756 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | 756 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> |
757 | <option value="" disabled selected hidden>Select Source</option> | 757 | <option value="" disabled selected hidden>Select Source</option> |
758 | <option value="Tenant">Tenant</option> | 758 | <option value="Tenant">Tenant</option> |
759 | <option value="CAA">CAA</option> | 759 | <option value="CAA">CAA</option> |
760 | <option value="Tenant/CAA">Tenant/CAA</option> | 760 | <option value="Tenant/CAA">Tenant/CAA</option> |
761 | </select> --> | 761 | </select> --> |
762 | </div> | 762 | </div> |
763 | <div class="clearfix"></div> | 763 | <div class="clearfix"></div> |
764 | </div> | 764 | </div> |
765 | </div> | 765 | </div> |
766 | <div class="clearfix"></div> | 766 | <div class="clearfix"></div> |
767 | <br/> | 767 | <br/> |
768 | <div class="col-xs-12"> | 768 | <div class="col-xs-12"> |
769 | 769 | ||
770 | 770 | ||
771 | <div class="col-md-6"> | 771 | <div class="col-md-6"> |
772 | <div class="pull-left" style="width: 110px;"> | 772 | <div class="pull-left" style="width: 110px;"> |
773 | <label class="new-input-label"><b>Certificate Type</b></label> | 773 | <label class="new-input-label"><b>Certificate Type</b></label> |
774 | </div> | 774 | </div> |
775 | <div class="pull-left" style="width: calc(100% - 110px);"> | 775 | <div class="pull-left" style="width: calc(100% - 110px);"> |
776 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 776 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
777 | <option value="" disabled selected hidden>Select...</option> | 777 | <option value="" disabled selected hidden>Select...</option> |
778 | <option value="corporate">Part 91 (Corporate)</option> | 778 | <option value="corporate">Part 91 (Corporate)</option> |
779 | <option value="charter">Part 135 (Charter)</option> | 779 | <option value="charter">Part 135 (Charter)</option> |
780 | <option value="scheduled">Part 121 (Scheduled)</option> | 780 | <option value="scheduled">Part 121 (Scheduled)</option> |
781 | <option value="military">Military</option> | 781 | <option value="military">Military</option> |
782 | <option value="government">Government</option> | 782 | <option value="government">Government</option> |
783 | </select> | 783 | </select> |
784 | </div> | 784 | </div> |
785 | <div class="clearfix"></div> | 785 | <div class="clearfix"></div> |
786 | </div> | 786 | </div> |
787 | <div class="col-md-6"> | 787 | <div class="col-md-6"> |
788 | <div class="pull-left" style="width: 110px;"> | 788 | <div class="pull-left" style="width: 110px;"> |
789 | <label class="new-input-label"><b>Status</b></label> | 789 | <label class="new-input-label"><b>Status</b></label> |
790 | </div> | 790 | </div> |
791 | <div class="pull-left" style="width: calc(100% - 110px);"> | 791 | <div class="pull-left" style="width: calc(100% - 110px);"> |
792 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 792 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
793 | <option value="" disabled selected hidden>pending</option> | 793 | <option value="" disabled selected hidden>pending</option> |
794 | <option value="pending">pending</option> | 794 | <option value="pending">pending</option> |
795 | <option value="invoiced">invoiced</option> | 795 | <option value="invoiced">invoiced</option> |
796 | <option value="paid">paid</option> | 796 | <option value="paid">paid</option> |
797 | <!-- <option value="cancelled">cancelled</option> | 797 | <!-- <option value="cancelled">cancelled</option> |
798 | <option value="archived">archived</option> --> | 798 | <option value="archived">archived</option> --> |
799 | </select> | 799 | </select> |
800 | </div> | 800 | </div> |
801 | <div class="clearfix"></div> | 801 | <div class="clearfix"></div> |
802 | </div> | 802 | </div> |
803 | </div> | 803 | </div> |
804 | <div class="clearfix"></div><br> | 804 | <div class="clearfix"></div><br> |
805 | 805 | ||
806 | </div> | 806 | </div> |
807 | </div> | 807 | </div> |
808 | </div> | 808 | </div> |
809 | </div> | 809 | </div> |
810 | </div> | 810 | </div> |
811 | </div> | 811 | </div> |
812 | <div class="modal-footer" style="border-top: 0;"> | 812 | <div class="modal-footer" style="border-top: 0;"> |
813 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 813 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
814 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> | 814 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> |
815 | </div> | 815 | </div> |
816 | </div> | 816 | </div> |
817 | </div> | 817 | </div> |
818 | </div> | 818 | </div> |
819 | </form> | 819 | </form> |
820 | 820 | ||
821 | 821 | ||
822 | <div class="myLoader" ng-show="showLoader"> | 822 | <div class="myLoader" ng-show="showLoader"> |
823 | <img src="../img/hourglass.gif" width="50px;"> | 823 | <img src="../img/hourglass.gif" width="50px;"> |
824 | </div> | 824 | </div> |
825 | <script src="js/multi-step-modal.js"></script> | 825 | <script src="js/multi-step-modal.js"></script> |
826 | <script> | 826 | <script> |
827 | sendEvent = function(sel, step) { | 827 | sendEvent = function(sel, step) { |
828 | $(sel).trigger('next.m.' + step); | 828 | $(sel).trigger('next.m.' + step); |
829 | } | 829 | } |
830 | </script> | 830 | </script> |
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 | getCompanyDetail(); | 153 | getCompanyDetail(); |
153 | 154 | ||
154 | function getCompanyDetail() { | 155 | function getCompanyDetail() { |
155 | $scope.showLoader = true; | 156 | $scope.showLoader = true; |
156 | ViewCompanyService.getCompany(companyId).then(function(result) { | 157 | ViewCompanyService.getCompany(companyId).then(function(result) { |
157 | console.log("===getCompanyDetail====",result) | 158 | console.log("===getCompanyDetail====",result) |
158 | $scope.companyData = result; | 159 | $scope.companyData = result; |
159 | $scope.isGlobal = result.global; | 160 | $scope.isGlobal = result.global; |
161 | $scope.fboPreffered = result.fboPreferred; | ||
160 | if (result.global == true) { | 162 | if (result.global == true) { |
161 | $scope.companyData.global = true; | 163 | $scope.companyData.global = true; |
162 | } | 164 | } |
163 | if (result.margin != null) { | 165 | if (result.margin != null) { |
164 | $scope.companyData.masterMargin = result.margin.id; | 166 | $scope.companyData.masterMargin = result.margin.id; |
165 | } | 167 | } |
166 | if (result.marginAVGAS != null) { | 168 | if (result.marginAVGAS != null) { |
167 | $scope.companyData.avgasMargin = result.marginAVGAS.id; | 169 | $scope.companyData.avgasMargin = result.marginAVGAS.id; |
168 | } | 170 | } |
169 | 171 | ||
170 | 172 | ||
171 | 173 | ||
172 | if ($scope.companyData.baseTenant) { | 174 | if ($scope.companyData.baseTenant) { |
173 | 175 | ||
174 | $scope.selected.push({ | 176 | $scope.selected.push({ |
175 | 'first': 'Tenant/Base Customer' | 177 | 'first': 'Tenant/Base Customer' |
176 | }) | 178 | }) |
177 | // console.log("$scope.selected",$scope.selected) | 179 | // console.log("$scope.selected",$scope.selected) |
178 | 180 | ||
179 | } | 181 | } |
180 | 182 | ||
181 | if ($scope.companyData.fuelerlinxCustomer) { | 183 | if ($scope.companyData.fuelerlinxCustomer) { |
182 | $scope.selected.push({ | 184 | $scope.selected.push({ |
183 | 'first': 'FuelerLinx Customer' | 185 | 'first': 'FuelerLinx Customer' |
184 | }) | 186 | }) |
185 | // console.log("$scope.selected",$scope.selected) | 187 | // console.log("$scope.selected",$scope.selected) |
186 | } | 188 | } |
187 | 189 | ||
188 | if ($scope.companyData.contractFuelVendor) { | 190 | if ($scope.companyData.contractFuelVendor) { |
189 | $scope.selected.push({ | 191 | $scope.selected.push({ |
190 | 'first': 'CAA Member' | 192 | 'first': 'CAA Member' |
191 | }) | 193 | }) |
192 | // console.log("$scope.selected",$scope.selected) | 194 | // console.log("$scope.selected",$scope.selected) |
193 | } | 195 | } |
194 | 196 | ||
195 | // console.log("$scope.companyData",$scope.companyData) | 197 | // console.log("$scope.companyData",$scope.companyData) |
196 | getAircraftList(); | 198 | getAircraftList(); |
197 | $scope.order.companyName = $scope.companyData.companyName; | 199 | $scope.order.companyName = $scope.companyData.companyName; |
198 | $scope.getAircraft(result.companyName); | 200 | $scope.getAircraft(result.companyName); |
199 | $scope.showLoader = false; | 201 | $scope.showLoader = false; |
200 | }) | 202 | }) |
201 | } | 203 | } |
202 | 204 | ||
203 | 205 | ||
204 | $scope.changeCompanyStatus = function() { | 206 | $scope.changeCompanyStatus = function() { |
205 | $('#delete3').css('display', 'block'); | 207 | $('#delete3').css('display', 'block'); |
206 | if ($scope.companyData.activate == true) { | 208 | if ($scope.companyData.activate == true) { |
207 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' | 209 | $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this company?' |
208 | } else { | 210 | } else { |
209 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' | 211 | $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this company?' |
210 | } | 212 | } |
211 | } | 213 | } |
212 | 214 | ||
213 | $scope.companyStatus = function() { | 215 | $scope.companyStatus = function() { |
214 | $scope.showLoader = true; | 216 | $scope.showLoader = true; |
215 | var statusData = "status=" + $scope.companyData.activate; | 217 | var statusData = "status=" + $scope.companyData.activate; |
216 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { | 218 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { |
217 | if (result.success) { | 219 | if (result.success) { |
218 | $('#delete3').css('display', 'none'); | 220 | $('#delete3').css('display', 'none'); |
219 | toastr.success('' + result.success + '', { | 221 | toastr.success('' + result.success + '', { |
220 | closeButton: true | 222 | closeButton: true |
221 | }) | 223 | }) |
222 | getContactList(); | 224 | getContactList(); |
223 | } | 225 | } |
224 | }) | 226 | }) |
225 | $scope.showLoader = false; | 227 | $scope.showLoader = false; |
226 | } | 228 | } |
227 | 229 | ||
228 | 230 | ||
229 | $scope.cancelStatus = function() { | 231 | $scope.cancelStatus = function() { |
230 | $('#delete3').css('display', 'none'); | 232 | $('#delete3').css('display', 'none'); |
231 | $scope.companyData.activate = !$scope.companyData.activate; | 233 | $scope.companyData.activate = !$scope.companyData.activate; |
232 | } | 234 | } |
233 | 235 | ||
234 | getContactList(); | 236 | getContactList(); |
235 | 237 | ||
236 | function getContactList() { | 238 | function getContactList() { |
237 | ViewCompanyService.getContact(companyId).then(function(result) { | 239 | ViewCompanyService.getContact(companyId).then(function(result) { |
238 | $scope.companyContactList = result; | 240 | $scope.companyContactList = result; |
239 | }) | 241 | }) |
240 | } | 242 | } |
241 | $scope.aircraftmargins = []; | 243 | $scope.aircraftmargins = []; |
242 | 244 | ||
243 | $scope.abc = false; | 245 | $scope.abc = false; |
244 | $scope.xyz = false; | 246 | $scope.xyz = false; |
245 | function getAircraftList() { | 247 | function getAircraftList() { |
246 | ViewCompanyService.getAircraft(companyId).then(function(result) { | 248 | ViewCompanyService.getAircraft(companyId).then(function(result) { |
247 | 249 | ||
248 | $scope.contactAircraftList = result; | 250 | $scope.contactAircraftList = result; |
249 | console.log("===contactAircraftList===",result) | 251 | console.log("===contactAircraftList===",result) |
250 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 252 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
251 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 253 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
252 | $scope.aircraftmargins.push({ | 254 | $scope.aircraftmargins.push({ |
253 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 255 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
254 | }) | 256 | }) |
255 | $scope.contactAircraftList[i].fuelType = "Jet-A"; | 257 | $scope.contactAircraftList[i].fuelType = "Jet-A"; |
256 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; | 258 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsMargin.marginValue; |
257 | $scope.abc = true; | 259 | $scope.abc = true; |
258 | 260 | ||
259 | }else{ | 261 | }else{ |
260 | $scope.contactAircraftList[i].fuelType = "100LL"; | 262 | $scope.contactAircraftList[i].fuelType = "100LL"; |
261 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; | 263 | $scope.contactAircraftList[i].marginValue = result[i].aircraftsAVGASMargin.marginValue; |
262 | $scope.xyz = true; | 264 | $scope.xyz = true; |
263 | } | 265 | } |
264 | 266 | ||
265 | } | 267 | } |
266 | if ($scope.aircraftmargins.length > 0) { | 268 | if ($scope.aircraftmargins.length > 0) { |
267 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 269 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
268 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 270 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
269 | $scope.multiple = true; | 271 | $scope.multiple = true; |
270 | $scope.multipleMsg = true; | 272 | $scope.multipleMsg = true; |
271 | if ($scope.multiple) { | 273 | if ($scope.multiple) { |
272 | $scope.companyData.masterMargin = "multiple"; | 274 | $scope.companyData.masterMargin = "multiple"; |
273 | } | 275 | } |
274 | } | 276 | } |
275 | } | 277 | } |
276 | } | 278 | } |
277 | }) | 279 | }) |
278 | } | 280 | } |
279 | 281 | ||
280 | 282 | ||
281 | 283 | ||
282 | $scope.contactData = {}; | 284 | $scope.contactData = {}; |
283 | $scope.contactData.contactList = []; | 285 | $scope.contactData.contactList = []; |
284 | $scope.addContact = function() { | 286 | $scope.addContact = function() { |
285 | $scope.showLoader = true; | 287 | $scope.showLoader = true; |
286 | $scope.data.companyId = companyId; | 288 | $scope.data.companyId = companyId; |
287 | $scope.contactData.contactList.push($scope.data); | 289 | $scope.contactData.contactList.push($scope.data); |
288 | ViewCompanyService.addContact($scope.contactData).then(function(result) { | 290 | ViewCompanyService.addContact($scope.contactData).then(function(result) { |
289 | //console.log("data==",$scope.contactData) | 291 | //console.log("data==",$scope.contactData) |
290 | // console.log(result) | 292 | // console.log(result) |
291 | if (result.status == 200) { | 293 | if (result.status == 200) { |
292 | 294 | ||
293 | $('#contact-modal-3').modal('hide'); | 295 | $('#contact-modal-3').modal('hide'); |
294 | $scope.primayData.id = result.data; | 296 | $scope.primayData.id = result.data; |
295 | $scope.data = {}; | 297 | $scope.data = {}; |
296 | $scope.sendPrimaryContact(); | 298 | $scope.sendPrimaryContact(); |
297 | getContactList(); | 299 | getContactList(); |
298 | $scope.contactData.contactList = []; | 300 | $scope.contactData.contactList = []; |
299 | $scope.data.email = ''; | 301 | $scope.data.email = ''; |
300 | toastr.success('Created Successfully', { | 302 | toastr.success('Created Successfully', { |
301 | closeButton: true | 303 | closeButton: true |
302 | }) | 304 | }) |
303 | } else { | 305 | } else { |
304 | toastr.error('' + result.statusText + '', { | 306 | toastr.error('' + result.statusText + '', { |
305 | closeButton: true | 307 | closeButton: true |
306 | }) | 308 | }) |
307 | } | 309 | } |
308 | }) | 310 | }) |
309 | $scope.showLoader = false; | 311 | $scope.showLoader = false; |
310 | } | 312 | } |
311 | 313 | ||
312 | getData(); | 314 | getData(); |
313 | 315 | ||
314 | function getData() { | 316 | function getData() { |
315 | $scope.showLoader = true; | 317 | $scope.showLoader = true; |
316 | CustomersService.getAircraftMake().then(function(result) { | 318 | CustomersService.getAircraftMake().then(function(result) { |
317 | $scope.aircraftMakeList = result; | 319 | $scope.aircraftMakeList = result; |
318 | // console.log("make",result) | 320 | // console.log("make",result) |
319 | }) | 321 | }) |
320 | $scope.showLoader = false; | 322 | $scope.showLoader = false; |
321 | } | 323 | } |
322 | 324 | ||
323 | $scope.clearAircrafts = function() { | 325 | $scope.clearAircrafts = function() { |
324 | $scope.aircraftDetails = []; | 326 | $scope.aircraftDetails = []; |
325 | $scope.aircraftDetails = [{ | 327 | $scope.aircraftDetails = [{ |
326 | 'tail': '', | 328 | 'tail': '', |
327 | 'make': '', | 329 | 'make': '', |
328 | 'model': '', | 330 | 'model': '', |
329 | 'sizeId': '', | 331 | 'sizeId': '', |
330 | 'marginId': '', | 332 | 'marginId': '', |
331 | 'avgasMarginId': '' | 333 | 'avgasMarginId': '' |
332 | }]; | 334 | }]; |
333 | } | 335 | } |
334 | 336 | ||
335 | $scope.addNew = function() { | 337 | $scope.addNew = function() { |
336 | $scope.aircraftDetails.push({ | 338 | $scope.aircraftDetails.push({ |
337 | 'tail': '', | 339 | 'tail': '', |
338 | 'make': '', | 340 | 'make': '', |
339 | 'model': '', | 341 | 'model': '', |
340 | 'sizeId': '', | 342 | 'sizeId': '', |
341 | 'marginId': '', | 343 | 'marginId': '', |
342 | 'avgasMarginId': '' | 344 | 'avgasMarginId': '' |
343 | }); | 345 | }); |
344 | // console.log($scope.aircraftDetails) | 346 | // console.log($scope.aircraftDetails) |
345 | }; | 347 | }; |
346 | 348 | ||
347 | $scope.getModal = function(makeId, index) { | 349 | $scope.getModal = function(makeId, index) { |
348 | $scope.showLoader = true; | 350 | $scope.showLoader = true; |
349 | $scope.aircraft.make = makeId; | 351 | $scope.aircraft.make = makeId; |
350 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 352 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
351 | $scope.showLoader = false; | 353 | $scope.showLoader = false; |
352 | $scope.aircraftDetails[index].aircraftModalList = result; | 354 | $scope.aircraftDetails[index].aircraftModalList = result; |
353 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 355 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
354 | }) | 356 | }) |
355 | } | 357 | } |
356 | 358 | ||
357 | $scope.selectedOption = ''; | 359 | $scope.selectedOption = ''; |
358 | $scope.getSize = function(model, index) { | 360 | $scope.getSize = function(model, index) { |
359 | $scope.showLoader = true; | 361 | $scope.showLoader = true; |
360 | $scope.aircraft.model = model; | 362 | $scope.aircraft.model = model; |
361 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 363 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
362 | $scope.showLoader = false; | 364 | $scope.showLoader = false; |
363 | $scope.aircraftDetails[index].aircraftSizeList = result; | 365 | $scope.aircraftDetails[index].aircraftSizeList = result; |
364 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); | 366 | $scope.getFuelType($scope.aircraftDetails[index].aircraftSizeList[0].aircraftSize.id,index); |
365 | 367 | ||
366 | }) | 368 | }) |
367 | } | 369 | } |
368 | 370 | ||
369 | $scope.getFuelType = function(size, index) { | 371 | $scope.getFuelType = function(size, index) { |
370 | $scope.showLoader = true; | 372 | $scope.showLoader = true; |
371 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; | 373 | var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; |
372 | ViewCompanyService.checkFuelType(data).then(function(result){ | 374 | ViewCompanyService.checkFuelType(data).then(function(result){ |
373 | $scope.showLoader = false; | 375 | $scope.showLoader = false; |
374 | if (result.type == "JetA") { | 376 | if (result.type == "JetA") { |
375 | $scope.jetShow[index] = false; | 377 | $scope.jetShow[index] = false; |
376 | $scope.marginShow[index] = true; | 378 | $scope.marginShow[index] = true; |
377 | } else if (result.type == "Avgas") { | 379 | } else if (result.type == "Avgas") { |
378 | $scope.jetShow[index] = true; | 380 | $scope.jetShow[index] = true; |
379 | $scope.marginShow[index] = false; | 381 | $scope.marginShow[index] = false; |
380 | }else { | 382 | }else { |
381 | $scope.jetShow[index] = true; | 383 | $scope.jetShow[index] = true; |
382 | $scope.marginShow[index] = true; | 384 | $scope.marginShow[index] = true; |
383 | } | 385 | } |
384 | }) | 386 | }) |
385 | } | 387 | } |
386 | 388 | ||
387 | $scope.aircraftListData = {}; | 389 | $scope.aircraftListData = {}; |
388 | $scope.addData = []; | 390 | $scope.addData = []; |
389 | $scope.tailArray = []; | 391 | $scope.tailArray = []; |
390 | function check(array){ | 392 | function check(array){ |
391 | return (new Set(array)).size !== array.length; | 393 | return (new Set(array)).size !== array.length; |
392 | } | 394 | } |
393 | $scope.saveCompanyData = function() { | 395 | $scope.saveCompanyData = function() { |
394 | $scope.tailArray = []; | 396 | $scope.tailArray = []; |
395 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { | 397 | for (var i = 0; i < $scope.aircraftDetails.length; i++) { |
396 | $scope.addData.push({ | 398 | $scope.addData.push({ |
397 | 'tail': $scope.aircraftDetails[i].tail, | 399 | 'tail': $scope.aircraftDetails[i].tail, |
398 | 'make': $scope.aircraftDetails[i].make, | 400 | 'make': $scope.aircraftDetails[i].make, |
399 | 'model': $scope.aircraftDetails[i].model, | 401 | 'model': $scope.aircraftDetails[i].model, |
400 | 'sizeId': $scope.aircraftDetails[i].sizeId, | 402 | 'sizeId': $scope.aircraftDetails[i].sizeId, |
401 | 'marginId': $scope.aircraftDetails[i].marginId, | 403 | 'marginId': $scope.aircraftDetails[i].marginId, |
402 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 404 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
403 | }); | 405 | }); |
404 | $scope.tailArray.push($scope.aircraftDetails[i].tail); | 406 | $scope.tailArray.push($scope.aircraftDetails[i].tail); |
405 | } | 407 | } |
406 | console.log('check', check($scope.tailArray)); | 408 | console.log('check', check($scope.tailArray)); |
407 | if (check($scope.tailArray)) { | 409 | if (check($scope.tailArray)) { |
408 | toastr.error('Duplicate Tail Added.', { | 410 | toastr.error('Duplicate Tail Added.', { |
409 | closeButton: true | 411 | closeButton: true |
410 | }) | 412 | }) |
411 | }else{ | 413 | }else{ |
412 | $scope.aircraftListData.aircraftList = $scope.addData; | 414 | $scope.aircraftListData.aircraftList = $scope.addData; |
413 | $scope.aircraftListData.accountId = companyId; | 415 | $scope.aircraftListData.accountId = companyId; |
414 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 416 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
415 | if (result != null && result.success) { | 417 | if (result != null && result.success) { |
416 | toastr.success('' + result.success + '', { | 418 | toastr.success('' + result.success + '', { |
417 | closeButton: true | 419 | closeButton: true |
418 | }) | 420 | }) |
419 | $('#aircraft-modal-3').css('display', 'none'); | 421 | $('#aircraft-modal-3').css('display', 'none'); |
420 | $('.modal-backdrop').css('display', 'none'); | 422 | $('.modal-backdrop').css('display', 'none'); |
421 | getAircraftList(); | 423 | getAircraftList(); |
422 | } else { | 424 | } else { |
423 | toastr.error('' + result.statusText + '', { | 425 | toastr.error('' + result.statusText + '', { |
424 | closeButton: true | 426 | closeButton: true |
425 | }) | 427 | }) |
426 | } | 428 | } |
427 | }); | 429 | }); |
428 | } | 430 | } |
429 | 431 | ||
430 | } | 432 | } |
431 | 433 | ||
432 | $scope.showNoteData = true; | 434 | $scope.showNoteData = true; |
433 | $scope.showCompanyName = true; | 435 | $scope.showCompanyName = true; |
434 | $scope.showAddress = true; | 436 | $scope.showAddress = true; |
435 | $scope.showNote = function() { | 437 | $scope.showNote = function() { |
436 | $scope.showNoteData = false; | 438 | $scope.showNoteData = false; |
437 | $scope.showUpdateBtn = true; | 439 | $scope.showUpdateBtn = true; |
438 | } | 440 | } |
439 | 441 | ||
440 | $scope.company = function() { | 442 | $scope.company = function() { |
441 | $scope.showCompanyName = false; | 443 | $scope.showCompanyName = false; |
442 | $scope.showUpdateBtn = true; | 444 | $scope.showUpdateBtn = true; |
443 | } | 445 | } |
444 | 446 | ||
445 | $scope.base = function() { | 447 | $scope.base = function() { |
446 | $scope.showUpdateBtn = true; | 448 | $scope.showUpdateBtn = true; |
447 | } | 449 | } |
448 | 450 | ||
449 | $scope.addressChange = function() { | 451 | $scope.addressChange = function() { |
450 | $scope.showAddress = false; | 452 | $scope.showAddress = false; |
451 | $scope.showUpdateBtn = true; | 453 | $scope.showUpdateBtn = true; |
452 | } | 454 | } |
453 | 455 | ||
454 | $scope.editData = function(inputName) { | 456 | $scope.editData = function(inputName) { |
455 | console.log("===input===",inputName) | 457 | console.log("===input===",inputName) |
456 | //console.log($scope.companyData) | 458 | //console.log($scope.companyData) |
457 | $scope.showLoader = true; | 459 | $scope.showLoader = true; |
458 | /*if(inputName == 'showNoteData'){ | 460 | /*if(inputName == 'showNoteData'){ |
459 | $scope.showNoteData = true; | 461 | $scope.showNoteData = true; |
460 | }else if(inputName == 'showCompanyName'){ | 462 | }else if(inputName == 'showCompanyName'){ |
461 | $scope.showCompanyName = true; | 463 | $scope.showCompanyName = true; |
462 | }else if(inputName == 'showAddress'){ | 464 | }else if(inputName == 'showAddress'){ |
463 | $scope.showAddress = true; | 465 | $scope.showAddress = true; |
464 | }*/ | 466 | }*/ |
465 | $scope.showNoteData = true; | 467 | $scope.showNoteData = true; |
466 | $scope.showCompanyName = true; | 468 | $scope.showCompanyName = true; |
467 | $scope.showAddress = true; | 469 | $scope.showAddress = true; |
468 | 470 | ||
469 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + | 471 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin + "&avgasMargin=" + $scope.companyData.avgasMargin + |
470 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + | 472 | "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" + |
471 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + | 473 | $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" + |
472 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + | 474 | $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant + |
473 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + | 475 | "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor + |
474 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; | 476 | "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId + "&global=" + $scope.companyData.global; |
475 | 477 | ||
476 | ViewCompanyService.updateCompany(companyData).then(function(result) { | 478 | ViewCompanyService.updateCompany(companyData).then(function(result) { |
477 | if (result != null && result.success) { | 479 | if (result != null && result.success) { |
478 | toastr.success('' + result.success + '', { | 480 | toastr.success('' + result.success + '', { |
479 | closeButton: true | 481 | closeButton: true |
480 | }) | 482 | }) |
481 | $scope.showUpdateBtn = false; | 483 | $scope.showUpdateBtn = false; |
482 | getCompanyDetail(); | 484 | getCompanyDetail(); |
483 | } else { | 485 | } else { |
484 | toastr.error('Error Updating Company', { | 486 | toastr.error('Error Updating Company', { |
485 | closeButton: true | 487 | closeButton: true |
486 | }) | 488 | }) |
487 | $scope.showUpdateBtn = true; | 489 | $scope.showUpdateBtn = true; |
488 | } | 490 | } |
489 | $scope.showLoader = false; | 491 | $scope.showLoader = false; |
490 | }) | 492 | }) |
491 | } | 493 | } |
492 | 494 | ||
493 | $scope.cancelUpdateData = function() { | 495 | $scope.cancelUpdateData = function() { |
494 | $scope.showNoteData = true; | 496 | $scope.showNoteData = true; |
495 | $scope.showCompanyName = true; | 497 | $scope.showCompanyName = true; |
496 | $scope.showAddress = true; | 498 | $scope.showAddress = true; |
497 | $scope.showUpdateBtn = false; | 499 | $scope.showUpdateBtn = false; |
498 | } | 500 | } |
499 | 501 | ||
500 | $scope.sendMail = function() { | 502 | $scope.sendMail = function() { |
501 | $scope.showLoader = true; | 503 | $scope.showLoader = true; |
502 | $('#confirm1').css('display', 'none'); | 504 | $('#confirm1').css('display', 'none'); |
503 | ViewCompanyService.sendMail(companyId).then(function(result) { | 505 | ViewCompanyService.sendMail(companyId).then(function(result) { |
504 | if (result != null && result.success) { | 506 | if (result != null && result.success) { |
505 | toastr.success('' + result.success + '', { | 507 | toastr.success('' + result.success + '', { |
506 | closeButton: true | 508 | closeButton: true |
507 | }) | 509 | }) |
508 | } else { | 510 | } else { |
509 | toastr.error('Error Sending Email', { | 511 | toastr.error('Error Sending Email', { |
510 | closeButton: true | 512 | closeButton: true |
511 | }) | 513 | }) |
512 | } | 514 | } |
513 | $scope.showLoader = false; | 515 | $scope.showLoader = false; |
514 | }) | 516 | }) |
515 | } | 517 | } |
516 | 518 | ||
517 | $scope.openConfirmMail = function() { | 519 | $scope.openConfirmMail = function() { |
518 | $('#confirm1').css('display', 'block'); | 520 | $('#confirm1').css('display', 'block'); |
519 | } | 521 | } |
520 | 522 | ||
521 | 523 | ||
522 | $scope.cancelAndCloseConfirm = function() { | 524 | $scope.cancelAndCloseConfirm = function() { |
523 | $('#confirm1').css('display', 'none'); | 525 | $('#confirm1').css('display', 'none'); |
524 | } | 526 | } |
525 | 527 | ||
526 | $scope.primaryContact = false; | 528 | $scope.primaryContact = false; |
527 | $scope.cancelPrimaryContact = function() { | 529 | $scope.cancelPrimaryContact = function() { |
528 | $('#primaryContact').css('display', 'none'); | 530 | $('#primaryContact').css('display', 'none'); |
529 | $scope.primaryContact = false; | 531 | $scope.primaryContact = false; |
530 | } | 532 | } |
531 | 533 | ||
532 | $scope.checkPrimaryContact = function() { | 534 | $scope.checkPrimaryContact = function() { |
533 | if ($scope.primaryContact == true) { | 535 | if ($scope.primaryContact == true) { |
534 | $scope.primaryContact = true; | 536 | $scope.primaryContact = true; |
535 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { | 537 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { |
536 | //console.log(result) | 538 | //console.log(result) |
537 | if (result.status == 422) { | 539 | if (result.status == 422) { |
538 | $('#primaryContact').css('display', 'block'); | 540 | $('#primaryContact').css('display', 'block'); |
539 | } | 541 | } |
540 | }) | 542 | }) |
541 | } | 543 | } |
542 | } | 544 | } |
543 | 545 | ||
544 | $scope.sendPrimaryContact = function() { | 546 | $scope.sendPrimaryContact = function() { |
545 | $('#primaryContact').css('display', 'none'); | 547 | $('#primaryContact').css('display', 'none'); |
546 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { | 548 | if ($scope.primayData.id != null || $scope.primayData.id != undefined) { |
547 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; | 549 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; |
548 | 550 | ||
549 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { | 551 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { |
550 | // console.log(result) | 552 | // console.log(result) |
551 | }) | 553 | }) |
552 | } | 554 | } |
553 | 555 | ||
554 | } | 556 | } |
555 | 557 | ||
556 | $scope.updateData = "" | 558 | $scope.updateData = "" |
557 | $scope.showUpdateContact = function(data, value) { | 559 | $scope.showUpdateContact = function(data, value) { |
558 | $('#updateContact').css('display', 'block'); | 560 | $('#updateContact').css('display', 'block'); |
559 | $scope.updateData = data; | 561 | $scope.updateData = data; |
560 | // console.log($scope.updateData) | 562 | // console.log($scope.updateData) |
561 | if ($scope.updateData.email == null) { | 563 | if ($scope.updateData.email == null) { |
562 | $scope.updateData.content = data.contactNumber; | 564 | $scope.updateData.content = data.contactNumber; |
563 | } else { | 565 | } else { |
564 | $scope.updateData.content = data.email; | 566 | $scope.updateData.content = data.email; |
565 | } | 567 | } |
566 | } | 568 | } |
567 | 569 | ||
568 | $scope.showUpdateEmail = function(data, value) { | 570 | $scope.showUpdateEmail = function(data, value) { |
569 | $('#updateEmail').css('display', 'block'); | 571 | $('#updateEmail').css('display', 'block'); |
570 | $scope.updateData = data; | 572 | $scope.updateData = data; |
571 | // console.log($scope.updateData) | 573 | // console.log($scope.updateData) |
572 | if ($scope.updateData.email == null) { | 574 | if ($scope.updateData.email == null) { |
573 | $scope.updateData.content = data.contactNumber; | 575 | $scope.updateData.content = data.contactNumber; |
574 | } else { | 576 | } else { |
575 | $scope.updateData.content = data.email; | 577 | $scope.updateData.content = data.email; |
576 | } | 578 | } |
577 | } | 579 | } |
578 | 580 | ||
579 | $scope.acceptUpdateField = function(newContactName) { | 581 | $scope.acceptUpdateField = function(newContactName) { |
580 | // console.log($scope.updateData) | 582 | // console.log($scope.updateData) |
581 | if ($scope.updateData.content == undefined) { | 583 | if ($scope.updateData.content == undefined) { |
582 | toastr.error('Please add some content', { | 584 | toastr.error('Please add some content', { |
583 | closeButton: true | 585 | closeButton: true |
584 | }) | 586 | }) |
585 | } else { | 587 | } else { |
586 | if (newContactName == 'phone') { | 588 | if (newContactName == 'phone') { |
587 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 589 | var updateCustomData = "companyId=" + companyId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
588 | "&title=" + $scope.updateData.title; | 590 | "&title=" + $scope.updateData.title; |
589 | } else { | 591 | } else { |
590 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + | 592 | var updateCustomData = "companyId=" + companyId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id + |
591 | "&title=" + $scope.updateData.title; | 593 | "&title=" + $scope.updateData.title; |
592 | } | 594 | } |
593 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { | 595 | ViewCompanyService.updateCustomField(updateCustomData).then(function(result) { |
594 | if (result != null && result.success) { | 596 | if (result != null && result.success) { |
595 | $('#updateContact').css('display', 'none'); | 597 | $('#updateContact').css('display', 'none'); |
596 | $('#updateEmail').css('display', 'none'); | 598 | $('#updateEmail').css('display', 'none'); |
597 | getCompanyDetail(); | 599 | getCompanyDetail(); |
598 | } | 600 | } |
599 | }) | 601 | }) |
600 | } | 602 | } |
601 | } | 603 | } |
602 | 604 | ||
603 | $scope.deleteContent = function(data){ | 605 | $scope.deleteContent = function(data){ |
604 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { | 606 | ViewCompanyService.deleteCustomContact(data.id).then(function(result) { |
605 | if (result != null && result.success) { | 607 | if (result != null && result.success) { |
606 | toastr.success('' + result.success + '', { | 608 | toastr.success('' + result.success + '', { |
607 | closeButton: true | 609 | closeButton: true |
608 | }) | 610 | }) |
609 | getCompanyDetail(); | 611 | getCompanyDetail(); |
610 | } | 612 | } |
611 | }) | 613 | }) |
612 | } | 614 | } |
613 | 615 | ||
614 | $scope.cancelUpdateField = function() { | 616 | $scope.cancelUpdateField = function() { |
615 | $('#updateContact').css('display', 'none'); | 617 | $('#updateContact').css('display', 'none'); |
616 | $('#updateEmail').css('display', 'none'); | 618 | $('#updateEmail').css('display', 'none'); |
617 | } | 619 | } |
618 | 620 | ||
619 | $scope.showEditTier2 = function(number) { | 621 | $scope.showEditTier2 = function(number) { |
620 | // console.log(number) | 622 | // console.log(number) |
621 | $scope.contactNumber = number; | 623 | $scope.contactNumber = number; |
622 | } | 624 | } |
623 | 625 | ||
624 | 626 | ||
625 | 627 | ||
626 | $scope.addCustomPhone = function(value) { | 628 | $scope.addCustomPhone = function(value) { |
627 | //console.log(value) | 629 | //console.log(value) |
628 | if (value != null) { | 630 | if (value != null) { |
629 | $('#customFieldPhone').css('display', 'block'); | 631 | $('#customFieldPhone').css('display', 'block'); |
630 | } | 632 | } |
631 | $scope.custom = {}; | 633 | $scope.custom = {}; |
632 | } | 634 | } |
633 | 635 | ||
634 | $scope.addCustomEmail = function(value) { | 636 | $scope.addCustomEmail = function(value) { |
635 | //console.log(value) | 637 | //console.log(value) |
636 | if (value != null) { | 638 | if (value != null) { |
637 | $('#customFieldEmail').css('display', 'block'); | 639 | $('#customFieldEmail').css('display', 'block'); |
638 | } | 640 | } |
639 | $scope.custom = {}; | 641 | $scope.custom = {}; |
640 | } | 642 | } |
641 | 643 | ||
642 | $scope.cancelCustomField = function() { | 644 | $scope.cancelCustomField = function() { |
643 | $('#customFieldEmail').css('display', 'none'); | 645 | $('#customFieldEmail').css('display', 'none'); |
644 | $('#customFieldPhone').css('display', 'none'); | 646 | $('#customFieldPhone').css('display', 'none'); |
645 | } | 647 | } |
646 | 648 | ||
647 | $scope.acceptCustomField = function(contactName) { | 649 | $scope.acceptCustomField = function(contactName) { |
648 | if ($scope.custom.content == undefined) { | 650 | if ($scope.custom.content == undefined) { |
649 | toastr.error('Please add some content', { | 651 | toastr.error('Please add some content', { |
650 | closeButton: true | 652 | closeButton: true |
651 | }) | 653 | }) |
652 | } else { | 654 | } else { |
653 | if (contactName == 'phone') { | 655 | if (contactName == 'phone') { |
654 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + | 656 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content + |
655 | "&title=" + $scope.custom.title; | 657 | "&title=" + $scope.custom.title; |
656 | } else { | 658 | } else { |
657 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + | 659 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content + |
658 | "&title=" + $scope.custom.title; | 660 | "&title=" + $scope.custom.title; |
659 | } | 661 | } |
660 | // console.log(customData.email) | 662 | // console.log(customData.email) |
661 | ViewCompanyService.addCustomField(customData).then(function(result) { | 663 | ViewCompanyService.addCustomField(customData).then(function(result) { |
662 | // console.log(result) | 664 | // console.log(result) |
663 | if (result != null && result.success) { | 665 | if (result != null && result.success) { |
664 | $('#customFieldEmail').css('display', 'none'); | 666 | $('#customFieldEmail').css('display', 'none'); |
665 | $('#customFieldPhone').css('display', 'none'); | 667 | $('#customFieldPhone').css('display', 'none'); |
666 | $scope.custom = {}; | 668 | $scope.custom = {}; |
667 | getCompanyDetail(); | 669 | getCompanyDetail(); |
668 | } | 670 | } |
669 | }) | 671 | }) |
670 | } | 672 | } |
671 | } | 673 | } |
672 | 674 | ||
673 | /* omit strike out*/ | 675 | /* omit strike out*/ |
674 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 676 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
675 | $scope.fuelPricing = result; | 677 | $scope.fuelPricing = result; |
676 | $scope.omitData; | 678 | $scope.omitData; |
677 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ | 679 | ViewCompanyService.getOmitCompany($scope.compId).then(function(result){ |
678 | $scope.omitData = result; | 680 | $scope.omitData = result; |
679 | //console.log("omit data===", $scope.omitData); | 681 | //console.log("omit data===", $scope.omitData); |
680 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ | 682 | for(var i = 0 ; i< $scope.fuelPricing.length; i++){ |
681 | for(var j = 0; j<$scope.omitData.length; j++){ | 683 | for(var j = 0; j<$scope.omitData.length; j++){ |
682 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ | 684 | if($scope.omitData[j].marginId == $scope.fuelPricing[i].fuelPricing.id){ |
683 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; | 685 | $scope.fuelPricing[i].fuelPricing.omit = $scope.omitData[j].omit; |
684 | } | 686 | } |
685 | } | 687 | } |
686 | } | 688 | } |
687 | 689 | ||
688 | }) | 690 | }) |
689 | 691 | ||
690 | // console.log("$scope.fuelPricing",$scope.fuelPricing) | 692 | // console.log("$scope.fuelPricing",$scope.fuelPricing) |
691 | for (var i = 0; i < $scope.fuelPricing.length; i++) { | 693 | for (var i = 0; i < $scope.fuelPricing.length; i++) { |
692 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); | 694 | // console.log('$scope.fuelPricing[i].fuelPricing', $scope.fuelPricing[i].fuelPricing); |
693 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) | 695 | //console.log("fuelid",$scope.fuelPricing[i].fuelPricing.id,"getid",$scope.omitData[j].id) |
694 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { | 696 | if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { |
695 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 697 | $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
696 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); | 698 | var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); |
697 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 699 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
698 | var dday = newTime.getUTCDate(); | 700 | var dday = newTime.getUTCDate(); |
699 | var dyear = newTime.getUTCFullYear(); | 701 | var dyear = newTime.getUTCFullYear(); |
700 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; | 702 | $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth + '/' + dday + '/' + dyear; |
701 | } | 703 | } |
702 | // for (var j = 0; j<$scope.omitData.length; j++) { | 704 | // for (var j = 0; j<$scope.omitData.length; j++) { |
703 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ | 705 | // if($scope.fuelPricing[i].fuelPricing.id === $scope.omitData[j].id){ |
704 | 706 | ||
705 | // } | 707 | // } |
706 | // } | 708 | // } |
707 | } | 709 | } |
708 | }) | 710 | }) |
709 | 711 | ||
710 | var deleteAircraftId = ""; | 712 | var deleteAircraftId = ""; |
711 | $scope.deleteAircraft = function(id) { | 713 | $scope.deleteAircraft = function(id) { |
712 | $('#delete1').css('display', 'block'); | 714 | $('#delete1').css('display', 'block'); |
713 | deleteAircraftId = id; | 715 | deleteAircraftId = id; |
714 | } | 716 | } |
715 | 717 | ||
716 | $scope.aircraftDelete = function() { | 718 | $scope.aircraftDelete = function() { |
717 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { | 719 | ViewCompanyService.deleteAircraft(deleteAircraftId).then(function(result) { |
718 | // console.log(result) | 720 | // console.log(result) |
719 | getAircraftList(); | 721 | getAircraftList(); |
720 | getCompanyDetail(); | 722 | getCompanyDetail(); |
721 | $('#delete1').css('display', 'none'); | 723 | $('#delete1').css('display', 'none'); |
722 | }) | 724 | }) |
723 | } | 725 | } |
724 | 726 | ||
725 | $scope.cancelDelete = function() { | 727 | $scope.cancelDelete = function() { |
726 | $('#delete1').css('display', 'none'); | 728 | $('#delete1').css('display', 'none'); |
727 | } | 729 | } |
728 | 730 | ||
729 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 731 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
730 | $scope.jetMarginList = result; | 732 | $scope.jetMarginList = result; |
731 | }) | 733 | }) |
732 | 734 | ||
733 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 735 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
734 | $scope.avgsMarginList = result; | 736 | $scope.avgsMarginList = result; |
735 | }) | 737 | }) |
736 | 738 | ||
737 | $scope.changePriceEmail = function(id, index) { | 739 | $scope.changePriceEmail = function(id, index) { |
738 | event.stopPropagation(); | 740 | event.stopPropagation(); |
739 | var contactId = id; | 741 | var contactId = id; |
740 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; | 742 | var statusData = "status=" + $scope.companyContactList[index].priceEmail; |
741 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { | 743 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { |
742 | if (result.success) { | 744 | if (result.success) { |
743 | $('#toogleMail').css('display', 'block'); | 745 | $('#toogleMail').css('display', 'block'); |
744 | if ($scope.companyContactList[index].priceEmail == true) { | 746 | if ($scope.companyContactList[index].priceEmail == true) { |
745 | $scope.messageText = 'You have enabled price distribution for this contact'; | 747 | $scope.messageText = 'You have enabled price distribution for this contact'; |
746 | } else { | 748 | } else { |
747 | $scope.messageText = 'You have disabled price distribution for this contact'; | 749 | $scope.messageText = 'You have disabled price distribution for this contact'; |
748 | } | 750 | } |
749 | } | 751 | } |
750 | }) | 752 | }) |
751 | } | 753 | } |
752 | 754 | ||
753 | $scope.cancelToogle = function() { | 755 | $scope.cancelToogle = function() { |
754 | $('#toogleMail').css('display', 'none'); | 756 | $('#toogleMail').css('display', 'none'); |
755 | } | 757 | } |
756 | 758 | ||
757 | $scope.checkboxStatus = function(value) { | 759 | $scope.checkboxStatus = function(value) { |
758 | // console.log("checkbox",value) | 760 | // console.log("checkbox",value) |
759 | $scope.showUpdateBtn = true; | 761 | $scope.showUpdateBtn = true; |
760 | } | 762 | } |
761 | 763 | ||
762 | $scope.fuelercheckboxStatus = function(value) { | 764 | $scope.fuelercheckboxStatus = function(value) { |
763 | $('#fuelerchange').css('display', 'block'); | 765 | $('#fuelerchange').css('display', 'block'); |
764 | if (value == true) { | 766 | if (value == true) { |
765 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' | 767 | $scope.statusMessage = 'Please confirm! Enabling FuelerLinx for this customer will enable price distribution web services and disable price emails for the contacts in this company' |
766 | } else { | 768 | } else { |
767 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' | 769 | $scope.statusMessage = 'Please confirm! Disabling FuelerLinx for this customer will disable price distribution web services into their FuelerLinx account. If you proceed then remember to enable price emails for the appropriate contacts in this company.' |
768 | } | 770 | } |
769 | 771 | ||
770 | 772 | ||
771 | } | 773 | } |
772 | 774 | ||
773 | $scope.fuelerCancelStatus = function() { | 775 | $scope.fuelerCancelStatus = function() { |
774 | $('#fuelerchange').css('display', 'none'); | 776 | $('#fuelerchange').css('display', 'none'); |
775 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; | 777 | $scope.companyData.fuelerlinxCustomer = !$scope.companyData.fuelerlinxCustomer; |
776 | } | 778 | } |
777 | 779 | ||
778 | $scope.fuelerAcceptStatus = function() { | 780 | $scope.fuelerAcceptStatus = function() { |
779 | $('#fuelerchange').css('display', 'none'); | 781 | $('#fuelerchange').css('display', 'none'); |
780 | $scope.showLoader = true; | 782 | $scope.showLoader = true; |
781 | var statusData; | 783 | var statusData; |
782 | if ($scope.companyData.fuelerlinxCustomer == false) { | 784 | if ($scope.companyData.fuelerlinxCustomer == false) { |
783 | statusData = "status=true"; | 785 | statusData = "status=true"; |
784 | } else { | 786 | } else { |
785 | statusData = "status=false"; | 787 | statusData = "status=false"; |
786 | } | 788 | } |
787 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { | 789 | ViewCompanyService.fuelerPricingChange(companyId, statusData).then(function(result) { |
788 | if (result.success) { | 790 | if (result.success) { |
789 | $scope.showLoader = false; | 791 | $scope.showLoader = false; |
790 | 792 | ||
791 | $scope.editData(); | 793 | $scope.editData(); |
792 | getContactList(); | 794 | getContactList(); |
793 | 795 | ||
794 | } | 796 | } |
795 | }) | 797 | }) |
796 | } | 798 | } |
797 | 799 | ||
798 | 800 | ||
799 | $scope.updateOmit = function(fuel, omit) { | 801 | $scope.updateOmit = function(fuel, omit) { |
800 | $scope.fuelData = {}; | 802 | $scope.fuelData = {}; |
801 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); | 803 | $scope.fuelData.expirationDate = new Date(fuel.expirationDate); |
802 | $scope.fuelData.customMarginId = fuel.id; | 804 | $scope.fuelData.customMarginId = fuel.id; |
803 | $scope.fuelData.omit = fuel.omit; | 805 | $scope.fuelData.omit = fuel.omit; |
804 | $scope.fuelData.papMargin = fuel.papMargin; | 806 | $scope.fuelData.papMargin = fuel.papMargin; |
805 | $scope.fuelData.papTotal = fuel.papTotal; | 807 | $scope.fuelData.papTotal = fuel.papTotal; |
806 | $scope.fuelData.cost = fuel.cost; | 808 | $scope.fuelData.cost = fuel.cost; |
807 | $scope.fuelData.companyId = $scope.compId ; | 809 | $scope.fuelData.companyId = $scope.compId ; |
808 | if($scope.fuelData.omit == true) | 810 | if($scope.fuelData.omit == true) |
809 | { | 811 | { |
810 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 812 | var customData = "companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
811 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { | 813 | ViewCompanyService.omitAddCompanyFuel(customData).then(function(result) { |
812 | if (result.success) { | 814 | if (result.success) { |
813 | toastr.success('' + result.success + '', { | 815 | toastr.success('' + result.success + '', { |
814 | closeButton: true | 816 | closeButton: true |
815 | }) | 817 | }) |
816 | } else { | 818 | } else { |
817 | toastr.error('' + result.statusText + '', { | 819 | toastr.error('' + result.statusText + '', { |
818 | closeButton: true | 820 | closeButton: true |
819 | }) | 821 | }) |
820 | } | 822 | } |
821 | }) | 823 | }) |
822 | }else{ | 824 | }else{ |
823 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; | 825 | var data ="companyId=" + $scope.fuelData.companyId + "&customMarginId=" + $scope.fuelData.customMarginId; |
824 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ | 826 | ViewCompanyService.omitDeleteCompanyFuel(data).then(function(result){ |
825 | if (result.success) { | 827 | if (result.success) { |
826 | toastr.success('' + result.success + '', { | 828 | toastr.success('' + result.success + '', { |
827 | closeButton: true | 829 | closeButton: true |
828 | }) | 830 | }) |
829 | } else { | 831 | } else { |
830 | toastr.error('' + result.statusText + '', { | 832 | toastr.error('' + result.statusText + '', { |
831 | closeButton: true | 833 | closeButton: true |
832 | }) | 834 | }) |
833 | } | 835 | } |
834 | }) | 836 | }) |
835 | } | 837 | } |
836 | } | 838 | } |
837 | 839 | ||
838 | 840 | ||
839 | //--fuel type based on tail is not in use-- | 841 | //--fuel type based on tail is not in use-- |
840 | // $scope.aircraftData = {} | 842 | // $scope.aircraftData = {} |
841 | /*$scope.checkJetWithTail = function(tail, index) { | 843 | /*$scope.checkJetWithTail = function(tail, index) { |
842 | 844 | ||
843 | console.log("tail==============",tail, index) | 845 | console.log("tail==============",tail, index) |
844 | ViewCompanyService.checkJetType(tail).then(function(result) { | 846 | ViewCompanyService.checkJetType(tail).then(function(result) { |
845 | console.log("result",result) | 847 | console.log("result",result) |
846 | if (result.jetA == "true") { | 848 | if (result.jetA == "true") { |
847 | $scope.jetShow[index] = false; | 849 | $scope.jetShow[index] = false; |
848 | $scope.marginShow[index] = true; | 850 | $scope.marginShow[index] = true; |
849 | } else { | 851 | } else { |
850 | $scope.jetShow[index] = true; | 852 | $scope.jetShow[index] = true; |
851 | $scope.marginShow[index] = false; | 853 | $scope.marginShow[index] = false; |
852 | } | 854 | } |
853 | }) | 855 | }) |
854 | }*/ | 856 | }*/ |
855 | 857 | ||
856 | 858 | ||
857 | /*add a fuel order*/ | 859 | /*add a fuel order*/ |
858 | 860 | ||
859 | 861 | ||
860 | $scope.getOrders = function() { | 862 | $scope.getOrders = function() { |
861 | fuelOrdersService.getOrders().then(function(result) { | 863 | fuelOrdersService.getOrders().then(function(result) { |
862 | 864 | ||
863 | $scope.orderdata = result; | 865 | $scope.orderdata = result; |
864 | for (var i = 0; i < $scope.orderdata.length; i++) { | 866 | for (var i = 0; i < $scope.orderdata.length; i++) { |
865 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 867 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
866 | 868 | ||
867 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 869 | // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
868 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() | 870 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() |
869 | // str = str.slice(4,16) | 871 | // str = str.slice(4,16) |
870 | $scope.orderdata[i].upliftDateString = str | 872 | $scope.orderdata[i].upliftDateString = str |
871 | // console.log(str); | 873 | // console.log(str); |
872 | 874 | ||
873 | } | 875 | } |
874 | 876 | ||
875 | $scope.displayFuelOrderList = new NgTableParams({ | 877 | $scope.displayFuelOrderList = new NgTableParams({ |
876 | page: 1, | 878 | page: 1, |
877 | count: 10, | 879 | count: 10, |
878 | }, { | 880 | }, { |
879 | data: $scope.orderdata | 881 | data: $scope.orderdata |
880 | }); | 882 | }); |
881 | $(document).ready(function() { | 883 | $(document).ready(function() { |
882 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 884 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
883 | 885 | ||
884 | for (var i = 0; i < myselect.length; i++) { | 886 | for (var i = 0; i < myselect.length; i++) { |
885 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 887 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
886 | colourIndex = colourIndex + 1; | 888 | colourIndex = colourIndex + 1; |
887 | // console.log(colourIndex); | 889 | // console.log(colourIndex); |
888 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); | 890 | var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); |
889 | $(myselect[i]).css('background-color', getColor); | 891 | $(myselect[i]).css('background-color', getColor); |
890 | // console.log('colour', getColor); | 892 | // console.log('colour', getColor); |
891 | myselect[i].blur(); | 893 | myselect[i].blur(); |
892 | } | 894 | } |
893 | 895 | ||
894 | }) | 896 | }) |
895 | 897 | ||
896 | }) | 898 | }) |
897 | } | 899 | } |
898 | 900 | ||
899 | $scope.getOrders(); | 901 | $scope.getOrders(); |
900 | 902 | ||
901 | $scope.tiervalue=function(){ | 903 | $scope.tiervalue=function(){ |
902 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; | 904 | $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; |
903 | } | 905 | } |
904 | 906 | ||
905 | $scope.setCost = function(cost){ | 907 | $scope.setCost = function(cost){ |
906 | if(cost != null) { | 908 | if(cost != null) { |
907 | var obj =JSON.parse(cost); | 909 | var obj =JSON.parse(cost); |
908 | $scope.order.fboCost = obj.cost; | 910 | $scope.order.fboCost = obj.cost; |
909 | } | 911 | } |
910 | } | 912 | } |
911 | 913 | ||
912 | $scope.cancelOrder = function() { | 914 | $scope.cancelOrder = function() { |
913 | $scope.order = {}; | 915 | $scope.order = {}; |
914 | } | 916 | } |
915 | 917 | ||
916 | $scope.dispatchFuel = function(){ | 918 | $scope.dispatchFuel = function(){ |
917 | $scope.showLoader = true; | 919 | $scope.showLoader = true; |
918 | $scope.order.companyId = $scope.compId; | 920 | $scope.order.companyId = $scope.compId; |
919 | if ($scope.order.upliftDate != '') { | 921 | if ($scope.order.upliftDate != '') { |
920 | var currentDate = new Date(); | 922 | var currentDate = new Date(); |
921 | var hours = currentDate.getHours(); | 923 | var hours = currentDate.getHours(); |
922 | var min = currentDate.getMinutes(); | 924 | var min = currentDate.getMinutes(); |
923 | var sec = currentDate.getSeconds(); | 925 | var sec = currentDate.getSeconds(); |
924 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 926 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
925 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 927 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
926 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 928 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
927 | } | 929 | } |
928 | $scope.order.status = 'pending'; | 930 | $scope.order.status = 'pending'; |
929 | var obj =JSON.parse($scope.order.priceQuote); | 931 | var obj =JSON.parse($scope.order.priceQuote); |
930 | $scope.order.priceQuote = obj.papTotal; | 932 | $scope.order.priceQuote = obj.papTotal; |
931 | $scope.order.fboCost = obj.cost; | 933 | $scope.order.fboCost = obj.cost; |
932 | $scope.order.total = obj.papTotal * $scope.order.volume; | 934 | $scope.order.total = obj.papTotal * $scope.order.volume; |
933 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 935 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
934 | $scope.order.aircraftName = aircraftObj.tail; | 936 | $scope.order.aircraftName = aircraftObj.tail; |
935 | $scope.order.make = aircraftObj.make; | 937 | $scope.order.make = aircraftObj.make; |
936 | $scope.order.model = aircraftObj.model; | 938 | $scope.order.model = aircraftObj.model; |
937 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 939 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
938 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 940 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
939 | $scope.showLoader = false; | 941 | $scope.showLoader = false; |
940 | $scope.order = {}; | 942 | $scope.order = {}; |
941 | $('#demo-modal-4').css('display', ''); | 943 | $('#demo-modal-4').css('display', ''); |
942 | toastr.success('Fuel Order Dispatched Successfully', { | 944 | toastr.success('Fuel Order Dispatched Successfully', { |
943 | closeButton: true | 945 | closeButton: true |
944 | }) | 946 | }) |
945 | }) | 947 | }) |
946 | } | 948 | } |
947 | 949 | ||
948 | $scope.addTotal = function(value, valueOf) { | 950 | $scope.addTotal = function(value, valueOf) { |
949 | if (valueOf == 'v') { | 951 | if (valueOf == 'v') { |
950 | $scope.order.total = value * $scope.order.invoiced | 952 | $scope.order.total = value * $scope.order.invoiced |
951 | } else if (valueOf == 'i') { | 953 | } else if (valueOf == 'i') { |
952 | $scope.order.total = $scope.order.volume * value | 954 | $scope.order.total = $scope.order.volume * value |
953 | } | 955 | } |
954 | } | 956 | } |
955 | 957 | ||
956 | $scope.getAircraft = function(company) { | 958 | $scope.getAircraft = function(company) { |
957 | $scope.selectedCompanyName = company; | 959 | $scope.selectedCompanyName = company; |
958 | 960 | ||
959 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { | 961 | if ($scope.companyData.margin != null && $scope.companyData.marginAVGAS != null) { |
960 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { | 962 | fuelOrdersService.getFuelCost($scope.companyData.id).then(function(margins) { |
961 | $scope.marginList = margins; | 963 | $scope.marginList = margins; |
962 | //console.log('$scope.marginList', $scope.marginList); | 964 | //console.log('$scope.marginList', $scope.marginList); |
963 | }) | 965 | }) |
964 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { | 966 | } else if ($scope.companyData.margin != null || $scope.companyData.marginAVGAS == null) { |
965 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { | 967 | fuelOrdersService.getATypeFuelPricing($scope.companyData.id).then(function(margins) { |
966 | $scope.marginList = margins; | 968 | $scope.marginList = margins; |
967 | }) | 969 | }) |
968 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { | 970 | } else if ($scope.companyData.margin == null || $scope.companyData.marginAVGAS != null) { |
969 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { | 971 | fuelOrdersService.getVTypeFuelPricing($scope.companyData.id).then(function(margins) { |
970 | $scope.marginList = margins; | 972 | $scope.marginList = margins; |
971 | }) | 973 | }) |
972 | } | 974 | } |
973 | 975 | ||
974 | 976 | ||
975 | $scope.selectedCompanyId = $scope.companyData.id; | 977 | $scope.selectedCompanyId = $scope.companyData.id; |
976 | $scope.marginId = $scope.companyData.margin.id; | 978 | $scope.marginId = $scope.companyData.margin.id; |
977 | if ($scope.selectedCompanyId != '') { | 979 | if ($scope.selectedCompanyId != '') { |
978 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 980 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
979 | $scope.aircraftList = aircraft; | 981 | $scope.aircraftList = aircraft; |
980 | }) | 982 | }) |
981 | } | 983 | } |
982 | if ($scope.marginId != '') { | 984 | if ($scope.marginId != '') { |
983 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 985 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
984 | $scope.tierList = tiers; | 986 | $scope.tierList = tiers; |
985 | // $scope.showLoader = false; | 987 | // $scope.showLoader = false; |
986 | }) | 988 | }) |
987 | } | 989 | } |
988 | 990 | ||
989 | } | 991 | } |
990 | 992 | ||
991 | $scope.setCost = function(cost) { | 993 | $scope.setCost = function(cost) { |
992 | // console.log(cost); | 994 | // console.log(cost); |
993 | if (cost != null) { | 995 | if (cost != null) { |
994 | var obj = JSON.parse(cost); | 996 | var obj = JSON.parse(cost); |
995 | // console.log("0bj",obj) | 997 | // console.log("0bj",obj) |
996 | $scope.order.fboCost = obj.cost; | 998 | $scope.order.fboCost = obj.cost; |
997 | } | 999 | } |
998 | 1000 | ||
999 | } | 1001 | } |
1000 | 1002 | ||
1001 | $scope.sourceList = [{ | 1003 | $scope.sourceList = [{ |
1002 | source: "Direct Jet-A" | 1004 | source: "Direct Jet-A" |
1003 | }, { | 1005 | }, { |
1004 | source: "Direct AVGAS 100LL" | 1006 | source: "Direct AVGAS 100LL" |
1005 | }]; | 1007 | }]; |
1006 | $scope.cancelData = function() { | 1008 | $scope.cancelData = function() { |
1007 | $('#demo-modal-4').css('display', ''); | 1009 | $('#demo-modal-4').css('display', ''); |
1008 | } | 1010 | } |
1009 | 1011 | ||
1010 | $scope.setFuel = function() { | 1012 | $scope.setFuel = function() { |
1011 | $('#demo-modal-4').css('display', 'block'); | 1013 | $('#demo-modal-4').css('display', 'block'); |
1012 | 1014 | ||
1013 | } | 1015 | } |
1014 | 1016 | ||
1015 | /*delete company*/ | 1017 | /*delete company*/ |
1016 | var deletecompanyId = ""; | 1018 | var deletecompanyId = ""; |
1017 | $scope.deleteComp = function(companyDataid) { | 1019 | $scope.deleteComp = function(companyDataid) { |
1018 | $('#delete2').css('display', 'block'); | 1020 | $('#delete2').css('display', 'block'); |
1019 | //console.log("asda",companyDataid) | 1021 | //console.log("asda",companyDataid) |
1020 | deletecompanyId = companyDataid; | 1022 | deletecompanyId = companyDataid; |
1021 | } | 1023 | } |
1022 | $scope.aircraftIdx = ''; | 1024 | $scope.aircraftIdx = ''; |
1023 | $scope.checkTail = function(tail, idx){ | 1025 | $scope.checkTail = function(tail, idx){ |
1024 | var data = "tail=" + tail + "&id=" + companyId; | 1026 | var data = "tail=" + tail + "&id=" + companyId; |
1025 | $scope.aircraftIdx = idx; | 1027 | $scope.aircraftIdx = idx; |
1026 | ViewCompanyService.checkTail(data).then(function(result) { | 1028 | ViewCompanyService.checkTail(data).then(function(result) { |
1027 | if(result.error) { | 1029 | if(result.error) { |
1028 | $scope.aircraftMessage = result.error; | 1030 | $scope.aircraftMessage = result.error; |
1029 | $scope.openAddAirCraftError(); | 1031 | $scope.openAddAirCraftError(); |
1030 | } else if(result.warning) { | 1032 | } else if(result.warning) { |
1031 | $scope.aircraftMessage = result.warning; | 1033 | $scope.aircraftMessage = result.warning; |
1032 | $scope.openAddAirCraftWarning(); | 1034 | $scope.openAddAirCraftWarning(); |
1033 | } | 1035 | } |
1034 | }) | 1036 | }) |
1035 | } | 1037 | } |
1036 | 1038 | ||
1037 | $scope.openAddAirCraftError = function() { | 1039 | $scope.openAddAirCraftError = function() { |
1038 | $('#addAirCraftError').css('display', 'block'); | 1040 | $('#addAirCraftError').css('display', 'block'); |
1039 | } | 1041 | } |
1040 | 1042 | ||
1041 | $scope.openAddAirCraftWarning = function() { | 1043 | $scope.openAddAirCraftWarning = function() { |
1042 | $('#addAirCraftWarning').css('display', 'block'); | 1044 | $('#addAirCraftWarning').css('display', 'block'); |
1043 | } | 1045 | } |
1044 | $scope.acceptAirCraftError = function() { | 1046 | $scope.acceptAirCraftError = function() { |
1045 | $('#addAirCraftWarning').css('display', 'none'); | 1047 | $('#addAirCraftWarning').css('display', 'none'); |
1046 | } | 1048 | } |
1047 | 1049 | ||
1048 | $scope.cancelAirCraftError = function() { | 1050 | $scope.cancelAirCraftError = function() { |
1049 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; | 1051 | $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; |
1050 | $('#addAirCraftWarning').css('display', 'none'); | 1052 | $('#addAirCraftWarning').css('display', 'none'); |
1051 | $('#addAirCraftError').css('display', 'none'); | 1053 | $('#addAirCraftError').css('display', 'none'); |
1052 | } | 1054 | } |
1053 | 1055 | ||
1054 | $scope.deleteCompanyData = function() { | 1056 | $scope.deleteCompanyData = function() { |
1055 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { | 1057 | ViewCompanyService.deleteCompany(deletecompanyId).then(function(result) { |
1056 | 1058 | ||
1057 | $('#delete2').css('display', 'none'); | 1059 | $('#delete2').css('display', 'none'); |
1058 | if (result.success) { | 1060 | if (result.success) { |
1059 | toastr.success('' + result.success + '', { | 1061 | toastr.success('' + result.success + '', { |
1060 | closeButton: true | 1062 | closeButton: true |
1061 | 1063 | ||
1062 | }) | 1064 | }) |
1063 | } else { | 1065 | } else { |
1064 | toastr.error('' + result.statusText + '', { | 1066 | toastr.error('' + result.statusText + '', { |
1065 | closeButton: true | 1067 | closeButton: true |
1066 | 1068 | ||
1067 | }) | 1069 | }) |
1068 | } | 1070 | } |
1069 | $state.go('app.customers') | 1071 | $state.go('app.customers') |
1070 | }) | 1072 | }) |
1071 | } | 1073 | } |
1072 | $scope.cancelDelete = function() { | 1074 | $scope.cancelDelete = function() { |
1073 | $('#delete2').css('display', 'none'); | 1075 | $('#delete2').css('display', 'none'); |
1074 | } | 1076 | } |
1075 | 1077 | ||
1076 | 1078 | ||
1077 | $scope.editJetMargin = function(aircraftData, type) { | 1079 | $scope.editJetMargin = function(aircraftData, type) { |
1078 | $scope.showLoader = true; | 1080 | $scope.showLoader = true; |
1079 | if (type == 'jet') { | 1081 | if (type == 'jet') { |
1080 | 1082 | ||
1081 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; | 1083 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; |
1082 | 1084 | ||
1083 | } else { | 1085 | } else { |
1084 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; | 1086 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsAVGASMargin.id + "&type=" + type; |
1085 | } | 1087 | } |
1086 | 1088 | ||
1087 | var id = aircraftData.id; | 1089 | var id = aircraftData.id; |
1088 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { | 1090 | ViewCompanyService.updateAircraftMargin(aircraftdataMargin, id).then(function(result) { |
1089 | if (result != null && result.success) { | 1091 | if (result != null && result.success) { |
1090 | $scope.showLoader = false; | 1092 | $scope.showLoader = false; |
1091 | toastr.success('' + result.success + '', { | 1093 | toastr.success('' + result.success + '', { |
1092 | closeButton: true | 1094 | closeButton: true |
1093 | }) | 1095 | }) |
1094 | // getAircraftWithMarginList(); | 1096 | // getAircraftWithMarginList(); |
1095 | getAircraftList(); | 1097 | getAircraftList(); |
1096 | } else { | 1098 | } else { |
1097 | $scope.showLoader = false; | 1099 | $scope.showLoader = false; |
1098 | toastr.error('' + result.statusText + '', { | 1100 | toastr.error('' + result.statusText + '', { |
1099 | closeButton: true | 1101 | closeButton: true |
1100 | }) | 1102 | }) |
1101 | } | 1103 | } |
1102 | }) | 1104 | }) |
1103 | } | 1105 | } |
1104 | 1106 | ||
1105 | 1107 | ||
1106 | /* //not used currently | 1108 | /* //not used currently |
1107 | function getAircraftWithMarginList() { | 1109 | function getAircraftWithMarginList() { |
1108 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { | 1110 | ViewCompanyService.getJetAMargin(companyId).then(function(result) { |
1109 | $scope.contactAircraftList = result; | 1111 | $scope.contactAircraftList = result; |
1110 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { | 1112 | for (var i = 0; i < $scope.contactAircraftList.length; i++) { |
1111 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { | 1113 | if ($scope.contactAircraftList[i].aircraftsMargin != null) { |
1112 | $scope.aircraftmargins.push({ | 1114 | $scope.aircraftmargins.push({ |
1113 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id | 1115 | 'id': $scope.contactAircraftList[i].aircraftsMargin.id |
1114 | }) | 1116 | }) |
1115 | } | 1117 | } |
1116 | } | 1118 | } |
1117 | if ($scope.aircraftmargins.length > 0) { | 1119 | if ($scope.aircraftmargins.length > 0) { |
1118 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { | 1120 | for (var i = 0; i < $scope.aircraftmargins.length; i++) { |
1119 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { | 1121 | if ($scope.aircraftmargins[i].id != $scope.companyData.masterMargin) { |
1120 | $scope.multiple = true; | 1122 | $scope.multiple = true; |
1121 | $scope.multipleMsg = true; | 1123 | $scope.multipleMsg = true; |
1122 | if ($scope.multiple) { | 1124 | if ($scope.multiple) { |
1123 | $scope.companyData.masterMargin = "multiple"; | 1125 | $scope.companyData.masterMargin = "multiple"; |
1124 | } | 1126 | } |
1125 | } | 1127 | } |
1126 | } | 1128 | } |
1127 | } | 1129 | } |
1128 | }) | 1130 | }) |
1129 | }*/ | 1131 | }*/ |
1130 | 1132 | ||
1131 | 1133 | ||
1132 | }]); | 1134 | }]); |
app/partials/viewCompany/viewCompany.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ca5c6a; | 3 | color: #ca5c6a; |
4 | } | 4 | } |
5 | .widget-content{ | 5 | .widget-content{ |
6 | padding: 10px !important; | 6 | padding: 10px !important; |
7 | } | 7 | } |
8 | .widget-content input[type="text"], .widget-content select{ | 8 | .widget-content input[type="text"], .widget-content select{ |
9 | height: 31px; | 9 | height: 31px; |
10 | padding: 0; | 10 | padding: 0; |
11 | } | 11 | } |
12 | .new-label span{ | 12 | .new-label span{ |
13 | float: left; | 13 | float: left; |
14 | line-height: 31px; | 14 | line-height: 31px; |
15 | } | 15 | } |
16 | .new-label span:first-child{ | 16 | .new-label span:first-child{ |
17 | margin-right: 5px; | 17 | margin-right: 5px; |
18 | font-weight: bold; | 18 | font-weight: bold; |
19 | } | 19 | } |
20 | .new-label span:last-child{ | 20 | .new-label span:last-child{ |
21 | margin-left: 5px; | 21 | margin-left: 5px; |
22 | } | 22 | } |
23 | .new-label select{ | 23 | .new-label select{ |
24 | display: -webkit-inline-box; | 24 | display: -webkit-inline-box; |
25 | display: inline-box; | 25 | display: inline-box; |
26 | float: left; | 26 | float: left; |
27 | } | 27 | } |
28 | .new-address p{ | 28 | .new-address p{ |
29 | margin-bottom: 0; | 29 | margin-bottom: 0; |
30 | } | 30 | } |
31 | .new-add-select{ | 31 | .new-add-select{ |
32 | padding-left: 15px; | 32 | padding-left: 15px; |
33 | margin: 10px 0; | 33 | margin: 10px 0; |
34 | } | 34 | } |
35 | .new-add-select select{ | 35 | .new-add-select select{ |
36 | width: 100px; | 36 | width: 100px; |
37 | } | 37 | } |
38 | .widget{ | 38 | .widget{ |
39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 39 | -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 40 | -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | 41 | box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); |
42 | } | 42 | } |
43 | .optionclass { | 43 | .optionclass { |
44 | background: #fff; | 44 | background: #fff; |
45 | } | 45 | } |
46 | .timess { | 46 | .timess { |
47 | float: right !important; | 47 | float: right !important; |
48 | margin-top: 10px !important; | 48 | margin-top: 10px !important; |
49 | margin-right: 10px !important; | 49 | margin-right: 10px !important; |
50 | color: #999 !important; | 50 | color: #999 !important; |
51 | cursor: pointer !important; | 51 | cursor: pointer !important; |
52 | } | 52 | } |
53 | 53 | ||
54 | .button1 { | 54 | .button1 { |
55 | display: inline-block; | 55 | display: inline-block; |
56 | height: 35px; | 56 | height: 35px; |
57 | line-height: 35px; | 57 | line-height: 35px; |
58 | padding-right: 15px; | 58 | padding-right: 15px; |
59 | padding-left: 50px; | 59 | padding-left: 50px; |
60 | position: relative; | 60 | position: relative; |
61 | background-color:rgb(41,127,184); | 61 | background-color:rgb(41,127,184); |
62 | color:rgb(255,255,255); | 62 | color:rgb(255,255,255); |
63 | text-decoration: none; | 63 | text-decoration: none; |
64 | text-transform: uppercase; | 64 | text-transform: uppercase; |
65 | letter-spacing: 1px; | 65 | letter-spacing: 1px; |
66 | margin-bottom: 15px; | 66 | margin-bottom: 15px; |
67 | border: 0; | 67 | border: 0; |
68 | 68 | ||
69 | 69 | ||
70 | border-radius: 5px; | 70 | border-radius: 5px; |
71 | -moz-border-radius: 5px; | 71 | -moz-border-radius: 5px; |
72 | -webkit-border-radius: 5px; | 72 | -webkit-border-radius: 5px; |
73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 74 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
76 | 76 | ||
77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 78 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 79 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 80 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
82 | } | 82 | } |
83 | 83 | ||
84 | .button1 span { | 84 | .button1 span { |
85 | position: absolute; | 85 | position: absolute; |
86 | left: 0; | 86 | left: 0; |
87 | top: 0; | 87 | top: 0; |
88 | width: 35px; | 88 | width: 35px; |
89 | background-color:rgba(0,0,0,0.5); | 89 | background-color:rgba(0,0,0,0.5); |
90 | 90 | ||
91 | -webkit-border-top-left-radius: 5px; | 91 | -webkit-border-top-left-radius: 5px; |
92 | -webkit-border-bottom-left-radius: 5px; | 92 | -webkit-border-bottom-left-radius: 5px; |
93 | -moz-border-radius-topleft: 5px; | 93 | -moz-border-radius-topleft: 5px; |
94 | -moz-border-radius-bottomleft: 5px; | 94 | -moz-border-radius-bottomleft: 5px; |
95 | border-top-left-radius: 5px; | 95 | border-top-left-radius: 5px; |
96 | border-bottom-left-radius: 5px; | 96 | border-bottom-left-radius: 5px; |
97 | border-right: 1px solid rgba(0,0,0,0.15); | 97 | border-right: 1px solid rgba(0,0,0,0.15); |
98 | } | 98 | } |
99 | 99 | ||
100 | .button1:hover span, .button1.active span { | 100 | .button1:hover span, .button1.active span { |
101 | background-color:rgb(0,102,26); | 101 | background-color:rgb(0,102,26); |
102 | border-right: 1px solid rgba(0,0,0,0.3); | 102 | border-right: 1px solid rgba(0,0,0,0.3); |
103 | } | 103 | } |
104 | 104 | ||
105 | .button1:active { | 105 | .button1:active { |
106 | margin-top: 2px; | 106 | margin-top: 2px; |
107 | margin-bottom: 13px; | 107 | margin-bottom: 13px; |
108 | 108 | ||
109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 110 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 111 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 112 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
114 | } | 114 | } |
115 | 115 | ||
116 | .button1.turquoise { | 116 | .button1.turquoise { |
117 | background: #449d44; | 117 | background: #449d44; |
118 | } | 118 | } |
119 | 119 | ||
120 | </style> | 120 | </style> |
121 | 121 | ||
122 | <div class="myLoader" ng-show="showLoader"> | 122 | <div class="myLoader" ng-show="showLoader"> |
123 | <img src="../img/hourglass.gif" width="50px;"> | 123 | <img src="../img/hourglass.gif" width="50px;"> |
124 | </div> | 124 | </div> |
125 | 125 | ||
126 | <div class="col-xs-12 col-md-12"> | 126 | <div class="col-xs-12 col-md-12"> |
127 | <div class="row" style="margin-left:0px"> | 127 | <div class="row" style="margin-left:0px"> |
128 | <div class="col-md-12"> | 128 | <div class="col-md-12"> |
129 | <div class="widget"> | 129 | <div class="widget"> |
130 | <div class="widget-header"> | 130 | <div class="widget-header"> |
131 | <i class="fa fa-building-o" aria-hidden="true"></i> | 131 | <i class="fa fa-building-o" aria-hidden="true"></i> |
132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true"></i></h3> | 132 | <h3>{{companyData.companyName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteComp(companyData.id)" aria-hidden="true" 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 | <!-- /widget-header --> | 135 | <!-- /widget-header --> |
136 | <div class="widget-content"> | 136 | <div class="widget-content"> |
137 | <div class="row" style="margin-left:0px"> | 137 | <div class="row" style="margin-left:0px"> |
138 | <div class="col-md-6" ng-show="isGlobal"> | 138 | <div class="col-md-6" ng-show="isGlobal"> |
139 | <div class="widget"> | 139 | <div class="widget"> |
140 | <div class="widget-header"> | 140 | <div class="widget-header"> |
141 | <i class="fa fa-building-o" aria-hidden="true"></i> | 141 | <i class="fa fa-building-o" aria-hidden="true"></i> |
142 | <h3>Company Details</h3> | 142 | <h3>Company Details</h3> |
143 | <label>BASE ICAO</label> | 143 | <label>BASE ICAO</label> |
144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 144 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
145 | 145 | ||
146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 146 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 147 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
148 | </div> | 148 | </div> |
149 | 149 | ||
150 | </div> | 150 | </div> |
151 | <div class="widget-content" style="min-height: 350px;"> | 151 | <div class="widget-content" style="min-height: 350px;"> |
152 | <div class="row" style="margin-left:0px;"> | 152 | <div class="row" style="margin-left:0px;"> |
153 | <div class="col-md-7" style="padding-left: 0;"> | 153 | <div class="col-md-7" style="padding-left: 0;"> |
154 | <h4 ng-show="showCompanyName"> | 154 | <h4 ng-show="showCompanyName"> |
155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 155 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> |
156 | </h4> | 156 | </h4> |
157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 157 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
158 | </div> | 158 | </div> |
159 | <div class="col-md-5"> | 159 | <div class="col-md-5"> |
160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 160 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 161 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 162 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 163 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 164 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
165 | <option class="optionclass" value="military">Military</option> | 165 | <option class="optionclass" value="military">Military</option> |
166 | <option class="optionclass" value="government">Government</option> | 166 | <option class="optionclass" value="government">Government</option> |
167 | </select> | 167 | </select> |
168 | </div> | 168 | </div> |
169 | </div> | 169 | </div> |
170 | <div> | 170 | <div> |
171 | <p class="new-label"> | 171 | <p class="new-label"> |
172 | <span>JET A Margin </span> | 172 | <span>JET A Margin </span> |
173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 173 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
174 | <option ng-if="multiple" value="multiple">Multiple</option> | 174 | <option ng-if="multiple" value="multiple">Multiple</option> |
175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 175 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
176 | </select> | 176 | </select> |
177 | <span ng-show="multipleMsg"> See Aircrart List</span> | 177 | <span ng-show="multipleMsg"> See Aircrart List</span> |
178 | <div class="clearfix"></div> | 178 | <div class="clearfix"></div> |
179 | </p> | 179 | </p> |
180 | </div> | 180 | </div> |
181 | <div> | 181 | <div> |
182 | <p class="new-label"> | 182 | <p class="new-label"> |
183 | <span>AVGAS 100LL </span> | 183 | <span>AVGAS 100LL </span> |
184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 184 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
185 | <option value="">N/A</option> | 185 | <option value="">N/A</option> |
186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 186 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
187 | </select> | 187 | </select> |
188 | <div class="clearfix"></div> | 188 | <div class="clearfix"></div> |
189 | </p> | 189 | </p> |
190 | </div> | 190 | </div> |
191 | <div> | 191 | <div> |
192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> | 192 | <ui-select multiple class="form-control" ng-model="selected" name="name" ng-change="changeValue(selected)"> |
193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> | 193 | <ui-select-match placeholder="Select or Search">{{$item.first}}</ui-select-match> |
194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> | 194 | <ui-select-choices repeat="val.first as val in values | filter: $select.search"> |
195 | {{val.first}} | 195 | {{val.first}} |
196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> | 196 | <!-- <div ng-bind-html="val | highlight: $select"></div> --> |
197 | </ui-select-choices> | 197 | </ui-select-choices> |
198 | </ui-select> | 198 | </ui-select> |
199 | </div> | 199 | </div> |
200 | </br> | 200 | </br> |
201 | <div class="new-address"> | 201 | <div class="new-address"> |
202 | </div> | 202 | </div> |
203 | <div> | 203 | <div> |
204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 204 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 205 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 206 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
207 | </div> | 207 | </div> |
208 | <div class="pull-left"> | 208 | <div class="pull-left"> |
209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 209 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 210 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
211 | </div> | 211 | </div> |
212 | <div class="pull-right"> | 212 | <div class="pull-right"> |
213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 213 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 214 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
215 | </div> | 215 | </div> |
216 | <div class="clearfix"></div> | 216 | <div class="clearfix"></div> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
220 | <div class="col-md-6" ng-hide="isGlobal"> | 220 | <div class="col-md-6" ng-hide="isGlobal"> |
221 | <div class="widget"> | 221 | <div class="widget"> |
222 | <div class="widget-header"> | 222 | <div class="widget-header"> |
223 | <i class="fa fa-building-o" aria-hidden="true"></i> | 223 | <i class="fa fa-building-o" aria-hidden="true"></i> |
224 | <h3>Company Details</h3> | 224 | <h3>Company Details</h3> |
225 | <label>BASE ICAO</label> | 225 | <label>BASE ICAO</label> |
226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> | 226 | <input type="tel" ng-model="companyData.baseIcao" ng-click="base()" style="line-height: 18px;width: 80px;padding: 0px 9px;" /> |
227 | 227 | ||
228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> | 228 | <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> |
229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> | 229 | <toggle ng-model="companyData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> |
230 | </div> | 230 | </div> |
231 | 231 | ||
232 | </div> | 232 | </div> |
233 | <div class="widget-content"> | 233 | <div class="widget-content"> |
234 | <div class="row" style="margin-left:0px;"> | 234 | <div class="row" style="margin-left:0px;"> |
235 | <div class="col-md-7" style="padding-left: 0;"> | 235 | <div class="col-md-7" style="padding-left: 0;"> |
236 | <h4 ng-show="showCompanyName"> | 236 | <h4 ng-show="showCompanyName"> |
237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | 237 | <b style="color:#F90;">{{companyData.companyName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true" ng-show="!fboPreffered"></i> |
238 | </h4> | 238 | </h4> |
239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> | 239 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control"/> |
240 | </div> | 240 | </div> |
241 | <div class="col-md-5"> | 241 | <div class="col-md-5"> |
242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> | 242 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType"> |
243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> | 243 | <option class="optionclass" value="" disabled selected>Certificate Type</option> |
244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 244 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 245 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 246 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
247 | <option class="optionclass" value="military">Military</option> | 247 | <option class="optionclass" value="military">Military</option> |
248 | <option class="optionclass" value="government">Government</option> | 248 | <option class="optionclass" value="government">Government</option> |
249 | </select> | 249 | </select> |
250 | </div> | 250 | </div> |
251 | </div> | 251 | </div> |
252 | <div> | 252 | <div> |
253 | <p class="new-label"> | 253 | <p class="new-label"> |
254 | <span>JET A Margin </span> | 254 | <span>JET A Margin </span> |
255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> | 255 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.masterMargin"> |
256 | <option ng-if="multiple" value="multiple">Multiple</option> | 256 | <option ng-if="multiple" value="multiple">Multiple</option> |
257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 257 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
258 | </select> | 258 | </select> |
259 | <span ng-show="multipleMsg"> See Aircraft List</span> | 259 | <span ng-show="multipleMsg"> See Aircraft List</span> |
260 | <div class="clearfix"></div> | 260 | <div class="clearfix"></div> |
261 | </p> | 261 | </p> |
262 | </div> | 262 | </div> |
263 | <div> | 263 | <div> |
264 | <p class="new-label"> | 264 | <p class="new-label"> |
265 | <span>AVGAS 100LL </span> | 265 | <span>AVGAS 100LL </span> |
266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> | 266 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="companyData.avgasMargin"> |
267 | <option value="">N/A</option> | 267 | <option value="">N/A</option> |
268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 268 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
269 | </select> | 269 | </select> |
270 | <div class="clearfix"></div> | 270 | <div class="clearfix"></div> |
271 | </p> | 271 | </p> |
272 | </div> | 272 | </div> |
273 | <div class="row" style="margin-left:0px;" ng-show="fboPreffered"> | ||
274 | <p style="color:red"> <i class="fa fa-search-plus" ></i> FBOInsights Preffered</p> | ||
275 | </div> | ||
273 | <div class="row" style="margin-left:0px;"> | 276 | <div class="row" style="margin-left:0px;"> |
274 | <div class="col-md-5" style="padding-left: 0;"> | 277 | <div class="col-md-5" style="padding-left: 0;"> |
275 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer | 278 | <input type="checkbox" name="" ng-model="companyData.baseTenant" ng-change="checkboxStatus(companyData.baseTenant)"> Tenant/Base Customer |
276 | </div> | 279 | </div> |
277 | <!--fuelerlinxCustomer later use not to be deleted just hidden--> | 280 | <!--fuelerlinxCustomer later use not to be deleted just hidden--> |
278 | <!-- <div class="col-md-5" style="padding-left: 0;"> | 281 | <!-- <div class="col-md-5" style="padding-left: 0;"> |
279 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer | 282 | <input type="checkbox" name="" ng-model="companyData.fuelerlinxCustomer" ng-change="fuelercheckboxStatus(companyData.fuelerlinxCustomer)"> FuelerLinx Customer |
280 | </div> | 283 | </div> |
281 | </div>--> | 284 | </div>--> |
282 | <div> | 285 | <div> |
283 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member | 286 | <input type="checkbox" name="" ng-model="companyData.contractFuelVendor" ng-change="checkboxStatus(companyData.contractFuelVendor)"> CAA Member |
284 | </div> | 287 | </div> |
288 | |||
285 | </div> | 289 | </div> |
286 | </br> | 290 | </br> |
287 | <div class="new-address"> | 291 | <div class="new-address"> |
288 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> | 292 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> |
289 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, | 293 | <span ng-hide="companyData.addressOne == 'null'">{{companyData.addressOne}}</span><span ng-hide="companyData.addressTwo == 'null'">, |
290 | {{companyData.addressTwo}}</span> <span ng-hide="companyData.city == 'null'"><br/>{{companyData.city}},</span> <span ng-hide="companyData.state == 'null'">{{companyData.state}}</span> <span ng-hide="companyData.zipcode == 'null'">{{companyData.zipcode}}</span> <span ng-hide="companyData.country == 'null'"></br>{{companyData.country}}</span> <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | 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> |
291 | 295 | ||
292 | <div ng-hide="showAddress" style="margin-bottom:10px;"> | 296 | <div ng-hide="showAddress" style="margin-bottom:10px;"> |
293 | <label>Address1</label> | 297 | <label>Address1</label> |
294 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> | 298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" /> |
295 | <label>Address2</label> | 299 | <label>Address2</label> |
296 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> | 300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" /> |
297 | <label>City</label> | 301 | <label>City</label> |
298 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> | 302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.city" class="form-control" /> |
299 | <label>State</label> | 303 | <label>State</label> |
300 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> | 304 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.state" class="form-control" /> |
301 | <label>ZipCode</label> | 305 | <label>ZipCode</label> |
302 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> | 306 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.zipcode" class="form-control" /> |
303 | <label>Country</label> | 307 | <label>Country</label> |
304 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> | 308 | <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="companyData.country" class="form-control" /> |
305 | </div> | 309 | </div> |
306 | 310 | ||
307 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> | 311 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"> |
308 | <i class="fa fa-phone" ng-hide="showEditContact"></i> | 312 | <i class="fa fa-phone" ng-hide="showEditContact"></i> |
309 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> | 313 | <span ng-hide="showEditContact">{{data.contactNumber}} </span> |
310 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 314 | <i ng-click="showUpdateContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
311 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> | 315 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditContact" aria-hidden="true"></i> |
312 | </p> | 316 | </p> |
313 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> | 317 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"> |
314 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> | 318 | <i class="fa fa-envelope" ng-hide="showEditEmail"></i> |
315 | <span ng-hide="showEditEmail">{{data.email}} </span> | 319 | <span ng-hide="showEditEmail">{{data.email}} </span> |
316 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> | 320 | <i ng-click="showUpdateEmail(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> |
317 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> | 321 | <i class="fa fa-trash-o" ng-click="deleteContent(data)" ng-hide="showEditEmail" aria-hidden="true"></i> |
318 | </p> | 322 | </p> |
319 | </div> | 323 | </div> |
320 | <div style="margin-top:5px; margin-bottom:5px;"> | 324 | <div style="margin-top:5px; margin-bottom:5px;"> |
321 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> | 325 | <button type="button" ng-click="addCustomPhone('phone')" class="btn btn-default">Add Phone</button> |
322 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> | 326 | <button type="button" class="btn btn-info" ng-click="addCustomEmail('email')">Add Email</button> |
323 | </div> | 327 | </div> |
324 | <div> | 328 | <div> |
325 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 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> |
326 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 330 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
327 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> | 331 | <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="companyData.internalNote" rows="4" cols="34"></textarea> |
328 | </div> | 332 | </div> |
329 | <div class="pull-left"> | 333 | <div class="pull-left"> |
330 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> | 334 | <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> |
331 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> | 335 | <button ng-click="cancelUpdateData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> |
332 | </div> | 336 | </div> |
333 | <div class="pull-right"> | 337 | <div class="pull-right"> |
334 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 338 | <button type="button" ng-show="isShowEmail" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
335 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> | 339 | <button type="button" class="btn btn-info" ng-click="setFuel()">Setup Fuel</button> |
336 | </div> | 340 | </div> |
337 | <div class="clearfix"></div> | 341 | <div class="clearfix"></div> |
338 | </div> | 342 | </div> |
339 | </div> | 343 | </div> |
340 | </div> | 344 | </div> |
341 | <div class="col-md-6"> | 345 | <div class="col-md-6"> |
342 | <div class="widget" style="min-height: 350px;"> | 346 | <div class="widget" style="min-height: 350px;"> |
343 | <div class="widget-header"> | 347 | <div class="widget-header"> |
344 | <i class="fa fa-plane"></i> | 348 | <i class="fa fa-plane"></i> |
345 | <h3>Aircraft List</h3> | 349 | <h3>Aircraft List</h3> |
346 | <div class="pull-right"> | 350 | <div class="pull-right"> |
347 | <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft </button> | 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> |
348 | </div> | 352 | </div> |
349 | </div> | 353 | </div> |
350 | <div class="widget-content" style="padding:0px;min-height: 350px;"> | 354 | <div class="widget-content" style="padding:0px;min-height: 350px;"> |
351 | <div class="table-responsive"> | 355 | <div class="table-responsive"> |
352 | <table class="table table-bordered table-hover table-striped"> | 356 | <table class="table table-bordered table-hover table-striped" ng-show="!fboPreffered"> |
353 | <thead> | 357 | <thead> |
354 | <tr> | 358 | <tr> |
355 | <th>Tail #</th> | 359 | <th>Tail #</th> |
356 | <th>Make</th> | 360 | <th>Make</th> |
357 | <th>Model</th> | 361 | <th>Model</th> |
358 | <th>Fuel Type</th> | 362 | <th>Fuel Type</th> |
359 | <th>Margin</th> | 363 | <th>Margin</th> |
360 | <th>Value</th> | 364 | <th>Value</th> |
361 | <th>All In</th> | 365 | <th>All In</th> |
362 | <!-- <th>AVGAS</th> --> | 366 | <!-- <th>AVGAS</th> --> |
363 | <!-- <th>All In</th> --> | 367 | <!-- <th>All In</th> --> |
364 | <th></th> | 368 | <th></th> |
365 | </tr> | 369 | </tr> |
366 | </thead> | 370 | </thead> |
367 | <tbody> | 371 | <tbody> |
368 | <tr ng-repeat="aircraft in contactAircraftList"> | 372 | <tr ng-repeat="aircraft in contactAircraftList"> |
369 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> | 373 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.tail}}</td> |
370 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> | 374 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.make}}</td> |
371 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> | 375 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> |
372 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> | 376 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> |
373 | <td> | 377 | <td> |
374 | <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> | 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> |
375 | <option value="">N/A</option> | 379 | <option value="">N/A</option> |
376 | </select> | 380 | </select> |
377 | <!-- </td> | 381 | <!-- </td> |
378 | <td> --> | 382 | <td> --> |
379 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> | 383 | <select ng-show ="xyz && aircraft.fuelType=='100LL'" class="form-control" style="height:31px;" ng-model="aircraft.aircraftsAVGASMargin.id" ng-change="editJetMargin(aircraft,'avgas')"> |
380 | <option value="">N/A</option> | 384 | <option value="">N/A</option> |
381 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 385 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
382 | </select> | 386 | </select> |
383 | </td> | 387 | </td> |
384 | <td ng-style="aircraft.global"> | 388 | <td ng-style="aircraft.global"> |
385 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> | 389 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> |
386 | =${{aircraft.marginValue}} | 390 | =${{aircraft.marginValue}} |
387 | </span> | 391 | </span> |
388 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} | 392 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} |
389 | </span> | 393 | </span> |
390 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} | 394 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} |
391 | </span> | 395 | </span> |
392 | </td> | 396 | </td> |
393 | <td> | 397 | <td> |
394 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> | 398 | <!-- <td ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</td> |
395 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> | 399 | <td ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</td> --> |
396 | 400 | ||
397 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> | 401 | <label id="l1" ng-show="abc && aircraft.fuelType=='Jet-A'" style="color:#55AF8B;">${{aircraft.marginAllIn | number : 4}}</label> |
398 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> | 402 | <label id="l2" ng-show="xyz && aircraft.fuelType=='100LL'" style="color:#55AF8B;">${{aircraft.marginAvgasAllIn | number : 4}}</label> |
399 | </td> | 403 | </td> |
400 | <td> | 404 | <td> |
401 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> | 405 | <i class="fa fa-trash-o deleteTierIcon" ng-if="!aircraft.global" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> |
402 | </td> | 406 | </td> |
403 | </tr> | 407 | </tr> |
404 | </tbody> | 408 | </tbody> |
405 | </table> | 409 | </table> |
410 | <table class="table table-bordered table-hover table-striped" ng-show="fboPreffered"> | ||
411 | <thead> | ||
412 | <tr> | ||
413 | <th>Tail #</th> | ||
414 | <th>Make</th> | ||
415 | <th>Model</th> | ||
416 | <th>Fuel Type</th> | ||
417 | <th>Margin</th> | ||
418 | <th>Value</th> | ||
419 | <th>All In</th> | ||
420 | <!-- <th>AVGAS</th> --> | ||
421 | <!-- <th>All In</th> --> | ||
422 | <th></th> | ||
423 | </tr> | ||
424 | </thead> | ||
425 | <tbody> | ||
426 | <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.make}}</td> | ||
429 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.model}}</td> | ||
430 | <td ng-style="aircraft.global && {color:'#9e9696'}">{{aircraft.fuelType}}</td> | ||
431 | <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 | <option value="">N/A</option> | ||
434 | </select> | ||
435 | <!-- </td> | ||
436 | <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 | <option value="">N/A</option> | ||
439 | <option ng-repeat="margin in avgsMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | ||
440 | </select> | ||
441 | </td> | ||
442 | <td ng-style="aircraft.global"> | ||
443 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'equal' || aircraft.aircraftsAVGASMargin.pricingStructure === 'equal' "> | ||
444 | =${{aircraft.marginValue}} | ||
445 | </span> | ||
446 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'minus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'minus'" style="color: #ff0000;">-${{aircraft.marginValue}} | ||
447 | </span> | ||
448 | <span ng-if="aircraft.aircraftsMargin.pricingStructure === 'plus' || aircraft.aircraftsAVGASMargin.pricingStructure === 'plus' " style="color: green;">+${{aircraft.marginValue}} | ||
449 | </span> | ||
450 | </td> | ||
451 | <td> | ||
452 | <!-- <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 | |||
455 | <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 | </td> | ||
458 | <td> | ||
459 | <i class="fa fa-lock" aria-hidden="true" style="font-size:24px"></i> | ||
460 | </td> | ||
461 | </tr> | ||
462 | </tbody> | ||
463 | </table> | ||
406 | </div> | 464 | </div> |
407 | </div> | 465 | </div> |
408 | </div> | 466 | </div> |
409 | </div> | 467 | </div> |
410 | </div> | 468 | </div> |
411 | <div class="row" style="margin-left:0px"> | 469 | <div class="row" style="margin-left:0px"> |
412 | <div class="col-md-6"> | 470 | <div class="col-md-6"> |
413 | <div class="widget"> | 471 | <div class="widget"> |
414 | <div class="widget-header"> | 472 | <div class="widget-header"> |
415 | <i class="fa fa-user"></i> | 473 | <i class="fa fa-user"></i> |
416 | <h3>Contact List</h3> | 474 | <h3>Contact List</h3> |
417 | <div class="pull-right"> | 475 | <div class="pull-right"> |
418 | <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> | 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> |
419 | </div> | 477 | </div> |
420 | </div> | 478 | </div> |
421 | <div class="widget-content" style="padding:0px"> | 479 | <div class="widget-content" style="padding:0px"> |
422 | <div class="table-responsive"> | 480 | <div class="table-responsive"> |
423 | <table class="table table-bordered table-hover table-striped"> | 481 | <table class="table table-bordered table-hover table-striped"> |
424 | <thead> | 482 | <thead> |
425 | <tr> | 483 | <tr> |
426 | <th>Price Email</th> | 484 | <th>Price Email</th> |
427 | <th>First Name</th> | 485 | <th>First Name</th> |
428 | <th>Last Name</th> | 486 | <th>Last Name</th> |
429 | <th>Title</th> | 487 | <th>Title</th> |
430 | </tr> | 488 | </tr> |
431 | </thead> | 489 | </thead> |
432 | <tbody> | 490 | <tbody> |
433 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> | 491 | <tr ng-repeat="contact in companyContactList" style="cursor: pointer;" ui-sref="app.viewContact({id : contact.id})"> |
434 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> | 492 | <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)" size="customToogle"></toggle></td> |
435 | <td> | 493 | <td> |
436 | {{contact.firstName}} | 494 | {{contact.firstName}} |
437 | </td> | 495 | </td> |
438 | <td>{{contact.lastName}}</td> | 496 | <td>{{contact.lastName}}</td> |
439 | <td>{{contact.title}}</td> | 497 | <td>{{contact.title}}</td> |
440 | </tr> | 498 | </tr> |
441 | </tbody> | 499 | </tbody> |
442 | </table> | 500 | </table> |
443 | </div> | 501 | </div> |
444 | </div> | 502 | </div> |
445 | </div> | 503 | </div> |
446 | </div> | 504 | </div> |
447 | <div class="col-md-6"> | 505 | <div class="col-md-6"> |
448 | <div class="widget"> | 506 | <div class="widget"> |
449 | <div class="widget-header"> | 507 | <div class="widget-header"> |
450 | <i class="fa fa-pencil"></i> | 508 | <i class="fa fa-pencil"></i> |
451 | <h3>Price Manager Reference</h3> | 509 | <h3>Price Manager Reference</h3> |
452 | </div> | 510 | </div> |
453 | <div class="widget-content"> | 511 | <div class="widget-content"> |
454 | <div class="table-responsive"> | 512 | <div class="table-responsive"> |
455 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> | 513 | <table class="table table-striped strikeTable" style="position: relative; margin-bottom: 0;"> |
456 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> | 514 | <!-- <table class="table table-striped" style="position: relative; margin-bottom: 0;"> --> |
457 | <thead> | 515 | <thead> |
458 | <tr> | 516 | <tr> |
459 | <th>Omit</th> | 517 | <th>Omit</th> |
460 | <th>Product</th> | 518 | <th>Product</th> |
461 | <th>Cost</th> | 519 | <th>Cost</th> |
462 | <th>PAP (Margin)</th> | 520 | <th>PAP (Margin)</th> |
463 | <th>PAP (Total)</th> | 521 | <th>PAP (Total)</th> |
464 | <th style="color:#F90">Expires</th> | 522 | <th style="color:#F90">Expires</th> |
465 | </tr> | 523 | </tr> |
466 | </thead> | 524 | </thead> |
467 | <tbody> | 525 | <tbody> |
468 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> | 526 | <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }" ng-class="fuel.fuelPricing.omit ? 'strikeout' : ''"> |
469 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> | 527 | <!-- <tr ng-repeat="fuel in fuelPricing | orderBy:'name' : 'reverse' | filter:{ status: true }"> --> |
470 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> | 528 | <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> |
471 | <td>{{fuel.name}}</td> | 529 | <td>{{fuel.name}}</td> |
472 | <td>${{fuel.fuelPricing.cost | number :4}}</td> | 530 | <td>${{fuel.fuelPricing.cost | number :4}}</td> |
473 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> | 531 | <td>${{fuel.fuelPricing.papMargin | number :4}}</td> |
474 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> | 532 | <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number :4}}</td> |
475 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> | 533 | <td style="color:#F90">{{fuel.fuelPricing.expirationDate | date : "MM/dd/y" }}</td> |
476 | </tr> | 534 | </tr> |
477 | 535 | ||
478 | </tbody> | 536 | </tbody> |
479 | </table> | 537 | </table> |
480 | </div> | 538 | </div> |
481 | </div> | 539 | </div> |
482 | </div> | 540 | </div> |
483 | </div> | 541 | </div> |
484 | </div> | 542 | </div> |
485 | </div> | 543 | </div> |
486 | <!-- /widget-content --> | 544 | <!-- /widget-content --> |
487 | </div> | 545 | </div> |
488 | <!-- /widget --> | 546 | <!-- /widget --> |
489 | </div> | 547 | </div> |
490 | <!-- /span6 --> | 548 | <!-- /span6 --> |
491 | </div> | 549 | </div> |
492 | <!-- /widget --> | 550 | <!-- /widget --> |
493 | </div> | 551 | </div> |
494 | <!-- /container --> | 552 | <!-- /container --> |
495 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> | 553 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> |
496 | <div class="modal-dialog modal-lg"> | 554 | <div class="modal-dialog modal-lg"> |
497 | <div class="modal-content"> | 555 | <div class="modal-content"> |
498 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 556 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
499 | <div> | 557 | <div> |
500 | <div class="row" style="margin: 0;"> | 558 | <div class="row" style="margin: 0;"> |
501 | <div> | 559 | <div> |
502 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | 560 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> |
503 | <div class="widget-header"> | 561 | <div class="widget-header"> |
504 | <i class="icon-pencil"></i> | 562 | <i class="icon-pencil"></i> |
505 | <i class="fa fa-tasks" aria-hidden="true"></i> | 563 | <i class="fa fa-tasks" aria-hidden="true"></i> |
506 | <h3>Add a New Contact</h3> | 564 | <h3>Add a New Contact</h3> |
507 | <div class="clearfix"></div> | 565 | <div class="clearfix"></div> |
508 | </div> | 566 | </div> |
509 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 567 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
510 | <div class="col-xs-12"> | 568 | <div class="col-xs-12"> |
511 | <div class="col-md-6"> | 569 | <div class="col-md-6"> |
512 | <div class="pull-left" style="width: 110px;"> | 570 | <div class="pull-left" style="width: 110px;"> |
513 | <label class="new-input-label"><b>First Name</b></label> | 571 | <label class="new-input-label"><b>First Name</b></label> |
514 | </div> | 572 | </div> |
515 | <div class="pull-left" style="margin-left: 15px;"> | 573 | <div class="pull-left" style="margin-left: 15px;"> |
516 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | 574 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> |
517 | </div> | 575 | </div> |
518 | <div class="clearfix"></div> | 576 | <div class="clearfix"></div> |
519 | </div> | 577 | </div> |
520 | <div class="col-md-6"> | 578 | <div class="col-md-6"> |
521 | 579 | ||
522 | <div class="pull-left" style="width: 110px;"> | 580 | <div class="pull-left" style="width: 110px;"> |
523 | <label class="new-input-label"><b>Last Name</b></label> | 581 | <label class="new-input-label"><b>Last Name</b></label> |
524 | </div> | 582 | </div> |
525 | <div class="pull-left" style="margin-left: 15px;"> | 583 | <div class="pull-left" style="margin-left: 15px;"> |
526 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | 584 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> |
527 | </div> | 585 | </div> |
528 | <div class="clearfix"></div> | 586 | <div class="clearfix"></div> |
529 | </div> | 587 | </div> |
530 | </div> | 588 | </div> |
531 | <div class="clearfix"></div><br> | 589 | <div class="clearfix"></div><br> |
532 | <div class="col-xs-12"> | 590 | <div class="col-xs-12"> |
533 | <div class="col-md-6"> | 591 | <div class="col-md-6"> |
534 | <div class="pull-left" style="width: 110px;"> | 592 | <div class="pull-left" style="width: 110px;"> |
535 | <label class="new-input-label"><b>Title</b></label> | 593 | <label class="new-input-label"><b>Title</b></label> |
536 | </div> | 594 | </div> |
537 | <div class="pull-left" style="margin-left: 15px;"> | 595 | <div class="pull-left" style="margin-left: 15px;"> |
538 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | 596 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> |
539 | </div> | 597 | </div> |
540 | <div class="clearfix"></div> | 598 | <div class="clearfix"></div> |
541 | </div> | 599 | </div> |
542 | <div class="col-md-6"> | 600 | <div class="col-md-6"> |
543 | 601 | ||
544 | <div class="pull-left" style="width: 110px;"> | 602 | <div class="pull-left" style="width: 110px;"> |
545 | <label class="new-input-label"><b>Email</b></label> | 603 | <label class="new-input-label"><b>Email</b></label> |
546 | </div> | 604 | </div> |
547 | <div class="pull-left" style="margin-left: 15px;"> | 605 | <div class="pull-left" style="margin-left: 15px;"> |
548 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | 606 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> |
549 | </div> | 607 | </div> |
550 | <div class="clearfix"></div> | 608 | <div class="clearfix"></div> |
551 | </div> | 609 | </div> |
552 | </div> | 610 | </div> |
553 | <div class="clearfix"></div><br> | 611 | <div class="clearfix"></div><br> |
554 | <div class="col-xs-12"> | 612 | <div class="col-xs-12"> |
555 | <div class="col-md-6"> | 613 | <div class="col-md-6"> |
556 | <div class="pull-left" style="width: 110px;"> | 614 | <div class="pull-left" style="width: 110px;"> |
557 | <label class="new-input-label"><b>Username</b></label> | 615 | <label class="new-input-label"><b>Username</b></label> |
558 | </div> | 616 | </div> |
559 | <div class="pull-left" style="margin-left: 15px;"> | 617 | <div class="pull-left" style="margin-left: 15px;"> |
560 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | 618 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> |
561 | </div> | 619 | </div> |
562 | <div class="clearfix"></div> | 620 | <div class="clearfix"></div> |
563 | </div> | 621 | </div> |
564 | <div class="col-md-6"> | 622 | <div class="col-md-6"> |
565 | 623 | ||
566 | <div class="pull-left" style="width: 110px;"> | 624 | <div class="pull-left" style="width: 110px;"> |
567 | <label class="new-input-label"><b>Password</b></label> | 625 | <label class="new-input-label"><b>Password</b></label> |
568 | </div> | 626 | </div> |
569 | <div class="pull-left" style="margin-left: 15px;"> | 627 | <div class="pull-left" style="margin-left: 15px;"> |
570 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | 628 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> |
571 | </div> | 629 | </div> |
572 | <div class="clearfix"></div> | 630 | <div class="clearfix"></div> |
573 | </div> | 631 | </div> |
574 | </div> | 632 | </div> |
575 | <div class="clearfix"></div><br> | 633 | <div class="clearfix"></div><br> |
576 | <div class="col-xs-12"> | 634 | <div class="col-xs-12"> |
577 | <div class="col-md-6"> | 635 | <div class="col-md-6"> |
578 | <div class="pull-left" style="width: 110px;"> | 636 | <div class="pull-left" style="width: 110px;"> |
579 | <label class="new-input-label"><b>Work Phone</b></label> | 637 | <label class="new-input-label"><b>Work Phone</b></label> |
580 | </div> | 638 | </div> |
581 | <div class="pull-left" style="margin-left: 15px;"> | 639 | <div class="pull-left" style="margin-left: 15px;"> |
582 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | 640 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> |
583 | </div> | 641 | </div> |
584 | <div class="clearfix"></div> | 642 | <div class="clearfix"></div> |
585 | </div> | 643 | </div> |
586 | <div class="col-md-6"> | 644 | <div class="col-md-6"> |
587 | 645 | ||
588 | <div class="pull-left" style="width: 110px;"> | 646 | <div class="pull-left" style="width: 110px;"> |
589 | <label class="new-input-label"><b>Mobile Phone</b></label> | 647 | <label class="new-input-label"><b>Mobile Phone</b></label> |
590 | </div> | 648 | </div> |
591 | <div class="pull-left" style="margin-left: 15px;"> | 649 | <div class="pull-left" style="margin-left: 15px;"> |
592 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | 650 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> |
593 | </div> | 651 | </div> |
594 | <div class="clearfix"></div> | 652 | <div class="clearfix"></div> |
595 | </div> | 653 | </div> |
596 | </div> | 654 | </div> |
597 | <div class="clearfix"></div><br> | 655 | <div class="clearfix"></div><br> |
598 | <!-- <div class="col-xs-12"> | 656 | <!-- <div class="col-xs-12"> |
599 | <div class="col-md-12"> | 657 | <div class="col-md-12"> |
600 | <div class="pull-left" style="width: 110px;"> | 658 | <div class="pull-left" style="width: 110px;"> |
601 | <label class="new-input-label"><b>Address</b></label> | 659 | <label class="new-input-label"><b>Address</b></label> |
602 | </div> | 660 | </div> |
603 | <div class="pull-right" style="width: calc(100% - 123px);"> | 661 | <div class="pull-right" style="width: calc(100% - 123px);"> |
604 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | 662 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> |
605 | </div> | 663 | </div> |
606 | <div class="clearfix"></div> | 664 | <div class="clearfix"></div> |
607 | </div> | 665 | </div> |
608 | </div> | 666 | </div> |
609 | <div class="clearfix"></div> --> | 667 | <div class="clearfix"></div> --> |
610 | <br/> | 668 | <br/> |
611 | <div class="col-xs-12"> | 669 | <div class="col-xs-12"> |
612 | <div class="col-md-3"> | 670 | <div class="col-md-3"> |
613 | <div class="pull-left my-toggle-switch"> | 671 | <div class="pull-left my-toggle-switch"> |
614 | <div style="color: #ff9a01;">Price Email     | 672 | <div style="color: #ff9a01;">Price Email     |
615 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> | 673 | <toggle ng-model="data.priceEmail" size="customToogle"></toggle> |
616 | </div> | 674 | </div> |
617 | </div> | 675 | </div> |
618 | <div class="clearfix"></div> | 676 | <div class="clearfix"></div> |
619 | </div> | 677 | </div> |
620 | <div class="col-md-3"> | 678 | <div class="col-md-3"> |
621 | <div class="pull-left my-toggle-switch"> | 679 | <div class="pull-left my-toggle-switch"> |
622 | <div style="color: #ff9a01;">Primary Contact     | 680 | <div style="color: #ff9a01;">Primary Contact     |
623 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> | 681 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> |
624 | </div> | 682 | </div> |
625 | </div> | 683 | </div> |
626 | <div class="clearfix"></div> | 684 | <div class="clearfix"></div> |
627 | </div> | 685 | </div> |
628 | <div class="col-md-6"> | 686 | <div class="col-md-6"> |
629 | <div class="pull-left" style="width: 110px;"> | 687 | <div class="pull-left" style="width: 110px;"> |
630 | <label class="new-input-label"><b>Internal Note</b></label> | 688 | <label class="new-input-label"><b>Internal Note</b></label> |
631 | </div> | 689 | </div> |
632 | <div class="pull-left" style="width: calc(100% - 110px);"> | 690 | <div class="pull-left" style="width: calc(100% - 110px);"> |
633 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | 691 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> |
634 | </div> | 692 | </div> |
635 | </div> | 693 | </div> |
636 | <div class="clearfix"></div> | 694 | <div class="clearfix"></div> |
637 | </div> | 695 | </div> |
638 | <div class="clearfix"></div><br> | 696 | <div class="clearfix"></div><br> |
639 | </div> | 697 | </div> |
640 | </div> | 698 | </div> |
641 | <div class="clearfix"></div> | 699 | <div class="clearfix"></div> |
642 | </div> | 700 | </div> |
643 | </div> | 701 | </div> |
644 | </div> | 702 | </div> |
645 | </div> | 703 | </div> |
646 | <div class="modal-footer" style="border-top: 0;"> | 704 | <div class="modal-footer" style="border-top: 0;"> |
647 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 705 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
648 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | 706 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> |
649 | </div> | 707 | </div> |
650 | </div> | 708 | </div> |
651 | </div> | 709 | </div> |
652 | </form> | 710 | </form> |
653 | <div class="clearfix"></div> | 711 | <div class="clearfix"></div> |
654 | 712 | ||
655 | <!-- SetUp fuel order --> | 713 | <!-- SetUp fuel order --> |
656 | <form class="modal" id="demo-modal-4" name="orderform"> | 714 | <form class="modal" id="demo-modal-4" name="orderform"> |
657 | <div class="modal-dialog modal-md"> | 715 | <div class="modal-dialog modal-md"> |
658 | <div class="modal-content"> | 716 | <div class="modal-content"> |
659 | <div class="modal-body" data-step="1" style="padding: 0;"> | 717 | <div class="modal-body" data-step="1" style="padding: 0;"> |
660 | <div> | 718 | <div> |
661 | <div class="row" style="margin: 0;"> | 719 | <div class="row" style="margin: 0;"> |
662 | <div> | 720 | <div> |
663 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 721 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
664 | <div class="widget-header"> | 722 | <div class="widget-header"> |
665 | <i class="icon-pencil"></i> | 723 | <i class="icon-pencil"></i> |
666 | <i class="fa fa-tasks" aria-hidden="true"></i> | 724 | <i class="fa fa-tasks" aria-hidden="true"></i> |
667 | <h3>Search and Dispatch Fuel</h3> | 725 | <h3>Search and Dispatch Fuel</h3> |
668 | <div class="clearfix"></div> | 726 | <div class="clearfix"></div> |
669 | </div> | 727 | </div> |
670 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 728 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
671 | <div class="col-xs-12"> | 729 | <div class="col-xs-12"> |
672 | <div class="col-xs-12"> | 730 | <div class="col-xs-12"> |
673 | <div class="pull-left" style="width: 110px;"> | 731 | <div class="pull-left" style="width: 110px;"> |
674 | <label class="new-input-label"><b>Company</b></label> | 732 | <label class="new-input-label"><b>Company</b></label> |
675 | </div> | 733 | </div> |
676 | <div class="pull-left" style="width: calc(100% - 110px);"> | 734 | <div class="pull-left" style="width: calc(100% - 110px);"> |
677 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> | 735 | <input type="text" disabled ng-model="order.companyName" class="form-control" value="{{order.companyName}}" /> |
678 | </div> | 736 | </div> |
679 | <div class="clearfix"></div> | 737 | <div class="clearfix"></div> |
680 | </div> | 738 | </div> |
681 | <div class="clearfix"></div> | 739 | <div class="clearfix"></div> |
682 | <br> | 740 | <br> |
683 | <div class="col-xs-12"> | 741 | <div class="col-xs-12"> |
684 | <div class="col-md-6"> | 742 | <div class="col-md-6"> |
685 | <div class="pull-left" style="width: 110px;"> | 743 | <div class="pull-left" style="width: 110px;"> |
686 | <label class="new-input-label"><b>Aircraft</b></label> | 744 | <label class="new-input-label"><b>Aircraft</b></label> |
687 | </div> | 745 | </div> |
688 | <div class="pull-left" style="width: calc(100% - 110px);"> | 746 | <div class="pull-left" style="width: calc(100% - 110px);"> |
689 | <select class="form-control" ng-model="order.aircraftName" required> | 747 | <select class="form-control" ng-model="order.aircraftName" required> |
690 | <option selected disabled value="">Select Aircraft</option> | 748 | <option selected disabled value="">Select Aircraft</option> |
691 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 749 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
692 | </select> | 750 | </select> |
693 | </div> | 751 | </div> |
694 | <div class="clearfix"></div> | 752 | <div class="clearfix"></div> |
695 | </div> | 753 | </div> |
696 | <div class="col-md-6"> | 754 | <div class="col-md-6"> |
697 | <div class="pull-left" style="width: 110px;"> | 755 | <div class="pull-left" style="width: 110px;"> |
698 | <label class="new-input-label"><b>Requested Volume</b></label> | 756 | <label class="new-input-label"><b>Requested Volume</b></label> |
699 | </div> | 757 | </div> |
700 | <div class="pull-left" style="width: calc(100% - 110px);"> | 758 | <div class="pull-left" style="width: calc(100% - 110px);"> |
701 | <input type="text" ng-model="order.volume" class="form-control" required> | 759 | <input type="text" ng-model="order.volume" class="form-control" required> |
702 | </div> | 760 | </div> |
703 | <div class="clearfix"></div> | 761 | <div class="clearfix"></div> |
704 | </div> | 762 | </div> |
705 | </div> | 763 | </div> |
706 | <div class="clearfix"></div> | 764 | <div class="clearfix"></div> |
707 | <br/> | 765 | <br/> |
708 | <div class="col-xs-12"> | 766 | <div class="col-xs-12"> |
709 | <div class="pull-left" style="width: 110px;"> | 767 | <div class="pull-left" style="width: 110px;"> |
710 | <label class="new-input-label"><b>Price Quote</b></label> | 768 | <label class="new-input-label"><b>Price Quote</b></label> |
711 | </div> | 769 | </div> |
712 | <div class="pull-left" style="width: calc(100% - 110px);"> | 770 | <div class="pull-left" style="width: calc(100% - 110px);"> |
713 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> | 771 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); tiervalue()" required> |
714 | <option value="" selected disabled>Select Price Quote</option> | 772 | <option value="" selected disabled>Select Price Quote</option> |
715 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> | 773 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 2}} {{margin.productName}}</option> |
716 | </select> | 774 | </select> |
717 | </div> | 775 | </div> |
718 | <div class="clearfix"></div> | 776 | <div class="clearfix"></div> |
719 | </div> | 777 | </div> |
720 | <div class="clearfix"></div> | 778 | <div class="clearfix"></div> |
721 | <br/> | 779 | <br/> |
722 | <div class="col-xs-12"> | 780 | <div class="col-xs-12"> |
723 | <div class="pull-left" style="width: 110px;"> | 781 | <div class="pull-left" style="width: 110px;"> |
724 | <label class="new-input-label"><b>Tier Break</b></label> | 782 | <label class="new-input-label"><b>Tier Break</b></label> |
725 | </div> | 783 | </div> |
726 | <div class="pull-left" style="width: calc(100% - 110px);"> | 784 | <div class="pull-left" style="width: calc(100% - 110px);"> |
727 | <select class="form-control" ng-model="order.tierBreak"> | 785 | <select class="form-control" ng-model="order.tierBreak"> |
728 | <option value="" selected disabled>Select Tier Break</option> | 786 | <option value="" selected disabled>Select Tier Break</option> |
729 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> | 787 | <option ng-repeat="list in tierList" value="{{list.minTierBreak}}-{{list.maxTierBreak}}"> |
730 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} | 788 | {{list.minTierBreak}}-{{list.maxTierBreak}} = ${{list.marginTotal | number: 2}} {{list.marginTemplate.marginName}} |
731 | </option> | 789 | </option> |
732 | </select> | 790 | </select> |
733 | </div> | 791 | </div> |
734 | <div class="clearfix"></div> | 792 | <div class="clearfix"></div> |
735 | </div> | 793 | </div> |
736 | <div class="clearfix"></div> | 794 | <div class="clearfix"></div> |
737 | <br/> | 795 | <br/> |
738 | <div class="col-xs-12"> | 796 | <div class="col-xs-12"> |
739 | <div class="pull-left" style="width: 110px;"> | 797 | <div class="pull-left" style="width: 110px;"> |
740 | <label class="new-input-label"><b>Uplift Date</b></label> | 798 | <label class="new-input-label"><b>Uplift Date</b></label> |
741 | </div> | 799 | </div> |
742 | <div class="pull-left" style="width: calc(100% - 110px);"> | 800 | <div class="pull-left" style="width: calc(100% - 110px);"> |
743 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> | 801 | <input type="text" ng-model="order.upliftDate" datepicker class="form-control" style="width: 100px" required> |
744 | </div> | 802 | </div> |
745 | <div class="clearfix"></div> | 803 | <div class="clearfix"></div> |
746 | </div> | 804 | </div> |
747 | <div class="clearfix"></div> | 805 | <div class="clearfix"></div> |
748 | <br/> | 806 | <br/> |
749 | </div> | 807 | </div> |
750 | </div> | 808 | </div> |
751 | <div class="clearfix"></div> | 809 | <div class="clearfix"></div> |
752 | </div> | 810 | </div> |
753 | </div> | 811 | </div> |
754 | </div> | 812 | </div> |
755 | </div> | 813 | </div> |
756 | 814 | ||
757 | <div class="modal-footer" style="border-top: 0;"> | 815 | <div class="modal-footer" style="border-top: 0;"> |
758 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 816 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
759 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> | 817 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="dispatchFuel()">Dispatch</button> |
760 | </div> | 818 | </div> |
761 | </div> | 819 | </div> |
762 | </div> | 820 | </div> |
763 | </div> | 821 | </div> |
764 | </form> | 822 | </form> |
765 | <div class="clearfix"></div> | 823 | <div class="clearfix"></div> |
766 | 824 | ||
767 | 825 | ||
768 | 826 | ||
769 | 827 | ||
770 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | 828 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> |
771 | <div class="modal-dialog modal-lg"> | 829 | <div class="modal-dialog modal-lg"> |
772 | <div class="modal-content"> | 830 | <div class="modal-content"> |
773 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 831 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
774 | <div> | 832 | <div> |
775 | <div class="row" style="margin: 0;"> | 833 | <div class="row" style="margin: 0;"> |
776 | <div> | 834 | <div> |
777 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 835 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
778 | <div class="widget-header"> | 836 | <div class="widget-header"> |
779 | <i class="icon-pencil"></i> | 837 | <i class="icon-pencil"></i> |
780 | <i class="fa fa-tasks" aria-hidden="true"></i> | 838 | <i class="fa fa-tasks" aria-hidden="true"></i> |
781 | <h3>Add a New Aircraft kd</h3> | 839 | <h3>Add a New Aircraft kd</h3> |
782 | <div class="clearfix"></div> | 840 | <div class="clearfix"></div> |
783 | </div> | 841 | </div> |
784 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 842 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
785 | <div class="col-xs-12"> | 843 | <div class="col-xs-12"> |
786 | <div class="widget-header"> | 844 | <div class="widget-header"> |
787 | <i class="fa fa-list"></i> | 845 | <i class="fa fa-list"></i> |
788 | <h3>Aircraft List</h3> | 846 | <h3>Aircraft List</h3> |
789 | </div> | 847 | </div> |
790 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | 848 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> |
791 | <div class="table-responsive"> | 849 | <div class="table-responsive"> |
792 | <table class="table table-striped table-bordered"> | 850 | <table class="table table-striped table-bordered"> |
793 | <thead> | 851 | <thead> |
794 | <tr> | 852 | <tr> |
795 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 853 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
796 | <th>Tail</th> | 854 | <th>Tail</th> |
797 | <th>Make</th> | 855 | <th>Make</th> |
798 | <th>Model</th> | 856 | <th>Model</th> |
799 | <th>Size</th> | 857 | <th>Size</th> |
800 | <th>JET A Margin</th> | 858 | <th>JET A Margin</th> |
801 | <th>AVGS 100LL Margin</th> | 859 | <th>AVGS 100LL Margin</th> |
802 | </tr> | 860 | </tr> |
803 | </thead> | 861 | </thead> |
804 | <tbody> | 862 | <tbody> |
805 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 863 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
806 | <!-- <td> | 864 | <!-- <td> |
807 | <input type="checkbox" ng-model="aircraftData.selected"/> | 865 | <input type="checkbox" ng-model="aircraftData.selected"/> |
808 | </td> --> | 866 | </td> --> |
809 | <!-- <td style="width: 15%"> | 867 | <!-- <td style="width: 15%"> |
810 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 868 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
811 | </td> --> | 869 | </td> --> |
812 | <td style="width: 15%"> | 870 | <td style="width: 15%"> |
813 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> | 871 | <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> |
814 | </td> | 872 | </td> |
815 | <td style="width: 17%"> | 873 | <td style="width: 17%"> |
816 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> | 874 | <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> |
817 | <option value="" disabled>Select</option> | 875 | <option value="" disabled>Select</option> |
818 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 876 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
819 | </select> | 877 | </select> |
820 | </td> | 878 | </td> |
821 | <td style="width: 17%"> | 879 | <td style="width: 17%"> |
822 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 880 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
823 | <option value="" disabled>Select</option> | 881 | <option value="" disabled>Select</option> |
824 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 882 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
825 | </select> | 883 | </select> |
826 | </td> | 884 | </td> |
827 | <td style="width: 17%"> | 885 | <td style="width: 17%"> |
828 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> | 886 | <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> |
829 | <option value="" disabled>Select</option> | 887 | <option value="" disabled>Select</option> |
830 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}" ng-selected="aircraftData.size = aircraftData.aircraftSizeList[0].aircraftSize.id">{{size.aircraftSize.size}}</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> |
831 | </select> | 889 | </select> |
832 | </td> | 890 | </td> |
833 | <td style="width: 17%"> | 891 | <td style="width: 17%"> |
834 | 892 | ||
835 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 893 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
836 | <option value="" disabled>Select</option> | 894 | <option value="" disabled>Select</option> |
837 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 895 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
838 | </select> | 896 | </select> |
839 | 897 | ||
840 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> | 898 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> |
841 | 899 | ||
842 | <option value="" disabled>Select...</option> | 900 | <option value="" disabled>Select...</option> |
843 | </select> --> | 901 | </select> --> |
844 | 902 | ||
845 | </td> | 903 | </td> |
846 | <td style="width: 17%"> | 904 | <td style="width: 17%"> |
847 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 905 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
848 | <option value="" disabled>Select</option> | 906 | <option value="" disabled>Select</option> |
849 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 907 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
850 | </select> | 908 | </select> |
851 | 909 | ||
852 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> | 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]"> |
853 | <option value="" disabled>Select...</option> | 911 | <option value="" disabled>Select...</option> |
854 | </select> --> | 912 | </select> --> |
855 | </td> | 913 | </td> |
856 | </tr> | 914 | </tr> |
857 | </tbody> | 915 | </tbody> |
858 | </table> | 916 | </table> |
859 | </div> | 917 | </div> |
860 | <div class="clearfix"></div> | 918 | <div class="clearfix"></div> |
861 | </div> | 919 | </div> |
862 | </div> | 920 | </div> |
863 | <div class="clearfix"></div> | 921 | <div class="clearfix"></div> |
864 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 922 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
865 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> | 923 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> |
866 | </div> | 924 | </div> |
867 | </div> | 925 | </div> |
868 | </div> | 926 | </div> |
869 | <div class="clearfix"></div> | 927 | <div class="clearfix"></div> |
870 | </div> | 928 | </div> |
871 | </div> | 929 | </div> |
872 | </div> | 930 | </div> |
873 | </div> | 931 | </div> |
874 | 932 | ||
875 | <div class="modal-footer" style="border-top: 0;"> | 933 | <div class="modal-footer" style="border-top: 0;"> |
876 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> | 934 | <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> |
877 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> | 935 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="aircraftForm.$invalid" ng-click="saveCompanyData()">Save</button> |
878 | </div> | 936 | </div> |
879 | </div> | 937 | </div> |
880 | </div> | 938 | </div> |
881 | </form> | 939 | </form> |
882 | <div class="customConfirmPopBackdrop" id="fuelerchange" > | 940 | <div class="customConfirmPopBackdrop" id="fuelerchange" > |
883 | <div class="customModalInner" style="max-width: 550px;"> | 941 | <div class="customModalInner" style="max-width: 550px;"> |
884 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 942 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
885 | <table> | 943 | <table> |
886 | <tr> | 944 | <tr> |
887 | <td> | 945 | <td> |
888 | <img src="img/info.png" style="width: 50px;"> | 946 | <img src="img/info.png" style="width: 50px;"> |
889 | </td> | 947 | </td> |
890 | <td> | 948 | <td> |
891 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 949 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
892 | </td> | 950 | </td> |
893 | </tr> | 951 | </tr> |
894 | </table> | 952 | </table> |
895 | </div> | 953 | </div> |
896 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 954 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
897 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> | 955 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerAcceptStatus()">Accept</button> |
898 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> | 956 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="fuelerCancelStatus()">Cancel</button> |
899 | </div> | 957 | </div> |
900 | </div> | 958 | </div> |
901 | </div> | 959 | </div> |
902 | <div class="customConfirmPopBackdrop" id="confirm1"> | 960 | <div class="customConfirmPopBackdrop" id="confirm1"> |
903 | <div class="customModalInner" style="max-width: 400px;"> | 961 | <div class="customModalInner" style="max-width: 400px;"> |
904 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 962 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
905 | <table> | 963 | <table> |
906 | <tr> | 964 | <tr> |
907 | <td> | 965 | <td> |
908 | <img src="img/info.png" style="width: 50px;"> | 966 | <img src="img/info.png" style="width: 50px;"> |
909 | </td> | 967 | </td> |
910 | <td> | 968 | <td> |
911 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 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> |
912 | </td> | 970 | </td> |
913 | </tr> | 971 | </tr> |
914 | </table> | 972 | </table> |
915 | </div> | 973 | </div> |
916 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 974 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
917 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> | 975 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> |
918 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 976 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
919 | </div> | 977 | </div> |
920 | </div> | 978 | </div> |
921 | </div> | 979 | </div> |
922 | <div class="customConfirmPopBackdrop" id="primaryContact"> | 980 | <div class="customConfirmPopBackdrop" id="primaryContact"> |
923 | <div class="customModalInner" style="max-width: 400px;"> | 981 | <div class="customModalInner" style="max-width: 400px;"> |
924 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 982 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
925 | <table> | 983 | <table> |
926 | <tr> | 984 | <tr> |
927 | <td> | 985 | <td> |
928 | <img src="img/info.png" style="width: 50px;"> | 986 | <img src="img/info.png" style="width: 50px;"> |
929 | </td> | 987 | </td> |
930 | <td> | 988 | <td> |
931 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> | 989 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> |
932 | </td> | 990 | </td> |
933 | </tr> | 991 | </tr> |
934 | </table> | 992 | </table> |
935 | </div> | 993 | </div> |
936 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 994 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
937 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> | 995 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> |
938 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> | 996 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> |
939 | </div> | 997 | </div> |
940 | </div> | 998 | </div> |
941 | </div> | 999 | </div> |
942 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> | 1000 | <div class="customConfirmPopBackdrop" id="customFieldEmail"> |
943 | <div class="customModalInner" style="max-width: 400px;"> | 1001 | <div class="customModalInner" style="max-width: 400px;"> |
944 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1002 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
945 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1003 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
946 | <div class="col-md-10"> | 1004 | <div class="col-md-10"> |
947 | <form> | 1005 | <form> |
948 | Email Type:<br> | 1006 | Email Type:<br> |
949 | <input type="text" name="firstname" ng-model="custom.title"><br> | 1007 | <input type="text" name="firstname" ng-model="custom.title"><br> |
950 | Email-Address:<br> | 1008 | Email-Address:<br> |
951 | <input type="text" name="lastname" ng-model="custom.content"> | 1009 | <input type="text" name="lastname" ng-model="custom.content"> |
952 | </form> | 1010 | </form> |
953 | </div> | 1011 | </div> |
954 | <div class="clearfix"></div> | 1012 | <div class="clearfix"></div> |
955 | </div> | 1013 | </div> |
956 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1014 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
957 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> | 1015 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('email')">Accept</button> |
958 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 1016 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
959 | </div> | 1017 | </div> |
960 | </div> | 1018 | </div> |
961 | </div> | 1019 | </div> |
962 | 1020 | ||
963 | 1021 | ||
964 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> | 1022 | <div class="customConfirmPopBackdrop" id="customFieldPhone"> |
965 | <div class="customModalInner" style="max-width: 400px;"> | 1023 | <div class="customModalInner" style="max-width: 400px;"> |
966 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1024 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
967 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1025 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
968 | <div class="col-md-10"> | 1026 | <div class="col-md-10"> |
969 | <form> | 1027 | <form> |
970 | Phone Type:<br> | 1028 | Phone Type:<br> |
971 | <input type="text" name="firstname" ng-model="custom.title"><br> | 1029 | <input type="text" name="firstname" ng-model="custom.title"><br> |
972 | Number:<br> | 1030 | Number:<br> |
973 | <input type="text" name="lastname" ng-model="custom.content"> | 1031 | <input type="text" name="lastname" ng-model="custom.content"> |
974 | </form> | 1032 | </form> |
975 | </div> | 1033 | </div> |
976 | <div class="clearfix"></div> | 1034 | <div class="clearfix"></div> |
977 | </div> | 1035 | </div> |
978 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1036 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
979 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> | 1037 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField('phone')">Accept</button> |
980 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> | 1038 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> |
981 | </div> | 1039 | </div> |
982 | </div> | 1040 | </div> |
983 | </div> | 1041 | </div> |
984 | 1042 | ||
985 | 1043 | ||
986 | <div class="customConfirmPopBackdrop" id="updateContact"> | 1044 | <div class="customConfirmPopBackdrop" id="updateContact"> |
987 | <div class="customModalInner" style="max-width: 400px;"> | 1045 | <div class="customModalInner" style="max-width: 400px;"> |
988 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1046 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
989 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1047 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
990 | <div class="col-md-10"> | 1048 | <div class="col-md-10"> |
991 | <form> | 1049 | <form> |
992 | Phone Type:<br> | 1050 | Phone Type:<br> |
993 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 1051 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
994 | Number:<br> | 1052 | Number:<br> |
995 | <input type="text" name="lastname" ng-model="updateData.content"> | 1053 | <input type="text" name="lastname" ng-model="updateData.content"> |
996 | </form> | 1054 | </form> |
997 | </div> | 1055 | </div> |
998 | <div class="clearfix"></div> | 1056 | <div class="clearfix"></div> |
999 | </div> | 1057 | </div> |
1000 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1058 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1001 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> | 1059 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('phone')">Accept</button> |
1002 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1060 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1003 | </div> | 1061 | </div> |
1004 | </div> | 1062 | </div> |
1005 | </div> | 1063 | </div> |
1006 | 1064 | ||
1007 | <div class="customConfirmPopBackdrop" id="updateEmail"> | 1065 | <div class="customConfirmPopBackdrop" id="updateEmail"> |
1008 | <div class="customModalInner" style="max-width: 400px;"> | 1066 | <div class="customModalInner" style="max-width: 400px;"> |
1009 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1067 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1010 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 1068 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
1011 | <div class="col-md-10"> | 1069 | <div class="col-md-10"> |
1012 | <form> | 1070 | <form> |
1013 | Email Type:<br> | 1071 | Email Type:<br> |
1014 | <input type="text" name="firstname" ng-model="updateData.title"><br> | 1072 | <input type="text" name="firstname" ng-model="updateData.title"><br> |
1015 | Email-Address:<br> | 1073 | Email-Address:<br> |
1016 | <input type="text" name="lastname" ng-model="updateData.content"> | 1074 | <input type="text" name="lastname" ng-model="updateData.content"> |
1017 | </form> | 1075 | </form> |
1018 | </div> | 1076 | </div> |
1019 | <div class="clearfix"></div> | 1077 | <div class="clearfix"></div> |
1020 | </div> | 1078 | </div> |
1021 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1079 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1022 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> | 1080 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField('email')">Accept</button> |
1023 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> | 1081 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> |
1024 | </div> | 1082 | </div> |
1025 | </div> | 1083 | </div> |
1026 | </div> | 1084 | </div> |
1027 | 1085 | ||
1028 | 1086 | ||
1029 | <div class="customConfirmPopBackdrop" id="delete1"> | 1087 | <div class="customConfirmPopBackdrop" id="delete1"> |
1030 | <div class="customModalInner" style="max-width: 400px;"> | 1088 | <div class="customModalInner" style="max-width: 400px;"> |
1031 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1089 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1032 | <table> | 1090 | <table> |
1033 | <tr> | 1091 | <tr> |
1034 | <td> | 1092 | <td> |
1035 | <img src="img/info.png" style="width: 50px;"> | 1093 | <img src="img/info.png" style="width: 50px;"> |
1036 | </td> | 1094 | </td> |
1037 | <td> | 1095 | <td> |
1038 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> | 1096 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Aircraft?</p> |
1039 | </td> | 1097 | </td> |
1040 | </tr> | 1098 | </tr> |
1041 | </table> | 1099 | </table> |
1042 | </div> | 1100 | </div> |
1043 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1101 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1044 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> | 1102 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="aircraftDelete()">Accept</button> |
1045 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1103 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1046 | </div> | 1104 | </div> |
1047 | </div> | 1105 | </div> |
1048 | </div> | 1106 | </div> |
1049 | <div class="customConfirmPopBackdrop" id="delete2"> | 1107 | <div class="customConfirmPopBackdrop" id="delete2"> |
1050 | <div class="customModalInner" style="max-width: 400px;"> | 1108 | <div class="customModalInner" style="max-width: 400px;"> |
1051 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1109 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1052 | <table> | 1110 | <table> |
1053 | <tr> | 1111 | <tr> |
1054 | <td> | 1112 | <td> |
1055 | <img src="img/info.png" style="width: 50px;"> | 1113 | <img src="img/info.png" style="width: 50px;"> |
1056 | </td> | 1114 | </td> |
1057 | <td> | 1115 | <td> |
1058 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> | 1116 | <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Company & its related data?</p> |
1059 | </td> | 1117 | </td> |
1060 | </tr> | 1118 | </tr> |
1061 | </table> | 1119 | </table> |
1062 | </div> | 1120 | </div> |
1063 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1121 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1064 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> | 1122 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteCompanyData()">Accept</button> |
1065 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> | 1123 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> |
1066 | </div> | 1124 | </div> |
1067 | </div> | 1125 | </div> |
1068 | </div> | 1126 | </div> |
1069 | 1127 | ||
1070 | <div class="customConfirmPopBackdrop" id="delete3"> | 1128 | <div class="customConfirmPopBackdrop" id="delete3"> |
1071 | <div class="customModalInner" style="max-width: 400px;"> | 1129 | <div class="customModalInner" style="max-width: 400px;"> |
1072 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1130 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1073 | <table> | 1131 | <table> |
1074 | <tr> | 1132 | <tr> |
1075 | <td> | 1133 | <td> |
1076 | <img src="img/info.png" style="width: 50px;"> | 1134 | <img src="img/info.png" style="width: 50px;"> |
1077 | </td> | 1135 | </td> |
1078 | <td> | 1136 | <td> |
1079 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> | 1137 | <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> |
1080 | </td> | 1138 | </td> |
1081 | </tr> | 1139 | </tr> |
1082 | </table> | 1140 | </table> |
1083 | </div> | 1141 | </div> |
1084 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1142 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1085 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> | 1143 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> |
1086 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> | 1144 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> |
1087 | </div> | 1145 | </div> |
1088 | </div> | 1146 | </div> |
1089 | </div> | 1147 | </div> |
1090 | <div class="customConfirmPopBackdrop" id="toogleMail"> | 1148 | <div class="customConfirmPopBackdrop" id="toogleMail"> |
1091 | <div class="customModalInner" style="max-width: 400px;"> | 1149 | <div class="customModalInner" style="max-width: 400px;"> |
1092 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1150 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1093 | <table> | 1151 | <table> |
1094 | <tr> | 1152 | <tr> |
1095 | <!-- <td> | 1153 | <!-- <td> |
1096 | <img src="" style="width: 50px;"> | 1154 | <img src="" style="width: 50px;"> |
1097 | </td> --> | 1155 | </td> --> |
1098 | <td> | 1156 | <td> |
1099 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> | 1157 | <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> |
1100 | </td> | 1158 | </td> |
1101 | </tr> | 1159 | </tr> |
1102 | </table> | 1160 | </table> |
1103 | </div> | 1161 | </div> |
1104 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1162 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1105 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> | 1163 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Ok</button> |
1106 | </div> | 1164 | </div> |
1107 | </div> | 1165 | </div> |
1108 | </div> | 1166 | </div> |
1109 | 1167 | ||
1110 | 1168 | ||
1111 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> | 1169 | <div class="customConfirmPopBackdrop" id="addAirCraftError"> |
1112 | <div class="customModalInner" style="max-width: 400px;"> | 1170 | <div class="customModalInner" style="max-width: 400px;"> |
1113 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1171 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1114 | <table> | 1172 | <table> |
1115 | <tr> | 1173 | <tr> |
1116 | <td> | 1174 | <td> |
1117 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1175 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1118 | </td> | 1176 | </td> |
1119 | </tr> | 1177 | </tr> |
1120 | </table> | 1178 | </table> |
1121 | </div> | 1179 | </div> |
1122 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1180 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1123 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> | 1181 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">Cancel</button> |
1124 | </div> | 1182 | </div> |
1125 | </div> | 1183 | </div> |
1126 | </div> | 1184 | </div> |
1127 | 1185 | ||
1128 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> | 1186 | <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> |
1129 | <div class="customModalInner" style="max-width: 400px;"> | 1187 | <div class="customModalInner" style="max-width: 400px;"> |
1130 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1188 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1131 | <table> | 1189 | <table> |
1132 | <tr> | 1190 | <tr> |
1133 | <td> | 1191 | <td> |
1134 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> | 1192 | <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> |
1135 | </td> | 1193 | </td> |
1136 | </tr> | 1194 | </tr> |
1137 | </table> | 1195 | </table> |
1138 | </div> | 1196 | </div> |
1139 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1197 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1140 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> | 1198 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> |
1141 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> | 1199 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> |
1142 | </div> | 1200 | </div> |
1143 | </div> | 1201 | </div> |
1144 | </div> | 1202 | </div> |
1145 | 1203 | ||
1146 | <div class="myLoader" ng-show="showLoader"> | 1204 | <div class="myLoader" ng-show="showLoader"> |
1147 | <img src="../img/hourglass.gif" width="50px;"> | 1205 | <img src="../img/hourglass.gif" width="50px;"> |
1148 | </div> | 1206 | </div> |
1149 | 1207 | ||
1150 | <!-- Le javascript | 1208 | <!-- Le javascript |
1151 | ================================================== --> | 1209 | ================================================== --> |
1152 | <!-- Placed at the end of the document so the pages load faster --> | 1210 | <!-- Placed at the end of the document so the pages load faster --> |
1153 | <!-- <script | 1211 | <!-- <script |
1154 | CKEDITOR.replace( 'editor2', { | 1212 | CKEDITOR.replace( 'editor2', { |
1155 | height: 250, | 1213 | height: 250, |
1156 | extraPlugins: 'divarea' | 1214 | extraPlugins: 'divarea' |
1157 | } ); | 1215 | } ); |
1158 | </script> --> | 1216 | </script> --> |
1159 | 1217 |