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