Commit ca4ff8b5d4ab648623e2ee47344ef939863fa9da

Authored by Kuldeep Arora
1 parent 8497321f52
Exists in master

fixed customer sources pie chart

app/css/custom.css
1 /*------------------------------------------------------------------ 1 /*------------------------------------------------------------------
2 2
3 [Custom Stylesheet] 3 [Custom Stylesheet]
4 4
5 5
6 Last change: 03/25/2013 6 Last change: 03/25/2013
7 Assigned to: You 7 Assigned to: You
8 8
9 -------------------------------------------------------------------*/ 9 -------------------------------------------------------------------*/
10 10
11 body{ 11 body{
12 color: #333; 12 color: #333;
13 } 13 }
14 a, a:hover{ 14 a, a:hover{
15 text-decoration: none; 15 text-decoration: none;
16 color: initial; 16 color: initial;
17 } 17 }
18 .custom-widget-content{ 18 .custom-widget-content{
19 width: 100%; 19 width: 100%;
20 height: auto; 20 height: auto;
21 padding: 15px 0; 21 padding: 15px 0;
22 background-color: #fff; 22 background-color: #fff;
23 border: 1px solid #D5D5D5; 23 border: 1px solid #D5D5D5;
24 border-radius: 0 0 5px 5px; 24 border-radius: 0 0 5px 5px;
25 } 25 }
26 .hr{ 26 .hr{
27 margin: 5px 0; 27 margin: 5px 0;
28 } 28 }
29 .disableSelect:disabled{ 29 .disableSelect:disabled{
30 border: 0; 30 border: 0;
31 background-color: transparent; 31 background-color: transparent;
32 color: #f90; 32 color: #f90;
33 box-shadow: none; 33 box-shadow: none;
34 -webkit-appearance: none; 34 -webkit-appearance: none;
35 appearance: none; 35 appearance: none;
36 } 36 }
37 .disableInput:disabled{ 37 .disableInput:disabled{
38 border: 0; 38 border: 0;
39 background-color: transparent; 39 background-color: transparent;
40 color: #222; 40 color: #222;
41 box-shadow: none; 41 box-shadow: none;
42 } 42 }
43 .img-logo{ 43 .img-logo{
44 height: 32px; 44 height: 32px;
45 padding-left: 10%; 45 padding-left: 10%;
46 } 46 }
47 47
48 .widget-header > i{ 48 .widget-header > i{
49 display: inline-block; 49 display: inline-block;
50 margin-top: -3px; 50 margin-top: -3px;
51 margin-left: 13px; 51 margin-left: 13px;
52 margin-right: -2px; 52 margin-right: -2px;
53 font-size: 16px; 53 font-size: 16px;
54 color: #555; 54 color: #555;
55 vertical-align: middle; 55 vertical-align: middle;
56 } 56 }
57 57
58 58
59 table{ 59 table{
60 width: 100%; 60 width: 100%;
61 } 61 }
62 table th, td{ 62 table th, td{
63 font-size: 13px; 63 font-size: 13px;
64 } 64 }
65 .navbar-brand{ 65 .navbar-brand{
66 height: auto; 66 height: auto;
67 } 67 }
68 .navbar.navbar-inverse { 68 .navbar.navbar-inverse {
69 background: #eee; 69 background: #eee;
70 border-color: #c2bebe; 70 border-color: #c2bebe;
71 border-bottom: 1px solid #c2bebe; 71 border-bottom: 1px solid #c2bebe;
72 } 72 }
73 .custom-widget-content .btn-xs{ 73 .custom-widget-content .btn-xs{
74 padding: 3px 5px; 74 padding: 3px 5px;
75 } 75 }
76 .fc-event{ 76 .fc-event{
77 background-color: #ff9900 !important; 77 background-color: #ff9900 !important;
78 color: #fff !important; 78 color: #fff !important;
79 border: 1px solid #ff9900 !important; 79 border: 1px solid #ff9900 !important;
80 padding: 5px; 80 padding: 5px;
81 font-size: 14px; 81 font-size: 14px;
82 border-radius: 0 !important; 82 border-radius: 0 !important;
83 } 83 }
84 .pull-right-color{ 84 .pull-right-color{
85 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 85 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
86 } 86 }
87 .pull-right-setup{ 87 .pull-right-setup{
88 margin-bottom: 10px; 88 margin-bottom: 10px;
89 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 89 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
90 } 90 }
91 .Airport{ 91 .Airport{
92 padding-top: 5px; 92 padding-top: 5px;
93 } 93 }
94 .src-image{ 94 .src-image{
95 width: 50px; 95 width: 50px;
96 height: 50px; 96 height: 50px;
97 } 97 }
98 .Accept{ 98 .Accept{
99 padding-top: 25px; 99 padding-top: 25px;
100 } 100 }
101 .dis{ 101 .dis{
102 float: left; 102 float: left;
103 margin-right:100px; 103 margin-right:100px;
104 } 104 }
105 /*.email-password{ 105 /*.email-password{
106 width: 40px; 106 width: 40px;
107 height: 24px; 107 height: 24px;
108 }*/ 108 }*/
109 .email-password-icon{ 109 .email-password-icon{
110 width: 10px; 110 width: 10px;
111 height: 10px; 111 height: 10px;
112 } 112 }
113 @media( max-width: 768px;){ 113 @media( max-width: 768px;){
114 .btn{ 114 .btn{
115 font-size: 10px !important; 115 font-size: 10px !important;
116 } 116 }
117 .dis{ 117 .dis{
118 float: none; 118 float: none;
119 margin-right: 0px; 119 margin-right: 0px;
120 } 120 }
121 } 121 }
122 .Search-tabs{ 122 .Search-tabs{
123 border-bottom: 0px solid #ddd; */ 123 border-bottom: 0px solid #ddd; */
124 } 124 }
125 125
126 .customer-table table{ 126 .customer-table table{
127 width: 100%; 127 width: 100%;
128 } 128 }
129 .customer-table input{ 129 .customer-table input{
130 border-radius: 0; 130 border-radius: 0;
131 box-shadow: none; 131 box-shadow: none;
132 border: 1px solid #e4e3e3; 132 border: 1px solid #e4e3e3;
133 padding: 0px; 133 padding: 0px;
134 font-size: 10px; 134 font-size: 10px;
135 display: -webkit-inline-box; 135 display: -webkit-inline-box;
136 display: inline-box; 136 display: inline-box;
137 height: 31px; 137 height: 31px;
138 } 138 }
139 .customer-table select{ 139 .customer-table select{
140 border-radius: 0; 140 border-radius: 0;
141 box-shadow: none; 141 box-shadow: none;
142 border: 1px solid #e4e3e3; 142 border: 1px solid #e4e3e3;
143 padding: 0px; 143 padding: 0px;
144 font-size: 10px; 144 font-size: 10px;
145 height: 31px; 145 height: 31px;
146 display: -webkit-inline-box; 146 display: -webkit-inline-box;
147 display: inline-box; 147 display: inline-box;
148 } 148 }
149 .customer-table th > label{ 149 .customer-table th > label{
150 font-weight: bold; 150 font-weight: bold;
151 padding: 10px 5px 2px 5px; 151 padding: 10px 5px 2px 5px;
152 margin-bottom: 0; 152 margin-bottom: 0;
153 } 153 }
154 .customer-table td{ 154 .customer-table td{
155 padding: 5px !important; 155 padding: 5px !important;
156 height: auto !important; 156 height: auto !important;
157 vertical-align: middle !important; 157 vertical-align: middle !important;
158 } 158 }
159 .customer-table td > select{ 159 .customer-table td > select{
160 height: 22px !important; 160 height: 22px !important;
161 } 161 }
162 .customer-table td > button{ 162 .customer-table td > button{
163 font-size: 10px; 163 font-size: 10px;
164 } 164 }
165 165
166 /*.new-input-label{ 166 /*.new-input-label{
167 margin-bottom: 0; 167 margin-bottom: 0;
168 line-height: 34px; 168 line-height: 34px;
169 }*/ 169 }*/
170 170
171 171
172 172
173 173
174 174
175 /* new custom css for accrodian tabs */ 175 /* new custom css for accrodian tabs */
176 176
177 .customAccordianHeader{ 177 .customAccordianHeader{
178 width: 100%; 178 width: 100%;
179 height: auto; 179 height: auto;
180 background-color: #F3F3F3; 180 background-color: #F3F3F3;
181 border: 1px solid #ddd; 181 border: 1px solid #ddd;
182 color: #333; 182 color: #333;
183 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); 183 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
184 border-radius: 3px 3px 3px 3px; 184 border-radius: 3px 3px 3px 3px;
185 padding: 10px 15px; 185 padding: 10px 15px;
186 margin-top: 10px; 186 margin-top: 10px;
187 } 187 }
188 188
189 .customAccordianHeader.customActive{ 189 .customAccordianHeader.customActive{
190 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b)); 190 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b));
191 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%); 191 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%);
192 background-repeat: repeat-x; 192 background-repeat: repeat-x;
193 border: 1px solid #222222; 193 border: 1px solid #222222;
194 color: #FFF; 194 color: #FFF;
195 border-radius: 3px 3px 0 0; 195 border-radius: 3px 3px 0 0;
196 } 196 }
197 .customAccordianHeader.customActive .form-control{ 197 .customAccordianHeader.customActive .form-control{
198 margin-left: 5px; 198 margin-left: 5px;
199 margin-right: 5px; 199 margin-right: 5px;
200 } 200 }
201 .customAccordianHeader > span{ 201 .customAccordianHeader > span{
202 font-size: 15px; 202 font-size: 15px;
203 line-height: 22px; 203 line-height: 22px;
204 float: left; 204 float: left;
205 } 205 }
206 .customAccordianHeader .btn{ 206 .customAccordianHeader .btn{
207 padding: 2px 12px; 207 padding: 2px 12px;
208 } 208 }
209 .customAccordianHeader > .form-control{ 209 .customAccordianHeader > .form-control{
210 outline: none; 210 outline: none;
211 box-shadow: none; 211 box-shadow: none;
212 } 212 }
213 .customAccordianHeader > select.form-control{ 213 .customAccordianHeader > select.form-control{
214 width: 150px; 214 width: 150px;
215 height: 26px; 215 height: 26px;
216 padding: 0 6px; 216 padding: 0 6px;
217 float: left; 217 float: left;
218 } 218 }
219 .customAccordianHeader > select.form-control[disabled]{ 219 .customAccordianHeader > select.form-control[disabled]{
220 border: none; 220 border: none;
221 -webkit-appearance: none; 221 -webkit-appearance: none;
222 -moz-appearance: none; 222 -moz-appearance: none;
223 appearance: none; 223 appearance: none;
224 background-color: transparent; 224 background-color: transparent;
225 color: #f90; 225 color: #f90;
226 width: auto; 226 width: auto;
227 } 227 }
228 .customAccordianHeader > input.form-control{ 228 .customAccordianHeader > input.form-control{
229 width: 70px; 229 width: 70px;
230 height: 26px; 230 height: 26px;
231 padding: 0 6px; 231 padding: 0 6px;
232 float: left; 232 float: left;
233 } 233 }
234 .customAccordianHeader > input.form-control[disabled]{ 234 .customAccordianHeader > input.form-control[disabled]{
235 border: none; 235 border: none;
236 -webkit-appearance: none; 236 -webkit-appearance: none;
237 -moz-appearance: none; 237 -moz-appearance: none;
238 appearance: none; 238 appearance: none;
239 background-color: transparent; 239 background-color: transparent;
240 color: #333; 240 color: #333;
241 } 241 }
242 .customAccordianTabBody{ 242 .customAccordianTabBody{
243 width: 100%; 243 width: 100%;
244 height: auto; 244 height: auto;
245 padding: 15px; 245 padding: 15px;
246 border: 1px solid #ddd; 246 border: 1px solid #ddd;
247 border-top: 0; 247 border-top: 0;
248 border-radius: 0 0 3px 3px; 248 border-radius: 0 0 3px 3px;
249 } 249 }
250 .customTableWithFilter{ 250 .customTableWithFilter{
251 width: auto; 251 width: auto;
252 height: auto; 252 height: auto;
253 } 253 }
254 .customTableWithFilter th{ 254 .customTableWithFilter th{
255 padding: 5px; 255 padding: 5px;
256 background-color: #f3f3f3; 256 background-color: #f3f3f3;
257 border: 1px solid #ddd; 257 border: 1px solid #ddd;
258 } 258 }
259 .customTableWithFilter th i{ 259 .customTableWithFilter th i{
260 margin-top: 3px; 260 margin-top: 3px;
261 } 261 }
262 .customTableWithFilter th span{ 262 .customTableWithFilter th span{
263 font-size: 11px; 263 font-size: 11px;
264 color: #222; 264 color: #222;
265 } 265 }
266 .customTableWithFilter th input{ 266 .customTableWithFilter th input{
267 width: 50px; 267 width: 50px;
268 } 268 }
269 .customTableWithFilter td{ 269 .customTableWithFilter td{
270 padding: 5px; 270 padding: 5px;
271 border: 1px solid #ddd; 271 border: 1px solid #ddd;
272 } 272 }
273 .customTableWithFilter td span{ 273 .customTableWithFilter td span{
274 font-size: 11px; 274 font-size: 11px;
275 } 275 }
276 .customTableWithFilter td span:first-child{ 276 .customTableWithFilter td span:first-child{
277 color: #449d44; 277 color: #449d44;
278 font-weight: bold; 278 font-weight: bold;
279 } 279 }
280 .customTableWithFilter td span:last-child{ 280 .customTableWithFilter td span:last-child{
281 color: #c9302c; 281 color: #c9302c;
282 font-style: italic; 282 font-style: italic;
283 font-weight: bold; 283 font-weight: bold;
284 } 284 }
285 .customTableWithFilter td .tierTextBox{ 285 .customTableWithFilter td .tierTextBox{
286 width: 70px; 286 width: 70px;
287 } 287 }
288 .customTableWithFilter .addTierButton{ 288 .customTableWithFilter .addTierButton{
289 color: #fff; 289 color: #fff;
290 background-color: #2196f3; 290 background-color: #2196f3;
291 border: none; 291 border: none;
292 padding: 3px 5px; 292 padding: 3px 5px;
293 } 293 }
294 .customTableWithFilter td .fa-trash-o{ 294 .customTableWithFilter td .fa-trash-o{
295 color: #fff; 295 color: #fff;
296 background-color: #c9302c; 296 background-color: #c9302c;
297 padding: 5px; 297 padding: 5px;
298 border-radius: 3px; 298 border-radius: 3px;
299 cursor: pointer; 299 cursor: pointer;
300 } 300 }
301 .resizeTextarea{ 301 .resizeTextarea{
302 resize: vertical; 302 resize: vertical;
303 margin-top: 20px; 303 margin-top: 20px;
304 } 304 }
305 305
306 .new-widget-content{ 306 .new-widget-content{
307 padding: 0 0 0 0 !important; 307 padding: 0 0 0 0 !important;
308 } 308 }
309 .new-tab-heading{ 309 .new-tab-heading{
310 padding: 5px; 310 padding: 5px;
311 color: #333; 311 color: #333;
312 background-color: #fcfcfc; 312 background-color: #fcfcfc;
313 border-bottom: 1px solid #d5d5d5; 313 border-bottom: 1px solid #d5d5d5;
314 border-right: 1px solid #d5d5d5; 314 border-right: 1px solid #d5d5d5;
315 } 315 }
316 .new-tab-body{ 316 .new-tab-body{
317 border-right: 1px solid #d5d5d5; 317 border-right: 1px solid #d5d5d5;
318 border-bottom: 1px solid #d5d5d5; 318 border-bottom: 1px solid #d5d5d5;
319 padding-left: 15px; 319 padding-left: 15px;
320 padding-bottom: 5px; 320 padding-bottom: 5px;
321 } 321 }
322 .new-tab-heading i.fa{ 322 .new-tab-heading i.fa{
323 font-size: 16px; 323 font-size: 16px;
324 cursor: pointer; 324 cursor: pointer;
325 } 325 }
326 .new-tab-heading span{ 326 .new-tab-heading span{
327 font-size: 14px; 327 font-size: 14px;
328 margin-left: 5px; 328 margin-left: 5px;
329 } 329 }
330 .new-tab-heading i.fa-plus-circle{ 330 .new-tab-heading i.fa-plus-circle{
331 color: #067dfc; 331 color: #067dfc;
332 } 332 }
333 .new-tab-heading i.fa-minus-circle{ 333 .new-tab-heading i.fa-minus-circle{
334 color: #d00d09; 334 color: #d00d09;
335 } 335 }
336 .new-tab-body-th{ 336 .new-tab-body-th{
337 color: #333; 337 color: #333;
338 } 338 }
339 .new-tab-body-th > div{ 339 .new-tab-body-th > div{
340 font-size: 12px; 340 font-size: 12px;
341 font-weight: bold; 341 font-weight: bold;
342 padding-right: 5px; 342 padding-right: 5px;
343 padding-left: 5px; 343 padding-left: 5px;
344 text-align: center; 344 text-align: center;
345 } 345 }
346 .new-tab-body-th > div:first-child{ 346 .new-tab-body-th > div:first-child{
347 font-size: 14px; 347 font-size: 14px;
348 font-weight: bold; 348 font-weight: bold;
349 text-align: left; 349 text-align: left;
350 } 350 }
351 .new-tab-body-td i.fa-plus-circle{ 351 .new-tab-body-td i.fa-plus-circle{
352 color: #067dfc; 352 color: #067dfc;
353 } 353 }
354 .new-tab-body-td i.fa-minus-circle{ 354 .new-tab-body-td i.fa-minus-circle{
355 color: #d00d09; 355 color: #d00d09;
356 } 356 }
357 .new-tab-body-td input{ 357 .new-tab-body-td input{
358 width: 50px; 358 width: 50px;
359 height: 24px; 359 height: 24px;
360 } 360 }
361 .new-tab-body-td .fa{ 361 .new-tab-body-td .fa{
362 font-size: 14px; 362 font-size: 14px;
363 } 363 }
364 .new-tab-body-td > div:first-child > div{ 364 .new-tab-body-td > div:first-child > div{
365 padding-right: 5px; 365 padding-right: 5px;
366 padding-left: 5px; 366 padding-left: 5px;
367 text-align: center; 367 text-align: center;
368 } 368 }
369 .new-tab-body-td > div:first-child > div:first-child{ 369 .new-tab-body-td > div:first-child > div:first-child{
370 text-align: left; 370 text-align: left;
371 } 371 }
372 .appliesTableHeading{ 372 .appliesTableHeading{
373 border: 1px solid #d5d5d5; 373 border: 1px solid #d5d5d5;
374 padding: 5px; 374 padding: 5px;
375 color: #333; 375 color: #333;
376 font-weight: bold; 376 font-weight: bold;
377 background-color: #fcfcfc; 377 background-color: #fcfcfc;
378 margin: 10px 0 0 0; 378 margin: 10px 0 0 0;
379 } 379 }
380 .appliesTableBody{ 380 .appliesTableBody{
381 border: 1px solid #d5d5d5; 381 border: 1px solid #d5d5d5;
382 border-top: 0; 382 border-top: 0;
383 background-color: #ffffe0; 383 background-color: #ffffe0;
384 margin-bottom: 10px; 384 margin-bottom: 10px;
385 height: auto; 385 height: auto;
386 } 386 }
387 .appliesTableBody > div.firstDiv{ 387 .appliesTableBody > div.firstDiv{
388 height: 100px; 388 height: 100px;
389 float: left; 389 float: left;
390 width: 40%; 390 width: 40%;
391 border-right: 1px solid #d5d5d5; 391 border-right: 1px solid #d5d5d5;
392 overflow: auto; 392 overflow: auto;
393 padding: 5px; 393 padding: 5px;
394 } 394 }
395 .appliesTableBody > div.lastDiv{ 395 .appliesTableBody > div.lastDiv{
396 width: 59%; 396 width: 59%;
397 height: 100px; 397 height: 100px;
398 padding: 5px; 398 padding: 5px;
399 float: left; 399 float: left;
400 } 400 }
401 .appliesTableBody > div.lastDiv textarea{ 401 .appliesTableBody > div.lastDiv textarea{
402 width: 40%; 402 width: 40%;
403 height: 60px; 403 height: 60px;
404 margin: 15px 0; 404 margin: 15px 0;
405 resize: none; 405 resize: none;
406 float: left; 406 float: left;
407 } 407 }
408 .reportedByTag{ 408 .reportedByTag{
409 width: 60%; 409 width: 60%;
410 height: 80px; 410 height: 80px;
411 border-top: 10px solid #393; 411 border-top: 10px solid #393;
412 border-left: 10px solid #6c6; 412 border-left: 10px solid #6c6;
413 border-radius: 5px 0 0 5px; 413 border-radius: 5px 0 0 5px;
414 background-color: #d7d7d7; 414 background-color: #d7d7d7;
415 float: right; 415 float: right;
416 position: relative; 416 position: relative;
417 right: -13px; 417 right: -13px;
418 margin-top: 5px; 418 margin-top: 5px;
419 font-size: 11px; 419 font-size: 11px;
420 } 420 }
421 .confirmedTag{ 421 .confirmedTag{
422 background-color: #393; 422 background-color: #393;
423 color: #fff; 423 color: #fff;
424 -webkit-transform: rotate(-90deg); 424 -webkit-transform: rotate(-90deg);
425 -moz-transform: rotate(-90deg); 425 -moz-transform: rotate(-90deg);
426 -o-transform: rotate(-90deg); 426 -o-transform: rotate(-90deg);
427 -ms-transform: rotate(-90deg); 427 -ms-transform: rotate(-90deg);
428 transform: rotate(-90deg); 428 transform: rotate(-90deg);
429 position: absolute; 429 position: absolute;
430 bottom: 25px; 430 bottom: 25px;
431 left: -24px; 431 left: -24px;
432 width: 71px; 432 width: 71px;
433 text-align: center; 433 text-align: center;
434 font-size: 11px; 434 font-size: 11px;
435 } 435 }
436 .reportedByTag table{ 436 .reportedByTag table{
437 margin-left: 27px; 437 margin-left: 27px;
438 width: calc(100% - 27px); 438 width: calc(100% - 27px);
439 } 439 }
440 .reportedByTag table td{ 440 .reportedByTag table td{
441 font-size: 11px; 441 font-size: 11px;
442 text-align: center; 442 text-align: center;
443 font-weight: bold; 443 font-weight: bold;
444 } 444 }
445 .reportedByTag table tr:last-child td{ 445 .reportedByTag table tr:last-child td{
446 text-align: left; 446 text-align: left;
447 font-weight: normal; 447 font-weight: normal;
448 font-size: 10px; 448 font-size: 10px;
449 } 449 }
450 .feeManagerRight{ 450 .feeManagerRight{
451 min-height: 70px; 451 min-height: 70px;
452 position: relative; 452 position: relative;
453 } 453 }
454 .feeManagerRight div{ 454 .feeManagerRight div{
455 position: absolute; 455 position: absolute;
456 bottom: 0; 456 bottom: 0;
457 width: 100%; 457 width: 100%;
458 } 458 }
459 .new-tab-body-td{ 459 .new-tab-body-td{
460 padding: 5px 0; 460 padding: 5px 0;
461 } 461 }
462 462
463 /* new checkbox slide css */ 463 /* new checkbox slide css */
464 464
465 .onoffswitch { 465 .onoffswitch {
466 position: relative; width: 80px; 466 position: relative; width: 80px;
467 -webkit-user-select:none; 467 -webkit-user-select:none;
468 -moz-user-select:none; 468 -moz-user-select:none;
469 -ms-user-select: none; 469 -ms-user-select: none;
470 margin: auto; 470 margin: auto;
471 } 471 }
472 .onoffswitch-checkbox { 472 .onoffswitch-checkbox {
473 display: none; 473 display: none;
474 } 474 }
475 .onoffswitch-label { 475 .onoffswitch-label {
476 display: block; 476 display: block;
477 overflow: hidden; 477 overflow: hidden;
478 cursor: pointer; 478 cursor: pointer;
479 border: 2px solid #999999; 479 border: 2px solid #999999;
480 border-radius: 0px; 480 border-radius: 0px;
481 } 481 }
482 .onoffswitch-inner { 482 .onoffswitch-inner {
483 display: block; 483 display: block;
484 width: 200%; 484 width: 200%;
485 margin-left: -100%; 485 margin-left: -100%;
486 transition: margin 0.3s ease-in 0s; 486 transition: margin 0.3s ease-in 0s;
487 } 487 }
488 .onoffswitch-inner:before, .onoffswitch-inner:after { 488 .onoffswitch-inner:before, .onoffswitch-inner:after {
489 display: block; 489 display: block;
490 float: left; 490 float: left;
491 width: 50%; 491 width: 50%;
492 height: 18px; 492 height: 18px;
493 padding: 0; 493 padding: 0;
494 line-height: 18px; 494 line-height: 18px;
495 font-size: 10px; 495 font-size: 10px;
496 color: white; 496 color: white;
497 font-family: Trebuchet, Arial, sans-serif; 497 font-family: Trebuchet, Arial, sans-serif;
498 font-weight: bold; 498 font-weight: bold;
499 box-sizing: border-box; 499 box-sizing: border-box;
500 } 500 }
501 .onoffswitch-inner:before { 501 .onoffswitch-inner:before {
502 content: "Include"; 502 content: "Include";
503 padding-left: 5px; 503 padding-left: 5px;
504 background-color: #016ADB; color: #FFFFFF; 504 background-color: #016ADB; color: #FFFFFF;
505 text-align: left; 505 text-align: left;
506 } 506 }
507 .onoffswitch-inner:after { 507 .onoffswitch-inner:after {
508 content: "Exclude"; 508 content: "Exclude";
509 padding-right: 5px; 509 padding-right: 5px;
510 background-color: ; color: #333333; 510 background-color: ; color: #333333;
511 text-align: right; 511 text-align: right;
512 } 512 }
513 .onoffswitch-switch { 513 .onoffswitch-switch {
514 display: block; 514 display: block;
515 width: 25px; 515 width: 25px;
516 margin: -3.5px; 516 margin: -3.5px;
517 background: #FFFFFF; 517 background: #FFFFFF;
518 position: absolute; 518 position: absolute;
519 top: 0; 519 top: 0;
520 bottom: 0; 520 bottom: 0;
521 right: 58px; 521 right: 58px;
522 border: 2px solid #999999; 522 border: 2px solid #999999;
523 border-radius: 0px; 523 border-radius: 0px;
524 transition: all 0.3s ease-in 0s; 524 transition: all 0.3s ease-in 0s;
525 } 525 }
526 .onoffswitch-switch i{ 526 .onoffswitch-switch i{
527 line-height: 25px; 527 line-height: 25px;
528 } 528 }
529 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { 529 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
530 margin-left: 0; 530 margin-left: 0;
531 } 531 }
532 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { 532 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
533 right: 0px; 533 right: 0px;
534 } 534 }
535 .onoffswitch-checkbox fa-check{ 535 .onoffswitch-checkbox fa-check{
536 color: #00ff00; 536 color: #00ff00;
537 } 537 }
538 .onoffswitch-checkbox fa-times{ 538 .onoffswitch-checkbox fa-times{
539 color: #ff0000; 539 color: #ff0000;
540 } 540 }
541 541
542 .newButtons{ 542 .newButtons{
543 background-color: #fff; 543 background-color: #fff;
544 border-radius: 10px; 544 border-radius: 10px;
545 color: #333; 545 color: #333;
546 border: 1px solid #eee; 546 border: 1px solid #eee;
547 box-shadow: 5px 5px 6px rgba(0,0,0,0.3); 547 box-shadow: 5px 5px 6px rgba(0,0,0,0.3);
548 padding: 6px 15px; 548 padding: 6px 15px;
549 margin-right: 10px; 549 margin-right: 10px;
550 } 550 }
551 .newButtons:disabled{ 551 .newButtons:disabled{
552 background-color: #eee; 552 background-color: #eee;
553 } 553 }
554 *{ 554 *{
555 outline: none; 555 outline: none;
556 } 556 }
557 557
558 558
559 /* my custom modal */ 559 /* my custom modal */
560 560
561 .customBackdrop{ 561 .customBackdrop{
562 position: fixed; 562 position: fixed;
563 background-color: rgba(0, 0, 0, 0.15); 563 background-color: rgba(0, 0, 0, 0.15);
564 top: 0; 564 top: 0;
565 left: 0; 565 left: 0;
566 width: 100%; 566 width: 100%;
567 height: 100%; 567 height: 100%;
568 z-index: 999; 568 z-index: 999;
569 } 569 }
570 .customModalInner{ 570 .customModalInner{
571 width: 100%; 571 width: 100%;
572 max-width: 500px; 572 max-width: 500px;
573 height: 200px; 573 height: 200px;
574 top: 15%; 574 top: 15%;
575 position: relative; 575 position: relative;
576 margin: auto; 576 margin: auto;
577 } 577 }
578 .customModelHead, .customModelFooter{ 578 .customModelHead, .customModelFooter{
579 width: 100%; 579 width: 100%;
580 background-color: #fafafa; 580 background-color: #fafafa;
581 border-bottom: 1px solid #ccc; 581 border-bottom: 1px solid #ccc;
582 color: #333; 582 color: #333;
583 padding: 10px; 583 padding: 10px;
584 } 584 }
585 .customModelFooter{ 585 .customModelFooter{
586 border-top: 1px solid #ccc; 586 border-top: 1px solid #ccc;
587 } 587 }
588 .customModelBody{ 588 .customModelBody{
589 width: 100%; 589 width: 100%;
590 height: auto; 590 height: auto;
591 background-color: #fff; 591 background-color: #fff;
592 color: #333; 592 color: #333;
593 padding: 10px; 593 padding: 10px;
594 } 594 }
595 .customModelHead p{ 595 .customModelHead p{
596 margin-bottom: 0; 596 margin-bottom: 0;
597 font-size: 14px; 597 font-size: 14px;
598 } 598 }
599 .customModelFooter button{ 599 .customModelFooter button{
600 border: 1px solid #ccc; 600 border: 1px solid #ccc;
601 } 601 }
602 .customModelFooter input[type="submit"]{ 602 .customModelFooter input[type="submit"]{
603 background-color: #6ad46a; 603 background-color: #6ad46a;
604 border: 1px solid #ccc; 604 border: 1px solid #ccc;
605 } 605 }
606 606
607 607
608 /* custom confirmation model */ 608 /* custom confirmation model */
609 609
610 610
611 .customConfirmPopBackdrop{ 611 .customConfirmPopBackdrop{
612 position: fixed; 612 position: fixed;
613 background-color: rgba(0, 0, 0, 0.3); 613 background-color: rgba(0, 0, 0, 0.3);
614 top: 0; 614 top: 0;
615 left: 0; 615 left: 0;
616 width: 100%; 616 width: 100%;
617 height: 100%; 617 height: 100%;
618 z-index: 999999999; 618 z-index: 999999999;
619 display: none; 619 display: none;
620 } 620 }
621 .customConfirmPopBackdrop .customModalInner{ 621 .customConfirmPopBackdrop .customModalInner{
622 top: 30%; 622 top: 30%;
623 } 623 }
624 624
625 625
626 626
627 /* tier list table */ 627 /* tier list table */
628 628
629 .tierListWrap{ 629 .tierListWrap{
630 width: 120px; 630 width: 120px;
631 height: auto; 631 height: auto;
632 float: left; 632 float: left;
633 } 633 }
634 .tierListHead{ 634 .tierListHead{
635 width: 100%; 635 width: 100%;
636 padding: 5px; 636 padding: 5px;
637 background-color: #f3f3f3; 637 background-color: #f3f3f3;
638 border: 1px solid #ddd; 638 border: 1px solid #ddd;
639 border-right: none; 639 border-right: none;
640 } 640 }
641 .tierListBody{ 641 .tierListBody{
642 width: 100%; 642 width: 100%;
643 padding: 5px; 643 padding: 5px;
644 border: 1px solid #ddd; 644 border: 1px solid #ddd;
645 border-top: none; 645 border-top: none;
646 border-right: none; 646 border-right: none;
647 } 647 }
648 .minTierSpan{ 648 .minTierSpan{
649 color: #449d44; 649 color: #449d44;
650 font-weight: bold; 650 font-weight: bold;
651 font-size: 11px; 651 font-size: 11px;
652 } 652 }
653 .maxTierSpan{ 653 .maxTierSpan{
654 color: #c9302c; 654 color: #c9302c;
655 font-style: italic; 655 font-style: italic;
656 font-size: 11px; 656 font-size: 11px;
657 font-weight: bold; 657 font-weight: bold;
658 } 658 }
659 .tierHeadingSpan{ 659 .tierHeadingSpan{
660 font-size: 11px; 660 font-size: 11px;
661 color: #222; 661 color: #222;
662 font-weight: bold; 662 font-weight: bold;
663 } 663 }
664 .tierListHead input{ 664 .tierListHead input{
665 width: 50px; 665 width: 50px;
666 height: 24px; 666 height: 24px;
667 } 667 }
668 .addTierBtn{ 668 .addTierBtn{
669 color: #fff; 669 color: #fff;
670 background-color: #2196f3; 670 background-color: #2196f3;
671 border: none; 671 border: none;
672 padding: 1px 5px; 672 padding: 1px 5px;
673 } 673 }
674 .deleteTierIcon{ 674 .deleteTierIcon{
675 color: #fff; 675 color: #fff;
676 background-color: #c9302c; 676 background-color: #c9302c;
677 padding: 5px; 677 padding: 5px;
678 border-radius: 3px; 678 border-radius: 3px;
679 cursor: pointer; 679 cursor: pointer;
680 } 680 }
681 681
682 .customToogle { 682 .customToogle {
683 padding: 2px 6px !important; 683 padding: 2px 6px !important;
684 height: auto !important; 684 height: auto !important;
685 min-height: 28px !important; 685 min-height: 28px !important;
686 686
687 } 687 }
688 688
689 .myLoader{ 689 .myLoader{
690 width: 100%; 690 width: 100%;
691 height: 100%; 691 height: 100%;
692 position: fixed; 692 position: fixed;
693 z-index: 9999; 693 z-index: 9999;
694 top: 0; 694 top: 0;
695 left: 0; 695 left: 0;
696 text-align: center; 696 text-align: center;
697 background-color: rgba(0, 0, 0, 0.2); 697 background-color: rgba(0, 0, 0, 0.2);
698 } 698 }
699 .myLoader img{ 699 .myLoader img{
700 position: relative; 700 position: relative;
701 top: calc(50% - 25px); 701 top: calc(50% - 25px);
702 } 702 }
703 .customErrorInput{ 703 .customErrorInput{
704 background-color: rgb(251, 227, 228); 704 background-color: rgb(251, 227, 228);
705 border: 1px solid #fbc2c4; 705 border: 1px solid #fbc2c4;
706 color: #8a1f11; 706 color: #8a1f11;
707 } 707 }
708 .customErrorMessage{ 708 .customErrorMessage{
709 color: #8a1f11; 709 color: #8a1f11;
710 font-weight: bold; 710 font-weight: bold;
711 } 711 }
712 .ui-datepicker .ui-widget-header{ 712 .ui-datepicker .ui-widget-header{
713 background-image: none !important; 713 background-image: none !important;
714 } 714 }
715 .recordCountSelect{ 715 .recordCountSelect{
716 background-color: #fff; 716 background-color: #fff;
717 } 717 }
718 .exportBtn{ 718 .exportBtn{
719 margin-top: 20px; 719 margin-top: 20px;
720 } 720 }
721 .select2-container .select2-choice{ 721 .select2-container .select2-choice{
722 height: 34px !important; 722 height: 34px !important;
723 padding: 6px 12px !important; 723 padding: 6px 12px !important;
724 border: 1px solid #ccc !important; 724 border: 1px solid #ccc !important;
725 background-image: none !important; 725 background-image: none !important;
726 } 726 }
727 .select2-container .select2-choice .select2-arrow{ 727 .select2-container .select2-choice .select2-arrow{
728 border-left: none !important; 728 border-left: none !important;
729 background: transparent !important; 729 background: transparent !important;
730 } 730 }
731 .select2-container .select2-choice{ 731 .select2-container .select2-choice{
732 padding: 2px 12px !important; 732 padding: 2px 12px !important;
733 } 733 }
734 734
735 735
736 .blackOption{ 736 .blackOption{
737 color: #000; 737 color: #000;
738 background-color: #fff; 738 background-color: #fff;
739 } 739 }
740 .blueOption{ 740 .blueOption{
741 color: #1c84c6; 741 color: #1c84c6;
742 background-color: #fff; 742 background-color: #fff;
743 } 743 }
744 .greenOption{ 744 .greenOption{
745 color: #419641; 745 color: #419641;
746 background-color: #fff; 746 background-color: #fff;
747 } 747 }
748 .redOption{ 748 .redOption{
749 color: #ed5565; 749 color: #ed5565;
750 background-color: #fff; 750 background-color: #fff;
751 } 751 }
752 .yellowOption{ 752 .yellowOption{
753 color: #ff9900; 753 color: #ff9900;
754 background-color: #fff; 754 background-color: #fff;
755 } 755 }
756 .colorfulSelectbox, .colorfulSelectbox:focus, .colorfulSelectbox:hover{ 756 .colorfulSelectbox, .colorfulSelectbox:focus, .colorfulSelectbox:hover{
757 color: #fff; 757 color: #fff;
758 text-align: center !important; 758 text-align: center !important;
759 outline: none !important; 759 outline: none !important;
760 } 760 }
761 .nvd3-svg{ 761 .nvd3-svg{
762 text-transform: capitalize; 762 text-transform: capitalize;
763 } 763 }
764 764
765 /*--Highlight today date--*/ 765 /*--Highlight today date--*/
766 .ui-datepicker-today { 766 .ui-datepicker-today {
767 background: lightgray !important; 767 background: lightgray !important;
768 } 768 }
769 /*.ui-datepicker-current-day { 769 /*.ui-datepicker-current-day {
770 background: #999 !important; 770 background: #999 !important;
771 }*/ 771 }*/
772 772
773 @media (min-width: 1700px){ 773 @media (min-width: 1700px){
774 .margin-media{ 774 .margin-media{
775 width: 130px !important; 775 width: 130px !important;
776 } 776 }
777 } 777 }
778
779 .nv-series:last-child > .nv-legend-symbol{
780 display: none !important;
781 }
782 .nv-series:nth-child(6) > .nv-legend-symbol{
783 display: none !important;
784 }
app/partials/analytics/analytics.controller.js
1 'use strict'; 1 'use strict';
2 angular.module('acufuel') 2 angular.module('acufuel')
3 .controller('analyticsController', ['$scope', 'analyticsService', function($scope, analyticsService) { 3 .controller('analyticsController', ['$scope', 'analyticsService', function($scope, analyticsService) {
4 4
5 5
6 // Sand Signika Overview without drill down -KD 6 // Sand Signika Overview without drill down -KD
7 /* $scope.getAllRegionalPap = function() { 7 /* $scope.getAllRegionalPap = function() {
8 $scope.flag=true; 8 $scope.flag=true;
9 $scope.stateList = [{region:'Alabama',code:'AL'},{region:'Alaska',code:'AK'},{region:'Arizona',code:'AZ'},{region:'Arkansas',code:'AR'}, 9 $scope.stateList = [{region:'Alabama',code:'AL'},{region:'Alaska',code:'AK'},{region:'Arizona',code:'AZ'},{region:'Arkansas',code:'AR'},
10 {region:'California',code:'CA' },{region:'Colorado',code:'CO'},{region:'Connecticut',code:'CT'},{region:'Delaware',code:'DE'}, 10 {region:'California',code:'CA' },{region:'Colorado',code:'CO'},{region:'Connecticut',code:'CT'},{region:'Delaware',code:'DE'},
11 {region:'Florida' ,code:'FL'},{region:'Georgia' ,code:'GA'},{region:'Hawaii' ,code:'HI'},{region:'Idaho' ,code:'ID'}, 11 {region:'Florida' ,code:'FL'},{region:'Georgia' ,code:'GA'},{region:'Hawaii' ,code:'HI'},{region:'Idaho' ,code:'ID'},
12 {region:'Illinois',code:'IL'},{region:'Indiana' ,code:'IN'},{region:'Iowa' ,code:'IA'},{region:'Kansas' ,code:'KS'}, 12 {region:'Illinois',code:'IL'},{region:'Indiana' ,code:'IN'},{region:'Iowa' ,code:'IA'},{region:'Kansas' ,code:'KS'},
13 {region:'Kentucky' ,code:'KY'},{region:'Louisiana' ,code:'LA'},{region:'Maine' ,code:'ME'},{region:'Maryland' ,code:'MD'}, 13 {region:'Kentucky' ,code:'KY'},{region:'Louisiana' ,code:'LA'},{region:'Maine' ,code:'ME'},{region:'Maryland' ,code:'MD'},
14 {region:'Massachusetts' ,code:'MA'},{region:'Michigan' ,code:'MI'},{region:'Minnesota' ,code:'MN'}, 14 {region:'Massachusetts' ,code:'MA'},{region:'Michigan' ,code:'MI'},{region:'Minnesota' ,code:'MN'},
15 {region:'Mississippi' ,code:'MS'},{region:'Missouri' ,code:'MO'},{region:'Montana',code:'MT'},{region:'Nebraska' ,code:'NE'}, 15 {region:'Mississippi' ,code:'MS'},{region:'Missouri' ,code:'MO'},{region:'Montana',code:'MT'},{region:'Nebraska' ,code:'NE'},
16 {region:'Nevada' ,code:'NV'},{region:'New Hampshire' ,code:'NH'},{region:'New Jersey' ,code:'NJ'},{region:'New Mexico' ,code:'NM'}, 16 {region:'Nevada' ,code:'NV'},{region:'New Hampshire' ,code:'NH'},{region:'New Jersey' ,code:'NJ'},{region:'New Mexico' ,code:'NM'},
17 {region:'New York' ,code:'NY'},{region:'North Carolina' ,code:'NC'},{region:'North Dakota' ,code:'ND'},{region:'Ohio' ,code:'OH'}, 17 {region:'New York' ,code:'NY'},{region:'North Carolina' ,code:'NC'},{region:'North Dakota' ,code:'ND'},{region:'Ohio' ,code:'OH'},
18 {region:'Oklahoma' ,code:'OK'},{region:'Oregon' ,code:'OR'},{region:'Pennsylvania',code:'PA'},{region:'Rhode Island' ,code:'RI'}, 18 {region:'Oklahoma' ,code:'OK'},{region:'Oregon' ,code:'OR'},{region:'Pennsylvania',code:'PA'},{region:'Rhode Island' ,code:'RI'},
19 {region:'South Carolina' ,code:'SC'},{region:'South Dakota' ,code:'SD'},{region:'Tennessee' ,code:'TN'},{region:'Texas' ,code:'TX'}, 19 {region:'South Carolina' ,code:'SC'},{region:'South Dakota' ,code:'SD'},{region:'Tennessee' ,code:'TN'},{region:'Texas' ,code:'TX'},
20 {region:'Utah' ,code:'UT'},{region:'Vermont' ,code:'VT'},{region:'Virginia' ,code:'VA'},{region:'Washington' ,code:'WA'}, 20 {region:'Utah' ,code:'UT'},{region:'Vermont' ,code:'VT'},{region:'Virginia' ,code:'VA'},{region:'Washington' ,code:'WA'},
21 {region:'West Virginia' ,code:'WV'},{region:'Wisconsin' ,code:'WI'},{region:'Wyoming',code:'WY'}] 21 {region:'West Virginia' ,code:'WV'},{region:'Wisconsin' ,code:'WI'},{region:'Wyoming',code:'WY'}]
22 22
23 analyticsService.getAllRPP().then(function(result) { 23 analyticsService.getAllRPP().then(function(result) {
24 for (var i = 0; i < $scope.stateList.length; i++) { 24 for (var i = 0; i < $scope.stateList.length; i++) {
25 for (var j = 0; j<result.length; j++){ 25 for (var j = 0; j<result.length; j++){
26 if ($scope.stateList[i].region === result[j].region) { 26 if ($scope.stateList[i].region === result[j].region) {
27 result[j].code = $scope.stateList[i].code; 27 result[j].code = $scope.stateList[i].code;
28 result[j].averagePAP = result[j].averagePAP.toFixed(2); 28 result[j].averagePAP = result[j].averagePAP.toFixed(2);
29 } 29 }
30 } 30 }
31 } 31 }
32 $scope.flag=false; 32 $scope.flag=false;
33 // Instantiate the map 33 // Instantiate the map
34 Highcharts.mapChart('regional-pap', { 34 Highcharts.mapChart('regional-pap', {
35 35
36 chart: { 36 chart: {
37 map: 'countries/us/us-all', 37 map: 'countries/us/us-all',
38 borderWidth: 1, 38 borderWidth: 1,
39 }, 39 },
40 40
41 title: { 41 title: {
42 text: 'Regional PAP' 42 text: 'Regional PAP'
43 }, 43 },
44 44
45 exporting: { 45 exporting: {
46 sourceWidth: 600, 46 sourceWidth: 600,
47 sourceHeight: 500 47 sourceHeight: 500
48 }, 48 },
49 49
50 legend: { 50 legend: {
51 layout: 'vertical', 51 layout: 'vertical',
52 borderWidth: 0, 52 borderWidth: 0,
53 backgroundColor: 'rgba(255,255,255,0.85)', 53 backgroundColor: 'rgba(255,255,255,0.85)',
54 floating: true, 54 floating: true,
55 width:'12px', 55 width:'12px',
56 height:'200px', 56 height:'200px',
57 verticalAlign: 'bottom', 57 verticalAlign: 'bottom',
58 y: 0, 58 y: 0,
59 x: -230, 59 x: -230,
60 }, 60 },
61 61
62 mapNavigation: { 62 mapNavigation: {
63 enabled: true 63 enabled: true
64 }, 64 },
65 65
66 colorAxis: { 66 colorAxis: {
67 min: 1, 67 min: 1,
68 type: 'logarithmic', 68 type: 'logarithmic',
69 minColor: '#2b908f', 69 minColor: '#2b908f',
70 maxColor: '#000022', 70 maxColor: '#000022',
71 stops: [ 71 stops: [
72 [0, '#EFEFFF'], 72 [0, '#EFEFFF'],
73 [5, '#f45b5b'], 73 [5, '#f45b5b'],
74 [10, 'rgb(117,0,0)'] 74 [10, 'rgb(117,0,0)']
75 ] 75 ]
76 }, 76 },
77 77
78 series: [{ 78 series: [{
79 animation: { 79 animation: {
80 duration: 1000 80 duration: 1000
81 }, 81 },
82 data: result, 82 data: result,
83 joinBy: ['postal-code', 'code'], 83 joinBy: ['postal-code', 'code'],
84 dataLabels: { 84 dataLabels: {
85 enabled: true, 85 enabled: true,
86 color: '#FFFFFF', 86 color: '#FFFFFF',
87 format: '{point.code}' 87 format: '{point.code}'
88 }, 88 },
89 name: 'Data' , 89 name: 'Data' ,
90 tooltip: { 90 tooltip: {
91 pointFormat: '{point.region} : {point.averagePAP}' 91 pointFormat: '{point.region} : {point.averagePAP}'
92 }, 92 },
93 }] 93 }]
94 }); 94 });
95 }) 95 })
96 } 96 }
97 97
98 $scope.getAllRegionalPap();*/ 98 $scope.getAllRegionalPap();*/
99 99
100 100
101 //Implemented drill down chart and Now used this on 07 Sep 2018 -KD 101 //Implemented drill down chart and Now used this on 07 Sep 2018 -KD
102 102
103 /* 103 /*
104 TODO: 104 TODO:
105 - Check data labels after drilling. Label rank? New positions? 105 - Check data labels after drilling. Label rank? New positions?
106 */ 106 */
107 $scope.getAllRegionalPapDrilldown = function() { 107 $scope.getAllRegionalPapDrilldown = function() {
108 $scope.flag=true;//for spinner 108 $scope.flag=true;//for spinner
109 var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); 109 var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']);
110 var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); 110 var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline');
111 // Some responsiveness 111 // Some responsiveness
112 //var small = $('#container').width() < 400; 112 //var small = $('#container').width() < 400;
113 113
114 analyticsService.getAllRPP().then(function(result) { 114 analyticsService.getAllRPP().then(function(result) {
115 for (var i = 0; i < data.length; i++) { 115 for (var i = 0; i < data.length; i++) {
116 for (var j = 0; j<result.length; j++){ 116 for (var j = 0; j<result.length; j++){
117 if (data[i].name === result[j].region) { 117 if (data[i].name === result[j].region) {
118 118
119 data[i].value = result[j].averagePAP.toFixed(2); 119 data[i].value = result[j].averagePAP.toFixed(2);
120 120
121 } 121 }
122 } 122 }
123 123
124 } 124 }
125 125
126 $.each(data, function (i) { 126 $.each(data, function (i) {
127 this.drilldown = this.properties['hc-key']; 127 this.drilldown = this.properties['hc-key'];
128 this.value = this.value; 128 this.value = this.value;
129 }); 129 });
130 130
131 $scope.flag=false; 131 $scope.flag=false;
132 // Instantiate the map 132 // Instantiate the map
133 Highcharts.mapChart('container', { 133 Highcharts.mapChart('container', {
134 chart: { 134 chart: {
135 events: { 135 events: {
136 drilldown: function (e) { 136 drilldown: function (e) {
137 if (!e.seriesOptions) { 137 if (!e.seriesOptions) {
138 var chart = this, 138 var chart = this,
139 mapKey = 'countries/us/' + e.point.drilldown + '-all', 139 mapKey = 'countries/us/' + e.point.drilldown + '-all',
140 140
141 // Handle error, the timeout is cleared on success 141 // Handle error, the timeout is cleared on success
142 fail = setTimeout(function () { 142 fail = setTimeout(function () {
143 if (!Highcharts.maps[mapKey]) { 143 if (!Highcharts.maps[mapKey]) {
144 chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name); 144 chart.showLoading('<i class="icon-frown"></i> Failed loading ' + e.point.name);
145 fail = setTimeout(function () { 145 fail = setTimeout(function () {
146 chart.hideLoading(); 146 chart.hideLoading();
147 }, 1000); 147 }, 1000);
148 } 148 }
149 }, 3000); 149 }, 3000);
150 150
151 // Show the spinner 151 // Show the spinner
152 chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner 152 chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner
153 153
154 // Load the drilldown map 154 // Load the drilldown map
155 $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function () { 155 $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function () {
156 156
157 var region = e.point.name; 157 var region = e.point.name;
158 //called the get api region wise 158 //called the get api region wise
159 analyticsService.getRPP(region).then(function(result) { 159 analyticsService.getRPP(region).then(function(result) {
160 160
161 console.log("===region====",region,"====result====",result)
161 data = Highcharts.geojson(Highcharts.maps[mapKey]); 162 data = Highcharts.geojson(Highcharts.maps[mapKey]);
162 163
163 for (var i = 0; i < data.length; i++) { 164 for (var i = 0; i < data.length; i++) {
164 for (var j = 0; j<result.length; j++){ 165 for (var j = 0; j<result.length; j++){
165 166
166 //delete the County word from api result to match with map data 167 //delete the County word from api result to match with map data
167 result[j].region = result[j].region.replace("County",""); 168 result[j].region = result[j].region.replace("County","");
168 169
169 if (data[i].name.trim() === result[j].region.trim()) { 170 if (data[i].name.trim() === result[j].region.trim()) {
170 171
171 data[i].value = result[j].averagePAP.toFixed(2); 172 data[i].value = result[j].averagePAP.toFixed(2);
172 173
173 } 174 }
174 } 175 }
175 176
176 } 177 }
177 }) 178 })
178 179
179 // Set a non-random bogus value 180 // Set a non-random bogus value
180 181
181 $.each(data, function (i) { 182 $.each(data, function (i) {
182 this.value = this.value; 183 this.value = this.value;
183 }); 184 });
184 185
185 // Hide loading and add series 186 // Hide loading and add series
186 chart.hideLoading(); 187 chart.hideLoading();
187 clearTimeout(fail); 188 clearTimeout(fail);
188 chart.addSeriesAsDrilldown(e.point, { 189 chart.addSeriesAsDrilldown(e.point, {
189 name: e.point.name, 190 name: e.point.name,
190 data: data, 191 data: data,
191 dataLabels: { 192 dataLabels: {
192 enabled: true, 193 enabled: true,
193 format: '{point.name}' 194 format: '{point.name}'
194 } 195 }
195 }); 196 });
196 }); 197 });
197 } 198 }
198 199
199 this.setTitle(null, { text: e.point.name }); 200 this.setTitle(null, { text: e.point.name });
200 }, 201 },
201 drillup: function () { 202 drillup: function () {
202 this.setTitle(null, { text: '' }); 203 this.setTitle(null, { text: '' });
203 } 204 }
204 } 205 }
205 }, 206 },
206 207
207 title: { 208 title: {
208 text: 'USA Map-Drilldown for Regional Pricing' 209 text: 'USA Map-Drilldown for Regional Pricing'
209 }, 210 },
210 211
211 subtitle: { 212 subtitle: {
212 text: '', 213 text: '',
213 floating: true, 214 floating: true,
214 align: 'right', 215 align: 'right',
215 y: 50, 216 y: 50,
216 style: { 217 style: {
217 fontSize: '16px' 218 fontSize: '16px'
218 } 219 }
219 }, 220 },
220 221
221 /* legend: small ? {} : { 222 /* legend: small ? {} : {
222 layout: 'vertical', 223 layout: 'vertical',
223 align: 'right', 224 align: 'right',
224 verticalAlign: 'middle' 225 verticalAlign: 'middle'
225 }, 226 },
226 227
227 colorAxis: { 228 colorAxis: {
228 min: 0, 229 min: 0,
229 minColor: '#E6E7E8', 230 minColor: '#E6E7E8',
230 maxColor: '#005645' 231 maxColor: '#005645'
231 },*/ 232 },*/
232 233
233 mapNavigation: { 234 mapNavigation: {
234 enabled: true, 235 enabled: true,
235 buttonOptions: { 236 buttonOptions: {
236 verticalAlign: 'bottom' 237 verticalAlign: 'bottom'
237 } 238 }
238 }, 239 },
239 240
240 plotOptions: { 241 plotOptions: {
241 map: { 242 map: {
242 states: { 243 states: {
243 hover: { 244 hover: {
244 color: '#EEDD66' 245 color: '#EEDD66'
245 } 246 }
246 } 247 }
247 } 248 }
248 }, 249 },
249 250
250 series: [{ 251 series: [{
251 data: data, 252 data: data,
252 name: 'USA', 253 name: 'USA',
253 dataLabels: { 254 dataLabels: {
254 enabled: true, 255 enabled: true,
255 format: '{point.properties.postal-code}' 256 format: '{point.properties.postal-code}'
256 } 257 }
257 }, { 258 }, {
258 type: 'mapline', 259 type: 'mapline',
259 data: separators, 260 data: separators,
260 color: 'silver', 261 color: 'silver',
261 enableMouseTracking: false, 262 enableMouseTracking: false,
262 animation: { 263 animation: {
263 duration: 500 264 duration: 500
264 } 265 }
265 }], 266 }],
266 267
267 drilldown: { 268 drilldown: {
268 activeDataLabelStyle: { 269 activeDataLabelStyle: {
269 color: '#FFFFFF', 270 color: '#FFFFFF',
270 textDecoration: 'none', 271 textDecoration: 'none',
271 textOutline: '1px #000000' 272 textOutline: '1px #000000'
272 }, 273 },
273 drillUpButton: { 274 drillUpButton: {
274 relativeTo: 'spacingBox', 275 relativeTo: 'spacingBox',
275 position: { 276 position: {
276 x: 0, 277 x: 0,
277 y: 60 278 y: 60
278 } 279 }
279 } 280 }
280 } 281 }
281 }); 282 });
282 }) 283 })
283 } 284 }
284 285
285 $scope.getAllRegionalPapDrilldown(); 286 $scope.getAllRegionalPapDrilldown();
286 287
287 288
288 $scope.cancelStatus = function() { 289 $scope.cancelStatus = function() {
289 $('#popup1').css('display', 'none'); 290 $('#popup1').css('display', 'none');
290 } 291 }
291 $scope.ordersCost = 0; 292 $scope.ordersCost = 0;
292 $scope.ordersCount = 0; 293 $scope.ordersCount = 0;
293 294
294 $scope.orderCostAndCount = function() { 295 $scope.orderCostAndCount = function() {
295 analyticsService.orderCostAndCount().then(function(result) { 296 analyticsService.orderCostAndCount().then(function(result) {
296 $scope.ordersCost = result.cost; 297 $scope.ordersCost = result.cost;
297 $scope.ordersCount = result.count; 298 $scope.ordersCount = result.count;
298 }) 299 })
299 } 300 }
300 301
301 $scope.drf = {}; 302 $scope.drf = {};
302 $scope.hfp = {}; 303 $scope.hfp = {};
303 $scope.cs = {}; 304 $scope.cs = {};
304 $scope.mfsValues = []; 305 $scope.mfsValues = [];
305 $scope.msfarray = []; 306 $scope.msfarray = [];
306 $scope.getMFS = function() { 307 $scope.getMFS = function() {
307 //var makeId = makeId; 308 //var makeId = makeId;
308 analyticsService.getMFS().then(function(result) { 309 analyticsService.getMFS().then(function(result) {
309 $scope.mfsValues = result; 310 $scope.mfsValues = result;
310 $scope.optionsmfs = { 311 $scope.optionsmfs = {
311 chart: { 312 chart: {
312 type: 'multiBarChart', 313 type: 'multiBarChart',
313 height: 450, 314 height: 450,
314 reduceXTicks: false, 315 reduceXTicks: false,
315 margin: { 316 margin: {
316 top: 45, 317 top: 45,
317 right: 20, 318 right: 20,
318 bottom: 45, 319 bottom: 45,
319 left: 45 320 left: 45
320 }, 321 },
321 clipEdge: true, 322 clipEdge: true,
322 //staggerLabels: true, 323 //staggerLabels: true,
323 duration: 500, 324 duration: 500,
324 stacked: false, 325 stacked: false,
325 /*color: ["#FEDFC3", "#990000", "#000099", "#009900"],*/ 326 /*color: ["#FEDFC3", "#990000", "#000099", "#009900"],*/
326 color: ["#A9A9A9", "#000099", "#990000", "#009900"], 327 color: ["#A9A9A9", "#000099", "#990000", "#009900"],
327 xAxis: { 328 xAxis: {
328 axisLabel: 'Months', 329 axisLabel: 'Months',
329 showMaxMin: false, 330 showMaxMin: false,
330 }, 331 },
331 yAxis: { 332 yAxis: {
332 axisLabel: 'Orders', 333 axisLabel: 'Orders',
333 axisLabelDistance: -20, 334 axisLabelDistance: -20,
334 tickFormat: function(d) { 335 tickFormat: function(d) {
335 return d3.format(',.1f')(d); 336 return d3.format(',.1f')(d);
336 } 337 }
337 } 338 }
338 339
339 } 340 }
340 }; 341 };
341 $scope.datamfs = $scope.mfsValues; 342 $scope.datamfs = $scope.mfsValues;
342 }) 343 })
343 } 344 }
344 345
345 $scope.orderCostAndCount(); 346 $scope.orderCostAndCount();
346 $scope.getMFS(); 347 $scope.getMFS();
347 $scope.csValues = []; 348 $scope.csValues = [];
348 $scope.getCS = function() { 349 $scope.getCS = function() {
349 //var makeId = makeId; 350 //var makeId = makeId;
350 analyticsService.getCS().then(function(result) { 351 analyticsService.getCS().then(function(result) {
351 //console.log("===customersupports===",result) 352 //console.log("===customersupports===",result)
352 $scope.csValues = result; 353 $scope.csValues = result;
353 $scope.optionscs = { 354 $scope.optionscs = {
354 chart: { 355 chart: {
355 type: 'pieChart', 356 type: 'pieChart',
356 height: 500, 357 height: 500,
357 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 358 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
358 x: function(d) { 359 x: function(d) {
359 return d.key; 360 return d.key;
360 }, 361 },
361 y: function(d) { 362 y: function(d) {
362 return d.y; 363 return d.y;
363 }, 364 },
364 showLabels: false, 365 showLabels: false,
365 segmentShowStroke: false, 366 segmentShowStroke: false,
366 animationSteps: 20, 367 animationSteps: 20,
367 animationEasing: "linear", 368 animationEasing: "linear",
368 animateScale: true, 369 animateScale: true,
369 duration: 500, 370 duration: 500,
370 labelThreshold: 0.01, 371 labelThreshold: 0.01,
371 labelSunbeamLayout: true, 372 labelSunbeamLayout: true,
372 legend: { 373 legend: {
373 margin: { 374 margin: {
374 top: 5, 375 top: 5,
375 right: 35, 376 right: 35,
376 bottom: 5, 377 bottom: 5,
377 left: 0 378 left: 0
378 } 379 }
379 } 380 }
380 } 381 }
381 }; 382 };
382 $scope.datacs = $scope.csValues; 383 $scope.datacs = $scope.csValues;
383 }) 384 })
384 } 385 }
385 386
386 $scope.getCS(); 387 $scope.getCS();
387 388
388 389
389 $scope.hfpValuesOne = {}; 390 $scope.hfpValuesOne = {};
390 $scope.hfpValuesOne.key = "JET-A Full Service"; 391 $scope.hfpValuesOne.key = "JET-A Full Service";
391 $scope.hfpValuesOne.values = []; 392 $scope.hfpValuesOne.values = [];
392 393
393 $scope.hfpValuesTwo = {}; 394 $scope.hfpValuesTwo = {};
394 $scope.hfpValuesTwo.key = "100LL Full Service"; 395 $scope.hfpValuesTwo.key = "100LL Full Service";
395 $scope.hfpValuesTwo.values = []; 396 $scope.hfpValuesTwo.values = [];
396 397
397 $scope.hfpFinalData = []; 398 $scope.hfpFinalData = [];
398 399
399 $scope.getHfpChartData = function() { 400 $scope.getHfpChartData = function() {
400 analyticsService.gethfpChart().then(function(result) { 401 analyticsService.gethfpChart().then(function(result) {
401 for(var i=0; i<result.length; i++) { 402 for(var i=0; i<result.length; i++) {
402 if(result[i].includes("JET-A Full Service") ){ 403 if(result[i].includes("JET-A Full Service") ){
403 let datePusha = result[i][0]; 404 let datePusha = result[i][0];
404 let tempValue = result[i][1].toFixed(2); 405 let tempValue = result[i][1].toFixed(2);
405 let valePusha = parseFloat(tempValue); 406 let valePusha = parseFloat(tempValue);
406 $scope.hfpValuesOne.values.push([datePusha, valePusha]) 407 $scope.hfpValuesOne.values.push([datePusha, valePusha])
407 }else if(result[i].includes("100LL Full Service") ) { 408 }else if(result[i].includes("100LL Full Service") ) {
408 let datePushb = result[i][0]; 409 let datePushb = result[i][0];
409 let tempvalePushb = result[i][1].toFixed(2); 410 let tempvalePushb = result[i][1].toFixed(2);
410 let valePushb = parseFloat(tempvalePushb); 411 let valePushb = parseFloat(tempvalePushb);
411 $scope.hfpValuesTwo.values.push([datePushb, valePushb]) 412 $scope.hfpValuesTwo.values.push([datePushb, valePushb])
412 } 413 }
413 } 414 }
414 $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo); 415 $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo);
415 // console.log('$scope.hfpFinalData', $scope.hfpFinalData); 416 // console.log('$scope.hfpFinalData', $scope.hfpFinalData);
416 417
417 var chart = nv.models.lineChart() 418 var chart = nv.models.lineChart()
418 .x(function(d) { return d[0] }) 419 .x(function(d) { return d[0] })
419 //adjusting, 100% is 1.00, not 100 as it is in the data 420 //adjusting, 100% is 1.00, not 100 as it is in the data
420 .y(function(d) { return d[1]}) 421 .y(function(d) { return d[1]})
421 .color(d3.scale.category10().range()) 422 .color(d3.scale.category10().range())
422 .useInteractiveGuideline(true) 423 .useInteractiveGuideline(true)
423 ; 424 ;
424 425
425 chart.xAxis 426 chart.xAxis
426 .tickFormat(function(d) { 427 .tickFormat(function(d) {
427 return d3.time.format('%x')(new Date(d)) 428 return d3.time.format('%x')(new Date(d))
428 }); 429 });
429 430
430 chart.yAxis 431 chart.yAxis
431 .axisLabel("PaP / Retail Price") 432 .axisLabel("PaP / Retail Price")
432 .axisLabelDistance(-5) 433 .axisLabelDistance(-5)
433 .tickFormat(d3.format(',.2f')).showMaxMin(false); 434 .tickFormat(d3.format(',.2f')).showMaxMin(false);
434 435
435 d3.select('#chart svg') 436 d3.select('#chart svg')
436 .datum($scope.hfpFinalData) 437 .datum($scope.hfpFinalData)
437 .transition().duration(500) 438 .transition().duration(500)
438 .call(chart) 439 .call(chart)
439 ; 440 ;
440 441
441 nv.utils.windowResize(chart.update); 442 nv.utils.windowResize(chart.update);
442 443
443 return chart; 444 return chart;
444 }); 445 });
445 } 446 }
446 $scope.getHfpChartData(); 447 $scope.getHfpChartData();
447 448
448 /*Date Range Filter for Historic fuel Price*/ 449 /*Date Range Filter for Historic fuel Price*/
449 $scope.submitDateHfp = function() { 450 $scope.submitDateHfp = function() {
450 451
451 $scope.hfpValuesFirst = {}; 452 $scope.hfpValuesFirst = {};
452 $scope.hfpValuesFirst.key = "JET-A Full Service"; 453 $scope.hfpValuesFirst.key = "JET-A Full Service";
453 $scope.hfpValuesFirst.values = []; 454 $scope.hfpValuesFirst.values = [];
454 455
455 $scope.hfpValuesSecond = {}; 456 $scope.hfpValuesSecond = {};
456 $scope.hfpValuesSecond.key = "100LL Full Service"; 457 $scope.hfpValuesSecond.key = "100LL Full Service";
457 $scope.hfpValuesSecond.values = []; 458 $scope.hfpValuesSecond.values = [];
458 459
459 $scope.hfpRangeData = []; 460 $scope.hfpRangeData = [];
460 461
461 if ($scope.hfp.fromDate === undefined) { 462 if ($scope.hfp.fromDate === undefined) {
462 463
463 $scope.fillForm = true; 464 $scope.fillForm = true;
464 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { 465 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') {
465 $scope.fillForm = false; 466 $scope.fillForm = false;
466 var today = new Date(); 467 var today = new Date();
467 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59'; 468 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59';
468 //from date format 469 //from date format
469 $scope.dat1 = $scope.hfp.fromDate; 470 $scope.dat1 = $scope.hfp.fromDate;
470 $scope.fd1 = $scope.dat1.split("/").reverse(); 471 $scope.fd1 = $scope.dat1.split("/").reverse();
471 $scope.tmp = $scope.fd1[2]; 472 $scope.tmp = $scope.fd1[2];
472 $scope.fd1[2] = $scope.fd1[1]; 473 $scope.fd1[2] = $scope.fd1[1];
473 $scope.fd1[1] = $scope.tmp; 474 $scope.fd1[1] = $scope.tmp;
474 $scope.fd = $scope.fd1.join("-"); 475 $scope.fd = $scope.fd1.join("-");
475 // console.log("===date====",$scope.fd,"===dad====",DefaultToDate) 476 // console.log("===date====",$scope.fd,"===dad====",DefaultToDate)
476 analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { 477 analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) {
477 // console.log("===date range===",$scope.fd,DefaultToDate) 478 // console.log("===date range===",$scope.fd,DefaultToDate)
478 for(var i=0; i<result.length; i++) { 479 for(var i=0; i<result.length; i++) {
479 if(result[i].includes("JET-A Full Service") ){ 480 if(result[i].includes("JET-A Full Service") ){
480 let datePusha = result[i][0]; 481 let datePusha = result[i][0];
481 let tempValue = result[i][1].toFixed(2); 482 let tempValue = result[i][1].toFixed(2);
482 let valePusha = parseFloat(tempValue); 483 let valePusha = parseFloat(tempValue);
483 $scope.hfpValuesFirst.values.push([datePusha, valePusha]) 484 $scope.hfpValuesFirst.values.push([datePusha, valePusha])
484 }else if(result[i].includes("100LL Full Service") ) { 485 }else if(result[i].includes("100LL Full Service") ) {
485 let datePushb = result[i][0]; 486 let datePushb = result[i][0];
486 let tempvalePushb = result[i][1].toFixed(2); 487 let tempvalePushb = result[i][1].toFixed(2);
487 let valePushb = parseFloat(tempvalePushb); 488 let valePushb = parseFloat(tempvalePushb);
488 $scope.hfpValuesSecond.values.push([datePushb, valePushb]) 489 $scope.hfpValuesSecond.values.push([datePushb, valePushb])
489 } 490 }
490 } 491 }
491 $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); 492 $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond);
492 //console.log('$scope.hfpRangeData', $scope.hfpRangeData); 493 //console.log('$scope.hfpRangeData', $scope.hfpRangeData);
493 494
494 var chart = nv.models.lineChart() 495 var chart = nv.models.lineChart()
495 .x(function(d) { if(d.length >0){return d[0]}}) 496 .x(function(d) { if(d.length >0){return d[0]}})
496 //adjusting, 100% is 1.00, not 100 as it is in the data 497 //adjusting, 100% is 1.00, not 100 as it is in the data
497 .y(function(d) { return d[1]}) 498 .y(function(d) { return d[1]})
498 .color(d3.scale.category10().range()) 499 .color(d3.scale.category10().range())
499 .useInteractiveGuideline(true) 500 .useInteractiveGuideline(true)
500 ; 501 ;
501 502
502 chart.xAxis 503 chart.xAxis
503 .tickFormat(function(d) { 504 .tickFormat(function(d) {
504 return d3.time.format('%x')(new Date(d)) 505 return d3.time.format('%x')(new Date(d))
505 }); 506 });
506 507
507 chart.yAxis 508 chart.yAxis
508 .axisLabel("PaP / Retail Price") 509 .axisLabel("PaP / Retail Price")
509 .axisLabelDistance(-5) 510 .axisLabelDistance(-5)
510 .tickFormat(d3.format(',.2f')).showMaxMin(false); 511 .tickFormat(d3.format(',.2f')).showMaxMin(false);
511 512
512 d3.select('#chart svg') 513 d3.select('#chart svg')
513 .datum($scope.hfpRangeData) 514 .datum($scope.hfpRangeData)
514 .transition().duration(500) 515 .transition().duration(500)
515 .call(chart) 516 .call(chart)
516 ; 517 ;
517 518
518 nv.utils.windowResize(chart.update); 519 nv.utils.windowResize(chart.update);
519 520
520 return chart; 521 return chart;
521 }) 522 })
522 523
523 524
524 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) { 525 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) {
525 $scope.fillForm = false; 526 $scope.fillForm = false;
526 //from date format 527 //from date format
527 $scope.dat1 = $scope.hfp.fromDate; 528 $scope.dat1 = $scope.hfp.fromDate;
528 $scope.fd1 = $scope.dat1.split("/").reverse(); 529 $scope.fd1 = $scope.dat1.split("/").reverse();
529 $scope.tmp = $scope.fd1[2]; 530 $scope.tmp = $scope.fd1[2];
530 $scope.fd1[2] = $scope.fd1[1]; 531 $scope.fd1[2] = $scope.fd1[1];
531 $scope.fd1[1] = $scope.tmp; 532 $scope.fd1[1] = $scope.tmp;
532 $scope.fd = $scope.fd1.join("-"); 533 $scope.fd = $scope.fd1.join("-");
533 //to date format 534 //to date format
534 $scope.dat2 = $scope.hfp.toDate; 535 $scope.dat2 = $scope.hfp.toDate;
535 $scope.td1 = $scope.dat2.split("/").reverse(); 536 $scope.td1 = $scope.dat2.split("/").reverse();
536 $scope.tmp1 = $scope.td1[2]; 537 $scope.tmp1 = $scope.td1[2];
537 $scope.td1[2] = $scope.td1[1]; 538 $scope.td1[2] = $scope.td1[1];
538 $scope.td1[1] = $scope.tmp1; 539 $scope.td1[1] = $scope.tmp1;
539 $scope.td = $scope.td1.join("-") + " " + '23:59:59'; 540 $scope.td = $scope.td1.join("-") + " " + '23:59:59';
540 // console.log("===both dates==",$scope.td) 541 // console.log("===both dates==",$scope.td)
541 analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { 542 analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) {
542 //console.log("===date range22===",result); 543 //console.log("===date range22===",result);
543 for(var i=0; i<result.length; i++) { 544 for(var i=0; i<result.length; i++) {
544 if(result[i].includes("JET-A Full Service") ){ 545 if(result[i].includes("JET-A Full Service") ){
545 let datePusha = result[i][0]; 546 let datePusha = result[i][0];
546 let tempValue = result[i][1].toFixed(2); 547 let tempValue = result[i][1].toFixed(2);
547 let valePusha = parseFloat(tempValue); 548 let valePusha = parseFloat(tempValue);
548 $scope.hfpValuesFirst.values.push([datePusha, valePusha]) 549 $scope.hfpValuesFirst.values.push([datePusha, valePusha])
549 }else if(result[i].includes("100LL Full Service") ) { 550 }else if(result[i].includes("100LL Full Service") ) {
550 let datePushb = result[i][0]; 551 let datePushb = result[i][0];
551 let tempvalePushb = result[i][1].toFixed(2); 552 let tempvalePushb = result[i][1].toFixed(2);
552 let valePushb = parseFloat(tempvalePushb); 553 let valePushb = parseFloat(tempvalePushb);
553 $scope.hfpValuesSecond.values.push([datePushb, valePushb]) 554 $scope.hfpValuesSecond.values.push([datePushb, valePushb])
554 } 555 }
555 } 556 }
556 $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond); 557 $scope.hfpRangeData.push($scope.hfpValuesFirst, $scope.hfpValuesSecond);
557 // console.log('$scope.hfpRangeData', $scope.hfpRangeData); 558 // console.log('$scope.hfpRangeData', $scope.hfpRangeData);
558 559
559 var chart = nv.models.lineChart() 560 var chart = nv.models.lineChart()
560 .x(function(d) { if(d.length >0){return d[0] }}) 561 .x(function(d) { if(d.length >0){return d[0] }})
561 //adjusting, 100% is 1.00, not 100 as it is in the data 562 //adjusting, 100% is 1.00, not 100 as it is in the data
562 .y(function(d) { return d[1]}) 563 .y(function(d) { return d[1]})
563 .color(d3.scale.category10().range()) 564 .color(d3.scale.category10().range())
564 .useInteractiveGuideline(true) 565 .useInteractiveGuideline(true)
565 ; 566 ;
566 567
567 chart.xAxis 568 chart.xAxis
568 .tickFormat(function(d) { 569 .tickFormat(function(d) {
569 return d3.time.format('%x')(new Date(d)) 570 return d3.time.format('%x')(new Date(d))
570 }); 571 });
571 572
572 chart.yAxis 573 chart.yAxis
573 .axisLabel("PaP / Retail Price") 574 .axisLabel("PaP / Retail Price")
574 .axisLabelDistance(-5) 575 .axisLabelDistance(-5)
575 .tickFormat(d3.format(',.2f')).showMaxMin(false); 576 .tickFormat(d3.format(',.2f')).showMaxMin(false);
576 577
577 d3.select('#chart svg') 578 d3.select('#chart svg')
578 .datum($scope.hfpRangeData) 579 .datum($scope.hfpRangeData)
579 .transition().duration(500) 580 .transition().duration(500)
580 .call(chart) 581 .call(chart)
581 ; 582 ;
582 583
583 nv.utils.windowResize(chart.update); 584 nv.utils.windowResize(chart.update);
584 585
585 return chart; 586 return chart;
586 }) 587 })
587 588
588 } else { 589 } else {
589 $scope.fillForm = true; 590 $scope.fillForm = true;
590 } 591 }
591 592
592 593
593 } 594 }
594 595
595 596
596 /*Date Range Filter for Monthly fuel Sales*/ 597 /*Date Range Filter for Monthly fuel Sales*/
597 $scope.submitDate = function() { 598 $scope.submitDate = function() {
598 if ($scope.drf.fromDate === undefined) { 599 if ($scope.drf.fromDate === undefined) {
599 $scope.fillForm = true; 600 $scope.fillForm = true;
600 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') { 601 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') {
601 $scope.fillForm = false; 602 $scope.fillForm = false;
602 var today = new Date(); 603 var today = new Date();
603 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); 604 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2);
604 //from date format 605 //from date format
605 $scope.dat1 = $scope.drf.fromDate; 606 $scope.dat1 = $scope.drf.fromDate;
606 $scope.fd1 = $scope.dat1.split("/").reverse(); 607 $scope.fd1 = $scope.dat1.split("/").reverse();
607 $scope.tmp = $scope.fd1[2]; 608 $scope.tmp = $scope.fd1[2];
608 $scope.fd1[2] = $scope.fd1[1]; 609 $scope.fd1[2] = $scope.fd1[1];
609 $scope.fd1[1] = $scope.tmp; 610 $scope.fd1[1] = $scope.tmp;
610 $scope.fd = $scope.fd1.join("-"); 611 $scope.fd = $scope.fd1.join("-");
611 analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) { 612 analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) {
612 $scope.datamfs = []; 613 $scope.datamfs = [];
613 $scope.datamfs = result; 614 $scope.datamfs = result;
614 }) 615 })
615 616
616 analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) { 617 analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) {
617 $scope.ordersCost = result.cost; 618 $scope.ordersCost = result.cost;
618 $scope.ordersCount = result.count; 619 $scope.ordersCount = result.count;
619 }) 620 })
620 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) { 621 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) {
621 $scope.fillForm = false; 622 $scope.fillForm = false;
622 //from date format 623 //from date format
623 $scope.dat1 = $scope.drf.fromDate; 624 $scope.dat1 = $scope.drf.fromDate;
624 $scope.fd1 = $scope.dat1.split("/").reverse(); 625 $scope.fd1 = $scope.dat1.split("/").reverse();
625 $scope.tmp = $scope.fd1[2]; 626 $scope.tmp = $scope.fd1[2];
626 $scope.fd1[2] = $scope.fd1[1]; 627 $scope.fd1[2] = $scope.fd1[1];
627 $scope.fd1[1] = $scope.tmp; 628 $scope.fd1[1] = $scope.tmp;
628 $scope.fd = $scope.fd1.join("-"); 629 $scope.fd = $scope.fd1.join("-");
629 $scope.dat2 = $scope.drf.toDate; 630 $scope.dat2 = $scope.drf.toDate;
630 $scope.td1 = $scope.dat2.split("/").reverse(); 631 $scope.td1 = $scope.dat2.split("/").reverse();
631 $scope.tmp1 = $scope.td1[2]; 632 $scope.tmp1 = $scope.td1[2];
632 $scope.td1[2] = $scope.td1[1]; 633 $scope.td1[2] = $scope.td1[1];
633 $scope.td1[1] = $scope.tmp1; 634 $scope.td1[1] = $scope.tmp1;
634 $scope.td = $scope.td1.join("-"); 635 $scope.td = $scope.td1.join("-");
635 636
636 analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) { 637 analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) {
637 $scope.datamfs = []; 638 $scope.datamfs = [];
638 $scope.datamfs = result; 639 $scope.datamfs = result;
639 }) 640 })
640 641
641 analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) { 642 analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) {
642 $scope.ordersCost = result.cost; 643 $scope.ordersCost = result.cost;
643 $scope.ordersCount = result.count; 644 $scope.ordersCount = result.count;
644 }) 645 })
645 646
646 } else { 647 } else {
647 $scope.fillForm = true; 648 $scope.fillForm = true;
648 } 649 }
649 650
650 651
651 } 652 }
652 653
653 654
654 655
655 656
656 /*Date Range Filter for Customer Sources*/ 657 /*Date Range Filter for Customer Sources*/
657 $scope.submitDateCs = function() { 658 $scope.submitDateCs = function() {
658 if ($scope.cs.fromDate === undefined) { 659 if ($scope.cs.fromDate === undefined) {
659 660
660 $scope.fillForm = true; 661 $scope.fillForm = true;
661 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') { 662 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') {
662 $scope.fillForm = false; 663 $scope.fillForm = false;
663 var today = new Date(); 664 var today = new Date();
664 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); 665 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2);
665 //from date format 666 //from date format
666 $scope.dat1 = $scope.cs.fromDate; 667 $scope.dat1 = $scope.cs.fromDate;
667 $scope.fd1 = $scope.dat1.split("/").reverse(); 668 $scope.fd1 = $scope.dat1.split("/").reverse();
668 $scope.tmp = $scope.fd1[2]; 669 $scope.tmp = $scope.fd1[2];
669 $scope.fd1[2] = $scope.fd1[1]; 670 $scope.fd1[2] = $scope.fd1[1];
670 $scope.fd1[1] = $scope.tmp; 671 $scope.fd1[1] = $scope.tmp;
671 $scope.fd = $scope.fd1.join("-"); 672 $scope.fd = $scope.fd1.join("-");
672 analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) { 673 analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) {
673 $scope.csValues = result; 674 $scope.csValues = result;
674 $scope.optionscs = { 675 $scope.optionscs = {
675 chart: { 676 chart: {
676 type: 'pieChart', 677 type: 'pieChart',
677 height: 500, 678 height: 500,
678 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 679 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
679 x: function(d) { 680 x: function(d) {
680 return d.key; 681 return d.key;
681 }, 682 },
682 y: function(d) { 683 y: function(d) {
683 return d.y; 684 return d.y;
684 }, 685 },
685 showLabels: false, 686 showLabels: false,
686 segmentShowStroke: false, 687 segmentShowStroke: false,
687 animationSteps: 20, 688 animationSteps: 20,
688 animationEasing: "linear", 689 animationEasing: "linear",
689 animateScale: true, 690 animateScale: true,
690 duration: 500, 691 duration: 500,
691 labelThreshold: 0.01, 692 labelThreshold: 0.01,
692 labelSunbeamLayout: true, 693 labelSunbeamLayout: true,
693 legend: { 694 legend: {
694 margin: { 695 margin: {
695 top: 5, 696 top: 5,
696 right: 35, 697 right: 35,
697 bottom: 5, 698 bottom: 5,
698 left: 0 699 left: 0
699 } 700 }
700 } 701 }
701 } 702 }
702 }; 703 };
703 $scope.datacs = $scope.csValues; 704 $scope.datacs = $scope.csValues;
704 }) 705 })
705 706
706 707
707 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) { 708 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) {
708 $scope.fillForm = false; 709 $scope.fillForm = false;
709 //from date format 710 //from date format
710 $scope.dat1 = $scope.cs.fromDate; 711 $scope.dat1 = $scope.cs.fromDate;
711 $scope.fd1 = $scope.dat1.split("/").reverse(); 712 $scope.fd1 = $scope.dat1.split("/").reverse();
712 $scope.tmp = $scope.fd1[2]; 713 $scope.tmp = $scope.fd1[2];
713 $scope.fd1[2] = $scope.fd1[1]; 714 $scope.fd1[2] = $scope.fd1[1];
714 $scope.fd1[1] = $scope.tmp; 715 $scope.fd1[1] = $scope.tmp;
715 $scope.fd = $scope.fd1.join("-"); 716 $scope.fd = $scope.fd1.join("-");
716 //to date format 717 //to date format
717 $scope.dat2 = $scope.cs.toDate; 718 $scope.dat2 = $scope.cs.toDate;
718 $scope.td1 = $scope.dat2.split("/").reverse(); 719 $scope.td1 = $scope.dat2.split("/").reverse();
719 $scope.tmp1 = $scope.td1[2]; 720 $scope.tmp1 = $scope.td1[2];
720 $scope.td1[2] = $scope.td1[1]; 721 $scope.td1[2] = $scope.td1[1];
721 $scope.td1[1] = $scope.tmp1; 722 $scope.td1[1] = $scope.tmp1;
722 $scope.td = $scope.td1.join("-"); 723 $scope.td = $scope.td1.join("-");
723 724
724 analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) { 725 analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) {
725 $scope.csValues = result; 726 $scope.csValues = result;
726 $scope.optionscs = { 727 $scope.optionscs = {
727 chart: { 728 chart: {
728 type: 'pieChart', 729 type: 'pieChart',
729 height: 500, 730 height: 500,
730 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 731 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
731 x: function(d) { 732 x: function(d) {
732 return d.key; 733 return d.key;
733 }, 734 },
734 y: function(d) { 735 y: function(d) {
735 return d.y; 736 return d.y;
736 }, 737 },
737 showLabels: false, 738 showLabels: false,
738 segmentShowStroke: false, 739 segmentShowStroke: false,
739 animationSteps: 20, 740 animationSteps: 20,
740 animationEasing: "linear", 741 animationEasing: "linear",
741 animateScale: true, 742 animateScale: true,
742 duration: 500, 743 duration: 500,
743 labelThreshold: 0.01, 744 labelThreshold: 0.01,
744 labelSunbeamLayout: true, 745 labelSunbeamLayout: true,
745 legend: { 746 legend: {
746 margin: { 747 margin: {
747 top: 5, 748 top: 5,
748 right: 35, 749 right: 35,
749 bottom: 5, 750 bottom: 5,
750 left: 0 751 left: 0
751 } 752 }
752 } 753 }
753 } 754 }
754 }; 755 };
755 $scope.datacs = $scope.csValues; 756 $scope.datacs = $scope.csValues;
756 }) 757 })
757 758
758 } else { 759 } else {
759 $scope.fillForm = true; 760 $scope.fillForm = true;
760 } 761 }
761 762
762 763
763 } 764 }
764 765
765 766
766 }]); 767 }]);
app/partials/analytics/analytics.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('analyticsService', ['$q', '$http', 'BASE_URL',analyticsService]); 4 .service('analyticsService', ['$q', '$http', 'BASE_URL',analyticsService]);
5 5
6 function analyticsService($q, $http, BASE_URL) { 6 function analyticsService($q, $http, BASE_URL) {
7 var temp = {}; 7 var temp = {};
8 8
9 9
10 this.getMFS = function(){ 10 this.getMFS = function(){
11 var deferred = $q.defer(); 11 var deferred = $q.defer();
12 $http({ 12 $http({
13 method : 'GET', 13 method : 'GET',
14 url : BASE_URL.url + '/fuelOrder/analytics' 14 url : BASE_URL.url + '/fuelOrder/analytics'
15 }) 15 })
16 .then(function (result){ 16 .then(function (result){
17 deferred.resolve(result.data); 17 deferred.resolve(result.data);
18 },function (result){ 18 },function (result){
19 console.log(result) 19 console.log(result)
20 deferred.resolve(result.data); 20 deferred.resolve(result.data);
21 }) 21 })
22 return deferred.promise; 22 return deferred.promise;
23 } 23 }
24 24
25 this.orderCostAndCount = function(){ 25 this.orderCostAndCount = function(){
26 var deferred = $q.defer(); 26 var deferred = $q.defer();
27 $http({ 27 $http({
28 method : 'GET', 28 method : 'GET',
29 // url : BASE_URL.url +'/fuelOrder/export/mfs' 29 // url : BASE_URL.url +'/fuelOrder/export/mfs'
30 url : BASE_URL.url + '/fuelOrder/orderCostAndCount' 30 url : BASE_URL.url + '/fuelOrder/orderCostAndCount'
31 }) 31 })
32 .then(function (result){ 32 .then(function (result){
33 deferred.resolve(result.data); 33 deferred.resolve(result.data);
34 },function (result){ 34 },function (result){
35 console.log(result) 35 console.log(result)
36 deferred.resolve(result.data); 36 deferred.resolve(result.data);
37 }) 37 })
38 return deferred.promise; 38 return deferred.promise;
39 } 39 }
40 40
41 41
42 42
43 this.getCS = function(){ 43 this.getCS = function(){
44 var deferred = $q.defer(); 44 var deferred = $q.defer();
45 $http({ 45 $http({
46 method : 'GET', 46 method : 'GET',
47 url : BASE_URL.url +'/user/sources' 47 url : BASE_URL.url +'/user/sources'
48 }) 48 })
49 .then(function (result){ 49 .then(function (result){
50 deferred.resolve(result.data); 50 deferred.resolve(result.data);
51 },function (result){ 51 },function (result){
52 console.log(result) 52 console.log(result)
53 deferred.resolve(result.data); 53 deferred.resolve(result.data);
54 }) 54 })
55 return deferred.promise; 55 return deferred.promise;
56 } 56 }
57 57
58 /* With region Code */ 58 /* With region Code */
59 this.getRPP = function(code){ 59 /*this.getRPP = function(code){
60 var deferred = $q.defer(); 60 var deferred = $q.defer();
61 $http({ 61 $http({
62 method : 'GET', 62 method : 'GET',
63 url : BASE_URL.url +'/fuelerlinx/getAircrafts/'+code 63 url : BASE_URL.url +'/fuelerlinx/getAircrafts/'+code
64 }) 64 })
65 .then(function (result){ 65 .then(function (result){
66 deferred.resolve(result.data); 66 deferred.resolve(result.data);
67 },function (result){ 67 },function (result){
68 console.log(result) 68 console.log(result)
69 deferred.resolve(result.data); 69 deferred.resolve(result.data);
70 }) 70 })
71 return deferred.promise; 71 return deferred.promise;
72 }*/
73
74 this.getRPP = function(code){
75 var deferred = $q.defer();
76 $http({
77 method : 'GET',
78 url : BASE_URL.url +'/fuelerlinx/getCompleteRegionalPap/'+code
79 })
80 .then(function (result){
81 deferred.resolve(result.data);
82 },function (result){
83 console.log(result)
84 deferred.resolve(result.data);
85 })
86 return deferred.promise;
72 } 87 }
88
73 89
74 /* without region code */ 90 /* without region code */
75 this.getAllRPP = function(){ 91 this.getAllRPP = function(){
76 var deferred = $q.defer(); 92 var deferred = $q.defer();
77 $http({ 93 $http({
78 method : 'GET', 94 method : 'GET',
79 url : BASE_URL.url +'/fuelerlinx/getAllRegionalPap' 95 url : BASE_URL.url +'/fuelerlinx/getAllRegionalPap'
80 }) 96 })
81 .then(function (result){ 97 .then(function (result){
82 deferred.resolve(result.data); 98 deferred.resolve(result.data);
83 },function (result){ 99 },function (result){
84 console.log(result) 100 console.log(result)
85 deferred.resolve(result.data); 101 deferred.resolve(result.data);
86 }) 102 })
87 return deferred.promise; 103 return deferred.promise;
88 } 104 }
89 105
90 /*---date filter for Monthly fuel sales chart - dates are sending to the api */ 106 /*---date filter for Monthly fuel sales chart - dates are sending to the api */
91 this.getDRFChart = function(fd,td){ 107 this.getDRFChart = function(fd,td){
92 var deferred = $q.defer(); 108 var deferred = $q.defer();
93 $http({ 109 $http({
94 method : 'GET', 110 method : 'GET',
95 url : BASE_URL.url + '/fuelOrder/filterchart?fromDate='+fd+'&toDate='+td+'' 111 url : BASE_URL.url + '/fuelOrder/filterchart?fromDate='+fd+'&toDate='+td+''
96 }) 112 })
97 .then(function (result){ 113 .then(function (result){
98 deferred.resolve(result.data); 114 deferred.resolve(result.data);
99 },function (result){ 115 },function (result){
100 console.log(result) 116 console.log(result)
101 deferred.resolve(result.data); 117 deferred.resolve(result.data);
102 }) 118 })
103 return deferred.promise; 119 return deferred.promise;
104 } 120 }
105 121
106 122
107 this.orderCostAndCountByDate = function(fd,td){ 123 this.orderCostAndCountByDate = function(fd,td){
108 var deferred = $q.defer(); 124 var deferred = $q.defer();
109 $http({ 125 $http({
110 method : 'GET', 126 method : 'GET',
111 url : BASE_URL.url + '/fuelOrder/orderCostAndCountByDate?fromDate='+fd+'&toDate='+td+'' 127 url : BASE_URL.url + '/fuelOrder/orderCostAndCountByDate?fromDate='+fd+'&toDate='+td+''
112 }) 128 })
113 .then(function (result){ 129 .then(function (result){
114 deferred.resolve(result.data); 130 deferred.resolve(result.data);
115 },function (result){ 131 },function (result){
116 console.log(result) 132 console.log(result)
117 deferred.resolve(result.data); 133 deferred.resolve(result.data);
118 }) 134 })
119 return deferred.promise; 135 return deferred.promise;
120 } 136 }
121 137
122 /*---date filter for Historic Fuel price --- DRF--Date Range Filter */ 138 /*---date filter for Historic Fuel price --- DRF--Date Range Filter */
123 this.getDRFHfpChart = function(fd,td){ 139 this.getDRFHfpChart = function(fd,td){
124 var deferred = $q.defer(); 140 var deferred = $q.defer();
125 $http({ 141 $http({
126 method : 'GET', 142 method : 'GET',
127 url : BASE_URL.url + '/fuelOrder/hfp/filterchart?fromDate='+fd+'&toDate='+td+'' 143 url : BASE_URL.url + '/fuelOrder/hfp/filterchart?fromDate='+fd+'&toDate='+td+''
128 }) 144 })
129 .then(function (result){ 145 .then(function (result){
130 deferred.resolve(result.data); 146 deferred.resolve(result.data);
131 },function (result){ 147 },function (result){
132 console.log(result) 148 console.log(result)
133 deferred.resolve(result.data); 149 deferred.resolve(result.data);
134 }) 150 })
135 return deferred.promise; 151 return deferred.promise;
136 } 152 }
137 153
138 154
139 this.gethfpChart = function(){ 155 this.gethfpChart = function(){
140 var deferred = $q.defer(); 156 var deferred = $q.defer();
141 $http({ 157 $http({
142 method : 'GET', 158 method : 'GET',
143 url : BASE_URL.url + '/fuelOrder/hfp/' 159 url : BASE_URL.url + '/fuelOrder/hfp/'
144 }) 160 })
145 .then(function (result){ 161 .then(function (result){
146 deferred.resolve(result.data); 162 deferred.resolve(result.data);
147 },function (result){ 163 },function (result){
148 console.log(result) 164 console.log(result)
149 deferred.resolve(result.data); 165 deferred.resolve(result.data);
150 }) 166 })
151 return deferred.promise; 167 return deferred.promise;
152 } 168 }
153 169
154 /*---date filter for Customer Sources --- DRF--Date Range Filter */ 170 /*---date filter for Customer Sources --- DRF--Date Range Filter */
155 this.getDRFCSChart = function(fd,td){ 171 this.getDRFCSChart = function(fd,td){
156 var deferred = $q.defer(); 172 var deferred = $q.defer();
157 $http({ 173 $http({
158 method : 'GET', 174 method : 'GET',
159 url : BASE_URL.url + '/user/cs/filterchart?fromDate='+fd+'&toDate='+td+'' 175 url : BASE_URL.url + '/user/cs/filterchart?fromDate='+fd+'&toDate='+td+''
160 }) 176 })
161 .then(function (result){ 177 .then(function (result){
162 deferred.resolve(result.data); 178 deferred.resolve(result.data);
163 },function (result){ 179 },function (result){
164 console.log(result) 180 console.log(result)
165 deferred.resolve(result.data); 181 deferred.resolve(result.data);
166 }) 182 })
167 return deferred.promise; 183 return deferred.promise;
168 } 184 }
169 185
170 } 186 }
171 187
172 })(); 188 })();