Commit 4728ddfddf874e8cf9fbfe75932465ab867439f6

Authored by Swarn Singh
1 parent 2f9fd878f9
Exists in master

schedule module fixed, apply immediatlly fuel price created

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: 25px; 41 height: 25px;
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 .custom-widget-content .btn-xs{ 65 .custom-widget-content .btn-xs{
66 padding: 3px 5px; 66 padding: 3px 5px;
67 } 67 }
68 .fc-event{ 68 .fc-event{
69 background-color: #ff9900 !important; 69 background-color: #ff9900 !important;
70 color: #fff !important; 70 color: #fff !important;
71 border: 1px solid #ff9900 !important; 71 border: 1px solid #ff9900 !important;
72 padding: 5px;
73 font-size: 14px;
74 border-radius: 0 !important;
72 } 75 }
73 .pull-right-color{ 76 .pull-right-color{
74 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 77 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
75 } 78 }
76 .pull-right-setup{ 79 .pull-right-setup{
77 margin-bottom: 10px; 80 margin-bottom: 10px;
78 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%); 81 background-image: linear-gradient(to bottom, #1c84c6 0%, #1c84c6 100%);
79 } 82 }
80 .Airport{ 83 .Airport{
81 padding-top: 5px; 84 padding-top: 5px;
82 } 85 }
83 .src-image{ 86 .src-image{
84 width: 50px; 87 width: 50px;
85 height: 50px; 88 height: 50px;
86 } 89 }
87 .Accept{ 90 .Accept{
88 padding-top: 25px; 91 padding-top: 25px;
89 } 92 }
90 .dis{ 93 .dis{
91 float: left; 94 float: left;
92 margin-right:100px; 95 margin-right:100px;
93 } 96 }
94 /*.email-password{ 97 /*.email-password{
95 width: 40px; 98 width: 40px;
96 height: 24px; 99 height: 24px;
97 }*/ 100 }*/
98 .email-password-icon{ 101 .email-password-icon{
99 width: 10px; 102 width: 10px;
100 height: 10px; 103 height: 10px;
101 } 104 }
102 @media( max-width: 768px;){ 105 @media( max-width: 768px;){
103 .btn{ 106 .btn{
104 font-size: 10px !important; 107 font-size: 10px !important;
105 } 108 }
106 .dis{ 109 .dis{
107 float: none; 110 float: none;
108 margin-right: 0px; 111 margin-right: 0px;
109 } 112 }
110 } 113 }
111 .Search-tabs{ 114 .Search-tabs{
112 border-bottom: 0px solid #ddd; */ 115 border-bottom: 0px solid #ddd; */
113 } 116 }
114 117
115 .customer-table table{ 118 .customer-table table{
116 width: 100%; 119 width: 100%;
117 } 120 }
118 .customer-table input{ 121 .customer-table input{
119 border-radius: 0; 122 border-radius: 0;
120 box-shadow: none; 123 box-shadow: none;
121 border: 1px solid #e4e3e3; 124 border: 1px solid #e4e3e3;
122 padding: 0px; 125 padding: 0px;
123 font-size: 10px; 126 font-size: 10px;
124 display: -webkit-inline-box; 127 display: -webkit-inline-box;
125 display: inline-box; 128 display: inline-box;
126 height: 31px; 129 height: 31px;
127 } 130 }
128 .customer-table select{ 131 .customer-table select{
129 border-radius: 0; 132 border-radius: 0;
130 box-shadow: none; 133 box-shadow: none;
131 border: 1px solid #e4e3e3; 134 border: 1px solid #e4e3e3;
132 padding: 0px; 135 padding: 0px;
133 font-size: 10px; 136 font-size: 10px;
134 height: 31px; 137 height: 31px;
135 display: -webkit-inline-box; 138 display: -webkit-inline-box;
136 display: inline-box; 139 display: inline-box;
137 } 140 }
138 .customer-table th > label{ 141 .customer-table th > label{
139 font-weight: bold; 142 font-weight: bold;
140 padding: 10px 5px 2px 5px; 143 padding: 10px 5px 2px 5px;
141 margin-bottom: 0; 144 margin-bottom: 0;
142 } 145 }
143 .customer-table td{ 146 .customer-table td{
144 padding: 5px !important; 147 padding: 5px !important;
145 height: auto !important; 148 height: auto !important;
146 vertical-align: middle !important; 149 vertical-align: middle !important;
147 } 150 }
148 .customer-table td > select{ 151 .customer-table td > select{
149 height: 22px !important; 152 height: 22px !important;
150 } 153 }
151 .customer-table td > button{ 154 .customer-table td > button{
152 font-size: 10px; 155 font-size: 10px;
153 } 156 }
154 157
155 /*.new-input-label{ 158 /*.new-input-label{
156 margin-bottom: 0; 159 margin-bottom: 0;
157 line-height: 34px; 160 line-height: 34px;
158 }*/ 161 }*/
159 162
160 163
161 164
162 165
163 166
164 /* new custom css for accrodian tabs */ 167 /* new custom css for accrodian tabs */
165 168
166 .customAccordianHeader{ 169 .customAccordianHeader{
167 width: 100%; 170 width: 100%;
168 height: auto; 171 height: auto;
169 background-color: #F3F3F3; 172 background-color: #F3F3F3;
170 border: 1px solid #ddd; 173 border: 1px solid #ddd;
171 color: #333; 174 color: #333;
172 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); 175 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
173 border-radius: 3px 3px 3px 3px; 176 border-radius: 3px 3px 3px 3px;
174 padding: 10px 15px; 177 padding: 10px 15px;
175 margin-top: 10px; 178 margin-top: 10px;
176 } 179 }
177 180
178 .customAccordianHeader.customActive{ 181 .customAccordianHeader.customActive{
179 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b)); 182 background-image: -webkit-gradient(linear, left 0%, left 100%, from(#555555), to(#3b3b3b));
180 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%); 183 background-image: linear-gradient(to bottom, #555555 0%, #3b3b3b 100%);
181 background-repeat: repeat-x; 184 background-repeat: repeat-x;
182 border: 1px solid #222222; 185 border: 1px solid #222222;
183 color: #FFF; 186 color: #FFF;
184 border-radius: 3px 3px 0 0; 187 border-radius: 3px 3px 0 0;
185 } 188 }
186 .customAccordianHeader > span{ 189 .customAccordianHeader > span{
187 font-size: 15px; 190 font-size: 15px;
188 line-height: 22px; 191 line-height: 22px;
189 float: left; 192 float: left;
190 } 193 }
191 .customAccordianHeader .btn{ 194 .customAccordianHeader .btn{
192 padding: 2px 12px; 195 padding: 2px 12px;
193 } 196 }
194 .customAccordianHeader > .form-control{ 197 .customAccordianHeader > .form-control{
195 outline: none; 198 outline: none;
196 box-shadow: none; 199 box-shadow: none;
197 } 200 }
198 .customAccordianHeader > select.form-control{ 201 .customAccordianHeader > select.form-control{
199 width: 150px; 202 width: 150px;
200 height: 26px; 203 height: 26px;
201 padding: 0 6px; 204 padding: 0 6px;
202 float: left; 205 float: left;
203 } 206 }
204 .customAccordianHeader > select.form-control[disabled]{ 207 .customAccordianHeader > select.form-control[disabled]{
205 border: none; 208 border: none;
206 -webkit-appearance: none; 209 -webkit-appearance: none;
207 -moz-appearance: none; 210 -moz-appearance: none;
208 appearance: none; 211 appearance: none;
209 background-color: transparent; 212 background-color: transparent;
210 color: #f90; 213 color: #f90;
211 width: auto; 214 width: auto;
212 } 215 }
213 .customAccordianHeader > input.form-control{ 216 .customAccordianHeader > input.form-control{
214 width: 70px; 217 width: 70px;
215 height: 26px; 218 height: 26px;
216 padding: 0 6px; 219 padding: 0 6px;
217 float: left; 220 float: left;
218 } 221 }
219 .customAccordianHeader > input.form-control[disabled]{ 222 .customAccordianHeader > input.form-control[disabled]{
220 border: none; 223 border: none;
221 -webkit-appearance: none; 224 -webkit-appearance: none;
222 -moz-appearance: none; 225 -moz-appearance: none;
223 appearance: none; 226 appearance: none;
224 background-color: transparent; 227 background-color: transparent;
225 color: #333; 228 color: #333;
226 } 229 }
227 .customAccordianTabBody{ 230 .customAccordianTabBody{
228 width: 100%; 231 width: 100%;
229 height: auto; 232 height: auto;
230 padding: 15px; 233 padding: 15px;
231 border: 1px solid #ddd; 234 border: 1px solid #ddd;
232 border-top: 0; 235 border-top: 0;
233 border-radius: 0 0 3px 3px; 236 border-radius: 0 0 3px 3px;
234 } 237 }
235 .customTableWithFilter{ 238 .customTableWithFilter{
236 width: auto; 239 width: auto;
237 height: auto; 240 height: auto;
238 } 241 }
239 .customTableWithFilter th{ 242 .customTableWithFilter th{
240 padding: 5px; 243 padding: 5px;
241 background-color: #f3f3f3; 244 background-color: #f3f3f3;
242 border: 1px solid #ddd; 245 border: 1px solid #ddd;
243 } 246 }
244 .customTableWithFilter th i{ 247 .customTableWithFilter th i{
245 margin-top: 3px; 248 margin-top: 3px;
246 } 249 }
247 .customTableWithFilter th span{ 250 .customTableWithFilter th span{
248 font-size: 11px; 251 font-size: 11px;
249 color: #222; 252 color: #222;
250 } 253 }
251 .customTableWithFilter th input{ 254 .customTableWithFilter th input{
252 width: 50px; 255 width: 50px;
253 } 256 }
254 .customTableWithFilter td{ 257 .customTableWithFilter td{
255 padding: 5px; 258 padding: 5px;
256 border: 1px solid #ddd; 259 border: 1px solid #ddd;
257 } 260 }
258 .customTableWithFilter td span{ 261 .customTableWithFilter td span{
259 font-size: 11px; 262 font-size: 11px;
260 } 263 }
261 .customTableWithFilter td span:first-child{ 264 .customTableWithFilter td span:first-child{
262 color: #449d44; 265 color: #449d44;
263 font-weight: bold; 266 font-weight: bold;
264 } 267 }
265 .customTableWithFilter td span:last-child{ 268 .customTableWithFilter td span:last-child{
266 color: #c9302c; 269 color: #c9302c;
267 font-style: italic; 270 font-style: italic;
268 font-weight: bold; 271 font-weight: bold;
269 } 272 }
270 .customTableWithFilter td .tierTextBox{ 273 .customTableWithFilter td .tierTextBox{
271 width: 70px; 274 width: 70px;
272 } 275 }
273 .customTableWithFilter .addTierButton{ 276 .customTableWithFilter .addTierButton{
274 color: #fff; 277 color: #fff;
275 background-color: #2196f3; 278 background-color: #2196f3;
276 border: none; 279 border: none;
277 padding: 3px 5px; 280 padding: 3px 5px;
278 } 281 }
279 .customTableWithFilter td .fa-trash-o{ 282 .customTableWithFilter td .fa-trash-o{
280 color: #fff; 283 color: #fff;
281 background-color: #c9302c; 284 background-color: #c9302c;
282 padding: 5px; 285 padding: 5px;
283 border-radius: 3px; 286 border-radius: 3px;
284 cursor: pointer; 287 cursor: pointer;
285 } 288 }
286 .resizeTextarea{ 289 .resizeTextarea{
287 resize: vertical; 290 resize: vertical;
288 margin-top: 20px; 291 margin-top: 20px;
289 } 292 }
290 293
291 294
292 295
293 296
294 297
295 .new-widget-content{ 298 .new-widget-content{
296 padding: 0 0 0 0 !important; 299 padding: 0 0 0 0 !important;
297 } 300 }
298 .new-tab-heading{ 301 .new-tab-heading{
299 padding: 5px; 302 padding: 5px;
300 color: #333; 303 color: #333;
301 background-color: #fcfcfc; 304 background-color: #fcfcfc;
302 border-bottom: 1px solid #d5d5d5; 305 border-bottom: 1px solid #d5d5d5;
303 border-right: 1px solid #d5d5d5; 306 border-right: 1px solid #d5d5d5;
304 } 307 }
305 .new-tab-body{ 308 .new-tab-body{
306 border-right: 1px solid #d5d5d5; 309 border-right: 1px solid #d5d5d5;
307 border-bottom: 1px solid #d5d5d5; 310 border-bottom: 1px solid #d5d5d5;
308 padding-left: 15px; 311 padding-left: 15px;
309 padding-bottom: 5px; 312 padding-bottom: 5px;
310 } 313 }
311 .new-tab-heading i.fa{ 314 .new-tab-heading i.fa{
312 font-size: 16px; 315 font-size: 16px;
313 cursor: pointer; 316 cursor: pointer;
314 } 317 }
315 .new-tab-heading span{ 318 .new-tab-heading span{
316 font-size: 14px; 319 font-size: 14px;
317 margin-left: 5px; 320 margin-left: 5px;
318 } 321 }
319 .new-tab-heading i.fa-plus-circle{ 322 .new-tab-heading i.fa-plus-circle{
320 color: #067dfc; 323 color: #067dfc;
321 } 324 }
322 .new-tab-heading i.fa-minus-circle{ 325 .new-tab-heading i.fa-minus-circle{
323 color: #d00d09; 326 color: #d00d09;
324 } 327 }
325 .new-tab-body-th{ 328 .new-tab-body-th{
326 color: #333; 329 color: #333;
327 } 330 }
328 .new-tab-body-th > div{ 331 .new-tab-body-th > div{
329 font-size: 12px; 332 font-size: 12px;
330 font-weight: bold; 333 font-weight: bold;
331 padding-right: 5px; 334 padding-right: 5px;
332 padding-left: 5px; 335 padding-left: 5px;
333 text-align: center; 336 text-align: center;
334 } 337 }
335 .new-tab-body-th > div:first-child{ 338 .new-tab-body-th > div:first-child{
336 font-size: 14px; 339 font-size: 14px;
337 font-weight: bold; 340 font-weight: bold;
338 text-align: left; 341 text-align: left;
339 } 342 }
340 .new-tab-body-td i.fa-plus-circle{ 343 .new-tab-body-td i.fa-plus-circle{
341 color: #067dfc; 344 color: #067dfc;
342 } 345 }
343 .new-tab-body-td i.fa-minus-circle{ 346 .new-tab-body-td i.fa-minus-circle{
344 color: #d00d09; 347 color: #d00d09;
345 } 348 }
346 .new-tab-body-td input{ 349 .new-tab-body-td input{
347 width: 50px; 350 width: 50px;
348 height: 24px; 351 height: 24px;
349 } 352 }
350 .new-tab-body-td .fa{ 353 .new-tab-body-td .fa{
351 font-size: 14px; 354 font-size: 14px;
352 } 355 }
353 .new-tab-body-td > div:first-child > div{ 356 .new-tab-body-td > div:first-child > div{
354 padding-right: 5px; 357 padding-right: 5px;
355 padding-left: 5px; 358 padding-left: 5px;
356 text-align: center; 359 text-align: center;
357 } 360 }
358 .new-tab-body-td > div:first-child > div:first-child{ 361 .new-tab-body-td > div:first-child > div:first-child{
359 text-align: left; 362 text-align: left;
360 } 363 }
361 .appliesTableHeading{ 364 .appliesTableHeading{
362 border: 1px solid #d5d5d5; 365 border: 1px solid #d5d5d5;
363 padding: 5px; 366 padding: 5px;
364 color: #333; 367 color: #333;
365 font-weight: bold; 368 font-weight: bold;
366 background-color: #fcfcfc; 369 background-color: #fcfcfc;
367 margin: 10px 0 0 0; 370 margin: 10px 0 0 0;
368 } 371 }
369 .appliesTableBody{ 372 .appliesTableBody{
370 border: 1px solid #d5d5d5; 373 border: 1px solid #d5d5d5;
371 border-top: 0; 374 border-top: 0;
372 background-color: #ffffe0; 375 background-color: #ffffe0;
373 margin-bottom: 10px; 376 margin-bottom: 10px;
374 height: auto; 377 height: auto;
375 } 378 }
376 .appliesTableBody > div.firstDiv{ 379 .appliesTableBody > div.firstDiv{
377 height: 100px; 380 height: 100px;
378 float: left; 381 float: left;
379 width: 40%; 382 width: 40%;
380 border-right: 1px solid #d5d5d5; 383 border-right: 1px solid #d5d5d5;
381 overflow: auto; 384 overflow: auto;
382 padding: 5px; 385 padding: 5px;
383 } 386 }
384 .appliesTableBody > div.lastDiv{ 387 .appliesTableBody > div.lastDiv{
385 width: 59%; 388 width: 59%;
386 height: 100px; 389 height: 100px;
387 padding: 5px; 390 padding: 5px;
388 float: left; 391 float: left;
389 } 392 }
390 .appliesTableBody > div.lastDiv textarea{ 393 .appliesTableBody > div.lastDiv textarea{
391 width: 40%; 394 width: 40%;
392 height: 60px; 395 height: 60px;
393 margin: 15px 0; 396 margin: 15px 0;
394 resize: none; 397 resize: none;
395 float: left; 398 float: left;
396 } 399 }
397 .reportedByTag{ 400 .reportedByTag{
398 width: 60%; 401 width: 60%;
399 height: 80px; 402 height: 80px;
400 border-top: 10px solid #393; 403 border-top: 10px solid #393;
401 border-left: 10px solid #6c6; 404 border-left: 10px solid #6c6;
402 border-radius: 5px 0 0 5px; 405 border-radius: 5px 0 0 5px;
403 background-color: #d7d7d7; 406 background-color: #d7d7d7;
404 float: right; 407 float: right;
405 position: relative; 408 position: relative;
406 right: -13px; 409 right: -13px;
407 margin-top: 5px; 410 margin-top: 5px;
408 font-size: 11px; 411 font-size: 11px;
409 } 412 }
410 .confirmedTag{ 413 .confirmedTag{
411 background-color: #393; 414 background-color: #393;
412 color: #fff; 415 color: #fff;
413 -webkit-transform: rotate(-90deg); 416 -webkit-transform: rotate(-90deg);
414 -moz-transform: rotate(-90deg); 417 -moz-transform: rotate(-90deg);
415 -o-transform: rotate(-90deg); 418 -o-transform: rotate(-90deg);
416 -ms-transform: rotate(-90deg); 419 -ms-transform: rotate(-90deg);
417 transform: rotate(-90deg); 420 transform: rotate(-90deg);
418 position: absolute; 421 position: absolute;
419 bottom: 25px; 422 bottom: 25px;
420 left: -24px; 423 left: -24px;
421 width: 71px; 424 width: 71px;
422 text-align: center; 425 text-align: center;
423 font-size: 11px; 426 font-size: 11px;
424 } 427 }
425 .reportedByTag table{ 428 .reportedByTag table{
426 margin-left: 27px; 429 margin-left: 27px;
427 width: calc(100% - 27px); 430 width: calc(100% - 27px);
428 } 431 }
429 .reportedByTag table td{ 432 .reportedByTag table td{
430 font-size: 11px; 433 font-size: 11px;
431 text-align: center; 434 text-align: center;
432 font-weight: bold; 435 font-weight: bold;
433 } 436 }
434 .reportedByTag table tr:last-child td{ 437 .reportedByTag table tr:last-child td{
435 text-align: left; 438 text-align: left;
436 font-weight: normal; 439 font-weight: normal;
437 font-size: 10px; 440 font-size: 10px;
438 } 441 }
439 .feeManagerRight{ 442 .feeManagerRight{
440 min-height: 70px; 443 min-height: 70px;
441 position: relative; 444 position: relative;
442 } 445 }
443 .feeManagerRight div{ 446 .feeManagerRight div{
444 position: absolute; 447 position: absolute;
445 bottom: 0; 448 bottom: 0;
446 width: 100%; 449 width: 100%;
447 } 450 }
448 .new-tab-body-td{ 451 .new-tab-body-td{
449 padding: 5px 0; 452 padding: 5px 0;
450 } 453 }
451 454
452 /* new checkbox slide css */ 455 /* new checkbox slide css */
453 456
454 .onoffswitch { 457 .onoffswitch {
455 position: relative; width: 80px; 458 position: relative; width: 80px;
456 -webkit-user-select:none; 459 -webkit-user-select:none;
457 -moz-user-select:none; 460 -moz-user-select:none;
458 -ms-user-select: none; 461 -ms-user-select: none;
459 margin: auto; 462 margin: auto;
460 } 463 }
461 .onoffswitch-checkbox { 464 .onoffswitch-checkbox {
462 display: none; 465 display: none;
463 } 466 }
464 .onoffswitch-label { 467 .onoffswitch-label {
465 display: block; 468 display: block;
466 overflow: hidden; 469 overflow: hidden;
467 cursor: pointer; 470 cursor: pointer;
468 border: 2px solid #999999; 471 border: 2px solid #999999;
469 border-radius: 0px; 472 border-radius: 0px;
470 } 473 }
471 .onoffswitch-inner { 474 .onoffswitch-inner {
472 display: block; 475 display: block;
473 width: 200%; 476 width: 200%;
474 margin-left: -100%; 477 margin-left: -100%;
475 transition: margin 0.3s ease-in 0s; 478 transition: margin 0.3s ease-in 0s;
476 } 479 }
477 .onoffswitch-inner:before, .onoffswitch-inner:after { 480 .onoffswitch-inner:before, .onoffswitch-inner:after {
478 display: block; 481 display: block;
479 float: left; 482 float: left;
480 width: 50%; 483 width: 50%;
481 height: 18px; 484 height: 18px;
482 padding: 0; 485 padding: 0;
483 line-height: 18px; 486 line-height: 18px;
484 font-size: 10px; 487 font-size: 10px;
485 color: white; 488 color: white;
486 font-family: Trebuchet, Arial, sans-serif; 489 font-family: Trebuchet, Arial, sans-serif;
487 font-weight: bold; 490 font-weight: bold;
488 box-sizing: border-box; 491 box-sizing: border-box;
489 } 492 }
490 .onoffswitch-inner:before { 493 .onoffswitch-inner:before {
491 content: "Include"; 494 content: "Include";
492 padding-left: 5px; 495 padding-left: 5px;
493 background-color: #016ADB; color: #FFFFFF; 496 background-color: #016ADB; color: #FFFFFF;
494 text-align: left; 497 text-align: left;
495 } 498 }
496 .onoffswitch-inner:after { 499 .onoffswitch-inner:after {
497 content: "Exclude"; 500 content: "Exclude";
498 padding-right: 5px; 501 padding-right: 5px;
499 background-color: ; color: #333333; 502 background-color: ; color: #333333;
500 text-align: right; 503 text-align: right;
501 } 504 }
502 .onoffswitch-switch { 505 .onoffswitch-switch {
503 display: block; 506 display: block;
504 width: 25px; 507 width: 25px;
505 margin: -3.5px; 508 margin: -3.5px;
506 background: #FFFFFF; 509 background: #FFFFFF;
507 position: absolute; 510 position: absolute;
508 top: 0; 511 top: 0;
509 bottom: 0; 512 bottom: 0;
510 right: 58px; 513 right: 58px;
511 border: 2px solid #999999; 514 border: 2px solid #999999;
512 border-radius: 0px; 515 border-radius: 0px;
513 transition: all 0.3s ease-in 0s; 516 transition: all 0.3s ease-in 0s;
514 } 517 }
515 .onoffswitch-switch i{ 518 .onoffswitch-switch i{
516 line-height: 25px; 519 line-height: 25px;
517 } 520 }
518 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { 521 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
519 margin-left: 0; 522 margin-left: 0;
520 } 523 }
521 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { 524 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
522 right: 0px; 525 right: 0px;
523 } 526 }
524 .onoffswitch-checkbox fa-check{ 527 .onoffswitch-checkbox fa-check{
525 color: #00ff00; 528 color: #00ff00;
526 } 529 }
527 .onoffswitch-checkbox fa-times{ 530 .onoffswitch-checkbox fa-times{
528 color: #ff0000; 531 color: #ff0000;
529 } 532 }
530 533
531 .newButtons{ 534 .newButtons{
532 background-color: #fff; 535 background-color: #fff;
533 border-radius: 10px; 536 border-radius: 10px;
534 color: #333; 537 color: #333;
535 border: 1px solid #eee; 538 border: 1px solid #eee;
536 box-shadow: 5px 5px 6px rgba(0,0,0,0.3); 539 box-shadow: 5px 5px 6px rgba(0,0,0,0.3);
537 padding: 6px 15px; 540 padding: 6px 15px;
538 margin-right: 10px; 541 margin-right: 10px;
539 } 542 }
540 .newButtons:disabled{ 543 .newButtons:disabled{
541 background-color: #eee; 544 background-color: #eee;
542 } 545 }
543 *{ 546 *{
544 outline: none; 547 outline: none;
545 } 548 }
546 549
547 550
548 /* my custom modal */ 551 /* my custom modal */
549 552
550 .customBackdrop{ 553 .customBackdrop{
551 position: fixed; 554 position: fixed;
552 background-color: rgba(0, 0, 0, 0.15); 555 background-color: rgba(0, 0, 0, 0.15);
553 top: 0; 556 top: 0;
554 left: 0; 557 left: 0;
555 width: 100%; 558 width: 100%;
556 height: 100%; 559 height: 100%;
557 z-index: 999; 560 z-index: 999;
558 } 561 }
559 .customModalInner{ 562 .customModalInner{
560 width: 100%; 563 width: 100%;
561 max-width: 500px; 564 max-width: 500px;
562 height: 200px; 565 height: 200px;
563 top: 15%; 566 top: 15%;
564 position: relative; 567 position: relative;
565 margin: auto; 568 margin: auto;
566 } 569 }
567 .customModelHead, .customModelFooter{ 570 .customModelHead, .customModelFooter{
568 width: 100%; 571 width: 100%;
569 background-color: #fafafa; 572 background-color: #fafafa;
570 border-bottom: 1px solid #ccc; 573 border-bottom: 1px solid #ccc;
571 color: #333; 574 color: #333;
572 padding: 10px; 575 padding: 10px;
573 } 576 }
574 .customModelFooter{ 577 .customModelFooter{
575 border-top: 1px solid #ccc; 578 border-top: 1px solid #ccc;
576 } 579 }
577 .customModelBody{ 580 .customModelBody{
578 width: 100%; 581 width: 100%;
579 height: auto; 582 height: auto;
580 background-color: #fff; 583 background-color: #fff;
581 color: #333; 584 color: #333;
582 padding: 10px; 585 padding: 10px;
583 } 586 }
584 .customModelHead p{ 587 .customModelHead p{
585 margin-bottom: 0; 588 margin-bottom: 0;
586 font-size: 14px; 589 font-size: 14px;
587 } 590 }
588 .customModelFooter button{ 591 .customModelFooter button{
589 border: 1px solid #ccc; 592 border: 1px solid #ccc;
590 } 593 }
591 .customModelFooter input[type="submit"]{ 594 .customModelFooter input[type="submit"]{
592 background-color: #6ad46a; 595 background-color: #6ad46a;
593 border: 1px solid #ccc; 596 border: 1px solid #ccc;
594 } 597 }
595 598
596 599
597 /* custom confirmation model */ 600 /* custom confirmation model */
598 601
599 602
600 .customConfirmPopBackdrop{ 603 .customConfirmPopBackdrop{
601 position: fixed; 604 position: fixed;
602 background-color: rgba(0, 0, 0, 0.3); 605 background-color: rgba(0, 0, 0, 0.3);
603 top: 0; 606 top: 0;
604 left: 0; 607 left: 0;
605 width: 100%; 608 width: 100%;
606 height: 100%; 609 height: 100%;
607 z-index: 999999999; 610 z-index: 999999999;
608 display: none; 611 display: none;
609 } 612 }
610 .customConfirmPopBackdrop .customModalInner{ 613 .customConfirmPopBackdrop .customModalInner{
611 top: 30%; 614 top: 30%;
612 } 615 }
613 616
614 617
615 618
616 /* tier list table */ 619 /* tier list table */
617 620
618 .tierListWrap{ 621 .tierListWrap{
619 width: 120px; 622 width: 120px;
620 height: auto; 623 height: auto;
621 float: left; 624 float: left;
622 } 625 }
623 .tierListHead{ 626 .tierListHead{
624 width: 100%; 627 width: 100%;
625 padding: 5px; 628 padding: 5px;
626 background-color: #f3f3f3; 629 background-color: #f3f3f3;
627 border: 1px solid #ddd; 630 border: 1px solid #ddd;
628 border-right: none; 631 border-right: none;
629 } 632 }
630 .tierListBody{ 633 .tierListBody{
631 width: 100%; 634 width: 100%;
632 padding: 5px; 635 padding: 5px;
633 border: 1px solid #ddd; 636 border: 1px solid #ddd;
634 border-top: none; 637 border-top: none;
635 border-right: none; 638 border-right: none;
636 } 639 }
637 .minTierSpan{ 640 .minTierSpan{
638 color: #449d44; 641 color: #449d44;
639 font-weight: bold; 642 font-weight: bold;
640 font-size: 11px; 643 font-size: 11px;
641 } 644 }
642 .maxTierSpan{ 645 .maxTierSpan{
643 color: #c9302c; 646 color: #c9302c;
644 font-style: italic; 647 font-style: italic;
645 font-size: 11px; 648 font-size: 11px;
646 font-weight: bold; 649 font-weight: bold;
647 } 650 }
648 .tierHeadingSpan{ 651 .tierHeadingSpan{
649 font-size: 11px; 652 font-size: 11px;
650 color: #222; 653 color: #222;
651 font-weight: bold; 654 font-weight: bold;
652 } 655 }
653 .tierListHead input{ 656 .tierListHead input{
654 width: 50px; 657 width: 50px;
655 height: 24px; 658 height: 24px;
656 } 659 }
657 .addTierBtn{ 660 .addTierBtn{
658 color: #fff; 661 color: #fff;
659 background-color: #2196f3; 662 background-color: #2196f3;
660 border: none; 663 border: none;
661 padding: 1px 5px; 664 padding: 1px 5px;
662 } 665 }
663 .deleteTierIcon{ 666 .deleteTierIcon{
664 color: #fff; 667 color: #fff;
665 background-color: #c9302c; 668 background-color: #c9302c;
666 padding: 5px; 669 padding: 5px;
667 border-radius: 3px; 670 border-radius: 3px;
668 cursor: pointer; 671 cursor: pointer;
669 } 672 }
670 673
671 .customToogle { 674 .customToogle {
672 padding: 2px 6px !important; 675 padding: 2px 6px !important;
673 height: auto !important; 676 height: auto !important;
674 min-height: 28px !important; 677 min-height: 28px !important;
675 678
676 } 679 }
677 680
678 .myLoader{ 681 .myLoader{
679 width: 100%; 682 width: 100%;
680 height: 100%; 683 height: 100%;
681 position: fixed; 684 position: fixed;
682 z-index: 9999; 685 z-index: 9999;
683 top: 0; 686 top: 0;
684 left: 0; 687 left: 0;
685 text-align: center; 688 text-align: center;
686 background-color: rgba(0, 0, 0, 0.2); 689 background-color: rgba(0, 0, 0, 0.2);
687 } 690 }
688 .myLoader img{ 691 .myLoader img{
689 position: relative; 692 position: relative;
690 top: calc(50% - 25px); 693 top: calc(50% - 25px);
691 } 694 }
692 .customErrorInput{ 695 .customErrorInput{
693 background-color: rgb(251, 227, 228); 696 background-color: rgb(251, 227, 228);
694 border: 1px solid #fbc2c4; 697 border: 1px solid #fbc2c4;
695 color: #8a1f11; 698 color: #8a1f11;
696 } 699 }
697 .customErrorMessage{ 700 .customErrorMessage{
698 color: #8a1f11; 701 color: #8a1f11;
699 font-weight: bold; 702 font-weight: bold;
700 } 703 }
701 .ui-datepicker .ui-widget-header{ 704 .ui-datepicker .ui-widget-header{
702 background-image: none !important; 705 background-image: none !important;
703 } 706 }
704 .recordCountSelect{ 707 .recordCountSelect{
705 background-color: #fff; 708 background-color: #fff;
706 } 709 }
707 .exportBtn{ 710 .exportBtn{
708 margin-top: 20px; 711 margin-top: 20px;
709 } 712 }
710 .select2-container .select2-choice{ 713 .select2-container .select2-choice{
711 height: 34px !important; 714 height: 34px !important;
712 padding: 6px 12px !important; 715 padding: 6px 12px !important;
713 border: 1px solid #ccc !important; 716 border: 1px solid #ccc !important;
714 background-image: none !important; 717 background-image: none !important;
715 } 718 }
716 .select2-container .select2-choice .select2-arrow{ 719 .select2-container .select2-choice .select2-arrow{
717 border-left: none !important; 720 border-left: none !important;
718 background: transparent !important; 721 background: transparent !important;
719 } 722 }
720 .select2-container .select2-choice{ 723 .select2-container .select2-choice{
721 padding: 2px 12px !important; 724 padding: 2px 12px !important;
722 } 725 }
1 <html ng-app="acufuel"> 1 <html ng-app="acufuel">
2 <head lang="en"> 2 <head lang="en">
3 <meta charset="utf-8"> 3 <meta charset="utf-8">
4 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 4 <meta name="viewport" content="width=device-width, initial-scale=1.0">
5 <meta name="description" content=""> 5 <meta name="description" content="">
6 <meta name="author" content=""> 6 <meta name="author" content="">
7 <title>Acufuel</title> 7 <title>Acufuel</title>
8 <!-- styles --> 8 <!-- styles -->
9 <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/> 9 <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/>
10 <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> 10 <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/>
11 <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/> 11 <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/>
12 <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" /> 12 <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" />
13 <!-- <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/> 13 <!-- <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/>
14 <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> --> 14 <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> -->
15 <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/> 15 <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/>
16 <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/> 16 <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/>
17 <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet"> 17 <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet">
18 <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"> 18 <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet">
19 <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css" 19 <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css"
20 rel="stylesheet"> 20 rel="stylesheet">
21 21
22 22
23 <link rel="stylesheet" href="css/main.css"/> 23 <link rel="stylesheet" href="css/main.css"/>
24 <link rel="stylesheet" href="css/base-admin-3.css"/> 24 <link rel="stylesheet" href="css/base-admin-3.css"/>
25 <link rel="stylesheet" href="css/base-admin-3-responsive.css"/> 25 <link rel="stylesheet" href="css/base-admin-3-responsive.css"/>
26 <link rel="stylesheet" href="css/custom.css"/> 26 <link rel="stylesheet" href="css/custom.css"/>
27 27
28 <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> 28 <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
29 <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> 29 <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet">
30 <link href="js/plugins/cirque/cirque.css" rel="stylesheet"> 30 <link href="js/plugins/cirque/cirque.css" rel="stylesheet">
31 31
32 <link href="css/pages/dashboard.css" rel="stylesheet"> 32 <link href="css/pages/dashboard.css" rel="stylesheet">
33 <link href="js/plugins/faq/faq.css" rel="stylesheet"> 33 <link href="js/plugins/faq/faq.css" rel="stylesheet">
34 <link href="css/pages/plans.css" rel="stylesheet"> 34 <link href="css/pages/plans.css" rel="stylesheet">
35 35
36 <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"> 36 <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet">
37 <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet"> 37 <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet">
38 <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"> 38 <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet">
39 <link href="css/pages/pricing.css" rel="stylesheet"> 39 <link href="css/pages/pricing.css" rel="stylesheet">
40 <link href="css/pages/reports.css" rel="stylesheet"> 40 <link href="css/pages/reports.css" rel="stylesheet">
41 41
42 <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" /> 42 <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
43 43
44 <link rel="stylesheet" type="text/css" href="css/ngTable.css"> 44 <link rel="stylesheet" type="text/css" href="css/ngTable.css">
45 <link rel="stylesheet" href="bower_components/select2/select2.css"> 45 <link rel="stylesheet" href="bower_components/select2/select2.css">
46 46
47 <!-- <link rel="stylesheet" type="text/css" href="css/fullcalender.css"> 47 <!-- <link rel="stylesheet" type="text/css" href="css/fullcalender.css">
48 <link rel="stylesheet" type="text/css" href="css/fullcalenderprint.css"> --> 48 <link rel="stylesheet" type="text/css" href="css/fullcalenderprint.css"> -->
49 49
50 <!-- <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css"> --> 50 <!-- <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css"> -->
51 51
52 <!-- <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css' rel='stylesheet' /> 52 <!-- <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css' rel='stylesheet' />
53 <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.print.min.css' rel='stylesheet' media='print' /> 53 <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.print.min.css' rel='stylesheet' media='print' />
54 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js'></script> 54 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js'></script>
55 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js'></script> 55 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js'></script>
56 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery-ui.min.js'></script> --> 56 <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery-ui.min.js'></script> -->
57 <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css"/> 57 <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css"/>
58 58
59 </head> 59 </head>
60 <body> 60 <body>
61 <!-- views --> 61 <!-- views -->
62 62
63 <!-- scripts --> 63 <!-- scripts -->
64 64
65 <script src="bower_components/jquery/dist/jquery.min.js"></script> 65 <script src="bower_components/jquery/dist/jquery.min.js"></script>
66 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> 66 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
67 <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script> 67 <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script>
68 <!--<script src="js/plugins/flot/jquery.flot.js"></script> 68 <!--<script src="js/plugins/flot/jquery.flot.js"></script>
69 <script src="js/plugins/flot/jquery.flot.pie.js"></script> 69 <script src="js/plugins/flot/jquery.flot.pie.js"></script>
70 <script src="js/plugins/flot/jquery.flot.resize.js"></script> 70 <script src="js/plugins/flot/jquery.flot.resize.js"></script>
71 <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>--> 71 <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>-->
72 <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script> 72 <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script>
73 <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script> 73 <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script>
74 <script src="js/plugins/validate/jquery.validate.js"></script> 74 <script src="js/plugins/validate/jquery.validate.js"></script>
75 <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script> 75 <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script>
76 76
77 <script src="bower_components/angular/angular.min.js"></script> 77 <script src="bower_components/angular/angular.min.js"></script>
78 <script src="bower_components/angular-route/angular-route.js"></script> 78 <script src="bower_components/angular-route/angular-route.js"></script>
79 <script src="bower_components/angular-cookies/angular-cookies.min.js"></script> 79 <script src="bower_components/angular-cookies/angular-cookies.min.js"></script>
80 <script src="bower_components/angular-resource/angular-resource.min.js"></script> 80 <script src="bower_components/angular-resource/angular-resource.min.js"></script>
81 <script src="bower_components/angular-animate/angular-animate.js"></script> 81 <script src="bower_components/angular-animate/angular-animate.js"></script>
82 <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> 82 <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
83 <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> 83 <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
84 <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script> 84 <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
85 <script src='bower_components/moment/min/moment.min.js'></script> 85 <script src='bower_components/moment/min/moment.min.js'></script>
86 <!-- <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> --> 86 <!-- <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> -->
87 <script src='bower_components/toastr/toastr.min.js'></script> 87 <script src='bower_components/toastr/toastr.min.js'></script>
88 <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script> 88 <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
89 <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> 89 <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
90 <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script> 90 <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script>
91 <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script> 91 <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script>
92 <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script> 92 <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script>
93 <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script> 93 <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script>
94 <script src="bower_components/select2/select2.js"></script> 94 <script src="bower_components/select2/select2.js"></script>
95 <script src="bower_components/angular-ui-select2/src/select2.js"></script> 95 <script src="bower_components/angular-ui-select2/src/select2.js"></script>
96 <script src="bower_components/angular-ckeditor/angular-ckeditor.js"></script> 96 <script src="bower_components/angular-ckeditor/angular-ckeditor.js"></script>
97 <script src="bower_components/angular-dragdrop/src/angular-dragdrop.min.js"></script> 97 <script src="bower_components/angular-dragdrop/src/angular-dragdrop.min.js"></script>
98 98
99 <!-- <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script> --> 99 <!-- <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script> -->
100 <script type="text/javascript" src="bower_components/angular-ui-calendar/src/calendar.js"></script> 100 <script type="text/javascript" src="bower_components/angular-ui-calendar/src/calendar.js"></script>
101 <!-- <script type="text/javascript" src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> --> 101 <!-- <script type="text/javascript" src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> -->
102 102
103 103
104 <!-- 104 <!--
105 <script src="scripts/inspinia.js"></script> 105 <script src="scripts/inspinia.js"></script>
106 <script src="plugins/iCheck/icheck.min.js"></script> 106 <script src="plugins/iCheck/icheck.min.js"></script>
107 --> 107 -->
108 108
109 <!-- <script src="./js/Application.js"></script> 109 <!-- <script src="./js/Application.js"></script>
110 <script src="js/charts/area.js"></script> 110 <script src="js/charts/area.js"></script>
111 <script src="js/charts/donut.js"></script> 111 <script src="js/charts/donut.js"></script>
112 <script src="js/charts/pie.js"></script> 112 <script src="js/charts/pie.js"></script>
113 <script src="js/charts/bar.js"></script> 113 <script src="js/charts/bar.js"></script>
114 <script src="js/demo/validation.js"></script> 114 <script src="js/demo/validation.js"></script>
115 <script src="js/charts/line.js"></script> --> 115 <script src="js/charts/line.js"></script> -->
116 <script src="js/demo/faq.js"></script> 116 <script src="js/demo/faq.js"></script>
117 <script src="js/plugins/faq/faq.js"></script> 117 <script src="js/plugins/faq/faq.js"></script>
118 <script src="js/demo/gallery.js"></script> 118 <script src="js/demo/gallery.js"></script>
119 <script src="js/demo/sliders.js"></script> 119 <script src="js/demo/sliders.js"></script>
120 <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script> 120 <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script>
121 <script src="js/demo/notifications.js"></script> 121 <script src="js/demo/notifications.js"></script>
122 122
123 <script src="js/ngTable.js"></script> 123 <script src="js/ngTable.js"></script>
124 124
125 <!-- <script src="js/fullcalender.js"></script> --> 125 <!-- <script src="js/fullcalender.js"></script> -->
126 126
127 <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script> 127 <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script>
128 <script src="https://code.highcharts.com/maps/highmaps.js"></script> 128 <script src="https://code.highcharts.com/maps/highmaps.js"></script>
129 <script src="https://code.highcharts.com/maps/modules/data.js"></script> 129 <script src="https://code.highcharts.com/maps/modules/data.js"></script>
130 <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script> 130 <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script>
131 <!-- Controllers --> 131 <!-- Controllers -->
132 <script src="js/app.js"></script> 132 <script src="js/app.js"></script>
133 <script src="js/app.constant.js"></script> 133 <script src="js/app.constant.js"></script>
134 <script src="partials/login/login.controller.js"></script> 134 <script src="partials/login/login.controller.js"></script>
135 <script src="partials/customers/customers.controller.js"></script> 135 <script src="partials/customers/customers.controller.js"></script>
136 <script src="partials/analytics/analytics.controller.js"></script> 136 <script src="partials/analytics/analytics.controller.js"></script>
137 <script src="partials/account/account.controller.js"></script> 137 <script src="partials/account/account.controller.js"></script>
138 <script src="partials/elements/elements.controller.js"></script> 138 <script src="partials/elements/elements.controller.js"></script>
139 <script src="partials/error/error.controller.js"></script> 139 <script src="partials/error/error.controller.js"></script>
140 <script src="partials/faq/faq.controller.js"></script> 140 <script src="partials/faq/faq.controller.js"></script>
141 <script src="partials/forms/forms.controller.js"></script> 141 <script src="partials/forms/forms.controller.js"></script>
142 <script src="partials/fuelManager/fuelManager.controller.js"></script> 142 <script src="partials/fuelManager/fuelManager.controller.js"></script>
143 <script src="partials/pricing/pricing.controller.js"></script> 143 <script src="partials/pricing/pricing.controller.js"></script>
144 <script src="partials/reports/reports.controller.js"></script> 144 <script src="partials/reports/reports.controller.js"></script>
145 <script src="partials/scheduler/scheduler.controller.js"></script> 145 <script src="partials/scheduler/scheduler.controller.js"></script>
146 <script src="partials/signup/signup.controller.js"></script> 146 <script src="partials/signup/signup.controller.js"></script>
147 <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> 147 <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script>
148 <script src="partials/viewCompany/viewCompany.controller.js"></script> 148 <script src="partials/viewCompany/viewCompany.controller.js"></script>
149 <script src="partials/dashboard/dashboard.controller.js"></script> 149 <script src="partials/dashboard/dashboard.controller.js"></script>
150 <script src="partials/fuelOrders/fuelOrders.controller.js"></script> 150 <script src="partials/fuelOrders/fuelOrders.controller.js"></script>
151 <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> 151 <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script>
152 <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> 152 <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script>
153 <script src="partials/Accept/Accept.controller.js"></script> 153 <script src="partials/Accept/Accept.controller.js"></script>
154 <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> 154 <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> -->
155 <script src="partials/ContactView/ContactView.controller.js"></script> 155 <script src="partials/ContactView/ContactView.controller.js"></script>
156 <script src="partials/FuelVendors/FuelVendors.controller.js"></script> 156 <script src="partials/FuelVendors/FuelVendors.controller.js"></script>
157 <script src="partials/delselected/delselected.controller.js"></script> 157 <script src="partials/delselected/delselected.controller.js"></script>
158 <script src="partials/pricingcontact/pricingcontact.controller.js"></script> 158 <script src="partials/pricingcontact/pricingcontact.controller.js"></script>
159 <script src="partials/viewcontact/viewcontact.controller.js"></script> 159 <script src="partials/viewcontact/viewcontact.controller.js"></script>
160 <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> 160 <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script>
161 <script src="partials/accountSetting/accountSetting.Controller.js"></script> 161 <script src="partials/accountSetting/accountSetting.Controller.js"></script>
162 <script src="partials/viewVendorContact/viewVendorContact.Controller.js"></script> 162 <script src="partials/viewVendorContact/viewVendorContact.Controller.js"></script>
163 <script src="partials/enterFuelOrder/enterFuelOrder.controller.js"></script> 163 <script src="partials/enterFuelOrder/enterFuelOrder.controller.js"></script>
164 164
165 <script src="partials/main/main.controller.js"></script> 165 <script src="partials/main/main.controller.js"></script>
166 <div ui-view></div> 166 <div ui-view></div>
167 <!-- End controllers --> 167 <!-- End controllers -->
168 168
169 169
170 <!-- services --> 170 <!-- services -->
171 <script src="partials/login/login.service.js"></script> 171 <script src="partials/login/login.service.js"></script>
172 <script src="partials/customers/customers.service.js"></script> 172 <script src="partials/customers/customers.service.js"></script>
173 <script src="partials/analytics/analytics.service.js"></script> 173 <script src="partials/analytics/analytics.service.js"></script>
174 <script src="partials/account/account.service.js"></script> 174 <script src="partials/account/account.service.js"></script>
175 <script src="partials/elements/elements.service.js"></script> 175 <script src="partials/elements/elements.service.js"></script>
176 <script src="partials/error/error.service.js"></script> 176 <script src="partials/error/error.service.js"></script>
177 <script src="partials/faq/faq.service.js"></script> 177 <script src="partials/faq/faq.service.js"></script>
178 <script src="partials/forms/forms.service.js"></script> 178 <script src="partials/forms/forms.service.js"></script>
179 <script src="partials/fuelManager/fuelManager.service.js"></script> 179 <script src="partials/fuelManager/fuelManager.service.js"></script>
180 <script src="partials/pricing/pricing.service.js"></script> 180 <script src="partials/pricing/pricing.service.js"></script>
181 <script src="partials/reports/reports.service.js"></script> 181 <script src="partials/reports/reports.service.js"></script>
182 <script src="partials/scheduler/scheduler.service.js"></script> 182
183 <script src="partials/signup/signup.service.js"></script> 183 <script src="partials/signup/signup.service.js"></script>
184 <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> 184 <script src="partials/updateFuelManager/updateFuelManager.service.js"></script>
185 <script src="partials/viewCompany/viewCompany.service.js"></script> 185 <script src="partials/viewCompany/viewCompany.service.js"></script>
186 <script src="partials/dashboard/dashboard.service.js"></script> 186 <script src="partials/dashboard/dashboard.service.js"></script>
187 <script src="partials/fuelOrders/fuelOrders.service.js"></script> 187 <script src="partials/fuelOrders/fuelOrders.service.js"></script>
188 <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> 188 <script src="partials/DispatchFuel/DispatchFuel.service.js"></script>
189 <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> 189 <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script>
190 <script src="partials/Accept/Accept.service.js"></script> 190 <script src="partials/Accept/Accept.service.js"></script>
191 <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> 191 <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> -->
192 <script src="partials/ContactView/ContactView.service.js"></script> 192 <script src="partials/ContactView/ContactView.service.js"></script>
193 <script src="partials/FuelVendors/FuelVendors.service.js"></script> 193 <script src="partials/FuelVendors/FuelVendors.service.js"></script>
194 <script src="partials/delselected/delselected.service.js"></script> 194 <script src="partials/delselected/delselected.service.js"></script>
195 <script src="partials/pricingcontact/pricingcontact.service.js"></script> 195 <script src="partials/pricingcontact/pricingcontact.service.js"></script>
196 <script src="partials/viewcontact/viewcontact.service.js"></script> 196 <script src="partials/viewcontact/viewcontact.service.js"></script>
197 <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> 197 <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script>
198 <script src="partials/accountSetting/accountSetting.Service.js"></script> 198 <script src="partials/accountSetting/accountSetting.Service.js"></script>
199 <script src="partials/viewVendorContact/viewVendorContact.Service.js"></script> 199 <script src="partials/viewVendorContact/viewVendorContact.Service.js"></script>
200 <script src="partials/enterFuelOrder/enterFuelOrder.service.js"></script> 200 <script src="partials/enterFuelOrder/enterFuelOrder.service.js"></script>
201 201
202 <script src="partials/main/main.service.js"></script> 202 <script src="partials/main/main.service.js"></script>
203 <!-- <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.js'></script> --> 203 <!-- <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.js'></script> -->
204 <script type="text/javascript" src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> 204 <script type="text/javascript" src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script>
205 <script type="text/javascript" src="bower_components/fullcalendar/dist/gcal.js"></script> 205 <script type="text/javascript" src="bower_components/fullcalendar/dist/gcal.js"></script>
206 206
207 <script src="partials/scheduler/scheduler.service.js"></script>
208
207 </body> 209 </body>
208 </html> 210 </html>
app/partials/scheduler/scheduler.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller
4 angular.module('acufuel') 3 angular.module('acufuel')
5 4
6 .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', function($scope, $compile, uiCalendarConfig) { 5 .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', 'schedulerService', function($scope, $compile, uiCalendarConfig, schedulerService) {
7 6
8 $scope.test = "Testing..."; 7 $scope.showLoader = true;
9 8 getEventsList();
10 var date = new Date(); 9
11 var d = date.getDate(); 10 $scope.events = [];
12 var m = date.getMonth(); 11 function getEventsList(){
13 var y = date.getFullYear(); 12 schedulerService.getEvents().then(function(result) {
14 13 console.log('result', result);
15 14 for (var i = 0; i < result.length; i++) {
16 $scope.eventList=[ 15 var newTime = new Date(result[i].deployDate);
17 {title:'Event 1'}, 16 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
18 {title:'Event 2'}, 17 var dday = newTime.getUTCDate();
19 {title:'Event 3'}, 18 var dyear = newTime.getUTCFullYear();
20 {title:'Event 4'} 19
21 ]; 20 $scope.events.push({
22 21 'id': result[i].id,
23 $scope.eventSources=[]; 22 'title': result[i].aircraft,
24 23 'start': dyear+'-'+dmonth+'-'+dday
25 $scope.events = [ 24 })
26 {title: 'All Day Event', start: new Date(y, m, 1)}, 25 $scope.showLoader = false;
27 {title: 'Birthday Party', start: new Date(y, m, d + 1, 19, 0), end: new Date(y, m, d + 1, 22, 30), allDay: false}, 26 }
28 {title: 'Click for Google', start: new Date(y, m, 28), end: new Date(y, m, 29)} 27
29 ]; 28 // $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
30 29 })
31 $scope.uiConfig = { 30 }
32 calendar:{ 31
33 height: 450, 32 $scope.newEvent = {};
34 editable: true, 33 $scope.addNewEvent = function(){
35 droppable: true, 34 console.log('newEvent', $scope.newEvent);
36 drop: function (date, allDay, jsEvent, ui) { 35 $scope.showLoader = true;
37 console.log('Here ,but where is the object?'); 36 if ($scope.newEvent.deployDate != undefined) {
38 }, 37 $scope.newEvent.deployDate = new Date($scope.newEvent.deployDate);
39 header:{ 38 $scope.newEvent.deployDate = $scope.newEvent.deployDate.getTime();
40 left: 'title', 39 }
41 center: '', 40 //var data = 'aircraft='+$scope.newEvent.aircraft+'&deployDate='+$scope.newEvent.deployDate;
42 right: 'today prev,next' 41 schedulerService.addNewEventService($scope.newEvent).then(function(response){
43 }, 42 console.log('response', response);
44 eventResize: true, 43 $scope.newEvent = {};
44 $('#addEvent').modal('hide');
45 getEventsList();
46 })
47 }
48
49 $scope.cancelAdd = function(){
50 $scope.newEvent = {};
51 }
52 $scope.editData = {};
53 $scope.editEvent = function(data){
54 console.log('data', data);
55 $scope.editData = data;
56 console.log('$scope.editData', $scope.editData);
57 $('#editEvent').modal('show');
58
59 }
60
61
62
63 /* code for calendar */
64
65 var date = new Date();
66 var d = date.getDate();
67 var m = date.getMonth();
68 var y = date.getFullYear();
69
70 $scope.changeTo = 'Hungarian';
71
72 $scope.eventSource = {};
73
74 $scope.eventsF = function (start, end, timezone, callback) {
75 var s = new Date(start).getTime() / 1000;
76 var e = new Date(end).getTime() / 1000;
77 var m = new Date(start).getMonth();
78 var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}];
79 callback(events);
80 };
81
82 $scope.calEventsExt = {
83 color: '#f00',
84 textColor: 'yellow',
85 events: []
86 };
87
88 $scope.alertOnEventClick = function( date, jsEvent, view){
89 $scope.alertMessage = (date.title + ' was clicked ');
90 };
91
92 $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){
93 var dmonth = event.start._d.getUTCMonth() + 1; //months from 1-12
94 var dday = event.start._d.getUTCDate();
95 var dyear = event.start._d.getUTCFullYear();
96 console.log('date', dyear+'-'+dmonth+'-'+dday);
97 for (var i = 0; i < $scope.events.length; i++) {
98 if ($scope.events[i].id == event.id) {
99 console.log('events', $scope.events[i]);
100 $scope.events[i].start = dyear+'-'+dmonth+'-'+dday;
45 } 101 }
46 };
47
48 $scope.eventSources = [$scope.events];
49 //$scope.eventSources = [];
50 //$scope.eventSources.push($scope.events);
51
52 $scope.addEvent = function(index) {
53 console.log('INDEX', index);
54 console.log('EVENTS', $scope.eventSources);
55 //$scope.events.push($scope.eventList[index]);
56 } 102 }
57 103 console.log('$scope.events new', $scope.events);
58 console.log($scope.eventSources); 104 $scope.alertMessage = ('Event Droped to make dayDelta ' + delta);
105 };
106
107 $scope.alertOnResize = function(event, delta, revertFunc, jsEvent, ui, view ){
108 $scope.alertMessage = ('Event Resized to make dayDelta ' + delta);
109 };
110
111 $scope.addRemoveEventSource = function(sources,source) {
112 var canAdd = 0;
113 angular.forEach(sources,function(value, key){
114 if(sources[key] === source){
115 sources.splice(key,1);
116 canAdd = 1;
117 }
118 });
119 if(canAdd === 0){
120 sources.push(source);
121 }
122 };
123
124 $scope.addEvent = function() {
125 $scope.events.push({
126 title: 'Open Sesame',
127 start: new Date(y, m, 28),
128 end: new Date(y, m, 29),
129 className: ['openSesame']
130 });
131 };
132
133 $scope.remove = function(index) {
134 $scope.events.splice(index,1);
135 };
136
137 $scope.changeView = function(view,calendar) {
138 uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view);
139 };
140
141 $scope.renderCalender = function(calendar) {
142 if(uiCalendarConfig.calendars[calendar]){
143 uiCalendarConfig.calendars[calendar].fullCalendar('render');
144 }
145 };
146
147 $scope.eventRender = function( event, element, view ) {
148 element.attr({'tooltip': event.title,
149 'tooltip-append-to-body': true});
150 $compile(element)($scope);
151 };
152
153 $scope.uiConfig = {
154 calendar:{
155 height: 450,
156 editable: true,
157 droppable: true,
158 drop: function (event, delta, revertFunc, jsEvent, ui, view) {
159 },
160 header:{
161 right: 'month basicWeek basicDay',
162 center: 'title',
163 left: 'prev,next, today'
164 },
165 eventClick: $scope.alertOnEventClick,
166 eventDrop: $scope.alertOnDrop,
167 eventResize: $scope.alertOnResize,
168 eventRender: $scope.eventRender
169 }
170 };
171
172 $scope.addEvent = function(index) {
app/partials/scheduler/scheduler.html
1 <style type="text/css"> 1 <style type="text/css">
2 .newUlView { 2 .newUlView {
3 padding: 5px; 3 padding: 5px;
4 margin: 3px; 4 margin: 3px;
5 } 5 }
6 .subnavbar .mainnav > li:nth-child(4) > a{ 6 .subnavbar .mainnav > li:nth-child(4) > a{
7 color: #ff9900; 7 color: #ff9900;
8 } 8 }
9 .fc button, .fc-button-group, .fc-time-grid .fc-event .fc-time span{ 9 .fc button, .fc-button-group, .fc-time-grid .fc-event .fc-time span{
10 display: block; 10 display: block;
11 } 11 }
12 .fc-state-default{ 12 .fc-state-default{
13 background-color: #fff; 13 background-color: #fff;
14 background-image: none; 14 background-image: none;
15 } 15 }
16 .fc-state-active, .fc-state-down{ 16 .fc-state-active, .fc-state-down{
17 box-shadow: none; 17 box-shadow: none;
18 color: #fff; 18 color: #fff;
19 background-color: #ff9900; 19 background-color: #ff9900;
20 } 20 }
21 21 .stacked:after, .stacked:before{
22 display: none;
23 }
24 .btn-white, .btn-white:hover{
25 background-color: #fff;
26 background-image: none;
27 }
28 .fc-day-grid-event .fc-time{
29 display: none;
30 }
22 31
23 /*#wrap { 32 /*#wrap {
24 width: 1100px; 33 width: 1100px;
25 margin: 0 auto; 34 margin: 0 auto;
26 } 35 }
27 36
28 #external-events { 37 #external-events {
29 float: left; 38 float: left;
30 width: 150px; 39 width: 150px;
31 padding: 0 10px; 40 padding: 0 10px;
32 border: 1px solid #ccc; 41 border: 1px solid #ccc;
33 background: #eee; 42 background: #eee;
34 text-align: left; 43 text-align: left;
35 } 44 }
36 45
37 #external-events h4 { 46 #external-events h4 {
38 font-size: 16px; 47 font-size: 16px;
39 margin-top: 0; 48 margin-top: 0;
40 padding-top: 1em; 49 padding-top: 1em;
41 } 50 }
42 51
43 #external-events .fc-event { 52 #external-events .fc-event {
44 margin: 10px 0; 53 margin: 10px 0;
45 cursor: pointer; 54 cursor: pointer;
46 } 55 }
47 56
48 #external-events p { 57 #external-events p {
49 margin: 1.5em 0; 58 margin: 1.5em 0;
50 font-size: 11px; 59 font-size: 11px;
51 color: #666; 60 color: #666;
52 } 61 }
53 62
54 #external-events p input { 63 #external-events p input {
55 margin: 0; 64 margin: 0;
56 vertical-align: middle; 65 vertical-align: middle;
57 } 66 }
58 67
59 #calendar { 68 #calendar {
60 float: right; 69 float: right;
61 width: 900px; 70 width: 900px;
62 }*/ 71 }*/
63 </style> 72 </style>
73
74 <div class="myLoader" ng-show="showLoader">
75 <img src="../img/hourglass.gif" width="50px;">
76 </div>
77
64 <div class="main"> 78 <div class="main">
65 <div class="container"> 79 <div class="container">
66 <div class="row"> 80 <div class="row">
67 <div class="col-xs-12"> 81 <div class="col-xs-12">
68 <div id='wrap'> 82 <div class="col-xs-12 col-md-3">
83 <div class="widget stacked">
84 <div class="widget-header">
85 <i class="fa fa-plane" aria-hidden="true"></i>
86 <h3>Enter Support Service</h3>
87 </div>
88 <div class="widget-content">
89 <label ng-repeat="item in events" ng-click="editEvent(item)" style="width: 100%;">
90 <!-- <div class="fc-event" data-drag="true" data-jqyoui-options="{revert: 'invalid'}" jqyoui-draggable="{index: {{$index}},placeholder:true,animate:true}">
91 {{item.title}}
92 </div> -->
93 <div class="fc-event">
94 {{item.title}}
95 </div>
96 </label>
97 <!-- <p>
98 <input type='checkbox' id='drop-remove' />
99 <label for='drop-remove'>remove after drop</label>
100 </p> -->
101 </div>
102 </div>
103 <div class="text-right">
104 <button class="btn btn-default btn-white" data-toggle="modal" data-target="#addEvent">Add Event</button>
105 </div>
106 </div>
107
108 <div class="col-xs-12 col-md-9">
109 <div class="widget stacked">
110 <div class="widget-header">
111 <i class="fa fa-calendar" aria-hidden="true"></i>
112 <h3>Schedule</h3>
113 </div>
114 <div class="widget-content">
115 <div ui-calendar="uiConfig.calendar" ng-model="eventSources" data-drop="true"></div>
116 </div>
117 </div>
118 </div>
119 <div style='clear:both'></div>
69 120
70 <div id='external-events' class="col-xs-12 col-md-3"> 121 <!-- <div ui-calendar="uiConfig.calendar" ng-model="eventSources" class="col-xs-12 col-md-9" data-drop="true" jqyoui-droppable="{multiple:true, onDrop: 'addEvent($index)'}"></div> -->
71 <h4>Draggable Events</h4>
72 <label ng-repeat="item in eventList" style="width: 100%;">
73 <div class="fc-event" data-drag="true" data-jqyoui-options="{revert: 'invalid'}" jqyoui-draggable="{index: {{$index}},placeholder:true,animate:true}">
74 {{item.title}}
75 </div>
76 </label>
77 <!-- <p>
78 <input type='checkbox' id='drop-remove' />
79 <label for='drop-remove'>remove after drop</label>
80 </p> -->
81 </div>
82 122
83 <div ui-calendar="uiConfig.calendar" ng-model="eventSources" class="col-xs-12 col-md-9" data-drop="true" jqyoui-droppable="{multiple:true, onDrop: 'addEvent($index)'}"></div> 123
84 124
85 <div style='clear:both'></div> 125
86 126
87 </div> 127 </div>
88 128
89 129
90 130
91 </div> 131 </div>
92 132
93 </div> 133 </div>
94 <div> 134 <div>
95 </div> 135 </div>
96 <!-- /row --> 136 <!-- /row -->
97 </div> 137 </div>
98 <!-- /container --> 138 <!-- /container -->
99 </div> 139 </div>
100 <!-- /main -->
140 <!-- /main -->
141
142
143 <div id="addEvent" class="modal fade" role="dialog" data-backdrop="static">
144 <div class="modal-dialog">
145 <form ng-submit="addNewEvent()">
146 <div class="modal-content">
147 <div class="modal-header">
148 <button type="button" ng-click="cancelAdd()" class="close" data-dismiss="modal">&times;</button>
149 <h4 class="modal-title">Schedule New Event</h4>
150 </div>
151 <div class="modal-body">
152 <div class="col-md-6" style="padding-left: 0;">
153 <label>Event Name:</label>
154 <input type="text" ng-model="newEvent.aircraft" class="form-control">
155 </div>
156 <div class="col-md-6" style="padding-right: 0;">
157 <label>Deploy Date:</label>
158 <input type="text" datepicker ng-model="newEvent.deployDate" class="form-control">
159 </div>
160 <div class="clearfix"></div>
161 </div>
162 <div class="modal-footer">
163 <input type="submit" value="Add" class="btn btn-primary">
164 <button type="button" class="btn btn-default" ng-click="cancelAdd()" data-dismiss="modal">Close</button>
165 </div>
166 </div>
167 </form>
168
169 </div>
170 </div>
171
172 <div id="editEvent" class="modal fade" role="dialog" data-backdrop="static">
173 <div class="modal-dialog">
174 <form ng-submit="updateEvent()">
175 <div class="modal-content">
176 <div class="modal-header">
177 <button type="button" ng-click="cancelAdd()" class="close" data-dismiss="modal">&times;</button>
178 <h4 class="modal-title">Schedule New Event</h4>
179 </div>
180 <div class="modal-body">
181 <div class="col-md-6" style="padding-left: 0;">
182 <label>Event Name:</label>
183 <input type="text" ng-model="editData.title" class="form-control">
184 </div>
185 <div class="col-md-6" style="padding-right: 0;">
186 <label>Deploy Date:</label>
187 <input type="text" datepicker ng-model="editData.start" class="form-control">
app/partials/scheduler/scheduler.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('schedulerService', ['$q', '$http', 'BE', schedulerService]); 4 .service('schedulerService', ['$q', '$http', 'BASE_URL', schedulerService]);
5 5
6 function schedulerService($q, $http, BE) { 6 function schedulerService($q, $http, BASE_URL) {
7 var temp = {}; 7 var temp = {};
8 8
9 9 this.getEvents = function() {
10 10 var deferred = $q.defer();
11 $http({
12 method : 'GET',
13 url : BASE_URL.url +'/user/schedules',
14 headers : {'Content-Type': 'application/json'},
15 })
16 .then(function (result){
17 deferred.resolve(result.data);
18 },function (result){
19 deferred.resolve(result.data);
20 })
21 return deferred.promise;
22 }
23
24 this.addNewEventService = function(data) {
25 var deferred = $q.defer();
26 $http({
27 method : 'POST',
28 url : BASE_URL.url +'/scheduler',
29 headers : {'Content-Type': 'application/json'},
30 data: data
31 })
32 .then(function (result){
33 deferred.resolve(result.data);
34 },function (result){
35 deferred.resolve(result.data);
36 })
37 return deferred.promise;
38 }
39
11 } 40 }
12 41
13 })(); 42 })();
app/partials/updateFuelManager/updateFuelManager.controller.js
1 1
2 'use strict'; 2 'use strict';
3 3
4 //Load controller 4 //Load controller
5 angular.module('acufuel') 5 angular.module('acufuel')
6 6
7 7
8 .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) { 8 .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) {
9 9
10 10
11 11
12 $scope.showLoader = true; 12 $scope.showLoader = true;
13 $scope.yes = function(data){ 13 $scope.yes = function(data){
14 console.log('========'); 14 console.log('========');
15 console.log('value', data); 15 console.log('value', data);
16 $uibModal.yes({ 16 $uibModal.yes({
17 templateUrl: 'partials/pricingcontact/pricingcontact.html', 17 templateUrl: 'partials/pricingcontact/pricingcontact.html',
18 backdrop: true, 18 backdrop: true,
19 scope: $scope, 19 scope: $scope,
20 }) 20 })
21 } 21 }
22 22
23 $scope.options = { 23 $scope.options = {
24 language: 'en', 24 language: 'en',
25 allowedContent: true, 25 allowedContent: true,
26 entities: false 26 entities: false
27 }; 27 };
28 28
29 // Called when the editor is completely ready. 29 // Called when the editor is completely ready.
30 $scope.onReady = function () { 30 $scope.onReady = function () {
31 // ... 31 // ...
32 }; 32 };
33 33
34 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); 34 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId'));
35 35
36 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { 36 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
37 $scope.aTypeJets = result; 37 $scope.aTypeJets = result;
38 $scope.showLoader = false; 38 $scope.showLoader = false;
39 }) 39 })
40 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { 40 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
41 $scope.vTypeJets = result; 41 $scope.vTypeJets = result;
42 $scope.showLoader = false; 42 $scope.showLoader = false;
43 }) 43 })
44 $scope.toggleJestAccordian = function(id, index){ 44 $scope.toggleJestAccordian = function(id, index){
45 $scope.showLoader = true; 45 $scope.showLoader = true;
46 $('.'+id).slideDown(); 46 $('.'+id).slideDown();
47 $('#'+id).addClass('customActive'); 47 $('#'+id).addClass('customActive');
48 $('#'+id+' select, #'+id+' input').prop("disabled", false); 48 $('#'+id+' select, #'+id+' input').prop("disabled", false);
49 $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); 49 $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block');
50 $('#'+id+' .btn-default').css('display', 'none'); 50 $('#'+id+' .btn-default').css('display', 'none');
51 $('#'+id+' .btn-primary').css('display', 'none'); 51 $('#'+id+' .btn-primary').css('display', 'none');
52 52
53 updateFuelManagerService.getJetTiers(id).then(function(tiers) { 53 updateFuelManagerService.getJetTiers(id).then(function(tiers) {
54 $scope.aTypeJets[index].tierList = tiers; 54 $scope.aTypeJets[index].tierList = tiers;
55 $scope.showLoader = false; 55 $scope.showLoader = false;
56 }) 56 })
57 } 57 }
58 $scope.toggleVtypeJestAccordian = function(id, index){ 58 $scope.toggleVtypeJestAccordian = function(id, index){
59 $scope.showLoader = true; 59 $scope.showLoader = true;
60 $('.'+id).slideDown(); 60 $('.'+id).slideDown();
61 $('#'+id).addClass('customActive'); 61 $('#'+id).addClass('customActive');
62 $('#'+id+' select, #'+id+' input').prop("disabled", false); 62 $('#'+id+' select, #'+id+' input').prop("disabled", false);
63 $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); 63 $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block');
64 $('#'+id+' .btn-default').css('display', 'none'); 64 $('#'+id+' .btn-default').css('display', 'none');
65 $('#'+id+' .btn-primary').css('display', 'none'); 65 $('#'+id+' .btn-primary').css('display', 'none');
66 66
67 updateFuelManagerService.getJetTiers(id).then(function(tiers) { 67 updateFuelManagerService.getJetTiers(id).then(function(tiers) {
68 $scope.vTypeJets[index].tierList = tiers; 68 $scope.vTypeJets[index].tierList = tiers;
69 $scope.showLoader = false; 69 $scope.showLoader = false;
70 }) 70 })
71 } 71 }
72 //$scope.trData = {}; 72 //$scope.trData = {};
73 $scope.addNewTier = function(id, trData, index){ 73 $scope.addNewTier = function(id, trData, index){
74 $scope.showLoader = true; 74 $scope.showLoader = true;
75 $scope.tr = {}; 75 $scope.tr = {};
76 $scope.tr[index] = {}; 76 $scope.tr[index] = {};
77 $scope.tr[index].minTierBreak = trData[index].minTierBreak; 77 $scope.tr[index].minTierBreak = trData[index].minTierBreak;
78 $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; 78 $scope.tr[index].maxTierBreak = trData[index].maxTierBreak;
79 $scope.tr[index].margin = trData[index].margin; 79 $scope.tr[index].margin = trData[index].margin;
80 $scope.tr[index].marginTotal = '1.00'; 80 $scope.tr[index].marginTotal = '1.00';
81 $scope.tr[index].marginTemplateId = id; 81 $scope.tr[index].marginTemplateId = id;
82 82
83 var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ 83 var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+
84 '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; 84 '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId;
85 85
86 updateFuelManagerService.addNewTier(tierData).then(function(result) { 86 updateFuelManagerService.addNewTier(tierData).then(function(result) {
87 toastr.success('Successfully Added', { 87 toastr.success('Successfully Added', {
88 closeButton: true 88 closeButton: true
89 }) 89 })
90 trData[index].minTierBreak = ''; 90 trData[index].minTierBreak = '';
91 trData[index].maxTierBreak = ''; 91 trData[index].maxTierBreak = '';
92 trData[index].margin = ''; 92 trData[index].margin = '';
93 93
94 updateFuelManagerService.getJetTiers(id).then(function(tiers) { 94 updateFuelManagerService.getJetTiers(id).then(function(tiers) {
95 $scope.aTypeJets[index].tierList = tiers; 95 $scope.aTypeJets[index].tierList = tiers;
96 $scope.showLoader = false; 96 $scope.showLoader = false;
97 }) 97 })
98 }) 98 })
99 } 99 }
100 100
101 $scope.addNewVtypeTier = function(id, vtrData, index){ 101 $scope.addNewVtypeTier = function(id, vtrData, index){
102 $scope.showLoader = true; 102 $scope.showLoader = true;
103 $scope.tr = {}; 103 $scope.tr = {};
104 $scope.tr[index] = {}; 104 $scope.tr[index] = {};
105 $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; 105 $scope.tr[index].minTierBreak = vtrData[index].minTierBreak;
106 $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; 106 $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak;
107 $scope.tr[index].margin = vtrData[index].margin; 107 $scope.tr[index].margin = vtrData[index].margin;
108 $scope.tr[index].marginTotal = '1.00'; 108 $scope.tr[index].marginTotal = '1.00';
109 $scope.tr[index].marginTemplateId = id; 109 $scope.tr[index].marginTemplateId = id;
110 110
111 var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ 111 var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+
112 '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; 112 '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId;
113 113
114 updateFuelManagerService.addNewTier(tierData).then(function(result) { 114 updateFuelManagerService.addNewTier(tierData).then(function(result) {
115 toastr.success('Successfully Added', { 115 toastr.success('Successfully Added', {
116 closeButton: true 116 closeButton: true
117 }) 117 })
118 vtrData[index].minTierBreak = ''; 118 vtrData[index].minTierBreak = '';
119 vtrData[index].maxTierBreak = ''; 119 vtrData[index].maxTierBreak = '';
120 vtrData[index].margin = ''; 120 vtrData[index].margin = '';
121 updateFuelManagerService.getJetTiers(id).then(function(tiers) { 121 updateFuelManagerService.getJetTiers(id).then(function(tiers) {
122 $scope.vTypeJets[index].tierList = tiers; 122 $scope.vTypeJets[index].tierList = tiers;
123 $scope.showLoader = false; 123 $scope.showLoader = false;
124 }) 124 })
125 }) 125 })
126 } 126 }
127 127
128 $scope.editTier = function(tier, index){ 128 $scope.editTier = function(tier, index){
129 $scope.showLoader = true; 129 $scope.showLoader = true;
130 var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ 130 var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+
131 '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; 131 '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id;
132 132
133 updateFuelManagerService.editTier(editTierData).then(function(result) { 133 updateFuelManagerService.editTier(editTierData).then(function(result) {
134 toastr.success('Successfully Updated', { 134 toastr.success('Successfully Updated', {
135 closeButton: true 135 closeButton: true
136 }) 136 })
137 updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { 137 updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) {
138 $scope.aTypeJets[index].tierList = tiers; 138 $scope.aTypeJets[index].tierList = tiers;
139 $scope.showLoader = false; 139 $scope.showLoader = false;
140 }) 140 })
141 }) 141 })
142 142
143 } 143 }
144 144
145 $scope.editVtypeTier = function(tier, index){ 145 $scope.editVtypeTier = function(tier, index){
146 $scope.showLoader = true; 146 $scope.showLoader = true;
147 var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ 147 var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+
148 '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; 148 '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id;
149 149
150 updateFuelManagerService.editTier(editTierData).then(function(result) { 150 updateFuelManagerService.editTier(editTierData).then(function(result) {
151 toastr.success('Successfully Updated', { 151 toastr.success('Successfully Updated', {
152 closeButton: true 152 closeButton: true
153 }) 153 })
154 updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { 154 updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) {
155 $scope.vTypeJets[index].tierList = tiers; 155 $scope.vTypeJets[index].tierList = tiers;
156 $scope.showLoader = false; 156 $scope.showLoader = false;
157 }) 157 })
158 }) 158 })
159 159
160 } 160 }
161 161
162 $scope.deleteTierObject = {}; 162 $scope.deleteTierObject = {};
163 $scope.deleteTier = function(id, jetid, index){ 163 $scope.deleteTier = function(id, jetid, index){
164 $scope.deleteTierObject.id = id; 164 $scope.deleteTierObject.id = id;
165 $scope.deleteTierObject.jetId = jetid; 165 $scope.deleteTierObject.jetId = jetid;
166 $scope.deleteTierObject.index = index; 166 $scope.deleteTierObject.index = index;
167 $('#deleteTierConfirm').css('display', 'block'); 167 $('#deleteTierConfirm').css('display', 'block');
168 } 168 }
169 169
170 $scope.confirmDeleteTier = function(){ 170 $scope.confirmDeleteTier = function(){
171 $scope.showLoader = true; 171 $scope.showLoader = true;
172 updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) { 172 updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) {
173 toastr.success(''+result.success+'', { 173 toastr.success(''+result.success+'', {
174 closeButton: true 174 closeButton: true
175 }) 175 })
176 updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) { 176 updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) {
177 $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers; 177 $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers;
178 $scope.showLoader = false; 178 $scope.showLoader = false;
179 $scope.deleteTierObject = {}; 179 $scope.deleteTierObject = {};
180 }) 180 })
181 }) 181 })
182 $('#deleteTierConfirm').css('display', 'none'); 182 $('#deleteTierConfirm').css('display', 'none');
183 } 183 }
184 184
185 $scope.cancelTierDelete = function(){ 185 $scope.cancelTierDelete = function(){
186 console.log('cancel'); 186 console.log('cancel');
187 $('#deleteTierConfirm').css('display', 'none'); 187 $('#deleteTierConfirm').css('display', 'none');
188 $scope.deleteTierObject = {}; 188 $scope.deleteTierObject = {};
189 } 189 }
190 190
191 /*$scope.deleteVtypeTier = function(id, jetid, index){ 191 /*$scope.deleteVtypeTier = function(id, jetid, index){
192 $scope.showLoader = true; 192 $scope.showLoader = true;
193 updateFuelManagerService.deleteTier(id).then(function(result) { 193 updateFuelManagerService.deleteTier(id).then(function(result) {
194 toastr.success(''+result.success+'', { 194 toastr.success(''+result.success+'', {
195 closeButton: true 195 closeButton: true
196 }) 196 })
197 updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { 197 updateFuelManagerService.getJetTiers(jetid).then(function(tiers) {
198 $scope.vTypeJets[index].tierList = tiers; 198 $scope.vTypeJets[index].tierList = tiers;
199 $scope.showLoader = false; 199 $scope.showLoader = false;
200 }) 200 })
201 }) 201 })
202 }*/ 202 }*/
203 203
204 $scope.deleteVtypeTierObject = {}; 204 $scope.deleteVtypeTierObject = {};
205 $scope.deleteVtypeTier = function(id, jetid, index){ 205 $scope.deleteVtypeTier = function(id, jetid, index){
206 $scope.deleteVtypeTierObject.id = id; 206 $scope.deleteVtypeTierObject.id = id;
207 $scope.deleteVtypeTierObject.jetId = jetid; 207 $scope.deleteVtypeTierObject.jetId = jetid;
208 $scope.deleteVtypeTierObject.index = index; 208 $scope.deleteVtypeTierObject.index = index;
209 $('#deleteVtypeTierConfirm').css('display', 'block'); 209 $('#deleteVtypeTierConfirm').css('display', 'block');
210 } 210 }
211 211
212 $scope.confirmDeleteVtypeTier = function(){ 212 $scope.confirmDeleteVtypeTier = function(){
213 $scope.showLoader = true; 213 $scope.showLoader = true;
214 updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) { 214 updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) {
215 toastr.success(''+result.success+'', { 215 toastr.success(''+result.success+'', {
216 closeButton: true 216 closeButton: true
217 }) 217 })
218 updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) { 218 updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) {
219 $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers; 219 $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers;
220 $scope.showLoader = false; 220 $scope.showLoader = false;
221 $scope.deleteVtypeTierObject = {}; 221 $scope.deleteVtypeTierObject = {};
222 }) 222 })
223 }) 223 })
224 $('#deleteVtypeTierConfirm').css('display', 'none'); 224 $('#deleteVtypeTierConfirm').css('display', 'none');
225 } 225 }
226 226
227 $scope.cancelVtypeTierDelete = function(){ 227 $scope.cancelVtypeTierDelete = function(){
228 console.log('cancel'); 228 console.log('cancel');
229 $('#deleteVtypeTierConfirm').css('display', 'none'); 229 $('#deleteVtypeTierConfirm').css('display', 'none');
230 $scope.deleteVtypeTierObject = {}; 230 $scope.deleteVtypeTierObject = {};
231 } 231 }
232 232
233 $scope.saveJetAccordian = function(jets){ 233 $scope.saveJetAccordian = function(jets){
234 $scope.showLoader = true; 234 $scope.showLoader = true;
235 $scope.jetsDetail = jets; 235 $scope.jetsDetail = jets;
236 $scope.jetsDetail.userProfileId = $scope.userProfileId; 236 $scope.jetsDetail.userProfileId = $scope.userProfileId;
237 //console.log('jets', $scope.jetsDetail); 237 //console.log('jets', $scope.jetsDetail);
238 $('.'+$scope.jetsDetail.id).slideUp(); 238 $('.'+$scope.jetsDetail.id).slideUp();
239 $('#'+$scope.jetsDetail.id).removeClass('customActive'); 239 $('#'+$scope.jetsDetail.id).removeClass('customActive');
240 $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); 240 $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true);
241 $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); 241 $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none');
242 $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); 242 $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block');
243 $('#'+$scope.jetsDetail.id+' .btn-primary').css('display', 'inline-block'); 243 $('#'+$scope.jetsDetail.id+' .btn-primary').css('display', 'inline-block');
244 244
245 var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; 245 var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message;
246 246
247 updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { 247 updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) {
248 console.log('newJet', editJetData); 248 console.log('newJet', editJetData);
249 toastr.success('Successfully Updated', { 249 toastr.success('Successfully Updated', {
250 closeButton: true 250 closeButton: true
251 }) 251 })
252 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { 252 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
253 console.log('result', result); 253 console.log('result', result);
254 $scope.aTypeJets = result; 254 $scope.aTypeJets = result;
255 $scope.showLoader = false; 255 $scope.showLoader = false;
256 }) 256 })
257 }) 257 })
258 258
259 } 259 }
260 260
261 $scope.closeAccordian = function(jets){ 261 $scope.closeAccordian = function(jets){
262 $('.'+jets.id).slideUp(); 262 $('.'+jets.id).slideUp();
263 $('#'+jets.id).removeClass('customActive'); 263 $('#'+jets.id).removeClass('customActive');
264 $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); 264 $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true);
265 $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); 265 $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none');
266 $('#'+jets.id+' .btn-default').css('display', 'inline-block'); 266 $('#'+jets.id+' .btn-default').css('display', 'inline-block');
267 $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); 267 $('#'+jets.id+' .btn-primary').css('display', 'inline-block');
268 } 268 }
269 269
270 $scope.closeAccordianVtype = function(jets){ 270 $scope.closeAccordianVtype = function(jets){
271 $('.'+jets.id).slideUp(); 271 $('.'+jets.id).slideUp();
272 $('#'+jets.id).removeClass('customActive'); 272 $('#'+jets.id).removeClass('customActive');
273 $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); 273 $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true);
274 $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); 274 $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none');
275 $('#'+jets.id+' .btn-default').css('display', 'inline-block'); 275 $('#'+jets.id+' .btn-default').css('display', 'inline-block');
276 $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); 276 $('#'+jets.id+' .btn-primary').css('display', 'inline-block');
277 } 277 }
278 278
279 $scope.saveVtypeJetAccordian = function(jets){ 279 $scope.saveVtypeJetAccordian = function(jets){
280 $scope.showLoader = true; 280 $scope.showLoader = true;
281 $scope.jetsDetail = jets; 281 $scope.jetsDetail = jets;
282 $scope.jetsDetail.userProfileId = $scope.userProfileId; 282 $scope.jetsDetail.userProfileId = $scope.userProfileId;
283 //console.log('jets', $scope.jetsDetail); 283 //console.log('jets', $scope.jetsDetail);
284 $('.'+$scope.jetsDetail.id).slideUp(); 284 $('.'+$scope.jetsDetail.id).slideUp();
285 $('#'+$scope.jetsDetail.id).removeClass('customActive'); 285 $('#'+$scope.jetsDetail.id).removeClass('customActive');
286 $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); 286 $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true);
287 $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); 287 $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none');
288 $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); 288 $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block');
289 $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); 289 $('#'+jets.id+' .btn-primary').css('display', 'inline-block');
290 290
291 var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; 291 var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message;
292 292
293 updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { 293 updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) {
294 console.log('newJet', editVtypeJetData); 294 console.log('newJet', editVtypeJetData);
295 toastr.success('Successfully Updated', { 295 toastr.success('Successfully Updated', {
296 closeButton: true 296 closeButton: true
297 }) 297 })
298 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { 298 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
299 $scope.vTypeJets = result; 299 $scope.vTypeJets = result;
300 console.log('second jets', result); 300 console.log('second jets', result);
301 $scope.showLoader = false; 301 $scope.showLoader = false;
302 }) 302 })
303 }) 303 })
304 304
305 } 305 }
306 306
307 $scope.newJet = {}; 307 $scope.newJet = {};
308 308
309 $scope.addNewMarginBtn = function(){ 309 $scope.addNewMarginBtn = function(){
310 $('.addNewMargin').css('display', 'block'); 310 $('.addNewMargin').css('display', 'block');
311 } 311 }
312 $scope.closeMarginPopup = function(){ 312 $scope.closeMarginPopup = function(){
313 $('.addNewMargin').css('display', 'none'); 313 $('.addNewMargin').css('display', 'none');
314 $scope.newJet = {}; 314 $scope.newJet = {};
315 } 315 }
316 316
317 //$scope.newJet.productType = ''; 317 //$scope.newJet.productType = '';
318 318
319 $scope.addNewATypeJet = function(){ 319 $scope.addNewATypeJet = function(){
320 $scope.showLoader = true; 320 $scope.showLoader = true;
321 $scope.newJet.productType = 'JET-A'; 321 $scope.newJet.productType = 'JET-A';
322 $scope.newJet.userProfileId = $scope.userProfileId; 322 $scope.newJet.userProfileId = $scope.userProfileId;
323 323
324 var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message; 324 var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message;
325 325
326 updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { 326 updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) {
327 console.log('newJet', jetData); 327 console.log('newJet', jetData);
328 toastr.success('Successfully Added', { 328 toastr.success('Successfully Added', {
329 closeButton: true 329 closeButton: true
330 }) 330 })
331 $('.addNewMargin').css('display', 'none'); 331 $('.addNewMargin').css('display', 'none');
332 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { 332 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
333 console.log('result', result); 333 console.log('result', result);
334 $scope.aTypeJets = result; 334 $scope.aTypeJets = result;
335 $scope.showLoader = false; 335 $scope.showLoader = false;
336 }) 336 })
337 }) 337 })
338 } 338 }
339 339
340 $scope.newVtypeJet = {}; 340 $scope.newVtypeJet = {};
341 341
342 $scope.addNewVtypePop = function(){ 342 $scope.addNewVtypePop = function(){
343 $('.addNewVtype').css('display', 'block'); 343 $('.addNewVtype').css('display', 'block');
344 } 344 }
345 $scope.closeNewVtypePop = function(){ 345 $scope.closeNewVtypePop = function(){
346 $('.addNewVtype').css('display', 'none'); 346 $('.addNewVtype').css('display', 'none');
347 $scope.newVtypeJet = {}; 347 $scope.newVtypeJet = {};
348 } 348 }
349 349
350 $scope.addNewVTypeJet = function(){ 350 $scope.addNewVTypeJet = function(){
351 $scope.showLoader = true; 351 $scope.showLoader = true;
352 $scope.newVtypeJet.productType = 'AVGAS'; 352 $scope.newVtypeJet.productType = 'AVGAS';
353 $scope.newVtypeJet.userProfileId = $scope.userProfileId; 353 $scope.newVtypeJet.userProfileId = $scope.userProfileId;
354 354
355 var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId+'&message='+$scope.newVtypeJet.message; 355 var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId+'&message='+$scope.newVtypeJet.message;
356 356
357 updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { 357 updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) {
358 358
359 toastr.success('Successfully Added', { 359 toastr.success('Successfully Added', {
360 closeButton: true 360 closeButton: true
361 }) 361 })
362 $('.addNewVtype').css('display', 'none'); 362 $('.addNewVtype').css('display', 'none');
363 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { 363 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
364 $scope.vTypeJets = result; 364 $scope.vTypeJets = result;
365 $scope.showLoader = false; 365 $scope.showLoader = false;
366 }) 366 })
367 }) 367 })
368 368
369 } 369 }
370 370
371 $scope.emailForMargin; 371 $scope.emailForMargin;
372 $scope.emailPricingForMargin = function(value){ 372 $scope.emailPricingForMargin = function(value){
373 $('#confirm2').css('display', 'block'); 373 $('#confirm2').css('display', 'block');
374 $scope.emailForMargin = value; 374 $scope.emailForMargin = value;
375 375
376 } 376 }
377 $scope.saveAndCloseForMarginConfirm = function(){ 377 $scope.saveAndCloseForMarginConfirm = function(){
378 $('#confirm2').css('display', 'none'); 378 $('#confirm2').css('display', 'none');
379 updateFuelManagerService.sendMailToMargin($scope.emailForMargin).then(function(result) { 379 updateFuelManagerService.sendMailToMargin($scope.emailForMargin).then(function(result) {
380 toastr.success(''+result.success+'', { 380 toastr.success(''+result.success+'', {
381 closeButton: true 381 closeButton: true
382 }) 382 })
383 }) 383 })
384 } 384 }
385 $scope.cancelAndCloseForMarginConfirm = function(){ 385 $scope.cancelAndCloseForMarginConfirm = function(){
386 $('#confirm2').css('display', 'none'); 386 $('#confirm2').css('display', 'none');
387 } 387 }
388 388
389 $scope.sendEmail = {}; 389 $scope.sendEmail = {};
390 390
391 $scope.confirmMail = function(){ 391 $scope.confirmMail = function(){
392 if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { 392 if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) {
393 $('#confirm1').css('display', 'block'); 393 $('#confirm1').css('display', 'block');
394 } 394 }
395 } 395 }
396 396
397 $scope.saveAndCloseConfirm = function(){ 397 $scope.saveAndCloseConfirm = function(){
398 $('#confirm1').css('display', 'none'); 398 $('#confirm1').css('display', 'none');
399 updateFuelManagerService.sendMailToGroupMargin($scope.sendEmail.pricing).then(function(result) { 399 updateFuelManagerService.sendMailToGroupMargin($scope.sendEmail.pricing).then(function(result) {
400 toastr.success(''+result.success+'', { 400 toastr.success(''+result.success+'', {
401 closeButton: true 401 closeButton: true
402 }) 402 })
403 }) 403 })
404 } 404 }
405 $scope.cancelAndCloseConfirm = function(){ 405 $scope.cancelAndCloseConfirm = function(){
406 $scope.sendEmail = {}; 406 $scope.sendEmail = {};
407 $scope.sendEmail.pricing = ''; 407 $scope.sendEmail.pricing = '';
408 $('#confirm1').css('display', 'none'); 408 $('#confirm1').css('display', 'none');
409 } 409 }
410 410
411 $scope.newFuelPricing = {}; 411 $scope.newFuelPricing = {};
412 $scope.holdFuelPricing = {};
412 updateFuelManagerService.getFuelPricingNew().then(function(result) { 413 updateFuelManagerService.getFuelPricingNew().then(function(result) {
413 $scope.newFuelPricing = result; 414 $scope.newFuelPricing = result;
414 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 415 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
415 if ($scope.newFuelPricing[i].fuelPricing != null) { 416 if ($scope.newFuelPricing[i].fuelPricing != null) {
416 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { 417 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
417 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 418 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
418 var month = newTime.getUTCMonth() + 1; //months from 1-12 419 var month = newTime.getUTCMonth() + 1; //months from 1-12
419 var day = newTime.getUTCDate(); 420 var day = newTime.getUTCDate();
420 var year = newTime.getUTCFullYear(); 421 var year = newTime.getUTCFullYear();
421 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; 422 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
422 } 423 }
423 } 424 }
424 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 425 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
425 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 426 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
426 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { 427 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
427 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 428 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
428 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 429 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
429 var nextDay = newTime.getUTCDate(); 430 var nextDay = newTime.getUTCDate();
430 var nextYear = newTime.getUTCFullYear(); 431 var nextYear = newTime.getUTCFullYear();
431 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; 432 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
432 } 433 }
433 } 434 }
434 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 435 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
435 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { 436 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
436 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 437 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
437 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 438 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
438 var dday = newTime.getUTCDate(); 439 var dday = newTime.getUTCDate();
439 var dyear = newTime.getUTCFullYear(); 440 var dyear = newTime.getUTCFullYear();
440 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; 441 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
441 } 442 }
442 } 443 }
443 } 444 }
444 445
445 var str =""+ $scope.newFuelPricing[i].name 446 var str =""+ $scope.newFuelPricing[i].name
446 if(str.startsWith("J")){ 447 if(str.startsWith("J")){
447 $scope.newFuelPricing[i].jeta = true; 448 $scope.newFuelPricing[i].jeta = true;
448 var str1 = str.substring(0,5) 449 var str1 = str.substring(0,5)
449 var str2 = str.substring(6, str.length) 450 var str2 = str.substring(6, str.length)
450 $scope.newFuelPricing[i].name = str1 451 $scope.newFuelPricing[i].name = str1
451 $scope.newFuelPricing[i].namejetrest = str2 452 $scope.newFuelPricing[i].namejetrest = str2
452 453
453 454
454 }else if(str.startsWith("100")){ 455 }else if(str.startsWith("100")){
455 $scope.newFuelPricing[i].avgas = true; 456 $scope.newFuelPricing[i].avgas = true;
456 var str1 = str.substring(0,5) 457 var str1 = str.substring(0,5)
457 var str2 = str.substring(6, str.length) 458 var str2 = str.substring(6, str.length)
458 $scope.newFuelPricing[i].name = str1 459 $scope.newFuelPricing[i].name = str1
459 $scope.newFuelPricing[i].nameavgasrest = str2 460 $scope.newFuelPricing[i].nameavgasrest = str2
460 } 461 }
461 } 462 }
462 $scope.showLoader = false; 463
464 for (var i = 0; i<result.length; i++) {
465 if (result[i].fuelPricing != null) {
466 if (result[i].fuelPricing.expirationDate != null && result[i].fuelPricing.expirationDate != '') {
467 var newTime = new Date(result[i].fuelPricing.expirationDate);
468 var month = newTime.getUTCMonth() + 1; //months from 1-12
469 var day = newTime.getUTCDate();
470 var year = newTime.getUTCFullYear();
471 result[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
472 }
473 }
474 if (result[i].futureFuelPricing != null) {
475 if (result[i].futureFuelPricing != null) {
476 if (result[i].futureFuelPricing.nextExpiration != null && result[i].futureFuelPricing.nextExpiration != '') {
477 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
478 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
479 var nextDay = newTime.getUTCDate();
480 var nextYear = newTime.getUTCFullYear();
481 result[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
482 }
483 }
484 if (result[i].futureFuelPricing != null) {
485 if (result[i].futureFuelPricing.deployDate != null && result[i].futureFuelPricing.deployDate != '') {
486 var newTime = new Date(result[i].futureFuelPricing.deployDate);
487 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
488 var dday = newTime.getUTCDate();
489 var dyear = newTime.getUTCFullYear();
490 result[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
491 }
492 }
493 }
494 }
495
496 $scope.holdFuelPricing = result;
497 $scope.showLoader = false;
463 498
464 }) 499 })
465 $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ 500 $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){
466 }); 501 });
467 $scope.updateFuelPricing = {}; 502 $scope.updateFuelPricing = {};
468 $scope.updateFuelPricing.fuelPricingList = []; 503 $scope.updateFuelPricing.fuelPricingList = [];
469 $scope.updateFuelPricing.userProfileId = $scope.userProfileId; 504 $scope.updateFuelPricing.userProfileId = $scope.userProfileId;
470 $scope.updateFuelPricingClick = function(){ 505 $scope.updateFuelPricingClick = function(){
471 $scope.showLoader = true; 506 $scope.showLoader = true;
472 507
473 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 508 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
474 if ($scope.newFuelPricing[i].fuelPricing != null) { 509 if ($scope.newFuelPricing[i].fuelPricing != null) {
475 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); 510 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
476 if ($scope.newFuelPricing[i].fuelPricing.cost == null) { 511 if ($scope.newFuelPricing[i].fuelPricing.cost == null) {
477 $scope.newFuelPricing[i].fuelPricing.cost = ''; 512 $scope.newFuelPricing[i].fuelPricing.cost = '';
478 } 513 }
479 if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { 514 if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) {
480 $scope.newFuelPricing[i].fuelPricing.papMargin = ''; 515 $scope.newFuelPricing[i].fuelPricing.papMargin = '';
481 } 516 }
482 if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { 517 if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) {
483 $scope.newFuelPricing[i].fuelPricing.papTotal = ''; 518 $scope.newFuelPricing[i].fuelPricing.papTotal = '';
484 } 519 }
485 if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { 520 if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) {
486 $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; 521 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';
487 }else{ 522 }else{
488 $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 523 $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
489 console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); 524 console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate);
490 $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); 525 $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime();
491 } 526 }
492 527
493 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); 528 $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
494 $scope.updateFuelPricing.fuelPricingList.push({ 529 $scope.updateFuelPricing.fuelPricingList.push({
495 'cost': $scope.newFuelPricing[i].fuelPricing.cost, 530 'cost': $scope.newFuelPricing[i].fuelPricing.cost,
496 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, 531 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin,
497 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, 532 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal,
498 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, 533 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate,
499 'productId': $scope.newFuelPricing[i].id, 534 'productId': $scope.newFuelPricing[i].id,
500 'id': $scope.newFuelPricing[i].fuelPricing.id, 535 'id': $scope.newFuelPricing[i].fuelPricing.id,
501 }) 536 })
502 537
503 }else{ 538 }else{
504 /*$scope.newFuelPricing[i].fuelPricing.cost = ''; 539 /*$scope.newFuelPricing[i].fuelPricing.cost = '';
505 $scope.newFuelPricing[i].fuelPricing.papMargin = ''; 540 $scope.newFuelPricing[i].fuelPricing.papMargin = '';
506 $scope.newFuelPricing[i].fuelPricing.papTotal = ''; 541 $scope.newFuelPricing[i].fuelPricing.papTotal = '';
507 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ 542 $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/
508 } 543 }
509 544
510 } 545 }
511 updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { 546 updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) {
512 toastr.success('Successfully Updated', { 547 toastr.success('Successfully Updated', {
513 closeButton: true 548 closeButton: true
514 }) 549 })
515 updateFuelManagerService.getFuelPricingNew().then(function(result) { 550 updateFuelManagerService.getFuelPricingNew().then(function(result) {
516 $scope.newFuelPricing = result; 551 $scope.newFuelPricing = result;
517 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 552 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
518 if ($scope.newFuelPricing[i].fuelPricing != null) { 553 if ($scope.newFuelPricing[i].fuelPricing != null) {
519 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { 554 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
520 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 555 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
521 var month = newTime.getUTCMonth() + 1; //months from 1-12 556 var month = newTime.getUTCMonth() + 1; //months from 1-12
522 var day = newTime.getUTCDate(); 557 var day = newTime.getUTCDate();
523 var year = newTime.getUTCFullYear(); 558 var year = newTime.getUTCFullYear();
524 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; 559 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
525 } 560 }
526 } 561 }
527 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 562 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
528 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 563 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
529 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { 564 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
530 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 565 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
531 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 566 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
532 var nextDay = newTime.getUTCDate(); 567 var nextDay = newTime.getUTCDate();
533 var nextYear = newTime.getUTCFullYear(); 568 var nextYear = newTime.getUTCFullYear();
534 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; 569 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
535 } 570 }
536 } 571 }
537 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 572 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
538 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { 573 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
539 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 574 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
540 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 575 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
541 var dday = newTime.getUTCDate(); 576 var dday = newTime.getUTCDate();
542 var dyear = newTime.getUTCFullYear(); 577 var dyear = newTime.getUTCFullYear();
543 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; 578 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
544 } 579 }
545 } 580 }
546 } 581 }
547 } 582 }
583
548 $scope.showLoader = false; 584 $scope.showLoader = false;
549 }) 585 })
550 }) 586 })
551 587
552 } 588 }
553 589
554 $scope.updateFutureFuelPricing = {}; 590 $scope.updateFutureFuelPricing = {};
555 $scope.updateFutureFuelPricing.futureFuelPricingList = []; 591 $scope.updateFutureFuelPricing.futureFuelPricingList = [];
556 $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; 592 $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId;
557 $scope.updateFutureFuelPricingClick = function(){ 593 $scope.updateFutureFuelPricingClick = function(){
558 $scope.showLoader = true; 594 $scope.showLoader = true;
559 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 595 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
560 //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin)); 596 //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin));
561 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 597 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
562 if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) { 598 if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) {
563 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); 599 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
564 if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { 600 if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) {
565 $scope.newFuelPricing[i].futureFuelPricing.cost = ''; 601 $scope.newFuelPricing[i].futureFuelPricing.cost = '';
566 } 602 }
567 if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { 603 if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) {
568 $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; 604 $scope.newFuelPricing[i].futureFuelPricing.papMargin = '';
569 } 605 }
570 if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { 606 if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) {
571 $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; 607 $scope.newFuelPricing[i].futureFuelPricing.papTotal = '';
572 } 608 }
573 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) { 609 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) {
574 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = ''; 610 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = '';
575 }else{ 611 }else{
576 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 612 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
577 console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 613 console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
578 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime(); 614 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime();
579 } 615 }
580 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) { 616 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) {
581 $scope.newFuelPricing[i].futureFuelPricing.deployDate = ''; 617 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';
582 }else{ 618 }else{
583 $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 619 $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
584 $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime(); 620 $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime();
585 } 621 }
586 622
587 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].futureFuelPricing.papMargin); 623 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].futureFuelPricing.papMargin);
588 //$scope.newFuelPricing[i].futureFuelPricing.papTotal; 624 //$scope.newFuelPricing[i].futureFuelPricing.papTotal;
589 $scope.updateFutureFuelPricing.futureFuelPricingList.push({ 625 $scope.updateFutureFuelPricing.futureFuelPricingList.push({
590 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, 626 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost,
591 'papMargin': $scope.newFuelPricing[i].futureFuelPricing.papMargin, 627 'papMargin': $scope.newFuelPricing[i].futureFuelPricing.papMargin,
592 //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, 628 //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal,
593 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, 629 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal,
594 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration, 630 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration,
595 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate, 631 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate,
596 'productId': $scope.newFuelPricing[i].id, 632 'productId': $scope.newFuelPricing[i].id,
597 'id': $scope.newFuelPricing[i].futureFuelPricing.id, 633 'id': $scope.newFuelPricing[i].futureFuelPricing.id,
598 }) 634 })
599 } 635 }
600 }else{ 636 }else{
601 /*$scope.newFuelPricing[i].futureFuelPricing.cost = ''; 637 /*$scope.newFuelPricing[i].futureFuelPricing.cost = '';
602 $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; 638 $scope.newFuelPricing[i].futureFuelPricing.papMargin = '';
603 $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; 639 $scope.newFuelPricing[i].futureFuelPricing.papTotal = '';
604 $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; 640 $scope.newFuelPricing[i].futureFuelPricing.expirationDate = '';
605 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/ 641 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/
606 } 642 }
607 } 643 }
608 //console.log('$scope.updateFutureFuelPricing', $scope.updateFutureFuelPricing); 644 //console.log('$scope.updateFutureFuelPricing', $scope.updateFutureFuelPricing);
609 updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) { 645 updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) {
610 toastr.success('Successfully Updated', { 646 toastr.success('Successfully Updated', {
611 closeButton: true 647 closeButton: true
612 }) 648 })
613 updateFuelManagerService.getFuelPricingNew().then(function(result) { 649 updateFuelManagerService.getFuelPricingNew().then(function(result) {
614 $scope.newFuelPricing = result; 650 $scope.newFuelPricing = result;
615 for (var i = 0; i<$scope.newFuelPricing.length; i++) { 651 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
616 if ($scope.newFuelPricing[i].fuelPricing != null) { 652 if ($scope.newFuelPricing[i].fuelPricing != null) {
617 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { 653 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
618 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); 654 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
619 var month = newTime.getUTCMonth() + 1; //months from 1-12 655 var month = newTime.getUTCMonth() + 1; //months from 1-12
620 var day = newTime.getUTCDate(); 656 var day = newTime.getUTCDate();
621 var year = newTime.getUTCFullYear(); 657 var year = newTime.getUTCFullYear();
622 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; 658 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
623 } 659 }
624 } 660 }
625 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 661 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
626 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 662 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
627 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { 663 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
628 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); 664 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
629 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 665 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
630 var nextDay = newTime.getUTCDate(); 666 var nextDay = newTime.getUTCDate();
631 var nextYear = newTime.getUTCFullYear(); 667 var nextYear = newTime.getUTCFullYear();
632 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; 668 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
633 } 669 }
634 } 670 }
635 if ($scope.newFuelPricing[i].futureFuelPricing != null) { 671 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
636 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { 672 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
637 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); 673 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
638 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 674 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
639 var dday = newTime.getUTCDate(); 675 var dday = newTime.getUTCDate();
640 var dyear = newTime.getUTCFullYear(); 676 var dyear = newTime.getUTCFullYear();
641 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; 677 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
642 } 678 }
643 } 679 }
644 } 680 }
681
682 var str =""+ $scope.newFuelPricing[i].name
683 if(str.startsWith("J")){
684 $scope.newFuelPricing[i].jeta = true;
685 var str1 = str.substring(0,5)
686 var str2 = str.substring(6, str.length)
687 $scope.newFuelPricing[i].name = str1
688 $scope.newFuelPricing[i].namejetrest = str2
689
690
691 }else if(str.startsWith("100")){
692 $scope.newFuelPricing[i].avgas = true;
693 var str1 = str.substring(0,5)
694 var str2 = str.substring(6, str.length)
695 $scope.newFuelPricing[i].name = str1
696 $scope.newFuelPricing[i].nameavgasrest = str2
697 }
698
645 } 699 }
646 $scope.showLoader = false; 700 $scope.showLoader = false;
647 }) 701 })
648 }) 702 })
649 703
650 704
651 } 705 }
652 706
707 $scope.updateFutureFuelPricingImmediatelyClick = function(){
708 $scope.showLoader = true;
709 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
710 //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin));
711 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
712 if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) {
713 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin);
714 if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) {
715 $scope.newFuelPricing[i].futureFuelPricing.cost = '';
716 }
717 if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) {
718 $scope.newFuelPricing[i].futureFuelPricing.papMargin = '';
719 }
720 if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) {
721 $scope.newFuelPricing[i].futureFuelPricing.papTotal = '';
722 }
723 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) {
724 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = '';
725 }else{
726 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
727 console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
728 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime();
729 }
730 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) {
731 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';
732 }else{
733 $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
734 $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime();
735 }
736
737 $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].futureFuelPricing.papMargin);
738 //$scope.newFuelPricing[i].futureFuelPricing.papTotal;
739 $scope.updateFutureFuelPricing.futureFuelPricingList.push({
740 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost,
741 'papMargin': $scope.newFuelPricing[i].futureFuelPricing.papMargin,
742 //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal,
743 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal,
744 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration,
745 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate,
746 'productId': $scope.newFuelPricing[i].id,
747 'id': $scope.newFuelPricing[i].futureFuelPricing.id,
748 })
749 }
750 }else{
751 /*$scope.newFuelPricing[i].futureFuelPricing.cost = '';
752 $scope.newFuelPricing[i].futureFuelPricing.papMargin = '';
753 $scope.newFuelPricing[i].futureFuelPricing.papTotal = '';
754 $scope.newFuelPricing[i].futureFuelPricing.expirationDate = '';
755 $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/
756 }
757 }
758 //console.log('$scope.updateFutureFuelPricing', $scope.updateFutureFuelPricing);
759 updateFuelManagerService.updateFutureFuelPricingImmediatlly($scope.updateFutureFuelPricing).then(function(result) {
760 toastr.success('Successfully Updated', {
761 closeButton: true
762 })
763 updateFuelManagerService.getFuelPricingNew().then(function(result) {
764 $scope.newFuelPricing = result;
765 for (var i = 0; i<$scope.newFuelPricing.length; i++) {
766 if ($scope.newFuelPricing[i].fuelPricing != null) {
767 if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') {
768 var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate);
769 var month = newTime.getUTCMonth() + 1; //months from 1-12
770 var day = newTime.getUTCDate();
771 var year = newTime.getUTCFullYear();
772 $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year;
773 }
774 }
775 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
776 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
777 if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') {
778 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration);
779 var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12
780 var nextDay = newTime.getUTCDate();
781 var nextYear = newTime.getUTCFullYear();
782 $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear;
783 }
784 }
785 if ($scope.newFuelPricing[i].futureFuelPricing != null) {
786 if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') {
787 var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate);
788 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
789 var dday = newTime.getUTCDate();
790 var dyear = newTime.getUTCFullYear();
791 $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear;
792 }
793 }
794 }
795
796 var str =""+ $scope.newFuelPricing[i].name
797 if(str.startsWith("J")){
798 $scope.newFuelPricing[i].jeta = true;
799 var str1 = str.substring(0,5)
800 var str2 = str.substring(6, str.length)
801 $scope.newFuelPricing[i].name = str1
802 $scope.newFuelPricing[i].namejetrest = str2
803
804
805 }else if(str.startsWith("100")){
806 $scope.newFuelPricing[i].avgas = true;
807 var str1 = str.substring(0,5)
808 var str2 = str.substring(6, str.length)
809 $scope.newFuelPricing[i].name = str1
810 $scope.newFuelPricing[i].nameavgasrest = str2
811 }
812
813 }
814 $scope.showLoader = false;
815 })
816 })
817 }
818
653 updateFuelManagerService.getMargin().then(function(result) { 819 updateFuelManagerService.getMargin().then(function(result) {
654 $scope.marginList = result; 820 $scope.marginList = result;
655 }) 821 })
656 822
657 $scope.marginIdDelete = ''; 823 $scope.marginIdDelete = '';
658 $scope.deleteJetAccordian = function(id){ 824 $scope.deleteJetAccordian = function(id){
659 $scope.marginIdDelete = id; 825 $scope.marginIdDelete = id;
660 $('#deleteMargin').css('display', 'block'); 826 $('#deleteMargin').css('display', 'block');
661 } 827 }
662 828
663 $scope.confirmDeleteMargin = function(){ 829 $scope.confirmDeleteMargin = function(){
664 $('#deleteMargin').css('display', 'none'); 830 $('#deleteMargin').css('display', 'none');
665 $scope.showLoader = true; 831 $scope.showLoader = true;
666 updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) { 832 updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) {
667 toastr.success(''+result.success+'', { 833 toastr.success(''+result.success+'', {
668 closeButton: true 834 closeButton: true
669 }) 835 })
670 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { 836 updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) {
671 $scope.aTypeJets = result; 837 $scope.aTypeJets = result;
672 $scope.showLoader = false; 838 $scope.showLoader = false;
673 }) 839 })
674 }) 840 })
675 } 841 }
676 842
677 $scope.cancelMarginDelete = function(){ 843 $scope.cancelMarginDelete = function(){
678 $scope.marginIdDelete = ''; 844 $scope.marginIdDelete = '';
679 $('#deleteMargin').css('display', 'none'); 845 $('#deleteMargin').css('display', 'none');
680 } 846 }
681 847
682 $scope.marginVtypeIdDelete = ''; 848 $scope.marginVtypeIdDelete = '';
683 $scope.deleteVtypeJetAccordian = function(id){ 849 $scope.deleteVtypeJetAccordian = function(id){
684 $scope.marginVtypeIdDelete = id; 850 $scope.marginVtypeIdDelete = id;
685 $('#deleteVtypeMargin').css('display', 'block'); 851 $('#deleteVtypeMargin').css('display', 'block');
686 } 852 }
687 853
688 $scope.confirmDeletVtypeMargin = function(){ 854 $scope.confirmDeletVtypeMargin = function(){
689 $('#deleteVtypeMargin').css('display', 'none'); 855 $('#deleteVtypeMargin').css('display', 'none');
690 $scope.showLoader = true; 856 $scope.showLoader = true;
691 updateFuelManagerService.deleteMargin($scope.marginVtypeIdDelete).then(function(result) { 857 updateFuelManagerService.deleteMargin($scope.marginVtypeIdDelete).then(function(result) {
692 toastr.success(''+result.success+'', { 858 toastr.success(''+result.success+'', {
693 closeButton: true 859 closeButton: true
694 }) 860 })
695 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { 861 updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) {
696 $scope.vTypeJets = result; 862 $scope.vTypeJets = result;
697 $scope.showLoader = false; 863 $scope.showLoader = false;
698 }) 864 })
699 }) 865 })
700 } 866 }
701 867
702 $scope.cancelVtypeMarginDelete = function(){ 868 $scope.cancelVtypeMarginDelete = function(){
703 $scope.marginVtypeIdDelete = ''; 869 $scope.marginVtypeIdDelete = '';
704 $('#deleteVtypeMargin').css('display', 'none'); 870 $('#deleteVtypeMargin').css('display', 'none');
705 } 871 }
706 872
707 873
708 874
709 875
710 876
711 }]); 877 }]);
712 878
713 879
714 880
app/partials/updateFuelManager/updateFuelManager.html
1 1
2 2
3 <style> 3 <style>
4 .subnavbar .mainnav > li:nth-child(2) > a{ 4 .subnavbar .mainnav > li:nth-child(2) > a{
5 color: #ff9900; 5 color: #ff9900;
6 } 6 }
7 </style> 7 </style>
8 <div class="myLoader" ng-show="showLoader"> 8 <div class="myLoader" ng-show="showLoader">
9 <img src="../img/hourglass.gif" width="50px;"> 9 <img src="../img/hourglass.gif" width="50px;">
10 </div> 10 </div>
11 <div style="width: 96%; margin-left: 2%;"> 11 <div style="width: 96%; margin-left: 2%;">
12 <div class="row"> 12 <div class="row">
13 13
14 <div class="col-md-6"> 14 <div class="col-md-6">
15 <div class="widget stacked"> 15 <div class="widget stacked">
16 <div class="widget-header"> 16 <div class="widget-header">
17 <i class="fa fa-pencil"></i> 17 <i class="fa fa-pencil"></i>
18 <h3>Price Manager Staging</h3> 18 <h3>Price Manager Staging</h3>
19 </div> 19 </div>
20 <!-- /widget-header --> 20 <!-- /widget-header -->
21 <div class="widget-content"> 21 <div class="widget-content">
22 <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6> 22 <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6>
23 <form> 23 <form>
24 <table class="table"> 24 <table class="table">
25 <thead> 25 <thead>
26 <tr> 26 <tr>
27 <th> Product</th> 27 <th> Product</th>
28 <th> Cost</th> 28 <th> Cost</th>
29 <th> PAP(Margin)</th> 29 <th> PAP(Margin)</th>
30 <th> Deploy Date</th> 30 <th> Deploy Date</th>
31 <th style="color: #F90;">Price Expires</th> 31 <th style="color: #F90;">Price Expires</th>
32 <th> PAP(Total)</th> 32 <th> PAP(Total)</th>
33 </tr> 33 </tr>
34 </thead> 34 </thead>
35 <tbody> 35 <tbody>
36 <tr ng-repeat="fuelPricing in newFuelPricing"> 36 <tr ng-repeat="fuelPricing in newFuelPricing">
37 <td> 37 <td>
38 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> 38 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span>
39 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> 39 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span>
40 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> 40 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span>
41 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> 41 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span>
42 </td> 42 </td>
43 <td> 43 <td>
44 <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> 44 <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;">
45 </td> 45 </td>
46 <td> 46 <td>
47 <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;"> 47 <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;">
48 </td> 48 </td>
49 <td> 49 <td>
50 <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 80px; padding: 6px 6px;"> 50 <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 80px; padding: 6px 6px;">
51 </td> 51 </td>
52 <td> 52 <td>
53 <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 80px; padding: 6px 6px;"> 53 <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 80px; padding: 6px 6px;">
54 </td> 54 </td>
55 <td> 55 <td>
56 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.futureFuelPricing.papMargin | number : 2}}</span> 56 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.futureFuelPricing.papMargin | number : 2}}</span>
57 </td> 57 </td>
58 </tr> 58 </tr>
59 </tbody> 59 </tbody>
60 </table> 60 </table>
61 <div class="row" style="margin-left: 0px;"> 61 <div class="row" style="margin-left: 0px;">
62 <div class="col-md-12" style= "text-align: right;"> 62 <div class="col-md-12" style= "text-align: right;">
63 <div style="float: left;"> 63 <div style="float: left;">
64 <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button> 64 <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingImmediatelyClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button>
65 65
66 <button type="reset" class="btn btn-default btn-xs">Reset All</button> 66 <button type="reset" class="btn btn-default btn-xs">Reset All</button>
67 </div> 67 </div>
68 <div style="float: right;"> 68 <div style="float: right;">
69 <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button> 69 <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button>
70 </div> 70 </div>
71 <div style="clear: both;"></div> 71 <div style="clear: both;"></div>
72 </div> 72 </div>
73 </div> 73 </div>
74 </form> 74 </form>
75 </div> 75 </div>
76 <!-- /widget-content --> 76 <!-- /widget-content -->
77 </div> 77 </div>
78 <!-- /widget --> 78 <!-- /widget -->
79 </div> 79 </div>
80 80
81 <div class="col-md-6"> 81 <div class="col-md-6">
82 <div class="widget stacked"> 82 <div class="widget stacked">
83 <div class="widget-header"> 83 <div class="widget-header">
84 <i class="fa fa-pencil"></i> 84 <i class="fa fa-pencil"></i>
85 <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3> 85 <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3>
86 86
87 </div> 87 </div>
88 <!-- /widget-header --> 88 <!-- /widget-header -->
89 <div class="widget-content" style="padding-top: 10px;"> 89 <div class="widget-content" style="padding-top: 10px;">
90 <section id="accordions"> 90 <section id="accordions">
91 <div class="newCustomAccordian"> 91 <div class="newCustomAccordian">
92 <!-- tab 1 --> 92 <!-- tab 1 -->
93 <div ng-repeat="jets in aTypeJets"> 93 <div ng-repeat="jets in aTypeJets">
94 <div class="customAccordianHeader" id="{{jets.id}}"> 94 <div class="customAccordianHeader" id="{{jets.id}}">
95 <span>{{jets.marginName}}</span> 95 <span>{{jets.marginName}}</span>
96 <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> 96 <select class="form-control" disabled="true" ng-model="jets.pricingStructure">
97 <option value="" disabled selected>Pricing Structure</option> 97 <option value="" disabled selected>Pricing Structure</option>
98 <option value="minus">Retail/PAP-(minus)</option> 98 <option value="minus">Retail/PAP-(minus)</option>
99 <option value="plus">Cost+(plus)</option> 99 <option value="plus">Cost+(plus)</option>
100 </select> 100 </select>
101 <span style="margin-right: 0;">$</span> 101 <span style="margin-right: 0;">$</span>
102 <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> 102 <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue">
103 <div class="pull-right"> 103 <div class="pull-right">
104 <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> 104 <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button>
105 <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> 105 <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button>
106 <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> 106 <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button>
107 <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin(jets.id)" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> 107 <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin(jets.id)" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button>
108 <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> 108 <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button>
109 </div> 109 </div>
110 <div class="clearfix"></div> 110 <div class="clearfix"></div>
111 </div> 111 </div>
112 <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> 112 <div class="customAccordianTabBody {{jets.id}}" style="display: none;">
113 <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> 113 <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList">
114 <div class="tierListHead" style="height: 36px;"> 114 <div class="tierListHead" style="height: 36px;">
115 <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. 115 <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal.
116 </span> 116 </span>
117 <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> 117 <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i>
118 118
119 <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> 119 <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier">
120 <span ng-show="showEditTier">-</span> 120 <span ng-show="showEditTier">-</span>
121 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> 121 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b>
122 <div class="clearfix"></div> 122 <div class="clearfix"></div>
123 </div> 123 </div>
124 <div class="tierListBody" style="height: 35px;"> 124 <div class="tierListBody" style="height: 35px;">
125 <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> 125 <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span>
126 126
127 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> &nbsp; 127 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> &nbsp;
128 128
129 <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> 129 <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span>
130 130
131 <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> 131 <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button>
132 132
133 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> 133 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i>
134 134
135 <div class="clearfix"></div> 135 <div class="clearfix"></div>
136 </div> 136 </div>
137 </div> 137 </div>
138 <div class="tierListWrap" style="width: 160px;"> 138 <div class="tierListWrap" style="width: 160px;">
139 <div class="tierListHead" style="border-right: 1px solid #ddd;"> 139 <div class="tierListHead" style="border-right: 1px solid #ddd;">
140 <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> 140 <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak">
141 <span>-</span> 141 <span>-</span>
142 <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> 142 <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b>
143 <div class="clearfix"></div> 143 <div class="clearfix"></div>
144 </div> 144 </div>
145 <div class="tierListBody" style="border-right: 1px solid #ddd;"> 145 <div class="tierListBody" style="border-right: 1px solid #ddd;">
146 <span style="color: #449d44;">$</span> 146 <span style="color: #449d44;">$</span>
147 <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> 147 <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;">
148 <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> 148 <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button>
149 <div class="clearfix"></div> 149 <div class="clearfix"></div>
150 </div> 150 </div>
151 </div> 151 </div>
152 <!-- <div class="tierListWrap" style="width: 32px;"> 152 <!-- <div class="tierListWrap" style="width: 32px;">
153 <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> 153 <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;">
154 &nbsp; 154 &nbsp;
155 </div> 155 </div>
156 <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> 156 <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;">
157 <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> 157 <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i>
158 </div> 158 </div>
159 </div> --> 159 </div> -->
160 <div class="clearfix"></div> 160 <div class="clearfix"></div>
161 <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> 161 <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> -->
162 <br/> 162 <br/>
163 <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> 163 <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div>
164 </div> 164 </div>
165 </div> 165 </div>
166 </div> 166 </div>
167 <div class="pull-right"> 167 <div class="pull-right">
168 <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> 168 <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button>
169 </div> 169 </div>
170 </section> 170 </section>
171 <!-- <div class="row">&nbsp;</div> 171 <!-- <div class="row">&nbsp;</div>
172 <div class="row"> 172 <div class="row">
173 <div class="form-group"> 173 <div class="form-group">
174 <div class="col-lg-12 text-right"> 174 <div class="col-lg-12 text-right">
175 <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button>&nbsp;&nbsp; 175 <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button>&nbsp;&nbsp;
176 <button type="reset" class="btn btn-default">Cancel</button> 176 <button type="reset" class="btn btn-default">Cancel</button>
177 </div> 177 </div>
178 </div> 178 </div>
179 </div> --> 179 </div> -->
180 </div> 180 </div>
181 <!-- /widget-content --> 181 <!-- /widget-content -->
182 </div> 182 </div>
183 <!-- /widget --> 183 <!-- /widget -->
184 </div> 184 </div>
185 <!-- /span6 --> 185 <!-- /span6 -->
186 </div> 186 </div>
187 <!-- /span12 --> 187 <!-- /span12 -->
188 </div> 188 </div>
189 <!-- /row --> 189 <!-- /row -->
190 <div style="width: 96%; margin-left: 2%;"> 190 <div style="width: 96%; margin-left: 2%;">
191 <div class="row"> 191 <div class="row">
192 <div class="col-md-6"> 192 <div class="col-md-6">
193 <div class="widget stacked"> 193 <div class="widget stacked">
194 <div class="widget-header"> 194 <div class="widget-header">
195 <i class="fa fa-pencil"></i> 195 <i class="fa fa-pencil"></i>
196 <h3>Price Manager</h3> 196 <h3>Price Manager</h3>
197 <select 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-change="confirmMail()"> 197 <select 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-change="confirmMail()">
198 <option value="" disabled selected="selected">Email All Pricing</option> 198 <option value="" disabled selected="selected">Email All Pricing</option>
199 <option value="JET-A">Email JET-A pricing only</option> 199 <option value="JET-A">Email JET-A pricing only</option>
200 <option value="AVGAS">Email AVGAS pricing only</option> 200 <option value="AVGAS">Email AVGAS pricing only</option>
201 <option disabled>_______________________________</option> 201 <option disabled>_______________________________</option>
202 <option value="all">Distribute All</option> 202 <option value="all">Distribute All</option>
203 </select> 203 </select>
204 </div> 204 </div>
205 <!-- /widget-header --> 205 <!-- /widget-header -->
206 <div class="widget-content"> 206 <div class="widget-content">
207 <h4>Update Fuel Price Here</h4> 207 <h4>Update Fuel Price Here</h4>
208 <table class="table"> 208 <table class="table">
209 <thead> 209 <thead>
210 <tr> 210 <tr>
211 <th> Product</th> 211 <th> Product</th>
212 <th> Cost</th> 212 <th> Cost</th>
213 <th> Margin</th> 213 <th> Margin</th>
214 <th> PAP(Total)</th> 214 <th> PAP(Total)</th>
215 <th style="color: #F90;"> Expires</th> 215 <th style="color: #F90;"> Expires</th>
216 </tr> 216 </tr>
217 </thead> 217 </thead>
218 <tbody> 218 <tbody>
219 <tr ng-repeat="fuelPricing in newFuelPricing"> 219 <tr ng-repeat="fuelPricing in newFuelPricing">
220 <td> 220 <td>
221 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> 221 <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span>
222 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> 222 <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span>
223 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> 223 <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span>
224 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> 224 <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span>
225 </td> 225 </td>
226 <td> 226 <td>
227 <span>{{fuelPricing.fuelPricing.cost}}</span> 227 <span>{{fuelPricing.fuelPricing.cost}}</span>
228 </td> 228 </td>
229 <td> 229 <td>
230 <span>{{fuelPricing.fuelPricing.papMargin}}</span> 230 <span>{{fuelPricing.fuelPricing.papMargin}}</span>
231 </td> 231 </td>
232 <td> 232 <td>
233 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> 233 <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span>
234 </td> 234 </td>
235 <td> 235 <td>
236 <span>{{fuelPricing.fuelPricing.expirationDate}}</span> 236 <span>{{fuelPricing.fuelPricing.expirationDate}}</span>
237 </td> 237 </td>
238 </tr> 238 </tr>
239 </tbody> 239 </tbody>
240 </table> 240 </table>
241 <div class="row" style="margin-left: 0px;"> 241 <div class="row" style="margin-left: 0px;">
242 <div class="col-md-12" style= "text-align: right;"> 242 <div class="col-md-12" style= "text-align: right;">
243 <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()" style="font-size:14px; margin-right:3%">Save</button> 243 <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()" style="font-size:14px; margin-right:3%">Save</button>
244 </div> 244 </div>
245 </div> 245 </div>
246 </div> 246 </div>
247 <!-- /widget-content --> 247 <!-- /widget-content -->
248 </div> 248 </div>
249 <!-- /widget --> 249 <!-- /widget -->
250 </div> 250 </div>
251 251
252 <div class="col-md-6"> 252 <div class="col-md-6">
253 <div class="widget stacked"> 253 <div class="widget stacked">
254 <div class="widget-header"> 254 <div class="widget-header">
255 <i class="fa fa-pencil"></i> 255 <i class="fa fa-pencil"></i>
256 <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> 256 <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3>
257 257
258 </div> 258 </div>
259 <!-- /widget-header --> 259 <!-- /widget-header -->
260 <div class="widget-content" style="padding-top: 10px;"> 260 <div class="widget-content" style="padding-top: 10px;">
261 <section id="accordions"> 261 <section id="accordions">
262 <div class="newCustomAccordian"> 262 <div class="newCustomAccordian">
263 <!-- tab 1 --> 263 <!-- tab 1 -->
264 <div ng-repeat="jets in vTypeJets"> 264 <div ng-repeat="jets in vTypeJets">
265 <div class="customAccordianHeader" id="{{jets.id}}"> 265 <div class="customAccordianHeader" id="{{jets.id}}">
266 <span>{{jets.marginName}}</span> 266 <span>{{jets.marginName}}</span>
267 <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> 267 <select class="form-control" disabled="true" ng-model="jets.pricingStructure">
268 <option value="" disabled selected>Pricing Structure</option> 268 <option value="" disabled selected>Pricing Structure</option>
269 <option value="minus">Retail-(minus)</option> 269 <option value="minus">Retail-(minus)</option>
270 <option value="plus">Cost+(plus)</option> 270 <option value="plus">Cost+(plus)</option>
271 <option value="equal">Direct=(equal)</option> 271 <option value="equal">Direct=(equal)</option>
272 </select> 272 </select>
273 <span style="margin-right: 0;">$</span> 273 <span style="margin-right: 0;">$</span>
274 <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> 274 <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue">
275 <div class="pull-right"> 275 <div class="pull-right">
276 <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button> 276 <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button>
277 <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> 277 <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button>
278 <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> 278 <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button>
279 <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> 279 <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button>
280 <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> 280 <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button>
281 </div> 281 </div>
282 <div class="clearfix"></div> 282 <div class="clearfix"></div>
283 </div> 283 </div>
284 <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> 284 <div class="customAccordianTabBody {{jets.id}}" style="display: none;">
285 <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> 285 <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList">
286 <div class="tierListHead" style="height: 36px;"> 286 <div class="tierListHead" style="height: 36px;">
287 <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. 287 <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal.
288 </span> 288 </span>
289 <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> 289 <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i>
290 290
291 <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> 291 <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier">
292 <span ng-show="showEditTier">-</span> 292 <span ng-show="showEditTier">-</span>
293 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> 293 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b>
294 <div class="clearfix"></div> 294 <div class="clearfix"></div>
295 </div> 295 </div>
296 <div class="tierListBody" style="height: 35px;"> 296 <div class="tierListBody" style="height: 35px;">
297 <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> 297 <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span>
298 298
299 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> &nbsp; 299 <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> &nbsp;
300 300
301 <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> 301 <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span>
302 302
303 <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> 303 <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button>
304 304
305 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> 305 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i>
306 306
307 <div class="clearfix"></div> 307 <div class="clearfix"></div>
308 </div> 308 </div>
309 </div> 309 </div>
310 <div class="tierListWrap" style="width: 160px;"> 310 <div class="tierListWrap" style="width: 160px;">
311 <div class="tierListHead" style="border-right: 1px solid #ddd;"> 311 <div class="tierListHead" style="border-right: 1px solid #ddd;">
312 <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> 312 <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak">
313 <span>-</span> 313 <span>-</span>
314 <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> 314 <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b>
315 <div class="clearfix"></div> 315 <div class="clearfix"></div>
316 </div> 316 </div>
317 <div class="tierListBody" style="border-right: 1px solid #ddd;"> 317 <div class="tierListBody" style="border-right: 1px solid #ddd;">
318 <span style="color: #449d44;">$</span> 318 <span style="color: #449d44;">$</span>
319 <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> 319 <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;">
320 <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> 320 <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button>
321 <div class="clearfix"></div> 321 <div class="clearfix"></div>
322 </div> 322 </div>
323 </div> 323 </div>
324 <!-- <div class="tierListWrap" style="width: 32px;"> 324 <!-- <div class="tierListWrap" style="width: 32px;">
325 <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> 325 <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;">
326 &nbsp; 326 &nbsp;
327 </div> 327 </div>
328 <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> 328 <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;">
329 <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> 329 <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i>
330 </div> 330 </div>
331 </div> --> 331 </div> -->
332 <div class="clearfix"></div> 332 <div class="clearfix"></div>
333 <br/> 333 <br/>
334 <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> 334 <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div>
335 </div> 335 </div>
336 </div> 336 </div>
337 </div> 337 </div>
338 <div class="pull-right"> 338 <div class="pull-right">
339 <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> 339 <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button>
340 </div> 340 </div>
341 </section> 341 </section>
342 <!-- <div class="row">&nbsp;</div> 342 <!-- <div class="row">&nbsp;</div>
343 <div class="row"> 343 <div class="row">
344 <div class="form-group"> 344 <div class="form-group">
345 <div class="col-lg-12 text-right"> 345 <div class="col-lg-12 text-right">
346 <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button>&nbsp;&nbsp; 346 <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button>&nbsp;&nbsp;
347 <button type="reset" class="btn btn-default">Cancel</button> 347 <button type="reset" class="btn btn-default">Cancel</button>
348 </div> 348 </div>
349 </div> 349 </div>
350 </div> --> 350 </div> -->
351 </div> 351 </div>
352 <!-- /widget-content --> 352 <!-- /widget-content -->
353 </div> 353 </div>
354 <!-- /widget --> 354 <!-- /widget -->
355 </div> 355 </div>
356 <!-- /span6 --> 356 <!-- /span6 -->
357 </div> 357 </div>
358 </div> 358 </div>
359 </div> 359 </div>
360 </div> <!-- /container --> 360 </div> <!-- /container -->
361 361
362 362
363 <div class="addNewMargin" style="display: none;"> 363 <div class="addNewMargin" style="display: none;">
364 <div class="customBackdrop"> 364 <div class="customBackdrop">
365 <div class="customModalInner" style="max-width: 700px;"> 365 <div class="customModalInner" style="max-width: 700px;">
366 <div class="customModelHead"> 366 <div class="customModelHead">
367 <p class="pull-left"> 367 <p class="pull-left">
368 <i class="fa fa-list-alt" aria-hidden="true"></i> 368 <i class="fa fa-list-alt" aria-hidden="true"></i>
369 Add New JET-A Customer Margin 369 Add New JET-A Customer Margin
370 </p> 370 </p>
371 <p class="pull-right"> 371 <p class="pull-right">
372 <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> 372 <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i>
373 </p> 373 </p>
374 <div class="clearfix"></div> 374 <div class="clearfix"></div>
375 </div> 375 </div>
376 <div class="customModelBody"> 376 <div class="customModelBody">
377 377
378 <div class="customAccordianHeader customActive"> 378 <div class="customAccordianHeader customActive">
379 <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> 379 <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName">
380 <select class="form-control" ng-model="newJet.pricingStructure"> 380 <select class="form-control" ng-model="newJet.pricingStructure">
381 <option value="" disabled selected>Pricing Structure</option> 381 <option value="" disabled selected>Pricing Structure</option>
382 <option value="minus">Retail-(minus)</option> 382 <option value="minus">Retail-(minus)</option>
383 <option value="plus">Cost+(plus)</option> 383 <option value="plus">Cost+(plus)</option>
384 <option value="equal">Direct=(equal)</option> 384 <option value="equal">Direct=(equal)</option>
385 </select> 385 </select>
386 <span style="margin-right: 0;">$</span> 386 <span style="margin-right: 0;">$</span>
387 <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> 387 <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue">
388 <div class="clearfix"></div> 388 <div class="clearfix"></div>
389 </div> 389 </div>
390 <div class="customAccordianTabBody"> 390 <div class="customAccordianTabBody">
391 <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> 391 <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div>
392 </div> 392 </div>
393 393
394 </div> 394 </div>
395 <div class="customModelFooter text-center"> 395 <div class="customModelFooter text-center">
396 <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> 396 <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()">
397 <button class="btn" ng-click="closeMarginPopup()">Cancel</button> 397 <button class="btn" ng-click="closeMarginPopup()">Cancel</button>
398 </div> 398 </div>
399 </div> 399 </div>
400 </div> 400 </div>
401 </div> 401 </div>
402 402
403 <div class="addNewVtype" style="display: none;"> 403 <div class="addNewVtype" style="display: none;">
404 <div class="customBackdrop"> 404 <div class="customBackdrop">
405 <div class="customModalInner" style="max-width: 700px;"> 405 <div class="customModalInner" style="max-width: 700px;">
406 <div class="customModelHead"> 406 <div class="customModelHead">
407 <p class="pull-left"> 407 <p class="pull-left">
408 <i class="fa fa-list-alt" aria-hidden="true"></i> 408 <i class="fa fa-list-alt" aria-hidden="true"></i>
409 Add New AVGAS 100LL Customer Margin Template 409 Add New AVGAS 100LL Customer Margin Template
410 </p> 410 </p>
411 <p class="pull-right"> 411 <p class="pull-right">
412 <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> 412 <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i>
413 </p> 413 </p>
414 <div class="clearfix"></div> 414 <div class="clearfix"></div>
415 </div> 415 </div>
416 <div class="customModelBody"> 416 <div class="customModelBody">
417 417
418 <div class="customAccordianHeader customActive"> 418 <div class="customAccordianHeader customActive">
419 <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> 419 <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName">
420 <select class="form-control" ng-model="newVtypeJet.pricingStructure"> 420 <select class="form-control" ng-model="newVtypeJet.pricingStructure">
421 <option value="" disabled selected>Pricing Structure</option> 421 <option value="" disabled selected>Pricing Structure</option>
422 <option value="minus">Retail-(minus)</option> 422 <option value="minus">Retail-(minus)</option>
423 <option value="plus">Cost+(plus)</option> 423 <option value="plus">Cost+(plus)</option>
424 <option value="equal">Direct=(equal)</option> 424 <option value="equal">Direct=(equal)</option>
425 </select> 425 </select>
426 <span style="margin-right: 0;">$</span> 426 <span style="margin-right: 0;">$</span>
427 <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> 427 <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue">
428 <div class="clearfix"></div> 428 <div class="clearfix"></div>
429 </div> 429 </div>
430 <div class="customAccordianTabBody"> 430 <div class="customAccordianTabBody">
431 <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> 431 <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div>
432 </div> 432 </div>
433 433
434 </div> 434 </div>
435 <div class="customModelFooter text-center"> 435 <div class="customModelFooter text-center">
436 <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> 436 <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()">
437 <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> 437 <button class="btn" ng-click="closeNewVtypePop()">Cancel</button>
438 </div> 438 </div>
439 </div> 439 </div>
440 </div> 440 </div>
441 </div> 441 </div>
442 442
443 <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> 443 <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;">
444 <div class="customModalInner"> 444 <div class="customModalInner">
445 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 445 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
446 <table> 446 <table>
447 <tr> 447 <tr>
448 <td> 448 <td>
449 <img src="img/info.png" style="width: 50px;"> 449 <img src="img/info.png" style="width: 50px;">
450 </td> 450 </td>
451 <td> 451 <td>
452 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> 452 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p>
453 </td> 453 </td>
454 </tr> 454 </tr>
455 </table> 455 </table>
456 </div> 456 </div>
457 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 457 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
458 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> 458 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button>
459 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> 459 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button>
460 </div> 460 </div>
461 </div> 461 </div>
462 </div> 462 </div>
463 <div class="customConfirmPopBackdrop" id="confirm2" style="display: none;"> 463 <div class="customConfirmPopBackdrop" id="confirm2" style="display: none;">
464 <div class="customModalInner"> 464 <div class="customModalInner">
465 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 465 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
466 <table> 466 <table>
467 <tr> 467 <tr>
468 <td> 468 <td>
469 <img src="img/info.png" style="width: 50px;"> 469 <img src="img/info.png" style="width: 50px;">
470 </td> 470 </td>
471 <td> 471 <td>
472 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing for this margin?</p> 472 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing for this margin?</p>
473 </td> 473 </td>
474 </tr> 474 </tr>
475 </table> 475 </table>
476 </div> 476 </div>
477 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 477 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
478 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseForMarginConfirm()">Yes</button> 478 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseForMarginConfirm()">Yes</button>
479 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseForMarginConfirm()">Cancel</button> 479 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseForMarginConfirm()">Cancel</button>
480 </div> 480 </div>
481 </div> 481 </div>
482 </div> 482 </div>
483 483
484 <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> 484 <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;">
485 <div class="customModalInner"> 485 <div class="customModalInner">
486 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 486 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
487 <table> 487 <table>
488 <tr> 488 <tr>
489 <td> 489 <td>
490 <img src="img/info.png" style="width: 50px;"> 490 <img src="img/info.png" style="width: 50px;">
491 </td> 491 </td>
492 <td> 492 <td>
493 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> 493 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p>
494 </td> 494 </td>
495 </tr> 495 </tr>
496 </table> 496 </table>
497 </div> 497 </div>
498 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 498 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
499 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> 499 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button>
500 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> 500 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button>
501 </div> 501 </div>
502 </div> 502 </div>
503 </div> 503 </div>
504 504
505 <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> 505 <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;">
506 <div class="customModalInner"> 506 <div class="customModalInner">
507 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 507 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
508 <table> 508 <table>
509 <tr> 509 <tr>
510 <td> 510 <td>
511 <img src="img/info.png" style="width: 50px;"> 511 <img src="img/info.png" style="width: 50px;">
512 </td> 512 </td>
513 <td> 513 <td>
514 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> 514 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p>
515 </td> 515 </td>
516 </tr> 516 </tr>
517 </table> 517 </table>
518 </div> 518 </div>
519 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 519 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
520 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button> 520 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button>
521 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button> 521 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button>
522 </div> 522 </div>
523 </div> 523 </div>
524 </div> 524 </div>
525 525
526 <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;"> 526 <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;">
527 <div class="customModalInner"> 527 <div class="customModalInner">
528 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 528 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
529 <table> 529 <table>
530 <tr> 530 <tr>
531 <td> 531 <td>
532 <img src="img/info.png" style="width: 50px;"> 532 <img src="img/info.png" style="width: 50px;">
533 </td> 533 </td>
534 <td> 534 <td>
535 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> 535 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p>
536 </td> 536 </td>
537 </tr> 537 </tr>
538 </table> 538 </table>
539 </div> 539 </div>
540 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 540 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
541 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button> 541 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button>
542 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button> 542 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button>
543 </div> 543 </div>
544 </div> 544 </div>
545 </div> 545 </div>
546 546
547 <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;"> 547 <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;">
548 <div class="customModalInner"> 548 <div class="customModalInner">
549 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 549 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
550 <table> 550 <table>
551 <tr> 551 <tr>
552 <td> 552 <td>
553 <img src="img/info.png" style="width: 50px;"> 553 <img src="img/info.png" style="width: 50px;">
554 </td> 554 </td>
555 <td> 555 <td>
556 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> 556 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</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="confirmDeletVtypeMargin()">Yes</button> 562 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeletVtypeMargin()">Yes</button>
563 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button> 563 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button>
564 </div> 564 </div>
565 </div> 565 </div>
566 </div> 566 </div>
567 567
568 <!-- Le javascript 568 <!-- Le javascript
569 ================================================== --> 569 ================================================== -->
570 <!-- Placed at the end of the document so the pages load faster --> 570 <!-- Placed at the end of the document so the pages load faster -->
571 <!-- <script> 571 <!-- <script>
572 CKEDITOR.replace( 'editor2', { 572 CKEDITOR.replace( 'editor2', {
573 height: 250, 573 height: 250,
574 extraPlugins: 'divarea' 574 extraPlugins: 'divarea'
575 } ); 575 } );
576 </script> --> 576 </script> -->
app/partials/updateFuelManager/updateFuelManager.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('updateFuelManagerService', ['$q', '$http', 'BASE_URL', updateFuelManagerService]); 4 .service('updateFuelManagerService', ['$q', '$http', 'BASE_URL', updateFuelManagerService]);
5 5
6 function updateFuelManagerService($q, $http, BASE_URL) { 6 function updateFuelManagerService($q, $http, BASE_URL) {
7 var temp = {}; 7 var temp = {};
8 8
9 this.getATypeJets = function(id) { 9 this.getATypeJets = function(id) {
10 10
11 var deferred = $q.defer(); 11 var deferred = $q.defer();
12 $http({ 12 $http({
13 method : 'GET', 13 method : 'GET',
14 url : BASE_URL.url +'/margin/getJetAType/'+id, 14 url : BASE_URL.url +'/margin/getJetAType/'+id,
15 headers : {'Content-Type': 'application/json'}, 15 headers : {'Content-Type': 'application/json'},
16 }) 16 })
17 .then(function (result){ 17 .then(function (result){
18 deferred.resolve(result.data); 18 deferred.resolve(result.data);
19 },function (result){ 19 },function (result){
20 deferred.resolve(result.data); 20 deferred.resolve(result.data);
21 }) 21 })
22 return deferred.promise; 22 return deferred.promise;
23 } 23 }
24 24
25 this.getVTypeJets = function(id) { 25 this.getVTypeJets = function(id) {
26 26
27 var deferred = $q.defer(); 27 var deferred = $q.defer();
28 $http({ 28 $http({
29 method : 'GET', 29 method : 'GET',
30 url : BASE_URL.url +'/margin/getAVGASType/'+id, 30 url : BASE_URL.url +'/margin/getAVGASType/'+id,
31 headers : {'Content-Type': 'application/json'}, 31 headers : {'Content-Type': 'application/json'},
32 }) 32 })
33 .then(function (result){ 33 .then(function (result){
34 deferred.resolve(result.data); 34 deferred.resolve(result.data);
35 },function (result){ 35 },function (result){
36 deferred.resolve(result.data); 36 deferred.resolve(result.data);
37 }) 37 })
38 return deferred.promise; 38 return deferred.promise;
39 } 39 }
40 40
41 this.addNewAtypeJetMargin = function(data){ 41 this.addNewAtypeJetMargin = function(data){
42 var deferred = $q.defer(); 42 var deferred = $q.defer();
43 $http({ 43 $http({
44 method : 'POST', 44 method : 'POST',
45 url : BASE_URL.url +'/margin', 45 url : BASE_URL.url +'/margin',
46 headers : {'Content-Type': 'application/json'}, 46 headers : {'Content-Type': 'application/json'},
47 data: data 47 data: data
48 }) 48 })
49 .then(function (result){ 49 .then(function (result){
50 deferred.resolve(result.data); 50 deferred.resolve(result.data);
51 },function (result){ 51 },function (result){
52 deferred.resolve(result.data); 52 deferred.resolve(result.data);
53 }) 53 })
54 return deferred.promise; 54 return deferred.promise;
55 } 55 }
56 56
57 this.addNewVtypeJet = function(data){ 57 this.addNewVtypeJet = function(data){
58 var deferred = $q.defer(); 58 var deferred = $q.defer();
59 $http({ 59 $http({
60 method : 'POST', 60 method : 'POST',
61 url : BASE_URL.url +'/margin', 61 url : BASE_URL.url +'/margin',
62 headers : {'Content-Type': 'application/json'}, 62 headers : {'Content-Type': 'application/json'},
63 data: data 63 data: data
64 }) 64 })
65 .then(function (result){ 65 .then(function (result){
66 deferred.resolve(result.data); 66 deferred.resolve(result.data);
67 },function (result){ 67 },function (result){
68 deferred.resolve(result.data); 68 deferred.resolve(result.data);
69 }) 69 })
70 return deferred.promise; 70 return deferred.promise;
71 } 71 }
72 72
73 this.editAtypeJetMargin = function(data){ 73 this.editAtypeJetMargin = function(data){
74 var deferred = $q.defer(); 74 var deferred = $q.defer();
75 $http({ 75 $http({
76 method : 'PUT', 76 method : 'PUT',
77 url : BASE_URL.url +'/margin', 77 url : BASE_URL.url +'/margin',
78 headers : {'Content-Type': 'application/json'}, 78 headers : {'Content-Type': 'application/json'},
79 data: data 79 data: data
80 }) 80 })
81 .then(function (result){ 81 .then(function (result){
82 deferred.resolve(result.data); 82 deferred.resolve(result.data);
83 },function (result){ 83 },function (result){
84 deferred.resolve(result.data); 84 deferred.resolve(result.data);
85 }) 85 })
86 return deferred.promise; 86 return deferred.promise;
87 } 87 }
88 88
89 this.editVtypeJetMargin = function(data){ 89 this.editVtypeJetMargin = function(data){
90 var deferred = $q.defer(); 90 var deferred = $q.defer();
91 $http({ 91 $http({
92 method : 'PUT', 92 method : 'PUT',
93 url : BASE_URL.url +'/margin', 93 url : BASE_URL.url +'/margin',
94 headers : {'Content-Type': 'application/json'}, 94 headers : {'Content-Type': 'application/json'},
95 data: data 95 data: data
96 }) 96 })
97 .then(function (result){ 97 .then(function (result){
98 deferred.resolve(result.data); 98 deferred.resolve(result.data);
99 },function (result){ 99 },function (result){
100 deferred.resolve(result.data); 100 deferred.resolve(result.data);
101 }) 101 })
102 return deferred.promise; 102 return deferred.promise;
103 } 103 }
104 104
105 this.getJetTiers = function(id) { 105 this.getJetTiers = function(id) {
106 var deferred = $q.defer(); 106 var deferred = $q.defer();
107 $http({ 107 $http({
108 method : 'GET', 108 method : 'GET',
109 url : BASE_URL.url +'/margin/getCustomMargins/'+id, 109 url : BASE_URL.url +'/margin/getCustomMargins/'+id,
110 headers : {'Content-Type': 'application/json'}, 110 headers : {'Content-Type': 'application/json'},
111 }) 111 })
112 .then(function (result){ 112 .then(function (result){
113 deferred.resolve(result.data); 113 deferred.resolve(result.data);
114 },function (result){ 114 },function (result){
115 deferred.resolve(result.data); 115 deferred.resolve(result.data);
116 }) 116 })
117 return deferred.promise; 117 return deferred.promise;
118 } 118 }
119 119
120 this.addNewTier = function(data){ 120 this.addNewTier = function(data){
121 var deferred = $q.defer(); 121 var deferred = $q.defer();
122 $http({ 122 $http({
123 method : 'POST', 123 method : 'POST',
124 url : BASE_URL.url +'/margin/custom', 124 url : BASE_URL.url +'/margin/custom',
125 headers : {'Content-Type': 'application/json'}, 125 headers : {'Content-Type': 'application/json'},
126 data: data 126 data: data
127 }) 127 })
128 .then(function (result){ 128 .then(function (result){
129 deferred.resolve(result.data); 129 deferred.resolve(result.data);
130 },function (result){ 130 },function (result){
131 deferred.resolve(result.data); 131 deferred.resolve(result.data);
132 }) 132 })
133 return deferred.promise; 133 return deferred.promise;
134 } 134 }
135 135
136 this.editTier = function(data){ 136 this.editTier = function(data){
137 var deferred = $q.defer(); 137 var deferred = $q.defer();
138 $http({ 138 $http({
139 method : 'PUT', 139 method : 'PUT',
140 url : BASE_URL.url +'/margin/custom', 140 url : BASE_URL.url +'/margin/custom',
141 headers : {'Content-Type': 'application/json'}, 141 headers : {'Content-Type': 'application/json'},
142 data: data 142 data: data
143 }) 143 })
144 .then(function (result){ 144 .then(function (result){
145 deferred.resolve(result.data); 145 deferred.resolve(result.data);
146 },function (result){ 146 },function (result){
147 deferred.resolve(result.data); 147 deferred.resolve(result.data);
148 }) 148 })
149 return deferred.promise; 149 return deferred.promise;
150 } 150 }
151 151
152 this.deleteTier = function(id) { 152 this.deleteTier = function(id) {
153 153
154 var deferred = $q.defer(); 154 var deferred = $q.defer();
155 $http({ 155 $http({
156 method : 'DELETE', 156 method : 'DELETE',
157 url : BASE_URL.url +'/margin/customMargins/'+id, 157 url : BASE_URL.url +'/margin/customMargins/'+id,
158 headers : {'Content-Type': 'application/json'}, 158 headers : {'Content-Type': 'application/json'},
159 }) 159 })
160 .then(function (result){ 160 .then(function (result){
161 deferred.resolve(result.data); 161 deferred.resolve(result.data);
162 },function (result){ 162 },function (result){
163 deferred.resolve(result.data); 163 deferred.resolve(result.data);
164 }) 164 })
165 return deferred.promise; 165 return deferred.promise;
166 } 166 }
167 167
168 this.getFuelPricingNew = function() { 168 this.getFuelPricingNew = function() {
169 169
170 var deferred = $q.defer(); 170 var deferred = $q.defer();
171 $http({ 171 $http({
172 method : 'GET', 172 method : 'GET',
173 url : BASE_URL.url +'/user/products', 173 url : BASE_URL.url +'/user/products',
174 headers : {'Content-Type': 'application/json'}, 174 headers : {'Content-Type': 'application/json'},
175 }) 175 })
176 .then(function (result){ 176 .then(function (result){
177 deferred.resolve(result.data); 177 deferred.resolve(result.data);
178 },function (result){ 178 },function (result){
179 deferred.resolve(result.data); 179 deferred.resolve(result.data);
180 }) 180 })
181 return deferred.promise; 181 return deferred.promise;
182 } 182 }
183 183
184 this.updateFuelPricing = function(data){ 184 this.updateFuelPricing = function(data){
185 var deferred = $q.defer(); 185 var deferred = $q.defer();
186 $http({ 186 $http({
187 method : 'POST', 187 method : 'POST',
188 url : BASE_URL.url +'/fuelPricing', 188 url : BASE_URL.url +'/fuelPricing',
189 headers : {'Content-Type': 'application/json'}, 189 headers : {'Content-Type': 'application/json'},
190 data: data 190 data: data
191 }) 191 })
192 .then(function (result){ 192 .then(function (result){
193 deferred.resolve(result.data); 193 deferred.resolve(result.data);
194 },function (result){ 194 },function (result){
195 deferred.resolve(result.data); 195 deferred.resolve(result.data);
196 }) 196 })
197 return deferred.promise; 197 return deferred.promise;
198 } 198 }
199 199
200 this.updateFutureFuelPricing = function(data){ 200 this.updateFutureFuelPricing = function(data){
201 var deferred = $q.defer(); 201 var deferred = $q.defer();
202 $http({ 202 $http({
203 method : 'POST', 203 method : 'POST',
204 url : BASE_URL.url +'/fuelPricing/futureFuelPricing', 204 url : BASE_URL.url +'/fuelPricing/futureFuelPricing',
205 headers : {'Content-Type': 'application/json'}, 205 headers : {'Content-Type': 'application/json'},
206 data: data 206 data: data
207 }) 207 })
208 .then(function (result){ 208 .then(function (result){
209 deferred.resolve(result.data); 209 deferred.resolve(result.data);
210 },function (result){ 210 },function (result){
211 deferred.resolve(result.data); 211 deferred.resolve(result.data);
212 }) 212 })
213 return deferred.promise; 213 return deferred.promise;
214 } 214 }
215 215
216 this.updateFutureFuelPricingImmediatlly = function(data){
217 var deferred = $q.defer();
218 $http({
219 method : 'POST',
220 url : BASE_URL.url +'/fuelPricing/updateImmediateFuelPrice',
221 headers : {'Content-Type': 'application/json'},
222 data: data
223 })
224 .then(function (result){
225 deferred.resolve(result.data);
226 },function (result){
227 deferred.resolve(result.data);
228 })
229 return deferred.promise;
230 }
231
216 this.getMargin = function() { 232 this.getMargin = function() {
217 233
218 var deferred = $q.defer(); 234 var deferred = $q.defer();
219 $http({ 235 $http({
220 method : 'GET', 236 method : 'GET',
221 url : BASE_URL.url +'/user/margins', 237 url : BASE_URL.url +'/user/margins',
222 headers : {'Content-Type': 'application/json'}, 238 headers : {'Content-Type': 'application/json'},
223 }) 239 })
224 .then(function (result){ 240 .then(function (result){
225 deferred.resolve(result.data); 241 deferred.resolve(result.data);
226 },function (result){ 242 },function (result){
227 deferred.resolve(result.data); 243 deferred.resolve(result.data);
228 }) 244 })
229 return deferred.promise; 245 return deferred.promise;
230 } 246 }
231 247
232 this.sendMailToMargin = function(id){ 248 this.sendMailToMargin = function(id){
233 var deferred = $q.defer(); 249 var deferred = $q.defer();
234 $http({ 250 $http({
235 method : 'POST', 251 method : 'POST',
236 url : BASE_URL.url +'/fuelPricing/sendPriceEmail/'+id, 252 url : BASE_URL.url +'/fuelPricing/sendPriceEmail/'+id,
237 headers : {'Content-Type': 'application/json'} 253 headers : {'Content-Type': 'application/json'}
238 }) 254 })
239 .then(function (result){ 255 .then(function (result){
240 deferred.resolve(result.data); 256 deferred.resolve(result.data);
241 },function (result){ 257 },function (result){
242 deferred.resolve(result.data); 258 deferred.resolve(result.data);
243 }) 259 })
244 return deferred.promise; 260 return deferred.promise;
245 } 261 }
246 262
247 this.sendMailToGroupMargin = function(type){ 263 this.sendMailToGroupMargin = function(type){
248 var deferred = $q.defer(); 264 var deferred = $q.defer();
249 $http({ 265 $http({
250 method : 'POST', 266 method : 'POST',
251 url : BASE_URL.url +'/fuelPricing/sendPriceEmailByType/'+type, 267 url : BASE_URL.url +'/fuelPricing/sendPriceEmailByType/'+type,
252 headers : {'Content-Type': 'application/json'} 268 headers : {'Content-Type': 'application/json'}
253 }) 269 })
254 .then(function (result){ 270 .then(function (result){
255 deferred.resolve(result.data); 271 deferred.resolve(result.data);
256 },function (result){ 272 },function (result){
257 deferred.resolve(result.data); 273 deferred.resolve(result.data);
258 }) 274 })
259 return deferred.promise; 275 return deferred.promise;
260 } 276 }
261 277
262 this.deleteMargin = function(id) { 278 this.deleteMargin = function(id) {
263 279
264 var deferred = $q.defer(); 280 var deferred = $q.defer();
265 $http({ 281 $http({
266 method : 'DELETE', 282 method : 'DELETE',
267 url : BASE_URL.url +'/margin/'+id, 283 url : BASE_URL.url +'/margin/'+id,
268 headers : {'Content-Type': 'application/json'}, 284 headers : {'Content-Type': 'application/json'},
269 }) 285 })
270 .then(function (result){ 286 .then(function (result){
271 deferred.resolve(result.data); 287 deferred.resolve(result.data);
272 },function (result){ 288 },function (result){
273 deferred.resolve(result.data); 289 deferred.resolve(result.data);
274 }) 290 })
275 return deferred.promise; 291 return deferred.promise;
276 } 292 }
277 293
278 294
279 295
280 } 296 }
281 297
282 })(); 298 })();