Commit 6c5a99488f97d03a2238129e714027c494afa421
1 parent
5fe941ac61
Exists in
master
analytics and fuel order color update
Showing
5 changed files
with
193 additions
and
130 deletions
Show diff stats
app/css/main.css
app/partials/analytics/analytics.controller.js
... | ... | @@ -134,14 +134,9 @@ angular.module('acufuel') |
134 | 134 | $scope.getHfpChartData = function() { |
135 | 135 | //var makeId = makeId; |
136 | 136 | analyticsService.gethfpChart().then(function(result) { |
137 | - console.log('---result--',result); | |
138 | 137 | $scope.hfpValues = result; |
138 | + console.log('---kd result--',$scope.hfpValues); | |
139 | 139 | |
140 | - // $scope.datahfp = $scope.hfpValues; | |
141 | - }) | |
142 | - } | |
143 | - $scope.getHfpChartData(); | |
144 | - | |
145 | 140 | /*Historic Fuel Price */ |
146 | 141 | |
147 | 142 | $scope.optionshfp = { |
... | ... | @@ -149,7 +144,7 @@ angular.module('acufuel') |
149 | 144 | type: 'cumulativeLineChart', |
150 | 145 | height: 450, |
151 | 146 | margin: { |
152 | - top: 20, | |
147 | + top: 40, | |
153 | 148 | right: 20, |
154 | 149 | bottom: 50, |
155 | 150 | left: 65 |
... | ... | @@ -158,7 +153,7 @@ angular.module('acufuel') |
158 | 153 | return d[0]; |
159 | 154 | }, |
160 | 155 | y: function(d) { |
161 | - return d[1] / 100; | |
156 | + return d[1] ; | |
162 | 157 | }, |
163 | 158 | average: function(d) { |
164 | 159 | return d.mean / 100; |
... | ... | @@ -170,137 +165,200 @@ angular.module('acufuel') |
170 | 165 | clipVoronoi: false, |
171 | 166 | |
172 | 167 | xAxis: { |
173 | - axisLabel: 'X Axis', | |
168 | + axisLabel: '', | |
169 | + | |
174 | 170 | tickFormat: function(d) { |
175 | - console.log('-dd-',d); | |
176 | - return d3.time.format('%m/%d/%y')(new Date(d)) | |
171 | + // console.log('-dd-',d); | |
172 | + // return d3.time.format('%m - %y')(new Date(d)) | |
173 | + return d3.time.format('%b \-%y')(new Date(d)) | |
177 | 174 | }, |
178 | 175 | showMaxMin: false, |
179 | 176 | staggerLabels: true |
180 | 177 | }, |
181 | 178 | |
182 | 179 | yAxis: { |
183 | - axisLabel: 'Y Axis', | |
180 | + axisLabel: 'PaP/Retail Price', | |
184 | 181 | |
185 | 182 | tickFormat: function(d) { |
186 | - console.log('-dd-1--',d) | |
187 | - return d3.format(',.1%')(d); | |
183 | + // console.log('-dd-1--',d) | |
184 | + //return d3.format('')(d).toFixed(2); | |
185 | + return '$ '+d.toFixed(2) | |
188 | 186 | }, |
189 | - axisLabelDistance: 0 | |
187 | + axisLabelDistance: 5 | |
190 | 188 | } |
191 | 189 | } |
192 | 190 | }; |
193 | - $scope.datahfp = [{ | |
194 | - key: "Long", | |
195 | - values: [ | |
196 | - [1083297600000, -2.974623048543], | |
197 | - [1085976000000, -1.7740300785979], | |
198 | - [1088568000000, 4.4681318138177], | |
199 | - [1091246400000, 7.0242541001353], | |
200 | - [1093924800000, 7.5709603667586], | |
201 | - [1096516800000, 20.612245065736], | |
202 | - [1099195200000, 21.698065237316], | |
203 | - [1101790800000, 40.501189458018], | |
204 | - [1104469200000, 50.464679413194], | |
205 | - [1107147600000, 48.917421973355], | |
206 | - [1109566800000, 63.750936549160], | |
207 | - [1112245200000, 59.072499126460], | |
208 | - [1114833600000, 43.373158880492], | |
209 | - [1117512000000, 54.490918947556], | |
210 | - [1120104000000, 56.661178852079], | |
211 | - [1122782400000, 73.450103545496], | |
212 | - [1125460800000, 71.714526354907], | |
213 | - [1128052800000, 85.221664349607], | |
214 | - [1130734800000, 77.769261392481], | |
215 | - [1133326800000, 95.966528716500], | |
216 | - [1136005200000, 107.59132116397], | |
217 | - [1138683600000, 127.25740096723], | |
218 | - [1141102800000, 122.13917498830], | |
219 | - [1143781200000, 126.53657279774], | |
220 | - [1146369600000, 132.39300992970], | |
221 | - [1149048000000, 120.11238242904], | |
222 | - [1151640000000, 118.41408917750], | |
223 | - [1154318400000, 107.92918924621], | |
224 | - [1156996800000, 110.28057249569], | |
225 | - [1159588800000, 117.20485334692], | |
226 | - [1162270800000, 141.33556756948], | |
227 | - [1164862800000, 159.59452727893], | |
228 | - [1167541200000, 167.09801853304], | |
229 | - [1170219600000, 185.46849659215], | |
230 | - [1172638800000, 184.82474099990], | |
231 | - [1175313600000, 195.63155213887], | |
232 | - [1177905600000, 207.40597044171], | |
233 | - [1180584000000, 230.55966698196], | |
234 | - [1183176000000, 239.55649035292], | |
235 | - [1185854400000, 241.35915085208], | |
236 | - [1188532800000, 239.89428956243], | |
237 | - [1191124800000, 260.47781917715], | |
238 | - [1193803200000, 276.39457482225], | |
239 | - [1196398800000, 258.66530682672], | |
240 | - [1199077200000, 250.98846121893], | |
241 | - [1201755600000, 226.89902618127], | |
242 | - [1204261200000, 227.29009273807], | |
243 | - [1206936000000, 218.66476654350], | |
244 | - [1209528000000, 232.46605902918], | |
245 | - [1212206400000, 253.25667081117], | |
246 | - [1214798400000, 235.82505363925], | |
247 | - [1217476800000, 229.70112774254], | |
248 | - [1220155200000, 225.18472705952], | |
249 | - [1222747200000, 189.13661746552], | |
250 | - [1225425600000, 149.46533007301], | |
251 | - [1228021200000, 131.00340772114], | |
252 | - [1230699600000, 135.18341728866], | |
253 | - [1233378000000, 109.15296887173], | |
254 | - [1235797200000, 84.614772549760], | |
255 | - [1238472000000, 100.60810015326], | |
256 | - [1241064000000, 141.50134895610], | |
257 | - [1243742400000, 142.50405083675], | |
258 | - [1246334400000, 139.81192372672], | |
259 | - [1249012800000, 177.78205544583], | |
260 | - [1251691200000, 194.73691933074], | |
261 | - [1254283200000, 209.00838460225], | |
262 | - [1256961600000, 198.19855877420], | |
263 | - [1259557200000, 222.37102417812], | |
264 | - [1262235600000, 234.24581081250], | |
265 | - [1264914000000, 228.26087689346], | |
266 | - [1267333200000, 248.81895126250], | |
267 | - [1270008000000, 270.57301075186], | |
268 | - [1272600000000, 292.64604322550], | |
269 | - [1275278400000, 265.94088520518], | |
270 | - [1277870400000, 237.82887467569], | |
271 | - [1280548800000, 265.55973314204], | |
272 | - [1283227200000, 248.30877330928], | |
273 | - [1285819200000, 278.14870066912], | |
274 | - [1288497600000, 292.69260960288], | |
275 | - [1291093200000, 300.84263809599], | |
276 | - [1293771600000, 326.17253914628], | |
277 | - [1296450000000, 337.69335966505], | |
278 | - [1298869200000, 339.73260965121], | |
279 | - [1301544000000, 346.87865120765], | |
280 | - [1304136000000, 347.92991526628], | |
281 | - [1306814400000, 342.04627502669], | |
282 | - [1309406400000, 333.45386231233], | |
283 | - [1312084800000, 323.15034181243], | |
284 | - [1314763200000, 295.66126882331], | |
285 | - [1317355200000, 251.48014579253], | |
286 | - [1320033600000, 295.15424257905], | |
287 | - [1322629200000, 294.54766764397], | |
288 | - [1325307600000, 295.72906119051], | |
289 | - [1327986000000, 325.73351347613], | |
290 | - [1330491600000, 340.16106061186], | |
291 | - [1333166400000, 345.15514071490], | |
292 | - [1335758400000, 337.10259395679], | |
293 | - [1338436800000, 318.68216333837], | |
294 | - [1341028800000, 317.03683945246], | |
295 | - [1343707200000, 318.53549659997], | |
296 | - [1346385600000, 332.85381464104], | |
297 | - [1348977600000, 337.36534373477], | |
298 | - [1351656000000, 350.27872156161], | |
299 | - [1354251600000, 349.45128876100] | |
300 | - ], | |
301 | - mean: 250 | |
302 | - }]; | |
303 | - //console.log("--datahfp---",$scope.datahfp); | |
191 | + $scope.datahfp = [{ | |
192 | + key: "Long", | |
193 | + values: $scope.hfpValues, | |
194 | + mean: 0 | |
195 | + }]; | |
196 | + console.log("--datahfp---",$scope.datahfp); | |
197 | + | |
198 | + }) | |
199 | + } | |
200 | + | |
201 | + $scope.getHfpChartData(); | |
202 | + | |
203 | + /*Historic Fuel Price */ | |
204 | + | |
205 | + // $scope.optionshfp = { | |
206 | + // chart: { | |
207 | + // type: 'cumulativeLineChart', | |
208 | + // height: 450, | |
209 | + // margin: { | |
210 | + // top: 20, | |
211 | + // right: 20, | |
212 | + // bottom: 50, | |
213 | + // left: 65 | |
214 | + // }, | |
215 | + // x: function(d) { | |
216 | + // return d[0]; | |
217 | + // }, | |
218 | + // y: function(d) { | |
219 | + // return d[1] / 100; | |
220 | + // }, | |
221 | + // average: function(d) { | |
222 | + // return d.mean / 100; | |
223 | + // }, | |
224 | + | |
225 | + // color: ["#FEDFC3"], | |
226 | + // duration: 300, | |
227 | + // useInteractiveGuideline: true, | |
228 | + // clipVoronoi: false, | |
229 | + | |
230 | + // xAxis: { | |
231 | + // axisLabel: 'X Axis', | |
232 | + // tickFormat: function(d) { | |
233 | + // console.log('-dd-',d); | |
234 | + // return d3.time.format('%m/%d/%y')(new Date(d)) | |
235 | + // }, | |
236 | + // showMaxMin: false, | |
237 | + // staggerLabels: true | |
238 | + // }, | |
239 | + | |
240 | + // yAxis: { | |
241 | + // axisLabel: 'Y Axis', | |
242 | + | |
243 | + // tickFormat: function(d) { | |
244 | + // console.log('-dd-1--',d) | |
245 | + // return d3.format(',.1%')(d); | |
246 | + // }, | |
247 | + // axisLabelDistance: 0 | |
248 | + // } | |
249 | + // } | |
250 | + // }; | |
251 | + // $scope.datahfp = [{ | |
252 | + // key: "Long", | |
253 | + // values: $scope.hfpValues[] | |
254 | + // [1083297600000, -2.974623048543], | |
255 | + // [1085976000000, -1.7740300785979], | |
256 | + // [1088568000000, 4.4681318138177], | |
257 | + // [1091246400000, 7.0242541001353], | |
258 | + // [1093924800000, 7.5709603667586], | |
259 | + // [1096516800000, 20.612245065736], | |
260 | + // [1099195200000, 21.698065237316], | |
261 | + // [1101790800000, 40.501189458018], | |
262 | + // [1104469200000, 50.464679413194], | |
263 | + // [1107147600000, 48.917421973355], | |
264 | + // [1109566800000, 63.750936549160], | |
265 | + // [1112245200000, 59.072499126460], | |
266 | + // [1114833600000, 43.373158880492], | |
267 | + // [1117512000000, 54.490918947556], | |
268 | + // [1120104000000, 56.661178852079], | |
269 | + // [1122782400000, 73.450103545496], | |
270 | + // [1125460800000, 71.714526354907], | |
271 | + // [1128052800000, 85.221664349607], | |
272 | + // [1130734800000, 77.769261392481], | |
273 | + // [1133326800000, 95.966528716500], | |
274 | + // [1136005200000, 107.59132116397], | |
275 | + // [1138683600000, 127.25740096723], | |
276 | + // [1141102800000, 122.13917498830], | |
277 | + // [1143781200000, 126.53657279774], | |
278 | + // [1146369600000, 132.39300992970], | |
279 | + // [1149048000000, 120.11238242904], | |
280 | + // [1151640000000, 118.41408917750], | |
281 | + // [1154318400000, 107.92918924621], | |
282 | + // [1156996800000, 110.28057249569], | |
283 | + // [1159588800000, 117.20485334692], | |
284 | + // [1162270800000, 141.33556756948], | |
285 | + // [1164862800000, 159.59452727893], | |
286 | + // [1167541200000, 167.09801853304], | |
287 | + // [1170219600000, 185.46849659215], | |
288 | + // [1172638800000, 184.82474099990], | |
289 | + // [1175313600000, 195.63155213887], | |
290 | + // [1177905600000, 207.40597044171], | |
291 | + // [1180584000000, 230.55966698196], | |
292 | + // [1183176000000, 239.55649035292], | |
293 | + // [1185854400000, 241.35915085208], | |
294 | + // [1188532800000, 239.89428956243], | |
295 | + // [1191124800000, 260.47781917715], | |
296 | + // [1193803200000, 276.39457482225], | |
297 | + // [1196398800000, 258.66530682672], | |
298 | + // [1199077200000, 250.98846121893], | |
299 | + // [1201755600000, 226.89902618127], | |
300 | + // [1204261200000, 227.29009273807], | |
301 | + // [1206936000000, 218.66476654350], | |
302 | + // [1209528000000, 232.46605902918], | |
303 | + // [1212206400000, 253.25667081117], | |
304 | + // [1214798400000, 235.82505363925], | |
305 | + // [1217476800000, 229.70112774254], | |
306 | + // [1220155200000, 225.18472705952], | |
307 | + // [1222747200000, 189.13661746552], | |
308 | + // [1225425600000, 149.46533007301], | |
309 | + // [1228021200000, 131.00340772114], | |
310 | + // [1230699600000, 135.18341728866], | |
311 | + // [1233378000000, 109.15296887173], | |
312 | + // [1235797200000, 84.614772549760], | |
313 | + // [1238472000000, 100.60810015326], | |
314 | + // [1241064000000, 141.50134895610], | |
315 | + // [1243742400000, 142.50405083675], | |
316 | + // [1246334400000, 139.81192372672], | |
317 | + // [1249012800000, 177.78205544583], | |
318 | + // [1251691200000, 194.73691933074], | |
319 | + // [1254283200000, 209.00838460225], | |
320 | + // [1256961600000, 198.19855877420], | |
321 | + // [1259557200000, 222.37102417812], | |
322 | + // [1262235600000, 234.24581081250], | |
323 | + // [1264914000000, 228.26087689346], | |
324 | + // [1267333200000, 248.81895126250], | |
325 | + // [1270008000000, 270.57301075186], | |
326 | + // [1272600000000, 292.64604322550], | |
327 | + // [1275278400000, 265.94088520518], | |
328 | + // [1277870400000, 237.82887467569], | |
329 | + // [1280548800000, 265.55973314204], | |
330 | + // [1283227200000, 248.30877330928], | |
331 | + // [1285819200000, 278.14870066912], | |
332 | + // [1288497600000, 292.69260960288], | |
333 | + // [1291093200000, 300.84263809599], | |
334 | + // [1293771600000, 326.17253914628], | |
335 | + // [1296450000000, 337.69335966505], | |
336 | + // [1298869200000, 339.73260965121], | |
337 | + // [1301544000000, 346.87865120765], | |
338 | + // [1304136000000, 347.92991526628], | |
339 | + // [1306814400000, 342.04627502669], | |
340 | + // [1309406400000, 333.45386231233], | |
341 | + // [1312084800000, 323.15034181243], | |
342 | + // [1314763200000, 295.66126882331], | |
343 | + // [1317355200000, 251.48014579253], | |
344 | + // [1320033600000, 295.15424257905], | |
345 | + // [1322629200000, 294.54766764397], | |
346 | + // [1325307600000, 295.72906119051], | |
347 | + // [1327986000000, 325.73351347613], | |
348 | + // [1330491600000, 340.16106061186], | |
349 | + // [1333166400000, 345.15514071490], | |
350 | + // [1335758400000, 337.10259395679], | |
351 | + // [1338436800000, 318.68216333837], | |
352 | + // [1341028800000, 317.03683945246], | |
353 | + // [1343707200000, 318.53549659997], | |
354 | + // [1346385600000, 332.85381464104], | |
355 | + // [1348977600000, 337.36534373477], | |
356 | + // [1351656000000, 350.27872156161], | |
357 | + // [1354251600000, 349.45128876100] | |
358 | + // ], | |
359 | + // mean: 250 | |
360 | + // }]; | |
361 | + // console.log("--datahfp---",$scope.datahfp); | |
304 | 362 | |
305 | 363 | |
306 | 364 | /*Date Range Filter for Monthly fuel Sales*/ | ... | ... |
app/partials/fuelOrders/fuelOrders.controller.js
... | ... | @@ -132,8 +132,10 @@ function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgT |
132 | 132 | $(document).ready(function(){ |
133 | 133 | function changeSelectboxBg(){ |
134 | 134 | setInterval(function(){ |
135 | + if ($('.table select').is(':focus')) { | |
135 | 136 | |
136 | - var myselect = document.getElementsByClassName('colorfulSelectbox'); | |
137 | + }else{ | |
138 | + var myselect = document.getElementsByClassName('colorfulSelectbox'); | |
137 | 139 | |
138 | 140 | for (var i = 0; i < myselect.length; i++) { |
139 | 141 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
... | ... | @@ -144,6 +146,7 @@ function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgT |
144 | 146 | // console.log('colour', getColor); |
145 | 147 | myselect[i].blur(); |
146 | 148 | } |
149 | + } | |
147 | 150 | }, 1000) |
148 | 151 | } |
149 | 152 | changeSelectboxBg(); | ... | ... |
app/partials/viewCompany/viewCompany.controller.js
... | ... | @@ -1066,7 +1066,7 @@ angular.module('acufuel') |
1066 | 1066 | |
1067 | 1067 | $scope.editJetMargin = function(aircraftData, type) { |
1068 | 1068 | $scope.showLoader = true; |
1069 | - if (type = "jet") { | |
1069 | + if (type == 'jet') { | |
1070 | 1070 | |
1071 | 1071 | var aircraftdataMargin = "marginId=" + aircraftData.aircraftsMargin.id + "&type=" + type; |
1072 | 1072 | } else { | ... | ... |
app/partials/viewCompany/viewCompany.service.js