Commit 6dc1b8b81353c21761ee7da79a3fe25a73884e4c
1 parent
7f6e3b1df9
Exists in
master
hide attachement, solved issue of pie chart and calender starts from monday
Showing
3 changed files
with
5 additions
and
3 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 | 6 | ||
7 | //Implemented drill down chart and Now used this on 07 Sep 2018 -KD | 7 | //Implemented drill down chart and Now used this on 07 Sep 2018 -KD |
8 | 8 | ||
9 | /* | 9 | /* |
10 | TODO: | 10 | TODO: |
11 | - Check data labels after drilling. Label rank? New positions? | 11 | - Check data labels after drilling. Label rank? New positions? |
12 | */ | 12 | */ |
13 | $scope.getAllRegionalPapDrilldown = function() { | 13 | $scope.getAllRegionalPapDrilldown = function() { |
14 | $scope.flag = true; //for spinner | 14 | $scope.flag = true; //for spinner |
15 | var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); | 15 | var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); |
16 | var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); | 16 | var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); |
17 | 17 | ||
18 | analyticsService.getAllRPP().then(function(result) { | 18 | analyticsService.getAllRPP().then(function(result) { |
19 | for (var i = 0; i < data.length; i++) { | 19 | for (var i = 0; i < data.length; i++) { |
20 | for (var j = 0; j < result.length; j++) { | 20 | for (var j = 0; j < result.length; j++) { |
21 | if (data[i].name === result[j].region) { | 21 | if (data[i].name === result[j].region) { |
22 | 22 | ||
23 | data[i].value = result[j].averagePAP.toFixed(2); | 23 | data[i].value = result[j].averagePAP.toFixed(2); |
24 | 24 | ||
25 | } | 25 | } |
26 | } | 26 | } |
27 | 27 | ||
28 | } | 28 | } |
29 | 29 | ||
30 | $.each(data, function(i) { | 30 | $.each(data, function(i) { |
31 | this.drilldown = this.properties['hc-key']; | 31 | this.drilldown = this.properties['hc-key']; |
32 | this.value = this.value; | 32 | this.value = this.value; |
33 | }); | 33 | }); |
34 | 34 | ||
35 | $scope.flag = false; | 35 | $scope.flag = false; |
36 | // Instantiate the map | 36 | // Instantiate the map |
37 | Highcharts.mapChart('container', { | 37 | Highcharts.mapChart('container', { |
38 | chart: { | 38 | chart: { |
39 | events: { | 39 | events: { |
40 | drilldown: function(e) { | 40 | drilldown: function(e) { |
41 | if (!e.seriesOptions) { | 41 | if (!e.seriesOptions) { |
42 | var chart = this, | 42 | var chart = this, |
43 | mapKey = 'countries/us/' + e.point.drilldown + '-all', | 43 | mapKey = 'countries/us/' + e.point.drilldown + '-all', |
44 | 44 | ||
45 | // Handle error, the timeout is cleared on success | 45 | // Handle error, the timeout is cleared on success |
46 | fail = setTimeout(function() { | 46 | fail = setTimeout(function() { |
47 | if (!Highcharts.maps[mapKey]) { | 47 | if (!Highcharts.maps[mapKey]) { |
48 | // chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name); | 48 | // chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name); |
49 | fail = setTimeout(function() { | 49 | fail = setTimeout(function() { |
50 | chart.hideLoading(); | 50 | chart.hideLoading(); |
51 | }, 10000); | 51 | }, 10000); |
52 | } | 52 | } |
53 | }, 3000); | 53 | }, 3000); |
54 | 54 | ||
55 | // Show the spinner | 55 | // Show the spinner |
56 | chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner | 56 | chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner |
57 | 57 | ||
58 | // Load the drilldown map | 58 | // Load the drilldown map |
59 | var region = e.point.name; | 59 | var region = e.point.name; |
60 | analyticsService.getRPP(region).then(function(result) { | 60 | analyticsService.getRPP(region).then(function(result) { |
61 | $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function() { | 61 | $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function() { |
62 | //called the get api region wise | 62 | //called the get api region wise |
63 | data = Highcharts.geojson(Highcharts.maps[mapKey]); | 63 | data = Highcharts.geojson(Highcharts.maps[mapKey]); |
64 | for (var i = 0; i < data.length; i++) { | 64 | for (var i = 0; i < data.length; i++) { |
65 | for (var j = 0; j < result.length; j++) { | 65 | for (var j = 0; j < result.length; j++) { |
66 | 66 | ||
67 | //delete the County word from api result to match with map data | 67 | //delete the County word from api result to match with map data |
68 | result[j].region = result[j].region.replace("County", ""); | 68 | result[j].region = result[j].region.replace("County", ""); |
69 | 69 | ||
70 | if (data[i].name.trim() === result[j].region.trim()) { | 70 | if (data[i].name.trim() === result[j].region.trim()) { |
71 | 71 | ||
72 | data[i].value = result[j].averagePAP.toFixed(2); | 72 | data[i].value = result[j].averagePAP.toFixed(2); |
73 | 73 | ||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | // Set a non-random bogus value | 79 | // Set a non-random bogus value |
80 | $.each(data, function(i) { | 80 | $.each(data, function(i) { |
81 | this.value = this.value; | 81 | this.value = this.value; |
82 | }); | 82 | }); |
83 | // Hide loading and add series | 83 | // Hide loading and add series |
84 | chart.hideLoading(); | 84 | chart.hideLoading(); |
85 | clearTimeout(fail); | 85 | clearTimeout(fail); |
86 | chart.addSeriesAsDrilldown(e.point, { | 86 | chart.addSeriesAsDrilldown(e.point, { |
87 | name: e.point.name, | 87 | name: e.point.name, |
88 | data: data, | 88 | data: data, |
89 | dataLabels: { | 89 | dataLabels: { |
90 | enabled: true, | 90 | enabled: true, |
91 | format: '{point.name}' | 91 | format: '{point.name}' |
92 | } | 92 | } |
93 | }); | 93 | }); |
94 | }); | 94 | }); |
95 | }) | 95 | }) |
96 | } | 96 | } |
97 | 97 | ||
98 | this.setTitle(null, { | 98 | this.setTitle(null, { |
99 | text: e.point.name | 99 | text: e.point.name |
100 | }); | 100 | }); |
101 | }, | 101 | }, |
102 | drillup: function() { | 102 | drillup: function() { |
103 | this.setTitle(null, { | 103 | this.setTitle(null, { |
104 | text: '' | 104 | text: '' |
105 | }); | 105 | }); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | }, | 108 | }, |
109 | 109 | ||
110 | title: { | 110 | title: { |
111 | text: 'USA Map-Drilldown for Regional Pricing' | 111 | text: 'USA Map-Drilldown for Regional Pricing' |
112 | }, | 112 | }, |
113 | 113 | ||
114 | subtitle: { | 114 | subtitle: { |
115 | text: '', | 115 | text: '', |
116 | floating: true, | 116 | floating: true, |
117 | align: 'right', | 117 | align: 'right', |
118 | y: 50, | 118 | y: 50, |
119 | style: { | 119 | style: { |
120 | fontSize: '16px' | 120 | fontSize: '16px' |
121 | } | 121 | } |
122 | }, | 122 | }, |
123 | 123 | ||
124 | mapNavigation: { | 124 | mapNavigation: { |
125 | enabled: true, | 125 | enabled: true, |
126 | buttonOptions: { | 126 | buttonOptions: { |
127 | verticalAlign: 'bottom' | 127 | verticalAlign: 'bottom' |
128 | } | 128 | } |
129 | }, | 129 | }, |
130 | 130 | ||
131 | plotOptions: { | 131 | plotOptions: { |
132 | map: { | 132 | map: { |
133 | states: { | 133 | states: { |
134 | hover: { | 134 | hover: { |
135 | color: '#EEDD66' | 135 | color: '#EEDD66' |
136 | } | 136 | } |
137 | } | 137 | } |
138 | } | 138 | } |
139 | }, | 139 | }, |
140 | 140 | ||
141 | series: [{ | 141 | series: [{ |
142 | data: data, | 142 | data: data, |
143 | name: 'USA', | 143 | name: 'USA', |
144 | dataLabels: { | 144 | dataLabels: { |
145 | enabled: true, | 145 | enabled: true, |
146 | format: '{point.properties.postal-code}' | 146 | format: '{point.properties.postal-code}' |
147 | } | 147 | } |
148 | }, { | 148 | }, { |
149 | type: 'mapline', | 149 | type: 'mapline', |
150 | data: separators, | 150 | data: separators, |
151 | color: 'silver', | 151 | color: 'silver', |
152 | enableMouseTracking: false, | 152 | enableMouseTracking: false, |
153 | animation: { | 153 | animation: { |
154 | duration: 500 | 154 | duration: 500 |
155 | } | 155 | } |
156 | }], | 156 | }], |
157 | 157 | ||
158 | drilldown: { | 158 | drilldown: { |
159 | activeDataLabelStyle: { | 159 | activeDataLabelStyle: { |
160 | color: '#FFFFFF', | 160 | color: '#FFFFFF', |
161 | textDecoration: 'none', | 161 | textDecoration: 'none', |
162 | textOutline: '1px #000000' | 162 | textOutline: '1px #000000' |
163 | }, | 163 | }, |
164 | drillUpButton: { | 164 | drillUpButton: { |
165 | relativeTo: 'spacingBox', | 165 | relativeTo: 'spacingBox', |
166 | position: { | 166 | position: { |
167 | x: 0, | 167 | x: 0, |
168 | y: 60 | 168 | y: 60 |
169 | } | 169 | } |
170 | } | 170 | } |
171 | } | 171 | } |
172 | }); | 172 | }); |
173 | }) | 173 | }) |
174 | } | 174 | } |
175 | 175 | ||
176 | $scope.getAllRegionalPapDrilldown(); | 176 | $scope.getAllRegionalPapDrilldown(); |
177 | 177 | ||
178 | 178 | ||
179 | $scope.cancelStatus = function() { | 179 | $scope.cancelStatus = function() { |
180 | $('#popup1').css('display', 'none'); | 180 | $('#popup1').css('display', 'none'); |
181 | } | 181 | } |
182 | $scope.ordersCost = 0; | 182 | $scope.ordersCost = 0; |
183 | $scope.ordersCount = 0; | 183 | $scope.ordersCount = 0; |
184 | 184 | ||
185 | $scope.orderCostAndCount = function() { | 185 | $scope.orderCostAndCount = function() { |
186 | analyticsService.orderCostAndCount().then(function(result) { | 186 | analyticsService.orderCostAndCount().then(function(result) { |
187 | $scope.ordersCost = result.cost; | 187 | $scope.ordersCost = result.cost; |
188 | $scope.ordersCount = result.count; | 188 | $scope.ordersCount = result.count; |
189 | }) | 189 | }) |
190 | } | 190 | } |
191 | 191 | ||
192 | $scope.drf = {}; | 192 | $scope.drf = {}; |
193 | $scope.hfp = {}; | 193 | $scope.hfp = {}; |
194 | $scope.cs = {}; | 194 | $scope.cs = {}; |
195 | $scope.mfsValues = []; | 195 | $scope.mfsValues = []; |
196 | $scope.msfarray = []; | 196 | $scope.msfarray = []; |
197 | $scope.getMFS = function() { | 197 | $scope.getMFS = function() { |
198 | //var makeId = makeId; | 198 | //var makeId = makeId; |
199 | analyticsService.getMFS().then(function(result) { | 199 | analyticsService.getMFS().then(function(result) { |
200 | $scope.mfsValues = result; | 200 | $scope.mfsValues = result; |
201 | $scope.optionsmfs = { | 201 | $scope.optionsmfs = { |
202 | chart: { | 202 | chart: { |
203 | type: 'multiBarChart', | 203 | type: 'multiBarChart', |
204 | height: 450, | 204 | height: 450, |
205 | margin: { | 205 | margin: { |
206 | top: 45, | 206 | top: 45, |
207 | right: 20, | 207 | right: 20, |
208 | bottom: 45, | 208 | bottom: 45, |
209 | left: 45 | 209 | left: 45 |
210 | }, | 210 | }, |
211 | clipEdge: true, | 211 | clipEdge: true, |
212 | //staggerLabels: true, | 212 | //staggerLabels: true, |
213 | duration: 500, | 213 | duration: 500, |
214 | stacked: false, | 214 | stacked: false, |
215 | color: ["#FEDFC3", "#990000", "#000099", "#009900"], | 215 | color: ["#FEDFC3", "#990000", "#000099", "#009900"], |
216 | xAxis: { | 216 | xAxis: { |
217 | axisLabel: 'Months', | 217 | axisLabel: 'Months', |
218 | showMaxMin: false, | 218 | showMaxMin: false, |
219 | }, | 219 | }, |
220 | yAxis: { | 220 | yAxis: { |
221 | axisLabel: 'Orders', | 221 | axisLabel: 'Orders', |
222 | axisLabelDistance: -20, | 222 | axisLabelDistance: -20, |
223 | tickFormat: function(d) { | 223 | tickFormat: function(d) { |
224 | return d3.format(',')(d); | 224 | return d3.format(',')(d); |
225 | } | 225 | } |
226 | } | 226 | } |
227 | } | 227 | } |
228 | }; | 228 | }; |
229 | $scope.datamfs = $scope.mfsValues; | 229 | $scope.datamfs = $scope.mfsValues; |
230 | }) | 230 | }) |
231 | } | 231 | } |
232 | 232 | ||
233 | $scope.orderCostAndCount(); | 233 | $scope.orderCostAndCount(); |
234 | $scope.getMFS(); | 234 | $scope.getMFS(); |
235 | $scope.csValues = []; | 235 | $scope.csValues = []; |
236 | $scope.getCS = function() { | 236 | $scope.getCS = function() { |
237 | //var makeId = makeId; | 237 | //var makeId = makeId; |
238 | analyticsService.getCS().then(function(result) { | 238 | analyticsService.getCS().then(function(result) { |
239 | $scope.csValues = result; | 239 | $scope.csValues = result; |
240 | console.log("cs",result) | 240 | console.log("cs",result) |
241 | $scope.optionscs = { | 241 | $scope.optionscs = { |
242 | chart: { | 242 | chart: { |
243 | type: 'pieChart', | 243 | type: 'pieChart', |
244 | height: 500, | 244 | height: 500, |
245 | x: function(d) { | 245 | x: function(d) { |
246 | return d.key; | 246 | return d.key; |
247 | }, | 247 | }, |
248 | y: function(d) { | 248 | y: function(d) { |
249 | return d.y; | 249 | return d.y; |
250 | }, | 250 | }, |
251 | valueFormat: d3.format(".0f"), | ||
251 | showLabels: false, | 252 | showLabels: false, |
252 | segmentShowStroke: false, | 253 | segmentShowStroke: false, |
253 | animationSteps: 20, | 254 | animationSteps: 20, |
254 | animationEasing: "linear", | 255 | animationEasing: "linear", |
255 | animateScale: true, | 256 | animateScale: true, |
256 | duration: 500, | 257 | duration: 500, |
257 | labelThreshold: 0.01, | 258 | labelThreshold: 0.01, |
258 | labelSunbeamLayout: true, | 259 | labelSunbeamLayout: true, |
259 | legend: { | 260 | legend: { |
260 | margin: { | 261 | margin: { |
261 | top: 5, | 262 | top: 5, |
262 | right: 35, | 263 | right: 35, |
263 | bottom: 5, | 264 | bottom: 5, |
264 | left: 0 | 265 | left: 0 |
265 | } | 266 | } |
266 | } | 267 | } |
267 | } | 268 | } |
268 | }; | 269 | }; |
269 | $scope.datacs = $scope.csValues; | 270 | $scope.datacs = $scope.csValues; |
270 | }) | 271 | }) |
271 | } | 272 | } |
272 | 273 | ||
273 | $scope.getCS(); | 274 | $scope.getCS(); |
274 | 275 | ||
275 | 276 | ||
276 | $scope.hfpValuesOne = {}; | 277 | $scope.hfpValuesOne = {}; |
277 | $scope.hfpValuesOne.key = "JET-A Full Service"; | 278 | $scope.hfpValuesOne.key = "JET-A Full Service"; |
278 | $scope.hfpValuesOne.values = []; | 279 | $scope.hfpValuesOne.values = []; |
279 | 280 | ||
280 | $scope.hfpValuesTwo = {}; | 281 | $scope.hfpValuesTwo = {}; |
281 | $scope.hfpValuesTwo.key = "100LL Full Service"; | 282 | $scope.hfpValuesTwo.key = "100LL Full Service"; |
282 | $scope.hfpValuesTwo.values = []; | 283 | $scope.hfpValuesTwo.values = []; |
283 | 284 | ||
284 | $scope.hfpFinalData = []; | 285 | $scope.hfpFinalData = []; |
285 | 286 | ||
286 | $scope.getHfpChartData = function() { | 287 | $scope.getHfpChartData = function() { |
287 | analyticsService.gethfpChart().then(function(result) { | 288 | analyticsService.gethfpChart().then(function(result) { |
288 | for(var i=0; i<result.length; i++) { | 289 | for(var i=0; i<result.length; i++) { |
289 | if(result[i].includes("JET-A Full Service") ){ | 290 | if(result[i].includes("JET-A Full Service") ){ |
290 | let datePusha = result[i][0]; | 291 | let datePusha = result[i][0]; |
291 | let tempValue = result[i][1].toFixed(2); | 292 | let tempValue = result[i][1].toFixed(2); |
292 | let valePusha = parseFloat(tempValue); | 293 | let valePusha = parseFloat(tempValue); |
293 | $scope.hfpValuesOne.values.push([datePusha, valePusha]) | 294 | $scope.hfpValuesOne.values.push([datePusha, valePusha]) |
294 | }else if(result[i].includes("100LL Full Service") ) { | 295 | }else if(result[i].includes("100LL Full Service") ) { |
295 | let datePushb = result[i][0]; | 296 | let datePushb = result[i][0]; |
296 | let tempvalePushb = result[i][1].toFixed(2); | 297 | let tempvalePushb = result[i][1].toFixed(2); |
297 | let valePushb = parseFloat(tempvalePushb); | 298 | let valePushb = parseFloat(tempvalePushb); |
298 | $scope.hfpValuesTwo.values.push([datePushb, valePushb]) | 299 | $scope.hfpValuesTwo.values.push([datePushb, valePushb]) |
299 | } | 300 | } |
300 | } | 301 | } |
301 | $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo); | 302 | $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo); |
302 | // console.log('$scope.hfpFinalData', $scope.hfpFinalData); | 303 | // console.log('$scope.hfpFinalData', $scope.hfpFinalData); |
303 | 304 | ||
304 | var chart = nv.models.lineChart() | 305 | var chart = nv.models.lineChart() |
305 | .x(function(d) { return d[0] }) | 306 | .x(function(d) { return d[0] }) |
306 | //adjusting, 100% is 1.00, not 100 as it is in the data | 307 | //adjusting, 100% is 1.00, not 100 as it is in the data |
307 | .y(function(d) { return d[1]}) | 308 | .y(function(d) { return d[1]}) |
308 | .color(d3.scale.category10().range()) | 309 | .color(d3.scale.category10().range()) |
309 | .useInteractiveGuideline(true) | 310 | .useInteractiveGuideline(true) |
310 | ; | 311 | ; |
311 | 312 | ||
312 | chart.xAxis | 313 | chart.xAxis |
313 | .tickFormat(function(d) { | 314 | .tickFormat(function(d) { |
314 | return d3.time.format('%x')(new Date(d)) | 315 | return d3.time.format('%x')(new Date(d)) |
315 | }); | 316 | }); |
316 | 317 | ||
317 | chart.yAxis | 318 | chart.yAxis |
318 | .axisLabel("PaP / Retail Price") | 319 | .axisLabel("PaP / Retail Price") |
319 | .axisLabelDistance(-5) | 320 | .axisLabelDistance(-5) |
320 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | 321 | .tickFormat(d3.format(',.2f')).showMaxMin(false); |
321 | 322 | ||
322 | d3.select('#chart svg') | 323 | d3.select('#chart svg') |
323 | .datum($scope.hfpFinalData) | 324 | .datum($scope.hfpFinalData) |
324 | .transition().duration(500) | 325 | .transition().duration(500) |
325 | .call(chart) | 326 | .call(chart) |
326 | ; | 327 | ; |
327 | 328 | ||
328 | nv.utils.windowResize(chart.update); | 329 | nv.utils.windowResize(chart.update); |
329 | 330 | ||
330 | return chart; | 331 | return chart; |
331 | }); | 332 | }); |
332 | } | 333 | } |
333 | $scope.getHfpChartData(); | 334 | $scope.getHfpChartData(); |
334 | 335 | ||
335 | /*Date Range Filter for Historic fuel Price*/ | 336 | /*Date Range Filter for Historic fuel Price*/ |
336 | $scope.submitDateHfp = function() { | 337 | $scope.submitDateHfp = function() { |
337 | 338 | ||
338 | $scope.hfpValuesFirst = {}; | 339 | $scope.hfpValuesFirst = {}; |
339 | $scope.hfpValuesFirst.key = "JET-A Full Service"; | 340 | $scope.hfpValuesFirst.key = "JET-A Full Service"; |
340 | $scope.hfpValuesFirst.values = []; | 341 | $scope.hfpValuesFirst.values = []; |
341 | 342 | ||
342 | $scope.hfpValuesSecond = {}; | 343 | $scope.hfpValuesSecond = {}; |
343 | $scope.hfpValuesSecond.key = "100LL Full Service"; | 344 | $scope.hfpValuesSecond.key = "100LL Full Service"; |
344 | $scope.hfpValuesSecond.values = []; | 345 | $scope.hfpValuesSecond.values = []; |
345 | 346 | ||
346 | $scope.hfpRangeData = []; | 347 | $scope.hfpRangeData = []; |
347 | 348 | ||
348 | if ($scope.hfp.fromDate === undefined) { | 349 | if ($scope.hfp.fromDate === undefined) { |
349 | 350 | ||
350 | $scope.fillForm = true; | 351 | $scope.fillForm = true; |
351 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { | 352 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { |
352 | $scope.fillForm = false; | 353 | $scope.fillForm = false; |
353 | var today = new Date(); | 354 | var today = new Date(); |
354 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59'; | 355 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59'; |
355 | //from date format | 356 | //from date format |
356 | $scope.dat1 = $scope.hfp.fromDate; | 357 | $scope.dat1 = $scope.hfp.fromDate; |
357 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 358 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
358 | $scope.tmp = $scope.fd1[2]; | 359 | $scope.tmp = $scope.fd1[2]; |
359 | $scope.fd1[2] = $scope.fd1[1]; | 360 | $scope.fd1[2] = $scope.fd1[1]; |
360 | $scope.fd1[1] = $scope.tmp; | 361 | $scope.fd1[1] = $scope.tmp; |
361 | $scope.fd = $scope.fd1.join("-"); | 362 | $scope.fd = $scope.fd1.join("-"); |
362 | // console.log("===date====",$scope.fd,"===dad====",DefaultToDate) | 363 | // console.log("===date====",$scope.fd,"===dad====",DefaultToDate) |
363 | analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { | 364 | analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { |
364 | // console.log("===date range===",$scope.fd,DefaultToDate) | 365 | // console.log("===date range===",$scope.fd,DefaultToDate) |
365 | for(var i=0; i<result.length; i++) { | 366 | for(var i=0; i<result.length; i++) { |
366 | if(result[i].includes("JET-A Full Service") ){ | 367 | if(result[i].includes("JET-A Full Service") ){ |
367 | let datePusha = result[i][0]; | 368 | let datePusha = result[i][0]; |
368 | let tempValue = result[i][1].toFixed(2); | 369 | let tempValue = result[i][1].toFixed(2); |
369 | let valePusha = parseFloat(tempValue); | 370 | let valePusha = parseFloat(tempValue); |
370 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) | 371 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) |
371 | }else if(result[i].includes("100LL Full Service") ) { | 372 | }else if(result[i].includes("100LL Full Service") ) { |
372 | let datePushb = result[i][0]; | 373 | let datePushb = result[i][0]; |
373 | let tempvalePushb = result[i][1].toFixed(2); | 374 | let tempvalePushb = result[i][1].toFixed(2); |
374 | let valePushb = parseFloat(tempvalePushb); | 375 | let valePushb = parseFloat(tempvalePushb); |
375 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) | 376 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) |
376 | } | 377 | } |
377 | } | 378 | } |
378 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); | 379 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); |
379 | //console.log('$scope.hfpRangeData', $scope.hfpRangeData); | 380 | //console.log('$scope.hfpRangeData', $scope.hfpRangeData); |
380 | 381 | ||
381 | var chart = nv.models.lineChart() | 382 | var chart = nv.models.lineChart() |
382 | .x(function(d) { if(d.length >0){return d[0]}}) | 383 | .x(function(d) { if(d.length >0){return d[0]}}) |
383 | //adjusting, 100% is 1.00, not 100 as it is in the data | 384 | //adjusting, 100% is 1.00, not 100 as it is in the data |
384 | .y(function(d) { return d[1]}) | 385 | .y(function(d) { return d[1]}) |
385 | .color(d3.scale.category10().range()) | 386 | .color(d3.scale.category10().range()) |
386 | .useInteractiveGuideline(true) | 387 | .useInteractiveGuideline(true) |
387 | ; | 388 | ; |
388 | 389 | ||
389 | chart.xAxis | 390 | chart.xAxis |
390 | .tickFormat(function(d) { | 391 | .tickFormat(function(d) { |
391 | return d3.time.format('%x')(new Date(d)) | 392 | return d3.time.format('%x')(new Date(d)) |
392 | }); | 393 | }); |
393 | 394 | ||
394 | chart.yAxis | 395 | chart.yAxis |
395 | .axisLabel("PaP / Retail Price") | 396 | .axisLabel("PaP / Retail Price") |
396 | .axisLabelDistance(-5) | 397 | .axisLabelDistance(-5) |
397 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | 398 | .tickFormat(d3.format(',.2f')).showMaxMin(false); |
398 | 399 | ||
399 | d3.select('#chart svg') | 400 | d3.select('#chart svg') |
400 | .datum($scope.hfpRangeData) | 401 | .datum($scope.hfpRangeData) |
401 | .transition().duration(500) | 402 | .transition().duration(500) |
402 | .call(chart) | 403 | .call(chart) |
403 | ; | 404 | ; |
404 | 405 | ||
405 | nv.utils.windowResize(chart.update); | 406 | nv.utils.windowResize(chart.update); |
406 | 407 | ||
407 | return chart; | 408 | return chart; |
408 | }) | 409 | }) |
409 | 410 | ||
410 | 411 | ||
411 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) { | 412 | } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) { |
412 | $scope.fillForm = false; | 413 | $scope.fillForm = false; |
413 | //from date format | 414 | //from date format |
414 | $scope.dat1 = $scope.hfp.fromDate; | 415 | $scope.dat1 = $scope.hfp.fromDate; |
415 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 416 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
416 | $scope.tmp = $scope.fd1[2]; | 417 | $scope.tmp = $scope.fd1[2]; |
417 | $scope.fd1[2] = $scope.fd1[1]; | 418 | $scope.fd1[2] = $scope.fd1[1]; |
418 | $scope.fd1[1] = $scope.tmp; | 419 | $scope.fd1[1] = $scope.tmp; |
419 | $scope.fd = $scope.fd1.join("-"); | 420 | $scope.fd = $scope.fd1.join("-"); |
420 | //to date format | 421 | //to date format |
421 | $scope.dat2 = $scope.hfp.toDate; | 422 | $scope.dat2 = $scope.hfp.toDate; |
422 | $scope.td1 = $scope.dat2.split("/").reverse(); | 423 | $scope.td1 = $scope.dat2.split("/").reverse(); |
423 | $scope.tmp1 = $scope.td1[2]; | 424 | $scope.tmp1 = $scope.td1[2]; |
424 | $scope.td1[2] = $scope.td1[1]; | 425 | $scope.td1[2] = $scope.td1[1]; |
425 | $scope.td1[1] = $scope.tmp1; | 426 | $scope.td1[1] = $scope.tmp1; |
426 | $scope.td = $scope.td1.join("-") + " " + '23:59:59'; | 427 | $scope.td = $scope.td1.join("-") + " " + '23:59:59'; |
427 | // console.log("===both dates==",$scope.td) | 428 | // console.log("===both dates==",$scope.td) |
428 | analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { | 429 | analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { |
429 | //console.log("===date range22===",result); | 430 | //console.log("===date range22===",result); |
430 | for(var i=0; i<result.length; i++) { | 431 | for(var i=0; i<result.length; i++) { |
431 | if(result[i].includes("JET-A Full Service") ){ | 432 | if(result[i].includes("JET-A Full Service") ){ |
432 | let datePusha = result[i][0]; | 433 | let datePusha = result[i][0]; |
433 | let tempValue = result[i][1].toFixed(2); | 434 | let tempValue = result[i][1].toFixed(2); |
434 | let valePusha = parseFloat(tempValue); | 435 | let valePusha = parseFloat(tempValue); |
435 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) | 436 | $scope.hfpValuesFirst.values.push([datePusha, valePusha]) |
436 | }else if(result[i].includes("100LL Full Service") ) { | 437 | }else if(result[i].includes("100LL Full Service") ) { |
437 | let datePushb = result[i][0]; | 438 | let datePushb = result[i][0]; |
438 | let tempvalePushb = result[i][1].toFixed(2); | 439 | let tempvalePushb = result[i][1].toFixed(2); |
439 | let valePushb = parseFloat(tempvalePushb); | 440 | let valePushb = parseFloat(tempvalePushb); |
440 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) | 441 | $scope.hfpValuesSecond.values.push([datePushb, valePushb]) |
441 | } | 442 | } |
442 | } | 443 | } |
443 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); | 444 | $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); |
444 | // console.log('$scope.hfpRangeData', $scope.hfpRangeData); | 445 | // console.log('$scope.hfpRangeData', $scope.hfpRangeData); |
445 | 446 | ||
446 | var chart = nv.models.lineChart() | 447 | var chart = nv.models.lineChart() |
447 | .x(function(d) { if(d.length >0){return d[0] }}) | 448 | .x(function(d) { if(d.length >0){return d[0] }}) |
448 | //adjusting, 100% is 1.00, not 100 as it is in the data | 449 | //adjusting, 100% is 1.00, not 100 as it is in the data |
449 | .y(function(d) { return d[1]}) | 450 | .y(function(d) { return d[1]}) |
450 | .color(d3.scale.category10().range()) | 451 | .color(d3.scale.category10().range()) |
451 | .useInteractiveGuideline(true) | 452 | .useInteractiveGuideline(true) |
452 | ; | 453 | ; |
453 | 454 | ||
454 | chart.xAxis | 455 | chart.xAxis |
455 | .tickFormat(function(d) { | 456 | .tickFormat(function(d) { |
456 | return d3.time.format('%x')(new Date(d)) | 457 | return d3.time.format('%x')(new Date(d)) |
457 | }); | 458 | }); |
458 | 459 | ||
459 | chart.yAxis | 460 | chart.yAxis |
460 | .axisLabel("PaP / Retail Price") | 461 | .axisLabel("PaP / Retail Price") |
461 | .axisLabelDistance(-5) | 462 | .axisLabelDistance(-5) |
462 | .tickFormat(d3.format(',.2f')).showMaxMin(false); | 463 | .tickFormat(d3.format(',.2f')).showMaxMin(false); |
463 | 464 | ||
464 | d3.select('#chart svg') | 465 | d3.select('#chart svg') |
465 | .datum($scope.hfpRangeData) | 466 | .datum($scope.hfpRangeData) |
466 | .transition().duration(500) | 467 | .transition().duration(500) |
467 | .call(chart) | 468 | .call(chart) |
468 | ; | 469 | ; |
469 | 470 | ||
470 | nv.utils.windowResize(chart.update); | 471 | nv.utils.windowResize(chart.update); |
471 | 472 | ||
472 | return chart; | 473 | return chart; |
473 | }) | 474 | }) |
474 | 475 | ||
475 | } else { | 476 | } else { |
476 | $scope.fillForm = true; | 477 | $scope.fillForm = true; |
477 | } | 478 | } |
478 | 479 | ||
479 | 480 | ||
480 | } | 481 | } |
481 | 482 | ||
482 | 483 | ||
483 | /*Date Range Filter for Monthly fuel Sales*/ | 484 | /*Date Range Filter for Monthly fuel Sales*/ |
484 | $scope.submitDate = function() { | 485 | $scope.submitDate = function() { |
485 | if ($scope.drf.fromDate === undefined) { | 486 | if ($scope.drf.fromDate === undefined) { |
486 | $scope.fillForm = true; | 487 | $scope.fillForm = true; |
487 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') { | 488 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') { |
488 | $scope.fillForm = false; | 489 | $scope.fillForm = false; |
489 | var today = new Date(); | 490 | var today = new Date(); |
490 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); | 491 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); |
491 | //from date format | 492 | //from date format |
492 | $scope.dat1 = $scope.drf.fromDate; | 493 | $scope.dat1 = $scope.drf.fromDate; |
493 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 494 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
494 | $scope.tmp = $scope.fd1[2]; | 495 | $scope.tmp = $scope.fd1[2]; |
495 | $scope.fd1[2] = $scope.fd1[1]; | 496 | $scope.fd1[2] = $scope.fd1[1]; |
496 | $scope.fd1[1] = $scope.tmp; | 497 | $scope.fd1[1] = $scope.tmp; |
497 | $scope.fd = $scope.fd1.join("-"); | 498 | $scope.fd = $scope.fd1.join("-"); |
498 | analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) { | 499 | analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) { |
499 | $scope.datamfs = []; | 500 | $scope.datamfs = []; |
500 | $scope.datamfs = result; | 501 | $scope.datamfs = result; |
501 | }) | 502 | }) |
502 | 503 | ||
503 | analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) { | 504 | analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) { |
504 | $scope.ordersCost = result.cost; | 505 | $scope.ordersCost = result.cost; |
505 | $scope.ordersCount = result.count; | 506 | $scope.ordersCount = result.count; |
506 | }) | 507 | }) |
507 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) { | 508 | } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) { |
508 | $scope.fillForm = false; | 509 | $scope.fillForm = false; |
509 | //from date format | 510 | //from date format |
510 | $scope.dat1 = $scope.drf.fromDate; | 511 | $scope.dat1 = $scope.drf.fromDate; |
511 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 512 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
512 | $scope.tmp = $scope.fd1[2]; | 513 | $scope.tmp = $scope.fd1[2]; |
513 | $scope.fd1[2] = $scope.fd1[1]; | 514 | $scope.fd1[2] = $scope.fd1[1]; |
514 | $scope.fd1[1] = $scope.tmp; | 515 | $scope.fd1[1] = $scope.tmp; |
515 | $scope.fd = $scope.fd1.join("-"); | 516 | $scope.fd = $scope.fd1.join("-"); |
516 | $scope.dat2 = $scope.drf.toDate; | 517 | $scope.dat2 = $scope.drf.toDate; |
517 | $scope.td1 = $scope.dat2.split("/").reverse(); | 518 | $scope.td1 = $scope.dat2.split("/").reverse(); |
518 | $scope.tmp1 = $scope.td1[2]; | 519 | $scope.tmp1 = $scope.td1[2]; |
519 | $scope.td1[2] = $scope.td1[1]; | 520 | $scope.td1[2] = $scope.td1[1]; |
520 | $scope.td1[1] = $scope.tmp1; | 521 | $scope.td1[1] = $scope.tmp1; |
521 | $scope.td = $scope.td1.join("-"); | 522 | $scope.td = $scope.td1.join("-"); |
522 | 523 | ||
523 | analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) { | 524 | analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) { |
524 | $scope.datamfs = []; | 525 | $scope.datamfs = []; |
525 | $scope.datamfs = result; | 526 | $scope.datamfs = result; |
526 | }) | 527 | }) |
527 | 528 | ||
528 | analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) { | 529 | analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) { |
529 | $scope.ordersCost = result.cost; | 530 | $scope.ordersCost = result.cost; |
530 | $scope.ordersCount = result.count; | 531 | $scope.ordersCount = result.count; |
531 | }) | 532 | }) |
532 | 533 | ||
533 | } else { | 534 | } else { |
534 | $scope.fillForm = true; | 535 | $scope.fillForm = true; |
535 | } | 536 | } |
536 | 537 | ||
537 | 538 | ||
538 | } | 539 | } |
539 | 540 | ||
540 | 541 | ||
541 | 542 | ||
542 | /*Date Range Filter for Customer Sources*/ | 543 | /*Date Range Filter for Customer Sources*/ |
543 | $scope.submitDateCs = function() { | 544 | $scope.submitDateCs = function() { |
544 | if ($scope.cs.fromDate === undefined) { | 545 | if ($scope.cs.fromDate === undefined) { |
545 | 546 | ||
546 | $scope.fillForm = true; | 547 | $scope.fillForm = true; |
547 | } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') { | 548 | } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') { |
548 | $scope.fillForm = false; | 549 | $scope.fillForm = false; |
549 | var today = new Date(); | 550 | var today = new Date(); |
550 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); | 551 | var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); |
551 | //from date format | 552 | //from date format |
552 | $scope.dat1 = $scope.cs.fromDate; | 553 | $scope.dat1 = $scope.cs.fromDate; |
553 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 554 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
554 | $scope.tmp = $scope.fd1[2]; | 555 | $scope.tmp = $scope.fd1[2]; |
555 | $scope.fd1[2] = $scope.fd1[1]; | 556 | $scope.fd1[2] = $scope.fd1[1]; |
556 | $scope.fd1[1] = $scope.tmp; | 557 | $scope.fd1[1] = $scope.tmp; |
557 | $scope.fd = $scope.fd1.join("-"); | 558 | $scope.fd = $scope.fd1.join("-"); |
558 | analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) { | 559 | analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) { |
559 | $scope.csValues = result; | 560 | $scope.csValues = result; |
560 | $scope.optionscs = { | 561 | $scope.optionscs = { |
561 | chart: { | 562 | chart: { |
562 | type: 'pieChart', | 563 | type: 'pieChart', |
563 | height: 500, | 564 | height: 500, |
564 | // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], | 565 | // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], |
565 | x: function(d) { | 566 | x: function(d) { |
566 | return d.key; | 567 | return d.key; |
567 | }, | 568 | }, |
568 | y: function(d) { | 569 | y: function(d) { |
569 | return d.y; | 570 | return d.y; |
570 | }, | 571 | }, |
571 | showLabels: false, | 572 | showLabels: false, |
572 | segmentShowStroke: false, | 573 | segmentShowStroke: false, |
573 | animationSteps: 20, | 574 | animationSteps: 20, |
574 | animationEasing: "linear", | 575 | animationEasing: "linear", |
575 | animateScale: true, | 576 | animateScale: true, |
576 | duration: 500, | 577 | duration: 500, |
577 | labelThreshold: 0.01, | 578 | labelThreshold: 0.01, |
578 | labelSunbeamLayout: true, | 579 | labelSunbeamLayout: true, |
579 | legend: { | 580 | legend: { |
580 | margin: { | 581 | margin: { |
581 | top: 5, | 582 | top: 5, |
582 | right: 35, | 583 | right: 35, |
583 | bottom: 5, | 584 | bottom: 5, |
584 | left: 0 | 585 | left: 0 |
585 | } | 586 | } |
586 | } | 587 | } |
587 | } | 588 | } |
588 | }; | 589 | }; |
589 | $scope.datacs = $scope.csValues; | 590 | $scope.datacs = $scope.csValues; |
590 | }) | 591 | }) |
591 | 592 | ||
592 | 593 | ||
593 | } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) { | 594 | } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) { |
594 | $scope.fillForm = false; | 595 | $scope.fillForm = false; |
595 | //from date format | 596 | //from date format |
596 | $scope.dat1 = $scope.cs.fromDate; | 597 | $scope.dat1 = $scope.cs.fromDate; |
597 | $scope.fd1 = $scope.dat1.split("/").reverse(); | 598 | $scope.fd1 = $scope.dat1.split("/").reverse(); |
598 | $scope.tmp = $scope.fd1[2]; | 599 | $scope.tmp = $scope.fd1[2]; |
599 | $scope.fd1[2] = $scope.fd1[1]; | 600 | $scope.fd1[2] = $scope.fd1[1]; |
600 | $scope.fd1[1] = $scope.tmp; | 601 | $scope.fd1[1] = $scope.tmp; |
601 | $scope.fd = $scope.fd1.join("-"); | 602 | $scope.fd = $scope.fd1.join("-"); |
602 | //to date format | 603 | //to date format |
603 | $scope.dat2 = $scope.cs.toDate; | 604 | $scope.dat2 = $scope.cs.toDate; |
604 | $scope.td1 = $scope.dat2.split("/").reverse(); | 605 | $scope.td1 = $scope.dat2.split("/").reverse(); |
605 | $scope.tmp1 = $scope.td1[2]; | 606 | $scope.tmp1 = $scope.td1[2]; |
606 | $scope.td1[2] = $scope.td1[1]; | 607 | $scope.td1[2] = $scope.td1[1]; |
607 | $scope.td1[1] = $scope.tmp1; | 608 | $scope.td1[1] = $scope.tmp1; |
608 | $scope.td = $scope.td1.join("-"); | 609 | $scope.td = $scope.td1.join("-"); |
609 | 610 | ||
610 | analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) { | 611 | analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) { |
611 | $scope.csValues = result; | 612 | $scope.csValues = result; |
612 | $scope.optionscs = { | 613 | $scope.optionscs = { |
613 | chart: { | 614 | chart: { |
614 | type: 'pieChart', | 615 | type: 'pieChart', |
615 | height: 500, | 616 | height: 500, |
616 | x: function(d) { | 617 | x: function(d) { |
617 | return d.key; | 618 | return d.key; |
618 | }, | 619 | }, |
619 | y: function(d) { | 620 | y: function(d) { |
620 | return d.y; | 621 | return d.y; |
621 | }, | 622 | }, |
622 | showLabels: false, | 623 | showLabels: false, |
623 | segmentShowStroke: false, | 624 | segmentShowStroke: false, |
624 | animationSteps: 20, | 625 | animationSteps: 20, |
625 | animationEasing: "linear", | 626 | animationEasing: "linear", |
626 | animateScale: true, | 627 | animateScale: true, |
627 | duration: 500, | 628 | duration: 500, |
628 | labelThreshold: 0.01, | 629 | labelThreshold: 0.01, |
629 | labelSunbeamLayout: true, | 630 | labelSunbeamLayout: true, |
630 | legend: { | 631 | legend: { |
631 | margin: { | 632 | margin: { |
632 | top: 5, | 633 | top: 5, |
633 | right: 35, | 634 | right: 35, |
634 | bottom: 5, | 635 | bottom: 5, |
635 | left: 0 | 636 | left: 0 |
636 | } | 637 | } |
637 | } | 638 | } |
638 | } | 639 | } |
639 | }; | 640 | }; |
640 | $scope.datacs = $scope.csValues; | 641 | $scope.datacs = $scope.csValues; |
641 | }) | 642 | }) |
642 | 643 | ||
643 | } else { | 644 | } else { |
644 | $scope.fillForm = true; | 645 | $scope.fillForm = true; |
645 | } | 646 | } |
646 | 647 | ||
647 | 648 | ||
648 | } | 649 | } |
649 | 650 | ||
650 | 651 | ||
651 | }]); | 652 | }]); |
app/partials/fuelOrders/fuelOrders.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(4) > a{ | 2 | .subnavbar .mainnav > li:nth-child(4) > a{ |
3 | color: #c44646; | 3 | color: #c44646; |
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 | 42 | ||
43 | -webkit-border-top-left-radius: 5px; | 43 | -webkit-border-top-left-radius: 5px; |
44 | -webkit-border-bottom-left-radius: 5px; | 44 | -webkit-border-bottom-left-radius: 5px; |
45 | -moz-border-radius-topleft: 5px; | 45 | -moz-border-radius-topleft: 5px; |
46 | -moz-border-radius-bottomleft: 5px; | 46 | -moz-border-radius-bottomleft: 5px; |
47 | border-top-left-radius: 5px; | 47 | border-top-left-radius: 5px; |
48 | border-bottom-left-radius: 5px; | 48 | border-bottom-left-radius: 5px; |
49 | border-right: 1px solid rgba(0,0,0,0.15); | 49 | border-right: 1px solid rgba(0,0,0,0.15); |
50 | } | 50 | } |
51 | 51 | ||
52 | .button1:hover span, .button1.active span { | 52 | .button1:hover span, .button1.active span { |
53 | background-color:rgb(0,102,26); | 53 | background-color:rgb(0,102,26); |
54 | border-right: 1px solid rgba(0,0,0,0.3); | 54 | border-right: 1px solid rgba(0,0,0,0.3); |
55 | } | 55 | } |
56 | 56 | ||
57 | .button1:active { | 57 | .button1:active { |
58 | margin-top: 2px; | 58 | margin-top: 2px; |
59 | margin-bottom: 13px; | 59 | margin-bottom: 13px; |
60 | 60 | ||
61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
66 | } | 66 | } |
67 | 67 | ||
68 | .button1.turquoise { | 68 | .button1.turquoise { |
69 | background: #449d44; | 69 | background: #449d44; |
70 | } | 70 | } |
71 | </style> | 71 | </style> |
72 | 72 | ||
73 | <div class="myLoader" ng-show="showLoader"> | 73 | <div class="myLoader" ng-show="showLoader"> |
74 | <img src="../img/hourglass.gif" width="50px;"> | 74 | <img src="../img/hourglass.gif" width="50px;"> |
75 | </div> | 75 | </div> |
76 | 76 | ||
77 | 77 | ||
78 | <div class="main"> | 78 | <div class="main"> |
79 | <div class="container"> | 79 | <div class="container"> |
80 | <div class="row"> | 80 | <div class="row"> |
81 | <div class="col-md-12"> | 81 | <div class="col-md-12"> |
82 | <div class="widget stacked "> | 82 | <div class="widget stacked "> |
83 | <div class="widget-content"> | 83 | <div class="widget-content"> |
84 | <div class="tabbable"> | 84 | <div class="tabbable"> |
85 | <ul class="nav nav-tabs"> | 85 | <ul class="nav nav-tabs"> |
86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> | 86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> |
87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> | 87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> |
88 | <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> | 88 | <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> |
89 | </ul> | 89 | </ul> |
90 | <br> | 90 | <br> |
91 | <div class="tab-content customer-table" style="margin:0px"> | 91 | <div class="tab-content customer-table" style="margin:0px"> |
92 | <div class="tab-pane active" id="companyView"> | 92 | <div class="tab-pane active" id="companyView"> |
93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> | 93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> |
94 | <tr ng-repeat="row in $data | orderBy : '-fuelingDate' | filter:searchText" style="cursor: pointer;" > | 94 | <tr ng-repeat="row in $data | orderBy : '-fuelingDate' | filter:searchText" style="cursor: pointer;" > |
95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> | 95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> |
96 | {{row.companyName}} | 96 | {{row.companyName}} |
97 | </td> | 97 | </td> |
98 | <td data-title="'Fueling Date'" filter="{fuelingDate: 'text'}" sortable="'fuelingDate'" ng-click="editTableRow(row)"> | 98 | <td data-title="'Fueling Date'" filter="{'fuelingDate': 'text'}" sortable="'fuelingDate'" ng-click="editTableRow(row)"> |
99 | {{row.fuelingDate |date:'MM/dd/yyyy'}} | 99 | {{row.fuelingDate |date:'MM/dd/yyyy'}} |
100 | </td> | 100 | </td> |
101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> | 101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> |
102 | {{row.aircraftName}} | 102 | {{row.aircraftName}} |
103 | </td> | 103 | </td> |
104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> | 104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> |
105 | {{row.source}} | 105 | {{row.source}} |
106 | </td> | 106 | </td> |
107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> | 107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> |
108 | {{row.requestedVolume}} | 108 | {{row.requestedVolume}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> | 110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> |
111 | {{row.fboCost | number : 4}} | 111 | {{row.fboCost | number : 4}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> | 113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> |
114 | {{row.priceQuote | number : 4}} | 114 | {{row.priceQuote | number : 4}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> | 116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> |
117 | {{row.invoiced | number : 4}} | 117 | {{row.invoiced | number : 4}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> | 119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> |
120 | {{row.total | number : 4}} | 120 | {{row.total | number : 4}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> | 122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> |
123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)" ng-init="{{defaultStatus != '' ? row.status = defaultStatus : '' }}"> | 123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)" ng-init="{{defaultStatus != '' ? row.status = defaultStatus : '' }}"> |
124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> | 124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> |
125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> | 125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> |
126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> | 126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> |
127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> | 127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> |
128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> | 128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> |
129 | </select> | 129 | </select> |
130 | 130 | ||
131 | </td> | 131 | </td> |
132 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> | 132 | <!-- <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> |
133 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > | 133 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > |
134 | <option value="" disabled selected="selected" >Invoice</option> | 134 | <option value="" disabled selected="selected" >Invoice</option> |
135 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> | 135 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> |
136 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> | 136 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> |
137 | <option value="0" disabled >_____________</option> | 137 | <option value="0" disabled >_____________</option> |
138 | <option value="uploadAttachment" >Upload</option> | 138 | <option value="uploadAttachment" >Upload</option> |
139 | </select> | 139 | </select> |
140 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> | 140 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> |
141 | </td> | 141 | </td> --> |
142 | </tr> | 142 | </tr> |
143 | </table> | 143 | </table> |
144 | 144 | ||
145 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> | 145 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> |
146 | <option value="" disabled selected="selected">Fuel Widget</option> | 146 | <option value="" disabled selected="selected">Fuel Widget</option> |
147 | <option value="dt" >Direct Fuel Order</option> | 147 | <option value="dt" >Direct Fuel Order</option> |
148 | <option value="efo" >Export Fuel Orders</option> | 148 | <option value="efo" >Export Fuel Orders</option> |
149 | </select> | 149 | </select> |
150 | 150 | ||
151 | </div> | 151 | </div> |
152 | </div> | 152 | </div> |
153 | </div> | 153 | </div> |
154 | </div> | 154 | </div> |
155 | <!-- /widget-content --> | 155 | <!-- /widget-content --> |
156 | </div> | 156 | </div> |
157 | <!-- /widget --> | 157 | <!-- /widget --> |
158 | </div> | 158 | </div> |
159 | <!-- /span8 --> | 159 | <!-- /span8 --> |
160 | </div> | 160 | </div> |
161 | <!-- /row --> | 161 | <!-- /row --> |
162 | </div> | 162 | </div> |
163 | <!-- /container --> | 163 | <!-- /container --> |
164 | 164 | ||
165 | 165 | ||
166 | </div> | 166 | </div> |
167 | <!-- /main --> | 167 | <!-- /main --> |
168 | 168 | ||
169 | 169 | ||
170 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 170 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
171 | <div class="modal-dialog modal-lg"> | 171 | <div class="modal-dialog modal-lg"> |
172 | <div class="modal-content"> | 172 | <div class="modal-content"> |
173 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 173 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
174 | <div> | 174 | <div> |
175 | <div class="row" style="margin: 0;"> | 175 | <div class="row" style="margin: 0;"> |
176 | <div> | 176 | <div> |
177 | <div class="widget" style="margin-bottom: 0;"> | 177 | <div class="widget" style="margin-bottom: 0;"> |
178 | <div class="widget-header"> | 178 | <div class="widget-header"> |
179 | <i class="icon-pencil"></i> | 179 | <i class="icon-pencil"></i> |
180 | <i class="fa fa-tasks" aria-hidden="true"></i> | 180 | <i class="fa fa-tasks" aria-hidden="true"></i> |
181 | <h3>Add a New Company</h3> | 181 | <h3>Add a New Company</h3> |
182 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 182 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
183 | <div style="color: #ff9a01;">Activate     | 183 | <div style="color: #ff9a01;">Activate     |
184 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 184 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
185 | </div> | 185 | </div> |
186 | </div> | 186 | </div> |
187 | <div class="clearfix"></div> | 187 | <div class="clearfix"></div> |
188 | </div> | 188 | </div> |
189 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 189 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
190 | <div class="col-xs-12"> | 190 | <div class="col-xs-12"> |
191 | <div class="col-md-8"> | 191 | <div class="col-md-8"> |
192 | <div class="pull-left"> | 192 | <div class="pull-left"> |
193 | <label class="new-input-label"><b>Company Name *</b></label> | 193 | <label class="new-input-label"><b>Company Name *</b></label> |
194 | </div> | 194 | </div> |
195 | <div class="pull-left" style="margin-left: 15px;"> | 195 | <div class="pull-left" style="margin-left: 15px;"> |
196 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> | 196 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> |
197 | <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"> | 197 | <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"> |
198 | 198 | ||
199 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 199 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
200 | </div> | 200 | </div> |
201 | <div class="clearfix"></div> | 201 | <div class="clearfix"></div> |
202 | </div> | 202 | </div> |
203 | <div class="col-md-4"> | 203 | <div class="col-md-4"> |
204 | 204 | ||
205 | <div class="pull-right"> | 205 | <div class="pull-right"> |
206 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 206 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
207 | </div> | 207 | </div> |
208 | <div class="pull-right"> | 208 | <div class="pull-right"> |
209 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 209 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
210 | </div> | 210 | </div> |
211 | <div class="clearfix"></div> | 211 | <div class="clearfix"></div> |
212 | </div> | 212 | </div> |
213 | </div> | 213 | </div> |
214 | <div class="clearfix"></div><br> | 214 | <div class="clearfix"></div><br> |
215 | <div class="col-xs-12"> | 215 | <div class="col-xs-12"> |
216 | <div class="col-md-7"> | 216 | <div class="col-md-7"> |
217 | <div class="pull-left"> | 217 | <div class="pull-left"> |
218 | <label class="new-input-label"><b>Relationship </b></label> | 218 | <label class="new-input-label"><b>Relationship </b></label> |
219 | </div> | 219 | </div> |
220 | <div class="pull-left" style="margin-left: 32px;"> | 220 | <div class="pull-left" style="margin-left: 32px;"> |
221 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 221 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> |
222 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 222 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> |
223 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 223 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
224 | </div> | 224 | </div> |
225 | <div class="clearfix"></div> | 225 | <div class="clearfix"></div> |
226 | </div> | 226 | </div> |
227 | <div class="col-md-2 Airport" style="text-align: right;"> | 227 | <div class="col-md-2 Airport" style="text-align: right;"> |
228 | <b>Certificate Type</b> | 228 | <b>Certificate Type</b> |
229 | </div> | 229 | </div> |
230 | <div class="col-md-3 Airport"> | 230 | <div class="col-md-3 Airport"> |
231 | <select required class="form-control" ng-model="data.certificateType"> | 231 | <select required class="form-control" ng-model="data.certificateType"> |
232 | <option value="" disabled selected hidden>Select...</option> | 232 | <option value="" disabled selected hidden>Select...</option> |
233 | <option value="corporate">Part 91 (Corporate)</option> | 233 | <option value="corporate">Part 91 (Corporate)</option> |
234 | <option value="charter">Part 135 (Charter)</option> | 234 | <option value="charter">Part 135 (Charter)</option> |
235 | <option value="scheduled">Part 121 (Scheduled)</option> | 235 | <option value="scheduled">Part 121 (Scheduled)</option> |
236 | <option value="military">Military</option> | 236 | <option value="military">Military</option> |
237 | <option value="government">Government</option> | 237 | <option value="government">Government</option> |
238 | </select> | 238 | </select> |
239 | </div> | 239 | </div> |
240 | <div class="clearfix"></div> | 240 | <div class="clearfix"></div> |
241 | </div> | 241 | </div> |
242 | <div class="clearfix"></div> | 242 | <div class="clearfix"></div> |
243 | <br/> | 243 | <br/> |
244 | <div class="col-xs-12"> | 244 | <div class="col-xs-12"> |
245 | <div class="col-md-6"> | 245 | <div class="col-md-6"> |
246 | <div class="pull-left" style="width: 110px;"> | 246 | <div class="pull-left" style="width: 110px;"> |
247 | <b>JET A Margin *</b> | 247 | <b>JET A Margin *</b> |
248 | </div> | 248 | </div> |
249 | <div class="pull-left"> | 249 | <div class="pull-left"> |
250 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 250 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> |
251 | <option value="" disabled>Select...</option> | 251 | <option value="" disabled>Select...</option> |
252 | </select> | 252 | </select> |
253 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 253 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
254 | 254 | ||
255 | <div class="clearfix"></div> | 255 | <div class="clearfix"></div> |
256 | </div> | 256 | </div> |
257 | </div> | 257 | </div> |
258 | 258 | ||
259 | <div class="col-md-3 Airport" style="text-align: right;"> | 259 | <div class="col-md-3 Airport" style="text-align: right;"> |
260 | <b>AVGAS 100LL Margin</b> | 260 | <b>AVGAS 100LL Margin</b> |
261 | </div> | 261 | </div> |
262 | <div class="col-md-3 Airport"> | 262 | <div class="col-md-3 Airport"> |
263 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 263 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
264 | <option value="" disabled>Select...</option> | 264 | <option value="" disabled>Select...</option> |
265 | </select> | 265 | </select> |
266 | </div> | 266 | </div> |
267 | <div class="clearfix"></div> | 267 | <div class="clearfix"></div> |
268 | </div> | 268 | </div> |
269 | <div class="clearfix"></div> | 269 | <div class="clearfix"></div> |
270 | <br/> | 270 | <br/> |
271 | <div class="col-xs-12"> | 271 | <div class="col-xs-12"> |
272 | <div class="col-md-12"> | 272 | <div class="col-md-12"> |
273 | <div class="pull-left" style="width: 110px;"> | 273 | <div class="pull-left" style="width: 110px;"> |
274 | <label class="new-input-label"><b>Address</b></label> | 274 | <label class="new-input-label"><b>Address</b></label> |
275 | </div> | 275 | </div> |
276 | <div class="pull-left" style="width: calc(100% - 110px);"> | 276 | <div class="pull-left" style="width: calc(100% - 110px);"> |
277 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 277 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
278 | </div> | 278 | </div> |
279 | <div class="clearfix"></div> | 279 | <div class="clearfix"></div> |
280 | </div> | 280 | </div> |
281 | </div> | 281 | </div> |
282 | <div class="clearfix"></div> | 282 | <div class="clearfix"></div> |
283 | <br/> | 283 | <br/> |
284 | <div class="col-xs-12"> | 284 | <div class="col-xs-12"> |
285 | <div class="col-md-12"> | 285 | <div class="col-md-12"> |
286 | <div class="pull-left" style="width: 110px;"> | 286 | <div class="pull-left" style="width: 110px;"> |
287 | <label class="new-input-label"><b>Address2</b></label> | 287 | <label class="new-input-label"><b>Address2</b></label> |
288 | </div> | 288 | </div> |
289 | <div class="pull-left" style="width: calc(100% - 110px);"> | 289 | <div class="pull-left" style="width: calc(100% - 110px);"> |
290 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 290 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
291 | </div> | 291 | </div> |
292 | <div class="clearfix"></div> | 292 | <div class="clearfix"></div> |
293 | </div> | 293 | </div> |
294 | </div> | 294 | </div> |
295 | <div class="clearfix"></div> | 295 | <div class="clearfix"></div> |
296 | <br/> | 296 | <br/> |
297 | <div class="col-xs-12"> | 297 | <div class="col-xs-12"> |
298 | 298 | ||
299 | <div class="col-md-6"> | 299 | <div class="col-md-6"> |
300 | <div class="pull-left" style="width: 110px;"> | 300 | <div class="pull-left" style="width: 110px;"> |
301 | <label class="new-input-label"><b>City</b></label> | 301 | <label class="new-input-label"><b>City</b></label> |
302 | </div> | 302 | </div> |
303 | <div class="pull-left" style="width: calc(100% - 110px);"> | 303 | <div class="pull-left" style="width: calc(100% - 110px);"> |
304 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 304 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
305 | </div> | 305 | </div> |
306 | <div class="clearfix"></div> | 306 | <div class="clearfix"></div> |
307 | </div> | 307 | </div> |
308 | <div class="col-md-3"> | 308 | <div class="col-md-3"> |
309 | <div class="pull-left" style="width: 40px;"> | 309 | <div class="pull-left" style="width: 40px;"> |
310 | <label class="new-input-label"><b>State</b></label> | 310 | <label class="new-input-label"><b>State</b></label> |
311 | </div> | 311 | </div> |
312 | <div class="pull-left" style="width: calc(100% - 110px);"> | 312 | <div class="pull-left" style="width: calc(100% - 110px);"> |
313 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 313 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
314 | </div> | 314 | </div> |
315 | <div class="clearfix"></div> | 315 | <div class="clearfix"></div> |
316 | </div> | 316 | </div> |
317 | <div class="col-md-3"> | 317 | <div class="col-md-3"> |
318 | <div class="pull-left"> | 318 | <div class="pull-left"> |
319 | <label class="new-input-label"><b>Zip Code</b></label> | 319 | <label class="new-input-label"><b>Zip Code</b></label> |
320 | </div> | 320 | </div> |
321 | <div class="pull-right" style="width: calc(100% - 60px);"> | 321 | <div class="pull-right" style="width: calc(100% - 60px);"> |
322 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 322 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
323 | </div> | 323 | </div> |
324 | <div class="clearfix"></div> | 324 | <div class="clearfix"></div> |
325 | </div> | 325 | </div> |
326 | </div> | 326 | </div> |
327 | <div class="clearfix"></div> | 327 | <div class="clearfix"></div> |
328 | <br/> | 328 | <br/> |
329 | <div class="col-xs-12"> | 329 | <div class="col-xs-12"> |
330 | 330 | ||
331 | <div class="col-md-6"> | 331 | <div class="col-md-6"> |
332 | <div class="pull-left" style="width: 110px;"> | 332 | <div class="pull-left" style="width: 110px;"> |
333 | <label class="new-input-label"><b>Country</b></label> | 333 | <label class="new-input-label"><b>Country</b></label> |
334 | </div> | 334 | </div> |
335 | <div class="pull-left" style="width: calc(100% - 110px);"> | 335 | <div class="pull-left" style="width: calc(100% - 110px);"> |
336 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 336 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
337 | </div> | 337 | </div> |
338 | <div class="clearfix"></div> | 338 | <div class="clearfix"></div> |
339 | </div> | 339 | </div> |
340 | <div class="col-md-6"> | 340 | <div class="col-md-6"> |
341 | <div class="pull-left" style="width: 110px;"> | 341 | <div class="pull-left" style="width: 110px;"> |
342 | <label class="new-input-label"><b>Internal Note</b></label> | 342 | <label class="new-input-label"><b>Internal Note</b></label> |
343 | </div> | 343 | </div> |
344 | <div class="pull-left" style="width: calc(100% - 110px);"> | 344 | <div class="pull-left" style="width: calc(100% - 110px);"> |
345 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 345 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
346 | </div> | 346 | </div> |
347 | <div class="clearfix"></div> | 347 | <div class="clearfix"></div> |
348 | </div> | 348 | </div> |
349 | </div> | 349 | </div> |
350 | <div class="clearfix"></div> | 350 | <div class="clearfix"></div> |
351 | <!-- <br/> | 351 | <!-- <br/> |
352 | <div class="col-xs-12"> | 352 | <div class="col-xs-12"> |
353 | <div class="col-md-2 Airport"></div> | 353 | <div class="col-md-2 Airport"></div> |
354 | <div class="col-md-10 Airport"> | 354 | <div class="col-md-10 Airport"> |
355 | <div class="pull-right"> | 355 | <div class="pull-right"> |
356 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 356 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
357 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 357 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
358 | </div> | 358 | </div> |
359 | </div> | 359 | </div> |
360 | </div> --> | 360 | </div> --> |
361 | </div> | 361 | </div> |
362 | </div> | 362 | </div> |
363 | <div class="clearfix"></div> | 363 | <div class="clearfix"></div> |
364 | </div> | 364 | </div> |
365 | </div> | 365 | </div> |
366 | </div> | 366 | </div> |
367 | </div> | 367 | </div> |
368 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 368 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
369 | <div> | 369 | <div> |
370 | <div class="row" style="margin: 0;"> | 370 | <div class="row" style="margin: 0;"> |
371 | <div> | 371 | <div> |
372 | <div class="widget" style="margin-bottom: 0;"> | 372 | <div class="widget" style="margin-bottom: 0;"> |
373 | <div class="widget-header"> | 373 | <div class="widget-header"> |
374 | <i class="icon-pencil"></i> | 374 | <i class="icon-pencil"></i> |
375 | <i class="fa fa-tasks" aria-hidden="true"></i> | 375 | <i class="fa fa-tasks" aria-hidden="true"></i> |
376 | <h3>Add a New Company</h3> | 376 | <h3>Add a New Company</h3> |
377 | <div class="clearfix"></div> | 377 | <div class="clearfix"></div> |
378 | </div> | 378 | </div> |
379 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 379 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
380 | <div class="col-xs-12"> | 380 | <div class="col-xs-12"> |
381 | <div class="widget-header"> | 381 | <div class="widget-header"> |
382 | <i class="fa fa-list"></i> | 382 | <i class="fa fa-list"></i> |
383 | <h3>Aircraft List</h3> | 383 | <h3>Aircraft List</h3> |
384 | </div> | 384 | </div> |
385 | <div class="widget-content" style="padding:0px;border: 0px; "> | 385 | <div class="widget-content" style="padding:0px;border: 0px; "> |
386 | <div class="table-responsive"> | 386 | <div class="table-responsive"> |
387 | <table class="table table-striped table-bordered"> | 387 | <table class="table table-striped table-bordered"> |
388 | <thead> | 388 | <thead> |
389 | <tr> | 389 | <tr> |
390 | <th>Tail</th> | 390 | <th>Tail</th> |
391 | <th>Make</th> | 391 | <th>Make</th> |
392 | <th>Model</th> | 392 | <th>Model</th> |
393 | <th>Size</th> | 393 | <th>Size</th> |
394 | <th>JET A Margin</th> | 394 | <th>JET A Margin</th> |
395 | <th>AVGS 100LL Margin</th> | 395 | <th>AVGS 100LL Margin</th> |
396 | </tr> | 396 | </tr> |
397 | </thead> | 397 | </thead> |
398 | <tbody> | 398 | <tbody> |
399 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 399 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
400 | <td style="width: 15%"> | 400 | <td style="width: 15%"> |
401 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 401 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
402 | </td> | 402 | </td> |
403 | <td style="width: 17%"> | 403 | <td style="width: 17%"> |
404 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 404 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
405 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 405 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
406 | <option value="" disabled>Select...</option> | 406 | <option value="" disabled>Select...</option> |
407 | </select> | 407 | </select> |
408 | </td> | 408 | </td> |
409 | <td style="width: 17%"> | 409 | <td style="width: 17%"> |
410 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 410 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
411 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 411 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
412 | <option value="" disabled>Select...</option> | 412 | <option value="" disabled>Select...</option> |
413 | </select> | 413 | </select> |
414 | </td> | 414 | </td> |
415 | <td style="width: 17%"> | 415 | <td style="width: 17%"> |
416 | <select class="form-control" ng-model="aircraftData.sizeId"> | 416 | <select class="form-control" ng-model="aircraftData.sizeId"> |
417 | <option value="" disabled>Select</option> | 417 | <option value="" disabled>Select</option> |
418 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 418 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
419 | </select> | 419 | </select> |
420 | </td> | 420 | </td> |
421 | <td style="width: 17%"> | 421 | <td style="width: 17%"> |
422 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 422 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
423 | <option value="" disabled>Select</option> | 423 | <option value="" disabled>Select</option> |
424 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 424 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
425 | </select> | 425 | </select> |
426 | </td> | 426 | </td> |
427 | <td style="width: 17%"> | 427 | <td style="width: 17%"> |
428 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 428 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
429 | <option value="" disabled>Select</option> | 429 | <option value="" disabled>Select</option> |
430 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 430 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
431 | </select> | 431 | </select> |
432 | </td> | 432 | </td> |
433 | </tr> | 433 | </tr> |
434 | </tbody> | 434 | </tbody> |
435 | </table> | 435 | </table> |
436 | </div> | 436 | </div> |
437 | <div class="clearfix"></div> | 437 | <div class="clearfix"></div> |
438 | </div> | 438 | </div> |
439 | </div> | 439 | </div> |
440 | <div class="clearfix"></div> | 440 | <div class="clearfix"></div> |
441 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 441 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
442 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 442 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
443 | </div> | 443 | </div> |
444 | </div> | 444 | </div> |
445 | </div> | 445 | </div> |
446 | <div class="clearfix"></div> | 446 | <div class="clearfix"></div> |
447 | </div> | 447 | </div> |
448 | </div> | 448 | </div> |
449 | </div> | 449 | </div> |
450 | </div> | 450 | </div> |
451 | <div class="modal-footer" style="border-top: 0;"> | 451 | <div class="modal-footer" style="border-top: 0;"> |
452 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 452 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
453 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 453 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
454 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 454 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
455 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 455 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
456 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 456 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
457 | </div> | 457 | </div> |
458 | </div> | 458 | </div> |
459 | </div> | 459 | </div> |
460 | </form> | 460 | </form> |
461 | 461 | ||
462 | 462 | ||
463 | 463 | ||
464 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 464 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
465 | <div class="modal-dialog modal-lg"> | 465 | <div class="modal-dialog modal-lg"> |
466 | <div class="modal-content"> | 466 | <div class="modal-content"> |
467 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 467 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
468 | <div> | 468 | <div> |
469 | <div class="row" style="margin: 0;"> | 469 | <div class="row" style="margin: 0;"> |
470 | <div> | 470 | <div> |
471 | <div class="widget" style="margin-bottom: 0;"> | 471 | <div class="widget" style="margin-bottom: 0;"> |
472 | <div class="widget-header"> | 472 | <div class="widget-header"> |
473 | <i class="icon-pencil"></i> | 473 | <i class="icon-pencil"></i> |
474 | <i class="fa fa-tasks" aria-hidden="true"></i> | 474 | <i class="fa fa-tasks" aria-hidden="true"></i> |
475 | <h3>Add a Fuel Order</h3> | 475 | <h3>Add a Fuel Order</h3> |
476 | <div class="clearfix"></div> | 476 | <div class="clearfix"></div> |
477 | </div> | 477 | </div> |
478 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 478 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
479 | <div class="col-xs-12"> | 479 | <div class="col-xs-12"> |
480 | <div class="col-xs-12"> | 480 | <div class="col-xs-12"> |
481 | 481 | ||
482 | <div class="col-md-6"> | 482 | <div class="col-md-6"> |
483 | <div class="pull-left" style="width: 110px;"> | 483 | <div class="pull-left" style="width: 110px;"> |
484 | <label class="new-input-label"><b>Company</b></label> | 484 | <label class="new-input-label"><b>Company</b></label> |
485 | </div> | 485 | </div> |
486 | <div class="pull-left" style="width: calc(100% - 110px);"> | 486 | <div class="pull-left" style="width: calc(100% - 110px);"> |
487 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 487 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
488 | <option value="" selected disabled>Select Company</option> | 488 | <option value="" selected disabled>Select Company</option> |
489 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 489 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
490 | </select> | 490 | </select> |
491 | </div> | 491 | </div> |
492 | <div class="clearfix"></div> | 492 | <div class="clearfix"></div> |
493 | </div> | 493 | </div> |
494 | <div class="col-md-6"> | 494 | <div class="col-md-6"> |
495 | <div class="pull-left" style="width: 110px;"> | 495 | <div class="pull-left" style="width: 110px;"> |
496 | <label class="new-input-label"><b>Product</b></label> | 496 | <label class="new-input-label"><b>Product</b></label> |
497 | </div> | 497 | </div> |
498 | <div class="pull-left" style="width: calc(100% - 110px);"> | 498 | <div class="pull-left" style="width: calc(100% - 110px);"> |
499 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> | 499 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> |
500 | <option value="" selected disabled>Select Product</option> | 500 | <option value="" selected disabled>Select Product</option> |
501 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 501 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
502 | </select> | 502 | </select> |
503 | </div> | 503 | </div> |
504 | <div class="clearfix"></div> | 504 | <div class="clearfix"></div> |
505 | </div> | 505 | </div> |
506 | 506 | ||
507 | </div> | 507 | </div> |
508 | <div class="clearfix"></div> | 508 | <div class="clearfix"></div> |
509 | <br/> | 509 | <br/> |
510 | 510 | ||
511 | 511 | ||
512 | <div class="col-xs-12"> | 512 | <div class="col-xs-12"> |
513 | 513 | ||
514 | <div class="col-md-6"> | 514 | <div class="col-md-6"> |
515 | <div class="pull-left" style="width: 110px;"> | 515 | <div class="pull-left" style="width: 110px;"> |
516 | <label class="new-input-label"><b>Aircraft</b></label> | 516 | <label class="new-input-label"><b>Aircraft</b></label> |
517 | </div> | 517 | </div> |
518 | <div class="pull-left" style="width: calc(100% - 110px);"> | 518 | <div class="pull-left" style="width: calc(100% - 110px);"> |
519 | <select class="form-control" ng-model="order.aircraftName" ng-change="getAircraftMakeAndModel(order.aircraftName)" required> | 519 | <select class="form-control" ng-model="order.aircraftName" ng-change="getAircraftMakeAndModel(order.aircraftName)" required> |
520 | <option selected disabled value="">Select Aircraft</option> | 520 | <option selected disabled value="">Select Aircraft</option> |
521 | <option ng-repeat="list in aircraftList">{{list.tail}}</option> | 521 | <option ng-repeat="list in aircraftList">{{list.tail}}</option> |
522 | </select> | 522 | </select> |
523 | </div> | 523 | </div> |
524 | <div class="clearfix"></div> | 524 | <div class="clearfix"></div> |
525 | </div> | 525 | </div> |
526 | <div class="col-md-6"> | 526 | <div class="col-md-6"> |
527 | <div class="pull-left" style="width: 110px;"> | 527 | <div class="pull-left" style="width: 110px;"> |
528 | <label class="new-input-label"><b>Make</b></label> | 528 | <label class="new-input-label"><b>Make</b></label> |
529 | </div> | 529 | </div> |
530 | <div class="pull-left" style="width: calc(100% - 110px);"> | 530 | <div class="pull-left" style="width: calc(100% - 110px);"> |
531 | <select class="form-control" ng-model="order.aircraftMake" disabled required> | 531 | <select class="form-control" ng-model="order.aircraftMake" disabled required> |
532 | <option selected disabled value="">Select Make</option> | 532 | <option selected disabled value="">Select Make</option> |
533 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.make}}</option> --> | 533 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.make}}</option> --> |
534 | <option ng-repeat="list in aircraftList">{{list.make}}</option> | 534 | <option ng-repeat="list in aircraftList">{{list.make}}</option> |
535 | </select> | 535 | </select> |
536 | </div> | 536 | </div> |
537 | <div class="clearfix"></div> | 537 | <div class="clearfix"></div> |
538 | </div> | 538 | </div> |
539 | 539 | ||
540 | </div> | 540 | </div> |
541 | <div class="clearfix"></div> | 541 | <div class="clearfix"></div> |
542 | <br/> | 542 | <br/> |
543 | 543 | ||
544 | <div class="col-xs-12"> | 544 | <div class="col-xs-12"> |
545 | 545 | ||
546 | <div class="col-md-6"> | 546 | <div class="col-md-6"> |
547 | <div class="pull-left" style="width: 110px;"> | 547 | <div class="pull-left" style="width: 110px;"> |
548 | <label class="new-input-label"><b>Model</b></label> | 548 | <label class="new-input-label"><b>Model</b></label> |
549 | </div> | 549 | </div> |
550 | <div class="pull-left" style="width: calc(100% - 110px);"> | 550 | <div class="pull-left" style="width: calc(100% - 110px);"> |
551 | <select class="form-control" ng-model="order.aircraftModel" disabled required> | 551 | <select class="form-control" ng-model="order.aircraftModel" disabled required> |
552 | <option selected disabled value="">Select Model</option> | 552 | <option selected disabled value="">Select Model</option> |
553 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.model}}</option> --> | 553 | <!-- <option ng-repeat="list in aircraftList" value="{{list}}">{{list.model}}</option> --> |
554 | <option ng-repeat="list in aircraftList">{{list.model}}</option> | 554 | <option ng-repeat="list in aircraftList">{{list.model}}</option> |
555 | </select> | 555 | </select> |
556 | </div> | 556 | </div> |
557 | <div class="clearfix"></div> | 557 | <div class="clearfix"></div> |
558 | </div> | 558 | </div> |
559 | <div class="col-md-6"> | 559 | <div class="col-md-6"> |
560 | <div class="pull-left" style="width: 110px;"> | 560 | <div class="pull-left" style="width: 110px;"> |
561 | <label class="new-input-label"><b>Volume</b></label> | 561 | <label class="new-input-label"><b>Volume</b></label> |
562 | </div> | 562 | </div> |
563 | <div class="pull-left" style="width: calc(100% - 110px);"> | 563 | <div class="pull-left" style="width: calc(100% - 110px);"> |
564 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 564 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
565 | </div> | 565 | </div> |
566 | <div class="clearfix"></div> | 566 | <div class="clearfix"></div> |
567 | </div> | 567 | </div> |
568 | 568 | ||
569 | </div> | 569 | </div> |
570 | <div class="clearfix"></div> | 570 | <div class="clearfix"></div> |
571 | <br/> | 571 | <br/> |
572 | 572 | ||
573 | <div class="col-xs-12"> | 573 | <div class="col-xs-12"> |
574 | 574 | ||
575 | <div class="col-md-6"> | 575 | <div class="col-md-6"> |
576 | <div class="pull-left" style="width: 110px;"> | 576 | <div class="pull-left" style="width: 110px;"> |
577 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 577 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
578 | </div> | 578 | </div> |
579 | <div class="pull-left" style="width: calc(100% - 110px);"> | 579 | <div class="pull-left" style="width: calc(100% - 110px);"> |
580 | <div style="width: 50%; float: left;"> | 580 | <div style="width: 50%; float: left;"> |
581 | Date | 581 | Date |
582 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 582 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
583 | </div> | 583 | </div> |
584 | <div style="width: 50%; float: left;"> | 584 | <div style="width: 50%; float: left;"> |
585 | Time | 585 | Time |
586 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 586 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
587 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 587 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
588 | </select> | 588 | </select> |
589 | 589 | ||
590 | </div> | 590 | </div> |
591 | </div> | 591 | </div> |
592 | <div class="clearfix"></div> | 592 | <div class="clearfix"></div> |
593 | </div> | 593 | </div> |
594 | 594 | ||
595 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 595 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
596 | <div class="pull-left" style="width: 110px;"> | 596 | <div class="pull-left" style="width: 110px;"> |
597 | <label class="new-input-label"><b>Invoiced</b></label> | 597 | <label class="new-input-label"><b>Invoiced</b></label> |
598 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 598 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
599 | </div> | 599 | </div> |
600 | <div class="pull-left" style="width: calc(100% - 110px);"> | 600 | <div class="pull-left" style="width: calc(100% - 110px);"> |
601 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 601 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
602 | </div> | 602 | </div> |
603 | <div class="clearfix"></div> | 603 | <div class="clearfix"></div> |
604 | </div> | 604 | </div> |
605 | </div> | 605 | </div> |
606 | <div class="clearfix"></div><br> | 606 | <div class="clearfix"></div><br> |
607 | 607 | ||
608 | 608 | ||
609 | <div class="col-xs-12"> | 609 | <div class="col-xs-12"> |
610 | 610 | ||
611 | <div class="col-md-6"> | 611 | <div class="col-md-6"> |
612 | <div class="pull-left" style="width: 110px;"> | 612 | <div class="pull-left" style="width: 110px;"> |
613 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 613 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
614 | </div> | 614 | </div> |
615 | <div class="pull-left" style="width: calc(100% - 110px);"> | 615 | <div class="pull-left" style="width: calc(100% - 110px);"> |
616 | <div style="width: 50%; float: left;"> | 616 | <div style="width: 50%; float: left;"> |
617 | Date | 617 | Date |
618 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 618 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
619 | </div> | 619 | </div> |
620 | <div style="width: 50%; float: left;"> | 620 | <div style="width: 50%; float: left;"> |
621 | Time | 621 | Time |
622 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 622 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
623 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 623 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
624 | </select> | 624 | </select> |
625 | 625 | ||
626 | </div> | 626 | </div> |
627 | </div> | 627 | </div> |
628 | <div class="clearfix"></div> | 628 | <div class="clearfix"></div> |
629 | </div> | 629 | </div> |
630 | 630 | ||
631 | <div class="col-md-6" style="margin-top: 22px;"> | 631 | <div class="col-md-6" style="margin-top: 22px;"> |
632 | <div class="pull-left" style="width: 110px;"> | 632 | <div class="pull-left" style="width: 110px;"> |
633 | <label class="new-input-label"><b>Total</b></label> | 633 | <label class="new-input-label"><b>Total</b></label> |
634 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 634 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
635 | </div> | 635 | </div> |
636 | <div class="pull-left" style="width: calc(100% - 110px);"> | 636 | <div class="pull-left" style="width: calc(100% - 110px);"> |
637 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 637 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
638 | </div> | 638 | </div> |
639 | </div> | 639 | </div> |
640 | </div> | 640 | </div> |
641 | <div class="clearfix"></div><br> | 641 | <div class="clearfix"></div><br> |
642 | 642 | ||
643 | 643 | ||
644 | <div class="col-xs-12"> | 644 | <div class="col-xs-12"> |
645 | 645 | ||
646 | <div class="col-md-6"> | 646 | <div class="col-md-6"> |
647 | <div class="pull-left" style="width: 110px;"> | 647 | <div class="pull-left" style="width: 110px;"> |
648 | <label class="new-input-label"><b>Fuel on</b></label> | 648 | <label class="new-input-label"><b>Fuel on</b></label> |
649 | </div> | 649 | </div> |
650 | <div class="pull-left" style="width: calc(100% - 110px);"> | 650 | <div class="pull-left" style="width: calc(100% - 110px);"> |
651 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 651 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
652 | <option value="" disabled selected hidden>Arrival</option> | 652 | <option value="" disabled selected hidden>Arrival</option> |
653 | <option value="Arrival">Arrival</option> | 653 | <option value="Arrival">Arrival</option> |
654 | <option value="Departure">Departure</option> | 654 | <option value="Departure">Departure</option> |
655 | </select> | 655 | </select> |
656 | </div> | 656 | </div> |
657 | <div class="clearfix"></div> | 657 | <div class="clearfix"></div> |
658 | </div> | 658 | </div> |
659 | 659 | ||
660 | <div class="col-md-6"> | 660 | <div class="col-md-6"> |
661 | <div class="pull-left" style="width: 110px;"> | 661 | <div class="pull-left" style="width: 110px;"> |
662 | <label class="new-input-label"><b>FBO Cost</b></label> | 662 | <label class="new-input-label"><b>FBO Cost</b></label> |
663 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 663 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
664 | </div> | 664 | </div> |
665 | <div class="pull-left" style="width: calc(100% - 110px);"> | 665 | <div class="pull-left" style="width: calc(100% - 110px);"> |
666 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 666 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
667 | </div> | 667 | </div> |
668 | <div class="clearfix"></div> | 668 | <div class="clearfix"></div> |
669 | </div> | 669 | </div> |
670 | </div> | 670 | </div> |
671 | <div class="clearfix"></div><br> | 671 | <div class="clearfix"></div><br> |
672 | 672 | ||
673 | <div class="col-xs-12"> | 673 | <div class="col-xs-12"> |
674 | <div class="col-md-6"> | 674 | <div class="col-md-6"> |
675 | <div class="pull-left" style="width: 110px;"> | 675 | <div class="pull-left" style="width: 110px;"> |
676 | <label class="new-input-label"><b>Source</b></label> | 676 | <label class="new-input-label"><b>Source</b></label> |
677 | </div> | 677 | </div> |
678 | <div class="pull-left" style="width: calc(100% - 110px);"> | 678 | <div class="pull-left" style="width: calc(100% - 110px);"> |
679 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> | 679 | <div style="font-weight: normal;" ng-if="baseTenant && !contractFuelVendor">Tenant/Base Customer</br></div> |
680 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> | 680 | <div style="font-weight: normal;" ng-if="contractFuelVendor && !baseTenant">CAA Member</div> |
681 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> | 681 | <div style="font-weight: normal;" ng-if="contractFuelVendor && baseTenant">Tenant/CAA</div> |
682 | </div> | 682 | </div> |
683 | <div class="clearfix"></div> | 683 | <div class="clearfix"></div> |
684 | </div> | 684 | </div> |
685 | </div> | 685 | </div> |
686 | <div class="clearfix"></div> | 686 | <div class="clearfix"></div> |
687 | <br/> | 687 | <br/> |
688 | <div class="col-xs-12"> | 688 | <div class="col-xs-12"> |
689 | 689 | ||
690 | 690 | ||
691 | <div class="col-md-6"> | 691 | <div class="col-md-6"> |
692 | <div class="pull-left" style="width: 110px;"> | 692 | <div class="pull-left" style="width: 110px;"> |
693 | <label class="new-input-label"><b>Certificate Type</b></label> | 693 | <label class="new-input-label"><b>Certificate Type</b></label> |
694 | </div> | 694 | </div> |
695 | <div class="pull-left" style="width: calc(100% - 110px);"> | 695 | <div class="pull-left" style="width: calc(100% - 110px);"> |
696 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 696 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
697 | <option value="" disabled selected hidden>Select...</option> | 697 | <option value="" disabled selected hidden>Select...</option> |
698 | <option value="corporate">Part 91 (Corporate)</option> | 698 | <option value="corporate">Part 91 (Corporate)</option> |
699 | <option value="charter">Part 135 (Charter)</option> | 699 | <option value="charter">Part 135 (Charter)</option> |
700 | <option value="scheduled">Part 121 (Scheduled)</option> | 700 | <option value="scheduled">Part 121 (Scheduled)</option> |
701 | <option value="military">Military</option> | 701 | <option value="military">Military</option> |
702 | <option value="government">Government</option> | 702 | <option value="government">Government</option> |
703 | </select> | 703 | </select> |
704 | </div> | 704 | </div> |
705 | <div class="clearfix"></div> | 705 | <div class="clearfix"></div> |
706 | </div> | 706 | </div> |
707 | <div class="col-md-6"> | 707 | <div class="col-md-6"> |
708 | <div class="pull-left" style="width: 110px;"> | 708 | <div class="pull-left" style="width: 110px;"> |
709 | <label class="new-input-label"><b>Status</b></label> | 709 | <label class="new-input-label"><b>Status</b></label> |
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 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 712 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
713 | <option value="" disabled selected hidden>pending</option> | 713 | <option value="" disabled selected hidden>pending</option> |
714 | <option value="pending">pending</option> | 714 | <option value="pending">pending</option> |
715 | <option value="invoiced">invoiced</option> | 715 | <option value="invoiced">invoiced</option> |
716 | <option value="paid">paid</option> | 716 | <option value="paid">paid</option> |
717 | <!-- <option value="cancelled">cancelled</option> | 717 | <!-- <option value="cancelled">cancelled</option> |
718 | <option value="archived">archived</option> --> | 718 | <option value="archived">archived</option> --> |
719 | </select> | 719 | </select> |
720 | </div> | 720 | </div> |
721 | <div class="clearfix"></div> | 721 | <div class="clearfix"></div> |
722 | </div> | 722 | </div> |
723 | </div> | 723 | </div> |
724 | <div class="clearfix"></div><br> | 724 | <div class="clearfix"></div><br> |
725 | 725 | ||
726 | </div> | 726 | </div> |
727 | </div> | 727 | </div> |
728 | </div> | 728 | </div> |
729 | </div> | 729 | </div> |
730 | </div> | 730 | </div> |
731 | </div> | 731 | </div> |
732 | <div class="modal-footer" style="border-top: 0;"> | 732 | <div class="modal-footer" style="border-top: 0;"> |
733 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 733 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
734 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> | 734 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> |
735 | </div> | 735 | </div> |
736 | </div> | 736 | </div> |
737 | </div> | 737 | </div> |
738 | </div> | 738 | </div> |
739 | </form> | 739 | </form> |
740 | 740 | ||
741 | 741 | ||
742 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> | 742 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> |
743 | <div class="modal-dialog modal-lg"> | 743 | <div class="modal-dialog modal-lg"> |
744 | <div class="modal-content"> | 744 | <div class="modal-content"> |
745 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 745 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
746 | <div> | 746 | <div> |
747 | <div class="row" style="margin: 0;"> | 747 | <div class="row" style="margin: 0;"> |
748 | <div> | 748 | <div> |
749 | <div class="widget" style="margin-bottom: 0;"> | 749 | <div class="widget" style="margin-bottom: 0;"> |
750 | <div class="widget-header"> | 750 | <div class="widget-header"> |
751 | <i class="icon-pencil"></i> | 751 | <i class="icon-pencil"></i> |
752 | <i class="fa fa-tasks" aria-hidden="true"></i> | 752 | <i class="fa fa-tasks" aria-hidden="true"></i> |
753 | <h3>Update Fuel Order</h3> | 753 | <h3>Update Fuel Order</h3> |
754 | <div class="clearfix"></div> | 754 | <div class="clearfix"></div> |
755 | </div> | 755 | </div> |
756 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 756 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
757 | <div class="col-xs-12"> | 757 | <div class="col-xs-12"> |
758 | <div class="col-xs-12"> | 758 | <div class="col-xs-12"> |
759 | 759 | ||
760 | <div class="col-md-6"> | 760 | <div class="col-md-6"> |
761 | <div class="pull-left" style="width: 110px;"> | 761 | <div class="pull-left" style="width: 110px;"> |
762 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 762 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
763 | </div> | 763 | </div> |
764 | <div class="pull-left" style="width: calc(100% - 110px);"> | 764 | <div class="pull-left" style="width: calc(100% - 110px);"> |
765 | <div style="width: 50%; float: left;"> | 765 | <div style="width: 50%; float: left;"> |
766 | Date | 766 | Date |
767 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> | 767 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> |
768 | </div> | 768 | </div> |
769 | <div style="width: 50%; float: left;"> | 769 | <div style="width: 50%; float: left;"> |
770 | Time | 770 | Time |
771 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> | 771 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> |
772 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 772 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
773 | </select> | 773 | </select> |
774 | 774 | ||
775 | </div> | 775 | </div> |
776 | </div> | 776 | </div> |
777 | <div class="clearfix"></div> | 777 | <div class="clearfix"></div> |
778 | </div> | 778 | </div> |
779 | <div class="col-md-6" style="margin-top: 25px;"> | 779 | <div class="col-md-6" style="margin-top: 25px;"> |
780 | <div class="pull-left" style="width: 110px;"> | 780 | <div class="pull-left" style="width: 110px;"> |
781 | <label class="new-input-label"><b>Volume</b></label> | 781 | <label class="new-input-label"><b>Volume</b></label> |
782 | </div> | 782 | </div> |
783 | <div class="pull-left" style="width: calc(100% - 110px);"> | 783 | <div class="pull-left" style="width: calc(100% - 110px);"> |
784 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> | 784 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> |
785 | </div> | 785 | </div> |
786 | <div class="clearfix"></div> | 786 | <div class="clearfix"></div> |
787 | </div> | 787 | </div> |
788 | </div> | 788 | </div> |
789 | <div class="clearfix"></div><br> | 789 | <div class="clearfix"></div><br> |
790 | 790 | ||
791 | <div class="col-xs-12"> | 791 | <div class="col-xs-12"> |
792 | 792 | ||
793 | <div class="col-md-6"> | 793 | <div class="col-md-6"> |
794 | <div class="pull-left" style="width: 110px;"> | 794 | <div class="pull-left" style="width: 110px;"> |
795 | <label class="new-input-label"><b>ETD</b></label> | 795 | <label class="new-input-label"><b>ETD</b></label> |
796 | </div> | 796 | </div> |
797 | <div class="pull-left" style="width: calc(100% - 110px);"> | 797 | <div class="pull-left" style="width: calc(100% - 110px);"> |
798 | <div style="width: 50%; float: left;"> | 798 | <div style="width: 50%; float: left;"> |
799 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> | 799 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> |
800 | </div> | 800 | </div> |
801 | <div style="width: 50%; float: left;"> | 801 | <div style="width: 50%; float: left;"> |
802 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> | 802 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> |
803 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 803 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
804 | </select> | 804 | </select> |
805 | </div> | 805 | </div> |
806 | </div> | 806 | </div> |
807 | <div class="clearfix"></div> | 807 | <div class="clearfix"></div> |
808 | </div> | 808 | </div> |
809 | <div class="col-md-6"> | 809 | <div class="col-md-6"> |
810 | <div class="pull-left" style="width: 110px;"> | 810 | <div class="pull-left" style="width: 110px;"> |
811 | <label class="new-input-label"><b>Fuel on</b></label> | 811 | <label class="new-input-label"><b>Fuel on</b></label> |
812 | </div> | 812 | </div> |
813 | <div class="pull-left" style="width: calc(100% - 110px);"> | 813 | <div class="pull-left" style="width: calc(100% - 110px);"> |
814 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> | 814 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> |
815 | <option value="" disabled selected hidden>Arrival</option> | 815 | <option value="" disabled selected hidden>Arrival</option> |
816 | <option value="Arrival">Arrival</option> | 816 | <option value="Arrival">Arrival</option> |
817 | <option value="Departure">Departure</option> | 817 | <option value="Departure">Departure</option> |
818 | </select> | 818 | </select> |
819 | </div> | 819 | </div> |
820 | <div class="clearfix"></div> | 820 | <div class="clearfix"></div> |
821 | </div> | 821 | </div> |
822 | </div> | 822 | </div> |
823 | <div class="clearfix"></div><br> | 823 | <div class="clearfix"></div><br> |
824 | 824 | ||
825 | <div class="col-xs-12"> | 825 | <div class="col-xs-12"> |
826 | 826 | ||
827 | <div class="col-md-6"> | 827 | <div class="col-md-6"> |
828 | <div class="pull-left" style="width: 110px;"> | 828 | <div class="pull-left" style="width: 110px;"> |
829 | <label class="new-input-label"><b>Company</b></label> | 829 | <label class="new-input-label"><b>Company</b></label> |
830 | </div> | 830 | </div> |
831 | <div class="pull-left" style="width: calc(100% - 110px);"> | 831 | <div class="pull-left" style="width: calc(100% - 110px);"> |
832 | {{editdata.companyName}} | 832 | {{editdata.companyName}} |
833 | </div> | 833 | </div> |
834 | <div class="clearfix"></div> | 834 | <div class="clearfix"></div> |
835 | </div> | 835 | </div> |
836 | <div class="col-md-6"> | 836 | <div class="col-md-6"> |
837 | <div class="pull-left" style="width: 110px;"> | 837 | <div class="pull-left" style="width: 110px;"> |
838 | <label class="new-input-label"><b>Invoiced</b></label> | 838 | <label class="new-input-label"><b>Invoiced</b></label> |
839 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 839 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
840 | </div> | 840 | </div> |
841 | <div class="pull-left" style="width: calc(100% - 110px);"> | 841 | <div class="pull-left" style="width: calc(100% - 110px);"> |
842 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> | 842 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> |
843 | </div> | 843 | </div> |
844 | <div class="clearfix"></div> | 844 | <div class="clearfix"></div> |
845 | </div> | 845 | </div> |
846 | 846 | ||
847 | </div> | 847 | </div> |
848 | <div class="clearfix"></div> | 848 | <div class="clearfix"></div> |
849 | <br/> | 849 | <br/> |
850 | 850 | ||
851 | 851 | ||
852 | <div class="col-xs-12"> | 852 | <div class="col-xs-12"> |
853 | 853 | ||
854 | <div class="col-md-6"> | 854 | <div class="col-md-6"> |
855 | <div class="pull-left" style="width: 110px;"> | 855 | <div class="pull-left" style="width: 110px;"> |
856 | <label class="new-input-label"><b>Tail #</b></label> | 856 | <label class="new-input-label"><b>Tail #</b></label> |
857 | </div> | 857 | </div> |
858 | <div class="pull-left" style="width: calc(100% - 110px);"> | 858 | <div class="pull-left" style="width: calc(100% - 110px);"> |
859 | {{editdata.aircraftName}} | 859 | {{editdata.aircraftName}} |
860 | </div> | 860 | </div> |
861 | <div class="clearfix"></div> | 861 | <div class="clearfix"></div> |
862 | </div> | 862 | </div> |
863 | <div class="col-md-6"> | 863 | <div class="col-md-6"> |
864 | <div class="pull-left" style="width: 110px;"> | 864 | <div class="pull-left" style="width: 110px;"> |
865 | <label class="new-input-label"><b>Total</b></label> | 865 | <label class="new-input-label"><b>Total</b></label> |
866 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 866 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
867 | </div> | 867 | </div> |
868 | <div class="pull-left" style="width: calc(100% - 110px);"> | 868 | <div class="pull-left" style="width: calc(100% - 110px);"> |
869 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> | 869 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> |
870 | </div> | 870 | </div> |
871 | <div class="clearfix"></div> | 871 | <div class="clearfix"></div> |
872 | </div> | 872 | </div> |
873 | </div> | 873 | </div> |
874 | <div class="clearfix"></div> | 874 | <div class="clearfix"></div> |
875 | <br/> | 875 | <br/> |
876 | <div class="col-xs-12"> | 876 | <div class="col-xs-12"> |
877 | 877 | ||
878 | 878 | ||
879 | <div class="col-md-6"> | 879 | <div class="col-md-6"> |
880 | <div class="pull-left" style="width: 110px;"> | 880 | <div class="pull-left" style="width: 110px;"> |
881 | <label class="new-input-label"><b>Source</b></label> | 881 | <label class="new-input-label"><b>Source</b></label> |
882 | </div> | 882 | </div> |
883 | <div class="pull-left" style="width: calc(100% - 110px);"> | 883 | <div class="pull-left" style="width: calc(100% - 110px);"> |
884 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> | 884 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> |
885 | <option value="" disabled selected hidden>Select Source</option> | 885 | <option value="" disabled selected hidden>Select Source</option> |
886 | <option value="Tenant">Tenant</option> | 886 | <option value="Tenant">Tenant</option> |
887 | <option value="CAA">CAA</option> | 887 | <option value="CAA">CAA</option> |
888 | <option value="Tenant/CAA">Tenant/CAA</option> | 888 | <option value="Tenant/CAA">Tenant/CAA</option> |
889 | </select> | 889 | </select> |
890 | </div> | 890 | </div> |
891 | <div class="clearfix"></div> | 891 | <div class="clearfix"></div> |
892 | </div> | 892 | </div> |
893 | <div class="col-md-6"> | 893 | <div class="col-md-6"> |
894 | <div class="pull-left" style="width: 110px;"> | 894 | <div class="pull-left" style="width: 110px;"> |
895 | <label class="new-input-label"><b>Product</b></label> | 895 | <label class="new-input-label"><b>Product</b></label> |
896 | </div> | 896 | </div> |
897 | <div class="pull-left" style="width: calc(100% - 110px);"> | 897 | <div class="pull-left" style="width: calc(100% - 110px);"> |
898 | {{editdata.productName}} | 898 | {{editdata.productName}} |
899 | </div> | 899 | </div> |
900 | <div class="clearfix"></div> | 900 | <div class="clearfix"></div> |
901 | </div> | 901 | </div> |
902 | </div> | 902 | </div> |
903 | <div class="clearfix"></div> | 903 | <div class="clearfix"></div> |
904 | <br/> | 904 | <br/> |
905 | 905 | ||
906 | <div class="col-xs-12"> | 906 | <div class="col-xs-12"> |
907 | 907 | ||
908 | <div class="col-md-6"> | 908 | <div class="col-md-6"> |
909 | <div class="pull-left" style="width: 110px;"> | 909 | <div class="pull-left" style="width: 110px;"> |
910 | <label class="new-input-label"><b>Status</b></label> | 910 | <label class="new-input-label"><b>Status</b></label> |
911 | </div> | 911 | </div> |
912 | <div class="pull-left" style="width: calc(100% - 110px);"> | 912 | <div class="pull-left" style="width: calc(100% - 110px);"> |
913 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> | 913 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> |
914 | <option value="" disabled selected hidden>Select Status</option> | 914 | <option value="" disabled selected hidden>Select Status</option> |
915 | <option value="pending">pending</option> | 915 | <option value="pending">pending</option> |
916 | <option value="invoiced">invoiced</option> | 916 | <option value="invoiced">invoiced</option> |
917 | <option value="paid">paid</option> | 917 | <option value="paid">paid</option> |
918 | <option value="cancelled">cancelled</option> | 918 | <option value="cancelled">cancelled</option> |
919 | <option value="archived">archived</option> | 919 | <option value="archived">archived</option> |
920 | </select> | 920 | </select> |
921 | </div> | 921 | </div> |
922 | <div class="clearfix"></div> | 922 | <div class="clearfix"></div> |
923 | </div> | 923 | </div> |
924 | <div class="col-md-6"> | 924 | <div class="col-md-6"> |
925 | <div class="pull-left" style="width: 110px;"> | 925 | <div class="pull-left" style="width: 110px;"> |
926 | <label class="new-input-label"><b>Certificate Type</b></label> | 926 | <label class="new-input-label"><b>Certificate Type</b></label> |
927 | </div> | 927 | </div> |
928 | <div class="pull-left" style="width: calc(100% - 110px);"> | 928 | <div class="pull-left" style="width: calc(100% - 110px);"> |
929 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> | 929 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> |
930 | <option value="" disabled selected hidden>Select...</option> | 930 | <option value="" disabled selected hidden>Select...</option> |
931 | <option value="corporate">Part 91 (Corporate)</option> | 931 | <option value="corporate">Part 91 (Corporate)</option> |
932 | <option value="charter">Part 135 (Charter)</option> | 932 | <option value="charter">Part 135 (Charter)</option> |
933 | <option value="scheduled">Part 121 (Scheduled)</option> | 933 | <option value="scheduled">Part 121 (Scheduled)</option> |
934 | <option value="military">Military</option> | 934 | <option value="military">Military</option> |
935 | <option value="government">Government</option> | 935 | <option value="government">Government</option> |
936 | </select> | 936 | </select> |
937 | </div> | 937 | </div> |
938 | 938 | ||
939 | </div> | 939 | </div> |
940 | <div class="clearfix"></div> | 940 | <div class="clearfix"></div> |
941 | <br/> | 941 | <br/> |
942 | <div class="col-xs-12"> | 942 | <div class="col-xs-12"> |
943 | </div> | 943 | </div> |
944 | <div class="clearfix"></div> | 944 | <div class="clearfix"></div> |
945 | <br/> | 945 | <br/> |
946 | <div class="col-xs-12"> | 946 | <div class="col-xs-12"> |
947 | 947 | ||
948 | </div> | 948 | </div> |
949 | <div class="clearfix"></div> | 949 | <div class="clearfix"></div> |
950 | 950 | ||
951 | </div> | 951 | </div> |
952 | </div> | 952 | </div> |
953 | <div class="clearfix"></div> | 953 | <div class="clearfix"></div> |
954 | </div> | 954 | </div> |
955 | </div> | 955 | </div> |
956 | </div> | 956 | </div> |
957 | </div> | 957 | </div> |
958 | 958 | ||
959 | <div class="modal-footer" style="border-top: 0;"> | 959 | <div class="modal-footer" style="border-top: 0;"> |
960 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> | 960 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> |
961 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> | 961 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> |
962 | </div> | 962 | </div> |
963 | </div> | 963 | </div> |
964 | </div> | 964 | </div> |
965 | </div> | 965 | </div> |
966 | </form> | 966 | </form> |
967 | 967 | ||
968 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> | 968 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> |
969 | <div class="modal-dialog modal-xs"> | 969 | <div class="modal-dialog modal-xs"> |
970 | <div class="modal-content"> | 970 | <div class="modal-content"> |
971 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 971 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
972 | <div> | 972 | <div> |
973 | <div class="row" style="margin: 0;"> | 973 | <div class="row" style="margin: 0;"> |
974 | <div> | 974 | <div> |
975 | <div class="widget" style="margin-bottom: 0;"> | 975 | <div class="widget" style="margin-bottom: 0;"> |
976 | <div class="widget-header"> | 976 | <div class="widget-header"> |
977 | <i class="icon-pencil"></i> | 977 | <i class="icon-pencil"></i> |
978 | <i class="fa fa-tasks" aria-hidden="true"></i> | 978 | <i class="fa fa-tasks" aria-hidden="true"></i> |
979 | <h3>Upload Attachment</h3> | 979 | <h3>Upload Attachment</h3> |
980 | <div class="clearfix"></div> | 980 | <div class="clearfix"></div> |
981 | </div> | 981 | </div> |
982 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 982 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
983 | <div class="col-xs-6"> | 983 | <div class="col-xs-6"> |
984 | <div class="col-xs-6"> | 984 | <div class="col-xs-6"> |
985 | 985 | ||
986 | <div class="col-md-6"> | 986 | <div class="col-md-6"> |
987 | <div class="pull-left" style="width: 110px;"> | 987 | <div class="pull-left" style="width: 110px;"> |
988 | <label class="new-input-label"><b>Upload</b></label> | 988 | <label class="new-input-label"><b>Upload</b></label> |
989 | <br> | 989 | <br> |
990 | <br> | 990 | <br> |
991 | </div> | 991 | </div> |
992 | <div class="pull-left" style="width: calc(100% - 110px);"> | 992 | <div class="pull-left" style="width: calc(100% - 110px);"> |
993 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> | 993 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> |
994 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> | 994 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> |
995 | </div> | 995 | </div> |
996 | <div class="clearfix"></div> | 996 | <div class="clearfix"></div> |
997 | </div> | 997 | </div> |
998 | </div> | 998 | </div> |
999 | <div class="clearfix"></div><br> | 999 | <div class="clearfix"></div><br> |
1000 | 1000 | ||
1001 | </div> | 1001 | </div> |
1002 | </div> | 1002 | </div> |
1003 | <div class="clearfix"></div> | 1003 | <div class="clearfix"></div> |
1004 | </div> | 1004 | </div> |
1005 | </div> | 1005 | </div> |
1006 | </div> | 1006 | </div> |
1007 | </div> | 1007 | </div> |
1008 | 1008 | ||
1009 | <div class="modal-footer" style="border-top: 0;"> | 1009 | <div class="modal-footer" style="border-top: 0;"> |
1010 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> | 1010 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> |
1011 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> | 1011 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> |
1012 | </div> | 1012 | </div> |
1013 | </div> | 1013 | </div> |
1014 | </div> | 1014 | </div> |
1015 | </div> | 1015 | </div> |
1016 | </form> | 1016 | </form> |
1017 | 1017 | ||
1018 | <div class="customConfirmPopBackdrop" id="delete1"> | 1018 | <div class="customConfirmPopBackdrop" id="delete1"> |
1019 | <div class="customModalInner" style="max-width: 400px;"> | 1019 | <div class="customModalInner" style="max-width: 400px;"> |
1020 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1020 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1021 | <table> | 1021 | <table> |
1022 | <tr> | 1022 | <tr> |
1023 | <td> | 1023 | <td> |
1024 | <img src="img/info.png" style="width: 50px;"> | 1024 | <img src="img/info.png" style="width: 50px;"> |
1025 | </td> | 1025 | </td> |
1026 | <td> | 1026 | <td> |
1027 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> | 1027 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> |
1028 | </td> | 1028 | </td> |
1029 | </tr> | 1029 | </tr> |
1030 | </table> | 1030 | </table> |
1031 | </div> | 1031 | </div> |
1032 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1032 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1033 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> | 1033 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> |
1034 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> | 1034 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> |
1035 | </div> | 1035 | </div> |
1036 | </div> | 1036 | </div> |
1037 | </div> | 1037 | </div> |
1038 | 1038 | ||
1039 | 1039 | ||
1040 | 1040 | ||
1041 | <div class="myLoader" ng-show="showLoader"> | 1041 | <div class="myLoader" ng-show="showLoader"> |
1042 | <img src="../img/hourglass.gif" width="50px;"> | 1042 | <img src="../img/hourglass.gif" width="50px;"> |
1043 | </div> | 1043 | </div> |
1044 | <script src="js/multi-step-modal.js"></script> | 1044 | <script src="js/multi-step-modal.js"></script> |
1045 | <script> | 1045 | <script> |
1046 | sendEvent = function(sel, step) { | 1046 | sendEvent = function(sel, step) { |
1047 | $(sel).trigger('next.m.' + step); | 1047 | $(sel).trigger('next.m.' + step); |
1048 | } | 1048 | } |
1049 | </script> | 1049 | </script> |
1050 | 1050 | ||
1051 | <script> | 1051 | <script> |
1052 | angular.module("KendoDemos", [ "kendo.directives" ]) | 1052 | angular.module("KendoDemos", [ "kendo.directives" ]) |
1053 | .controller("MyCtrl", function($scope){ | 1053 | .controller("MyCtrl", function($scope){ |
1054 | $scope.getType = function(x) { | 1054 | $scope.getType = function(x) { |
1055 | return typeof x; | 1055 | return typeof x; |
1056 | }; | 1056 | }; |
1057 | $scope.isDate = function(x) { | 1057 | $scope.isDate = function(x) { |
1058 | return x instanceof Date; | 1058 | return x instanceof Date; |
1059 | }; | 1059 | }; |
1060 | }) | 1060 | }) |
1061 | </script> | 1061 | </script> |
1062 | <style type="text/css"> | 1062 | <style type="text/css"> |
1063 | .ui-datepicker-div{ | 1063 | .ui-datepicker-div{ |
1064 | border-bottom: 2px solid #000; | 1064 | border-bottom: 2px solid #000; |
1065 | } | 1065 | } |
1066 | </style> | 1066 | </style> |
app/partials/scheduler/scheduler.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', 'schedulerService', function($scope, $compile, uiCalendarConfig, schedulerService) { | 5 | .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', 'schedulerService', function($scope, $compile, uiCalendarConfig, schedulerService) { |
6 | 6 | ||
7 | 7 | ||
8 | $scope.showLoader = true; | 8 | $scope.showLoader = true; |
9 | getEventsList(); | 9 | getEventsList(); |
10 | 10 | ||
11 | /*---get events on calendar---*/ | 11 | /*---get events on calendar---*/ |
12 | $scope.events = []; | 12 | $scope.events = []; |
13 | function getEventsList(){ | 13 | function getEventsList(){ |
14 | schedulerService.getEvents().then(function(result) { | 14 | schedulerService.getEvents().then(function(result) { |
15 | console.log("===events==",result) | 15 | console.log("===events==",result) |
16 | 16 | ||
17 | for (var i = 0; i < result.length; i++) { | 17 | for (var i = 0; i < result.length; i++) { |
18 | var newTime = new Date(result[i].deployDate); | 18 | var newTime = new Date(result[i].deployDate); |
19 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 19 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
20 | var dday = newTime.getUTCDate(); | 20 | var dday = newTime.getUTCDate(); |
21 | var dyear = newTime.getUTCFullYear(); | 21 | var dyear = newTime.getUTCFullYear(); |
22 | var hours = newTime.getHours(); | 22 | var hours = newTime.getHours(); |
23 | var min = newTime.getMinutes(); | 23 | var min = newTime.getMinutes(); |
24 | var sec = newTime.getSeconds(); | 24 | var sec = newTime.getSeconds(); |
25 | 25 | ||
26 | $scope.events.push({ | 26 | $scope.events.push({ |
27 | 'id': result[i].id, | 27 | 'id': result[i].id, |
28 | 'title': result[i].aircraft +'\n' + '(' + result[i].make +'/' + result[i].model + ')' + '\n' + 'for' + ' ' + result[i].requestedVolume + ' ' + 'gal.' + ' ' +'@' + ' ' +'$'+result[i].priceQuote, | 28 | 'title': result[i].aircraft +'\n' + '(' + result[i].make +'/' + result[i].model + ')' + '\n' + 'for' + ' ' + result[i].requestedVolume + ' ' + 'gal.' + ' ' +'@' + ' ' +'$'+result[i].priceQuote, |
29 | 'start': dyear+'-'+dmonth+'-'+dday + ' ' + hours + ':' + min + ':' + sec | 29 | 'start': dyear+'-'+dmonth+'-'+dday + ' ' + hours + ':' + min + ':' + sec |
30 | 30 | ||
31 | }) | 31 | }) |
32 | // $scope.showEventsList(); | 32 | // $scope.showEventsList(); |
33 | $scope.showLoader = false; | 33 | $scope.showLoader = false; |
34 | } | 34 | } |
35 | 35 | ||
36 | $('#my-calendar').fullCalendar('removeEvents'); | 36 | $('#my-calendar').fullCalendar('removeEvents'); |
37 | $('#my-calendar').fullCalendar('addEventSource',$scope.events); | 37 | $('#my-calendar').fullCalendar('addEventSource',$scope.events); |
38 | $('#my-calendar').fullCalendar('refetchEvents'); | 38 | $('#my-calendar').fullCalendar('refetchEvents'); |
39 | 39 | ||
40 | //$scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; | 40 | //$scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; |
41 | 41 | ||
42 | // $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 42 | // $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
43 | }) | 43 | }) |
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | $scope.newEvent = {}; | 48 | $scope.newEvent = {}; |
49 | $scope.addNewEvent = function(){ | 49 | $scope.addNewEvent = function(){ |
50 | $scope.showLoader = true; | 50 | $scope.showLoader = true; |
51 | if ($scope.newEvent.deployDate != undefined) { | 51 | if ($scope.newEvent.deployDate != undefined) { |
52 | $scope.newEvent.deployDate = new Date($scope.newEvent.deployDate); | 52 | $scope.newEvent.deployDate = new Date($scope.newEvent.deployDate); |
53 | $scope.newEvent.deployDate = $scope.newEvent.deployDate.getTime(); | 53 | $scope.newEvent.deployDate = $scope.newEvent.deployDate.getTime(); |
54 | } | 54 | } |
55 | //var data = 'aircraft='+$scope.newEvent.aircraft+'&deployDate='+$scope.newEvent.deployDate; | 55 | //var data = 'aircraft='+$scope.newEvent.aircraft+'&deployDate='+$scope.newEvent.deployDate; |
56 | schedulerService.addNewEventService($scope.newEvent).then(function(response){ | 56 | schedulerService.addNewEventService($scope.newEvent).then(function(response){ |
57 | $scope.newEvent = {}; | 57 | $scope.newEvent = {}; |
58 | $('#addEvent').modal('hide'); | 58 | $('#addEvent').modal('hide'); |
59 | $scope.events = []; | 59 | $scope.events = []; |
60 | getEventsList(); | 60 | getEventsList(); |
61 | }) | 61 | }) |
62 | } | 62 | } |
63 | 63 | ||
64 | $scope.cancelAdd = function(){ | 64 | $scope.cancelAdd = function(){ |
65 | $scope.newEvent = {}; | 65 | $scope.newEvent = {}; |
66 | } | 66 | } |
67 | 67 | ||
68 | $scope.editData = {}; | 68 | $scope.editData = {}; |
69 | $scope.editEvent = function(data){ | 69 | $scope.editEvent = function(data){ |
70 | $scope.editData = data; | 70 | $scope.editData = data; |
71 | $('#editEvent').modal('show'); | 71 | $('#editEvent').modal('show'); |
72 | } | 72 | } |
73 | $scope.updateEvent = function(){ | 73 | $scope.updateEvent = function(){ |
74 | $scope.showLoader = true; | 74 | $scope.showLoader = true; |
75 | $scope.updatedData = {}; | 75 | $scope.updatedData = {}; |
76 | $scope.updatedData.id = $scope.editData.id; | 76 | $scope.updatedData.id = $scope.editData.id; |
77 | $scope.updatedData.deployDate = $scope.editData.start; | 77 | $scope.updatedData.deployDate = $scope.editData.start; |
78 | if ($scope.updatedData.deployDate != undefined) { | 78 | if ($scope.updatedData.deployDate != undefined) { |
79 | $scope.updatedData.deployDate = new Date($scope.updatedData.deployDate); | 79 | $scope.updatedData.deployDate = new Date($scope.updatedData.deployDate); |
80 | $scope.updatedData.deployDate = $scope.updatedData.deployDate.getTime(); | 80 | $scope.updatedData.deployDate = $scope.updatedData.deployDate.getTime(); |
81 | } | 81 | } |
82 | schedulerService.updateScheduledEvent($scope.updatedData).then(function(response){ | 82 | schedulerService.updateScheduledEvent($scope.updatedData).then(function(response){ |
83 | $scope.updatedData = {}; | 83 | $scope.updatedData = {}; |
84 | $('#editEvent').modal('hide'); | 84 | $('#editEvent').modal('hide'); |
85 | toastr.success('Updated Successfully', { | 85 | toastr.success('Updated Successfully', { |
86 | closeButton: true | 86 | closeButton: true |
87 | }) | 87 | }) |
88 | $scope.events = []; | 88 | $scope.events = []; |
89 | getEventsList(); | 89 | getEventsList(); |
90 | }) | 90 | }) |
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | /* code for calendar */ | 94 | /* code for calendar */ |
95 | 95 | ||
96 | var date = new Date(); | 96 | var date = new Date(); |
97 | var d = date.getDate(); | 97 | var d = date.getDate(); |
98 | var m = date.getMonth(); | 98 | var m = date.getMonth(); |
99 | var y = date.getFullYear(); | 99 | var y = date.getFullYear(); |
100 | 100 | ||
101 | $scope.changeTo = 'Hungarian'; | 101 | $scope.changeTo = 'Hungarian'; |
102 | 102 | ||
103 | $scope.eventSource = {}; | 103 | $scope.eventSource = {}; |
104 | 104 | ||
105 | $scope.eventsF = function (start, end, timezone, callback) { | 105 | $scope.eventsF = function (start, end, timezone, callback) { |
106 | var s = new Date(start).getTime() / 1000; | 106 | var s = new Date(start).getTime() / 1000; |
107 | var e = new Date(end).getTime() / 1000; | 107 | var e = new Date(end).getTime() / 1000; |
108 | var m = new Date(start).getMonth(); | 108 | var m = new Date(start).getMonth(); |
109 | var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}]; | 109 | var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}]; |
110 | callback(events); | 110 | callback(events); |
111 | }; | 111 | }; |
112 | 112 | ||
113 | $scope.calEventsExt = { | 113 | $scope.calEventsExt = { |
114 | color: '#f00', | 114 | color: '#f00', |
115 | textColor: 'yellow', | 115 | textColor: 'yellow', |
116 | events: [] | 116 | events: [] |
117 | }; | 117 | }; |
118 | 118 | ||
119 | $scope.alertOnEventClick = function( date, jsEvent, view){ | 119 | $scope.alertOnEventClick = function( date, jsEvent, view){ |
120 | $scope.alertMessage = (date.title + ' was clicked '); | 120 | $scope.alertMessage = (date.title + ' was clicked '); |
121 | }; | 121 | }; |
122 | 122 | ||
123 | $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){ | 123 | $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){ |
124 | var dmonth = event.start._d.getUTCMonth() + 1; //months from 1-12 | 124 | var dmonth = event.start._d.getUTCMonth() + 1; //months from 1-12 |
125 | var dday = event.start._d.getUTCDate(); | 125 | var dday = event.start._d.getUTCDate(); |
126 | var dyear = event.start._d.getUTCFullYear(); | 126 | var dyear = event.start._d.getUTCFullYear(); |
127 | var setDeploy = new Date(); | 127 | var setDeploy = new Date(); |
128 | var hours = setDeploy.getHours(); | 128 | var hours = setDeploy.getHours(); |
129 | var min = setDeploy.getMinutes(); | 129 | var min = setDeploy.getMinutes(); |
130 | var sec = setDeploy.getSeconds(); | 130 | var sec = setDeploy.getSeconds(); |
131 | 131 | ||
132 | for (var i = 0; i < $scope.events.length; i++) { | 132 | for (var i = 0; i < $scope.events.length; i++) { |
133 | if ($scope.events[i].id == event.id) { | 133 | if ($scope.events[i].id == event.id) { |
134 | //$scope.events[i].start = dyear+'-'+dmonth+'-'+dday; | 134 | //$scope.events[i].start = dyear+'-'+dmonth+'-'+dday; |
135 | $scope.showLoader = true; | 135 | $scope.showLoader = true; |
136 | $scope.updatedDataDrop = {}; | 136 | $scope.updatedDataDrop = {}; |
137 | $scope.updatedDataDrop.id = $scope.events[i].id; | 137 | $scope.updatedDataDrop.id = $scope.events[i].id; |
138 | $scope.updatedDataDrop.aircraft = $scope.events[i].title; | 138 | $scope.updatedDataDrop.aircraft = $scope.events[i].title; |
139 | $scope.updatedDataDrop.deployDate = dyear+'-'+dmonth+'-'+dday + ' ' + hours + ':' + min + ':' + sec; | 139 | $scope.updatedDataDrop.deployDate = dyear+'-'+dmonth+'-'+dday + ' ' + hours + ':' + min + ':' + sec; |
140 | if ($scope.updatedDataDrop.deployDate != undefined) { | 140 | if ($scope.updatedDataDrop.deployDate != undefined) { |
141 | $scope.updatedDataDrop.deployDate = new Date($scope.updatedDataDrop.deployDate); | 141 | $scope.updatedDataDrop.deployDate = new Date($scope.updatedDataDrop.deployDate); |
142 | $scope.updatedDataDrop.deployDate = $scope.updatedDataDrop.deployDate.getTime(); | 142 | $scope.updatedDataDrop.deployDate = $scope.updatedDataDrop.deployDate.getTime(); |
143 | } | 143 | } |
144 | schedulerService.updateScheduledEvent($scope.updatedDataDrop).then(function(response){ | 144 | schedulerService.updateScheduledEvent($scope.updatedDataDrop).then(function(response){ |
145 | $scope.updatedDataDrop = {}; | 145 | $scope.updatedDataDrop = {}; |
146 | $('#editEvent').modal('hide'); | 146 | $('#editEvent').modal('hide'); |
147 | toastr.success('Updated Successfully', { | 147 | toastr.success('Updated Successfully', { |
148 | closeButton: true | 148 | closeButton: true |
149 | }) | 149 | }) |
150 | $scope.events = []; | 150 | $scope.events = []; |
151 | getEventsList(); | 151 | getEventsList(); |
152 | }) | 152 | }) |
153 | 153 | ||
154 | } | 154 | } |
155 | } | 155 | } |
156 | $scope.alertMessage = ('Event Droped to make dayDelta ' + delta); | 156 | $scope.alertMessage = ('Event Droped to make dayDelta ' + delta); |
157 | }; | 157 | }; |
158 | 158 | ||
159 | $scope.alertOnResize = function(event, delta, revertFunc, jsEvent, ui, view ){ | 159 | $scope.alertOnResize = function(event, delta, revertFunc, jsEvent, ui, view ){ |
160 | $scope.alertMessage = ('Event Resized to make dayDelta ' + delta); | 160 | $scope.alertMessage = ('Event Resized to make dayDelta ' + delta); |
161 | }; | 161 | }; |
162 | 162 | ||
163 | $scope.addRemoveEventSource = function(sources,source) { | 163 | $scope.addRemoveEventSource = function(sources,source) { |
164 | var canAdd = 0; | 164 | var canAdd = 0; |
165 | angular.forEach(sources,function(value, key){ | 165 | angular.forEach(sources,function(value, key){ |
166 | if(sources[key] === source){ | 166 | if(sources[key] === source){ |
167 | sources.splice(key,1); | 167 | sources.splice(key,1); |
168 | canAdd = 1; | 168 | canAdd = 1; |
169 | } | 169 | } |
170 | }); | 170 | }); |
171 | if(canAdd === 0){ | 171 | if(canAdd === 0){ |
172 | sources.push(source); | 172 | sources.push(source); |
173 | } | 173 | } |
174 | }; | 174 | }; |
175 | 175 | ||
176 | $scope.addEvent = function() { | 176 | $scope.addEvent = function() { |
177 | $scope.events.push({ | 177 | $scope.events.push({ |
178 | title: 'Open Sesame', | 178 | title: 'Open Sesame', |
179 | start: new Date(y, m, 28), | 179 | start: new Date(y, m, 28), |
180 | end: new Date(y, m, 29), | 180 | end: new Date(y, m, 29), |
181 | className: ['openSesame'] | 181 | className: ['openSesame'] |
182 | }); | 182 | }); |
183 | }; | 183 | }; |
184 | 184 | ||
185 | $scope.remove = function(index) { | 185 | $scope.remove = function(index) { |
186 | $scope.events.splice(index,1); | 186 | $scope.events.splice(index,1); |
187 | }; | 187 | }; |
188 | 188 | ||
189 | $scope.changeView = function(view,calendar) { | 189 | $scope.changeView = function(view,calendar) { |
190 | uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view); | 190 | uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view); |
191 | }; | 191 | }; |
192 | 192 | ||
193 | $scope.renderCalender = function(calendar) { | 193 | $scope.renderCalender = function(calendar) { |
194 | if(uiCalendarConfig.calendars[calendar]){ | 194 | if(uiCalendarConfig.calendars[calendar]){ |
195 | uiCalendarConfig.calendars[calendar].fullCalendar('render'); | 195 | uiCalendarConfig.calendars[calendar].fullCalendar('render'); |
196 | } | 196 | } |
197 | }; | 197 | }; |
198 | 198 | ||
199 | $scope.eventRender = function( event, element, view ) { | 199 | $scope.eventRender = function( event, element, view ) { |
200 | element.attr({'tooltip': event.title, | 200 | element.attr({'tooltip': event.title, |
201 | 'tooltip-append-to-body': true}); | 201 | 'tooltip-append-to-body': true}); |
202 | $compile(element)($scope); | 202 | $compile(element)($scope); |
203 | }; | 203 | }; |
204 | 204 | ||
205 | $scope.uiConfig = { | 205 | $scope.uiConfig = { |
206 | calendar:{ | 206 | calendar:{ |
207 | firstDay:1, | ||
207 | height: 450, | 208 | height: 450, |
208 | editable: true, | 209 | editable: true, |
209 | droppable: true, | 210 | droppable: true, |
210 | drop: function (event, delta, revertFunc, jsEvent, ui, view) { | 211 | drop: function (event, delta, revertFunc, jsEvent, ui, view) { |
211 | }, | 212 | }, |
212 | header:{ | 213 | header:{ |
213 | right: 'month basicWeek basicDay', | 214 | right: 'month basicWeek basicDay', |
214 | center: 'title', | 215 | center: 'title', |
215 | left: 'prev,next, today' | 216 | left: 'prev,next, today' |
216 | }, | 217 | }, |
217 | eventClick: $scope.alertOnEventClick, | 218 | eventClick: $scope.alertOnEventClick, |
218 | eventDrop: $scope.alertOnDrop, | 219 | eventDrop: $scope.alertOnDrop, |
219 | eventResize: $scope.alertOnResize, | 220 | eventResize: $scope.alertOnResize, |
220 | eventRender: $scope.eventRender | 221 | eventRender: $scope.eventRender |
221 | } | 222 | } |
222 | }; | 223 | }; |
223 | 224 | ||
224 | $scope.addEvent = function(index) { | 225 | $scope.addEvent = function(index) { |
225 | //console.log('INDEX', index); | 226 | //console.log('INDEX', index); |
226 | //console.log('EVENTS', $scope.eventSources); | 227 | //console.log('EVENTS', $scope.eventSources); |
227 | // $scope.events.push($scope.eventList[index]); | 228 | // $scope.events.push($scope.eventList[index]); |
228 | } | 229 | } |
229 | 230 | ||
230 | /*$scope.showEventsList = function(){ | 231 | /*$scope.showEventsList = function(){ |
231 | console.log('testing', $scope.eventsF); | 232 | console.log('testing', $scope.eventsF); |
232 | 233 | ||
233 | };*/ | 234 | };*/ |
234 | 235 | ||
235 | //$scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; | 236 | //$scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; |
236 | //$scope.eventSources2 = [$scope.calEventsExt, $scope.eventsF, $scope.events]; | 237 | //$scope.eventSources2 = [$scope.calEventsExt, $scope.eventsF, $scope.events]; |
237 | }]); | 238 | }]); |
238 | 239 | ||
239 | 240 |