Commit d1e8d9afb3a474f71a230a037c8a2801a744e5a6

Authored by Kuldeep Arora
1 parent 4ecd206b20
Exists in master

fuel order & home screen

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 14
15 .custom-widget-content{ 15 .custom-widget-content{
16 width: 100%; 16 width: 100%;
17 height: auto; 17 height: auto;
18 padding: 15px 0; 18 padding: 15px 0;
19 background-color: #fff; 19 background-color: #fff;
20 border: 1px solid #D5D5D5; 20 border: 1px solid #D5D5D5;
21 border-radius: 0 0 5px 5px; 21 border-radius: 0 0 5px 5px;
22 } 22 }
23 .hr{ 23 .hr{
24 margin: 5px 0; 24 margin: 5px 0;
25 } 25 }
26 .disableSelect:disabled{ 26 .disableSelect:disabled{
27 border: 0; 27 border: 0;
28 background-color: transparent; 28 background-color: transparent;
29 color: #f90; 29 color: #f90;
30 box-shadow: none; 30 box-shadow: none;
31 -webkit-appearance: none; 31 -webkit-appearance: none;
32 appearance: none; 32 appearance: none;
33 } 33 }
34 .disableInput:disabled{ 34 .disableInput:disabled{
35 border: 0; 35 border: 0;
36 background-color: transparent; 36 background-color: transparent;
37 color: #222; 37 color: #222;
38 box-shadow: none; 38 box-shadow: none;
39 } 39 }
40 .img-logo{ 40 .img-logo{
41 height: 32px; 41 height: 32px;
42 padding-left: 10%; 42 padding-left: 10%;
43 } 43 }
44 44
45 .widget-header > i{ 45 .widget-header > i{
46 display: inline-block; 46 display: inline-block;
47 margin-top: -3px; 47 margin-top: -3px;
48 margin-left: 13px; 48 margin-left: 13px;
49 margin-right: -2px; 49 margin-right: -2px;
50 font-size: 16px; 50 font-size: 16px;
51 color: #555; 51 color: #555;
52 vertical-align: middle; 52 vertical-align: middle;
53 } 53 }
54 54
55 55
56 table{ 56 table{
57 width: 100%; 57 width: 100%;
58 } 58 }
59 table th, td{ 59 table th, td{
60 font-size: 13px; 60 font-size: 13px;
61 } 61 }
62 .navbar-brand{ 62 .navbar-brand{
63 height: auto; 63 height: auto;
64 } 64 }
65 .navbar.navbar-inverse { 65 .navbar.navbar-inverse {
66 background: #eee; 66 background: #eee;
67 border-color: #c2bebe; 67 border-color: #c2bebe;
68 border-bottom: 1px solid #c2bebe; 68 border-bottom: 1px solid #c2bebe;
69 } 69 }
70 .custom-widget-content .btn-xs{ 70 .custom-widget-content .btn-xs{
71 padding: 3px 5px; 71 padding: 3px 5px;
72 } 72 }
73 .fc-event{ 73 .fc-event{
74 background-color: #ff9900 !important; 74 background-color: #ff9900 !important;
75 color: #fff !important; 75 color: #fff !important;
76 border: 1px solid #ff9900 !important; 76 border: 1px solid #ff9900 !important;
77 padding: 5px; 77 padding: 5px;
78 font-size: 14px; 78 font-size: 14px;
79 border-radius: 0 !important; 79 border-radius: 0 !important;
80 } 80 }
81 .pull-right-color{ 81 .pull-right-color{
82 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 82 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
83 } 83 }
84 .pull-right-setup{ 84 .pull-right-setup{
85 margin-bottom: 10px; 85 margin-bottom: 10px;
86 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 86 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
87 } 87 }
88 .Airport{ 88 .Airport{
89 padding-top: 5px; 89 padding-top: 5px;
90 } 90 }
91 .src-image{ 91 .src-image{
92 width: 50px; 92 width: 50px;
93 height: 50px; 93 height: 50px;
94 } 94 }
95 .Accept{ 95 .Accept{
96 padding-top: 25px; 96 padding-top: 25px;
97 } 97 }
98 .dis{ 98 .dis{
99 float: left; 99 float: left;
100 margin-right:100px; 100 margin-right:100px;
101 } 101 }
102 /*.email-password{ 102 /*.email-password{
103 width: 40px; 103 width: 40px;
104 height: 24px; 104 height: 24px;
105 }*/ 105 }*/
106 .email-password-icon{ 106 .email-password-icon{
107 width: 10px; 107 width: 10px;
108 height: 10px; 108 height: 10px;
109 } 109 }
110 @media( max-width: 768px;){ 110 @media( max-width: 768px;){
111 .btn{ 111 .btn{
112 font-size: 10px !important; 112 font-size: 10px !important;
113 } 113 }
114 .dis{ 114 .dis{
115 float: none; 115 float: none;
116 margin-right: 0px; 116 margin-right: 0px;
117 } 117 }
118 } 118 }
119 .Search-tabs{ 119 .Search-tabs{
120 border-bottom: 0px solid #ddd; */ 120 border-bottom: 0px solid #ddd; */
121 } 121 }
122 122
123 .customer-table table{ 123 .customer-table table{
124 width: 100%; 124 width: 100%;
125 } 125 }
126 .customer-table input{ 126 .customer-table input{
127 border-radius: 0; 127 border-radius: 0;
128 box-shadow: none; 128 box-shadow: none;
129 border: 1px solid #e4e3e3; 129 border: 1px solid #e4e3e3;
130 padding: 0px; 130 padding: 0px;
131 font-size: 10px; 131 font-size: 10px;
132 display: -webkit-inline-box; 132 display: -webkit-inline-box;
133 display: inline-box; 133 display: inline-box;
134 height: 31px; 134 height: 31px;
135 } 135 }
136 .customer-table select{ 136 .customer-table select{
137 border-radius: 0; 137 border-radius: 0;
138 box-shadow: none; 138 box-shadow: none;
139 border: 1px solid #e4e3e3; 139 border: 1px solid #e4e3e3;
140 padding: 0px; 140 padding: 0px;
141 font-size: 10px; 141 font-size: 10px;
142 height: 31px; 142 height: 31px;
143 display: -webkit-inline-box; 143 display: -webkit-inline-box;
144 display: inline-box; 144 display: inline-box;
145 } 145 }
146 .customer-table th > label{ 146 .customer-table th > label{
147 font-weight: bold; 147 font-weight: bold;
148 padding: 10px 5px 2px 5px; 148 padding: 10px 5px 2px 5px;
149 margin-bottom: 0; 149 margin-bottom: 0;
150 } 150 }
151 .customer-table td{ 151 .customer-table td{
152 padding: 5px !important; 152 padding: 5px !important;
153 height: auto !important; 153 height: auto !important;
154 vertical-align: middle !important; 154 vertical-align: middle !important;
155 } 155 }
156 .customer-table td > select{ 156 .customer-table td > select{
157 height: 22px !important; 157 height: 22px !important;
158 } 158 }
159 .customer-table td > button{ 159 .customer-table td > button{
160 font-size: 10px; 160 font-size: 10px;
161 } 161 }
162 162
163 /*.new-input-label{ 163 /*.new-input-label{
164 margin-bottom: 0; 164 margin-bottom: 0;
165 line-height: 34px; 165 line-height: 34px;
166 }*/ 166 }*/
167 167
168 168
169 169
170 170
171 171
172 /* new custom css for accrodian tabs */ 172 /* new custom css for accrodian tabs */
173 173
174 .customAccordianHeader{ 174 .customAccordianHeader{
175 width: 100%; 175 width: 100%;
176 height: auto; 176 height: auto;
177 background-color: #F3F3F3; 177 background-color: #F3F3F3;
178 border: 1px solid #ddd; 178 border: 1px solid #ddd;
179 color: #333; 179 color: #333;
180 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); 180 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
181 border-radius: 3px 3px 3px 3px; 181 border-radius: 3px 3px 3px 3px;
182 padding: 10px 15px; 182 padding: 10px 15px;
183 margin-top: 10px; 183 margin-top: 10px;
184 } 184 }
185 185
186 .customAccordianHeader.customActive{ 186 .customAccordianHeader.customActive{
187 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b)); 187 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b));
188 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%); 188 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%);
189 background-repeat: repeat-x; 189 background-repeat: repeat-x;
190 border: 1px solid #222222; 190 border: 1px solid #222222;
191 color: #FFF; 191 color: #FFF;
192 border-radius: 3px 3px 0 0; 192 border-radius: 3px 3px 0 0;
193 } 193 }
194 .customAccordianHeader.customActive .form-control{ 194 .customAccordianHeader.customActive .form-control{
195 margin-left: 5px; 195 margin-left: 5px;
196 margin-right: 5px; 196 margin-right: 5px;
197 } 197 }
198 .customAccordianHeader > span{ 198 .customAccordianHeader > span{
199 font-size: 15px; 199 font-size: 15px;
200 line-height: 22px; 200 line-height: 22px;
201 float: left; 201 float: left;
202 } 202 }
203 .customAccordianHeader .btn{ 203 .customAccordianHeader .btn{
204 padding: 2px 12px; 204 padding: 2px 12px;
205 } 205 }
206 .customAccordianHeader > .form-control{ 206 .customAccordianHeader > .form-control{
207 outline: none; 207 outline: none;
208 box-shadow: none; 208 box-shadow: none;
209 } 209 }
210 .customAccordianHeader > select.form-control{ 210 .customAccordianHeader > select.form-control{
211 width: 150px; 211 width: 150px;
212 height: 26px; 212 height: 26px;
213 padding: 0 6px; 213 padding: 0 6px;
214 float: left; 214 float: left;
215 } 215 }
216 .customAccordianHeader > select.form-control[disabled]{ 216 .customAccordianHeader > select.form-control[disabled]{
217 border: none; 217 border: none;
218 -webkit-appearance: none; 218 -webkit-appearance: none;
219 -moz-appearance: none; 219 -moz-appearance: none;
220 appearance: none; 220 appearance: none;
221 background-color: transparent; 221 background-color: transparent;
222 color: #f90; 222 color: #f90;
223 width: auto; 223 width: auto;
224 } 224 }
225 .customAccordianHeader > input.form-control{ 225 .customAccordianHeader > input.form-control{
226 width: 70px; 226 width: 70px;
227 height: 26px; 227 height: 26px;
228 padding: 0 6px; 228 padding: 0 6px;
229 float: left; 229 float: left;
230 } 230 }
231 .customAccordianHeader > input.form-control[disabled]{ 231 .customAccordianHeader > input.form-control[disabled]{
232 border: none; 232 border: none;
233 -webkit-appearance: none; 233 -webkit-appearance: none;
234 -moz-appearance: none; 234 -moz-appearance: none;
235 appearance: none; 235 appearance: none;
236 background-color: transparent; 236 background-color: transparent;
237 color: #333; 237 color: #333;
238 } 238 }
239 .customAccordianTabBody{ 239 .customAccordianTabBody{
240 width: 100%; 240 width: 100%;
241 height: auto; 241 height: auto;
242 padding: 15px; 242 padding: 15px;
243 border: 1px solid #ddd; 243 border: 1px solid #ddd;
244 border-top: 0; 244 border-top: 0;
245 border-radius: 0 0 3px 3px; 245 border-radius: 0 0 3px 3px;
246 } 246 }
247 .customTableWithFilter{ 247 .customTableWithFilter{
248 width: auto; 248 width: auto;
249 height: auto; 249 height: auto;
250 } 250 }
251 .customTableWithFilter th{ 251 .customTableWithFilter th{
252 padding: 5px; 252 padding: 5px;
253 background-color: #f3f3f3; 253 background-color: #f3f3f3;
254 border: 1px solid #ddd; 254 border: 1px solid #ddd;
255 } 255 }
256 .customTableWithFilter th i{ 256 .customTableWithFilter th i{
257 margin-top: 3px; 257 margin-top: 3px;
258 } 258 }
259 .customTableWithFilter th span{ 259 .customTableWithFilter th span{
260 font-size: 11px; 260 font-size: 11px;
261 color: #222; 261 color: #222;
262 } 262 }
263 .customTableWithFilter th input{ 263 .customTableWithFilter th input{
264 width: 50px; 264 width: 50px;
265 } 265 }
266 .customTableWithFilter td{ 266 .customTableWithFilter td{
267 padding: 5px; 267 padding: 5px;
268 border: 1px solid #ddd; 268 border: 1px solid #ddd;
269 } 269 }
270 .customTableWithFilter td span{ 270 .customTableWithFilter td span{
271 font-size: 11px; 271 font-size: 11px;
272 } 272 }
273 .customTableWithFilter td span:first-child{ 273 .customTableWithFilter td span:first-child{
274 color: #449d44; 274 color: #449d44;
275 font-weight: bold; 275 font-weight: bold;
276 } 276 }
277 .customTableWithFilter td span:last-child{ 277 .customTableWithFilter td span:last-child{
278 color: #c9302c; 278 color: #c9302c;
279 font-style: italic; 279 font-style: italic;
280 font-weight: bold; 280 font-weight: bold;
281 } 281 }
282 .customTableWithFilter td .tierTextBox{ 282 .customTableWithFilter td .tierTextBox{
283 width: 70px; 283 width: 70px;
284 } 284 }
285 .customTableWithFilter .addTierButton{ 285 .customTableWithFilter .addTierButton{
286 color: #fff; 286 color: #fff;
287 background-color: #2196f3; 287 background-color: #2196f3;
288 border: none; 288 border: none;
289 padding: 3px 5px; 289 padding: 3px 5px;
290 } 290 }
291 .customTableWithFilter td .fa-trash-o{ 291 .customTableWithFilter td .fa-trash-o{
292 color: #fff; 292 color: #fff;
293 background-color: #c9302c; 293 background-color: #c9302c;
294 padding: 5px; 294 padding: 5px;
295 border-radius: 3px; 295 border-radius: 3px;
296 cursor: pointer; 296 cursor: pointer;
297 } 297 }
298 .resizeTextarea{ 298 .resizeTextarea{
299 resize: vertical; 299 resize: vertical;
300 margin-top: 20px; 300 margin-top: 20px;
301 } 301 }
302 302
303
304
305
306
307 .new-widget-content{ 303 .new-widget-content{
308 padding: 0 0 0 0 !important; 304 padding: 0 0 0 0 !important;
309 } 305 }
310 .new-tab-heading{ 306 .new-tab-heading{
311 padding: 5px; 307 padding: 5px;
312 color: #333; 308 color: #333;
313 background-color: #fcfcfc; 309 background-color: #fcfcfc;
314 border-bottom: 1px solid #d5d5d5; 310 border-bottom: 1px solid #d5d5d5;
315 border-right: 1px solid #d5d5d5; 311 border-right: 1px solid #d5d5d5;
316 } 312 }
317 .new-tab-body{ 313 .new-tab-body{
318 border-right: 1px solid #d5d5d5; 314 border-right: 1px solid #d5d5d5;
319 border-bottom: 1px solid #d5d5d5; 315 border-bottom: 1px solid #d5d5d5;
320 padding-left: 15px; 316 padding-left: 15px;
321 padding-bottom: 5px; 317 padding-bottom: 5px;
322 } 318 }
323 .new-tab-heading i.fa{ 319 .new-tab-heading i.fa{
324 font-size: 16px; 320 font-size: 16px;
325 cursor: pointer; 321 cursor: pointer;
326 } 322 }
327 .new-tab-heading span{ 323 .new-tab-heading span{
328 font-size: 14px; 324 font-size: 14px;
329 margin-left: 5px; 325 margin-left: 5px;
330 } 326 }
331 .new-tab-heading i.fa-plus-circle{ 327 .new-tab-heading i.fa-plus-circle{
332 color: #067dfc; 328 color: #067dfc;
333 } 329 }
334 .new-tab-heading i.fa-minus-circle{ 330 .new-tab-heading i.fa-minus-circle{
335 color: #d00d09; 331 color: #d00d09;
336 } 332 }
337 .new-tab-body-th{ 333 .new-tab-body-th{
338 color: #333; 334 color: #333;
339 } 335 }
340 .new-tab-body-th > div{ 336 .new-tab-body-th > div{
341 font-size: 12px; 337 font-size: 12px;
342 font-weight: bold; 338 font-weight: bold;
343 padding-right: 5px; 339 padding-right: 5px;
344 padding-left: 5px; 340 padding-left: 5px;
345 text-align: center; 341 text-align: center;
346 } 342 }
347 .new-tab-body-th > div:first-child{ 343 .new-tab-body-th > div:first-child{
348 font-size: 14px; 344 font-size: 14px;
349 font-weight: bold; 345 font-weight: bold;
350 text-align: left; 346 text-align: left;
351 } 347 }
352 .new-tab-body-td i.fa-plus-circle{ 348 .new-tab-body-td i.fa-plus-circle{
353 color: #067dfc; 349 color: #067dfc;
354 } 350 }
355 .new-tab-body-td i.fa-minus-circle{ 351 .new-tab-body-td i.fa-minus-circle{
356 color: #d00d09; 352 color: #d00d09;
357 } 353 }
358 .new-tab-body-td input{ 354 .new-tab-body-td input{
359 width: 50px; 355 width: 50px;
360 height: 24px; 356 height: 24px;
361 } 357 }
362 .new-tab-body-td .fa{ 358 .new-tab-body-td .fa{
363 font-size: 14px; 359 font-size: 14px;
364 } 360 }
365 .new-tab-body-td > div:first-child > div{ 361 .new-tab-body-td > div:first-child > div{
366 padding-right: 5px; 362 padding-right: 5px;
367 padding-left: 5px; 363 padding-left: 5px;
368 text-align: center; 364 text-align: center;
369 } 365 }
370 .new-tab-body-td > div:first-child > div:first-child{ 366 .new-tab-body-td > div:first-child > div:first-child{
371 text-align: left; 367 text-align: left;
372 } 368 }
373 .appliesTableHeading{ 369 .appliesTableHeading{
374 border: 1px solid #d5d5d5; 370 border: 1px solid #d5d5d5;
375 padding: 5px; 371 padding: 5px;
376 color: #333; 372 color: #333;
377 font-weight: bold; 373 font-weight: bold;
378 background-color: #fcfcfc; 374 background-color: #fcfcfc;
379 margin: 10px 0 0 0; 375 margin: 10px 0 0 0;
380 } 376 }
381 .appliesTableBody{ 377 .appliesTableBody{
382 border: 1px solid #d5d5d5; 378 border: 1px solid #d5d5d5;
383 border-top: 0; 379 border-top: 0;
384 background-color: #ffffe0; 380 background-color: #ffffe0;
385 margin-bottom: 10px; 381 margin-bottom: 10px;
386 height: auto; 382 height: auto;
387 } 383 }
388 .appliesTableBody > div.firstDiv{ 384 .appliesTableBody > div.firstDiv{
389 height: 100px; 385 height: 100px;
390 float: left; 386 float: left;
391 width: 40%; 387 width: 40%;
392 border-right: 1px solid #d5d5d5; 388 border-right: 1px solid #d5d5d5;
393 overflow: auto; 389 overflow: auto;
394 padding: 5px; 390 padding: 5px;
395 } 391 }
396 .appliesTableBody > div.lastDiv{ 392 .appliesTableBody > div.lastDiv{
397 width: 59%; 393 width: 59%;
398 height: 100px; 394 height: 100px;
399 padding: 5px; 395 padding: 5px;
400 float: left; 396 float: left;
401 } 397 }
402 .appliesTableBody > div.lastDiv textarea{ 398 .appliesTableBody > div.lastDiv textarea{
403 width: 40%; 399 width: 40%;
404 height: 60px; 400 height: 60px;
405 margin: 15px 0; 401 margin: 15px 0;
406 resize: none; 402 resize: none;
407 float: left; 403 float: left;
408 } 404 }
409 .reportedByTag{ 405 .reportedByTag{
410 width: 60%; 406 width: 60%;
411 height: 80px; 407 height: 80px;
412 border-top: 10px solid #393; 408 border-top: 10px solid #393;
413 border-left: 10px solid #6c6; 409 border-left: 10px solid #6c6;
414 border-radius: 5px 0 0 5px; 410 border-radius: 5px 0 0 5px;
415 background-color: #d7d7d7; 411 background-color: #d7d7d7;
416 float: right; 412 float: right;
417 position: relative; 413 position: relative;
418 right: -13px; 414 right: -13px;
419 margin-top: 5px; 415 margin-top: 5px;
420 font-size: 11px; 416 font-size: 11px;
421 } 417 }
422 .confirmedTag{ 418 .confirmedTag{
423 background-color: #393; 419 background-color: #393;
424 color: #fff; 420 color: #fff;
425 -webkit-transform: rotate(-90deg); 421 -webkit-transform: rotate(-90deg);
426 -moz-transform: rotate(-90deg); 422 -moz-transform: rotate(-90deg);
427 -o-transform: rotate(-90deg); 423 -o-transform: rotate(-90deg);
428 -ms-transform: rotate(-90deg); 424 -ms-transform: rotate(-90deg);
429 transform: rotate(-90deg); 425 transform: rotate(-90deg);
430 position: absolute; 426 position: absolute;
431 bottom: 25px; 427 bottom: 25px;
432 left: -24px; 428 left: -24px;
433 width: 71px; 429 width: 71px;
434 text-align: center; 430 text-align: center;
435 font-size: 11px; 431 font-size: 11px;
436 } 432 }
437 .reportedByTag table{ 433 .reportedByTag table{
438 margin-left: 27px; 434 margin-left: 27px;
439 width: calc(100% - 27px); 435 width: calc(100% - 27px);
440 } 436 }
441 .reportedByTag table td{ 437 .reportedByTag table td{
442 font-size: 11px; 438 font-size: 11px;
443 text-align: center; 439 text-align: center;
444 font-weight: bold; 440 font-weight: bold;
445 } 441 }
446 .reportedByTag table tr:last-child td{ 442 .reportedByTag table tr:last-child td{
447 text-align: left; 443 text-align: left;
448 font-weight: normal; 444 font-weight: normal;
449 font-size: 10px; 445 font-size: 10px;
450 } 446 }
451 .feeManagerRight{ 447 .feeManagerRight{
452 min-height: 70px; 448 min-height: 70px;
453 position: relative; 449 position: relative;
454 } 450 }
455 .feeManagerRight div{ 451 .feeManagerRight div{
456 position: absolute; 452 position: absolute;
457 bottom: 0; 453 bottom: 0;
458 width: 100%; 454 width: 100%;
459 } 455 }
460 .new-tab-body-td{ 456 .new-tab-body-td{
461 padding: 5px 0; 457 padding: 5px 0;
462 } 458 }
463 459
464 /* new checkbox slide css */ 460 /* new checkbox slide css */
465 461
466 .onoffswitch { 462 .onoffswitch {
467 position: relative; width: 80px; 463 position: relative; width: 80px;
468 -webkit-user-select:none; 464 -webkit-user-select:none;
469 -moz-user-select:none; 465 -moz-user-select:none;
470 -ms-user-select: none; 466 -ms-user-select: none;
471 margin: auto; 467 margin: auto;
472 } 468 }
473 .onoffswitch-checkbox { 469 .onoffswitch-checkbox {
474 display: none; 470 display: none;
475 } 471 }
476 .onoffswitch-label { 472 .onoffswitch-label {
477 display: block; 473 display: block;
478 overflow: hidden; 474 overflow: hidden;
479 cursor: pointer; 475 cursor: pointer;
480 border: 2px solid #999999; 476 border: 2px solid #999999;
481 border-radius: 0px; 477 border-radius: 0px;
482 } 478 }
483 .onoffswitch-inner { 479 .onoffswitch-inner {
484 display: block; 480 display: block;
485 width: 200%; 481 width: 200%;
486 margin-left: -100%; 482 margin-left: -100%;
487 transition: margin 0.3s ease-in 0s; 483 transition: margin 0.3s ease-in 0s;
488 } 484 }
489 .onoffswitch-inner:before, .onoffswitch-inner:after { 485 .onoffswitch-inner:before, .onoffswitch-inner:after {
490 display: block; 486 display: block;
491 float: left; 487 float: left;
492 width: 50%; 488 width: 50%;
493 height: 18px; 489 height: 18px;
494 padding: 0; 490 padding: 0;
495 line-height: 18px; 491 line-height: 18px;
496 font-size: 10px; 492 font-size: 10px;
497 color: white; 493 color: white;
498 font-family: Trebuchet, Arial, sans-serif; 494 font-family: Trebuchet, Arial, sans-serif;
499 font-weight: bold; 495 font-weight: bold;
500 box-sizing: border-box; 496 box-sizing: border-box;
501 } 497 }
502 .onoffswitch-inner:before { 498 .onoffswitch-inner:before {
503 content: "Include"; 499 content: "Include";
504 padding-left: 5px; 500 padding-left: 5px;
505 background-color: #016ADB; color: #FFFFFF; 501 background-color: #016ADB; color: #FFFFFF;
506 text-align: left; 502 text-align: left;
507 } 503 }
508 .onoffswitch-inner:after { 504 .onoffswitch-inner:after {
509 content: "Exclude"; 505 content: "Exclude";
510 padding-right: 5px; 506 padding-right: 5px;
511 background-color: ; color: #333333; 507 background-color: ; color: #333333;
512 text-align: right; 508 text-align: right;
513 } 509 }
514 .onoffswitch-switch { 510 .onoffswitch-switch {
515 display: block; 511 display: block;
516 width: 25px; 512 width: 25px;
517 margin: -3.5px; 513 margin: -3.5px;
518 background: #FFFFFF; 514 background: #FFFFFF;
519 position: absolute; 515 position: absolute;
520 top: 0; 516 top: 0;
521 bottom: 0; 517 bottom: 0;
522 right: 58px; 518 right: 58px;
523 border: 2px solid #999999; 519 border: 2px solid #999999;
524 border-radius: 0px; 520 border-radius: 0px;
525 transition: all 0.3s ease-in 0s; 521 transition: all 0.3s ease-in 0s;
526 } 522 }
527 .onoffswitch-switch i{ 523 .onoffswitch-switch i{
528 line-height: 25px; 524 line-height: 25px;
529 } 525 }
530 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { 526 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
531 margin-left: 0; 527 margin-left: 0;
532 } 528 }
533 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { 529 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
534 right: 0px; 530 right: 0px;
535 } 531 }
536 .onoffswitch-checkbox fa-check{ 532 .onoffswitch-checkbox fa-check{
537 color: #00ff00; 533 color: #00ff00;
538 } 534 }
539 .onoffswitch-checkbox fa-times{ 535 .onoffswitch-checkbox fa-times{
540 color: #ff0000; 536 color: #ff0000;
541 } 537 }
542 538
543 .newButtons{ 539 .newButtons{
544 background-color: #fff; 540 background-color: #fff;
545 border-radius: 10px; 541 border-radius: 10px;
546 color: #333; 542 color: #333;
547 border: 1px solid #eee; 543 border: 1px solid #eee;
548 box-shadow: 5px 5px 6px rgba(0,0,0,0.3); 544 box-shadow: 5px 5px 6px rgba(0,0,0,0.3);
549 padding: 6px 15px; 545 padding: 6px 15px;
550 margin-right: 10px; 546 margin-right: 10px;
551 } 547 }
552 .newButtons:disabled{ 548 .newButtons:disabled{
553 background-color: #eee; 549 background-color: #eee;
554 } 550 }
555 *{ 551 *{
556 outline: none; 552 outline: none;
557 } 553 }
558 554
559 555
560 /* my custom modal */ 556 /* my custom modal */
561 557
562 .customBackdrop{ 558 .customBackdrop{
563 position: fixed; 559 position: fixed;
564 background-color: rgba(0, 0, 0, 0.15); 560 background-color: rgba(0, 0, 0, 0.15);
565 top: 0; 561 top: 0;
566 left: 0; 562 left: 0;
567 width: 100%; 563 width: 100%;
568 height: 100%; 564 height: 100%;
569 z-index: 999; 565 z-index: 999;
570 } 566 }
571 .customModalInner{ 567 .customModalInner{
572 width: 100%; 568 width: 100%;
573 max-width: 500px; 569 max-width: 500px;
574 height: 200px; 570 height: 200px;
575 top: 15%; 571 top: 15%;
576 position: relative; 572 position: relative;
577 margin: auto; 573 margin: auto;
578 } 574 }
579 .customModelHead, .customModelFooter{ 575 .customModelHead, .customModelFooter{
580 width: 100%; 576 width: 100%;
581 background-color: #fafafa; 577 background-color: #fafafa;
582 border-bottom: 1px solid #ccc; 578 border-bottom: 1px solid #ccc;
583 color: #333; 579 color: #333;
584 padding: 10px; 580 padding: 10px;
585 } 581 }
586 .customModelFooter{ 582 .customModelFooter{
587 border-top: 1px solid #ccc; 583 border-top: 1px solid #ccc;
588 } 584 }
589 .customModelBody{ 585 .customModelBody{
590 width: 100%; 586 width: 100%;
591 height: auto; 587 height: auto;
592 background-color: #fff; 588 background-color: #fff;
593 color: #333; 589 color: #333;
594 padding: 10px; 590 padding: 10px;
595 } 591 }
596 .customModelHead p{ 592 .customModelHead p{
597 margin-bottom: 0; 593 margin-bottom: 0;
598 font-size: 14px; 594 font-size: 14px;
599 } 595 }
600 .customModelFooter button{ 596 .customModelFooter button{
601 border: 1px solid #ccc; 597 border: 1px solid #ccc;
602 } 598 }
603 .customModelFooter input[type="submit"]{ 599 .customModelFooter input[type="submit"]{
604 background-color: #6ad46a; 600 background-color: #6ad46a;
605 border: 1px solid #ccc; 601 border: 1px solid #ccc;
606 } 602 }
607 603
608 604
609 /* custom confirmation model */ 605 /* custom confirmation model */
610 606
611 607
612 .customConfirmPopBackdrop{ 608 .customConfirmPopBackdrop{
613 position: fixed; 609 position: fixed;
614 background-color: rgba(0, 0, 0, 0.3); 610 background-color: rgba(0, 0, 0, 0.3);
615 top: 0; 611 top: 0;
616 left: 0; 612 left: 0;
617 width: 100%; 613 width: 100%;
618 height: 100%; 614 height: 100%;
619 z-index: 999999999; 615 z-index: 999999999;
620 display: none; 616 display: none;
621 } 617 }
622 .customConfirmPopBackdrop .customModalInner{ 618 .customConfirmPopBackdrop .customModalInner{
623 top: 30%; 619 top: 30%;
624 } 620 }
625 621
626 622
627 623
628 /* tier list table */ 624 /* tier list table */
629 625
630 .tierListWrap{ 626 .tierListWrap{
631 width: 120px; 627 width: 120px;
632 height: auto; 628 height: auto;
633 float: left; 629 float: left;
634 } 630 }
635 .tierListHead{ 631 .tierListHead{
636 width: 100%; 632 width: 100%;
637 padding: 5px; 633 padding: 5px;
638 background-color: #f3f3f3; 634 background-color: #f3f3f3;
639 border: 1px solid #ddd; 635 border: 1px solid #ddd;
640 border-right: none; 636 border-right: none;
641 } 637 }
642 .tierListBody{ 638 .tierListBody{
643 width: 100%; 639 width: 100%;
644 padding: 5px; 640 padding: 5px;
645 border: 1px solid #ddd; 641 border: 1px solid #ddd;
646 border-top: none; 642 border-top: none;
647 border-right: none; 643 border-right: none;
648 } 644 }
649 .minTierSpan{ 645 .minTierSpan{
650 color: #449d44; 646 color: #449d44;
651 font-weight: bold; 647 font-weight: bold;
652 font-size: 11px; 648 font-size: 11px;
653 } 649 }
654 .maxTierSpan{ 650 .maxTierSpan{
655 color: #c9302c; 651 color: #c9302c;
656 font-style: italic; 652 font-style: italic;
657 font-size: 11px; 653 font-size: 11px;
658 font-weight: bold; 654 font-weight: bold;
659 } 655 }
660 .tierHeadingSpan{ 656 .tierHeadingSpan{
661 font-size: 11px; 657 font-size: 11px;
662 color: #222; 658 color: #222;
663 font-weight: bold; 659 font-weight: bold;
664 } 660 }
665 .tierListHead input{ 661 .tierListHead input{
666 width: 50px; 662 width: 50px;
667 height: 24px; 663 height: 24px;
668 } 664 }
669 .addTierBtn{ 665 .addTierBtn{
670 color: #fff; 666 color: #fff;
671 background-color: #2196f3; 667 background-color: #2196f3;
672 border: none; 668 border: none;
673 padding: 1px 5px; 669 padding: 1px 5px;
674 } 670 }
675 .deleteTierIcon{ 671 .deleteTierIcon{
676 color: #fff; 672 color: #fff;
677 background-color: #c9302c; 673 background-color: #c9302c;
678 padding: 5px; 674 padding: 5px;
679 border-radius: 3px; 675 border-radius: 3px;
680 cursor: pointer; 676 cursor: pointer;
681 } 677 }
682 678
683 .customToogle { 679 .customToogle {
684 padding: 2px 6px !important; 680 padding: 2px 6px !important;
685 height: auto !important; 681 height: auto !important;
686 min-height: 28px !important; 682 min-height: 28px !important;
687 683
688 } 684 }
689 685
690 .myLoader{ 686 .myLoader{
691 width: 100%; 687 width: 100%;
692 height: 100%; 688 height: 100%;
693 position: fixed; 689 position: fixed;
694 z-index: 9999; 690 z-index: 9999;
695 top: 0; 691 top: 0;
696 left: 0; 692 left: 0;
697 text-align: center; 693 text-align: center;
698 background-color: rgba(0, 0, 0, 0.2); 694 background-color: rgba(0, 0, 0, 0.2);
699 } 695 }
700 .myLoader img{ 696 .myLoader img{
701 position: relative; 697 position: relative;
702 top: calc(50% - 25px); 698 top: calc(50% - 25px);
703 } 699 }
704 .customErrorInput{ 700 .customErrorInput{
705 background-color: rgb(251, 227, 228); 701 background-color: rgb(251, 227, 228);
706 border: 1px solid #fbc2c4; 702 border: 1px solid #fbc2c4;
707 color: #8a1f11; 703 color: #8a1f11;
708 } 704 }
709 .customErrorMessage{ 705 .customErrorMessage{
710 color: #8a1f11; 706 color: #8a1f11;
711 font-weight: bold; 707 font-weight: bold;
712 } 708 }
713 .ui-datepicker .ui-widget-header{ 709 .ui-datepicker .ui-widget-header{
714 background-image: none !important; 710 background-image: none !important;
715 } 711 }
716 .recordCountSelect{ 712 .recordCountSelect{
717 background-color: #fff; 713 background-color: #fff;
718 } 714 }
719 .exportBtn{ 715 .exportBtn{
720 margin-top: 20px; 716 margin-top: 20px;
721 } 717 }
722 .select2-container .select2-choice{ 718 .select2-container .select2-choice{
723 height: 34px !important; 719 height: 34px !important;
724 padding: 6px 12px !important; 720 padding: 6px 12px !important;
725 border: 1px solid #ccc !important; 721 border: 1px solid #ccc !important;
726 background-image: none !important; 722 background-image: none !important;
727 } 723 }
728 .select2-container .select2-choice .select2-arrow{ 724 .select2-container .select2-choice .select2-arrow{
729 border-left: none !important; 725 border-left: none !important;
730 background: transparent !important; 726 background: transparent !important;
731 } 727 }
732 .select2-container .select2-choice{ 728 .select2-container .select2-choice{
733 padding: 2px 12px !important; 729 padding: 2px 12px !important;
734 } 730 }
735 731
736 732
737 .blackOption{ 733 .blackOption{
738 color: #000; 734 color: #000;
739 background-color: #fff; 735 background-color: #fff;
740 } 736 }
741 .blueOption{ 737 .blueOption{
742 color: #1c84c6; 738 color: #1c84c6;
743 background-color: #fff; 739 background-color: #fff;
744 } 740 }
745 .greenOption{ 741 .greenOption{
746 color: #419641; 742 color: #419641;
747 background-color: #fff; 743 background-color: #fff;
748 } 744 }
749 .redOption{ 745 .redOption{
750 color: #ed5565; 746 color: #ed5565;
751 background-color: #fff; 747 background-color: #fff;
752 } 748 }
753 .yellowOption{ 749 .yellowOption{
754 color: #ff9900; 750 color: #ff9900;
755 background-color: #fff; 751 background-color: #fff;
756 } 752 }
757 .colorfulSelectbox, .colorfulSelectbox:focus, .colorfulSelectbox:hover{ 753 .colorfulSelectbox, .colorfulSelectbox:focus, .colorfulSelectbox:hover{
758 color: #fff; 754 color: #fff;
759 text-align: center !important; 755 text-align: center !important;
760 outline: none !important; 756 outline: none !important;
761 } 757 }
762 758 .nvd3-svg{
759 text-transform: capitalize;
760 }
763 761
764 /*--Highlight today date--*/ 762 /*--Highlight today date--*/
765 .ui-datepicker-today { 763 .ui-datepicker-today {
766 background: lightgray !important; 764 background: lightgray !important;
767 } 765 }
768 /*.ui-datepicker-current-day { 766 /*.ui-datepicker-current-day {
769 background: #999 !important; 767 background: #999 !important;
770 }*/ 768 }*/
771 769
772 @media (min-width: 1700px){ 770 @media (min-width: 1700px){
773 .margin-media{ 771 .margin-media{
774 width: 130px !important; 772 width: 130px !important;
775 } 773 }
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 data = Highcharts.geojson(Highcharts.maps[mapKey]); 161 data = Highcharts.geojson(Highcharts.maps[mapKey]);
162 162
163 for (var i = 0; i < data.length; i++) { 163 for (var i = 0; i < data.length; i++) {
164 for (var j = 0; j<result.length; j++){ 164 for (var j = 0; j<result.length; j++){
165 165
166 //delete the County word from api result to match with map data 166 //delete the County word from api result to match with map data
167 result[j].region = result[j].region.replace("County",""); 167 result[j].region = result[j].region.replace("County","");
168 168
169 if (data[i].name.trim() === result[j].region.trim()) { 169 if (data[i].name.trim() === result[j].region.trim()) {
170 170
171 data[i].value = result[j].averagePAP.toFixed(2); 171 data[i].value = result[j].averagePAP.toFixed(2);
172 172
173 } 173 }
174 } 174 }
175 175
176 } 176 }
177 }) 177 })
178 178
179 // Set a non-random bogus value 179 // Set a non-random bogus value
180 180
181 $.each(data, function (i) { 181 $.each(data, function (i) {
182 this.value = this.value; 182 this.value = this.value;
183 }); 183 });
184 184
185 // Hide loading and add series 185 // Hide loading and add series
186 chart.hideLoading(); 186 chart.hideLoading();
187 clearTimeout(fail); 187 clearTimeout(fail);
188 chart.addSeriesAsDrilldown(e.point, { 188 chart.addSeriesAsDrilldown(e.point, {
189 name: e.point.name, 189 name: e.point.name,
190 data: data, 190 data: data,
191 dataLabels: { 191 dataLabels: {
192 enabled: true, 192 enabled: true,
193 format: '{point.name}' 193 format: '{point.name}'
194 } 194 }
195 }); 195 });
196 }); 196 });
197 } 197 }
198 198
199 this.setTitle(null, { text: e.point.name }); 199 this.setTitle(null, { text: e.point.name });
200 }, 200 },
201 drillup: function () { 201 drillup: function () {
202 this.setTitle(null, { text: '' }); 202 this.setTitle(null, { text: '' });
203 } 203 }
204 } 204 }
205 }, 205 },
206 206
207 title: { 207 title: {
208 text: 'USA Map-Drilldown for Regional Pricing' 208 text: 'USA Map-Drilldown for Regional Pricing'
209 }, 209 },
210 210
211 subtitle: { 211 subtitle: {
212 text: '', 212 text: '',
213 floating: true, 213 floating: true,
214 align: 'right', 214 align: 'right',
215 y: 50, 215 y: 50,
216 style: { 216 style: {
217 fontSize: '16px' 217 fontSize: '16px'
218 } 218 }
219 }, 219 },
220 220
221 /* legend: small ? {} : { 221 /* legend: small ? {} : {
222 layout: 'vertical', 222 layout: 'vertical',
223 align: 'right', 223 align: 'right',
224 verticalAlign: 'middle' 224 verticalAlign: 'middle'
225 }, 225 },
226 226
227 colorAxis: { 227 colorAxis: {
228 min: 0, 228 min: 0,
229 minColor: '#E6E7E8', 229 minColor: '#E6E7E8',
230 maxColor: '#005645' 230 maxColor: '#005645'
231 },*/ 231 },*/
232 232
233 mapNavigation: { 233 mapNavigation: {
234 enabled: true, 234 enabled: true,
235 buttonOptions: { 235 buttonOptions: {
236 verticalAlign: 'bottom' 236 verticalAlign: 'bottom'
237 } 237 }
238 }, 238 },
239 239
240 plotOptions: { 240 plotOptions: {
241 map: { 241 map: {
242 states: { 242 states: {
243 hover: { 243 hover: {
244 color: '#EEDD66' 244 color: '#EEDD66'
245 } 245 }
246 } 246 }
247 } 247 }
248 }, 248 },
249 249
250 series: [{ 250 series: [{
251 data: data, 251 data: data,
252 name: 'USA', 252 name: 'USA',
253 dataLabels: { 253 dataLabels: {
254 enabled: true, 254 enabled: true,
255 format: '{point.properties.postal-code}' 255 format: '{point.properties.postal-code}'
256 } 256 }
257 }, { 257 }, {
258 type: 'mapline', 258 type: 'mapline',
259 data: separators, 259 data: separators,
260 color: 'silver', 260 color: 'silver',
261 enableMouseTracking: false, 261 enableMouseTracking: false,
262 animation: { 262 animation: {
263 duration: 500 263 duration: 500
264 } 264 }
265 }], 265 }],
266 266
267 drilldown: { 267 drilldown: {
268 activeDataLabelStyle: { 268 activeDataLabelStyle: {
269 color: '#FFFFFF', 269 color: '#FFFFFF',
270 textDecoration: 'none', 270 textDecoration: 'none',
271 textOutline: '1px #000000' 271 textOutline: '1px #000000'
272 }, 272 },
273 drillUpButton: { 273 drillUpButton: {
274 relativeTo: 'spacingBox', 274 relativeTo: 'spacingBox',
275 position: { 275 position: {
276 x: 0, 276 x: 0,
277 y: 60 277 y: 60
278 } 278 }
279 } 279 }
280 } 280 }
281 }); 281 });
282 }) 282 })
283 } 283 }
284 284
285 $scope.getAllRegionalPapDrilldown(); 285 $scope.getAllRegionalPapDrilldown();
286 286
287 287
288 /*$(document).ready(function() { 288 /*$(document).ready(function() {
289 $(function() { 289 $(function() {
290 jQuery('#map').vectorMap({ 290 jQuery('#map').vectorMap({
291 map: 'us_lcc', 291 map: 'us_lcc',
292 backgroundColor: '#ffce99', 292 backgroundColor: '#ffce99',
293 color: '#dfdfdd', 293 color: '#dfdfdd',
294 hoverOpacity: 0, 294 hoverOpacity: 0,
295 selectedColor: '#5f8b98', 295 selectedColor: '#5f8b98',
296 hoverColor: '#5f8b98', 296 hoverColor: '#5f8b98',
297 enableZoom: true, 297 enableZoom: true,
298 showTooltip: true, 298 showTooltip: true,
299 scaleColors: ['#dfdfdd'], 299 scaleColors: ['#dfdfdd'],
300 //values: sample_data 300 //values: sample_data
301 onRegionClick: function(event, code) { 301 onRegionClick: function(event, code) {
302 var map = $('#map').vectorMap('get', 'mapObject'); 302 var map = $('#map').vectorMap('get', 'mapObject');
303 var name = map.getRegionName(code); 303 var name = map.getRegionName(code);
304 getRegionPap(name); 304 getRegionPap(name);
305 }, 305 },
306 normalizeFunction: 'polynomial' 306 normalizeFunction: 'polynomial'
307 }); 307 });
308 }); 308 });
309 }) 309 })
310 310
311 311
312 312
313 function getRegionPap(code) { 313 function getRegionPap(code) {
314 $scope.showLoader = true; 314 $scope.showLoader = true;
315 analyticsService.getRPP(code).then(function(result) { 315 analyticsService.getRPP(code).then(function(result) {
316 $scope.rppData = result; 316 $scope.rppData = result;
317 $scope.showLoader = false; 317 $scope.showLoader = false;
318 $('#popup1').css('display', 'block'); 318 $('#popup1').css('display', 'block');
319 }) 319 })
320 }*/ 320 }*/
321 321
322 322
323 $scope.cancelStatus = function() { 323 $scope.cancelStatus = function() {
324 $('#popup1').css('display', 'none'); 324 $('#popup1').css('display', 'none');
325 } 325 }
326 $scope.ordersCost = 0; 326 $scope.ordersCost = 0;
327 $scope.ordersCount = 0; 327 $scope.ordersCount = 0;
328 328
329 $scope.orderCostAndCount = function() { 329 $scope.orderCostAndCount = function() {
330 analyticsService.orderCostAndCount().then(function(result) { 330 analyticsService.orderCostAndCount().then(function(result) {
331 $scope.ordersCost = result.cost; 331 $scope.ordersCost = result.cost;
332 $scope.ordersCount = result.count; 332 $scope.ordersCount = result.count;
333 }) 333 })
334 } 334 }
335 335
336 $scope.drf = {}; 336 $scope.drf = {};
337 $scope.hfp = {}; 337 $scope.hfp = {};
338 $scope.cs = {}; 338 $scope.cs = {};
339 $scope.mfsValues = []; 339 $scope.mfsValues = [];
340 $scope.msfarray = []; 340 $scope.msfarray = [];
341 $scope.getMFS = function() { 341 $scope.getMFS = function() {
342 //var makeId = makeId; 342 //var makeId = makeId;
343 analyticsService.getMFS().then(function(result) { 343 analyticsService.getMFS().then(function(result) {
344 $scope.mfsValues = result; 344 $scope.mfsValues = result;
345 $scope.optionsmfs = { 345 $scope.optionsmfs = {
346 chart: { 346 chart: {
347 type: 'multiBarChart', 347 type: 'multiBarChart',
348 height: 450, 348 height: 450,
349 margin: { 349 margin: {
350 top: 45, 350 top: 45,
351 right: 20, 351 right: 20,
352 bottom: 45, 352 bottom: 45,
353 left: 45 353 left: 45
354 }, 354 },
355 clipEdge: true, 355 clipEdge: true,
356 //staggerLabels: true, 356 //staggerLabels: true,
357 duration: 500, 357 duration: 500,
358 stacked: false, 358 stacked: false,
359 color: ["#FEDFC3", "#990000", "#000099", "#009900"], 359 /*color: ["#FEDFC3", "#990000", "#000099", "#009900"],*/
360 color: ["#A9A9A9", "#000099", "#990000", "#009900"],
360 xAxis: { 361 xAxis: {
361 axisLabel: 'Months', 362 axisLabel: 'Months',
362 showMaxMin: false, 363 showMaxMin: false,
363 }, 364 },
364 yAxis: { 365 yAxis: {
365 axisLabel: 'Orders', 366 axisLabel: 'Orders',
366 axisLabelDistance: -20, 367 axisLabelDistance: -20,
367 tickFormat: function(d) { 368 tickFormat: function(d) {
368 return d3.format(',.1f')(d); 369 return d3.format(',.1f')(d);
369 } 370 }
370 } 371 }
371 } 372 }
372 }; 373 };
373 $scope.datamfs = $scope.mfsValues; 374 $scope.datamfs = $scope.mfsValues;
374 }) 375 })
375 } 376 }
376 377
377 $scope.orderCostAndCount(); 378 $scope.orderCostAndCount();
378 $scope.getMFS(); 379 $scope.getMFS();
379 $scope.csValues = []; 380 $scope.csValues = [];
380 $scope.getCS = function() { 381 $scope.getCS = function() {
381 //var makeId = makeId; 382 //var makeId = makeId;
382 analyticsService.getCS().then(function(result) { 383 analyticsService.getCS().then(function(result) {
383 $scope.csValues = result; 384 $scope.csValues = result;
384 $scope.optionscs = { 385 $scope.optionscs = {
385 chart: { 386 chart: {
386 type: 'pieChart', 387 type: 'pieChart',
387 height: 500, 388 height: 500,
388 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 389 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
389 x: function(d) { 390 x: function(d) {
390 return d.key; 391 return d.key;
391 }, 392 },
392 y: function(d) { 393 y: function(d) {
393 return d.y; 394 return d.y;
394 }, 395 },
395 showLabels: false, 396 showLabels: false,
396 segmentShowStroke: false, 397 segmentShowStroke: false,
397 animationSteps: 20, 398 animationSteps: 20,
398 animationEasing: "linear", 399 animationEasing: "linear",
399 animateScale: true, 400 animateScale: true,
400 duration: 500, 401 duration: 500,
401 labelThreshold: 0.01, 402 labelThreshold: 0.01,
402 labelSunbeamLayout: true, 403 labelSunbeamLayout: true,
403 legend: { 404 legend: {
404 margin: { 405 margin: {
405 top: 5, 406 top: 5,
406 right: 35, 407 right: 35,
407 bottom: 5, 408 bottom: 5,
408 left: 0 409 left: 0
409 } 410 }
410 } 411 }
411 } 412 }
412 }; 413 };
413 $scope.datacs = $scope.csValues; 414 $scope.datacs = $scope.csValues;
414 }) 415 })
415 } 416 }
416 417
417 $scope.getCS(); 418 $scope.getCS();
418 419
419 420
420 $scope.hfpValues = []; 421 $scope.hfpValues = [];
421 $scope.getHfpChartData = function() { 422 $scope.getHfpChartData = function() {
422 //var makeId = makeId; 423 //var makeId = makeId;
423 analyticsService.gethfpChart().then(function(result) { 424 analyticsService.gethfpChart().then(function(result) {
424 $scope.hfpValues = result; 425 $scope.hfpValues = result;
425 //console.log('---kd result--',$scope.hfpValues); 426 //console.log('---kd result--',$scope.hfpValues);
426 427
427 /*Historic Fuel Price */ 428 /*Historic Fuel Price */
428 429
429 $scope.optionshfp = { 430 $scope.optionshfp = {
430 chart: { 431 chart: {
431 type: 'cumulativeLineChart', 432 type: 'cumulativeLineChart',
432 height: 450, 433 height: 450,
433 margin: { 434 margin: {
434 top: 40, 435 top: 40,
435 right: 20, 436 right: 20,
436 bottom: 50, 437 bottom: 50,
437 left: 65 438 left: 65
438 }, 439 },
439 x: function(d) { 440 x: function(d) {
440 return d[0]; 441 return d[0];
441 }, 442 },
442 y: function(d) { 443 y: function(d) {
443 return d[1] / 100 ; 444 return d[1] / 100 ;
444 }, 445 },
445 average: function(d) { 446 average: function(d) {
446 return d.mean / 100; 447 return d.mean / 100;
447 }, 448 },
448 449
449 color: ["#FEDFC3"], 450 color: ["#FEDFC3"],
450 duration: 300, 451 duration: 300,
451 useInteractiveGuideline: true, 452 useInteractiveGuideline: true,
452 clipVoronoi: false, 453 clipVoronoi: false,
453 454
454 xAxis: { 455 xAxis: {
455 axisLabel: '', 456 axisLabel: '',
456 457
457 tickFormat: function(d) { 458 tickFormat: function(d) {
458 return d3.time.format('%m/%d/%y')(new Date(d)) 459 return d3.time.format('%m/%d/%y')(new Date(d))
459 //return d3.time.format('%b \-%y')(new Date(d)) 460 //return d3.time.format('%b \-%y')(new Date(d))
460 }, 461 },
461 showMaxMin: false, 462 showMaxMin: false,
462 staggerLabels: true 463 staggerLabels: true
463 }, 464 },
464 465
465 yAxis: { 466 yAxis: {
466 axisLabel: 'PaP/Retail Price', 467 axisLabel: 'PaP/Retail Price',
467 468
468 tickFormat: function(d) { 469 tickFormat: function(d) {
469 //return d3.format('')(d).toFixed(2); 470 //return d3.format('')(d).toFixed(2);
470 return '$ '+d.toFixed(2) 471 return '$ '+d.toFixed(2)
471 }, 472 },
472 axisLabelDistance: 5 473 axisLabelDistance: 5
473 } 474 }
474 } 475 }
475 }; 476 };
476 $scope.datahfp = [{ 477 $scope.datahfp = [{
477 key: "Long", 478 key: "Long",
478 values: $scope.hfpValues, 479 values: $scope.hfpValues,
479 mean: 0 480 mean: 0
480 }]; 481 }];
481 482
482 }) 483 })
483 } 484 }
484 485
485 $scope.getHfpChartData(); 486 $scope.getHfpChartData();
486 487
487 488
488 /*Date Range Filter for Monthly fuel Sales*/ 489 /*Date Range Filter for Monthly fuel Sales*/
489 $scope.submitDate = function() { 490 $scope.submitDate = function() {
490 if ($scope.drf.fromDate === undefined) { 491 if ($scope.drf.fromDate === undefined) {
491 $scope.fillForm = true; 492 $scope.fillForm = true;
492 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') { 493 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate === undefined || $scope.drf.toDate === '') {
493 $scope.fillForm = false; 494 $scope.fillForm = false;
494 var today = new Date(); 495 var today = new Date();
495 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); 496 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2);
496 //from date format 497 //from date format
497 $scope.dat1 = $scope.drf.fromDate; 498 $scope.dat1 = $scope.drf.fromDate;
498 $scope.fd1 = $scope.dat1.split("/").reverse(); 499 $scope.fd1 = $scope.dat1.split("/").reverse();
499 $scope.tmp = $scope.fd1[2]; 500 $scope.tmp = $scope.fd1[2];
500 $scope.fd1[2] = $scope.fd1[1]; 501 $scope.fd1[2] = $scope.fd1[1];
501 $scope.fd1[1] = $scope.tmp; 502 $scope.fd1[1] = $scope.tmp;
502 $scope.fd = $scope.fd1.join("-"); 503 $scope.fd = $scope.fd1.join("-");
503 analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) { 504 analyticsService.getDRFChart($scope.fd, DefaultToDate).then(function(result) {
504 $scope.datamfs = []; 505 $scope.datamfs = [];
505 $scope.datamfs = result; 506 $scope.datamfs = result;
506 }) 507 })
507 508
508 analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) { 509 analyticsService.orderCostAndCountByDate($scope.fd, DefaultToDate).then(function(result) {
509 $scope.ordersCost = result.cost; 510 $scope.ordersCost = result.cost;
510 $scope.ordersCount = result.count; 511 $scope.ordersCount = result.count;
511 }) 512 })
512 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) { 513 } else if ($scope.drf.fromDate != undefined && $scope.drf.toDate != undefined) {
513 $scope.fillForm = false; 514 $scope.fillForm = false;
514 //from date format 515 //from date format
515 $scope.dat1 = $scope.drf.fromDate; 516 $scope.dat1 = $scope.drf.fromDate;
516 $scope.fd1 = $scope.dat1.split("/").reverse(); 517 $scope.fd1 = $scope.dat1.split("/").reverse();
517 $scope.tmp = $scope.fd1[2]; 518 $scope.tmp = $scope.fd1[2];
518 $scope.fd1[2] = $scope.fd1[1]; 519 $scope.fd1[2] = $scope.fd1[1];
519 $scope.fd1[1] = $scope.tmp; 520 $scope.fd1[1] = $scope.tmp;
520 $scope.fd = $scope.fd1.join("-"); 521 $scope.fd = $scope.fd1.join("-");
521 $scope.dat2 = $scope.drf.toDate; 522 $scope.dat2 = $scope.drf.toDate;
522 $scope.td1 = $scope.dat2.split("/").reverse(); 523 $scope.td1 = $scope.dat2.split("/").reverse();
523 $scope.tmp1 = $scope.td1[2]; 524 $scope.tmp1 = $scope.td1[2];
524 $scope.td1[2] = $scope.td1[1]; 525 $scope.td1[2] = $scope.td1[1];
525 $scope.td1[1] = $scope.tmp1; 526 $scope.td1[1] = $scope.tmp1;
526 $scope.td = $scope.td1.join("-"); 527 $scope.td = $scope.td1.join("-");
527 528
528 analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) { 529 analyticsService.getDRFChart($scope.fd, $scope.td).then(function(result) {
529 $scope.datamfs = []; 530 $scope.datamfs = [];
530 $scope.datamfs = result; 531 $scope.datamfs = result;
531 }) 532 })
532 533
533 analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) { 534 analyticsService.orderCostAndCountByDate($scope.fd, $scope.td).then(function(result) {
534 $scope.ordersCost = result.cost; 535 $scope.ordersCost = result.cost;
535 $scope.ordersCount = result.count; 536 $scope.ordersCount = result.count;
536 }) 537 })
537 538
538 } else { 539 } else {
539 $scope.fillForm = true; 540 $scope.fillForm = true;
540 } 541 }
541 542
542 543
543 } 544 }
544 545
545 /*Date Range Filter for Historic fuel Price*/ 546 /*Date Range Filter for Historic fuel Price*/
546 $scope.submitDateHfp = function() { 547 $scope.submitDateHfp = function() {
547 548
548 if ($scope.hfp.fromDate === undefined) { 549 if ($scope.hfp.fromDate === undefined) {
549 550
550 $scope.fillForm = true; 551 $scope.fillForm = true;
551 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { 552 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') {
552 $scope.fillForm = false; 553 $scope.fillForm = false;
553 var today = new Date(); 554 var today = new Date();
554 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); 555 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2);
555 //from date format 556 //from date format
556 $scope.dat1 = $scope.hfp.fromDate; 557 $scope.dat1 = $scope.hfp.fromDate;
557 $scope.fd1 = $scope.dat1.split("/").reverse(); 558 $scope.fd1 = $scope.dat1.split("/").reverse();
558 $scope.tmp = $scope.fd1[2]; 559 $scope.tmp = $scope.fd1[2];
559 $scope.fd1[2] = $scope.fd1[1]; 560 $scope.fd1[2] = $scope.fd1[1];
560 $scope.fd1[1] = $scope.tmp; 561 $scope.fd1[1] = $scope.tmp;
561 $scope.fd = $scope.fd1.join("-"); 562 $scope.fd = $scope.fd1.join("-");
562 analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { 563 analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) {
563 $scope.hfpValues = result; 564 $scope.hfpValues = result;
564 $scope.optionshfp = { 565 $scope.optionshfp = {
565 chart: { 566 chart: {
566 type: 'cumulativeLineChart', 567 type: 'cumulativeLineChart',
567 height: 450, 568 height: 450,
568 margin: { 569 margin: {
569 top: 40, 570 top: 40,
570 right: 20, 571 right: 20,
571 bottom: 50, 572 bottom: 50,
572 left: 65 573 left: 65
573 }, 574 },
574 x: function(d) { 575 x: function(d) {
575 return d[0]; 576 return d[0];
576 }, 577 },
577 y: function(d) { 578 y: function(d) {
578 return d[1] / 100; 579 return d[1] / 100;
579 }, 580 },
580 average: function(d) { 581 average: function(d) {
581 return d.mean / 100; 582 return d.mean / 100;
582 }, 583 },
583 584
584 color: ["#FEDFC3"], 585 color: ["#FEDFC3"],
585 duration: 300, 586 duration: 300,
586 useInteractiveGuideline: true, 587 useInteractiveGuideline: true,
587 clipVoronoi: false, 588 clipVoronoi: false,
588 589
589 xAxis: { 590 xAxis: {
590 axisLabel: '', 591 axisLabel: '',
591 592
592 tickFormat: function(d) { 593 tickFormat: function(d) {
593 return d3.time.format('%d / %m / %y')(new Date(d)) 594 return d3.time.format('%d / %m / %y')(new Date(d))
594 // return d3.time.format('%b \-%y')(new Date(d)) 595 // return d3.time.format('%b \-%y')(new Date(d))
595 }, 596 },
596 showMaxMin: false, 597 showMaxMin: false,
597 staggerLabels: true 598 staggerLabels: true
598 }, 599 },
599 600
600 yAxis: { 601 yAxis: {
601 axisLabel: 'PaP/Retail Price', 602 axisLabel: 'PaP/Retail Price',
602 603
603 tickFormat: function(d) { 604 tickFormat: function(d) {
604 //return d3.format('')(d).toFixed(2); 605 //return d3.format('')(d).toFixed(2);
605 return '$ '+d.toFixed(2) 606 return '$ '+d.toFixed(2)
606 }, 607 },
607 axisLabelDistance: 5 608 axisLabelDistance: 5
608 } 609 }
609 } 610 }
610 }; 611 };
611 $scope.datahfp = [{ 612 $scope.datahfp = [{
612 key: "Long", 613 key: "Long",
613 values: $scope.hfpValues, 614 values: $scope.hfpValues,
614 mean: 0 615 mean: 0
615 }]; 616 }];
616 }) 617 })
617 618
618 619
619 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) { 620 } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate != undefined) {
620 $scope.fillForm = false; 621 $scope.fillForm = false;
621 //from date format 622 //from date format
622 $scope.dat1 = $scope.hfp.fromDate; 623 $scope.dat1 = $scope.hfp.fromDate;
623 $scope.fd1 = $scope.dat1.split("/").reverse(); 624 $scope.fd1 = $scope.dat1.split("/").reverse();
624 $scope.tmp = $scope.fd1[2]; 625 $scope.tmp = $scope.fd1[2];
625 $scope.fd1[2] = $scope.fd1[1]; 626 $scope.fd1[2] = $scope.fd1[1];
626 $scope.fd1[1] = $scope.tmp; 627 $scope.fd1[1] = $scope.tmp;
627 $scope.fd = $scope.fd1.join("-"); 628 $scope.fd = $scope.fd1.join("-");
628 //to date format 629 //to date format
629 $scope.dat2 = $scope.hfp.toDate; 630 $scope.dat2 = $scope.hfp.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.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { 637 analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) {
637 console.log("===DRF HPF====",result)
638 $scope.hfpValues = result; 638 $scope.hfpValues = result;
639 $scope.optionshfp = { 639 $scope.optionshfp = {
640 chart: { 640 chart: {
641 type: 'cumulativeLineChart', 641 type: 'cumulativeLineChart',
642 height: 450, 642 height: 450,
643 margin: { 643 margin: {
644 top: 40, 644 top: 40,
645 right: 20, 645 right: 20,
646 bottom: 50, 646 bottom: 50,
647 left: 65 647 left: 65
648 }, 648 },
649 x: function(d) { 649 x: function(d) {
650 return d[0]; 650 return d[0];
651 }, 651 },
652 y: function(d) { 652 y: function(d) {
653 return d[1] / 100 ; 653 return d[1] / 100 ;
654 }, 654 },
655 average: function(d) { 655 average: function(d) {
656 return d.mean / 100; 656 return d.mean / 100;
657 }, 657 },
658 658
659 color: ["#FEDFC3"], 659 color: ["#FEDFC3"],
660 duration: 300, 660 duration: 300,
661 useInteractiveGuideline: true, 661 useInteractiveGuideline: true,
662 clipVoronoi: false, 662 clipVoronoi: false,
663 663
664 xAxis: { 664 xAxis: {
665 axisLabel: '', 665 axisLabel: '',
666 666
667 tickFormat: function(d) { 667 tickFormat: function(d) {
668 return d3.time.format('%d / %m / %y')(new Date(d)) 668 return d3.time.format('%d / %m / %y')(new Date(d))
669 //return d3.time.format('%b \-%y')(new Date(d)) 669 //return d3.time.format('%b \-%y')(new Date(d))
670 }, 670 },
671 showMaxMin: false, 671 showMaxMin: false,
672 staggerLabels: true 672 staggerLabels: true
673 }, 673 },
674 674
675 yAxis: { 675 yAxis: {
676 axisLabel: 'PaP/Retail Price', 676 axisLabel: 'PaP/Retail Price',
677 677
678 tickFormat: function(d) { 678 tickFormat: function(d) {
679 //return d3.format('')(d).toFixed(2); 679 //return d3.format('')(d).toFixed(2);
680 return '$ '+d.toFixed(2) 680 return '$ '+d.toFixed(2)
681 }, 681 },
682 axisLabelDistance: 5 682 axisLabelDistance: 5
683 } 683 }
684 } 684 }
685 }; 685 };
686 $scope.datahfp = [{ 686 $scope.datahfp = [{
687 key: "Long", 687 key: "Long",
688 values:$scope.hfpValues, 688 values:$scope.hfpValues,
689 mean: 0 689 mean: 0
690 }]; 690 }];
691 }) 691 })
692 692
693 } else { 693 } else {
694 $scope.fillForm = true; 694 $scope.fillForm = true;
695 } 695 }
696 696
697 697
698 } 698 }
699 699
700 /*Date Range Filter for Customer Sources*/ 700 /*Date Range Filter for Customer Sources*/
701 $scope.submitDateCs = function() { 701 $scope.submitDateCs = function() {
702 if ($scope.cs.fromDate === undefined) { 702 if ($scope.cs.fromDate === undefined) {
703 703
704 $scope.fillForm = true; 704 $scope.fillForm = true;
705 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') { 705 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate === undefined || $scope.cs.toDate === '') {
706 $scope.fillForm = false; 706 $scope.fillForm = false;
707 var today = new Date(); 707 var today = new Date();
708 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); 708 var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2);
709 //from date format 709 //from date format
710 $scope.dat1 = $scope.cs.fromDate; 710 $scope.dat1 = $scope.cs.fromDate;
711 $scope.fd1 = $scope.dat1.split("/").reverse(); 711 $scope.fd1 = $scope.dat1.split("/").reverse();
712 $scope.tmp = $scope.fd1[2]; 712 $scope.tmp = $scope.fd1[2];
713 $scope.fd1[2] = $scope.fd1[1]; 713 $scope.fd1[2] = $scope.fd1[1];
714 $scope.fd1[1] = $scope.tmp; 714 $scope.fd1[1] = $scope.tmp;
715 $scope.fd = $scope.fd1.join("-"); 715 $scope.fd = $scope.fd1.join("-");
716 analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) { 716 analyticsService.getDRFCSChart($scope.fd, DefaultToDate).then(function(result) {
717 $scope.csValues = result; 717 $scope.csValues = result;
718 $scope.optionscs = { 718 $scope.optionscs = {
719 chart: { 719 chart: {
720 type: 'pieChart', 720 type: 'pieChart',
721 height: 500, 721 height: 500,
722 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 722 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
723 x: function(d) { 723 x: function(d) {
724 return d.key; 724 return d.key;
725 }, 725 },
726 y: function(d) { 726 y: function(d) {
727 return d.y; 727 return d.y;
728 }, 728 },
729 showLabels: false, 729 showLabels: false,
730 segmentShowStroke: false, 730 segmentShowStroke: false,
731 animationSteps: 20, 731 animationSteps: 20,
732 animationEasing: "linear", 732 animationEasing: "linear",
733 animateScale: true, 733 animateScale: true,
734 duration: 500, 734 duration: 500,
735 labelThreshold: 0.01, 735 labelThreshold: 0.01,
736 labelSunbeamLayout: true, 736 labelSunbeamLayout: true,
737 legend: { 737 legend: {
738 margin: { 738 margin: {
739 top: 5, 739 top: 5,
740 right: 35, 740 right: 35,
741 bottom: 5, 741 bottom: 5,
742 left: 0 742 left: 0
743 } 743 }
744 } 744 }
745 } 745 }
746 }; 746 };
747 $scope.datacs = $scope.csValues; 747 $scope.datacs = $scope.csValues;
748 }) 748 })
749 749
750 750
751 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) { 751 } else if ($scope.cs.fromDate != undefined && $scope.cs.toDate != undefined) {
752 $scope.fillForm = false; 752 $scope.fillForm = false;
753 //from date format 753 //from date format
754 $scope.dat1 = $scope.cs.fromDate; 754 $scope.dat1 = $scope.cs.fromDate;
755 $scope.fd1 = $scope.dat1.split("/").reverse(); 755 $scope.fd1 = $scope.dat1.split("/").reverse();
756 $scope.tmp = $scope.fd1[2]; 756 $scope.tmp = $scope.fd1[2];
757 $scope.fd1[2] = $scope.fd1[1]; 757 $scope.fd1[2] = $scope.fd1[1];
758 $scope.fd1[1] = $scope.tmp; 758 $scope.fd1[1] = $scope.tmp;
759 $scope.fd = $scope.fd1.join("-"); 759 $scope.fd = $scope.fd1.join("-");
760 //to date format 760 //to date format
761 $scope.dat2 = $scope.cs.toDate; 761 $scope.dat2 = $scope.cs.toDate;
762 $scope.td1 = $scope.dat2.split("/").reverse(); 762 $scope.td1 = $scope.dat2.split("/").reverse();
763 $scope.tmp1 = $scope.td1[2]; 763 $scope.tmp1 = $scope.td1[2];
764 $scope.td1[2] = $scope.td1[1]; 764 $scope.td1[2] = $scope.td1[1];
765 $scope.td1[1] = $scope.tmp1; 765 $scope.td1[1] = $scope.tmp1;
766 $scope.td = $scope.td1.join("-"); 766 $scope.td = $scope.td1.join("-");
767 767
768 analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) { 768 analyticsService.getDRFCSChart($scope.fd, $scope.td).then(function(result) {
769 $scope.csValues = result; 769 $scope.csValues = result;
770 $scope.optionscs = { 770 $scope.optionscs = {
771 chart: { 771 chart: {
772 type: 'pieChart', 772 type: 'pieChart',
773 height: 500, 773 height: 500,
774 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"], 774 // color: ["#FEDFC3","#D89700","#FFE8B3","FFD980","#FF7F0E","#fff2e6","#ffcc99","#ffa64d","#ff8c1a","#B37D00","#f5f5f0","#e0e0d1","#ccccb3","#adad85","#999966","#7a7a52"],
775 x: function(d) { 775 x: function(d) {
776 return d.key; 776 return d.key;
777 }, 777 },
778 y: function(d) { 778 y: function(d) {
779 return d.y; 779 return d.y;
780 }, 780 },
781 showLabels: false, 781 showLabels: false,
782 segmentShowStroke: false, 782 segmentShowStroke: false,
783 animationSteps: 20, 783 animationSteps: 20,
784 animationEasing: "linear", 784 animationEasing: "linear",
785 animateScale: true, 785 animateScale: true,
786 duration: 500, 786 duration: 500,
787 labelThreshold: 0.01, 787 labelThreshold: 0.01,
788 labelSunbeamLayout: true, 788 labelSunbeamLayout: true,
789 legend: { 789 legend: {
790 margin: { 790 margin: {
791 top: 5, 791 top: 5,
792 right: 35, 792 right: 35,
793 bottom: 5, 793 bottom: 5,
794 left: 0 794 left: 0
795 } 795 }
796 } 796 }
797 } 797 }
798 }; 798 };
799 $scope.datacs = $scope.csValues; 799 $scope.datacs = $scope.csValues;
800 }) 800 })
801 801
802 } else { 802 } else {
803 $scope.fillForm = true; 803 $scope.fillForm = true;
804 } 804 }
805 805
806 806
807 } 807 }
808 808
809 809
app/partials/customers/customers.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acufuel') 4 angular.module('acufuel')
5 .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]); 5 .controller('customersController', [ '$scope', '$rootScope', '$uibModal', '$filter', '$http', '$state', 'CustomersService', 'ViewCompanyService', 'NgTableParams', 'fuelOrdersService', 'enterFuelOrderService', customersController ]);
6 6
7 function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) { 7 function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams, fuelOrdersService, enterFuelOrderService) {
8 $(document).ready(function() { 8 $(document).ready(function() {
9 // $('#example').DataTable(); 9 // $('#example').DataTable();
10 }); 10 });
11 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) 11 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId'))
12 $scope.reset2 = function() { 12 $scope.reset2 = function() {
13 $("input").val(""); 13 $("input").val("");
14 $scope.removeMarginValidation(); 14 $scope.removeMarginValidation();
15 } 15 }
16 16
17 $scope.order = {}; 17 $scope.order = {};
18 $scope.order.upliftDate = ''; 18 $scope.order.upliftDate = '';
19 $scope.data = {}; 19 $scope.data = {};
20 $scope.aircraft = {}; 20 $scope.aircraft = {};
21 $scope.data.activate = true; 21 $scope.data.activate = true;
22 $scope.showLoader = true; 22 $scope.showLoader = true;
23 $scope.jetShow = []; 23 $scope.jetShow = [];
24 $scope.marginShow = []; 24 $scope.marginShow = [];
25 25
26 $scope.jetShow[0] = true; 26 $scope.jetShow[0] = true;
27 $scope.marginShow[0] = true; 27 $scope.marginShow[0] = true;
28 $scope.dispatchOrder = {}; 28 $scope.dispatchOrder = {};
29 $scope.dispatchOrder.fuelOrderList = []; 29 $scope.dispatchOrder.fuelOrderList = [];
30 $scope.statusFilterOptions = []; 30 $scope.statusFilterOptions = [];
31 $scope.companyList = {}; 31 $scope.companyList = {};
32 $scope.statusFilterOptions.push({ 32 $scope.statusFilterOptions.push({
33 'id' : '', 33 'id' : '',
34 'title' : 'Show All' 34 'title' : 'Show All'
35 }, { 35 }, {
36 'id' : 'pending', 36 'id' : 'pending',
37 'title' : 'Pending' 37 'title' : 'Pending'
38 }, { 38 }, {
39 'id' : 'invoiced', 39 'id' : 'invoiced',
40 'title' : 'Invoiced' 40 'title' : 'Invoiced'
41 }, { 41 }, {
42 'id' : 'paid', 42 'id' : 'paid',
43 'title' : 'Paid' 43 'title' : 'Paid'
44 }, { 44 }, {
45 'id' : 'cancelled', 45 'id' : 'cancelled',
46 'title' : 'Cancelled' 46 'title' : 'Cancelled'
47 }, { 47 }, {
48 'id' : 'archived', 48 'id' : 'archived',
49 'title' : 'Archived' 49 'title' : 'Archived'
50 } 50 }
51 51
52 ); 52 );
53 53
54 getAllCompanies();
55
56 /*function getAllCompanies(){ 54 /*function getAllCompanies(){
57 CustomersService.getAllCompanies().then(function(result) { 55 CustomersService.getAllCompanies().then(function(result) {
58 $scope.companyList = result; 56 $scope.companyList = result;
59 for(var i=0; i<$scope.companyList.length; i++){ 57 for(var i=0; i<$scope.companyList.length; i++){
60 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; 58 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id;
61 } 59 }
62 }) 60 })
63 61
64 }*/ 62 }*/
65 63
66 $scope.statusFilter = [ 64 $scope.statusFilter = [
67 { 65 {
68 id : "", 66 id : "",
69 title : "Show All" 67 title : "Show All"
70 }, 68 },
71 { 69 {
72 id : "true", 70 id : "true",
73 title : "Active" 71 title : "Active"
74 }, 72 },
75 { 73 {
76 id : "false", 74 id : "false",
77 title : "Inactive" 75 title : "Inactive"
78 } 76 }
79 ] 77 ]
80 78
81 function getAllCompanies() { 79 function getAllCompanies() {
82 CustomersService.getAllCompanies().then(function(result) { 80 CustomersService.getAllCompanies().then(function(result) {
83 $scope.companyList = result; 81 $scope.companyList = result;
84 for (var i = 0; i < $scope.companyList.length; i++) { 82 for (var i = 0; i < $scope.companyList.length; i++) {
85 if ($scope.companyList[i].companyContact != null) { 83 if ($scope.companyList[i].companyContact != null) {
86 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { 84 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) {
87 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; 85 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber;
88 } 86 }
89 } 87 }
90 if ($scope.companyList[i].primaryContact != null) { 88 if ($scope.companyList[i].primaryContact != null) {
91 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { 89 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) {
92 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; 90 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName;
93 } 91 }
94 } 92 }
95 if ($scope.companyList[i].margin != null) { 93 if ($scope.companyList[i].margin != null) {
96 if ($scope.companyList[i].margin.marginName != null) { 94 if ($scope.companyList[i].margin.marginName != null) {
97 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; 95 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id;
98 } 96 }
99 } 97 }
100 } 98 }
101 $scope.displayCompanyList = new NgTableParams({ 99 $scope.displayCompanyList = new NgTableParams({
102 page : 1, 100 page : 1,
103 count : 10, 101 count : 10,
104 }, { 102 }, {
105 data : $scope.companyList 103 data : $scope.companyList
106 }); 104 });
107 $scope.showLoader = false; 105 $scope.showLoader = false;
108 }) 106 })
109 } 107 }
110 108
109 getAllCompanies();
110
111 $scope.editMargin = function(customer) { 111 $scope.editMargin = function(customer) {
112 //console.log('customer', customer); 112 //console.log('customer', customer);
113 $scope.showLoader = true; 113 $scope.showLoader = true;
114 event.stopPropagation(); 114 event.stopPropagation();
115 115
116 var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin 116 var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin
117 + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state=" 117 + "&addressOne=" + customer.addressOne + "&addressTwo=" + customer.addressTwo + "&city=" + customer.city + "&state="
118 + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote=" 118 + customer.state + "&country=" + customer.country + "&zipcode=" + customer.zipcode + "&internalNote="
119 + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant 119 + customer.internalNote + "&certificateType=" + customer.certificateType + "&baseTenant=" + customer.baseTenant
120 + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor 120 + "&fuelerlinxCustomer=" + customer.fuelerlinxCustomer + "&contractFuelVendor=" + customer.contractFuelVendor
121 + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id; 121 + "&activate=" + customer.activate + "&baseIcao=" + customer.baseIcao + "&companyId=" + customer.id;
122 122
123 ViewCompanyService.updateCompany(companyMargin).then(function(result) { 123 ViewCompanyService.updateCompany(companyMargin).then(function(result) {
124 if (result != null && result.success) { 124 if (result != null && result.success) {
125 $scope.showLoader = false; 125 $scope.showLoader = false;
126 toastr.success('' + result.success + '', { 126 toastr.success('' + result.success + '', {
127 closeButton : true 127 closeButton : true
128 }) 128 })
129 getAllCompanies(); 129 getAllCompanies();
130 } else { 130 } else {
131 $scope.showLoader = false; 131 $scope.showLoader = false;
132 toastr.error('' + result.statusText + '', { 132 toastr.error('' + result.statusText + '', {
133 closeButton : true 133 closeButton : true
134 }) 134 })
135 } 135 }
136 }) 136 })
137 } 137 }
138 138
139 getData(); 139 getData();
140 function getData() { 140 function getData() {
141 $scope.showLoader = true; 141 $scope.showLoader = true;
142 CustomersService.getAircraftMake().then(function(result) { 142 CustomersService.getAircraftMake().then(function(result) {
143 //console.log("==aircrafts===",result) 143 //console.log("==aircrafts===",result)
144 $scope.aircraftMakeList = result; 144 $scope.aircraftMakeList = result;
145 $scope.showLoader = false; 145 $scope.showLoader = false;
146 }) 146 })
147 } 147 }
148 // CustomersService.getMargin().then(function(result) { 148 // CustomersService.getMargin().then(function(result) {
149 // $scope.marginList = result; 149 // $scope.marginList = result;
150 // }) 150 // })
151 $scope.marginFilterOptions = []; 151 $scope.marginFilterOptions = [];
152 CustomersService.getJetMargin($scope.userProfileId).then(function(result) { 152 CustomersService.getJetMargin($scope.userProfileId).then(function(result) {
153 $scope.showLoader = true; 153 $scope.showLoader = true;
154 $scope.jetMarginList = result; 154 $scope.jetMarginList = result;
155 //console.log("jet margin",result,$scope.userProfileId) 155 //console.log("jet margin",result,$scope.userProfileId)
156 $scope.marginFilterOptions.push({ 156 $scope.marginFilterOptions.push({
157 'id' : '', 157 'id' : '',
158 'title' : 'Show All' 158 'title' : 'Show All'
159 }); 159 });
160 for (var i = 0; i < result.length; i++) { 160 for (var i = 0; i < result.length; i++) {
161 $scope.marginFilterOptions.push({ 161 $scope.marginFilterOptions.push({
162 'id' : result[i].id, 162 'id' : result[i].id,
163 'title' : result[i].marginName 163 'title' : result[i].marginName
164 }) 164 })
165 } 165 }
166 $scope.showLoader = false; 166 $scope.showLoader = false;
167 }) 167 })
168 168
169 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { 169 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) {
170 $scope.avgsMarginList = result; 170 $scope.avgsMarginList = result;
171 // console.log('avgsMarginList',result) 171 // console.log('avgsMarginList',result)
172 }) 172 })
173 173
174 174
175 $scope.showCompanyError = false; 175 $scope.showCompanyError = false;
176 $scope.showMarginError = false; 176 $scope.showMarginError = false;
177 177
178 $scope.removeValidation = function() { 178 $scope.removeValidation = function() {
179 $scope.showCompanyError = false; 179 $scope.showCompanyError = false;
180 $('.companyNameInput').removeClass('customErrorInput'); 180 $('.companyNameInput').removeClass('customErrorInput');
181 if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { 181 if ($scope.data.companyName == 'undefined' || $scope.data.companyName == '') {
182 $('.companyNameInput').addClass('customErrorInput'); 182 $('.companyNameInput').addClass('customErrorInput');
183 $scope.showCompanyError = true; 183 $scope.showCompanyError = true;
184 } 184 }
185 } 185 }
186 186
187 $scope.removeMarginValidation = function() { 187 $scope.removeMarginValidation = function() {
188 $scope.showMarginError = false; 188 $scope.showMarginError = false;
189 $('.marginSelectBox').removeClass('customErrorInput'); 189 $('.marginSelectBox').removeClass('customErrorInput');
190 } 190 }
191 191
192 var companyData; 192 var companyData;
193 $scope.addFirstData = function(sel, step) { 193 $scope.addFirstData = function(sel, step) {
194 $scope.showLoader = true; 194 $scope.showLoader = true;
195 if ($scope.data.companyName == undefined) { 195 if ($scope.data.companyName == undefined) {
196 $scope.showCompanyError = true; 196 $scope.showCompanyError = true;
197 $('.companyNameInput').addClass('customErrorInput'); 197 $('.companyNameInput').addClass('customErrorInput');
198 } else if ($scope.data.masterMargin == undefined) { 198 } else if ($scope.data.masterMargin == undefined) {
199 $scope.showMarginError = true; 199 $scope.showMarginError = true;
200 $('.marginSelectBox').addClass('customErrorInput'); 200 $('.marginSelectBox').addClass('customErrorInput');
201 } else { 201 } else {
202 $scope.aircraftDetails = [ { 202 $scope.aircraftDetails = [ {
203 'tail' : '', 203 'tail' : '',
204 'make' : '', 204 'make' : '',
205 'model' : '', 205 'model' : '',
206 'sizeId' : '', 206 'sizeId' : '',
207 'marginId' : $scope.data.masterMargin, 207 'marginId' : $scope.data.masterMargin,
208 'avgasMarginId' : $scope.data.avgasMargin 208 'avgasMarginId' : $scope.data.avgasMargin
209 } ]; 209 } ];
210 210
211 $(sel).trigger('next.m.' + step); 211 $(sel).trigger('next.m.' + step);
212 getData(); 212 getData();
213 } 213 }
214 $scope.showLoader = false; 214 $scope.showLoader = false;
215 } 215 }
216 216
217 $scope.addNew = function() { 217 $scope.addNew = function() {
218 $scope.showLoader = true; 218 $scope.showLoader = true;
219 $scope.aircraftDetails.push({ 219 $scope.aircraftDetails.push({
220 'tail' : '', 220 'tail' : '',
221 'make' : '', 221 'make' : '',
222 'model' : '', 222 'model' : '',
223 'sizeId' : '', 223 'sizeId' : '',
224 'marginId' : $scope.data.masterMargin, 224 'marginId' : $scope.data.masterMargin,
225 'avgasMarginId' : $scope.data.avgasMargin 225 'avgasMarginId' : $scope.data.avgasMargin
226 }); 226 });
227 $scope.showLoader = false; 227 $scope.showLoader = false;
228 }; 228 };
229 229
230 $scope.aircraftIdx = ''; 230 $scope.aircraftIdx = '';
231 $scope.checkTail = function(tail, idx){ 231 $scope.checkTail = function(tail, idx){
232 var data = "tail=" + tail; 232 var data = "tail=" + tail;
233 $scope.aircraftIdx = idx; 233 $scope.aircraftIdx = idx;
234 CustomersService.checkTailRegistration(data).then(function(result) { 234 CustomersService.checkTailRegistration(data).then(function(result) {
235 if(result.error) { 235 if(result.error) {
236 $scope.aircraftMessage = result.error; 236 $scope.aircraftMessage = result.error;
237 $scope.openAddAirCraftError(); 237 $scope.openAddAirCraftError();
238 } else if(result.warning) { 238 } else if(result.warning) {
239 $scope.aircraftMessage = result.warning; 239 $scope.aircraftMessage = result.warning;
240 $scope.openAddAirCraftWarning(); 240 $scope.openAddAirCraftWarning();
241 } 241 }
242 }) 242 })
243 } 243 }
244 244
245 $scope.openAddAirCraftError = function() { 245 $scope.openAddAirCraftError = function() {
246 $('#addAirCraftError').css('display', 'block'); 246 $('#addAirCraftError').css('display', 'block');
247 } 247 }
248 248
249 $scope.openAddAirCraftWarning = function() { 249 $scope.openAddAirCraftWarning = function() {
250 $('#addAirCraftWarning').css('display', 'block'); 250 $('#addAirCraftWarning').css('display', 'block');
251 } 251 }
252 $scope.acceptAirCraftError = function() { 252 $scope.acceptAirCraftError = function() {
253 $('#addAirCraftWarning').css('display', 'none'); 253 $('#addAirCraftWarning').css('display', 'none');
254 } 254 }
255 255
256 $scope.cancelAirCraftError = function() { 256 $scope.cancelAirCraftError = function() {
257 $scope.aircraftDetails[$scope.aircraftIdx].tail = ''; 257 $scope.aircraftDetails[$scope.aircraftIdx].tail = '';
258 $('#addAirCraftWarning').css('display', 'none'); 258 $('#addAirCraftWarning').css('display', 'none');
259 $('#addAirCraftError').css('display', 'none'); 259 $('#addAirCraftError').css('display', 'none');
260 } 260 }
261 261
262 262
263 /*$scope.getModal = function(makeId, index) { 263 /*$scope.getModal = function(makeId, index) {
264 $scope.showLoader = true; 264 $scope.showLoader = true;
265 CustomersService.getModal($scope.aircraft.make).then(function(result) { 265 CustomersService.getModal($scope.aircraft.make).then(function(result) {
266 $scope.showLoader = false; 266 $scope.showLoader = false;
267 $scope.aircraftDetails[index].aircraftModalList = result; 267 $scope.aircraftDetails[index].aircraftModalList = result;
268 }) 268 })
269 }*/ 269 }*/
270 $scope.getModal = function(makeId, index) { 270 $scope.getModal = function(makeId, index) {
271 $scope.showLoader = true; 271 $scope.showLoader = true;
272 $scope.aircraft.make = makeId; 272 $scope.aircraft.make = makeId;
273 CustomersService.getModal($scope.aircraft.make).then(function(result) { 273 CustomersService.getModal($scope.aircraft.make).then(function(result) {
274 $scope.showLoader = false; 274 $scope.showLoader = false;
275 $scope.aircraftDetails[index].aircraftModalList = result; 275 $scope.aircraftDetails[index].aircraftModalList = result;
276 }) 276 })
277 } 277 }
278 278
279 279
280 $scope.selectedOption = ''; 280 $scope.selectedOption = '';
281 $scope.getSize = function(model, index) { 281 $scope.getSize = function(model, index) {
282 $scope.showLoader = true; 282 $scope.showLoader = true;
283 $scope.aircraft.model = model; 283 $scope.aircraft.model = model;
284 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { 284 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) {
285 $scope.showLoader = false; 285 $scope.showLoader = false;
286 $scope.aircraftDetails[index].aircraftSizeList = result; 286 $scope.aircraftDetails[index].aircraftSizeList = result;
287 287
288 }) 288 })
289 } 289 }
290 290
291 /*$scope.getSize = function(model, index) { 291 /*$scope.getSize = function(model, index) {
292 $scope.showLoader = true; 292 $scope.showLoader = true;
293 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { 293 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) {
294 $scope.showLoader = false; 294 $scope.showLoader = false;
295 $scope.aircraftDetails[index].aircraftSizeList = result; 295 $scope.aircraftDetails[index].aircraftSizeList = result;
296 }) 296 })
297 }*/ 297 }*/
298 298
299 $scope.getFuelType = function(size, index) { 299 $scope.getFuelType = function(size, index) {
300 $scope.showLoader = true; 300 $scope.showLoader = true;
301 var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size; 301 var data = "model="+$scope.aircraft.model+"&make="+$scope.aircraft.make+"&sizeId="+size;
302 ViewCompanyService.checkFuelType(data).then(function(result){ 302 ViewCompanyService.checkFuelType(data).then(function(result){
303 $scope.showLoader = false; 303 $scope.showLoader = false;
304 if (result.type == "JetA") { 304 if (result.type == "JetA") {
305 $scope.jetShow[index] = false; 305 $scope.jetShow[index] = false;
306 $scope.marginShow[index] = true; 306 $scope.marginShow[index] = true;
307 } else if (result.type == "Avgas") { 307 } else if (result.type == "Avgas") {
308 $scope.jetShow[index] = true; 308 $scope.jetShow[index] = true;
309 $scope.marginShow[index] = false; 309 $scope.marginShow[index] = false;
310 }else { 310 }else {
311 $scope.jetShow[index] = true; 311 $scope.jetShow[index] = true;
312 $scope.marginShow[index] = true; 312 $scope.marginShow[index] = true;
313 } 313 }
314 }) 314 })
315 } 315 }
316 316
317 $scope.aircraftListData = {}; 317 $scope.aircraftListData = {};
318 $scope.addData = []; 318 $scope.addData = [];
319 $scope.tailArray = []; 319 $scope.tailArray = [];
320 function check(array){ 320 function check(array){
321 return (new Set(array)).size !== array.length; 321 return (new Set(array)).size !== array.length;
322 } 322 }
323 $scope.saveCompanyData = function() { 323 $scope.saveCompanyData = function() {
324 // console.log("company data --",$scope.data) 324 // console.log("company data --",$scope.data)
325 CustomersService.addCompany($scope.data).then(function(result) { 325 CustomersService.addCompany($scope.data).then(function(result) {
326 $scope.tailArray = []; 326 $scope.tailArray = [];
327 $scope.addData =[]; 327 $scope.addData =[];
328 $scope.accountId = result; 328 $scope.accountId = result;
329 $scope.aircraft.accountId = $scope.accountId; 329 $scope.aircraft.accountId = $scope.accountId;
330 330
331 for (var i = 0; i < $scope.aircraftDetails.length; i++) { 331 for (var i = 0; i < $scope.aircraftDetails.length; i++) {
332 $scope.addData.push({ 332 $scope.addData.push({
333 'tail' : $scope.aircraftDetails[i].tail, 333 'tail' : $scope.aircraftDetails[i].tail,
334 'make' : $scope.aircraftDetails[i].make, 334 'make' : $scope.aircraftDetails[i].make,
335 'model' : $scope.aircraftDetails[i].model, 335 'model' : $scope.aircraftDetails[i].model,
336 'sizeId' : $scope.aircraftDetails[i].sizeId, 336 'sizeId' : $scope.aircraftDetails[i].sizeId,
337 'marginId' : $scope.aircraftDetails[i].marginId, 337 'marginId' : $scope.aircraftDetails[i].marginId,
338 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId 338 'avgasMarginId' : $scope.aircraftDetails[i].avgasMarginId
339 }); 339 });
340 $scope.tailArray.push($scope.aircraftDetails[i].tail); 340 $scope.tailArray.push($scope.aircraftDetails[i].tail);
341 } 341 }
342 342
343 if (check($scope.tailArray)) { 343 if (check($scope.tailArray)) {
344 toastr.error('Duplicate Tail Added.', { 344 toastr.error('Duplicate Tail Added.', {
345 closeButton: true 345 closeButton: true
346 }) 346 })
347 }else{ 347 }else{
348 $scope.aircraftListData.aircraftList = $scope.addData; 348 $scope.aircraftListData.aircraftList = $scope.addData;
349 $scope.aircraftListData.accountId = $scope.aircraft.accountId; 349 $scope.aircraftListData.accountId = $scope.aircraft.accountId;
350 /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) { 350 /*if ($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null) {
351 $scope.aircraftListData.aircraftList = []; 351 $scope.aircraftListData.aircraftList = [];
352 }*/ 352 }*/
353 353
354 CustomersService.addAircraft($scope.aircraftListData).then(function(result) { 354 CustomersService.addAircraft($scope.aircraftListData).then(function(result) {
355 355
356 if (result != null && result.success) { 356 if (result != null && result.success) {
357 357
358 toastr.success('' + result.success + '', { 358 toastr.success('' + result.success + '', {
359 closeButton : true 359 closeButton : true
360 }) 360 })
361 $('#demo-modal-3').css('display', 'none'); 361 $('#demo-modal-3').css('display', 'none');
362 $('.modal-backdrop').css('display', 'none'); 362 $('.modal-backdrop').css('display', 'none');
363 getAllCompanies(); 363 getAllCompanies();
364 location.reload(); 364 location.reload();
365 } else { 365 } else {
366 toastr.error('' + result.statusText + '', { 366 toastr.error('' + result.statusText + '', {
367 closeButton : true 367 closeButton : true
368 }) 368 })
369 } 369 }
370 }); 370 });
371 } 371 }
372 }) 372 })
373 } 373 }
374 374
375 /*add a fuel order*/ 375 /*add a fuel order*/
376 $scope.getOrders = function() { 376 $scope.getOrders = function() {
377 fuelOrdersService.getOrders().then(function(result) { 377 fuelOrdersService.getOrders().then(function(result) {
378 //console.log("==get orders===",result) 378 //console.log("==get orders===",result)
379 $scope.orderdata = result; 379 $scope.orderdata = result;
380 for (var i = 0; i < $scope.orderdata.length; i++) { 380 for (var i = 0; i < $scope.orderdata.length; i++) {
381 $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); 381 $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate);
382 382
383 // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear() 383 // var str = "" + $scope.orderdata[i].upliftDateS.getDate() + "/" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getFullYear()
384 var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear() 384 var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear()
385 // str = str.slice(4,16) 385 // str = str.slice(4,16)
386 $scope.orderdata[i].upliftDateString = str 386 $scope.orderdata[i].upliftDateString = str
387 // console.log(str); 387 // console.log(str);
388 388
389 } 389 }
390 390
391 $scope.displayFuelOrderList = new NgTableParams({ 391 $scope.displayFuelOrderList = new NgTableParams({
392 page : 1, 392 page : 1,
393 count : 10, 393 count : 10,
394 }, { 394 }, {
395 data : $scope.orderdata 395 data : $scope.orderdata
396 }); 396 });
397 $(document).ready(function() { 397 $(document).ready(function() {
398 var myselect = document.getElementsByClassName('colorfulSelectbox'); 398 var myselect = document.getElementsByClassName('colorfulSelectbox');
399 399
400 for (var i = 0; i < myselect.length; i++) { 400 for (var i = 0; i < myselect.length; i++) {
401 var colourIndex = $(myselect[i]).prop('selectedIndex'); 401 var colourIndex = $(myselect[i]).prop('selectedIndex');
402 colourIndex = colourIndex + 1; 402 colourIndex = colourIndex + 1;
403 // console.log(colourIndex); 403 // console.log(colourIndex);
404 var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color'); 404 var getColor = $('.colorfulSelectbox option:nth-child(' + colourIndex + ')').css('color');
405 $(myselect[i]).css('background-color', getColor); 405 $(myselect[i]).css('background-color', getColor);
406 // console.log('colour', getColor); 406 // console.log('colour', getColor);
407 myselect[i].blur(); 407 myselect[i].blur();
408 } 408 }
409 409
410 }) 410 })
411 411
412 }) 412 })
413 } 413 }
414 414
415 $scope.getOrders(); 415 $scope.getOrders();
416 $scope.tiervalue=function(){ 416 $scope.tiervalue=function(){
417 $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; 417 $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak;
418 } 418 }
419 419
420 $scope.setCost = function(cost){ 420 $scope.setCost = function(cost){
421 if(cost != null) { 421 if(cost != null) {
422 var obj =JSON.parse(cost); 422 var obj =JSON.parse(cost);
423 $scope.order.fboCost = obj.cost; 423 $scope.order.fboCost = obj.cost;
424 } 424 }
425 } 425 }
426 426
427 $scope.cancelOrder = function() { 427 $scope.cancelOrder = function() {
428 $scope.order = {}; 428 $scope.order = {};
429 } 429 }
430 430
431 $scope.dispatchFuel = function(){ 431 $scope.dispatchFuel = function(){
432 $scope.showLoader = true; 432 $scope.showLoader = true;
433 $scope.fuelData = {}; 433 $scope.fuelData = {};
434 $scope.fuelData.companyId = $scope.selectedCompanyId; 434 $scope.fuelData.companyId = $scope.selectedCompanyId;
435 $scope.fuelData.companyName =$scope.order.defaultCompanyName; 435 $scope.fuelData.companyName =$scope.order.defaultCompanyName;
436 var aircraftObj =JSON.parse($scope.order.aircraftName); 436 var aircraftObj =JSON.parse($scope.order.aircraftName);
437 $scope.fuelData.aircraftName = aircraftObj.tail; 437 $scope.fuelData.aircraftName = aircraftObj.tail;
438 $scope.fuelData.make = aircraftObj.make; 438 $scope.fuelData.make = aircraftObj.make;
439 $scope.fuelData.model = aircraftObj.model; 439 $scope.fuelData.model = aircraftObj.model;
440 $scope.fuelData.fuelOn = $scope.order.fuelOn; 440 $scope.fuelData.fuelOn = $scope.order.fuelOn;
441 $scope.fuelData.invoiced = $scope.order.invoiced; 441 $scope.fuelData.invoiced = $scope.order.invoiced;
442 $scope.fuelData.volume = $scope.order.volume; 442 $scope.fuelData.volume = $scope.order.volume;
443 $scope.fuelData.source = $scope.order.source; 443 $scope.fuelData.source = $scope.order.source;
444 444
445 $scope.fuelData.total = $scope.order.total; 445 $scope.fuelData.total = $scope.order.total;
446 //tier no use 446 //tier no use
447 $scope.fuelData.tierBreak = $scope.order.tierBreak; 447 $scope.fuelData.tierBreak = $scope.order.tierBreak;
448 448
449 var obj =JSON.parse($scope.order.priceQuote); 449 var obj =JSON.parse($scope.order.priceQuote);
450 $scope.fuelData.priceQuote = obj.papTotal; 450 $scope.fuelData.priceQuote = obj.papTotal;
451 $scope.fuelData.fboCost = obj.cost; 451 $scope.fuelData.fboCost = obj.cost;
452 $scope.fuelData.productName = obj.productName; 452 $scope.fuelData.productName = obj.productName;
453 453
454 $scope.fuelData.etaTime = $scope.order.etaTime; 454 $scope.fuelData.etaTime = $scope.order.etaTime;
455 $scope.fuelData.etdTime = $scope.order.etdTime; 455 $scope.fuelData.etdTime = $scope.order.etdTime;
456 $scope.fuelData.certificateType = $scope.order.certificateType; 456 $scope.fuelData.certificateType = $scope.order.certificateType;
457 var currentDate = new Date(); 457 var currentDate = new Date();
458 var hours = currentDate.getHours(); 458 var hours = currentDate.getHours();
459 var min = currentDate.getMinutes(); 459 var min = currentDate.getMinutes();
460 var sec = currentDate.getSeconds(); 460 var sec = currentDate.getSeconds();
461 if ($scope.order.upliftDate != '') { 461 if ($scope.order.upliftDate != '') {
462 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; 462 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec;
463 $scope.order.upliftDate = new Date($scope.order.upliftDate); 463 $scope.order.upliftDate = new Date($scope.order.upliftDate);
464 $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); 464 $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime();
465 } 465 }
466 466
467 467
468 if ($scope.order.departingDate != '') { 468 if ($scope.order.departingDate != '') {
469 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; 469 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec;
470 $scope.order.departingDate = new Date($scope.order.departingDate); 470 $scope.order.departingDate = new Date($scope.order.departingDate);
471 $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); 471 $scope.fuelData.departingDate = $scope.order.departingDate.getTime();
472 } 472 }
473 473
474 if($scope.order.status === null || $scope.order.status === undefined){ 474 if($scope.order.status === null || $scope.order.status === undefined){
475 475
476 $scope.fuelData.status = "pending"; //default status 476 $scope.fuelData.status = "pending"; //default status
477 477
478 }else { 478 }else {
479 479
480 $scope.fuelData.status = $scope.order.status; 480 $scope.fuelData.status = $scope.order.status;
481 } 481 }
482 482
483 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); 483 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData);
484 // console.log("=====$scope.fueldata======",$scope.fuelData) 484 // console.log("=====$scope.fueldata======",$scope.fuelData)
485 fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { 485 fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) {
486 $scope.showLoader = false; 486 $scope.showLoader = false;
487 $scope.order = {}; 487 $scope.order = {};
488 $scope.dispatchOrder.fuelOrderList = []; 488 $scope.dispatchOrder.fuelOrderList = [];
489 $('#demo-modal-4').css('display', ''); 489 $('#demo-modal-4').css('display', '');
490 $scope.getOrders(); 490 $scope.getOrders();
491 toastr.success('Fuel Order Dispatched Successfully', { 491 toastr.success('Fuel Order Dispatched Successfully', {
492 closeButton: true 492 closeButton: true
493 }) 493 })
494 }) 494 })
495 } 495 }
496 496
497 $scope.addTotal = function(value, valueOf) { 497 $scope.addTotal = function(value, valueOf) {
498 if (value != undefined && valueOf != undefined) { 498 if (value != undefined && valueOf != undefined) {
499 value = JSON.parse(value) 499 value = JSON.parse(value)
500 $scope.order.total = value.cost * valueOf; 500 $scope.order.total = value.cost * valueOf;
501 } 501 }
502 } 502 }
503 503
504 $scope.getAircraft = function(company) { 504 $scope.getAircraft = function(company) {
505 $scope.selectedCompanyName = company; 505 $scope.selectedCompanyName = company;
506 //$scope.showLoader = true; 506 //$scope.showLoader = true;
507 // console.log("id",company) 507 // console.log("id",company)
508 for (var i = 0; i < $scope.companyList.length; i++) { 508 for (var i = 0; i < $scope.companyList.length; i++) {
509 if ($scope.companyList[i].companyName == company) { 509 if ($scope.companyList[i].companyName == company) {
510 if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) { 510 if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null) {
511 fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { 511 fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) {
512 $scope.marginList = margins; 512 $scope.marginList = margins;
513 //console.log('$scope.marginList', $scope.marginList); 513 //console.log('$scope.marginList', $scope.marginList);
514 }) 514 })
515 } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { 515 } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) {
516 fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { 516 fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) {
517 $scope.marginList = margins; 517 $scope.marginList = margins;
518 }) 518 })
519 } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { 519 } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) {
520 fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { 520 fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) {
521 $scope.marginList = margins; 521 $scope.marginList = margins;
522 }) 522 })
523 } 523 }
524 $scope.selectedCompanyId = $scope.companyList[i].id; 524 $scope.selectedCompanyId = $scope.companyList[i].id;
525 $scope.marginId = $scope.companyList[i].margin.id; 525 $scope.marginId = $scope.companyList[i].margin.id;
526 if ($scope.selectedCompanyId != '') { 526 if ($scope.selectedCompanyId != '') {
527 fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { 527 fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) {
528 $scope.aircraftList = aircraft; 528 $scope.aircraftList = aircraft;
529 //console.log("===tail search====",aircraft); 529 //console.log("===tail search====",aircraft);
530 }) 530 })
531 } 531 }
532 if ($scope.marginId != '') { 532 if ($scope.marginId != '') {
533 fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { 533 fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) {
534 $scope.tierList = tiers; 534 $scope.tierList = tiers;
535 // $scope.showLoader = false; 535 // $scope.showLoader = false;
536 }) 536 })
537 } else { 537 } else {
538 // $scope.showLoader = false; 538 // $scope.showLoader = false;
539 } 539 }
540 } 540 }
541 } 541 }
542 542
543 } 543 }
544 544
545 $scope.sourceList = [ { 545 $scope.sourceList = [ {
546 source : "Direct Jet-A" 546 source : "Direct Jet-A"
547 }, { 547 }, {
548 source : "Direct AVGAS 100LL" 548 source : "Direct AVGAS 100LL"
549 } ]; 549 } ];
550 $scope.cancelData = function() { 550 $scope.cancelData = function() {
551 $scope.order = {}; 551 $scope.order = {};
552 $('#demo-modal-4').css('display', ''); 552 $('#demo-modal-4').css('display', '');
553 } 553 }
554 554
555 $scope.setFuel = function(companyName,certificateType) { 555 $scope.setFuel = function(companyName,certificateType) {
556 $('#demo-modal-4').css('display', 'block'); 556 $('#demo-modal-4').css('display', 'block');
557 $scope.order.defaultCompanyName = companyName; 557 $scope.order.defaultCompanyName = companyName;
558 $scope.order.certificateType = certificateType; 558 $scope.order.certificateType = certificateType;
559 $scope.getAircraft(companyName); 559 $scope.getAircraft(companyName);
560 // event.stopPropagation(); 560 // event.stopPropagation();
561 // $state.go('app.updateFuelManager'); 561 // $state.go('app.updateFuelManager');
562 } 562 }
563 563
564 /* ng table */ 564 /* ng table */
565 565
566 $scope.exportCompany = function() { 566 $scope.exportCompany = function() {
567 $scope.showLoader = true; 567 $scope.showLoader = true;
568 var fileName = "companies.csv"; 568 var fileName = "companies.csv";
569 var a = document.createElement("a"); 569 var a = document.createElement("a");
570 document.body.appendChild(a); 570 document.body.appendChild(a);
571 CustomersService.exportCompany().then(function(result) { 571 CustomersService.exportCompany().then(function(result) {
572 var file = new Blob([ result ], { 572 var file = new Blob([ result ], {
573 type : 'application/csv' 573 type : 'application/csv'
574 }); 574 });
575 var fileURL = URL.createObjectURL(file); 575 var fileURL = URL.createObjectURL(file);
576 a.href = fileURL; 576 a.href = fileURL;
577 a.download = fileName; 577 a.download = fileName;
578 a.click(); 578 a.click();
579 $scope.showLoader = false; 579 $scope.showLoader = false;
580 }) 580 })
581 } 581 }
582 getCompanyName(); 582 getCompanyName();
583 function getCompanyName() { 583 function getCompanyName() {
584 CustomersService.getCompanyName().then(function(result) { 584 CustomersService.getCompanyName().then(function(result) {
585 $scope.compNameList = result; 585 $scope.compNameList = result;
586 //console.log("kd",result) 586 //console.log("kd",result)
587 }) 587 })
588 } 588 }
589 589
590 // old api not use 590 // old api not use
591 /*$scope.checkJetWithTail = function(tail, index) { 591 /*$scope.checkJetWithTail = function(tail, index) {
592 ViewCompanyService.checkJetType(tail).then(function(result) { 592 ViewCompanyService.checkJetType(tail).then(function(result) {
593 if (result.jetA == "true") { 593 if (result.jetA == "true") {
594 $scope.jetShow[index] = false; 594 $scope.jetShow[index] = false;
595 $scope.marginShow[index] = true; 595 $scope.marginShow[index] = true;
596 } else { 596 } else {
597 $scope.jetShow[index] = true; 597 $scope.jetShow[index] = true;
598 $scope.marginShow[index] = false; 598 $scope.marginShow[index] = false;
599 } 599 }
600 }) 600 })
601 }*/ 601 }*/
602 602
603 603
604 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 604 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
605 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 605 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
606 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 606 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
607 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 607 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
608 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 608 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
609 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 609 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
610 610
611 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 611 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
612 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 612 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
613 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 613 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
614 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 614 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
615 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 615 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
616 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 616 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
app/partials/customers/customers.html
1 <style> 1 <style>
2 .subnavbar .mainnav > li:nth-child(2) > a{ 2 .subnavbar .mainnav > li:nth-child(2) > a{
3 color: #ca5c6a; 3 color: #ca5c6a;
4 } 4 }
5 5
6 .button1 { 6 .button1 {
7 display: inline-block; 7 display: inline-block;
8 height: 35px; 8 height: 35px;
9 line-height: 35px; 9 line-height: 35px;
10 padding-right: 15px; 10 padding-right: 15px;
11 padding-left: 50px; 11 padding-left: 50px;
12 position: relative; 12 position: relative;
13 background-color:rgb(41,127,184); 13 background-color:rgb(41,127,184);
14 color:rgb(255,255,255); 14 color:rgb(255,255,255);
15 text-decoration: none; 15 text-decoration: none;
16 text-transform: uppercase; 16 text-transform: uppercase;
17 letter-spacing: 1px; 17 letter-spacing: 1px;
18 margin-bottom: 15px; 18 margin-bottom: 15px;
19 border: 0; 19 border: 0;
20 20
21 21
22 border-radius: 5px; 22 border-radius: 5px;
23 -moz-border-radius: 5px; 23 -moz-border-radius: 5px;
24 -webkit-border-radius: 5px; 24 -webkit-border-radius: 5px;
25 text-shadow:0px 1px 0px rgba(0,0,0,0.5); 25 text-shadow:0px 1px 0px rgba(0,0,0,0.5);
26 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; 26 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1;
27 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); 27 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true);
28 28
29 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 29 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
30 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 30 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
31 box-shadow:0px 2px 2px rgba(0,0,0,0.2); 31 box-shadow:0px 2px 2px rgba(0,0,0,0.2);
32 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; 32 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)";
33 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); 33 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true);
34 } 34 }
35 35
36 .button1 span { 36 .button1 span {
37 position: absolute; 37 position: absolute;
38 left: 0; 38 left: 0;
39 top: 0; 39 top: 0;
40 width: 35px; 40 width: 35px;
41 background-color:rgba(0,0,0,0.5); 41 background-color:rgba(0,0,0,0.5);
42 -webkit-border-top-left-radius: 5px; 42 -webkit-border-top-left-radius: 5px;
43 -webkit-border-bottom-left-radius: 5px; 43 -webkit-border-bottom-left-radius: 5px;
44 -moz-border-radius-topleft: 5px; 44 -moz-border-radius-topleft: 5px;
45 -moz-border-radius-bottomleft: 5px; 45 -moz-border-radius-bottomleft: 5px;
46 border-top-left-radius: 5px; 46 border-top-left-radius: 5px;
47 border-bottom-left-radius: 5px; 47 border-bottom-left-radius: 5px;
48 border-right: 1px solid rgba(0,0,0,0.15); 48 border-right: 1px solid rgba(0,0,0,0.15);
49 } 49 }
50 50
51 .button1:hover span, .button1.active span { 51 .button1:hover span, .button1.active span {
52 background-color:rgb(0,102,26); 52 background-color:rgb(0,102,26);
53 border-right: 1px solid rgba(0,0,0,0.3); 53 border-right: 1px solid rgba(0,0,0,0.3);
54 } 54 }
55 55
56 .button1:active { 56 .button1:active {
57 margin-top: 2px; 57 margin-top: 2px;
58 margin-bottom: 13px; 58 margin-bottom: 13px;
59 59
60 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 60 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
61 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 61 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
62 box-shadow:0px 1px 0px rgba(255,255,255,0.5); 62 box-shadow:0px 1px 0px rgba(255,255,255,0.5);
63 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; 63 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)";
64 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); 64 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true);
65 } 65 }
66 66
67 .button1.turquoise { 67 .button1.turquoise {
68 background: #449d44; 68 background: #449d44;
69 } 69 }
70 </style> 70 </style>
71 <div class="myLoader" ng-show="showLoader"> 71 <div class="myLoader" ng-show="showLoader">
72 <img src="../img/hourglass.gif" width="50px;"> 72 <img src="../img/hourglass.gif" width="50px;">
73 </div> 73 </div>
74 74
75 <div class="main"> 75 <div class="main">
76 <div class="container"> 76 <div class="container">
77 <div class="row"> 77 <div class="row">
78 <div class="col-md-12"> 78 <div class="col-md-12">
79 <div class="widget stacked "> 79 <div class="widget stacked ">
80 <div class="widget-content"> 80 <div class="widget-content">
81 <div class="tabbable"> 81 <div class="tabbable">
82 <ul class="nav nav-tabs"> 82 <ul class="nav nav-tabs">
83 <li class="active"> 83 <li class="active">
84 <a ui-sref="app.customers">Customer View 84 <a ui-sref="app.customers">Customer View
85 <i class="fa fa-caret-down" aria-hidden="true"></i> 85 <i class="fa fa-caret-down" aria-hidden="true"></i>
86 </a> 86 </a>
87 </li> 87 </li>
88 <li> 88 <li>
89 <a ui-sref="app.ContactView">Contact View 89 <a ui-sref="app.ContactView">Contact View
90 <i class="fa fa-caret-down" aria-hidden="true"></i> 90 <i class="fa fa-caret-down" aria-hidden="true"></i>
91 </a> 91 </a>
92 </li> 92 </li>
93 <li> 93 <li>
94 <a ui-sref="app.FuelVendors">Fuel Vendors 94 <a ui-sref="app.FuelVendors">Fuel Vendors
95 <i class="fa fa-caret-down" aria-hidden="true"></i> 95 <i class="fa fa-caret-down" aria-hidden="true"></i>
96 </a> 96 </a>
97 </li> 97 </li>
98 <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li> 98 <li style="margin: 0px 10px 4px 40px;"><input type="text" style="height:31px;"class="form-control" ng-model="searchText" placeholder="Search In Table"></li>
99 <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li> 99 <li><button type="button" class="btn btn-default btn-sm" ng-click="displayCompanyList.filter({}); searchText=null">Clear Search And Filters</button></li>
100 <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> 100 <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li>
101 </ul> 101 </ul>
102 <br> 102 <br>
103 <div class="tab-content customer-table" style="margin:0px"> 103 <div class="tab-content customer-table" style="margin:0px">
104 <div class="tab-pane active" id="companyView"> 104 <div class="tab-pane active" id="companyView">
105 <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true"> 105 <table ng-table="displayCompanyList" class="table table-striped table-condensed" show-filter="true">
106 <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;"> 106 <tr style="text-align: center;" ng-repeat="row in $data | filter:searchText:strict"" style="cursor: pointer;">
107 <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})"> 107 <td style="text-align: left;" data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ui-sref="app.viewCompany({id : row.id})">
108 {{row.companyName}} 108 {{row.companyName}}
109 </td> 109 </td>
110 <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})"> 110 <td data-title="'Fleet'" filter="{companyAircraftSize: 'text'}" sortable="'companyAircraftSize'" ui-sref="app.viewCompany({id : row.id})">
111 {{row.companyAircraftSize}} 111 {{row.companyAircraftSize}}
112 </td> 112 </td>
113 <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})"> 113 <td data-title="'Main Phone'" filter="{newContactNumber: 'text'}" sortable="'newContactNumber'" ui-sref="app.viewCompany({id : row.id})">
114 {{row.newContactNumber}} 114 {{row.newContactNumber}}
115 </td> 115 </td>
116 <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})"> 116 <td data-title="'Primary Contact'" filter="{primaryContactName: 'text'}" sortable="'primaryContactName'" ui-sref="app.viewCompany({id : row.id})">
117 {{row.primaryContactName}} 117 {{row.primaryContactName}}
118 </td> 118 </td>
119 <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})"> 119 <td data-title="'Base'" filter="{baseIcao: 'text'}" sortable="'baseIcao'" ui-sref="app.viewCompany({id : row.id})">
120 {{row.baseIcao}} 120 {{row.baseIcao}}
121 </td> 121 </td>
122 <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})"> 122 <td data-title="'Status'" filter="{activate: 'select'}" filter-data="statusFilter" sortable="'activate'" ui-sref="app.viewCompany({id : row.id})">
123 <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button> 123 <button type="button" ng-if="row.activate == true" class="btn btn-success btn-xs">Active</button>
124 <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> 124 <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button>
125 </td> 125 </td>
126 <td class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> 126 <td style="width: 130px;" class="margin-media" data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'">
127 <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> 127 <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select>
128 </td> 128 </td>
129 <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})"> 129 <td data-title="'All In'" filter="{marginAllIn: 'text'}" sortable="'marginAllIn'" ui-sref="app.viewCompany({id : row.id})">
130 {{row.marginAllIn | number : 4}} 130 {{row.marginAllIn | number : 4}}
131 </td> 131 </td>
132 <td data-title="''"> 132 <td data-title="''">
133 <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.certificateType)">Setup Fuel</button> 133 <button type="button" class="btn btn-info btn-xs" ng-click="setFuel(row.companyName,row.certificateType)">Setup Fuel</button>
134 </td> 134 </td>
135 </tr> 135 </tr>
136 </table> 136 </table>
137 137
138 <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button> 138 <button type="button" ng-click="exportCompany()" class="btn btn-warning exportBtn">Export CSV</button>
139 139
140 </div> 140 </div>
141 </div> 141 </div>
142 </div> 142 </div>
143 </div> 143 </div>
144 <!-- /widget-content --> 144 <!-- /widget-content -->
145 </div> 145 </div>
146 <!-- /widget --> 146 <!-- /widget -->
147 </div> 147 </div>
148 <!-- /span8 --> 148 <!-- /span8 -->
149 </div> 149 </div>
150 <!-- /row --> 150 <!-- /row -->
151 </div> 151 </div>
152 <!-- /container --> 152 <!-- /container -->
153 </div> 153 </div>
154 <!-- /main --> 154 <!-- /main -->
155 <form class="modal multi-step" id="demo-modal-3" name="companyForm"> 155 <form class="modal multi-step" id="demo-modal-3" name="companyForm">
156 <div class="modal-dialog modal-lg"> 156 <div class="modal-dialog modal-lg">
157 <div class="modal-content"> 157 <div class="modal-content">
158 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 158 <div class="modal-body step-1" data-step="1" style="padding: 0;">
159 <div> 159 <div>
160 <div class="row" style="margin: 0;"> 160 <div class="row" style="margin: 0;">
161 <div> 161 <div>
162 <div class="widget" style="margin-bottom: 0;"> 162 <div class="widget" style="margin-bottom: 0;">
163 <div class="widget-header"> 163 <div class="widget-header">
164 <i class="icon-pencil"></i> 164 <i class="icon-pencil"></i>
165 <i class="fa fa-tasks" aria-hidden="true"></i> 165 <i class="fa fa-tasks" aria-hidden="true"></i>
166 <h3>Add a New Company</h3> 166 <h3>Add a New Company</h3>
167 <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> 167 <div class="pull-right my-toggle-switch" style="margin-right: 30px;">
168 <div style="color: #ff9a01;">Activate &nbsp &nbsp 168 <div style="color: #ff9a01;">Activate &nbsp &nbsp
169 <toggle ng-model="data.activate" size="customToogle"></toggle> 169 <toggle ng-model="data.activate" size="customToogle"></toggle>
170 </div> 170 </div>
171 </div> 171 </div>
172 <div class="clearfix"></div> 172 <div class="clearfix"></div>
173 </div> 173 </div>
174 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 174 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
175 <div class="col-xs-12"> 175 <div class="col-xs-12">
176 <div class="col-md-8"> 176 <div class="col-md-8">
177 <div class="pull-left"> 177 <div class="pull-left">
178 <label class="new-input-label"><b>Company Name *</b></label> 178 <label class="new-input-label"><b>Company Name *</b></label>
179 </div> 179 </div>
180 <div class="pull-left" style="margin-left: 15px;"> 180 <div class="pull-left" style="margin-left: 15px;">
181 <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> 181 <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput">
182 182
183 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> 183 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label>
184 </div> 184 </div>
185 <div class="clearfix"></div> 185 <div class="clearfix"></div>
186 </div> 186 </div>
187 <div class="col-md-4"> 187 <div class="col-md-4">
188 188
189 <div class="pull-right"> 189 <div class="pull-right">
190 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> 190 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder="">
191 </div> 191 </div>
192 <div class="pull-right"> 192 <div class="pull-right">
193 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> 193 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label>
194 </div> 194 </div>
195 <div class="clearfix"></div> 195 <div class="clearfix"></div>
196 </div> 196 </div>
197 </div> 197 </div>
198 <div class="clearfix"></div><br> 198 <div class="clearfix"></div><br>
199 <div class="col-xs-12"> 199 <div class="col-xs-12">
200 <div class="col-md-7"> 200 <div class="col-md-7">
201 <div class="pull-left"> 201 <div class="pull-left">
202 <label class="new-input-label"><b>Relationship&nbsp;</b></label> 202 <label class="new-input-label"><b>Relationship&nbsp;</b></label>
203 </div> 203 </div>
204 <div class="pull-left" style="margin-left: 32px;"> 204 <div class="pull-left" style="margin-left: 32px;">
205 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> 205 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br>
206 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> 206 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br>
207 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor 207 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor
208 </div> 208 </div>
209 <div class="clearfix"></div> 209 <div class="clearfix"></div>
210 </div> 210 </div>
211 <div class="col-md-2 Airport" style="text-align: right;"> 211 <div class="col-md-2 Airport" style="text-align: right;">
212 <b>Certificate Type</b> 212 <b>Certificate Type</b>
213 </div> 213 </div>
214 <div class="col-md-3 Airport"> 214 <div class="col-md-3 Airport">
215 <select required class="form-control" ng-model="data.certificateType"> 215 <select required class="form-control" ng-model="data.certificateType">
216 <option value="" disabled selected hidden>Select...</option> 216 <option value="" disabled selected hidden>Select...</option>
217 <option value="corporate">Part 91 (Corporate)</option> 217 <option value="corporate">Part 91 (Corporate)</option>
218 <option value="charter">Part 135 (Charter)</option> 218 <option value="charter">Part 135 (Charter)</option>
219 <option value="scheduled">Part 121 (Scheduled)</option> 219 <option value="scheduled">Part 121 (Scheduled)</option>
220 <option value="military">Military</option> 220 <option value="military">Military</option>
221 <option value="government">Government</option> 221 <option value="government">Government</option>
222 </select> 222 </select>
223 </div> 223 </div>
224 <div class="clearfix"></div> 224 <div class="clearfix"></div>
225 </div> 225 </div>
226 <div class="clearfix"></div> 226 <div class="clearfix"></div>
227 <br/> 227 <br/>
228 <div class="col-xs-12"> 228 <div class="col-xs-12">
229 <div class="col-md-6"> 229 <div class="col-md-6">
230 <div class="pull-left" style="width: 110px;"> 230 <div class="pull-left" style="width: 110px;">
231 <b>JET A Margin *</b> 231 <b>JET A Margin *</b>
232 </div> 232 </div>
233 <div class="pull-left"> 233 <div class="pull-left">
234 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> 234 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()">
235 <option value="" disabled>Select...</option> 235 <option value="" disabled>Select...</option>
236 </select> 236 </select>
237 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> 237 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label>
238 238
239 <div class="clearfix"></div> 239 <div class="clearfix"></div>
240 </div> 240 </div>
241 </div> 241 </div>
242 242
243 <div class="col-md-3 Airport" style="text-align: right;"> 243 <div class="col-md-3 Airport" style="text-align: right;">
244 <b>AVGAS 100LL Margin</b> 244 <b>AVGAS 100LL Margin</b>
245 </div> 245 </div>
246 <div class="col-md-3 Airport"> 246 <div class="col-md-3 Airport">
247 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> 247 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList">
248 <option value="" disabled>Select...</option> 248 <option value="" disabled>Select...</option>
249 </select> 249 </select>
250 </div> 250 </div>
251 <div class="clearfix"></div> 251 <div class="clearfix"></div>
252 </div> 252 </div>
253 <div class="clearfix"></div> 253 <div class="clearfix"></div>
254 <br/> 254 <br/>
255 <div class="col-xs-12"> 255 <div class="col-xs-12">
256 <div class="col-md-12"> 256 <div class="col-md-12">
257 <div class="pull-left" style="width: 110px;"> 257 <div class="pull-left" style="width: 110px;">
258 <label class="new-input-label"><b>Address</b></label> 258 <label class="new-input-label"><b>Address</b></label>
259 </div> 259 </div>
260 <div class="pull-left" style="width: calc(100% - 110px);"> 260 <div class="pull-left" style="width: calc(100% - 110px);">
261 <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> 261 <input type="text" class="form-control" ng-model="data.addressOne" placeholder="">
262 </div> 262 </div>
263 <div class="clearfix"></div> 263 <div class="clearfix"></div>
264 </div> 264 </div>
265 </div> 265 </div>
266 <div class="clearfix"></div> 266 <div class="clearfix"></div>
267 <br/> 267 <br/>
268 <div class="col-xs-12"> 268 <div class="col-xs-12">
269 <div class="col-md-12"> 269 <div class="col-md-12">
270 <div class="pull-left" style="width: 110px;"> 270 <div class="pull-left" style="width: 110px;">
271 <label class="new-input-label"><b>Address2</b></label> 271 <label class="new-input-label"><b>Address2</b></label>
272 </div> 272 </div>
273 <div class="pull-left" style="width: calc(100% - 110px);"> 273 <div class="pull-left" style="width: calc(100% - 110px);">
274 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> 274 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder="">
275 </div> 275 </div>
276 <div class="clearfix"></div> 276 <div class="clearfix"></div>
277 </div> 277 </div>
278 </div> 278 </div>
279 <div class="clearfix"></div> 279 <div class="clearfix"></div>
280 <br/> 280 <br/>
281 <div class="col-xs-12"> 281 <div class="col-xs-12">
282 282
283 <div class="col-md-6"> 283 <div class="col-md-6">
284 <div class="pull-left" style="width: 110px;"> 284 <div class="pull-left" style="width: 110px;">
285 <label class="new-input-label"><b>City</b></label> 285 <label class="new-input-label"><b>City</b></label>
286 </div> 286 </div>
287 <div class="pull-left" style="width: calc(100% - 110px);"> 287 <div class="pull-left" style="width: calc(100% - 110px);">
288 <input type="text" ng-model="data.city" class="form-control" placeholder=""> 288 <input type="text" ng-model="data.city" class="form-control" placeholder="">
289 </div> 289 </div>
290 <div class="clearfix"></div> 290 <div class="clearfix"></div>
291 </div> 291 </div>
292 <div class="col-md-3"> 292 <div class="col-md-3">
293 <div class="pull-left" style="width: 40px;"> 293 <div class="pull-left" style="width: 40px;">
294 <label class="new-input-label"><b>State</b></label> 294 <label class="new-input-label"><b>State</b></label>
295 </div> 295 </div>
296 <div class="pull-left" style="width: calc(100% - 110px);"> 296 <div class="pull-left" style="width: calc(100% - 110px);">
297 <input type="text" ng-model="data.state" class="form-control" placeholder=""> 297 <input type="text" ng-model="data.state" class="form-control" placeholder="">
298 </div> 298 </div>
299 <div class="clearfix"></div> 299 <div class="clearfix"></div>
300 </div> 300 </div>
301 <div class="col-md-3"> 301 <div class="col-md-3">
302 <div class="pull-left"> 302 <div class="pull-left">
303 <label class="new-input-label"><b>Zip Code</b></label> 303 <label class="new-input-label"><b>Zip Code</b></label>
304 </div> 304 </div>
305 <div class="pull-right" style="width: calc(100% - 60px);"> 305 <div class="pull-right" style="width: calc(100% - 60px);">
306 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> 306 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder="">
307 </div> 307 </div>
308 <div class="clearfix"></div> 308 <div class="clearfix"></div>
309 </div> 309 </div>
310 </div> 310 </div>
311 <div class="clearfix"></div> 311 <div class="clearfix"></div>
312 <br/> 312 <br/>
313 <div class="col-xs-12"> 313 <div class="col-xs-12">
314 314
315 <div class="col-md-6"> 315 <div class="col-md-6">
316 <div class="pull-left" style="width: 110px;"> 316 <div class="pull-left" style="width: 110px;">
317 <label class="new-input-label"><b>Country</b></label> 317 <label class="new-input-label"><b>Country</b></label>
318 </div> 318 </div>
319 <div class="pull-left" style="width: calc(100% - 110px);"> 319 <div class="pull-left" style="width: calc(100% - 110px);">
320 <input type="text" ng-model="data.country" class="form-control" placeholder=""> 320 <input type="text" ng-model="data.country" class="form-control" placeholder="">
321 </div> 321 </div>
322 <div class="clearfix"></div> 322 <div class="clearfix"></div>
323 </div> 323 </div>
324 <div class="col-md-6"> 324 <div class="col-md-6">
325 <div class="pull-left" style="width: 110px;"> 325 <div class="pull-left" style="width: 110px;">
326 <label class="new-input-label"><b>Internal Note</b></label> 326 <label class="new-input-label"><b>Internal Note</b></label>
327 </div> 327 </div>
328 <div class="pull-left" style="width: calc(100% - 110px);"> 328 <div class="pull-left" style="width: calc(100% - 110px);">
329 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> 329 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea>
330 </div> 330 </div>
331 <div class="clearfix"></div> 331 <div class="clearfix"></div>
332 </div> 332 </div>
333 </div> 333 </div>
334 <div class="clearfix"></div> 334 <div class="clearfix"></div>
335 <!-- <br/> 335 <!-- <br/>
336 <div class="col-xs-12"> 336 <div class="col-xs-12">
337 <div class="col-md-2 Airport"></div> 337 <div class="col-md-2 Airport"></div>
338 <div class="col-md-10 Airport"> 338 <div class="col-md-10 Airport">
339 <div class="pull-right"> 339 <div class="pull-right">
340 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> 340 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
341 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> 341 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button>
342 </div> 342 </div>
343 </div> 343 </div>
344 </div> --> 344 </div> -->
345 </div> 345 </div>
346 </div> 346 </div>
347 <div class="clearfix"></div> 347 <div class="clearfix"></div>
348 </div> 348 </div>
349 </div> 349 </div>
350 </div> 350 </div>
351 </div> 351 </div>
352 <div class="modal-body step-2" data-step="2" style="padding: 0;"> 352 <div class="modal-body step-2" data-step="2" style="padding: 0;">
353 <div> 353 <div>
354 <div class="row" style="margin: 0;"> 354 <div class="row" style="margin: 0;">
355 <div> 355 <div>
356 <div class="widget" style="margin-bottom: 0;"> 356 <div class="widget" style="margin-bottom: 0;">
357 <div class="widget-header"> 357 <div class="widget-header">
358 <i class="icon-pencil"></i> 358 <i class="icon-pencil"></i>
359 <i class="fa fa-tasks" aria-hidden="true"></i> 359 <i class="fa fa-tasks" aria-hidden="true"></i>
360 <h3>Add a New Company</h3> 360 <h3>Add a New Company</h3>
361 <div class="clearfix"></div> 361 <div class="clearfix"></div>
362 </div> 362 </div>
363 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 363 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
364 <div class="col-xs-12"> 364 <div class="col-xs-12">
365 <div class="widget-header"> 365 <div class="widget-header">
366 <i class="fa fa-list"></i> 366 <i class="fa fa-list"></i>
367 <h3>Aircraft List</h3> 367 <h3>Aircraft List</h3>
368 </div> 368 </div>
369 <div class="widget-content" style="padding:0px;border: 0px; "> 369 <div class="widget-content" style="padding:0px;border: 0px; ">
370 <div class="table-responsive"> 370 <div class="table-responsive">
371 371
372 <!-- <table class="table table-striped table-bordered"> 372 <!-- <table class="table table-striped table-bordered">
373 <thead> 373 <thead>
374 <tr> 374 <tr>
375 <th>Tail</th> 375 <th>Tail</th>
376 <th>Make</th> 376 <th>Make</th>
377 <th>Model</th> 377 <th>Model</th>
378 <th>Size</th> 378 <th>Size</th>
379 <th>JET A Margin</th> 379 <th>JET A Margin</th>
380 <th>AVGS 100LL Margin</th> 380 <th>AVGS 100LL Margin</th>
381 </tr> 381 </tr>
382 </thead> 382 </thead>
383 <tbody> 383 <tbody>
384 <tr ng-repeat="aircraftData in aircraftDetails track by $index"> 384 <tr ng-repeat="aircraftData in aircraftDetails track by $index">
385 <td style="width: 15%"> 385 <td style="width: 15%">
386 <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> 386 <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/>
387 </td> 387 </td>
388 <td style="width: 17%"> 388 <td style="width: 17%">
389 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> 389 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)">
390 <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option> 390 <option ng-repeat="make in aircraftMakeList | orderBy ">{{make}}</option>
391 <option value="" disabled>Select...</option> 391 <option value="" disabled>Select...</option>
392 </select> 392 </select>
393 </td> 393 </td>
394 <td style="width: 17%"> 394 <td style="width: 17%">
395 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> 395 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)">
396 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> 396 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option>
397 <option value="" disabled>Select...</option> 397 <option value="" disabled>Select...</option>
398 </select> 398 </select>
399 </td> 399 </td>
400 <td style="width: 17%"> 400 <td style="width: 17%">
401 <select class="form-control" ng-model="aircraftData.sizeId"> 401 <select class="form-control" ng-model="aircraftData.sizeId">
402 <option value="" disabled>Select</option> 402 <option value="" disabled>Select</option>
403 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> 403 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option>
404 </select> 404 </select>
405 405
406 </td> 406 </td>
407 <td style="width: 17%"> 407 <td style="width: 17%">
408 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> 408 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]">
409 <option value="" disabled>Select</option> 409 <option value="" disabled>Select</option>
410 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> 410 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option>
411 </select> 411 </select>
412 412
413 413
414 </td> 414 </td>
415 <td style="width: 17%"> 415 <td style="width: 17%">
416 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> 416 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]">
417 <option value="" disabled>Select</option> 417 <option value="" disabled>Select</option>
418 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> 418 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option>
419 </select> 419 </select>
420 420
421 </td> 421 </td>
422 </tr> 422 </tr>
423 </tbody> 423 </tbody>
424 </table> 424 </table>
425 </div> 425 </div>
426 <div class="clearfix"></div> 426 <div class="clearfix"></div>
427 </div> 427 </div>
428 </div> 428 </div>
429 <div class="clearfix"></div> 429 <div class="clearfix"></div>
430 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> 430 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;">
431 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> 431 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button>
432 </div> --> 432 </div> -->
433 433
434 <table class="table table-striped table-bordered"> 434 <table class="table table-striped table-bordered">
435 <thead> 435 <thead>
436 <tr> 436 <tr>
437 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> 437 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> -->
438 <th>Tail</th> 438 <th>Tail</th>
439 <th>Make</th> 439 <th>Make</th>
440 <th>Model</th> 440 <th>Model</th>
441 <th>Size</th> 441 <th>Size</th>
442 <th>JET A Margin</th> 442 <th>JET A Margin</th>
443 <th>AVGS 100LL Margin</th> 443 <th>AVGS 100LL Margin</th>
444 </tr> 444 </tr>
445 </thead> 445 </thead>
446 <tbody> 446 <tbody>
447 <tr ng-repeat="aircraftData in aircraftDetails track by $index"> 447 <tr ng-repeat="aircraftData in aircraftDetails track by $index">
448 <!-- <td> 448 <!-- <td>
449 <input type="checkbox" ng-model="aircraftData.selected"/> 449 <input type="checkbox" ng-model="aircraftData.selected"/>
450 </td> --> 450 </td> -->
451 <!-- <td style="width: 15%"> 451 <!-- <td style="width: 15%">
452 <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> 452 <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/>
453 </td> --> 453 </td> -->
454 <td style="width: 15%"> 454 <td style="width: 15%">
455 <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/> 455 <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkTail(aircraftData.tail, $index);" required/>
456 </td> 456 </td>
457 <td style="width: 17%"> 457 <td style="width: 17%">
458 <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) "> 458 <select class="form-control" style="width: fit-content;" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) ">
459 <option value="" disabled>Select</option> 459 <option value="" disabled>Select</option>
460 <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> 460 <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option>
461 </select> 461 </select>
462 </td> 462 </td>
463 <td style="width: 17%"> 463 <td style="width: 17%">
464 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> 464 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)">
465 <option value="" disabled>Select</option> 465 <option value="" disabled>Select</option>
466 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> 466 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option>
467 </select> 467 </select>
468 </td> 468 </td>
469 <td style="width: 17%"> 469 <td style="width: 17%">
470 <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)"> 470 <select class="form-control" ng-model="aircraftData.size" ng-change="getFuelType(aircraftData.size, $index)">
471 <option value="" disabled>Select</option> 471 <option value="" disabled>Select</option>
472 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> 472 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option>
473 </select> 473 </select>
474 474
475 <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> --> 475 <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> -->
476 476
477 </td> 477 </td>
478 <td style="width: 17%"> 478 <td style="width: 17%">
479 479
480 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> 480 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]">
481 <option value="" disabled>Select</option> 481 <option value="" disabled>Select</option>
482 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> 482 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option>
483 </select> 483 </select>
484 484
485 <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]"> 485 <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList" ng-disabled="jetShow[$index]">
486 486
487 <option value="" disabled>Select...</option> 487 <option value="" disabled>Select...</option>
488 </select> --> 488 </select> -->
489 489
490 </td> 490 </td>
491 <td style="width: 17%"> 491 <td style="width: 17%">
492 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> 492 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]">
493 <option value="" disabled>Select</option> 493 <option value="" disabled>Select</option>
494 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> 494 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option>
495 </select> 495 </select>
496 496
497 <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]"> 497 <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList" ng-disabled="marginShow[$index]">
498 <option value="" disabled>Select...</option> 498 <option value="" disabled>Select...</option>
499 </select> --> 499 </select> -->
500 </td> 500 </td>
501 </tr> 501 </tr>
502 </tbody> 502 </tbody>
503 </table> 503 </table>
504 </div> 504 </div>
505 <div class="clearfix"></div> 505 <div class="clearfix"></div>
506 </div> 506 </div>
507 </div> 507 </div>
508 <div class="clearfix"></div> 508 <div class="clearfix"></div>
509 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> 509 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;">
510 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button> 510 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft </button>
511 </div> 511 </div>
512 </div> 512 </div>
513 </div> 513 </div>
514 <div class="clearfix"></div> 514 <div class="clearfix"></div>
515 </div> 515 </div>
516 </div> 516 </div>
517 </div> 517 </div>
518 </div> 518 </div>
519 <!-- <div class="modal-body step-3" data-step="3"> 519 <!-- <div class="modal-body step-3" data-step="3">
520 This is the final step. 520 This is the final step.
521 </div> --> 521 </div> -->
522 <div class="modal-footer" style="border-top: 0;"> 522 <div class="modal-footer" style="border-top: 0;">
523 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> 523 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button>
524 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> 524 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button>
525 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> 525 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button>
526 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> 526 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> -->
527 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> 527 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button>
528 </div> 528 </div>
529 </div> 529 </div>
530 </div> 530 </div>
531 </form> 531 </form>
532 532
533 <div class="customConfirmPopBackdrop" id="addAirCraftError"> 533 <div class="customConfirmPopBackdrop" id="addAirCraftError">
534 <div class="customModalInner" style="max-width: 400px;"> 534 <div class="customModalInner" style="max-width: 400px;">
535 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 535 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
536 <table> 536 <table>
537 <tr> 537 <tr>
538 <td> 538 <td>
539 <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> 539 <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p>
540 </td> 540 </td>
541 </tr> 541 </tr>
542 </table> 542 </table>
543 </div> 543 </div>
544 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 544 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
545 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button> 545 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">ok</button>
546 </div> 546 </div>
547 </div> 547 </div>
548 </div> 548 </div>
549 549
550 <div class="customConfirmPopBackdrop" id="addAirCraftWarning"> 550 <div class="customConfirmPopBackdrop" id="addAirCraftWarning">
551 <div class="customModalInner" style="max-width: 400px;"> 551 <div class="customModalInner" style="max-width: 400px;">
552 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 552 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
553 <table> 553 <table>
554 <tr> 554 <tr>
555 <td> 555 <td>
556 <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p> 556 <p style="padding: 5px 10px; margin-bottom: 0;">{{aircraftMessage}}</p>
557 </td> 557 </td>
558 </tr> 558 </tr>
559 </table> 559 </table>
560 </div> 560 </div>
561 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 561 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
562 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button> 562 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptAirCraftError()">Yes</button>
563 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button> 563 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAirCraftError()">No</button>
564 </div> 564 </div>
565 </div> 565 </div>
566 </div> 566 </div>
567 567
568 568
569 569
570 <!-- SetUp fuel order --> 570 <!-- SetUp fuel order -->
571 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> 571 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm">
572 <div class="modal-dialog modal-lg"> 572 <div class="modal-dialog modal-lg">
573 <div class="modal-content"> 573 <div class="modal-content">
574 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 574 <div class="modal-body step-1" data-step="1" style="padding: 0;">
575 <div> 575 <div>
576 <div class="row" style="margin: 0;"> 576 <div class="row" style="margin: 0;">
577 <div> 577 <div>
578 <div class="widget" style="margin-bottom: 0;"> 578 <div class="widget" style="margin-bottom: 0;">
579 <div class="widget-header"> 579 <div class="widget-header">
580 <i class="icon-pencil"></i> 580 <i class="icon-pencil"></i>
581 <i class="fa fa-tasks" aria-hidden="true"></i> 581 <i class="fa fa-tasks" aria-hidden="true"></i>
582 <h3>Add a Fuel Order</h3> 582 <h3>Add a Fuel Order</h3>
583 <div class="clearfix"></div> 583 <div class="clearfix"></div>
584 </div> 584 </div>
585 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 585 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
586 <div class="col-xs-12"> 586 <div class="col-xs-12">
587 <div class="col-xs-12"> 587 <div class="col-xs-12">
588 588
589 <div class="col-md-6"> 589 <div class="col-md-6">
590 <div class="pull-left" style="width: 110px;"> 590 <div class="pull-left" style="width: 110px;">
591 <label class="new-input-label"><b>Company</b></label> 591 <label class="new-input-label"><b>Company</b></label>
592 </div> 592 </div>
593 <div class="pull-left" style="width: calc(100% - 110px);"> 593 <div class="pull-left" style="width: calc(100% - 110px);">
594 <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> 594 <!-- <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required>
595 <option value="" selected disabled>Select Company</option> 595 <option value="" selected disabled>Select Company</option>
596 <option ng-repeat="list in companyList">{{list.companyName}}</option> 596 <option ng-repeat="list in companyList">{{list.companyName}}</option>
597 </select> --> 597 </select> -->
598 <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/> 598 <input type="text" disabled ng-model="order.defaultCompanyName" class="form-control"/>
599 </div> 599 </div>
600 <div class="clearfix"></div> 600 <div class="clearfix"></div>
601 </div> 601 </div>
602 <div class="col-md-6"> 602 <div class="col-md-6">
603 <div class="pull-left" style="width: 110px;"> 603 <div class="pull-left" style="width: 110px;">
604 <label class="new-input-label"><b>Product</b></label> 604 <label class="new-input-label"><b>Product</b></label>
605 </div> 605 </div>
606 <div class="pull-left" style="width: calc(100% - 110px);"> 606 <div class="pull-left" style="width: calc(100% - 110px);">
607 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required> 607 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required>
608 <option value="" selected disabled>Select Product</option> 608 <option value="" selected disabled>Select Product</option>
609 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> 609 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option>
610 </select> 610 </select>
611 </div> 611 </div>
612 <div class="clearfix"></div> 612 <div class="clearfix"></div>
613 </div> 613 </div>
614 614
615 </div> 615 </div>
616 <div class="clearfix"></div> 616 <div class="clearfix"></div>
617 <br/> 617 <br/>
618 618
619 619
620 <div class="col-xs-12"> 620 <div class="col-xs-12">
621 621
622 <div class="col-md-6"> 622 <div class="col-md-6">
623 <div class="pull-left" style="width: 110px;"> 623 <div class="pull-left" style="width: 110px;">
624 <label class="new-input-label"><b>Aircraft</b></label> 624 <label class="new-input-label"><b>Aircraft</b></label>
625 </div> 625 </div>
626 <div class="pull-left" style="width: calc(100% - 110px);"> 626 <div class="pull-left" style="width: calc(100% - 110px);">
627 <select class="form-control" ng-model="order.aircraftName" required> 627 <select class="form-control" ng-model="order.aircraftName" required>
628 <option selected disabled value="">Select Aircraft</option> 628 <option selected disabled value="">Select Aircraft</option>
629 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> 629 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option>
630 </select> 630 </select>
631 </div> 631 </div>
632 <div class="clearfix"></div> 632 <div class="clearfix"></div>
633 </div> 633 </div>
634 <div class="col-md-6"> 634 <div class="col-md-6">
635 <div class="pull-left" style="width: 110px;"> 635 <div class="pull-left" style="width: 110px;">
636 <label class="new-input-label"><b>Volume</b></label> 636 <label class="new-input-label"><b>Volume</b></label>
637 </div> 637 </div>
638 <div class="pull-left" style="width: calc(100% - 110px);"> 638 <div class="pull-left" style="width: calc(100% - 110px);">
639 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> 639 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required>
640 </div> 640 </div>
641 <div class="clearfix"></div> 641 <div class="clearfix"></div>
642 </div> 642 </div>
643 643
644 </div> 644 </div>
645 <div class="clearfix"></div> 645 <div class="clearfix"></div>
646 <br/> 646 <br/>
647 647
648 <div class="col-xs-12"> 648 <div class="col-xs-12">
649 649
650 <div class="col-md-6"> 650 <div class="col-md-6">
651 <div class="pull-left" style="width: 110px;"> 651 <div class="pull-left" style="width: 110px;">
652 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> 652 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label>
653 </div> 653 </div>
654 <div class="pull-left" style="width: calc(100% - 110px);"> 654 <div class="pull-left" style="width: calc(100% - 110px);">
655 <div style="width: 50%; float: left;"> 655 <div style="width: 50%; float: left;">
656 Date 656 Date
657 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> 657 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/>
658 </div> 658 </div>
659 <div style="width: 50%; float: left;"> 659 <div style="width: 50%; float: left;">
660 Time 660 Time
661 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> 661 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required>
662 <option ng-repeat="li in etaTimeList">{{li.time}}</option> 662 <option ng-repeat="li in etaTimeList">{{li.time}}</option>
663 </select> 663 </select>
664 664
665 </div> 665 </div>
666 </div> 666 </div>
667 <div class="clearfix"></div> 667 <div class="clearfix"></div>
668 </div> 668 </div>
669 669
670 <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> 670 <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'">
671 <div class="pull-left" style="width: 110px;"> 671 <div class="pull-left" style="width: 110px;">
672 <label class="new-input-label"><b>Invoiced</b></label> 672 <label class="new-input-label"><b>Invoiced</b></label>
673 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 673 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
674 </div> 674 </div>
675 <div class="pull-left" style="width: calc(100% - 110px);"> 675 <div class="pull-left" style="width: calc(100% - 110px);">
676 <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> 676 <input type="text" ng-model="order.invoiced" class="form-control" placeholder="">
677 </div> 677 </div>
678 <div class="clearfix"></div> 678 <div class="clearfix"></div>
679 </div> 679 </div>
680 </div> 680 </div>
681 <div class="clearfix"></div><br> 681 <div class="clearfix"></div><br>
682 682
683 683
684 <div class="col-xs-12"> 684 <div class="col-xs-12">
685 685
686 <div class="col-md-6"> 686 <div class="col-md-6">
687 <div class="pull-left" style="width: 110px;"> 687 <div class="pull-left" style="width: 110px;">
688 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> 688 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label>
689 </div> 689 </div>
690 <div class="pull-left" style="width: calc(100% - 110px);"> 690 <div class="pull-left" style="width: calc(100% - 110px);">
691 <div style="width: 50%; float: left;"> 691 <div style="width: 50%; float: left;">
692 Date 692 Date
693 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> 693 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/>
694 </div> 694 </div>
695 <div style="width: 50%; float: left;"> 695 <div style="width: 50%; float: left;">
696 Time 696 Time
697 <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> 697 <select class="form-control" ng-model="order.etdTime" style="width: 100%;">
698 <option ng-repeat="list in etdTimeList">{{list.time}}</option> 698 <option ng-repeat="list in etdTimeList">{{list.time}}</option>
699 </select> 699 </select>
700 700
701 </div> 701 </div>
702 </div> 702 </div>
703 <div class="clearfix"></div> 703 <div class="clearfix"></div>
704 </div> 704 </div>
705 705
706 <div class="col-md-6" style="margin-top: 22px;"> 706 <div class="col-md-6" style="margin-top: 22px;">
707 <div class="pull-left" style="width: 110px;"> 707 <div class="pull-left" style="width: 110px;">
708 <label class="new-input-label"><b>Total</b></label> 708 <label class="new-input-label"><b>Total</b></label>
709 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 709 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
710 </div> 710 </div>
711 <div class="pull-left" style="width: calc(100% - 110px);"> 711 <div class="pull-left" style="width: calc(100% - 110px);">
712 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> 712 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}">
713 </div> 713 </div>
714 </div> 714 </div>
715 </div> 715 </div>
716 <div class="clearfix"></div><br> 716 <div class="clearfix"></div><br>
717 717
718 718
719 <div class="col-xs-12"> 719 <div class="col-xs-12">
720 720
721 <div class="col-md-6"> 721 <div class="col-md-6">
722 <div class="pull-left" style="width: 110px;"> 722 <div class="pull-left" style="width: 110px;">
723 <label class="new-input-label"><b>Fuel on</b></label> 723 <label class="new-input-label"><b>Fuel on</b></label>
724 </div> 724 </div>
725 <div class="pull-left" style="width: calc(100% - 110px);"> 725 <div class="pull-left" style="width: calc(100% - 110px);">
726 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> 726 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;">
727 <option value="" disabled selected hidden>Select...</option> 727 <option value="" disabled selected hidden>Select...</option>
728 <option value="Arrival">Arrival</option> 728 <option value="Arrival">Arrival</option>
729 <option value="Departure">Departure</option> 729 <option value="Departure">Departure</option>
730 </select> 730 </select>
731 </div> 731 </div>
732 <div class="clearfix"></div> 732 <div class="clearfix"></div>
733 </div> 733 </div>
734 734
735 <div class="col-md-6"> 735 <div class="col-md-6">
736 <div class="pull-left" style="width: 110px;"> 736 <div class="pull-left" style="width: 110px;">
737 <label class="new-input-label"><b>FBO Cost</b></label> 737 <label class="new-input-label"><b>FBO Cost</b></label>
738 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 738 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
739 </div> 739 </div>
740 <div class="pull-left" style="width: calc(100% - 110px);"> 740 <div class="pull-left" style="width: calc(100% - 110px);">
741 <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" /> 741 <input type="text" disabled ng-model="order.fboCost | number : 4" class="form-control" placeholder="0.0000" />
742 </div> 742 </div>
743 <div class="clearfix"></div> 743 <div class="clearfix"></div>
744 </div> 744 </div>
745 </div> 745 </div>
746 <div class="clearfix"></div><br> 746 <div class="clearfix"></div><br>
747 747
748 <div class="col-xs-12"> 748 <div class="col-xs-12">
749 <div class="col-md-6"> 749 <div class="col-md-6">
750 <div class="pull-left" style="width: 110px;"> 750 <div class="pull-left" style="width: 110px;">
751 <label class="new-input-label"><b>Source</b></label> 751 <label class="new-input-label"><b>Source</b></label>
752 </div> 752 </div>
753 <div class="pull-left" style="width: calc(100% - 110px);"> 753 <div class="pull-left" style="width: calc(100% - 110px);">
754 <select class="form-control" ng-model="order.source" style="width: 100%;"> 754 <select class="form-control" ng-model="order.source" style="width: 100%;">
755 <option value="" disabled selected hidden>Select Source</option> 755 <option value="" disabled selected hidden>Select Source</option>
756 <option value="Tenant">Tenant</option> 756 <option value="Tenant">Tenant</option>
757 <option value="CAA">CAA</option> 757 <option value="CAA">CAA</option>
758 <option value="Tenant/CAA">Tenant/CAA</option> 758 <option value="Tenant/CAA">Tenant/CAA</option>
759 </select> 759 </select>
760 </div> 760 </div>
761 <div class="clearfix"></div> 761 <div class="clearfix"></div>
762 </div> 762 </div>
763 </div> 763 </div>
764 <div class="clearfix"></div> 764 <div class="clearfix"></div>
765 <br/> 765 <br/>
766 <div class="col-xs-12"> 766 <div class="col-xs-12">
767 767
768 768
769 <div class="col-md-6"> 769 <div class="col-md-6">
770 <div class="pull-left" style="width: 110px;"> 770 <div class="pull-left" style="width: 110px;">
771 <label class="new-input-label"><b>Certificate Type</b></label> 771 <label class="new-input-label"><b>Certificate Type</b></label>
772 </div> 772 </div>
773 <div class="pull-left" style="width: calc(100% - 110px);"> 773 <div class="pull-left" style="width: calc(100% - 110px);">
774 <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> 774 <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;">
775 <option value="" disabled selected hidden>Select...</option> 775 <option value="" disabled selected hidden>Select...</option>
776 <option value="corporate">Part 91 (Corporate)</option> 776 <option value="corporate">Part 91 (Corporate)</option>
777 <option value="charter">Part 135 (Charter)</option> 777 <option value="charter">Part 135 (Charter)</option>
778 <option value="scheduled">Part 121 (Scheduled)</option> 778 <option value="scheduled">Part 121 (Scheduled)</option>
779 <option value="military">Military</option> 779 <option value="military">Military</option>
780 <option value="government">Government</option> 780 <option value="government">Government</option>
781 </select> 781 </select>
782 </div> 782 </div>
783 <div class="clearfix"></div> 783 <div class="clearfix"></div>
784 </div> 784 </div>
785 <div class="col-md-6"> 785 <div class="col-md-6">
786 <div class="pull-left" style="width: 110px;"> 786 <div class="pull-left" style="width: 110px;">
787 <label class="new-input-label"><b>Status</b></label> 787 <label class="new-input-label"><b>Status</b></label>
788 </div> 788 </div>
789 <div class="pull-left" style="width: calc(100% - 110px);"> 789 <div class="pull-left" style="width: calc(100% - 110px);">
790 <select class="form-control" ng-model="order.status" style="width: 100%;"> 790 <select class="form-control" ng-model="order.status" style="width: 100%;">
791 <option value="" disabled selected hidden>pending</option> 791 <option value="" disabled selected hidden>pending</option>
792 <option value="pending">pending</option> 792 <option value="pending">pending</option>
793 <option value="invoiced">invoiced</option> 793 <option value="invoiced">invoiced</option>
794 <option value="paid">paid</option> 794 <option value="paid">paid</option>
795 <!-- <option value="cancelled">cancelled</option> 795 <!-- <option value="cancelled">cancelled</option>
796 <option value="archived">archived</option> --> 796 <option value="archived">archived</option> -->
797 </select> 797 </select>
798 </div> 798 </div>
799 <div class="clearfix"></div> 799 <div class="clearfix"></div>
800 </div> 800 </div>
801 </div> 801 </div>
802 <div class="clearfix"></div><br> 802 <div class="clearfix"></div><br>
803 803
804 </div> 804 </div>
805 </div> 805 </div>
806 </div> 806 </div>
807 </div> 807 </div>
808 </div> 808 </div>
809 </div> 809 </div>
810 <div class="modal-footer" style="border-top: 0;"> 810 <div class="modal-footer" style="border-top: 0;">
811 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> 811 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button>
812 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button> 812 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="dispatchFuel()">Save</button>
813 </div> 813 </div>
814 </div> 814 </div>
815 </div> 815 </div>
816 </div> 816 </div>
817 </form> 817 </form>
818 818
819 819
820 <div class="myLoader" ng-show="showLoader"> 820 <div class="myLoader" ng-show="showLoader">
821 <img src="../img/hourglass.gif" width="50px;"> 821 <img src="../img/hourglass.gif" width="50px;">
822 </div> 822 </div>
823 <script src="js/multi-step-modal.js"></script> 823 <script src="js/multi-step-modal.js"></script>
824 <script> 824 <script>
825 sendEvent = function(sel, step) { 825 sendEvent = function(sel, step) {
826 $(sel).trigger('next.m.' + step); 826 $(sel).trigger('next.m.' + step);
827 } 827 }
828 </script> 828 </script>
app/partials/dashboard/dashboard.controller.js
1 (function() { 1 (function() {
2 'use strict' 2 'use strict'
3 3
4 angular.module('acufuel') 4 angular.module('acufuel')
5 .controller('dashboardController', [ '$scope', '$filter', '$rootScope', '$state', 'dashboardService','updateFuelManagerService', 'analyticsService', dashboardController]); 5 .controller('dashboardController', [ '$scope', '$filter', '$rootScope', '$state', 'dashboardService','updateFuelManagerService', 'analyticsService', dashboardController]);
6 6
7 function dashboardController($scope, $filter, $rootScope, $state, dashboardService,updateFuelManagerService,analyticsService) { 7 function dashboardController($scope, $filter, $rootScope, $state, dashboardService,updateFuelManagerService,analyticsService) {
8 8
9 $scope.getQuote = true; 9 $scope.getQuote = true;
10 $scope.showQuote = false; 10 $scope.showQuote = false;
11 $scope.getQuote = function () { 11 $scope.getQuote = function () {
12 $scope.getQuote = false; 12 $scope.getQuote = false;
13 $scope.showQuote = true; 13 $scope.showQuote = true;
14 } 14 }
15 15
16 $scope.logout = function () { 16 $scope.logout = function () {
17 localStorage.clear(); 17 localStorage.clear();
18 localStorage.removeItem("loginStatus"); 18 localStorage.removeItem("loginStatus");
19 $rootScope.path = false; 19 $rootScope.path = false;
20 $state.reload(); 20 $state.reload();
21 } 21 }
22 22
23 $scope.marginList = {}; 23 $scope.marginList = {};
24 dashboardService.getMargin().then(function(result) { 24 dashboardService.getMargin().then(function(result) {
25 $scope.marginList = result; 25 $scope.marginList = result;
26 // console.log("--kd Margin result--", result) 26 // console.log("--kd Margin result--", result)
27 }) 27 })
28 28
29 $scope.newFuelPricing = {}; 29 $scope.newFuelPricing = {};
30 dashboardService.getFuelPricingNew().then(function(result) { 30 dashboardService.getFuelPricingNew().then(function(result) {
31 $scope.newFuelPricing = result; 31 $scope.newFuelPricing = result;
32 // console.log("kd Fuel Pricing result", result) 32 // console.log("kd Fuel Pricing result", result)
33 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 33 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
34 if ($scope.newFuelPricing[i].fuelPricing != null) { 34 if ($scope.newFuelPricing[i].fuelPricing != null) {
35 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { 35 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
36 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 36 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
37 var month = newTime.getUTCMonth() + 1; //months from 1-12 37 var month = newTime.getUTCMonth() + 1; //months from 1-12
38 var day = newTime.getUTCDate(); 38 var day = newTime.getUTCDate();
39 var year = newTime.getUTCFullYear(); 39 var year = newTime.getUTCFullYear();
40 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; 40 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
41 } 41 }
42 } 42 }
43 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 43 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
44 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 44 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
45 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { 45 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
46 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 46 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
47 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 47 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
48 var nextDay = newTime.getUTCDate(); 48 var nextDay = newTime.getUTCDate();
49 var nextYear = newTime.getUTCFullYear(); 49 var nextYear = newTime.getUTCFullYear();
50 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; 50 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
51 } 51 }
52 } 52 }
53 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 53 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
54 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { 54 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
55 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 55 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
56 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 56 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
57 var dday = newTime.getUTCDate(); 57 var dday = newTime.getUTCDate();
58 var dyear = newTime.getUTCFullYear(); 58 var dyear = newTime.getUTCFullYear();
59 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; 59 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
60 } 60 }
61 } 61 }
62 } 62 }
63 var str =""+ $scope.newFuelPricing[i].name 63 var str =""+ $scope.newFuelPricing[i].name
64 if(str.startsWith("J")){ 64 if(str.startsWith("J")){
65 $scope.newFuelPricing[i].jeta = true; 65 $scope.newFuelPricing[i].jeta = true;
66 var str1 = str.substring(0,5) 66 var str1 = str.substring(0,5)
67 var str2 = str.substring(6, str.length) 67 var str2 = str.substring(6, str.length)
68 $scope.newFuelPricing[i].name = str1 68 $scope.newFuelPricing[i].name = str1
69 $scope.newFuelPricing[i].namejetrest = str2 69 $scope.newFuelPricing[i].namejetrest = str2
70 70
71 71
72 }else if(str.startsWith("100")){ 72 }else if(str.startsWith("100")){
73 $scope.newFuelPricing[i].avgas = true; 73 $scope.newFuelPricing[i].avgas = true;
74 var str1 = str.substring(0,5) 74 var str1 = str.substring(0,5)
75 var str2 = str.substring(6, str.length) 75 var str2 = str.substring(6, str.length)
76 $scope.newFuelPricing[i].name = str1 76 $scope.newFuelPricing[i].name = str1
77 $scope.newFuelPricing[i].nameavgasrest = str2 77 $scope.newFuelPricing[i].nameavgasrest = str2
78 } 78 }
79 } 79 }
80 $scope.showLoader = false; 80 $scope.showLoader = false;
81 }) 81 })
82 82
83 83
84 $scope.updateFuelPricing = {}; 84 $scope.updateFuelPricing = {};
85 $scope.updateFuelPricing.fuelPricingList = []; 85 $scope.updateFuelPricing.fuelPricingList = [];
86 $scope.updateFuelPricing.userProfileId = $scope.userProfileId; 86 $scope.updateFuelPricing.userProfileId = $scope.userProfileId;
87 $scope.updateFuelPricingClick = function(){ 87 $scope.updateFuelPricingClick = function(){
88 $scope.showLoader = true; 88 $scope.showLoader = true;
89 89
90 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 90 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
91 if ($scope.newFuelPricing[i].fuelPricing != null) { 91 if ($scope.newFuelPricing[i].fuelPricing != null) {
92 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); 92 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
93 if ($scope.newFuelPricing[i].fuelPricing.cost == null) { 93 if ($scope.newFuelPricing[i].fuelPricing.cost == null) {
94 $scope.newFuelPricing[i].fuelPricing.cost = ''; 94 $scope.newFuelPricing[i].fuelPricing.cost = '';
95 } 95 }
96 if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { 96 if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) {
97 $scope.newFuelPricing[i].fuelPricing.papMargin = ''; 97 $scope.newFuelPricing[i].fuelPricing.papMargin = '';
98 } 98 }
99 if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { 99 if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) {
100 $scope.newFuelPricing[i].fuelPricing.papTotal = ''; 100 $scope.newFuelPricing[i].fuelPricing.papTotal = '';
101 } 101 }
102 if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { 102 if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) {
103 $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; 103 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';
104 }else{ 104 }else{
105 $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 105 $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
106 // console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); 106 // console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate);
107 $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); 107 $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime();
108 } 108 }
109 109
110 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); 110 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
111 $scope.updateFuelPricing.fuelPricingList.push({ 111 $scope.updateFuelPricing.fuelPricingList.push({
112 'cost': $scope.newFuelPricing[i].fuelPricing.cost, 112 'cost': $scope.newFuelPricing[i].fuelPricing.cost,
113 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, 113 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin,
114 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, 114 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal,
115 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, 115 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate,
116 'productId': $scope.newFuelPricing[i].id, 116 'productId': $scope.newFuelPricing[i].id,
117 'id': $scope.newFuelPricing[i].fuelPricing.id, 117 'id': $scope.newFuelPricing[i].fuelPricing.id,
118 }) 118 })
119 119
120 }else{ 120 }else{
121 /*$scope.newFuelPricing[i].fuelPricing.cost = ''; 121 /*$scope.newFuelPricing[i].fuelPricing.cost = '';
122 $scope.newFuelPricing[i].fuelPricing.papMargin = ''; 122 $scope.newFuelPricing[i].fuelPricing.papMargin = '';
123 $scope.newFuelPricing[i].fuelPricing.papTotal = ''; 123 $scope.newFuelPricing[i].fuelPricing.papTotal = '';
124 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ 124 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/
125 } 125 }
126 126
127 } 127 }
128 128
129 // console.log('result',$scope.marginList) 129 // console.log('result',$scope.marginList)
130 dashboardService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { 130 dashboardService.updateFuelPricing($scope.updateFuelPricing).then(function(result) {
131 toastr.success('Successfully Updated', { 131 toastr.success('Successfully Updated', {
132 closeButton: true 132 closeButton: true
133 }) 133 })
134 dashboardService.getFuelPricingNew().then(function(result) { 134 dashboardService.getFuelPricingNew().then(function(result) {
135 $scope.newFuelPricing = result; 135 $scope.newFuelPricing = result;
136 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 136 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
137 if ($scope.newFuelPricing[i].fuelPricing != null) { 137 if ($scope.newFuelPricing[i].fuelPricing != null) {
138 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { 138 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
139 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 139 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
140 var month = newTime.getUTCMonth() + 1; //months from 1-12 140 var month = newTime.getUTCMonth() + 1; //months from 1-12
141 var day = newTime.getUTCDate(); 141 var day = newTime.getUTCDate();
142 var year = newTime.getUTCFullYear(); 142 var year = newTime.getUTCFullYear();
143 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; 143 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
144 } 144 }
145 } 145 }
146 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 146 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
147 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 147 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
148 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { 148 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
149 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 149 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
150 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 150 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
151 var nextDay = newTime.getUTCDate(); 151 var nextDay = newTime.getUTCDate();
152 var nextYear = newTime.getUTCFullYear(); 152 var nextYear = newTime.getUTCFullYear();
153 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; 153 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
154 } 154 }
155 } 155 }
156 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 156 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
157 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { 157 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
158 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 158 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
159 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 159 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
160 var dday = newTime.getUTCDate(); 160 var dday = newTime.getUTCDate();
161 var dyear = newTime.getUTCFullYear(); 161 var dyear = newTime.getUTCFullYear();
162 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; 162 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
163 } 163 }
164 } 164 }
165 } 165 }
166 } 166 }
167 $scope.showLoader = false; 167 $scope.showLoader = false;
168 }) 168 })
169 }) 169 })
170 170
171 } 171 }
172 172
173 173
174 174
175 // $scope.submitLogin = function() { 175 // $scope.submitLogin = function() {
176 // LoginService.setAuth(true); 176 // LoginService.setAuth(true);
177 // toastr.info("Login successfully"); 177 // toastr.info("Login successfully");
178 // $state.go('app.dashboard'); 178 // $state.go('app.dashboard');
179 // /*LoginService.login($scope.username, $scope.password).then(function(result){ 179 // /*LoginService.login($scope.username, $scope.password).then(function(result){
180 // if(typeof result == 'object') { 180 // if(typeof result == 'object') {
181 // LoginService.setAuth(true); 181 // LoginService.setAuth(true);
182 // $rootScope.path = true; 182 // $rootScope.path = true;
183 // var reqPwdChng = localStorage.getItem("requiredChangePwd"); 183 // var reqPwdChng = localStorage.getItem("requiredChangePwd");
184 // if (reqPwdChng && reqPwdChng == "Y") { 184 // if (reqPwdChng && reqPwdChng == "Y") {
185 // $state.go('resetPassword'); 185 // $state.go('resetPassword');
186 // } else { 186 // } else {
187 // $state.go('app.upload'); 187 // $state.go('app.upload');
188 // } 188 // }
189 // } else { 189 // } else {
190 // toastr.info("Error in login. Please check login name and password"); 190 // toastr.info("Error in login. Please check login name and password");
191 // } 191 // }
192 // })*/ 192 // })*/
193 // } 193 // }
194 194
195 $scope.completeOrderCount = ''; 195 $scope.completeOrderCount = '';
196 $scope.pendingOrderCount= ''; 196 $scope.pendingOrderCount= '';
197 197
198 dashboardService.getFuelordercount().then(function(result) { 198 dashboardService.getFuelordercount().then(function(result) {
199 if(result[0].label=='Completed' && result[1].label=='Pending'){ 199 if(result[0].label=='Completed' && result[1].label=='Pending'){
200 $scope.completeOrderCount=result[0].value; 200 $scope.completeOrderCount=result[0].value;
201 $scope.pendingOrderCount=result[1].value; 201 $scope.pendingOrderCount=result[1].value;
202 } 202 }
203 203
204 }) 204 })
205 205
206 $scope.sendEmail = {}; 206 $scope.sendEmail = {};
207 $scope.confirmMail = function(){ 207 $scope.confirmMail = function(){
208 if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { 208 if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) {
209 $('#confirm1').css('display', 'block'); 209 $('#confirm1').css('display', 'block');
210 210
211 } 211 }
212 } 212 }
213 $scope.saveAndCloseConfirm = function(){ 213 $scope.saveAndCloseConfirm = function(){
214 $('#confirm1').css('display', 'none'); 214 $('#confirm1').css('display', 'none');
215 updateFuelManagerService.sendMailToGroupMargin($scope.sendEmail.pricing).then(function(result) { 215 updateFuelManagerService.sendMailToGroupMargin($scope.sendEmail.pricing).then(function(result) {
216 // console.log("--email---",$scope.sendEmail.pricing);
217 // console.lo("==result==",result)
216 $scope.sendEmail = {}; 218 $scope.sendEmail = {};
217 if(result.error) { 219 if(result.error) {
218 toastr.error('' + result.error + '', { 220 toastr.error('' + result.error + '', {
219 closeButton: true 221 closeButton: true
220 }) 222 })
221 } else { 223 } else {
222 toastr.success(''+result.success+'', { 224 toastr.success(''+result.success+'', {
223 closeButton: true 225 closeButton: true
224 }) 226 })
225 } 227 }
226 }) 228 })
227 } 229 }
228 $scope.cancelAndCloseConfirm = function(){ 230 $scope.cancelAndCloseConfirm = function(){
229 $scope.sendEmail = {}; 231 $scope.sendEmail = {};
230 $scope.sendEmail.pricing = ''; 232 $scope.sendEmail.pricing = '';
231 $('#confirm1').css('display', 'none'); 233 $('#confirm1').css('display', 'none');
232 } 234 }
233 235
234 $scope.pendingMessageRecord=[]; 236 $scope.pendingMessageRecord=[];
235 dashboardService.getPendingMessage().then(function(result) { 237 dashboardService.getPendingMessage().then(function(result) {
238 // console.log("==message===",result)
236 $scope.pendingMessageRecord=result; 239 $scope.pendingMessageRecord=result;
237 }) 240 })
238 241
239 242
240 $scope.orderCostAndCount = function() { 243 $scope.orderCostAndCount = function() {
241 analyticsService.orderCostAndCount().then(function(result) { 244 analyticsService.orderCostAndCount().then(function(result) {
242 $scope.ordersCost = result.cost; 245 $scope.ordersCost = result.cost;
243 $scope.ordersCount = result.count; 246 $scope.ordersCount = result.count;
244 }) 247 })
245 } 248 }
246 249
247 $scope.drf = {}; 250 $scope.drf = {};
248 $scope.hfp = {}; 251 $scope.hfp = {};
249 $scope.cs = {}; 252 $scope.cs = {};
250 $scope.mfsValues = []; 253 $scope.mfsValues = [];
251 $scope.msfarray = []; 254 $scope.msfarray = [];
252 $scope.getMFS = function() { 255 $scope.getMFS = function() {
253 //var makeId = makeId; 256 //var makeId = makeId;
254 analyticsService.getMFS().then(function(result) { 257 analyticsService.getMFS().then(function(result) {
255 $scope.mfsValues = result; 258 $scope.mfsValues = result;
256 $scope.optionsmfs = { 259 $scope.optionsmfs = {
257 chart: { 260 chart: {
258 type: 'multiBarChart', 261 type: 'multiBarChart',
259 height: 450, 262 height: 450,
260 margin: { 263 margin: {
261 top: 45, 264 top: 45,
262 right: 20, 265 right: 20,
263 bottom: 45, 266 bottom: 45,
264 left: 45 267 left: 45
265 }, 268 },
266 clipEdge: true, 269 clipEdge: true,
267 //staggerLabels: true, 270 //staggerLabels: true,
268 duration: 500, 271 duration: 500,
269 stacked: false, 272 stacked: false,
270 color: ["#FEDFC3", "#990000", "#000099", "#009900"], 273 //color: ["#FEDFC3", "#990000", "#000099", "#009900"],
274 color: ["#A9A9A9", "#000099", "#990000", "#009900"],
271 xAxis: { 275 xAxis: {
272 axisLabel: 'Months', 276 axisLabel: 'Months',
273 showMaxMin: false, 277 showMaxMin: false,
274 }, 278 },
275 yAxis: { 279 yAxis: {
276 axisLabel: 'Orders', 280 axisLabel: 'Orders',
277 axisLabelDistance: -20, 281 axisLabelDistance: -20,
278 tickFormat: function(d) { 282 tickFormat: function(d) {
279 return d3.format(',.1f')(d); 283 return d3.format(',.1f')(d);
280 } 284 }
281 } 285 }
282 } 286 }
283 }; 287 };
284 $scope.datamfs = $scope.mfsValues; 288 $scope.datamfs = $scope.mfsValues;
285 }) 289 })
286 } 290 }
287 291
288 $scope.orderCostAndCount(); 292 $scope.orderCostAndCount();
289 $scope.getMFS(); 293 $scope.getMFS();
290 294
291 } 295 }
292 })(); 296 })();
293 297
app/partials/dashboard/dashboard.html
1 <style> 1 <style>
2 .subnavbar .mainnav > li:first-child > a{ 2 .subnavbar .mainnav > li:first-child > a{
3 color: #ca5c6a; 3 color: #ca5c6a;
4 } 4 }
5
5 </style> 6 </style>
6 <!-- <style> 7 <!-- <style>
7 table, th , td { 8 table, th , td {
8 border: 1px solid grey; 9 border: 1px solid grey;
9 border-collapse: collapse; 10 border-collapse: collapse;
10 padding: 5px; 11 padding: 5px;
11 } 12 }
12 table tr:nth-child(odd) { 13 table tr:nth-child(odd) {
13 background-color: #f1f1f1; 14 background-color: #f1f1f1;
14 } 15 }
15 table tr:nth-child(even) { 16 table tr:nth-child(even) {
16 background-color: #ffffff; 17 background-color: #ffffff;
17 } 18 }
18 </style> --> 19 </style> -->
19 <div class="main"> 20 <div class="main">
20 <div class="container" ng-if="isAuthenticated"> 21 <div class="container" ng-if="isAuthenticated">
21 <div class="row"> 22 <div class="row">
22 <div class="col-md-7"> 23 <div class="col-md-7">
23 <div class="widget stacked"> 24 <div class="widget stacked">
24 <div class="row"> 25 <div class="row">
25 <div class="col-md-3"> 26 <div class="col-md-3">
26 <div class="widget-header"> 27 <div class="widget-header">
27 <i class="fa fa-tint"></i> &nbsp; Fuel Orders 28 <i class="fa fa-tint"></i> &nbsp; Reconciled Orders
28 29
29 </div> 30 </div>
30 <div class="custom-widget-content"> 31 <div class="custom-widget-content">
31 <div> 32 <div>
32 <div class="col-xs-12"> 33 <div class="col-xs-12">
33 <label class="pull-left" style="font-size: 13px" >Completed</label> 34 <label class="pull-left" style="font-size: 13px" >Completed</label>
34 <span style="font-size: 11px">&nbsp;Monthly</span> 35 <span style="font-size: 11px">&nbsp;Monthly</span>
35 <!-- <button class="btn btn-success btn-xs pull-right" style="cursor: default"> --> 36 <!-- <button class="btn btn-success btn-xs pull-right" style="cursor: default"> -->
36 <!-- <label class="pull-right">Montly</label> --> 37 <!-- <label class="pull-right">Montly</label> -->
37 <!-- <span style="font-size:13px;">(Monthly)</span> --> 38 <!-- <span style="font-size:13px;">(Monthly)</span> -->
38 <div class="clearfix"></div> 39 <div class="clearfix"></div>
39 </div> 40 </div>
40 <div class="clearfix"></div> 41 <div class="clearfix"></div>
41 </div> 42 </div>
42 <hr class="hr"> 43 <hr class="hr">
43 <div class="col-xs-12"> 44 <div class="col-xs-12">
44 <h2 style="margin-bottom: 0px;">{{completeOrderCount}}</h2> 45 <h2 style="margin-bottom: 0px;">{{completeOrderCount}}</h2>
45 <span>Fuel Orders</span> 46 <span>Fuel Orders</span>
46 </div> 47 </div>
47 <div class="clearfix"></div> 48 <div class="clearfix"></div>
48 </div> 49 </div>
49 </div> 50 </div>
50 <div class="col-md-3"> 51 <div class="col-md-3">
51 <div class="widget-header"> 52 <div class="widget-header">
52 <i class="fa fa-tint"></i> &nbsp; Fuel Orders 53 <i class="fa fa-tint"></i> &nbsp; Pending Orders
53 54
54 </div> 55 </div>
55 <div class="custom-widget-content"> 56 <div class="custom-widget-content">
56 <div> 57 <div>
57 <div class="col-xs-12"> 58 <div class="col-xs-12">
58 <label class="pull-left" style="font-size: 13px" >Pending</label> 59 <label class="pull-left" style="font-size: 13px" >Pending</label>
59 <span style="font-size: 11px">&nbsp;Monthly</span> 60 <span style="font-size: 11px">&nbsp;Monthly</span>
60 <!-- <span class="pull-left">Pending</span><button class="btn btn-success btn-xs pull-right pull-right-color " style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> 61 <!-- <span class="pull-left">Pending</span><button class="btn btn-success btn-xs pull-right pull-right-color " style="cursor: default"><span style="font-size:9px;">Monthly</span></button> -->
61 <div class="clearfix"></div> 62 <div class="clearfix"></div>
62 </div> 63 </div>
63 <div class="clearfix"></div> 64 <div class="clearfix"></div>
64 </div> 65 </div>
65 <hr class="hr"> 66 <hr class="hr">
66 <div class="col-xs-12"> 67 <div class="col-xs-12">
67 <h2 style="margin-bottom: 0px;">{{pendingOrderCount}}</h2> 68 <h2 style="margin-bottom: 0px;">{{pendingOrderCount}}</h2>
68 <span>Fuel Orders</span> 69 <span>Fuel Orders</span>
69 </div> 70 </div>
70 <div class="clearfix"></div> 71 <div class="clearfix"></div>
71 </div> 72 </div>
72 </div> 73 </div>
73 <div class="col-md-6"> 74 <div class="col-md-6">
74 <div class="widget-header"> 75 <div class="widget-header">
75 <i class="fa fa-list-alt "></i> 76 <i class="fa fa-list-alt "></i>
76 <h3>Fuel Order</h3> 77 <h3>Airport Operations</h3>
77 </div> 78 </div>
78 <div class="custom-widget-content"> 79 <div class="custom-widget-content">
79 <div> 80 <div>
80 <div class="col-xs-12"> 81 <div class="col-xs-12">
81 <label class="pull-left" style="font-size: 12px" >Activity :&nbsp;Airport Operations</label> 82 <label class="pull-left" style="font-size: 12px" >Activity :&nbsp;Airport Operations</label>
82 <span style="font-size: 11px">&nbsp;&nbsp;Monthly</span> 83 <span style="font-size: 11px">&nbsp;&nbsp;Monthly</span>
83 <!-- <span class="pull-left">Activity: Airport Operations</span><button class="btn btn-primary btn-xs pull-right" style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> 84 <!-- <span class="pull-left">Activity: Airport Operations</span><button class="btn btn-primary btn-xs pull-right" style="cursor: default"><span style="font-size:9px;">Monthly</span></button> -->
84 <div class="clearfix"></div> 85 <div class="clearfix"></div>
85 </div> 86 </div>
86 <div class="clearfix"></div> 87 <div class="clearfix"></div>
87 </div> 88 </div>
88 <hr class="hr"> 89 <hr class="hr">
89 <div class="col-xs-6"> 90 <div class="col-xs-6">
90 <h2 style="margin-bottom:0px;">280</h2> 91 <h2 style="margin-bottom:0px;">280</h2>
91 <span>Based-Aircraft</span> 92 <span>Based-Aircraft</span>
92 </div> 93 </div>
93 <div class="col-xs-6"> 94 <div class="col-xs-6">
94 <h2 style="margin-bottom: 0px;">280</h2> 95 <h2 style="margin-bottom: 0px;">280</h2>
95 <span>Take-offs & Landings</span> 96 <span>Take-offs & Landings</span>
96 </div> 97 </div>
97 <div class="clearfix"></div> 98 <div class="clearfix"></div>
98 </div> 99 </div>
99 </div> 100 </div>
100 </div> 101 </div>
101 </br> 102 </br>
102 <div class="row"> 103 <div class="row">
103 <div class="col-md-12"> 104 <div class="col-md-12">
104 <!-- <div class="widget stacked"> --> 105 <!-- <div class="widget stacked"> -->
105 <div class="widget-header"> 106 <div class="widget-header">
106 <i class="icon-bar-chart"></i> 107 <i class="icon-bar-chart"></i>
107 <h3>${{ordersCost | number :2}}/{{ordersCount}} Fuel Sales</h3> 108 <h3>${{ordersCost | number :2}}/{{ordersCount}} Fuel Sales</h3>
108 </div> 109 </div>
109 <!-- /widget-header --> 110 <!-- /widget-header -->
110 <div class="widget-content"> 111 <div class="widget-content">
111 <nvd3 options="optionsmfs" data="datamfs"></nvd3> 112 <nvd3 options="optionsmfs" data="datamfs"></nvd3>
112 <!-- /bar-chart --> 113 <!-- /bar-chart -->
113 <!-- </div> --> 114 <!-- </div> -->
114 <!-- /widget-content --> 115 <!-- /widget-content -->
115 </div> 116 </div>
116 <!-- /widget-content --> 117 <!-- /widget-content -->
117 </div> 118 </div>
118 <!-- /widget --> 119 <!-- /widget -->
119 </div> 120 </div>
120 </div> 121 </div>
121 </div> 122 </div>
122 <!-- /span6 --> 123 <!-- /span6 -->
123 <div class="col-md-5"> 124 <div class="col-md-5">
124 <div class="widget stacked"> 125 <div class="widget stacked">
125 <div class="widget-header"> 126 <div class="widget-header">
126 <i class="fa fa-pencil"></i> 127 <i class="fa fa-pencil"></i>
127 <h3>Price Manager Active</h3> 128 <h3>Price Manager Active</h3>
128 <select ng-show="isShowEmail" style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-click="confirmMail()"> 129 <select ng-show="isShowEmail" style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-click="confirmMail()">
129 <option value="" disabled selected="selected">Email All Pricing</option> 130 <option value="" disabled selected="selected">Email All Pricing</option>
130 <option value="JET-A">Email JET-A pricing only</option> 131 <option value="JET-A">Email JET-A pricing only</option>
131 <option value="AVGAS">Email AVGAS pricing only</option> 132 <option value="AVGAS">Email AVGAS pricing only</option>
132 <option disabled>_______________________________</option> 133 <option disabled>_______________________________</option>
133 <option value="all">Distribute All</option> 134 <option value="all">Distribute All</option>
134 </select> 135 </select>
135 </div> 136 </div>
136 <!-- /widget-header --> 137 <!-- /widget-header -->
137 <div class="widget-content"> 138 <div class="widget-content">
138 <h4>Deployed Fuel Prices</h4> 139 <h4>Deployed Fuel Prices</h4>
139 <table class="table vertical-center""> 140 <table class="table vertical-center"">
140 <thead> 141 <thead>
141 <tr> 142 <tr>
142 <th> Product</th> 143 <th> Product</th>
143 <th> Cost</th> 144 <th> Cost</th>
144 <th> Margin</th> 145 <th> Margin</th>
145 <th> PAP(Total)</th> 146 <th> PAP(Total)</th>
146 <th style="color: #F90;"> Expires</th> 147 <th style="color: #F90;"> Expires</th>
147 </tr> 148 </tr>
148 </thead> 149 </thead>
149 <tbody> 150 <tbody>
150 <tr ng-repeat="fuelPricing in newFuelPricing | orderBy : 'namejetrest'| filter:{ status: true }"> 151 <tr ng-repeat="fuelPricing in newFuelPricing | orderBy : 'namejetrest'| filter:{ status: true }">
151 <td> 152 <td>
152 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> 153 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span>
153 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> 154 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span>
154 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> 155 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span>
155 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> 156 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span>
156 </td> 157 </td>
157 <td> 158 <td>
158 <span>{{fuelPricing.fuelPricing.cost | number : 4}}</span> 159 <span>{{fuelPricing.fuelPricing.cost | number : 4}}</span>
159 </td> 160 </td>
160 <td> 161 <td>
161 <span>{{fuelPricing.fuelPricing.papMargin | number : 4}}</span> 162 <span>{{fuelPricing.fuelPricing.papMargin | number : 4}}</span>
162 </td> 163 </td>
163 <td> 164 <td>
164 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 4 }}</span> 165 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 4 }}</span>
165 </td> 166 </td>
166 <td> 167 <td>
167 <span>{{fuelPricing.fuelPricing.expirationDate}}</span> 168 <span>{{fuelPricing.fuelPricing.expirationDate}}</span>
168 </td> 169 </td>
169 </tr> 170 </tr>
170 </tbody> 171 </tbody>
171 </table> 172 </table>
172 </div> 173 </div>
173 <!-- /widget-content --> 174 <!-- /widget-content -->
174 </div> 175 </div>
175 <!-- /widget --> 176 <!-- /widget -->
176 <div class="widget widget-nopad stacked"> 177 <div class="widget widget-nopad stacked">
177 <div class="widget-header"> 178 <div class="widget-header">
178 <i class="fa fa-comment" aria-hidden="true"></i> 179 <i class="fa fa-comment" aria-hidden="true"></i>
179 <h3>Messages</h3> 180 <h3>Needs Attention</h3>
180 </div> 181 </div>
181 <!-- /widget-header --> 182 <!-- /widget-header -->
182 <div class="widget-content"> 183 <div class="widget-content">
183 <h4 style="padding:10px">Messages</h4> 184 <h4 style="padding:10px">Messages</h4>
184 <hr class="hr"> 185 <hr class="hr">
185 <table> 186 <table>
186 <tr ng-repeat="msg in pendingMessageRecord"> 187 <tr ng-repeat="msg in pendingMessageRecord">
187 <td>Fuel Order is Pending for the company {{ msg[5] }} </td> 188 <td>Fuel Order is Pending for the company {{ msg[5] }} </td>
188 </tr> 189 </tr>
189 </table> 190 </table>
190 <!-- <ul class="news-items"><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li></ul> --> 191 <!-- <ul class="news-items"><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li></ul> -->
191 </div> 192 </div>
192 <!-- /widget-content --> 193 <!-- /widget-content -->
193 </div> 194 </div>
194 <!-- /widget --> 195 <!-- /widget -->
195 </div> 196 </div>
196 <!-- /span6 --> 197 <!-- /span6 -->
197 </div> 198 </div>
198 <!-- /row --> 199 <!-- /row -->
199 </div> 200 </div>
200 <!-- /container --> 201 <!-- /container -->
201 </div> 202 </div>
202 <!-- /main --> 203 <!-- /main -->
203 <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> 204 <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;">
204 <div class="customModalInner"> 205 <div class="customModalInner">
205 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 206 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
206 <table> 207 <table>
207 <tr> 208 <tr>
208 <td> 209 <td>
209 <img src="img/info.png" style="width: 50px;"> 210 <img src="img/info.png" style="width: 50px;">
210 </td> 211 </td>
211 <td> 212 <td>
212 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> 213 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p>
213 </td> 214 </td>
214 </tr> 215 </tr>
215 </table> 216 </table>
216 </div> 217 </div>
217 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 218 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
218 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> 219 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button>
219 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> 220 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button>
220 </div> 221 </div>
221 </div> 222 </div>
222 </div> 223 </div>
223 224
app/partials/enterFuelOrder/enterFuelOrder.controller.js
1 'use strict'; 1 'use strict';
2 2
3 angular.module('acufuel') 3 angular.module('acufuel')
4 4
5 .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]); 5 .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]);
6 6
7 function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) { 7 function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) {
8 $scope.showLoader = true; 8 $scope.showLoader = true;
9 9
10 $scope.companyList = {}; 10 $scope.companyList = {};
11 11
12 enterFuelOrderService.getAllCompanies().then(function(result) { 12 enterFuelOrderService.getAllCompanies().then(function(result) {
13 $scope.showLoader = false; 13 $scope.showLoader = false;
14 $scope.companyList = result; 14 $scope.companyList = result;
15 }) 15 })
16 16
17 $scope.order = {}; 17 $scope.order = {};
18 $scope.dispatchOrder = {}; 18 $scope.dispatchOrder = {};
19 $scope.dispatchOrder.fuelOrderList = []; 19 $scope.dispatchOrder.fuelOrderList = [];
20 $scope.order.upliftDate = ''; 20 $scope.order.upliftDate = '';
21 //$scope.order.departingDate = ''; 21 //$scope.order.departingDate = '';
22 $scope.selectedCompanyName = ''; 22 $scope.selectedCompanyName = '';
23 $scope.selectedCompanyId = ''; 23 $scope.selectedCompanyId = '';
24 $scope.marginId = ''; 24 $scope.marginId = '';
25 $scope.selectedTier = ''; 25 $scope.selectedTier = '';
26 26
27 $scope.getAircraft = function(company){ 27 $scope.getAircraft = function(company){
28 $scope.selectedCompanyName = company; 28 $scope.selectedCompanyName = company;
29 29
30 $scope.showLoader = true; 30 $scope.showLoader = true;
31 for (var i = 0; i < $scope.companyList.length; i++) { 31 for (var i = 0; i < $scope.companyList.length; i++) {
32 if ($scope.companyList[i].companyName == company) { 32 if ($scope.companyList[i].companyName == company) {
33 if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ 33 if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){
34 enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) { 34 enterFuelOrderService.getFuelCost($scope.companyList[i].id).then(function(margins) {
35 $scope.marginList = margins; 35 $scope.marginList = margins;
36 }) 36 })
37 } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) { 37 } else if ($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS == null) {
38 enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { 38 enterFuelOrderService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) {
39 $scope.marginList = margins; 39 $scope.marginList = margins;
40 }) 40 })
41 } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) { 41 } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS != null) {
42 enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { 42 enterFuelOrderService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) {
43 $scope.marginList = margins; 43 $scope.marginList = margins;
44 }) 44 })
45 } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) { 45 } else if ($scope.companyList[i].margin == null && $scope.companyList[i].marginAVGAS == null) {
46 enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) { 46 enterFuelOrderService.getPapFuelPricing($scope.companyList[i].id).then(function(margins) {
47 $scope.marginList = margins; 47 $scope.marginList = margins;
48 }) 48 })
49 } 49 }
50 $scope.selectedCompanyId = $scope.companyList[i].id; 50 $scope.selectedCompanyId = $scope.companyList[i].id;
51 51
52 if ($scope.selectedCompanyId != '') { 52 if ($scope.selectedCompanyId != '') {
53 enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { 53 enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) {
54 $scope.aircraftList = aircraft; 54 $scope.aircraftList = aircraft;
55 }) 55 })
56 } 56 }
57 if($scope.companyList[i].margin == null) { 57 if($scope.companyList[i].margin == null) {
58 $scope.tierList = []; 58 $scope.tierList = [];
59 $scope.tierList.push({ 59 $scope.tierList.push({
60 'minTierBreak': '0', 'maxTierBreak': 'โˆž' 60 'minTierBreak': '0', 'maxTierBreak': 'โˆž'
61 }); 61 });
62 $scope.showLoader = false; 62 $scope.showLoader = false;
63 } else { 63 } else {
64 $scope.marginId = $scope.companyList[i].margin.id; 64 $scope.marginId = $scope.companyList[i].margin.id;
65 if ($scope.marginId != '') { 65 if ($scope.marginId != '') {
66 enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { 66 enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) {
67 $scope.tierList = tiers; 67 $scope.tierList = tiers;
68 $scope.showLoader = false; 68 $scope.showLoader = false;
69 $scope.selectedTier = $scope.tierList[0]; 69 $scope.selectedTier = $scope.tierList[0];
70 }) 70 })
71 }else{ 71 }else{
72 $scope.showLoader = false; 72 $scope.showLoader = false;
73 } 73 }
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 } 78 }
79 79
80 $scope.tiervalue=function(){ 80 $scope.tiervalue=function(){
81 $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak; 81 $scope.order.tierBreak=$scope.selectedTier.minTierBreak+'-'+$scope.selectedTier.maxTierBreak;
82 } 82 }
83 83
84 84
85 85
86 86
87 $scope.cancelOrder = function() { 87 $scope.cancelOrder = function() {
88 $scope.order = {}; 88 $scope.order = {};
89 } 89 }
90 90
91 91
92 $scope.setCost = function(cost){ 92 $scope.setCost = function(cost){
93 if(cost != null) { 93 if(cost != null) {
94 var obj =JSON.parse(cost); 94 var obj =JSON.parse(cost);
95 $scope.order.fboCost = obj.cost; 95 $scope.order.fboCost = obj.cost;
96 } 96 }
97 } 97 }
98 98
99 $scope.addTotal = function(value, valueOf){ 99 /*$scope.addTotal = function(value, valueOf){
100 if(valueOf == 'v'){ 100 if(valueOf == 'v'){
101 console.log("total v",value,$scope.order.invoiced)
102 $scope.order.total = value * $scope.order.invoiced 101 $scope.order.total = value * $scope.order.invoiced
103 }else if(valueOf == 'i'){ 102 }else if(valueOf == 'i'){
104 console.log("total i",value,$scope.order.volume)
105 $scope.order.total = $scope.order.volume * value 103 $scope.order.total = $scope.order.volume * value
106 } 104 }
107 } 105 } */
106 $scope.addTotal = function(value, valueOf) {
107 if (value != undefined && valueOf != undefined) {
108 value = JSON.parse(value)
109 $scope.order.total = value.cost * valueOf;
110 }
111 }
108 112
109 $scope.dispatchFuel = function(){ 113 $scope.dispatchFuel = function(){
110 $scope.showLoader = true; 114 $scope.showLoader = true;
111 $scope.order.companyId = $scope.selectedCompanyId; 115 $scope.order.companyId = $scope.selectedCompanyId;
112 $scope.order.companyName = $scope.order.companyName; 116 $scope.order.companyName = $scope.order.companyName;
113 var aircraftObj =JSON.parse($scope.order.aircraftName); 117 var aircraftObj =JSON.parse($scope.order.aircraftName);
114 $scope.order.aircraftName = aircraftObj.tail; 118 $scope.order.aircraftName = aircraftObj.tail;
115 $scope.order.make = aircraftObj.make; 119 $scope.order.make = aircraftObj.make;
116 $scope.order.model = aircraftObj.model; 120 $scope.order.model = aircraftObj.model;
117 $scope.order.fuelOn = $scope.order.fuelOn; 121 $scope.order.fuelOn = $scope.order.fuelOn;
118 122
119 $scope.order.invoiced = $scope.order.invoiced; 123 $scope.order.invoiced = $scope.order.invoiced;
120 $scope.order.volume = $scope.order.volume; 124 $scope.order.volume = $scope.order.volume;
121 $scope.order.source = $scope.order.source; 125 $scope.order.source = $scope.order.source;
122 126
123 $scope.order.total = $scope.order.total; 127 $scope.order.total = $scope.order.total;
124 128
125 var obj =JSON.parse($scope.order.priceQuote); 129 var obj =JSON.parse($scope.order.priceQuote);
126 $scope.order.priceQuote = obj.papTotal; 130 $scope.order.priceQuote = obj.papTotal;
127 $scope.order.fboCost = obj.cost; 131 $scope.order.fboCost = obj.cost;
128 $scope.order.productName = obj.productName; 132 $scope.order.productName = obj.productName;
129 133
130 $scope.order.etaTime = $scope.order.etaTime; 134 $scope.order.etaTime = $scope.order.etaTime;
131 $scope.order.etdTime = $scope.order.etdTime; 135 $scope.order.etdTime = $scope.order.etdTime;
132 $scope.order.certificateType = $scope.order.certificateType; 136 $scope.order.certificateType = $scope.order.certificateType;
133 var currentDate = new Date(); 137 var currentDate = new Date();
134 var hours = currentDate.getHours(); 138 var hours = currentDate.getHours();
135 var min = currentDate.getMinutes(); 139 var min = currentDate.getMinutes();
136 var sec = currentDate.getSeconds(); 140 var sec = currentDate.getSeconds();
137 if ($scope.order.upliftDate != '') { 141 if ($scope.order.upliftDate != '') {
138 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; 142 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec;
139 $scope.order.upliftDate = new Date($scope.order.upliftDate); 143 $scope.order.upliftDate = new Date($scope.order.upliftDate);
140 $scope.order.upliftDate = $scope.order.upliftDate.getTime(); 144 $scope.order.upliftDate = $scope.order.upliftDate.getTime();
141 } 145 }
142 146
143 147
144 if ($scope.order.departingDate != '') { 148 if ($scope.order.departingDate != '') {
145 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; 149 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec;
146 $scope.order.departingDate = new Date($scope.order.departingDate); 150 $scope.order.departingDate = new Date($scope.order.departingDate);
147 $scope.order.departingDate = $scope.order.departingDate.getTime(); 151 $scope.order.departingDate = $scope.order.departingDate.getTime();
148 } 152 }
149 153
150 if($scope.order.status === null || $scope.order.status === undefined){ 154 if($scope.order.status === null || $scope.order.status === undefined){
151 155
152 $scope.order.status = "pending"; //default status 156 $scope.order.status = "pending"; //default status
153 157
154 }else { 158 }else {
155 159
156 $scope.order.status = $scope.order.status; 160 $scope.order.status = $scope.order.status;
157 } 161 }
158 //console.log("===order====",$scope.order); 162 //console.log("===order====",$scope.order);
159 163
160 $scope.dispatchOrder.fuelOrderList.push($scope.order); 164 $scope.dispatchOrder.fuelOrderList.push($scope.order);
161 165
162 enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { 166 enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) {
163 $scope.showLoader = false; 167 $scope.showLoader = false;
164 $scope.order = {}; 168 $scope.order = {};
165 toastr.success('Fuel Order Created Successfully', { 169 toastr.success('Fuel Order Created Successfully', {
166 closeButton: true 170 closeButton: true
167 }) 171 })
168 }) 172 })
169 } 173 }
170 174
171 175
172 $scope.etaTimeList=[]; 176 $scope.etaTimeList=[];
173 $scope.etdTimeList =[]; 177 $scope.etdTimeList =[];
174 178
175 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 179 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
176 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 180 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
177 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 181 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
178 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 182 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
179 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 183 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
180 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 184 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
181 185
182 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 186 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
183 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 187 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
184 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 188 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
185 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 189 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
186 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 190 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
187 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 191 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
app/partials/enterFuelOrder/enterFuelOrder.html
1 <style type="text/css"> 1 <style type="text/css">
2 .subnavbar .mainnav > li:nth-child(4) > a{ 2 .subnavbar .mainnav > li:nth-child(4) > a{
3 color: #c44646; 3 color: #c44646;
4 } 4 }
5 .customInputWrap{ 5 .customInputWrap{
6 margin-top: 15px; 6 margin-top: 15px;
7 } 7 }
8 .customInputWrap label{ 8 .customInputWrap label{
9 font-weight: normal; 9 font-weight: normal;
10 margin-bottom: 0; 10 margin-bottom: 0;
11 } 11 }
12 </style> 12 </style>
13 <div class="myLoader" ng-show="showLoader"> 13 <div class="myLoader" ng-show="showLoader">
14 <img src="../img/hourglass.gif" width="50px;"> 14 <img src="../img/hourglass.gif" width="50px;">
15 </div> 15 </div>
16 16
17 <div class="container"> 17 <div class="container">
18 <div class="row"> 18 <div class="row">
19 <div class="col-xs-8"> 19 <div class="col-xs-8">
20 <div class="widget stacked"> 20 <div class="widget stacked">
21 <div class="widget-header"> 21 <div class="widget-header">
22 <i class="fa fa-tasks" aria-hidden="true"></i> 22 <i class="fa fa-tasks" aria-hidden="true"></i>
23 <h3>Create Fuel Order</h3> 23 <h3>Create Fuel Order</h3>
24 </div> 24 </div>
25 <div class="widget-content new-widget-content"> 25 <div class="widget-content new-widget-content">
26 <form name="orderform" novalidate> 26 <form name="orderform" novalidate>
27 27
28 <div class="customInputWrap"> 28 <div class="customInputWrap">
29 <div class="col-xs-12"> 29 <div class="col-xs-12">
30 30
31 <div class="col-md-6"> 31 <div class="col-md-6">
32 <div class="pull-left" style="width: 110px;"> 32 <div class="pull-left" style="width: 110px;">
33 <label class="new-input-label"><b>Company</b></label> 33 <label class="new-input-label"><b>Company</b></label>
34 </div> 34 </div>
35 <div class="pull-left" style="width: calc(100% - 110px);"> 35 <div class="pull-left" style="width: calc(100% - 110px);">
36 <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> 36 <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required>
37 <option value="" selected disabled>Select Company</option> 37 <option value="" selected disabled>Select Company</option>
38 <option ng-repeat="list in companyList">{{list.companyName}}</option> 38 <option ng-repeat="list in companyList">{{list.companyName}}</option>
39 </select> 39 </select>
40 </div> 40 </div>
41 <div class="clearfix"></div> 41 <div class="clearfix"></div>
42 </div> 42 </div>
43 <div class="col-md-6"> 43 <div class="col-md-6">
44 <div class="pull-left" style="width: 110px;"> 44 <div class="pull-left" style="width: 110px;">
45 <label class="new-input-label"><b>Product</b></label> 45 <label class="new-input-label"><b>Product</b></label>
46 </div> 46 </div>
47 <div class="pull-left" style="width: calc(100% - 110px);"> 47 <div class="pull-left" style="width: calc(100% - 110px);">
48 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote)" required> 48 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote); addTotal(order.priceQuote, order.volume)" required>
49 <option value="" selected disabled>Select Product</option> 49 <option value="" selected disabled>Select Product</option>
50 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> 50 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option>
51 </select> 51 </select>
52 </div> 52 </div>
53 <div class="clearfix"></div> 53 <div class="clearfix"></div>
54 </div> 54 </div>
55 55
56 </div> 56 </div>
57 <div class="clearfix"></div> 57 <div class="clearfix"></div>
58 <br/> 58 <br/>
59 59
60 60
61 <div class="col-xs-12"> 61 <div class="col-xs-12">
62 62
63 <div class="col-md-6"> 63 <div class="col-md-6">
64 <div class="pull-left" style="width: 110px;"> 64 <div class="pull-left" style="width: 110px;">
65 <label class="new-input-label"><b>Aircraft</b></label> 65 <label class="new-input-label"><b>Aircraft</b></label>
66 </div> 66 </div>
67 <div class="pull-left" style="width: calc(100% - 110px);"> 67 <div class="pull-left" style="width: calc(100% - 110px);">
68 <select class="form-control" ng-model="order.aircraftName" required> 68 <select class="form-control" ng-model="order.aircraftName" required>
69 <option selected disabled value="">Select Aircraft</option> 69 <option selected disabled value="">Select Aircraft</option>
70 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> 70 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option>
71 </select> 71 </select>
72 </div> 72 </div>
73 <div class="clearfix"></div> 73 <div class="clearfix"></div>
74 </div> 74 </div>
75 <div class="col-md-6"> 75 <div class="col-md-6">
76 <div class="pull-left" style="width: 110px;"> 76 <div class="pull-left" style="width: 110px;">
77 <label class="new-input-label"><b>Volume</b></label> 77 <label class="new-input-label"><b>Volume</b></label>
78 </div> 78 </div>
79 <div class="pull-left" style="width: calc(100% - 110px);"> 79 <div class="pull-left" style="width: calc(100% - 110px);">
80 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.volume,'v')" class="form-control" placeholder="" required> 80 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required>
81 </div> 81 </div>
82 <div class="clearfix"></div> 82 <div class="clearfix"></div>
83 </div> 83 </div>
84 84
85 </div> 85 </div>
86 <div class="clearfix"></div> 86 <div class="clearfix"></div>
87 <br/> 87 <br/>
88 88
89 <div class="col-xs-12"> 89 <div class="col-xs-12">
90 90
91 <div class="col-md-6"> 91 <div class="col-md-6">
92 <div class="pull-left" style="width: 110px;"> 92 <div class="pull-left" style="width: 110px;">
93 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> 93 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label>
94 </div> 94 </div>
95 <div class="pull-left" style="width: calc(100% - 110px);"> 95 <div class="pull-left" style="width: calc(100% - 110px);">
96 <div style="width: 50%; float: left;"> 96 <div style="width: 50%; float: left;">
97 Date 97 Date
98 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> 98 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/>
99 </div> 99 </div>
100 <div style="width: 50%; float: left;"> 100 <div style="width: 50%; float: left;">
101 Time 101 Time
102 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> 102 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required>
103 <option ng-repeat="li in etaTimeList">{{li.time}}</option> 103 <option ng-repeat="li in etaTimeList">{{li.time}}</option>
104 </select> 104 </select>
105 105
106 </div> 106 </div>
107 </div> 107 </div>
108 <div class="clearfix"></div> 108 <div class="clearfix"></div>
109 </div> 109 </div>
110 110
111 <div class="col-md-6" style="margin-top: 22px;"> 111 <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'">
112 <div class="pull-left" style="width: 110px;"> 112 <div class="pull-left" style="width: 110px;">
113 <label class="new-input-label"><b>Invoiced</b></label> 113 <label class="new-input-label"><b>Invoiced</b></label>
114 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 114 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
115 </div> 115 </div>
116 <div class="pull-left" style="width: calc(100% - 110px);"> 116 <div class="pull-left" style="width: calc(100% - 110px);">
117 <input type="text" ng-model="order.invoiced" ng-keyup="addTotal(order.invoiced,'i')" class="form-control" placeholder=""> 117 <input type="text" ng-model="order.invoiced" class="form-control" placeholder="">
118 </div> 118 </div>
119 <div class="clearfix"></div> 119 <div class="clearfix"></div>
120 </div> 120 </div>
121 </div> 121 </div>
122 <div class="clearfix"></div><br> 122 <div class="clearfix"></div><br>
123 123
124 124
125 <div class="col-xs-12"> 125 <div class="col-xs-12">
126 126
127 <div class="col-md-6"> 127 <div class="col-md-6">
128 <div class="pull-left" style="width: 110px;"> 128 <div class="pull-left" style="width: 110px;">
129 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> 129 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label>
130 </div> 130 </div>
131 <div class="pull-left" style="width: calc(100% - 110px);"> 131 <div class="pull-left" style="width: calc(100% - 110px);">
132 <div style="width: 50%; float: left;"> 132 <div style="width: 50%; float: left;">
133 Date 133 Date
134 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> 134 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/>
135 </div> 135 </div>
136 <div style="width: 50%; float: left;"> 136 <div style="width: 50%; float: left;">
137 Time 137 Time
138 <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> 138 <select class="form-control" ng-model="order.etdTime" style="width: 100%;">
139 <option ng-repeat="list in etdTimeList">{{list.time}}</option> 139 <option ng-repeat="list in etdTimeList">{{list.time}}</option>
140 </select> 140 </select>
141 </div> 141 </div>
142 </div> 142 </div>
143 <div class="clearfix"></div> 143 <div class="clearfix"></div>
144 </div> 144 </div>
145 145
146 <div class="col-md-6" style="margin-top: 22px;"> 146 <div class="col-md-6" style="margin-top: 22px;">
147 <div class="pull-left" style="width: 110px;"> 147 <div class="pull-left" style="width: 110px;">
148 <label class="new-input-label"><b>Total</b></label> 148 <label class="new-input-label"><b>Total</b></label>
149 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 149 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
150 </div> 150 </div>
151 <div class="pull-left" style="width: calc(100% - 110px);"> 151 <div class="pull-left" style="width: calc(100% - 110px);">
152 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> 152 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}">
153 </div> 153 </div>
154 </div> 154 </div>
155 </div> 155 </div>
156 <div class="clearfix"></div><br> 156 <div class="clearfix"></div><br>
157 157
158 158
159 <div class="col-xs-12"> 159 <div class="col-xs-12">
160 160
161 <div class="col-md-6"> 161 <div class="col-md-6">
162 <div class="pull-left" style="width: 110px;"> 162 <div class="pull-left" style="width: 110px;">
163 <label class="new-input-label"><b>Fuel on</b></label> 163 <label class="new-input-label"><b>Fuel on</b></label>
164 </div> 164 </div>
165 <div class="pull-left" style="width: calc(100% - 110px);"> 165 <div class="pull-left" style="width: calc(100% - 110px);">
166 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> 166 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;">
167 <option value="" disabled selected hidden>Select...</option> 167 <option value="" disabled selected hidden>Select...</option>
168 <option value="Arrival">Arrival</option> 168 <option value="Arrival">Arrival</option>
169 <option value="Departure">Departure</option> 169 <option value="Departure">Departure</option>
170 </select> 170 </select>
171 </div> 171 </div>
172 <div class="clearfix"></div> 172 <div class="clearfix"></div>
173 </div> 173 </div>
174 174
175 <div class="col-md-6"> 175 <div class="col-md-6">
176 <div class="pull-left" style="width: 110px;"> 176 <div class="pull-left" style="width: 110px;">
177 <label class="new-input-label"><b>FBO Cost</b></label> 177 <label class="new-input-label"><b>FBO Cost</b></label>
178 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 178 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
179 </div> 179 </div>
180 <div class="pull-left" style="width: calc(100% - 110px);"> 180 <div class="pull-left" style="width: calc(100% - 110px);">
181 <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> 181 <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number />
182 </div> 182 </div>
183 <div class="clearfix"></div> 183 <div class="clearfix"></div>
184 </div> 184 </div>
185 </div> 185 </div>
186 <div class="clearfix"></div><br> 186 <div class="clearfix"></div><br>
187 187
188 <div class="col-xs-12"> 188 <div class="col-xs-12">
189 <div class="col-md-6"> 189 <div class="col-md-6">
190 <div class="pull-left" style="width: 110px;"> 190 <div class="pull-left" style="width: 110px;">
191 <label class="new-input-label"><b>Source</b></label> 191 <label class="new-input-label"><b>Source</b></label>
192 </div> 192 </div>
193 <div class="pull-left" style="width: calc(100% - 110px);"> 193 <div class="pull-left" style="width: calc(100% - 110px);">
194 <select class="form-control" ng-model="order.source" style="width: 100%;"> 194 <select class="form-control" ng-model="order.source" style="width: 100%;">
195 <option value="" disabled selected hidden>Select Source</option> 195 <option value="" disabled selected hidden>Select Source</option>
196 <option value="Tenant">Tenant</option> 196 <option value="Tenant">Tenant</option>
197 <option value="CAA">CAA</option> 197 <option value="CAA">CAA</option>
198 <option value="Tenant/CAA">Tenant/CAA</option> 198 <option value="Tenant/CAA">Tenant/CAA</option>
199 </select> 199 </select>
200 </div> 200 </div>
201 <div class="clearfix"></div> 201 <div class="clearfix"></div>
202 </div> 202 </div>
203 </div> 203 </div>
204 <div class="clearfix"></div> 204 <div class="clearfix"></div>
205 <br/> 205 <br/>
206 <div class="col-xs-12"> 206 <div class="col-xs-12">
207 207
208 208
209 <div class="col-md-6"> 209 <div class="col-md-6">
210 <div class="pull-left" style="width: 110px;"> 210 <div class="pull-left" style="width: 110px;">
211 <label class="new-input-label"><b>Certificate Type</b></label> 211 <label class="new-input-label"><b>Certificate Type</b></label>
212 </div> 212 </div>
213 <div class="pull-left" style="width: calc(100% - 110px);"> 213 <div class="pull-left" style="width: calc(100% - 110px);">
214 <select class="form-control" ng-model="order.certificateType" style="width: 100%;"> 214 <select class="form-control" ng-model="order.certificateType" style="width: 100%;">
215 <option value="" disabled selected hidden>Select...</option> 215 <option value="" disabled selected hidden>Select...</option>
216 <option value="corporate">Part 91 (Corporate)</option> 216 <option value="corporate">Part 91 (Corporate)</option>
217 <option value="charter">Part 135 (Charter)</option> 217 <option value="charter">Part 135 (Charter)</option>
218 <option value="scheduled">Part 121 (Scheduled)</option> 218 <option value="scheduled">Part 121 (Scheduled)</option>
219 <option value="military">Military</option> 219 <option value="military">Military</option>
220 <option value="government">Government</option> 220 <option value="government">Government</option>
221 </select> 221 </select>
222 </div> 222 </div>
223 <div class="clearfix"></div> 223 <div class="clearfix"></div>
224 </div> 224 </div>
225 <div class="col-md-6"> 225 <div class="col-md-6">
226 <div class="pull-left" style="width: 110px;"> 226 <div class="pull-left" style="width: 110px;">
227 <label class="new-input-label"><b>Status</b></label> 227 <label class="new-input-label"><b>Status</b></label>
228 </div> 228 </div>
229 <div class="pull-left" style="width: calc(100% - 110px);"> 229 <div class="pull-left" style="width: calc(100% - 110px);">
230 <select class="form-control" ng-model="order.status" style="width: 100%;"> 230 <select class="form-control" ng-model="order.status" style="width: 100%;">
231 <option value="" selected disabled hidden>pending</option> 231 <option value="" selected disabled hidden>pending</option>
232 <!-- <option value="pending">pending</option> --> 232 <option value="pending">pending</option>
233 <option value="invoiced">invoiced</option> 233 <option value="invoiced">invoiced</option>
234 <option value="paid">paid</option> 234 <option value="paid">paid</option>
235 <option value="cancelled">cancelled</option> 235 <!-- <option value="cancelled">cancelled</option>
236 <option value="archived">archived</option> 236 <option value="archived">archived</option> -->
237 </select> 237 </select>
238 </div> 238 </div>
239 <div class="clearfix"></div> 239 <div class="clearfix"></div>
240 </div> 240 </div>
241 </div> 241 </div>
242 <div class="clearfix"></div><br> 242 <div class="clearfix"></div><br>
243 243
244 <div class="customInputWrap text-right"> 244 <div class="customInputWrap text-right">
245 <div class="col-xs-12"> 245 <div class="col-xs-12">
246 <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;"> 246 <input type="cancel" value="Cancel" ng-click="cancelOrder()" class="btn btn-default" style="margin-right: 15px; width: 100px;">
247 <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid"> 247 <input type="submit" value="save" ng-click="dispatchFuel()" class="btn btn-primary" ng-disabled="orderform.$invalid">
248 </div> 248 </div>
249 <div class="clearfix"></div> 249 <div class="clearfix"></div>
250 </div> 250 </div>
251 251
252 </form> 252 </form>
253 </div> 253 </div>
254 </div> 254 </div>
255 </div> 255 </div>
256 </div> 256 </div>
257 </div> 257 </div>
258 258
app/partials/fuelOrders/fuelOrders.controller.js
1 'use strict'; 1 'use strict';
2 2
3 angular.module('acufuel') 3 angular.module('acufuel')
4 4
5 .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); 5 .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]);
6 6
7 function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService,CustomersService,ViewCompanyService) { 7 function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService,CustomersService,ViewCompanyService) {
8 8
9 $scope.showFuelOrderModal = false; 9 $scope.showFuelOrderModal = false;
10 $scope.optionSelected; 10 $scope.optionSelected;
11 $scope.orderdata = {}; 11 $scope.orderdata = {};
12 $scope.showLoader = false; 12 $scope.showLoader = false;
13 $scope.jetShow = []; 13 $scope.jetShow = [];
14 $scope.marginShow = []; 14 $scope.marginShow = [];
15 15
16 $scope.jetShow[0] = true; 16 $scope.jetShow[0] = true;
17 $scope.marginShow[0] = true; 17 $scope.marginShow[0] = true;
18 18
19 $scope.data = {}; 19 $scope.data = {};
20 $scope.order = {}; 20 $scope.order = {};
21 $scope.dispatchOrder = {}; 21 $scope.dispatchOrder = {};
22 $scope.dispatchOrder.fuelOrderList = []; 22 $scope.dispatchOrder.fuelOrderList = [];
23 23
24 $scope.statusFilterOptions = []; 24 $scope.statusFilterOptions = [];
25 $scope.statusFilterOptions.push({ 25 $scope.statusFilterOptions.push({
26 'id': '', 'title': 'Show All' 26 'id': '', 'title': 'Show All'
27 },{ 27 },{
28 'id': 'pending', 'title': 'Pending' 28 'id': 'pending', 'title': 'Pending'
29 },{ 29 },{
30 'id': 'invoiced', 'title': 'Invoiced' 30 'id': 'invoiced', 'title': 'Invoiced'
31 },{ 31 },{
32 'id': 'paid', 'title': 'Paid' 32 'id': 'paid', 'title': 'Paid'
33 },{ 33 },{
34 'id': 'cancelled', 'title': 'Cancelled' 34 'id': 'cancelled', 'title': 'Cancelled'
35 },{ 35 },{
36 'id': 'archived', 'title': 'Archived' 36 'id': 'archived', 'title': 'Archived'
37 } 37 }
38 38
39 ); 39 );
40 40
41 getAllCompanies(); 41 getAllCompanies();
42 42
43 function getAllCompanies(){ 43 function getAllCompanies(){
44 fuelOrdersService.getAllCompanies().then(function(result) { 44 fuelOrdersService.getAllCompanies().then(function(result) {
45 $scope.companyList = result; 45 $scope.companyList = result;
46 for (var i = 0; i < $scope.companyList.length; i++) { 46 for (var i = 0; i < $scope.companyList.length; i++) {
47 if ($scope.companyList[i].companyContact != null) { 47 if ($scope.companyList[i].companyContact != null) {
48 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { 48 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) {
49 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; 49 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber;
50 } 50 }
51 } 51 }
52 if ($scope.companyList[i].primaryContact != null) { 52 if ($scope.companyList[i].primaryContact != null) {
53 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { 53 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) {
54 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; 54 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName;
55 } 55 }
56 } 56 }
57 if ($scope.companyList[i].margin != null) { 57 if ($scope.companyList[i].margin != null) {
58 if ($scope.companyList[i].margin.marginName != null) { 58 if ($scope.companyList[i].margin.marginName != null) {
59 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; 59 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id;
60 } 60 }
61 } 61 }
62 } 62 }
63 $scope.displayCompanyList = new NgTableParams({ 63 $scope.displayCompanyList = new NgTableParams({
64 page: 1, 64 page: 1,
65 count: 10, 65 count: 10,
66 }, { 66 }, {
67 data: $scope.companyList 67 data: $scope.companyList
68 }); 68 });
69 $scope.showLoader = false; 69 $scope.showLoader = false;
70 }) 70 })
71 } 71 }
72 72
73 73
74 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) 74 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId'))
75 $scope.reset2 = function(){ 75 $scope.reset2 = function(){
76 $("input").val(""); 76 $("input").val("");
77 $scope.removeMarginValidation(); 77 $scope.removeMarginValidation();
78 } 78 }
79 79
80 function colourFunction() { 80 function colourFunction() {
81 var myselect = document.getElementById('colorfulSelectbox'), 81 var myselect = document.getElementById('colorfulSelectbox'),
82 colour = myselect.options[myselect.selectedIndex].className; 82 colour = myselect.options[myselect.selectedIndex].className;
83 myselect.style.background = colour; 83 myselect.style.background = colour;
84 myselect.blur(); 84 myselect.blur();
85 } 85 }
86 86
87 87
88 /*setInterval(function(){ 88 /*setInterval(function(){
89 colourFunction(); 89 colourFunction();
90 }, 1)*/ 90 }, 1)*/
91 91
92 92
93 $scope.attachmentFilterOptions = []; 93 $scope.attachmentFilterOptions = [];
94 $scope.attachmentFilterOptions.push({ 94 $scope.attachmentFilterOptions.push({
95 'id': '', 'title': 'Show All' 95 'id': '', 'title': 'Show All'
96 },{ 96 },{
97 'id': '!null', 'title': 'Attachments' 97 'id': '!null', 'title': 'Attachments'
98 },{ 98 },{
99 'id': 'null', 'title': 'No Attachments' 99 'id': 'null', 'title': 'No Attachments'
100 } 100 }
101 ); 101 );
102 102
103 // $(document).ready(function() { 103 // $(document).ready(function() {
104 // $scope.showLoader = true; 104 // $scope.showLoader = true;
105 // $('#example').DataTable(); 105 // $('#example').DataTable();
106 // $scope.showLoader = false; 106 // $scope.showLoader = false;
107 // }); 107 // });
108 108
109 $scope.getOrders = function() { 109 $scope.getOrders = function() {
110 fuelOrdersService.getOrders().then(function(result) { 110 fuelOrdersService.getOrders().then(function(result) {
111 $scope.orderdata = result; 111 $scope.orderdata = result;
112 for(var i=0 ; i < $scope.orderdata.length ; i++){ 112 for(var i=0 ; i < $scope.orderdata.length ; i++){
113 $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); 113 $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate);
114 $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); 114 $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate);
115 115
116 var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); 116 var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear();
117 var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); 117 var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear();
118 $scope.orderdata[i].upliftDateString = str; 118 $scope.orderdata[i].upliftDateString = str;
119 $scope.orderdata[i].departingDateString = departingStr; 119 $scope.orderdata[i].departingDateString = departingStr;
120 //not working in input type Time 120 //not working in input type Time
121 /*if ($scope.orderdata[i].etaTime != null) { 121 /*if ($scope.orderdata[i].etaTime != null) {
122 var now = new Date(); 122 var now = new Date();
123 123
124 var hr = $scope.orderdata[i].etaTime.slice(0, 2); 124 var hr = $scope.orderdata[i].etaTime.slice(0, 2);
125 var mm = $scope.orderdata[i].etaTime.slice(3, 5); 125 var mm = $scope.orderdata[i].etaTime.slice(3, 5);
126 now.setHours(hr); 126 now.setHours(hr);
127 now.setMinutes(mm); 127 now.setMinutes(mm);
128 $scope.orderdata[i].etaTime = now; 128 $scope.orderdata[i].etaTime = now;
129 console.log("===eta====", now, hr, mm); 129 console.log("===eta====", now, hr, mm);
130 }*/ 130 }*/
131 131
132 } 132 }
133 133
134 $scope.displayFuelOrderList = new NgTableParams({ 134 $scope.displayFuelOrderList = new NgTableParams({
135 page: 1, 135 page: 1,
136 count: 10, 136 count: 10,
137 }, { 137 }, {
138 data: $scope.orderdata 138 data: $scope.orderdata
139 }); 139 });
140 $(document).ready(function(){ 140 $(document).ready(function(){
141 function changeSelectboxBg(){ 141 function changeSelectboxBg(){
142 setInterval(function(){ 142 setInterval(function(){
143 if ($('.table select').is(':focus')) { 143 if ($('.table select').is(':focus')) {
144 144
145 }else{ 145 }else{
146 var myselect = document.getElementsByClassName('colorfulSelectbox'); 146 var myselect = document.getElementsByClassName('colorfulSelectbox');
147 147
148 for (var i = 0; i < myselect.length; i++) { 148 for (var i = 0; i < myselect.length; i++) {
149 var colourIndex = $(myselect[i]).prop('selectedIndex'); 149 var colourIndex = $(myselect[i]).prop('selectedIndex');
150 colourIndex = colourIndex + 1; 150 colourIndex = colourIndex + 1;
151 var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); 151 var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color');
152 $(myselect[i]).css('background-color', getColor); 152 $(myselect[i]).css('background-color', getColor);
153 myselect[i].blur(); 153 myselect[i].blur();
154 } 154 }
155 } 155 }
156 }, 1000) 156 }, 1000)
157 } 157 }
158 changeSelectboxBg(); 158 changeSelectboxBg();
159 159
160 /*$('.pagination , .recordCountSelect').click(function(){ 160 /*$('.pagination , .recordCountSelect').click(function(){
161 changeSelectboxBg(); 161 changeSelectboxBg();
162 }) 162 })
163 $('.input-filter').keydown(function(){ 163 $('.input-filter').keydown(function(){
164 console.log('function..........'); 164 console.log('function..........');
165 changeSelectboxBg(); 165 changeSelectboxBg();
166 })*/ 166 })*/
167 }) 167 })
168 }) 168 })
169 } 169 }
170 170
171 $scope.getOrders(); 171 $scope.getOrders();
172 $scope.optionSelected=''; 172 $scope.optionSelected='';
173 $scope.onFWSelect = function() { 173 $scope.onFWSelect = function() {
174 if($scope.optionSelected == 'dt'){ 174 if($scope.optionSelected == 'dt'){
175 $('#demo-modal-4').css('display', 'block'); 175 $('#demo-modal-4').css('display', 'block');
176 $scope.optionSelected=''; 176 $scope.optionSelected='';
177 177
178 } 178 }
179 if($scope.optionSelected == 'efo'){ 179 if($scope.optionSelected == 'efo'){
180 $scope.showLoader = true; 180 $scope.showLoader = true;
181 var fileName = "orders.csv"; 181 var fileName = "orders.csv";
182 var a = document.createElement("a"); 182 var a = document.createElement("a");
183 document.body.appendChild(a); 183 document.body.appendChild(a);
184 fuelOrdersService.exportCompany().then(function(result) { 184 fuelOrdersService.exportCompany().then(function(result) {
185 var file = new Blob([result], {type: 'application/csv'}); 185 var file = new Blob([result], {type: 'application/csv'});
186 var fileURL = URL.createObjectURL(file); 186 var fileURL = URL.createObjectURL(file);
187 a.href = fileURL; 187 a.href = fileURL;
188 a.download = fileName; 188 a.download = fileName;
189 a.click(); 189 a.click();
190 $scope.showLoader = false; 190 $scope.showLoader = false;
191 $scope.optionSelected=''; 191 $scope.optionSelected='';
192 }) 192 })
193 } 193 }
194 } 194 }
195 $scope.attachmentrowid = "" 195 $scope.attachmentrowid = ""
196 196
197 197
198 $scope.attachment = function(id, value, url) { 198 $scope.attachment = function(id, value, url) {
199 $scope.attachmentrowid = id 199 $scope.attachmentrowid = id
200 if(value == 'uploadAttachment'){ 200 if(value == 'uploadAttachment'){
201 $('#demo-modal-6').css('display', 'block'); 201 $('#demo-modal-6').css('display', 'block');
202 }else if(value == 'viewAttachment'){ 202 }else if(value == 'viewAttachment'){
203 var win = window.open(url, '_blank'); 203 var win = window.open(url, '_blank');
204 win.focus(); 204 win.focus();
205 }else if(value == 'deleteAttachment'){ 205 }else if(value == 'deleteAttachment'){
206 $('#delete1').css('display', 'block'); 206 $('#delete1').css('display', 'block');
207 } 207 }
208 } 208 }
209 209
210 $scope.cancelDeleteAttachment = function() { 210 $scope.cancelDeleteAttachment = function() {
211 $('#delete1').css('display', ''); 211 $('#delete1').css('display', '');
212 } 212 }
213 213
214 $scope.deleteAttachment = function() { 214 $scope.deleteAttachment = function() {
215 $scope.showLoader = true; 215 $scope.showLoader = true;
216 fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { 216 fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) {
217 217
218 if(result.success){ 218 if(result.success){
219 toastr.success(''+result.success+'', { 219 toastr.success(''+result.success+'', {
220 closeButton: true 220 closeButton: true
221 }) 221 })
222 } 222 }
223 }) 223 })
224 $scope.showLoader = false; 224 $scope.showLoader = false;
225 $('#delete1').css('display', ''); 225 $('#delete1').css('display', '');
226 } 226 }
227 227
228 $scope.saveUploadAttachment = function(attachmentData) { 228 $scope.saveUploadAttachment = function(attachmentData) {
229 $scope.showLoader = true; 229 $scope.showLoader = true;
230 $scope.data.media = attachmentData 230 $scope.data.media = attachmentData
231 $scope.data.id = $scope.attachmentrowid 231 $scope.data.id = $scope.attachmentrowid
232 fuelOrdersService.uploadAttachment($scope.data).then(function(result) { 232 fuelOrdersService.uploadAttachment($scope.data).then(function(result) {
233 if(result){ 233 if(result){
234 toastr.success(''+"Upload Successful"+'', { 234 toastr.success(''+"Upload Successful"+'', {
235 closeButton: true 235 closeButton: true
236 }) 236 })
237 } 237 }
238 238
239 }) 239 })
240 $scope.showLoader = false; 240 $scope.showLoader = false;
241 $('#demo-modal-6').css('display', 'none'); 241 $('#demo-modal-6').css('display', 'none');
242 } 242 }
243 243
244 $scope.cancelUploadAttachment = function() { 244 $scope.cancelUploadAttachment = function() {
245 $('#demo-modal-6').css('display', 'none'); 245 $('#demo-modal-6').css('display', 'none');
246 } 246 }
247 247
248 $scope.editdata = {}; 248 $scope.editdata = {};
249 249
250 250
251 $scope.editTableRow = function(rowData){ 251 $scope.editTableRow = function(rowData){
252 //console.log('row data', rowData); 252 //console.log('row data', rowData);
253 $scope.editdata = rowData; 253 $scope.editdata = rowData;
254 $('#demo-modal-5').css('display', 'block'); 254 $('#demo-modal-5').css('display', 'block');
255 } 255 }
256 256
257 $scope.updateTotal = function(value, valueOf){ 257 $scope.updateTotal = function(value, valueOf){
258 if(valueOf == 'v'){ 258 if(valueOf == 'v'){
259 $scope.editdata.total = value * $scope.editdata.invoiced 259 $scope.editdata.total = value * $scope.editdata.invoiced
260 }else if(valueOf == 'i'){ 260 }else if(valueOf == 'i'){
261 $scope.editdata.total = $scope.editdata.requestedVolume * value 261 $scope.editdata.total = $scope.editdata.requestedVolume * value
262 } 262 }
263 } 263 }
264 264
265 $scope.setCost = function(cost){ 265 $scope.setCost = function(cost){
266 if(cost != null) { 266 if(cost != null) {
267 var obj =JSON.parse(cost); 267 var obj =JSON.parse(cost);
268 $scope.order.fboCost = obj.cost; 268 $scope.order.fboCost = obj.cost;
269 } 269 }
270 270
271 } 271 }
272 272
273 $scope.addTotal = function(value, valueOf){ 273 $scope.addTotal = function(value, valueOf) {
274 if(valueOf == 'v'){ 274 if (value != undefined && valueOf != undefined) {
275 $scope.order.total = value * $scope.order.invoiced 275 value = JSON.parse(value)
276 }else if(valueOf == 'i'){ 276 $scope.order.total = value.cost * valueOf;
277 $scope.order.total = $scope.order.volume * value 277 }
278 } 278 }
279 }
280 279
281 $scope.addFuelData = function() { 280 $scope.addFuelData = function() {
282 $scope.showLoader = true; 281 $scope.showLoader = true;
283 $scope.fuelData = {}; 282 $scope.fuelData = {};
284 $scope.fuelData.companyId = $scope.selectedCompanyId; 283 $scope.fuelData.companyId = $scope.selectedCompanyId;
285 284
286 $scope.fuelData.companyName = $scope.order.companyName; 285 $scope.fuelData.companyName = $scope.order.companyName;
287 var aircraftObj =JSON.parse($scope.order.aircraftName); 286 var aircraftObj =JSON.parse($scope.order.aircraftName);
288 $scope.fuelData.aircraftName = aircraftObj.tail; 287 $scope.fuelData.aircraftName = aircraftObj.tail;
289 $scope.fuelData.make = aircraftObj.make; 288 $scope.fuelData.make = aircraftObj.make;
290 $scope.fuelData.model = aircraftObj.model; 289 $scope.fuelData.model = aircraftObj.model;
291 $scope.fuelData.fuelOn = $scope.order.fuelOn; 290 $scope.fuelData.fuelOn = $scope.order.fuelOn;
292 $scope.fuelData.invoiced = $scope.order.invoiced; 291 $scope.fuelData.invoiced = $scope.order.invoiced;
293 $scope.fuelData.volume = $scope.order.volume; 292 $scope.fuelData.volume = $scope.order.volume;
294 $scope.fuelData.source = $scope.order.source; 293 $scope.fuelData.source = $scope.order.source;
295 294
296 $scope.fuelData.total = $scope.order.total; 295 $scope.fuelData.total = $scope.order.total;
297 //tier no use 296 //tier no use
298 $scope.fuelData.tierBreak = $scope.order.tierBreak; 297 $scope.fuelData.tierBreak = $scope.order.tierBreak;
299 298
300 var obj =JSON.parse($scope.order.priceQuote); 299 var obj =JSON.parse($scope.order.priceQuote);
301 $scope.fuelData.priceQuote = obj.papTotal; 300 $scope.fuelData.priceQuote = obj.papTotal;
302 $scope.fuelData.fboCost = obj.cost; 301 $scope.fuelData.fboCost = obj.cost;
303 $scope.fuelData.productName = obj.productName; 302 $scope.fuelData.productName = obj.productName;
304 303
305 $scope.fuelData.etaTime = $scope.order.etaTime; 304 $scope.fuelData.etaTime = $scope.order.etaTime;
306 $scope.fuelData.etdTime = $scope.order.etdTime; 305 $scope.fuelData.etdTime = $scope.order.etdTime;
307 $scope.fuelData.certificateType = $scope.order.certificateType; 306 $scope.fuelData.certificateType = $scope.order.certificateType;
308 var currentDate = new Date(); 307 var currentDate = new Date();
309 var hours = currentDate.getHours(); 308 var hours = currentDate.getHours();
310 var min = currentDate.getMinutes(); 309 var min = currentDate.getMinutes();
311 var sec = currentDate.getSeconds(); 310 var sec = currentDate.getSeconds();
312 if ($scope.order.upliftDate != '') { 311 if ($scope.order.upliftDate != '') {
313 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; 312 $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec;
314 $scope.order.upliftDate = new Date($scope.order.upliftDate); 313 $scope.order.upliftDate = new Date($scope.order.upliftDate);
315 $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); 314 $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime();
316 } 315 }
317 316
318 317
319 if ($scope.order.departingDate != '') { 318 if ($scope.order.departingDate != '') {
320 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; 319 $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec;
321 $scope.order.departingDate = new Date($scope.order.departingDate); 320 $scope.order.departingDate = new Date($scope.order.departingDate);
322 $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); 321 $scope.fuelData.departingDate = $scope.order.departingDate.getTime();
323 } 322 }
324 323
325 if($scope.order.status === null || $scope.order.status === undefined){ 324 if($scope.order.status === null || $scope.order.status === undefined){
326 325
327 $scope.fuelData.status = "pending"; //default status 326 $scope.fuelData.status = "pending"; //default status
328 327
329 }else { 328 }else {
330 329
331 $scope.fuelData.status = $scope.order.status; 330 $scope.fuelData.status = $scope.order.status;
332 } 331 }
333 332
334 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); 333 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData);
335 // console.log("=====$scope.fueldata======",$scope.fuelData) 334 // console.log("=====$scope.fueldata======",$scope.fuelData)
336 fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { 335 fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) {
337 $scope.showLoader = false; 336 $scope.showLoader = false;
338 $scope.order = {}; 337 $scope.order = {};
339 $scope.dispatchOrder.fuelOrderList = []; 338 $scope.dispatchOrder.fuelOrderList = [];
340 $('#demo-modal-4').css('display', ''); 339 $('#demo-modal-4').css('display', '');
341 $scope.getOrders(); 340 $scope.getOrders();
342 toastr.success('Fuel Order Dispatched Successfully', { 341 toastr.success('Fuel Order Dispatched Successfully', {
343 closeButton: true 342 closeButton: true
344 }) 343 })
345 }) 344 })
346 345
347 346
348 } 347 }
349 348
350 $scope.updateStatus = function(row, status) { 349 $scope.updateStatus = function(row, status) {
351 $scope.showLoader = true; 350 $scope.showLoader = true;
352 $scope.fuelData = {}; 351 $scope.fuelData = {};
353 $scope.fuelData.aircraftName = row.aircraftName 352 $scope.fuelData.aircraftName = row.aircraftName
354 $scope.fuelData.companyName = row.companyName 353 $scope.fuelData.companyName = row.companyName
355 $scope.fuelData.departingDate = row.departingDate 354 $scope.fuelData.departingDate = row.departingDate
356 $scope.fuelData.fboCost = row.fboCost 355 $scope.fuelData.fboCost = row.fboCost
357 $scope.fuelData.id = row.id 356 $scope.fuelData.id = row.id
358 $scope.fuelData.invoiced = row.invoiced 357 $scope.fuelData.invoiced = row.invoiced
359 $scope.fuelData.priceQuote = row.priceQuote 358 $scope.fuelData.priceQuote = row.priceQuote
360 $scope.fuelData.volume = row.requestedVolume 359 $scope.fuelData.volume = row.requestedVolume
361 $scope.fuelData.source = row.source 360 $scope.fuelData.source = row.source
362 $scope.fuelData.status = status 361 $scope.fuelData.status = status
363 $scope.fuelData.tierBreak = row.tierBreak 362 $scope.fuelData.tierBreak = row.tierBreak
364 $scope.fuelData.total = row.total 363 $scope.fuelData.total = row.total
365 $scope.fuelData.upliftDate = row.upliftDate 364 $scope.fuelData.upliftDate = row.upliftDate
366 365
367 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); 366 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData);
368 fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { 367 fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) {
369 $scope.showLoader = false; 368 $scope.showLoader = false;
370 $scope.editdata = {}; 369 $scope.editdata = {};
371 $scope.fuelData = {}; 370 $scope.fuelData = {};
372 $scope.dispatchOrder.fuelOrderList = []; 371 $scope.dispatchOrder.fuelOrderList = [];
373 $('#demo-modal-5').css('display', ''); 372 $('#demo-modal-5').css('display', '');
374 $scope.getOrders(); 373 $scope.getOrders();
375 toastr.success('Fuel Order Updated Successfully', { 374 toastr.success('Fuel Order Updated Successfully', {
376 closeButton: true 375 closeButton: true
377 }); 376 });
378 }) 377 })
379 378
380 } 379 }
381 $scope.fuelData = {}; 380 $scope.fuelData = {};
382 $scope.updateData = function() { 381 $scope.updateData = function() {
383 if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ 382 if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){
384 if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) { 383 if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) {
385 $scope.showLoader = true; 384 $scope.showLoader = true;
386 $scope.fuelData.aircraftName = $scope.editdata.aircraftName; 385 $scope.fuelData.aircraftName = $scope.editdata.aircraftName;
387 $scope.fuelData.companyName = $scope.editdata.companyName; 386 $scope.fuelData.companyName = $scope.editdata.companyName;
388 $scope.fuelData.fboCost = $scope.editdata.fboCost; 387 $scope.fuelData.fboCost = $scope.editdata.fboCost;
389 $scope.fuelData.id = $scope.editdata.id; 388 $scope.fuelData.id = $scope.editdata.id;
390 $scope.fuelData.invoiced = $scope.editdata.invoiced; 389 $scope.fuelData.invoiced = $scope.editdata.invoiced;
391 $scope.fuelData.priceQuote = $scope.editdata.priceQuote; 390 $scope.fuelData.priceQuote = $scope.editdata.priceQuote;
392 $scope.fuelData.volume = $scope.editdata.requestedVolume; 391 $scope.fuelData.volume = $scope.editdata.requestedVolume;
393 $scope.fuelData.source = $scope.editdata.source; 392 $scope.fuelData.source = $scope.editdata.source;
394 $scope.fuelData.status = $scope.editdata.status; 393 $scope.fuelData.status = $scope.editdata.status;
395 $scope.fuelData.tierBreak = $scope.editdata.tierBreak; 394 $scope.fuelData.tierBreak = $scope.editdata.tierBreak;
396 $scope.fuelData.total = $scope.editdata.total; 395 $scope.fuelData.total = $scope.editdata.total;
397 396
398 $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); 397 $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString);
399 $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); 398 $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime();
400 399
401 $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); 400 $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString);
402 $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); 401 $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime();
403 402
404 $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; 403 $scope.fuelData.upliftDate = $scope.editdata.upliftDateString;
405 $scope.fuelData.departingDate = $scope.editdata.departingDateString; 404 $scope.fuelData.departingDate = $scope.editdata.departingDateString;
406 $scope.fuelData.productName = $scope.editdata.productName; 405 $scope.fuelData.productName = $scope.editdata.productName;
407 /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); 406 /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString();
408 $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ 407 $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/
409 $scope.fuelData.etaTime = $scope.editdata.etaTime; 408 $scope.fuelData.etaTime = $scope.editdata.etaTime;
410 $scope.fuelData.etdTime = $scope.editdata.etdTime; 409 $scope.fuelData.etdTime = $scope.editdata.etdTime;
411 $scope.fuelData.certificateType = $scope.editdata.certificateType; 410 $scope.fuelData.certificateType = $scope.editdata.certificateType;
412 $scope.fuelData.fuelOn = $scope.editdata.fuelOn; 411 $scope.fuelData.fuelOn = $scope.editdata.fuelOn;
413 412
414 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); 413 $scope.dispatchOrder.fuelOrderList.push($scope.fuelData);
415 // console.log("====fueldata===",$scope.dispatchOrder); 414 // console.log("====fueldata===",$scope.dispatchOrder);
416 fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { 415 fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) {
417 // console.log('result', result); 416 // console.log('result', result);
418 $scope.showLoader = false; 417 $scope.showLoader = false;
419 $scope.editdata = {}; 418 $scope.editdata = {};
420 $('#demo-modal-5').css('display', ''); 419 $('#demo-modal-5').css('display', '');
421 $scope.getOrders(); 420 $scope.getOrders();
422 toastr.success('Fuel Order Updated Successfully', { 421 toastr.success('Fuel Order Updated Successfully', {
423 closeButton: true 422 closeButton: true
424 }) 423 })
425 }) 424 })
426 425
427 426
428 } else{ 427 } else{
429 { 428 {
430 toastr.error('Please select fuelOn.', { 429 toastr.error('Please select fuelOn.', {
431 closeButton: true 430 closeButton: true
432 }) 431 })
433 } 432 }
434 } 433 }
435 434
436 }else 435 }else
437 { 436 {
438 toastr.error('Please select Arrival Time and Departure time both.', { 437 toastr.error('Please select Arrival Time and Departure time both.', {
439 closeButton: true 438 closeButton: true
440 }) 439 })
441 } 440 }
442 441
443 } 442 }
444 443
445 $scope.getAircraft = function(company){ 444 $scope.getAircraft = function(company){
446 445
447 $scope.selectedCompanyName = company; 446 $scope.selectedCompanyName = company;
448 //$scope.showLoader = true; 447 //$scope.showLoader = true;
449 for (var i = 0; i < $scope.companyList.length; i++) { 448 for (var i = 0; i < $scope.companyList.length; i++) {
450 if ($scope.companyList[i].companyName == company) { 449 if ($scope.companyList[i].companyName == company) {
451 if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ 450 if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){
452 fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { 451 fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) {
453 $scope.marginList = margins; 452 $scope.marginList = margins;
454 }) 453 })
455 } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { 454 } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) {
456 fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { 455 fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) {
457 $scope.marginList = margins; 456 $scope.marginList = margins;
458 }) 457 })
459 } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { 458 } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) {
460 fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { 459 fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) {
461 $scope.marginList = margins; 460 $scope.marginList = margins;
462 }) 461 })
463 } 462 }
464 $scope.selectedCompanyId = $scope.companyList[i].id; 463 $scope.selectedCompanyId = $scope.companyList[i].id;
465 $scope.marginId = $scope.companyList[i].margin.id; 464 $scope.marginId = $scope.companyList[i].margin.id;
466 if ($scope.selectedCompanyId != '') { 465 if ($scope.selectedCompanyId != '') {
467 fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { 466 fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) {
468 $scope.aircraftList = aircraft; 467 $scope.aircraftList = aircraft;
469 }) 468 })
470 } 469 }
471 if ($scope.marginId != '') { 470 if ($scope.marginId != '') {
472 fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { 471 fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) {
473 $scope.tierList = tiers; 472 $scope.tierList = tiers;
474 // $scope.showLoader = false; 473 // $scope.showLoader = false;
475 }) 474 })
476 }else{ 475 }else{
477 // $scope.showLoader = false; 476 // $scope.showLoader = false;
478 } 477 }
479 } 478 }
480 } 479 }
481 480
482 } 481 }
483 482
484 483
485 484
486 $scope.cancelData = function() { 485 $scope.cancelData = function() {
487 $('#demo-modal-4').css('display', ''); 486 $('#demo-modal-4').css('display', '');
488 } 487 }
489 $scope.canceleditdata = function() { 488 $scope.canceleditdata = function() {
490 $('#demo-modal-5').css('display', ''); 489 $('#demo-modal-5').css('display', '');
491 } 490 }
492 491
493 492
494 493
495 $scope.companyList = {}; 494 $scope.companyList = {};
496 495
497 fuelOrdersService.getAllCompanies().then(function(result) { 496 fuelOrdersService.getAllCompanies().then(function(result) {
498 $scope.showLoader = true; 497 $scope.showLoader = true;
499 $scope.companyList = result; 498 $scope.companyList = result;
500 $scope.showLoader = false; 499 $scope.showLoader = false;
501 }) 500 })
502 501
503 /*Add a company services API used from customersService */ 502 /*Add a company services API used from customersService */
504 getCompanyName(); 503 getCompanyName();
505 function getCompanyName(){ 504 function getCompanyName(){
506 CustomersService.getCompanyName().then(function(result) { 505 CustomersService.getCompanyName().then(function(result) {
507 $scope.showLoader = true; 506 $scope.showLoader = true;
508 $scope.compNameList = result; 507 $scope.compNameList = result;
509 $scope.showLoader = false; 508 $scope.showLoader = false;
510 }) 509 })
511 } 510 }
512 511
513 $scope.marginFilterOptions = []; 512 $scope.marginFilterOptions = [];
514 CustomersService.getJetMargin($scope.userProfileId).then(function(result) { 513 CustomersService.getJetMargin($scope.userProfileId).then(function(result) {
515 $scope.showLoader = true; 514 $scope.showLoader = true;
516 $scope.jetMarginList = result; 515 $scope.jetMarginList = result;
517 $scope.marginFilterOptions.push({ 516 $scope.marginFilterOptions.push({
518 'id': '', 'title': 'Show All' 517 'id': '', 'title': 'Show All'
519 }); 518 });
520 for (var i = 0; i < result.length; i++) { 519 for (var i = 0; i < result.length; i++) {
521 $scope.marginFilterOptions.push({ 520 $scope.marginFilterOptions.push({
522 'id': result[i].id, 521 'id': result[i].id,
523 'title': result[i].marginName 522 'title': result[i].marginName
524 }) 523 })
525 } 524 }
526 $scope.showLoader = false; 525 $scope.showLoader = false;
527 }) 526 })
528 527
529 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { 528 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) {
530 $scope.avgsMarginList = result; 529 $scope.avgsMarginList = result;
531 }) 530 })
532 531
533 $scope.showCompanyError = false; 532 $scope.showCompanyError = false;
534 $scope.showMarginError = false; 533 $scope.showMarginError = false;
535 534
536 $scope.removeValidation = function(){ 535 $scope.removeValidation = function(){
537 $scope.showCompanyError = false; 536 $scope.showCompanyError = false;
538 $('.companyNameInput').removeClass('customErrorInput'); 537 $('.companyNameInput').removeClass('customErrorInput');
539 if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { 538 if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') {
540 $('.companyNameInput').addClass('customErrorInput'); 539 $('.companyNameInput').addClass('customErrorInput');
541 $scope.showCompanyError = true; 540 $scope.showCompanyError = true;
542 } 541 }
543 } 542 }
544 543
545 $scope.removeMarginValidation = function(){ 544 $scope.removeMarginValidation = function(){
546 $scope.showMarginError = false; 545 $scope.showMarginError = false;
547 $('.marginSelectBox').removeClass('customErrorInput'); 546 $('.marginSelectBox').removeClass('customErrorInput');
548 } 547 }
549 548
550 getData(); 549 getData();
551 function getData(){ 550 function getData(){
552 $scope.showLoader = true; 551 $scope.showLoader = true;
553 CustomersService.getAircraftMake().then(function(result) { 552 CustomersService.getAircraftMake().then(function(result) {
554 $scope.aircraftMakeList = result; 553 $scope.aircraftMakeList = result;
555 $scope.showLoader = false; 554 $scope.showLoader = false;
556 }) 555 })
557 } 556 }
558 var companyData; 557 var companyData;
559 $scope.addFirstData = function(sel, step){ 558 $scope.addFirstData = function(sel, step){
560 $scope.showLoader = true; 559 $scope.showLoader = true;
561 if($scope.data.companyName == undefined){ 560 if($scope.data.companyName == undefined){
562 $scope.showCompanyError = true; 561 $scope.showCompanyError = true;
563 $('.companyNameInput').addClass('customErrorInput'); 562 $('.companyNameInput').addClass('customErrorInput');
564 }else if($scope.data.masterMargin == undefined){ 563 }else if($scope.data.masterMargin == undefined){
565 $scope.showMarginError = true; 564 $scope.showMarginError = true;
566 $('.marginSelectBox').addClass('customErrorInput'); 565 $('.marginSelectBox').addClass('customErrorInput');
567 }else{ 566 }else{
568 $scope.aircraftDetails = [{ 567 $scope.aircraftDetails = [{
569 'tail':'', 568 'tail':'',
570 'make': '', 569 'make': '',
571 'model': '', 570 'model': '',
572 'sizeId' : '', 571 'sizeId' : '',
573 'marginId': $scope.data.masterMargin, 572 'marginId': $scope.data.masterMargin,
574 'avgasMarginId': $scope.data.avgasMargin 573 'avgasMarginId': $scope.data.avgasMargin
575 }]; 574 }];
576 575
577 $(sel).trigger('next.m.' + step); 576 $(sel).trigger('next.m.' + step);
578 getData(); 577 getData();
579 } 578 }
580 $scope.showLoader = false; 579 $scope.showLoader = false;
581 } 580 }
582 $scope.addNew = function(){ 581 $scope.addNew = function(){
583 $scope.showLoader = true; 582 $scope.showLoader = true;
584 $scope.aircraftDetails.push({ 583 $scope.aircraftDetails.push({
585 'tail':'', 584 'tail':'',
586 'make': '', 585 'make': '',
587 'model': '', 586 'model': '',
588 'sizeId' : '', 587 'sizeId' : '',
589 'marginId': $scope.data.masterMargin, 588 'marginId': $scope.data.masterMargin,
590 'avgasMarginId': $scope.data.avgasMargin 589 'avgasMarginId': $scope.data.avgasMargin
591 }); 590 });
592 $scope.showLoader = false; 591 $scope.showLoader = false;
593 }; 592 };
594 593
595 $scope.aircraft = {}; 594 $scope.aircraft = {};
596 $scope.getModal = function(makeId, index){ 595 $scope.getModal = function(makeId, index){
597 $scope.showLoader = true; 596 $scope.showLoader = true;
598 $scope.aircraft.make = makeId; 597 $scope.aircraft.make = makeId;
599 CustomersService.getModal($scope.aircraft.make).then(function(result) { 598 CustomersService.getModal($scope.aircraft.make).then(function(result) {
600 $scope.showLoader = false; 599 $scope.showLoader = false;
601 $scope.aircraftDetails[index].aircraftModalList = result; 600 $scope.aircraftDetails[index].aircraftModalList = result;
602 //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; 601 //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0];
603 }) 602 })
604 } 603 }
605 604
606 $scope.getSize = function(model, index){ 605 $scope.getSize = function(model, index){
607 $scope.showLoader = true; 606 $scope.showLoader = true;
608 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { 607 CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) {
609 $scope.showLoader = false; 608 $scope.showLoader = false;
610 $scope.aircraftDetails[index].aircraftSizeList = result; 609 $scope.aircraftDetails[index].aircraftSizeList = result;
611 //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; 610 //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0];
612 }) 611 })
613 } 612 }
614 613
615 $scope.aircraftListData = {}; 614 $scope.aircraftListData = {};
616 $scope.addData = []; 615 $scope.addData = [];
617 616
618 $scope.saveCompanyData = function(){ 617 $scope.saveCompanyData = function(){
619 CustomersService.addCompany($scope.data).then(function(result) { 618 CustomersService.addCompany($scope.data).then(function(result) {
620 $scope.accountId = result; 619 $scope.accountId = result;
621 $scope.aircraft.accountId = $scope.accountId; 620 $scope.aircraft.accountId = $scope.accountId;
622 621
623 for(var i=0; i<$scope.aircraftDetails.length;i++){ 622 for(var i=0; i<$scope.aircraftDetails.length;i++){
624 $scope.addData.push({ 623 $scope.addData.push({
625 'tail': $scope.aircraftDetails[i].tail, 624 'tail': $scope.aircraftDetails[i].tail,
626 'make': $scope.aircraftDetails[i].make, 625 'make': $scope.aircraftDetails[i].make,
627 'model': $scope.aircraftDetails[i].model, 626 'model': $scope.aircraftDetails[i].model,
628 'sizeId' : $scope.aircraftDetails[i].sizeId, 627 'sizeId' : $scope.aircraftDetails[i].sizeId,
629 'marginId': $scope.aircraftDetails[i].marginId, 628 'marginId': $scope.aircraftDetails[i].marginId,
630 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId 629 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId
631 }); 630 });
632 } 631 }
633 $scope.aircraftListData.aircraftList = $scope.addData; 632 $scope.aircraftListData.aircraftList = $scope.addData;
634 $scope.aircraftListData.accountId = $scope.aircraft.accountId; 633 $scope.aircraftListData.accountId = $scope.aircraft.accountId;
635 634
636 if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ 635 if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){
637 $scope.aircraftListData.aircraftList = []; 636 $scope.aircraftListData.aircraftList = [];
638 } 637 }
639 638
640 CustomersService.addAircraft($scope.aircraftListData).then(function(result) { 639 CustomersService.addAircraft($scope.aircraftListData).then(function(result) {
641 640
642 if(result != null && result.success){ 641 if(result != null && result.success){
643 toastr.success(''+result.success+'', { 642 toastr.success(''+result.success+'', {
644 closeButton: true 643 closeButton: true
645 }) 644 })
646 $('#demo-modal-3').modal('hide'); 645 $('#demo-modal-3').modal('hide');
647 getAllCompanies(); 646 getAllCompanies();
648 }else{ 647 }else{
649 toastr.error(''+result.statusText+'', { 648 toastr.error(''+result.statusText+'', {
650 closeButton: true 649 closeButton: true
651 }) 650 })
652 } 651 }
653 }); 652 });
654 653
655 }) 654 })
656 655
657 656
658 } 657 }
659 658
660 $scope.checkJetWithTail = function(tail, index){ 659 $scope.checkJetWithTail = function(tail, index){
661 660
662 ViewCompanyService.checkJetType(tail).then(function(result) { 661 ViewCompanyService.checkJetType(tail).then(function(result) {
663 if(result.jetA == "true"){ 662 if(result.jetA == "true"){
664 $scope.jetShow[index] = false; 663 $scope.jetShow[index] = false;
665 $scope.marginShow[index] = true; 664 $scope.marginShow[index] = true;
666 }else{ 665 }else{
667 $scope.jetShow[index] = true; 666 $scope.jetShow[index] = true;
668 $scope.marginShow[index] = false; 667 $scope.marginShow[index] = false;
669 } 668 }
670 }) 669 })
671 } 670 }
672 671
673 $scope.etaTimeList=[]; 672 $scope.etaTimeList=[];
674 $scope.etdTimeList =[]; 673 $scope.etdTimeList =[];
675 674
676 $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; 675 $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}];
677 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 676 $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
678 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 677 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
679 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 678 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
680 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 679 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
681 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 680 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
682 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 681 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
683 682
684 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, 683 $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"},
685 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, 684 {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"},
686 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, 685 {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"},
687 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, 686 {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"},
688 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, 687 {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"},
689 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; 688 {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},];
690 689
691 $scope.data = {}; 690 $scope.data = {};
692 691
693 692
694 693
695 } 694 }
app/partials/fuelOrders/fuelOrders.html
1 <style> 1 <style>
2 .subnavbar .mainnav > li:nth-child(4) > a{ 2 .subnavbar .mainnav > li:nth-child(4) > a{
3 color: #c44646; 3 color: #c44646;
4 } 4 }
5 5
6 .button1 { 6 .button1 {
7 display: inline-block; 7 display: inline-block;
8 height: 35px; 8 height: 35px;
9 line-height: 35px; 9 line-height: 35px;
10 padding-right: 15px; 10 padding-right: 15px;
11 padding-left: 50px; 11 padding-left: 50px;
12 position: relative; 12 position: relative;
13 background-color:rgb(41,127,184); 13 background-color:rgb(41,127,184);
14 color:rgb(255,255,255); 14 color:rgb(255,255,255);
15 text-decoration: none; 15 text-decoration: none;
16 text-transform: uppercase; 16 text-transform: uppercase;
17 letter-spacing: 1px; 17 letter-spacing: 1px;
18 margin-bottom: 15px; 18 margin-bottom: 15px;
19 border: 0; 19 border: 0;
20 20
21 21
22 border-radius: 5px; 22 border-radius: 5px;
23 -moz-border-radius: 5px; 23 -moz-border-radius: 5px;
24 -webkit-border-radius: 5px; 24 -webkit-border-radius: 5px;
25 text-shadow:0px 1px 0px rgba(0,0,0,0.5); 25 text-shadow:0px 1px 0px rgba(0,0,0,0.5);
26 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; 26 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1;
27 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); 27 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true);
28 28
29 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 29 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
30 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 30 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
31 box-shadow:0px 2px 2px rgba(0,0,0,0.2); 31 box-shadow:0px 2px 2px rgba(0,0,0,0.2);
32 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; 32 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)";
33 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); 33 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true);
34 } 34 }
35 35
36 .button1 span { 36 .button1 span {
37 position: absolute; 37 position: absolute;
38 left: 0; 38 left: 0;
39 top: 0; 39 top: 0;
40 width: 35px; 40 width: 35px;
41 background-color:rgba(0,0,0,0.5); 41 background-color:rgba(0,0,0,0.5);
42 42
43 -webkit-border-top-left-radius: 5px; 43 -webkit-border-top-left-radius: 5px;
44 -webkit-border-bottom-left-radius: 5px; 44 -webkit-border-bottom-left-radius: 5px;
45 -moz-border-radius-topleft: 5px; 45 -moz-border-radius-topleft: 5px;
46 -moz-border-radius-bottomleft: 5px; 46 -moz-border-radius-bottomleft: 5px;
47 border-top-left-radius: 5px; 47 border-top-left-radius: 5px;
48 border-bottom-left-radius: 5px; 48 border-bottom-left-radius: 5px;
49 border-right: 1px solid rgba(0,0,0,0.15); 49 border-right: 1px solid rgba(0,0,0,0.15);
50 } 50 }
51 51
52 .button1:hover span, .button1.active span { 52 .button1:hover span, .button1.active span {
53 background-color:rgb(0,102,26); 53 background-color:rgb(0,102,26);
54 border-right: 1px solid rgba(0,0,0,0.3); 54 border-right: 1px solid rgba(0,0,0,0.3);
55 } 55 }
56 56
57 .button1:active { 57 .button1:active {
58 margin-top: 2px; 58 margin-top: 2px;
59 margin-bottom: 13px; 59 margin-bottom: 13px;
60 60
61 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 61 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
62 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 62 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
63 box-shadow:0px 1px 0px rgba(255,255,255,0.5); 63 box-shadow:0px 1px 0px rgba(255,255,255,0.5);
64 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; 64 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)";
65 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); 65 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true);
66 } 66 }
67 67
68 .button1.turquoise { 68 .button1.turquoise {
69 background: #449d44; 69 background: #449d44;
70 } 70 }
71 </style> 71 </style>
72 72
73 <div class="myLoader" ng-show="showLoader"> 73 <div class="myLoader" ng-show="showLoader">
74 <img src="../img/hourglass.gif" width="50px;"> 74 <img src="../img/hourglass.gif" width="50px;">
75 </div> 75 </div>
76 76
77 77
78 <div class="main"> 78 <div class="main">
79 <div class="container"> 79 <div class="container">
80 <div class="row"> 80 <div class="row">
81 <div class="col-md-12"> 81 <div class="col-md-12">
82 <div class="widget stacked "> 82 <div class="widget stacked ">
83 <div class="widget-content"> 83 <div class="widget-content">
84 <div class="tabbable"> 84 <div class="tabbable">
85 <ul class="nav nav-tabs"> 85 <ul class="nav nav-tabs">
86 <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> 86 <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li>
87 <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> 87 <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li>
88 <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> 88 <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li>
89 </ul> 89 </ul>
90 <br> 90 <br>
91 <div class="tab-content customer-table" style="margin:0px"> 91 <div class="tab-content customer-table" style="margin:0px">
92 <div class="tab-pane active" id="companyView"> 92 <div class="tab-pane active" id="companyView">
93 <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> 93 <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true">
94 <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" > 94 <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" >
95 <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> 95 <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)">
96 {{row.companyName}} 96 {{row.companyName}}
97 </td> 97 </td>
98 <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> 98 <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)">
99 {{row.upliftDateString}} 99 {{row.upliftDateString}}
100 </td> 100 </td>
101 <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> 101 <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)">
102 {{row.aircraftName}} 102 {{row.aircraftName}}
103 </td> 103 </td>
104 <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> 104 <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)">
105 {{row.source}} 105 {{row.source}}
106 </td> 106 </td>
107 <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> 107 <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)">
108 {{row.requestedVolume}} 108 {{row.requestedVolume}}
109 </td> 109 </td>
110 <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> 110 <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)">
111 {{row.fboCost | number : 4}} 111 {{row.fboCost | number : 4}}
112 </td> 112 </td>
113 <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> 113 <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)">
114 {{row.priceQuote | number : 4}} 114 {{row.priceQuote | number : 4}}
115 </td> 115 </td>
116 <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> 116 <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)">
117 {{row.invoiced | number : 4}} 117 {{row.invoiced | number : 4}}
118 </td> 118 </td>
119 <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> 119 <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)">
120 {{row.total | number : 4}} 120 {{row.total | number : 4}}
121 </td> 121 </td>
122 <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> 122 <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'">
123 <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)"> 123 <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)">
124 <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> 124 <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option>
125 <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> 125 <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option>
126 <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> 126 <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option>
127 <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> 127 <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option>
128 <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> 128 <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option>
129 </select> 129 </select>
130 </td> 130 </td>
131 <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> 131 <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '">
132 <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > 132 <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" >
133 <option value="" disabled selected="selected" >Invoice</option> 133 <option value="" disabled selected="selected" >Invoice</option>
134 <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> 134 <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option>
135 <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> 135 <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option>
136 <option value="0" disabled >_____________</option> 136 <option value="0" disabled >_____________</option>
137 <option value="uploadAttachment" >Upload</option> 137 <option value="uploadAttachment" >Upload</option>
138 </select> 138 </select>
139 <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> 139 <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i>
140 </td> 140 </td>
141 </tr> 141 </tr>
142 </table> 142 </table>
143 143
144 <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> 144 <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()">
145 <option value="" disabled selected="selected">Fuel Widget</option> 145 <option value="" disabled selected="selected">Fuel Widget</option>
146 <option value="dt" >Direct Transaction</option> 146 <option value="dt" >Direct Transaction</option>
147 <option value="efo" >Export Fuel Orders</option> 147 <option value="efo" >Export Fuel Orders</option>
148 </select> 148 </select>
149 149
150 </div> 150 </div>
151 </div> 151 </div>
152 </div> 152 </div>
153 </div> 153 </div>
154 <!-- /widget-content --> 154 <!-- /widget-content -->
155 </div> 155 </div>
156 <!-- /widget --> 156 <!-- /widget -->
157 </div> 157 </div>
158 <!-- /span8 --> 158 <!-- /span8 -->
159 </div> 159 </div>
160 <!-- /row --> 160 <!-- /row -->
161 </div> 161 </div>
162 <!-- /container --> 162 <!-- /container -->
163 163
164 164
165 </div> 165 </div>
166 <!-- /main --> 166 <!-- /main -->
167 167
168 168
169 <form class="modal multi-step" id="demo-modal-3" name="companyForm"> 169 <form class="modal multi-step" id="demo-modal-3" name="companyForm">
170 <div class="modal-dialog modal-lg"> 170 <div class="modal-dialog modal-lg">
171 <div class="modal-content"> 171 <div class="modal-content">
172 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 172 <div class="modal-body step-1" data-step="1" style="padding: 0;">
173 <div> 173 <div>
174 <div class="row" style="margin: 0;"> 174 <div class="row" style="margin: 0;">
175 <div> 175 <div>
176 <div class="widget" style="margin-bottom: 0;"> 176 <div class="widget" style="margin-bottom: 0;">
177 <div class="widget-header"> 177 <div class="widget-header">
178 <i class="icon-pencil"></i> 178 <i class="icon-pencil"></i>
179 <i class="fa fa-tasks" aria-hidden="true"></i> 179 <i class="fa fa-tasks" aria-hidden="true"></i>
180 <h3>Add a New Company</h3> 180 <h3>Add a New Company</h3>
181 <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> 181 <div class="pull-right my-toggle-switch" style="margin-right: 30px;">
182 <div style="color: #ff9a01;">Activate &nbsp &nbsp 182 <div style="color: #ff9a01;">Activate &nbsp &nbsp
183 <toggle ng-model="data.activate" size="customToogle"></toggle> 183 <toggle ng-model="data.activate" size="customToogle"></toggle>
184 </div> 184 </div>
185 </div> 185 </div>
186 <div class="clearfix"></div> 186 <div class="clearfix"></div>
187 </div> 187 </div>
188 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 188 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
189 <div class="col-xs-12"> 189 <div class="col-xs-12">
190 <div class="col-md-8"> 190 <div class="col-md-8">
191 <div class="pull-left"> 191 <div class="pull-left">
192 <label class="new-input-label"><b>Company Name *</b></label> 192 <label class="new-input-label"><b>Company Name *</b></label>
193 </div> 193 </div>
194 <div class="pull-left" style="margin-left: 15px;"> 194 <div class="pull-left" style="margin-left: 15px;">
195 <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> 195 <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> -->
196 <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> 196 <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput">
197 197
198 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> 198 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label>
199 </div> 199 </div>
200 <div class="clearfix"></div> 200 <div class="clearfix"></div>
201 </div> 201 </div>
202 <div class="col-md-4"> 202 <div class="col-md-4">
203 203
204 <div class="pull-right"> 204 <div class="pull-right">
205 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> 205 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder="">
206 </div> 206 </div>
207 <div class="pull-right"> 207 <div class="pull-right">
208 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> 208 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label>
209 </div> 209 </div>
210 <div class="clearfix"></div> 210 <div class="clearfix"></div>
211 </div> 211 </div>
212 </div> 212 </div>
213 <div class="clearfix"></div><br> 213 <div class="clearfix"></div><br>
214 <div class="col-xs-12"> 214 <div class="col-xs-12">
215 <div class="col-md-7"> 215 <div class="col-md-7">
216 <div class="pull-left"> 216 <div class="pull-left">
217 <label class="new-input-label"><b>Relationship&nbsp;</b></label> 217 <label class="new-input-label"><b>Relationship&nbsp;</b></label>
218 </div> 218 </div>
219 <div class="pull-left" style="margin-left: 32px;"> 219 <div class="pull-left" style="margin-left: 32px;">
220 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> 220 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br>
221 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> 221 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br>
222 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor 222 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor
223 </div> 223 </div>
224 <div class="clearfix"></div> 224 <div class="clearfix"></div>
225 </div> 225 </div>
226 <div class="col-md-2 Airport" style="text-align: right;"> 226 <div class="col-md-2 Airport" style="text-align: right;">
227 <b>Certificate Type</b> 227 <b>Certificate Type</b>
228 </div> 228 </div>
229 <div class="col-md-3 Airport"> 229 <div class="col-md-3 Airport">
230 <select required class="form-control" ng-model="data.certificateType"> 230 <select required class="form-control" ng-model="data.certificateType">
231 <option value="" disabled selected hidden>Select...</option> 231 <option value="" disabled selected hidden>Select...</option>
232 <option value="corporate">Part 91 (Corporate)</option> 232 <option value="corporate">Part 91 (Corporate)</option>
233 <option value="charter">Part 135 (Charter)</option> 233 <option value="charter">Part 135 (Charter)</option>
234 <option value="scheduled">Part 121 (Scheduled)</option> 234 <option value="scheduled">Part 121 (Scheduled)</option>
235 <option value="military">Military</option> 235 <option value="military">Military</option>
236 <option value="government">Government</option> 236 <option value="government">Government</option>
237 </select> 237 </select>
238 </div> 238 </div>
239 <div class="clearfix"></div> 239 <div class="clearfix"></div>
240 </div> 240 </div>
241 <div class="clearfix"></div> 241 <div class="clearfix"></div>
242 <br/> 242 <br/>
243 <div class="col-xs-12"> 243 <div class="col-xs-12">
244 <div class="col-md-6"> 244 <div class="col-md-6">
245 <div class="pull-left" style="width: 110px;"> 245 <div class="pull-left" style="width: 110px;">
246 <b>JET A Margin *</b> 246 <b>JET A Margin *</b>
247 </div> 247 </div>
248 <div class="pull-left"> 248 <div class="pull-left">
249 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> 249 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()">
250 <option value="" disabled>Select...</option> 250 <option value="" disabled>Select...</option>
251 </select> 251 </select>
252 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> 252 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label>
253 253
254 <div class="clearfix"></div> 254 <div class="clearfix"></div>
255 </div> 255 </div>
256 </div> 256 </div>
257 257
258 <div class="col-md-3 Airport" style="text-align: right;"> 258 <div class="col-md-3 Airport" style="text-align: right;">
259 <b>AVGAS 100LL Margin</b> 259 <b>AVGAS 100LL Margin</b>
260 </div> 260 </div>
261 <div class="col-md-3 Airport"> 261 <div class="col-md-3 Airport">
262 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> 262 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList">
263 <option value="" disabled>Select...</option> 263 <option value="" disabled>Select...</option>
264 </select> 264 </select>
265 </div> 265 </div>
266 <div class="clearfix"></div> 266 <div class="clearfix"></div>
267 </div> 267 </div>
268 <div class="clearfix"></div> 268 <div class="clearfix"></div>
269 <br/> 269 <br/>
270 <div class="col-xs-12"> 270 <div class="col-xs-12">
271 <div class="col-md-12"> 271 <div class="col-md-12">
272 <div class="pull-left" style="width: 110px;"> 272 <div class="pull-left" style="width: 110px;">
273 <label class="new-input-label"><b>Address</b></label> 273 <label class="new-input-label"><b>Address</b></label>
274 </div> 274 </div>
275 <div class="pull-left" style="width: calc(100% - 110px);"> 275 <div class="pull-left" style="width: calc(100% - 110px);">
276 <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> 276 <input type="text" class="form-control" ng-model="data.addressOne" placeholder="">
277 </div> 277 </div>
278 <div class="clearfix"></div> 278 <div class="clearfix"></div>
279 </div> 279 </div>
280 </div> 280 </div>
281 <div class="clearfix"></div> 281 <div class="clearfix"></div>
282 <br/> 282 <br/>
283 <div class="col-xs-12"> 283 <div class="col-xs-12">
284 <div class="col-md-12"> 284 <div class="col-md-12">
285 <div class="pull-left" style="width: 110px;"> 285 <div class="pull-left" style="width: 110px;">
286 <label class="new-input-label"><b>Address2</b></label> 286 <label class="new-input-label"><b>Address2</b></label>
287 </div> 287 </div>
288 <div class="pull-left" style="width: calc(100% - 110px);"> 288 <div class="pull-left" style="width: calc(100% - 110px);">
289 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> 289 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder="">
290 </div> 290 </div>
291 <div class="clearfix"></div> 291 <div class="clearfix"></div>
292 </div> 292 </div>
293 </div> 293 </div>
294 <div class="clearfix"></div> 294 <div class="clearfix"></div>
295 <br/> 295 <br/>
296 <div class="col-xs-12"> 296 <div class="col-xs-12">
297 297
298 <div class="col-md-6"> 298 <div class="col-md-6">
299 <div class="pull-left" style="width: 110px;"> 299 <div class="pull-left" style="width: 110px;">
300 <label class="new-input-label"><b>City</b></label> 300 <label class="new-input-label"><b>City</b></label>
301 </div> 301 </div>
302 <div class="pull-left" style="width: calc(100% - 110px);"> 302 <div class="pull-left" style="width: calc(100% - 110px);">
303 <input type="text" ng-model="data.city" class="form-control" placeholder=""> 303 <input type="text" ng-model="data.city" class="form-control" placeholder="">
304 </div> 304 </div>
305 <div class="clearfix"></div> 305 <div class="clearfix"></div>
306 </div> 306 </div>
307 <div class="col-md-3"> 307 <div class="col-md-3">
308 <div class="pull-left" style="width: 40px;"> 308 <div class="pull-left" style="width: 40px;">
309 <label class="new-input-label"><b>State</b></label> 309 <label class="new-input-label"><b>State</b></label>
310 </div> 310 </div>
311 <div class="pull-left" style="width: calc(100% - 110px);"> 311 <div class="pull-left" style="width: calc(100% - 110px);">
312 <input type="text" ng-model="data.state" class="form-control" placeholder=""> 312 <input type="text" ng-model="data.state" class="form-control" placeholder="">
313 </div> 313 </div>
314 <div class="clearfix"></div> 314 <div class="clearfix"></div>
315 </div> 315 </div>
316 <div class="col-md-3"> 316 <div class="col-md-3">
317 <div class="pull-left"> 317 <div class="pull-left">
318 <label class="new-input-label"><b>Zip Code</b></label> 318 <label class="new-input-label"><b>Zip Code</b></label>
319 </div> 319 </div>
320 <div class="pull-right" style="width: calc(100% - 60px);"> 320 <div class="pull-right" style="width: calc(100% - 60px);">
321 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> 321 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder="">
322 </div> 322 </div>
323 <div class="clearfix"></div> 323 <div class="clearfix"></div>
324 </div> 324 </div>
325 </div> 325 </div>
326 <div class="clearfix"></div> 326 <div class="clearfix"></div>
327 <br/> 327 <br/>
328 <div class="col-xs-12"> 328 <div class="col-xs-12">
329 329
330 <div class="col-md-6"> 330 <div class="col-md-6">
331 <div class="pull-left" style="width: 110px;"> 331 <div class="pull-left" style="width: 110px;">
332 <label class="new-input-label"><b>Country</b></label> 332 <label class="new-input-label"><b>Country</b></label>
333 </div> 333 </div>
334 <div class="pull-left" style="width: calc(100% - 110px);"> 334 <div class="pull-left" style="width: calc(100% - 110px);">
335 <input type="text" ng-model="data.country" class="form-control" placeholder=""> 335 <input type="text" ng-model="data.country" class="form-control" placeholder="">
336 </div> 336 </div>
337 <div class="clearfix"></div> 337 <div class="clearfix"></div>
338 </div> 338 </div>
339 <div class="col-md-6"> 339 <div class="col-md-6">
340 <div class="pull-left" style="width: 110px;"> 340 <div class="pull-left" style="width: 110px;">
341 <label class="new-input-label"><b>Internal Note</b></label> 341 <label class="new-input-label"><b>Internal Note</b></label>
342 </div> 342 </div>
343 <div class="pull-left" style="width: calc(100% - 110px);"> 343 <div class="pull-left" style="width: calc(100% - 110px);">
344 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> 344 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea>
345 </div> 345 </div>
346 <div class="clearfix"></div> 346 <div class="clearfix"></div>
347 </div> 347 </div>
348 </div> 348 </div>
349 <div class="clearfix"></div> 349 <div class="clearfix"></div>
350 <!-- <br/> 350 <!-- <br/>
351 <div class="col-xs-12"> 351 <div class="col-xs-12">
352 <div class="col-md-2 Airport"></div> 352 <div class="col-md-2 Airport"></div>
353 <div class="col-md-10 Airport"> 353 <div class="col-md-10 Airport">
354 <div class="pull-right"> 354 <div class="pull-right">
355 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> 355 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
356 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> 356 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button>
357 </div> 357 </div>
358 </div> 358 </div>
359 </div> --> 359 </div> -->
360 </div> 360 </div>
361 </div> 361 </div>
362 <div class="clearfix"></div> 362 <div class="clearfix"></div>
363 </div> 363 </div>
364 </div> 364 </div>
365 </div> 365 </div>
366 </div> 366 </div>
367 <div class="modal-body step-2" data-step="2" style="padding: 0;"> 367 <div class="modal-body step-2" data-step="2" style="padding: 0;">
368 <div> 368 <div>
369 <div class="row" style="margin: 0;"> 369 <div class="row" style="margin: 0;">
370 <div> 370 <div>
371 <div class="widget" style="margin-bottom: 0;"> 371 <div class="widget" style="margin-bottom: 0;">
372 <div class="widget-header"> 372 <div class="widget-header">
373 <i class="icon-pencil"></i> 373 <i class="icon-pencil"></i>
374 <i class="fa fa-tasks" aria-hidden="true"></i> 374 <i class="fa fa-tasks" aria-hidden="true"></i>
375 <h3>Add a New Company</h3> 375 <h3>Add a New Company</h3>
376 <div class="clearfix"></div> 376 <div class="clearfix"></div>
377 </div> 377 </div>
378 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 378 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
379 <div class="col-xs-12"> 379 <div class="col-xs-12">
380 <div class="widget-header"> 380 <div class="widget-header">
381 <i class="fa fa-list"></i> 381 <i class="fa fa-list"></i>
382 <h3>Aircraft List</h3> 382 <h3>Aircraft List</h3>
383 </div> 383 </div>
384 <div class="widget-content" style="padding:0px;border: 0px; "> 384 <div class="widget-content" style="padding:0px;border: 0px; ">
385 <div class="table-responsive"> 385 <div class="table-responsive">
386 <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> 386 <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;">
387 <thead> 387 <thead>
388 <tr> 388 <tr>
389 <th>Tail</th> 389 <th>Tail</th>
390 <th>Make</th> 390 <th>Make</th>
391 <th>Model</th> 391 <th>Model</th>
392 <th>Size</th> 392 <th>Size</th>
393 <th>Margin</th> 393 <th>Margin</th>
394 </tr> 394 </tr>
395 </thead> 395 </thead>
396 <tbody> 396 <tbody>
397 <tr> 397 <tr>
398 <td> 398 <td>
399 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> 399 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control">
400 </td> 400 </td>
401 <td style="width: 25%;"> 401 <td style="width: 25%;">
402 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> 402 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()">
403 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 403 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
404 </select> 404 </select>
405 </td> 405 </td>
406 <td style="width: 20%;"> 406 <td style="width: 20%;">
407 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> 407 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()">
408 <option ng-repeat="model in aircraftModalList">{{model}}</option> 408 <option ng-repeat="model in aircraftModalList">{{model}}</option>
409 </select> 409 </select>
410 </td> 410 </td>
411 <td style="width: 25%;"> 411 <td style="width: 25%;">
412 <select class="form-control" ng-model="aircraft.size"> 412 <select class="form-control" ng-model="aircraft.size">
413 <option ng-repeat="size in aircraftSizeList">{{size}}</option> 413 <option ng-repeat="size in aircraftSizeList">{{size}}</option>
414 </select> 414 </select>
415 </td> 415 </td>
416 <td> 416 <td>
417 <select class="form-control"> 417 <select class="form-control">
418 <option>Margin1</option> 418 <option>Margin1</option>
419 <option>Margin2</option> 419 <option>Margin2</option>
420 </select> 420 </select>
421 </td> 421 </td>
422 </tr> 422 </tr>
423 </tbody> 423 </tbody>
424 424
425 </table> --> 425 </table> -->
426 <table class="table table-striped table-bordered"> 426 <table class="table table-striped table-bordered">
427 <thead> 427 <thead>
428 <tr> 428 <tr>
429 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> 429 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> -->
430 <th>Tail</th> 430 <th>Tail</th>
431 <th>Make</th> 431 <th>Make</th>
432 <th>Model</th> 432 <th>Model</th>
433 <th>Size</th> 433 <th>Size</th>
434 <th>JET A Margin</th> 434 <th>JET A Margin</th>
435 <th>AVGS 100LL Margin</th> 435 <th>AVGS 100LL Margin</th>
436 </tr> 436 </tr>
437 </thead> 437 </thead>
438 <tbody> 438 <tbody>
439 <tr ng-repeat="aircraftData in aircraftDetails track by $index"> 439 <tr ng-repeat="aircraftData in aircraftDetails track by $index">
440 <!-- <td> 440 <!-- <td>
441 <input type="checkbox" ng-model="aircraftData.selected"/> 441 <input type="checkbox" ng-model="aircraftData.selected"/>
442 </td> --> 442 </td> -->
443 <td style="width: 15%"> 443 <td style="width: 15%">
444 <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> 444 <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/>
445 </td> 445 </td>
446 <td style="width: 17%"> 446 <td style="width: 17%">
447 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> 447 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)">
448 <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> 448 <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option>
449 <option value="" disabled>Select...</option> 449 <option value="" disabled>Select...</option>
450 </select> 450 </select>
451 </td> 451 </td>
452 <td style="width: 17%"> 452 <td style="width: 17%">
453 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> 453 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)">
454 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> 454 <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option>
455 <option value="" disabled>Select...</option> 455 <option value="" disabled>Select...</option>
456 </select> 456 </select>
457 </td> 457 </td>
458 <td style="width: 17%"> 458 <td style="width: 17%">
459 <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> 459 <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList">
460 <option value="" disabled>Select...</option> 460 <option value="" disabled>Select...</option>
461 </select> --> 461 </select> -->
462 <select class="form-control" ng-model="aircraftData.sizeId"> 462 <select class="form-control" ng-model="aircraftData.sizeId">
463 <option value="" disabled>Select</option> 463 <option value="" disabled>Select</option>
464 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> 464 <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option>
465 </select> 465 </select>
466 <!-- <select class="form-control" ng-model="aircraftData.size"> 466 <!-- <select class="form-control" ng-model="aircraftData.size">
467 <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> 467 <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option>
468 </select> --> 468 </select> -->
469 </td> 469 </td>
470 <td style="width: 17%"> 470 <td style="width: 17%">
471 <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> 471 <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList">
472 <option value="" disabled>Select...</option> 472 <option value="" disabled>Select...</option>
473 </select> --> 473 </select> -->
474 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> 474 <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]">
475 <option value="" disabled>Select</option> 475 <option value="" disabled>Select</option>
476 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> 476 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option>
477 </select> 477 </select>
478 </td> 478 </td>
479 <td style="width: 17%"> 479 <td style="width: 17%">
480 <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> 480 <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList">
481 <option value="" disabled>Select...</option> 481 <option value="" disabled>Select...</option>
482 </select> --> 482 </select> -->
483 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> 483 <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]">
484 <option value="" disabled>Select</option> 484 <option value="" disabled>Select</option>
485 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> 485 <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option>
486 </select> 486 </select>
487 </td> 487 </td>
488 </tr> 488 </tr>
489 </tbody> 489 </tbody>
490 </table> 490 </table>
491 </div> 491 </div>
492 <div class="clearfix"></div> 492 <div class="clearfix"></div>
493 </div> 493 </div>
494 </div> 494 </div>
495 <div class="clearfix"></div> 495 <div class="clearfix"></div>
496 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> 496 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;">
497 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> 497 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button>
498 </div> 498 </div>
499 <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> 499 <!-- <div class="col-xs-12" style="margin-bottom: 20px;">
500 <div class="pull-right"> 500 <div class="pull-right">
501 <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> 501 <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button>
502 <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> 502 <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button>
503 <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> 503 <button type="button" class="btn btn-success" ng-click="goBack()">Save</button>
504 </div> 504 </div>
505 </div> --> 505 </div> -->
506 </div> 506 </div>
507 </div> 507 </div>
508 <div class="clearfix"></div> 508 <div class="clearfix"></div>
509 </div> 509 </div>
510 </div> 510 </div>
511 </div> 511 </div>
512 </div> 512 </div>
513 <!-- <div class="modal-body step-3" data-step="3"> 513 <!-- <div class="modal-body step-3" data-step="3">
514 This is the final step. 514 This is the final step.
515 </div> --> 515 </div> -->
516 <div class="modal-footer" style="border-top: 0;"> 516 <div class="modal-footer" style="border-top: 0;">
517 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> 517 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button>
518 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> 518 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button>
519 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> 519 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button>
520 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> 520 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> -->
521 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> 521 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button>
522 </div> 522 </div>
523 </div> 523 </div>
524 </div> 524 </div>
525 </form> 525 </form>
526 526
527 527
528 528
529 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> 529 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm">
530 <div class="modal-dialog modal-lg"> 530 <div class="modal-dialog modal-lg">
531 <div class="modal-content"> 531 <div class="modal-content">
532 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 532 <div class="modal-body step-1" data-step="1" style="padding: 0;">
533 <div> 533 <div>
534 <div class="row" style="margin: 0;"> 534 <div class="row" style="margin: 0;">
535 <div> 535 <div>
536 <div class="widget" style="margin-bottom: 0;"> 536 <div class="widget" style="margin-bottom: 0;">
537 <div class="widget-header"> 537 <div class="widget-header">
538 <i class="icon-pencil"></i> 538 <i class="icon-pencil"></i>
539 <i class="fa fa-tasks" aria-hidden="true"></i> 539 <i class="fa fa-tasks" aria-hidden="true"></i>
540 <h3>Add a Fuel Order</h3> 540 <h3>Add a Fuel Order</h3>
541 <div class="clearfix"></div> 541 <div class="clearfix"></div>
542 </div> 542 </div>
543 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 543 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
544 <div class="col-xs-12"> 544 <div class="col-xs-12">
545 <div class="col-xs-12"> 545 <div class="col-xs-12">
546 546
547 <div class="col-md-6"> 547 <div class="col-md-6">
548 <div class="pull-left" style="width: 110px;"> 548 <div class="pull-left" style="width: 110px;">
549 <label class="new-input-label"><b>Company</b></label> 549 <label class="new-input-label"><b>Company</b></label>
550 </div> 550 </div>
551 <div class="pull-left" style="width: calc(100% - 110px);"> 551 <div class="pull-left" style="width: calc(100% - 110px);">
552 <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> 552 <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required>
553 <option value="" selected disabled>Select Company</option> 553 <option value="" selected disabled>Select Company</option>
554 <option ng-repeat="list in companyList">{{list.companyName}}</option> 554 <option ng-repeat="list in companyList">{{list.companyName}}</option>
555 </select> 555 </select>
556 </div> 556 </div>
557 <div class="clearfix"></div> 557 <div class="clearfix"></div>
558 </div> 558 </div>
559 <div class="col-md-6"> 559 <div class="col-md-6">
560 <div class="pull-left" style="width: 110px;"> 560 <div class="pull-left" style="width: 110px;">
561 <label class="new-input-label"><b>Product</b></label> 561 <label class="new-input-label"><b>Product</b></label>
562 </div> 562 </div>
563 <div class="pull-left" style="width: calc(100% - 110px);"> 563 <div class="pull-left" style="width: calc(100% - 110px);">
564 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote)" required> 564 <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required>
565 <option value="" selected disabled>Select Product</option> 565 <option value="" selected disabled>Select Product</option>
566 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> 566 <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option>
567 </select> 567 </select>
568 </div> 568 </div>
569 <div class="clearfix"></div> 569 <div class="clearfix"></div>
570 </div> 570 </div>
571 571
572 </div> 572 </div>
573 <div class="clearfix"></div> 573 <div class="clearfix"></div>
574 <br/> 574 <br/>
575 575
576 576
577 <div class="col-xs-12"> 577 <div class="col-xs-12">
578 578
579 <div class="col-md-6"> 579 <div class="col-md-6">
580 <div class="pull-left" style="width: 110px;"> 580 <div class="pull-left" style="width: 110px;">
581 <label class="new-input-label"><b>Aircraft</b></label> 581 <label class="new-input-label"><b>Aircraft</b></label>
582 </div> 582 </div>
583 <div class="pull-left" style="width: calc(100% - 110px);"> 583 <div class="pull-left" style="width: calc(100% - 110px);">
584 <select class="form-control" ng-model="order.aircraftName" required> 584 <select class="form-control" ng-model="order.aircraftName" required>
585 <option selected disabled value="">Select Aircraft</option> 585 <option selected disabled value="">Select Aircraft</option>
586 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> 586 <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option>
587 </select> 587 </select>
588 </div> 588 </div>
589 <div class="clearfix"></div> 589 <div class="clearfix"></div>
590 </div> 590 </div>
591 <div class="col-md-6"> 591 <div class="col-md-6">
592 <div class="pull-left" style="width: 110px;"> 592 <div class="pull-left" style="width: 110px;">
593 <label class="new-input-label"><b>Volume</b></label> 593 <label class="new-input-label"><b>Volume</b></label>
594 </div> 594 </div>
595 <div class="pull-left" style="width: calc(100% - 110px);"> 595 <div class="pull-left" style="width: calc(100% - 110px);">
596 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.volume,'v')" class="form-control" placeholder="" required> 596 <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required>
597 </div> 597 </div>
598 <div class="clearfix"></div> 598 <div class="clearfix"></div>
599 </div> 599 </div>
600 600
601 </div> 601 </div>
602 <div class="clearfix"></div> 602 <div class="clearfix"></div>
603 <br/> 603 <br/>
604 604
605 <div class="col-xs-12"> 605 <div class="col-xs-12">
606 606
607 <div class="col-md-6"> 607 <div class="col-md-6">
608 <div class="pull-left" style="width: 110px;"> 608 <div class="pull-left" style="width: 110px;">
609 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> 609 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label>
610 </div> 610 </div>
611 <div class="pull-left" style="width: calc(100% - 110px);"> 611 <div class="pull-left" style="width: calc(100% - 110px);">
612 <div style="width: 50%; float: left;"> 612 <div style="width: 50%; float: left;">
613 Date 613 Date
614 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> 614 <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/>
615 </div> 615 </div>
616 <div style="width: 50%; float: left;"> 616 <div style="width: 50%; float: left;">
617 Time 617 Time
618 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> 618 <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required>
619 <option ng-repeat="li in etaTimeList">{{li.time}}</option> 619 <option ng-repeat="li in etaTimeList">{{li.time}}</option>
620 </select> 620 </select>
621 621
622 </div> 622 </div>
623 </div> 623 </div>
624 <div class="clearfix"></div> 624 <div class="clearfix"></div>
625 </div> 625 </div>
626 626
627 <div class="col-md-6" style="margin-top: 22px;"> 627 <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'">
628 <div class="pull-left" style="width: 110px;"> 628 <div class="pull-left" style="width: 110px;">
629 <label class="new-input-label"><b>Invoiced</b></label> 629 <label class="new-input-label"><b>Invoiced</b></label>
630 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 630 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
631 </div> 631 </div>
632 <div class="pull-left" style="width: calc(100% - 110px);"> 632 <div class="pull-left" style="width: calc(100% - 110px);">
633 <input type="text" ng-model="order.invoiced" ng-keyup="addTotal(order.invoiced,'i')" class="form-control" placeholder=""> 633 <input type="text" ng-model="order.invoiced" class="form-control" placeholder="">
634 </div> 634 </div>
635 <div class="clearfix"></div> 635 <div class="clearfix"></div>
636 </div> 636 </div>
637 </div> 637 </div>
638 <div class="clearfix"></div><br> 638 <div class="clearfix"></div><br>
639 639
640 640
641 <div class="col-xs-12"> 641 <div class="col-xs-12">
642 642
643 <div class="col-md-6"> 643 <div class="col-md-6">
644 <div class="pull-left" style="width: 110px;"> 644 <div class="pull-left" style="width: 110px;">
645 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> 645 <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label>
646 </div> 646 </div>
647 <div class="pull-left" style="width: calc(100% - 110px);"> 647 <div class="pull-left" style="width: calc(100% - 110px);">
648 <div style="width: 50%; float: left;"> 648 <div style="width: 50%; float: left;">
649 Date 649 Date
650 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> 650 <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/>
651 </div> 651 </div>
652 <div style="width: 50%; float: left;"> 652 <div style="width: 50%; float: left;">
653 Time 653 Time
654 <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> 654 <select class="form-control" ng-model="order.etdTime" style="width: 100%;">
655 <option ng-repeat="list in etdTimeList">{{list.time}}</option> 655 <option ng-repeat="list in etdTimeList">{{list.time}}</option>
656 </select> 656 </select>
657 657
658 </div> 658 </div>
659 </div> 659 </div>
660 <div class="clearfix"></div> 660 <div class="clearfix"></div>
661 </div> 661 </div>
662 662
663 <div class="col-md-6" style="margin-top: 22px;"> 663 <div class="col-md-6" style="margin-top: 22px;">
664 <div class="pull-left" style="width: 110px;"> 664 <div class="pull-left" style="width: 110px;">
665 <label class="new-input-label"><b>Total</b></label> 665 <label class="new-input-label"><b>Total</b></label>
666 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 666 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
667 </div> 667 </div>
668 <div class="pull-left" style="width: calc(100% - 110px);"> 668 <div class="pull-left" style="width: calc(100% - 110px);">
669 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> 669 <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}">
670 </div> 670 </div>
671 </div> 671 </div>
672 </div> 672 </div>
673 <div class="clearfix"></div><br> 673 <div class="clearfix"></div><br>
674 674
675 675
676 <div class="col-xs-12"> 676 <div class="col-xs-12">
677 677
678 <div class="col-md-6"> 678 <div class="col-md-6">
679 <div class="pull-left" style="width: 110px;"> 679 <div class="pull-left" style="width: 110px;">
680 <label class="new-input-label"><b>Fuel on</b></label> 680 <label class="new-input-label"><b>Fuel on</b></label>
681 </div> 681 </div>
682 <div class="pull-left" style="width: calc(100% - 110px);"> 682 <div class="pull-left" style="width: calc(100% - 110px);">
683 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> 683 <select class="form-control" ng-model="order.fuelOn" style="width: 100%;">
684 <option value="" disabled selected hidden>Select...</option> 684 <option value="" disabled selected hidden>Select...</option>
685 <option value="Arrival">Arrival</option> 685 <option value="Arrival">Arrival</option>
686 <option value="Departure">Departure</option> 686 <option value="Departure">Departure</option>
687 </select> 687 </select>
688 </div> 688 </div>
689 <div class="clearfix"></div> 689 <div class="clearfix"></div>
690 </div> 690 </div>
691 691
692 <div class="col-md-6"> 692 <div class="col-md-6">
693 <div class="pull-left" style="width: 110px;"> 693 <div class="pull-left" style="width: 110px;">
694 <label class="new-input-label"><b>FBO Cost</b></label> 694 <label class="new-input-label"><b>FBO Cost</b></label>
695 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 695 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
696 </div> 696 </div>
697 <div class="pull-left" style="width: calc(100% - 110px);"> 697 <div class="pull-left" style="width: calc(100% - 110px);">
698 <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> 698 <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number />
699 </div> 699 </div>
700 <div class="clearfix"></div> 700 <div class="clearfix"></div>
701 </div> 701 </div>
702 </div> 702 </div>
703 <div class="clearfix"></div><br> 703 <div class="clearfix"></div><br>
704 704
705 <div class="col-xs-12"> 705 <div class="col-xs-12">
706 <div class="col-md-6"> 706 <div class="col-md-6">
707 <div class="pull-left" style="width: 110px;"> 707 <div class="pull-left" style="width: 110px;">
708 <label class="new-input-label"><b>Source</b></label> 708 <label class="new-input-label"><b>Source</b></label>
709 </div> 709 </div>
710 <div class="pull-left" style="width: calc(100% - 110px);"> 710 <div class="pull-left" style="width: calc(100% - 110px);">
711 <select class="form-control" ng-model="order.source" style="width: 100%;"> 711 <select class="form-control" ng-model="order.source" style="width: 100%;">
712 <option value="" disabled selected hidden>Select Source</option> 712 <option value="" disabled selected hidden>Select Source</option>
713 <option value="Tenant">Tenant</option> 713 <option value="Tenant">Tenant</option>
714 <option value="CAA">CAA</option> 714 <option value="CAA">CAA</option>
715 <option value="Tenant/CAA">Tenant/CAA</option> 715 <option value="Tenant/CAA">Tenant/CAA</option>
716 </select> 716 </select>
717 </div> 717 </div>
718 <div class="clearfix"></div> 718 <div class="clearfix"></div>
719 </div> 719 </div>
720 </div> 720 </div>
721 <div class="clearfix"></div> 721 <div class="clearfix"></div>
722 <br/> 722 <br/>
723 <div class="col-xs-12"> 723 <div class="col-xs-12">
724 724
725 725
726 <div class="col-md-6"> 726 <div class="col-md-6">
727 <div class="pull-left" style="width: 110px;"> 727 <div class="pull-left" style="width: 110px;">
728 <label class="new-input-label"><b>Certificate Type</b></label> 728 <label class="new-input-label"><b>Certificate Type</b></label>
729 </div> 729 </div>
730 <div class="pull-left" style="width: calc(100% - 110px);"> 730 <div class="pull-left" style="width: calc(100% - 110px);">
731 <select class="form-control" ng-model="order.certificateType" style="width: 100%;"> 731 <select class="form-control" ng-model="order.certificateType" style="width: 100%;">
732 <option value="" disabled selected hidden>Select...</option> 732 <option value="" disabled selected hidden>Select...</option>
733 <option value="corporate">Part 91 (Corporate)</option> 733 <option value="corporate">Part 91 (Corporate)</option>
734 <option value="charter">Part 135 (Charter)</option> 734 <option value="charter">Part 135 (Charter)</option>
735 <option value="scheduled">Part 121 (Scheduled)</option> 735 <option value="scheduled">Part 121 (Scheduled)</option>
736 <option value="military">Military</option> 736 <option value="military">Military</option>
737 <option value="government">Government</option> 737 <option value="government">Government</option>
738 </select> 738 </select>
739 </div> 739 </div>
740 <div class="clearfix"></div> 740 <div class="clearfix"></div>
741 </div> 741 </div>
742 <div class="col-md-6"> 742 <div class="col-md-6">
743 <div class="pull-left" style="width: 110px;"> 743 <div class="pull-left" style="width: 110px;">
744 <label class="new-input-label"><b>Status</b></label> 744 <label class="new-input-label"><b>Status</b></label>
745 </div> 745 </div>
746 <div class="pull-left" style="width: calc(100% - 110px);"> 746 <div class="pull-left" style="width: calc(100% - 110px);">
747 <select class="form-control" ng-model="order.status" style="width: 100%;"> 747 <select class="form-control" ng-model="order.status" style="width: 100%;">
748 <option value="" disabled selected hidden>pending</option> 748 <option value="" disabled selected hidden>pending</option>
749 <!-- <option value="pending">pending</option> --> 749 <option value="pending">pending</option>
750 <option value="invoiced">invoiced</option> 750 <option value="invoiced">invoiced</option>
751 <option value="paid">paid</option> 751 <option value="paid">paid</option>
752 <option value="cancelled">cancelled</option> 752 <!-- <option value="cancelled">cancelled</option>
753 <option value="archived">archived</option> 753 <option value="archived">archived</option> -->
754 </select> 754 </select>
755 </div> 755 </div>
756 <div class="clearfix"></div> 756 <div class="clearfix"></div>
757 </div> 757 </div>
758 </div> 758 </div>
759 <div class="clearfix"></div><br> 759 <div class="clearfix"></div><br>
760 760
761 </div> 761 </div>
762 </div> 762 </div>
763 </div> 763 </div>
764 </div> 764 </div>
765 </div> 765 </div>
766 </div> 766 </div>
767 <div class="modal-footer" style="border-top: 0;"> 767 <div class="modal-footer" style="border-top: 0;">
768 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> 768 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button>
769 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> 769 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button>
770 </div> 770 </div>
771 </div> 771 </div>
772 </div> 772 </div>
773 </div> 773 </div>
774 </form> 774 </form>
775 775
776 776
777 <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> 777 <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm">
778 <div class="modal-dialog modal-lg"> 778 <div class="modal-dialog modal-lg">
779 <div class="modal-content"> 779 <div class="modal-content">
780 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 780 <div class="modal-body step-1" data-step="1" style="padding: 0;">
781 <div> 781 <div>
782 <div class="row" style="margin: 0;"> 782 <div class="row" style="margin: 0;">
783 <div> 783 <div>
784 <div class="widget" style="margin-bottom: 0;"> 784 <div class="widget" style="margin-bottom: 0;">
785 <div class="widget-header"> 785 <div class="widget-header">
786 <i class="icon-pencil"></i> 786 <i class="icon-pencil"></i>
787 <i class="fa fa-tasks" aria-hidden="true"></i> 787 <i class="fa fa-tasks" aria-hidden="true"></i>
788 <h3>Update Fuel Order</h3> 788 <h3>Update Fuel Order</h3>
789 <div class="clearfix"></div> 789 <div class="clearfix"></div>
790 </div> 790 </div>
791 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 791 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
792 <div class="col-xs-12"> 792 <div class="col-xs-12">
793 <div class="col-xs-12"> 793 <div class="col-xs-12">
794 794
795 <div class="col-md-6"> 795 <div class="col-md-6">
796 <div class="pull-left" style="width: 110px;"> 796 <div class="pull-left" style="width: 110px;">
797 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> 797 <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label>
798 </div> 798 </div>
799 <div class="pull-left" style="width: calc(100% - 110px);"> 799 <div class="pull-left" style="width: calc(100% - 110px);">
800 <div style="width: 50%; float: left;"> 800 <div style="width: 50%; float: left;">
801 Date 801 Date
802 <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> 802 <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/>
803 </div> 803 </div>
804 <div style="width: 50%; float: left;"> 804 <div style="width: 50%; float: left;">
805 Time 805 Time
806 <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> 806 <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;">
807 <option ng-repeat="li in etaTimeList">{{li.time}}</option> 807 <option ng-repeat="li in etaTimeList">{{li.time}}</option>
808 </select> 808 </select>
809 809
810 </div> 810 </div>
811 </div> 811 </div>
812 <div class="clearfix"></div> 812 <div class="clearfix"></div>
813 </div> 813 </div>
814 <div class="col-md-6" style="margin-top: 25px;"> 814 <div class="col-md-6" style="margin-top: 25px;">
815 <div class="pull-left" style="width: 110px;"> 815 <div class="pull-left" style="width: 110px;">
816 <label class="new-input-label"><b>Volume</b></label> 816 <label class="new-input-label"><b>Volume</b></label>
817 </div> 817 </div>
818 <div class="pull-left" style="width: calc(100% - 110px);"> 818 <div class="pull-left" style="width: calc(100% - 110px);">
819 <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> 819 <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder="">
820 </div> 820 </div>
821 <div class="clearfix"></div> 821 <div class="clearfix"></div>
822 </div> 822 </div>
823 </div> 823 </div>
824 <div class="clearfix"></div><br> 824 <div class="clearfix"></div><br>
825 825
826 <div class="col-xs-12"> 826 <div class="col-xs-12">
827 827
828 <div class="col-md-6"> 828 <div class="col-md-6">
829 <div class="pull-left" style="width: 110px;"> 829 <div class="pull-left" style="width: 110px;">
830 <label class="new-input-label"><b>ETD</b></label> 830 <label class="new-input-label"><b>ETD</b></label>
831 </div> 831 </div>
832 <div class="pull-left" style="width: calc(100% - 110px);"> 832 <div class="pull-left" style="width: calc(100% - 110px);">
833 <div style="width: 50%; float: left;"> 833 <div style="width: 50%; float: left;">
834 <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> 834 <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/>
835 </div> 835 </div>
836 <div style="width: 50%; float: left;"> 836 <div style="width: 50%; float: left;">
837 <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> 837 <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;">
838 <option ng-repeat="list in etdTimeList">{{list.time}}</option> 838 <option ng-repeat="list in etdTimeList">{{list.time}}</option>
839 </select> 839 </select>
840 </div> 840 </div>
841 </div> 841 </div>
842 <div class="clearfix"></div> 842 <div class="clearfix"></div>
843 </div> 843 </div>
844 <div class="col-md-6"> 844 <div class="col-md-6">
845 <div class="pull-left" style="width: 110px;"> 845 <div class="pull-left" style="width: 110px;">
846 <label class="new-input-label"><b>Fuel on</b></label> 846 <label class="new-input-label"><b>Fuel on</b></label>
847 </div> 847 </div>
848 <div class="pull-left" style="width: calc(100% - 110px);"> 848 <div class="pull-left" style="width: calc(100% - 110px);">
849 <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> 849 <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;">
850 <option value="" disabled selected hidden>Select...</option> 850 <option value="" disabled selected hidden>Select...</option>
851 <option value="Arrival">Arrival</option> 851 <option value="Arrival">Arrival</option>
852 <option value="Departure">Departure</option> 852 <option value="Departure">Departure</option>
853 </select> 853 </select>
854 </div> 854 </div>
855 <div class="clearfix"></div> 855 <div class="clearfix"></div>
856 </div> 856 </div>
857 </div> 857 </div>
858 <div class="clearfix"></div><br> 858 <div class="clearfix"></div><br>
859 859
860 <div class="col-xs-12"> 860 <div class="col-xs-12">
861 861
862 <div class="col-md-6"> 862 <div class="col-md-6">
863 <div class="pull-left" style="width: 110px;"> 863 <div class="pull-left" style="width: 110px;">
864 <label class="new-input-label"><b>Company</b></label> 864 <label class="new-input-label"><b>Company</b></label>
865 </div> 865 </div>
866 <div class="pull-left" style="width: calc(100% - 110px);"> 866 <div class="pull-left" style="width: calc(100% - 110px);">
867 {{editdata.companyName}} 867 {{editdata.companyName}}
868 </div> 868 </div>
869 <div class="clearfix"></div> 869 <div class="clearfix"></div>
870 </div> 870 </div>
871 <div class="col-md-6"> 871 <div class="col-md-6">
872 <div class="pull-left" style="width: 110px;"> 872 <div class="pull-left" style="width: 110px;">
873 <label class="new-input-label"><b>Invoiced</b></label> 873 <label class="new-input-label"><b>Invoiced</b></label>
874 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 874 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
875 </div> 875 </div>
876 <div class="pull-left" style="width: calc(100% - 110px);"> 876 <div class="pull-left" style="width: calc(100% - 110px);">
877 <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> 877 <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder="">
878 </div> 878 </div>
879 <div class="clearfix"></div> 879 <div class="clearfix"></div>
880 </div> 880 </div>
881 881
882 </div> 882 </div>
883 <div class="clearfix"></div> 883 <div class="clearfix"></div>
884 <br/> 884 <br/>
885 885
886 886
887 <div class="col-xs-12"> 887 <div class="col-xs-12">
888 888
889 <div class="col-md-6"> 889 <div class="col-md-6">
890 <div class="pull-left" style="width: 110px;"> 890 <div class="pull-left" style="width: 110px;">
891 <label class="new-input-label"><b>Tail #</b></label> 891 <label class="new-input-label"><b>Tail #</b></label>
892 </div> 892 </div>
893 <div class="pull-left" style="width: calc(100% - 110px);"> 893 <div class="pull-left" style="width: calc(100% - 110px);">
894 {{editdata.aircraftName}} 894 {{editdata.aircraftName}}
895 </div> 895 </div>
896 <div class="clearfix"></div> 896 <div class="clearfix"></div>
897 </div> 897 </div>
898 <div class="col-md-6"> 898 <div class="col-md-6">
899 <div class="pull-left" style="width: 110px;"> 899 <div class="pull-left" style="width: 110px;">
900 <label class="new-input-label"><b>Total</b></label> 900 <label class="new-input-label"><b>Total</b></label>
901 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> 901 <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span>
902 </div> 902 </div>
903 <div class="pull-left" style="width: calc(100% - 110px);"> 903 <div class="pull-left" style="width: calc(100% - 110px);">
904 <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> 904 <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}">
905 </div> 905 </div>
906 <div class="clearfix"></div> 906 <div class="clearfix"></div>
907 </div> 907 </div>
908 </div> 908 </div>
909 <div class="clearfix"></div> 909 <div class="clearfix"></div>
910 <br/> 910 <br/>
911 <div class="col-xs-12"> 911 <div class="col-xs-12">
912 912
913 913
914 <div class="col-md-6"> 914 <div class="col-md-6">
915 <div class="pull-left" style="width: 110px;"> 915 <div class="pull-left" style="width: 110px;">
916 <label class="new-input-label"><b>Source</b></label> 916 <label class="new-input-label"><b>Source</b></label>
917 </div> 917 </div>
918 <div class="pull-left" style="width: calc(100% - 110px);"> 918 <div class="pull-left" style="width: calc(100% - 110px);">
919 <select class="form-control" ng-model="editdata.source" style="width: 100%;"> 919 <select class="form-control" ng-model="editdata.source" style="width: 100%;">
920 <option value="" disabled selected hidden>Select Source</option> 920 <option value="" disabled selected hidden>Select Source</option>
921 <option value="Tenant">Tenant</option> 921 <option value="Tenant">Tenant</option>
922 <option value="CAA">CAA</option> 922 <option value="CAA">CAA</option>
923 <option value="Tenant/CAA">Tenant/CAA</option> 923 <option value="Tenant/CAA">Tenant/CAA</option>
924 </select> 924 </select>
925 </div> 925 </div>
926 <div class="clearfix"></div> 926 <div class="clearfix"></div>
927 </div> 927 </div>
928 <div class="col-md-6"> 928 <div class="col-md-6">
929 <div class="pull-left" style="width: 110px;"> 929 <div class="pull-left" style="width: 110px;">
930 <label class="new-input-label"><b>Product</b></label> 930 <label class="new-input-label"><b>Product</b></label>
931 </div> 931 </div>
932 <div class="pull-left" style="width: calc(100% - 110px);"> 932 <div class="pull-left" style="width: calc(100% - 110px);">
933 {{editdata.productName}} 933 {{editdata.productName}}
934 </div> 934 </div>
935 <div class="clearfix"></div> 935 <div class="clearfix"></div>
936 </div> 936 </div>
937 </div> 937 </div>
938 <div class="clearfix"></div> 938 <div class="clearfix"></div>
939 <br/> 939 <br/>
940 940
941 <div class="col-xs-12"> 941 <div class="col-xs-12">
942 942
943 <div class="col-md-6"> 943 <div class="col-md-6">
944 <div class="pull-left" style="width: 110px;"> 944 <div class="pull-left" style="width: 110px;">
945 <label class="new-input-label"><b>Status</b></label> 945 <label class="new-input-label"><b>Status</b></label>
946 </div> 946 </div>
947 <div class="pull-left" style="width: calc(100% - 110px);"> 947 <div class="pull-left" style="width: calc(100% - 110px);">
948 <select class="form-control" ng-model="editdata.status" style="width: 100%;"> 948 <select class="form-control" ng-model="editdata.status" style="width: 100%;">
949 <option value="" disabled selected hidden>Select Status</option> 949 <option value="" disabled selected hidden>Select Status</option>
950 <option value="pending">pending</option> 950 <option value="pending">pending</option>
951 <option value="invoiced">invoiced</option> 951 <option value="invoiced">invoiced</option>
952 <option value="paid">paid</option> 952 <option value="paid">paid</option>
953 <option value="cancelled">cancelled</option> 953 <option value="cancelled">cancelled</option>
954 <option value="archived">archived</option> 954 <option value="archived">archived</option>
955 </select> 955 </select>
956 </div> 956 </div>
957 <div class="clearfix"></div> 957 <div class="clearfix"></div>
958 </div> 958 </div>
959 <div class="col-md-6"> 959 <div class="col-md-6">
960 <div class="pull-left" style="width: 110px;"> 960 <div class="pull-left" style="width: 110px;">
961 <label class="new-input-label"><b>Certificate Type</b></label> 961 <label class="new-input-label"><b>Certificate Type</b></label>
962 </div> 962 </div>
963 <div class="pull-left" style="width: calc(100% - 110px);"> 963 <div class="pull-left" style="width: calc(100% - 110px);">
964 <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> 964 <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required>
965 <option value="" disabled selected hidden>Select...</option> 965 <option value="" disabled selected hidden>Select...</option>
966 <option value="corporate">Part 91 (Corporate)</option> 966 <option value="corporate">Part 91 (Corporate)</option>
967 <option value="charter">Part 135 (Charter)</option> 967 <option value="charter">Part 135 (Charter)</option>
968 <option value="scheduled">Part 121 (Scheduled)</option> 968 <option value="scheduled">Part 121 (Scheduled)</option>
969 <option value="military">Military</option> 969 <option value="military">Military</option>
970 <option value="government">Government</option> 970 <option value="government">Government</option>
971 </select> 971 </select>
972 </div> 972 </div>
973 973
974 </div> 974 </div>
975 <div class="clearfix"></div> 975 <div class="clearfix"></div>
976 <br/> 976 <br/>
977 <div class="col-xs-12"> 977 <div class="col-xs-12">
978 </div> 978 </div>
979 <div class="clearfix"></div> 979 <div class="clearfix"></div>
980 <br/> 980 <br/>
981 <div class="col-xs-12"> 981 <div class="col-xs-12">
982 982
983 </div> 983 </div>
984 <div class="clearfix"></div> 984 <div class="clearfix"></div>
985 985
986 </div> 986 </div>
987 </div> 987 </div>
988 <div class="clearfix"></div> 988 <div class="clearfix"></div>
989 </div> 989 </div>
990 </div> 990 </div>
991 </div> 991 </div>
992 </div> 992 </div>
993 993
994 <div class="modal-footer" style="border-top: 0;"> 994 <div class="modal-footer" style="border-top: 0;">
995 <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> 995 <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button>
996 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> 996 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button>
997 </div> 997 </div>
998 </div> 998 </div>
999 </div> 999 </div>
1000 </div> 1000 </div>
1001 </form> 1001 </form>
1002 1002
1003 <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> 1003 <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm">
1004 <div class="modal-dialog modal-xs"> 1004 <div class="modal-dialog modal-xs">
1005 <div class="modal-content"> 1005 <div class="modal-content">
1006 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 1006 <div class="modal-body step-1" data-step="1" style="padding: 0;">
1007 <div> 1007 <div>
1008 <div class="row" style="margin: 0;"> 1008 <div class="row" style="margin: 0;">
1009 <div> 1009 <div>
1010 <div class="widget" style="margin-bottom: 0;"> 1010 <div class="widget" style="margin-bottom: 0;">
1011 <div class="widget-header"> 1011 <div class="widget-header">
1012 <i class="icon-pencil"></i> 1012 <i class="icon-pencil"></i>
1013 <i class="fa fa-tasks" aria-hidden="true"></i> 1013 <i class="fa fa-tasks" aria-hidden="true"></i>
1014 <h3>Upload Attachment</h3> 1014 <h3>Upload Attachment</h3>
1015 <div class="clearfix"></div> 1015 <div class="clearfix"></div>
1016 </div> 1016 </div>
1017 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 1017 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
1018 <div class="col-xs-6"> 1018 <div class="col-xs-6">
1019 <div class="col-xs-6"> 1019 <div class="col-xs-6">
1020 1020
1021 <div class="col-md-6"> 1021 <div class="col-md-6">
1022 <div class="pull-left" style="width: 110px;"> 1022 <div class="pull-left" style="width: 110px;">
1023 <label class="new-input-label"><b>Upload</b></label> 1023 <label class="new-input-label"><b>Upload</b></label>
1024 <br> 1024 <br>
1025 <br> 1025 <br>
1026 </div> 1026 </div>
1027 <div class="pull-left" style="width: calc(100% - 110px);"> 1027 <div class="pull-left" style="width: calc(100% - 110px);">
1028 <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> 1028 <input type="file" accept=".pdf" file-model = "uploadFile.attachment">
1029 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> 1029 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>-->
1030 </div> 1030 </div>
1031 <div class="clearfix"></div> 1031 <div class="clearfix"></div>
1032 </div> 1032 </div>
1033 </div> 1033 </div>
1034 <div class="clearfix"></div><br> 1034 <div class="clearfix"></div><br>
1035 1035
1036 </div> 1036 </div>
1037 </div> 1037 </div>
1038 <div class="clearfix"></div> 1038 <div class="clearfix"></div>
1039 </div> 1039 </div>
1040 </div> 1040 </div>
1041 </div> 1041 </div>
1042 </div> 1042 </div>
1043 1043
1044 <div class="modal-footer" style="border-top: 0;"> 1044 <div class="modal-footer" style="border-top: 0;">
1045 <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> 1045 <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button>
1046 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> 1046 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button>
1047 </div> 1047 </div>
1048 </div> 1048 </div>
1049 </div> 1049 </div>
1050 </div> 1050 </div>
1051 </form> 1051 </form>
1052 1052
1053 <div class="customConfirmPopBackdrop" id="delete1"> 1053 <div class="customConfirmPopBackdrop" id="delete1">
1054 <div class="customModalInner" style="max-width: 400px;"> 1054 <div class="customModalInner" style="max-width: 400px;">
1055 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 1055 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
1056 <table> 1056 <table>
1057 <tr> 1057 <tr>
1058 <td> 1058 <td>
1059 <img src="img/info.png" style="width: 50px;"> 1059 <img src="img/info.png" style="width: 50px;">
1060 </td> 1060 </td>
1061 <td> 1061 <td>
1062 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> 1062 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p>
1063 </td> 1063 </td>
1064 </tr> 1064 </tr>
1065 </table> 1065 </table>
1066 </div> 1066 </div>
1067 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 1067 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
1068 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> 1068 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button>
1069 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> 1069 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button>
1070 </div> 1070 </div>
1071 </div> 1071 </div>
1072 </div> 1072 </div>
1073 1073
1074 1074
1075 1075
1076 <div class="myLoader" ng-show="showLoader"> 1076 <div class="myLoader" ng-show="showLoader">
1077 <img src="../img/hourglass.gif" width="50px;"> 1077 <img src="../img/hourglass.gif" width="50px;">
1078 </div> 1078 </div>
1079 <script src="js/multi-step-modal.js"></script> 1079 <script src="js/multi-step-modal.js"></script>
1080 <script> 1080 <script>
1081 sendEvent = function(sel, step) { 1081 sendEvent = function(sel, step) {
1082 $(sel).trigger('next.m.' + step); 1082 $(sel).trigger('next.m.' + step);
1083 } 1083 }
1084 </script> 1084 </script>
1085 1085
1086 <script> 1086 <script>
1087 angular.module("KendoDemos", [ "kendo.directives" ]) 1087 angular.module("KendoDemos", [ "kendo.directives" ])
1088 .controller("MyCtrl", function($scope){ 1088 .controller("MyCtrl", function($scope){
1089 $scope.getType = function(x) { 1089 $scope.getType = function(x) {
1090 return typeof x; 1090 return typeof x;
1091 }; 1091 };
1092 $scope.isDate = function(x) { 1092 $scope.isDate = function(x) {
1093 return x instanceof Date; 1093 return x instanceof Date;
1094 }; 1094 };
1095 }) 1095 })
1096 </script> 1096 </script>