Commit a55afb325a473a7a5d94e5a0ca9cc09923ac543d
1 parent
0173d74ad3
Exists in
master
reconciled order redirected
Showing
4 changed files
with
22 additions
and
6 deletions
Show diff stats
app/js/app.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | 3 | ||
4 | angular.module('acufuel', ['nvd3', 'ngCookies', 'ngResource', 'ngSanitize', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop', 'ui.select','ds.clock']) | 4 | angular.module('acufuel', ['nvd3', 'ngCookies', 'ngResource', 'ngSanitize', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop', 'ui.select','ds.clock']) |
5 | 5 | ||
6 | .config(['$httpProvider', function($httpProvider) { | 6 | .config(['$httpProvider', function($httpProvider) { |
7 | $httpProvider.defaults.withCredentials = true; | 7 | $httpProvider.defaults.withCredentials = true; |
8 | $httpProvider.interceptors.push('myCSRF'); | 8 | $httpProvider.interceptors.push('myCSRF'); |
9 | $httpProvider.interceptors.push('httpRequestInterceptor'); | 9 | $httpProvider.interceptors.push('httpRequestInterceptor'); |
10 | }]) | 10 | }]) |
11 | 11 | ||
12 | 12 | ||
13 | .factory('httpRequestInterceptor', ['$q', '$rootScope', '$location', function($q, $rootScope, $location) { | 13 | .factory('httpRequestInterceptor', ['$q', '$rootScope', '$location', function($q, $rootScope, $location) { |
14 | return { | 14 | return { |
15 | request: function($config) { | 15 | request: function($config) { |
16 | return $config; | 16 | return $config; |
17 | }, | 17 | }, |
18 | responseError: function(rejection) { | 18 | responseError: function(rejection) { |
19 | if (rejection.status === 401) { | 19 | if (rejection.status === 401) { |
20 | if($location.path() != "/login"){ | 20 | if($location.path() != "/login"){ |
21 | localStorage.clear(); | 21 | localStorage.clear(); |
22 | window.location.reload(); | 22 | window.location.reload(); |
23 | } | 23 | } |
24 | } | 24 | } |
25 | return $q.reject(rejection); | 25 | return $q.reject(rejection); |
26 | } | 26 | } |
27 | } | 27 | } |
28 | }]) | 28 | }]) |
29 | 29 | ||
30 | .directive('fileModel', ['$parse', function ($parse) { | 30 | .directive('fileModel', ['$parse', function ($parse) { |
31 | return { | 31 | return { |
32 | restrict: 'A', | 32 | restrict: 'A', |
33 | link: function(scope, element, attrs) { | 33 | link: function(scope, element, attrs) { |
34 | var model = $parse(attrs.fileModel); | 34 | var model = $parse(attrs.fileModel); |
35 | var modelSetter = model.assign; | 35 | var modelSetter = model.assign; |
36 | 36 | ||
37 | element.bind('change', function(){ | 37 | element.bind('change', function(){ |
38 | scope.$apply(function(){ | 38 | scope.$apply(function(){ |
39 | modelSetter(scope, element[0].files[0]); | 39 | modelSetter(scope, element[0].files[0]); |
40 | }); | 40 | }); |
41 | }); | 41 | }); |
42 | } | 42 | } |
43 | }; | 43 | }; |
44 | }]) | 44 | }]) |
45 | 45 | ||
46 | .provider('myCSRF',[function(){ | 46 | .provider('myCSRF',[function(){ |
47 | var headerName = 'X-CSRFToken'; | 47 | var headerName = 'X-CSRFToken'; |
48 | var cookieName = 'csrftoken'; | 48 | var cookieName = 'csrftoken'; |
49 | var allowedMethods = ['GET']; | 49 | var allowedMethods = ['GET']; |
50 | 50 | ||
51 | this.setHeaderName = function(n) { | 51 | this.setHeaderName = function(n) { |
52 | headerName = n; | 52 | headerName = n; |
53 | } | 53 | } |
54 | this.setCookieName = function(n) { | 54 | this.setCookieName = function(n) { |
55 | cookieName = n; | 55 | cookieName = n; |
56 | } | 56 | } |
57 | this.setAllowedMethods = function(n) { | 57 | this.setAllowedMethods = function(n) { |
58 | allowedMethods = n; | 58 | allowedMethods = n; |
59 | } | 59 | } |
60 | this.$get = ['$cookies', function($cookies){ | 60 | this.$get = ['$cookies', function($cookies){ |
61 | return { | 61 | return { |
62 | 'request': function(config) { | 62 | 'request': function(config) { |
63 | if(allowedMethods.indexOf(config.method) === -1) { | 63 | if(allowedMethods.indexOf(config.method) === -1) { |
64 | // do something on success | 64 | // do something on success |
65 | config.headers[headerName] = $cookies[cookieName]; | 65 | config.headers[headerName] = $cookies[cookieName]; |
66 | } | 66 | } |
67 | return config; | 67 | return config; |
68 | } | 68 | } |
69 | } | 69 | } |
70 | }]; | 70 | }]; |
71 | }]) | 71 | }]) |
72 | 72 | ||
73 | .config( | 73 | .config( |
74 | ['$locationProvider', '$stateProvider', '$urlRouterProvider', | 74 | ['$locationProvider', '$stateProvider', '$urlRouterProvider', |
75 | function($locationProvider, $stateProvider, $urlRouterProvider) { | 75 | function($locationProvider, $stateProvider, $urlRouterProvider) { |
76 | $locationProvider.hashPrefix('!'); | 76 | $locationProvider.hashPrefix('!'); |
77 | // routes | 77 | // routes |
78 | $urlRouterProvider | 78 | $urlRouterProvider |
79 | .otherwise('/login'); | 79 | .otherwise('/login'); |
80 | 80 | ||
81 | $stateProvider | 81 | $stateProvider |
82 | 82 | ||
83 | .state("app", { | 83 | .state("app", { |
84 | url: "", | 84 | url: "", |
85 | templateUrl: "partials/main/main.html", | 85 | templateUrl: "partials/main/main.html", |
86 | controller: "MainController", | 86 | controller: "MainController", |
87 | abstract: true | 87 | abstract: true |
88 | }) | 88 | }) |
89 | 89 | ||
90 | .state("login", { | 90 | .state("login", { |
91 | url: "/login", | 91 | url: "/login", |
92 | templateUrl: "partials/login/login.html", | 92 | templateUrl: "partials/login/login.html", |
93 | controller: "LoginController" | 93 | controller: "LoginController" |
94 | }) | 94 | }) |
95 | 95 | ||
96 | .state("app.customers", { | 96 | .state("app.customers", { |
97 | url: "/customers", | 97 | url: "/customers", |
98 | templateUrl: "partials/customers/customers.html", | 98 | templateUrl: "partials/customers/customers.html", |
99 | controller: "customersController", | 99 | controller: "customersController", |
100 | data: { | 100 | data: { |
101 | authorizedRoles: ["FBO"], | 101 | authorizedRoles: ["FBO"], |
102 | } | 102 | } |
103 | }) | 103 | }) |
104 | 104 | ||
105 | .state("app.accountSetting", { | 105 | .state("app.accountSetting", { |
106 | url: "/accountSetting", | 106 | url: "/accountSetting", |
107 | templateUrl: "partials/accountSetting/accountSetting.html", | 107 | templateUrl: "partials/accountSetting/accountSetting.html", |
108 | controller: "AccountSettingController", | 108 | controller: "AccountSettingController", |
109 | data: { | 109 | data: { |
110 | authorizedRoles: ["FBO"], | 110 | authorizedRoles: ["FBO"], |
111 | } | 111 | } |
112 | }) | 112 | }) |
113 | 113 | ||
114 | .state("app.ContactView", { | 114 | .state("app.ContactView", { |
115 | url: "/ContactView", | 115 | url: "/ContactView", |
116 | templateUrl: "partials/ContactView/ContactView.html", | 116 | templateUrl: "partials/ContactView/ContactView.html", |
117 | controller: "ContactViewController", | 117 | controller: "ContactViewController", |
118 | data: { | 118 | data: { |
119 | authorizedRoles: ["FBO"], | 119 | authorizedRoles: ["FBO"], |
120 | } | 120 | } |
121 | }) | 121 | }) |
122 | .state("app.FuelVendors", { | 122 | .state("app.FuelVendors", { |
123 | url: "/FuelVendors", | 123 | url: "/FuelVendors", |
124 | templateUrl: "partials/FuelVendors/FuelVendors.html", | 124 | templateUrl: "partials/FuelVendors/FuelVendors.html", |
125 | controller: "FuelVendorsController", | 125 | controller: "FuelVendorsController", |
126 | data: { | 126 | data: { |
127 | authorizedRoles: ["FBO"], | 127 | authorizedRoles: ["FBO"], |
128 | } | 128 | } |
129 | }) | 129 | }) |
130 | 130 | ||
131 | .state("app.analytics", { | 131 | .state("app.analytics", { |
132 | url: "/analytics", | 132 | url: "/analytics", |
133 | templateUrl: "partials/analytics/analytics.html", | 133 | templateUrl: "partials/analytics/analytics.html", |
134 | controller: "analyticsController", | 134 | controller: "analyticsController", |
135 | data: { | 135 | data: { |
136 | authorizedRoles: ["FBO"], | 136 | authorizedRoles: ["FBO"], |
137 | } | 137 | } |
138 | }) | 138 | }) |
139 | 139 | ||
140 | .state("app.account", { | 140 | .state("app.account", { |
141 | url: "/vendors", | 141 | url: "/vendors", |
142 | templateUrl: "partials/FuelVendors/FuelVendors.html", | 142 | templateUrl: "partials/FuelVendors/FuelVendors.html", |
143 | controller: "FuelVendorsController", | 143 | controller: "FuelVendorsController", |
144 | data: { | 144 | data: { |
145 | authorizedRoles: ["FBO"], | 145 | authorizedRoles: ["FBO"], |
146 | } | 146 | } |
147 | }) | 147 | }) |
148 | 148 | ||
149 | .state("app.dashboard", { | 149 | .state("app.dashboard", { |
150 | url: "/dashboard", | 150 | url: "/dashboard", |
151 | templateUrl: "partials/dashboard/dashboard.html", | 151 | templateUrl: "partials/dashboard/dashboard.html", |
152 | controller: "dashboardController", | 152 | controller: "dashboardController", |
153 | data: { | 153 | data: { |
154 | authorizedRoles: ["FBO","ADDITIONAL"], | 154 | authorizedRoles: ["FBO","ADDITIONAL"], |
155 | } | 155 | } |
156 | }) | 156 | }) |
157 | 157 | ||
158 | .state("app.elements", { | 158 | .state("app.elements", { |
159 | url: "/elements", | 159 | url: "/elements", |
160 | templateUrl: "partials/elements/elements.html", | 160 | templateUrl: "partials/elements/elements.html", |
161 | controller: "elementsController", | 161 | controller: "elementsController", |
162 | data: { | 162 | data: { |
163 | authorizedRoles: ["FBO"], | 163 | authorizedRoles: ["FBO"], |
164 | } | 164 | } |
165 | }) | 165 | }) |
166 | 166 | ||
167 | .state("app.error", { | 167 | .state("app.error", { |
168 | url: "/error", | 168 | url: "/error", |
169 | templateUrl: "partials/error/error.html", | 169 | templateUrl: "partials/error/error.html", |
170 | controller: "errorController" | 170 | controller: "errorController" |
171 | }) | 171 | }) |
172 | 172 | ||
173 | .state("app.faq", { | 173 | .state("app.faq", { |
174 | url: "/faq", | 174 | url: "/faq", |
175 | templateUrl: "partials/faq/faq.html", | 175 | templateUrl: "partials/faq/faq.html", |
176 | controller: "faqController" | 176 | controller: "faqController" |
177 | }) | 177 | }) |
178 | 178 | ||
179 | .state("app.forms", { | 179 | .state("app.forms", { |
180 | url: "/forms", | 180 | url: "/forms", |
181 | templateUrl: "partials/forms/forms.html", | 181 | templateUrl: "partials/forms/forms.html", |
182 | controller: "formsController", | 182 | controller: "formsController", |
183 | data: { | 183 | data: { |
184 | authorizedRoles: ["FBO"], | 184 | authorizedRoles: ["FBO"], |
185 | } | 185 | } |
186 | }) | 186 | }) |
187 | 187 | ||
188 | .state("app.fuelManager", { | 188 | .state("app.fuelManager", { |
189 | url: "/fuelManager", | 189 | url: "/fuelManager", |
190 | templateUrl: "partials/fuelManager/fuelManager.html", | 190 | templateUrl: "partials/fuelManager/fuelManager.html", |
191 | controller: "fuelManagerController", | 191 | controller: "fuelManagerController", |
192 | data: { | 192 | data: { |
193 | authorizedRoles: ["FBO"], | 193 | authorizedRoles: ["FBO"], |
194 | } | 194 | } |
195 | }) | 195 | }) |
196 | 196 | ||
197 | .state("app.pricing", { | 197 | .state("app.pricing", { |
198 | url: "/pricing", | 198 | url: "/pricing", |
199 | templateUrl: "partials/pricing/pricing.html", | 199 | templateUrl: "partials/pricing/pricing.html", |
200 | controller: "pricingController", | 200 | controller: "pricingController", |
201 | data: { | 201 | data: { |
202 | authorizedRoles: ["FBO"], | 202 | authorizedRoles: ["FBO"], |
203 | } | 203 | } |
204 | }) | 204 | }) |
205 | 205 | ||
206 | .state("app.reports", { | 206 | .state("app.reports", { |
207 | url: "/reports", | 207 | url: "/reports", |
208 | templateUrl: "partials/reports/reports.html", | 208 | templateUrl: "partials/reports/reports.html", |
209 | controller: "reportsController", | 209 | controller: "reportsController", |
210 | data: { | 210 | data: { |
211 | authorizedRoles: ["FBO"], | 211 | authorizedRoles: ["FBO"], |
212 | } | 212 | } |
213 | }) | 213 | }) |
214 | 214 | ||
215 | .state("app.scheduler", { | 215 | .state("app.scheduler", { |
216 | url: "/scheduler", | 216 | url: "/scheduler", |
217 | templateUrl: "partials/scheduler/scheduler.html", | 217 | templateUrl: "partials/scheduler/scheduler.html", |
218 | controller: "schedulerController", | 218 | controller: "schedulerController", |
219 | data: { | 219 | data: { |
220 | authorizedRoles: ["FBO"], | 220 | authorizedRoles: ["FBO"], |
221 | } | 221 | } |
222 | }) | 222 | }) |
223 | 223 | ||
224 | .state("app.flightTracking", { | 224 | .state("app.flightTracking", { |
225 | url: "/flightTracking", | 225 | url: "/flightTracking", |
226 | templateUrl: "partials/flightTracking/flightTracking.html", | 226 | templateUrl: "partials/flightTracking/flightTracking.html", |
227 | controller: "flightTrackingController", | 227 | controller: "flightTrackingController", |
228 | data: { | 228 | data: { |
229 | authorizedRoles: ["FBO"], | 229 | authorizedRoles: ["FBO"], |
230 | } | 230 | } |
231 | }) | 231 | }) |
232 | 232 | ||
233 | .state("app.taxes", { | 233 | .state("app.taxes", { |
234 | url: "/taxes", | 234 | url: "/taxes", |
235 | templateUrl: "partials/taxes/taxes.html", | 235 | templateUrl: "partials/taxes/taxes.html", |
236 | controller: "taxesController", | 236 | controller: "taxesController", |
237 | data: { | 237 | data: { |
238 | authorizedRoles: ["FBO"], | 238 | authorizedRoles: ["FBO"], |
239 | } | 239 | } |
240 | }) | 240 | }) |
241 | 241 | ||
242 | .state("app.signup", { | 242 | .state("app.signup", { |
243 | url: "/signup", | 243 | url: "/signup", |
244 | templateUrl: "partials/signup/signup.html", | 244 | templateUrl: "partials/signup/signup.html", |
245 | controller: "signupController" | 245 | controller: "signupController" |
246 | }) | 246 | }) |
247 | 247 | ||
248 | .state("app.updateFuelManager", { | 248 | .state("app.updateFuelManager", { |
249 | url: "/updateFuelManager", | 249 | url: "/updateFuelManager", |
250 | templateUrl: "partials/updateFuelManager/updateFuelManager.html", | 250 | templateUrl: "partials/updateFuelManager/updateFuelManager.html", |
251 | controller: "updateFuelManagerController", | 251 | controller: "updateFuelManagerController", |
252 | data: { | 252 | data: { |
253 | authorizedRoles: ["FBO"], | 253 | authorizedRoles: ["FBO"], |
254 | } | 254 | } |
255 | }) | 255 | }) |
256 | 256 | ||
257 | .state("app.viewCompany", { | 257 | .state("app.viewCompany", { |
258 | url: "/viewCompany/:id", | 258 | url: "/viewCompany/:id", |
259 | templateUrl: "partials/viewCompany/viewCompany.html", | 259 | templateUrl: "partials/viewCompany/viewCompany.html", |
260 | controller: "viewCompanyController", | 260 | controller: "viewCompanyController", |
261 | data: { | 261 | data: { |
262 | authorizedRoles: ["FBO"], | 262 | authorizedRoles: ["FBO"], |
263 | } | 263 | } |
264 | }) | 264 | }) |
265 | 265 | ||
266 | .state("app.viewFuelVendor", { | 266 | .state("app.viewFuelVendor", { |
267 | url: "/viewFuelVendor/:id", | 267 | url: "/viewFuelVendor/:id", |
268 | templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", | 268 | templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", |
269 | controller: "ViewFuelVendorController", | 269 | controller: "ViewFuelVendorController", |
270 | data: { | 270 | data: { |
271 | authorizedRoles: ["FBO"], | 271 | authorizedRoles: ["FBO"], |
272 | } | 272 | } |
273 | }) | 273 | }) |
274 | 274 | ||
275 | .state("app.fuelOrders", { | 275 | .state("app.fuelOrders", { |
276 | url: "/fuelOrders", | 276 | url: "/fuelOrders", |
277 | templateUrl: "partials/fuelOrders/fuelOrders.html", | 277 | templateUrl: "partials/fuelOrders/fuelOrders.html", |
278 | controller: "fuelOrdersController", | 278 | controller: "fuelOrdersController", |
279 | data: { | 279 | data: { |
280 | authorizedRoles: ["FBO"], | 280 | authorizedRoles: ["FBO"], |
281 | } | 281 | } |
282 | }) | 282 | }) |
283 | 283 | ||
284 | .state("app.filterFuelOrders", { | ||
285 | url: "/fuelOrders/:status", | ||
286 | templateUrl: "partials/fuelOrders/fuelOrders.html", | ||
287 | controller: "fuelOrdersController", | ||
288 | data: { | ||
289 | authorizedRoles: ["FBO"], | ||
290 | } | ||
291 | }) | ||
292 | |||
284 | .state("app.DispatchFuel", { | 293 | .state("app.DispatchFuel", { |
285 | url: "/DispatchFuel", | 294 | url: "/DispatchFuel", |
286 | templateUrl: "partials/DispatchFuel/DispatchFuel.html", | 295 | templateUrl: "partials/DispatchFuel/DispatchFuel.html", |
287 | controller: "DispatchFuelController", | 296 | controller: "DispatchFuelController", |
288 | data: { | 297 | data: { |
289 | authorizedRoles: ["FBO"], | 298 | authorizedRoles: ["FBO"], |
290 | } | 299 | } |
291 | }) | 300 | }) |
292 | 301 | ||
293 | .state("app.searchDispatchFuel", { | 302 | .state("app.searchDispatchFuel", { |
294 | url: "/searchDispatchFuel", | 303 | url: "/searchDispatchFuel", |
295 | templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html", | 304 | templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html", |
296 | controller: "searchDispatchFuelController", | 305 | controller: "searchDispatchFuelController", |
297 | data: { | 306 | data: { |
298 | authorizedRoles: ["FBO"], | 307 | authorizedRoles: ["FBO"], |
299 | } | 308 | } |
300 | }) | 309 | }) |
301 | 310 | ||
302 | .state("app.Accept", { | 311 | .state("app.Accept", { |
303 | url: "/Accept", | 312 | url: "/Accept", |
304 | templateUrl: "partials/Accept/Accept.html", | 313 | templateUrl: "partials/Accept/Accept.html", |
305 | controller: "AcceptController", | 314 | controller: "AcceptController", |
306 | data: { | 315 | data: { |
307 | authorizedRoles: ["FBO"], | 316 | authorizedRoles: ["FBO"], |
308 | } | 317 | } |
309 | }) | 318 | }) |
310 | 319 | ||
311 | .state("app.delselected", { | 320 | .state("app.delselected", { |
312 | url: "/delselected", | 321 | url: "/delselected", |
313 | templateUrl: "partials/delselected/delselected.html", | 322 | templateUrl: "partials/delselected/delselected.html", |
314 | controller: "delselectedController", | 323 | controller: "delselectedController", |
315 | data: { | 324 | data: { |
316 | authorizedRoles: ["FBO"], | 325 | authorizedRoles: ["FBO"], |
317 | } | 326 | } |
318 | }) | 327 | }) |
319 | 328 | ||
320 | .state("app.pricingcontact", { | 329 | .state("app.pricingcontact", { |
321 | url: "/pricingcontact", | 330 | url: "/pricingcontact", |
322 | templateUrl: "partials/pricingcontact/pricingcontact.html", | 331 | templateUrl: "partials/pricingcontact/pricingcontact.html", |
323 | controller: "pricingcontactController", | 332 | controller: "pricingcontactController", |
324 | data: { | 333 | data: { |
325 | authorizedRoles: ["FBO"], | 334 | authorizedRoles: ["FBO"], |
326 | } | 335 | } |
327 | }) | 336 | }) |
328 | 337 | ||
329 | .state("app.viewContact", { | 338 | .state("app.viewContact", { |
330 | url: "/viewContact/:id", | 339 | url: "/viewContact/:id", |
331 | templateUrl: "partials/viewcontact/viewcontact.html", | 340 | templateUrl: "partials/viewcontact/viewcontact.html", |
332 | controller: "viewcontactController", | 341 | controller: "viewcontactController", |
333 | data: { | 342 | data: { |
334 | authorizedRoles: ["FBO"], | 343 | authorizedRoles: ["FBO"], |
335 | } | 344 | } |
336 | }) | 345 | }) |
337 | 346 | ||
338 | .state("app.viewVendorContact", { | 347 | .state("app.viewVendorContact", { |
339 | url: "/viewVendorContact/:id", | 348 | url: "/viewVendorContact/:id", |
340 | templateUrl: "partials/viewVendorContact/viewVendorContact.html", | 349 | templateUrl: "partials/viewVendorContact/viewVendorContact.html", |
341 | controller: "viewVendorContactController", | 350 | controller: "viewVendorContactController", |
342 | data: { | 351 | data: { |
343 | authorizedRoles: ["FBO"], | 352 | authorizedRoles: ["FBO"], |
344 | } | 353 | } |
345 | }) | 354 | }) |
346 | 355 | ||
347 | .state("app.enterFuelOrder", { | 356 | .state("app.enterFuelOrder", { |
348 | url: "/enterFuelOrder", | 357 | url: "/enterFuelOrder", |
349 | templateUrl: "partials/enterFuelOrder/enterFuelOrder.html", | 358 | templateUrl: "partials/enterFuelOrder/enterFuelOrder.html", |
350 | controller: "enterFuelOrderController", | 359 | controller: "enterFuelOrderController", |
351 | data: { | 360 | data: { |
352 | authorizedRoles: ["FBO"], | 361 | authorizedRoles: ["FBO"], |
353 | } | 362 | } |
354 | }) | 363 | }) |
355 | 364 | ||
356 | .state("app.flightDepDashboard", { | 365 | .state("app.flightDepDashboard", { |
357 | url: "/flightDepDashboard", | 366 | url: "/flightDepDashboard", |
358 | templateUrl: "partials/flightDepDashboard/flightDepDashboard.html", | 367 | templateUrl: "partials/flightDepDashboard/flightDepDashboard.html", |
359 | controller: "flightDepDashboardController" | 368 | controller: "flightDepDashboardController" |
360 | }) | 369 | }) |
361 | 370 | ||
362 | .state("app.flightDepOrders", { | 371 | .state("app.flightDepOrders", { |
363 | url: "/flightDepOrders", | 372 | url: "/flightDepOrders", |
364 | templateUrl: "partials/flightDepOrders/flightDepOrders.html", | 373 | templateUrl: "partials/flightDepOrders/flightDepOrders.html", |
365 | controller: "flightDepOrdersController" | 374 | controller: "flightDepOrdersController" |
366 | }) | 375 | }) |
367 | 376 | ||
368 | .state("forgetPassword", { | 377 | .state("forgetPassword", { |
369 | url: "/forgetPassword", | 378 | url: "/forgetPassword", |
370 | templateUrl: "partials/forgetPassword/forgetPassword.html", | 379 | templateUrl: "partials/forgetPassword/forgetPassword.html", |
371 | controller: "forgetPasswordController" | 380 | controller: "forgetPasswordController" |
372 | }) | 381 | }) |
373 | 382 | ||
374 | 383 | ||
375 | .state("resetPassword", { | 384 | .state("resetPassword", { |
376 | url : "/resetPassword", | 385 | url : "/resetPassword", |
377 | templateUrl : "partials/resetpwd/resetPassword.html", | 386 | templateUrl : "partials/resetpwd/resetPassword.html", |
378 | controller : "resetPasswordController" | 387 | controller : "resetPasswordController" |
379 | 388 | ||
380 | }) | 389 | }) |
381 | 390 | ||
382 | } | 391 | } |
383 | ]) | 392 | ]) |
384 | 393 | ||
385 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { | 394 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { |
386 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { | 395 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { |
387 | //console.log("from",from, "fromState",fromState) | 396 | //console.log("from",from, "fromState",fromState) |
388 | $rootScope.isShowEmail = false; | 397 | $rootScope.isShowEmail = false; |
389 | $rootScope.isShowFMA = false; | 398 | $rootScope.isShowFMA = false; |
390 | $rootScope.previousState = fromState.name; | 399 | $rootScope.previousState = fromState.name; |
391 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); | 400 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); |
392 | var EPDAccess = JSON.parse(window.localStorage.getItem('EPDAccess')); | 401 | var EPDAccess = JSON.parse(window.localStorage.getItem('EPDAccess')); |
393 | var FMAAccess = JSON.parse(window.localStorage.getItem('FMAAccess')); | 402 | var FMAAccess = JSON.parse(window.localStorage.getItem('FMAAccess')); |
394 | if(EPDAccess === true || EPDAccess == null){ | 403 | if(EPDAccess === true || EPDAccess == null){ |
395 | $rootScope.isShowEmail = true; | 404 | $rootScope.isShowEmail = true; |
396 | } | 405 | } |
397 | if(FMAAccess === true || FMAAccess == null){ | 406 | if(FMAAccess === true || FMAAccess == null){ |
398 | $rootScope.isShowFMA = true; | 407 | $rootScope.isShowFMA = true; |
399 | } | 408 | } |
400 | 409 | ||
401 | // console.log("nextParams",nextParams) | 410 | // console.log("nextParams",nextParams) |
402 | /*LoginService.isAuthorized = function (authorizedRoles) { | 411 | /*LoginService.isAuthorized = function (authorizedRoles) { |
403 | if (!angular.isArray(authorizedRoles)) { | 412 | if (!angular.isArray(authorizedRoles)) { |
404 | authorizedRoles = [authorizedRoles]; | 413 | authorizedRoles = [authorizedRoles]; |
405 | } | 414 | } |
406 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); | 415 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); |
407 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); | 416 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); |
408 | } | 417 | } |
409 | 418 | ||
410 | if ('data' in next && 'authorizedRoles' in next.data) { | 419 | if ('data' in next && 'authorizedRoles' in next.data) { |
411 | var authorizedRoles = next.data.authorizedRoles; | 420 | var authorizedRoles = next.data.authorizedRoles; |
412 | if (!LoginService.isAuthorized(authorizedRoles)) { | 421 | if (!LoginService.isAuthorized(authorizedRoles)) { |
413 | event.preventDefault(); | 422 | event.preventDefault(); |
414 | if($state.current.name.length == 0) { | 423 | if($state.current.name.length == 0) { |
415 | $state.go('login') | 424 | $state.go('login') |
416 | } else { | 425 | } else { |
417 | $state.go($state.current, {}, {reload: true}); | 426 | $state.go($state.current, {}, {reload: true}); |
418 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); | 427 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); |
419 | } | 428 | } |
420 | } | 429 | } |
421 | } | 430 | } |
422 | 431 | ||
423 | if (LoginService.isAuthenticated()) { | 432 | if (LoginService.isAuthenticated()) { |
424 | if (next.name == 'login') { | 433 | if (next.name == 'login') { |
425 | event.preventDefault(); | 434 | event.preventDefault(); |
426 | $state.go('app.dashboard'); | 435 | $state.go('app.dashboard'); |
427 | } | 436 | } |
428 | }else{ | 437 | }else{ |
429 | // if (next.name == 'login') { | 438 | // if (next.name == 'login') { |
430 | // event.preventDefault(); | 439 | // event.preventDefault(); |
431 | // $state.go('app.flightDepDashboard'); | 440 | // $state.go('app.flightDepDashboard'); |
432 | // } | 441 | // } |
433 | 442 | ||
434 | 443 | ||
435 | }*/ | 444 | }*/ |
436 | }); | 445 | }); |
437 | }]) | 446 | }]) |
438 | 447 | ||
439 | 448 | ||
440 | .directive("datepicker",function(){ | 449 | .directive("datepicker",function(){ |
441 | return { | 450 | return { |
442 | restrict:"A", | 451 | restrict:"A", |
443 | link:function(scope,el,attr){ | 452 | link:function(scope,el,attr){ |
444 | el.datepicker(); | 453 | el.datepicker(); |
445 | } | 454 | } |
446 | }; | 455 | }; |
447 | }) | 456 | }) |
448 | 457 | ||
449 | /* Valid number for upto 4 decimal points-Input type */ | 458 | /* Valid number for upto 4 decimal points-Input type */ |
450 | 459 | ||
451 | .directive('validNumber', function() { | 460 | .directive('validNumber', function() { |
452 | return { | 461 | return { |
453 | require: '?ngModel', | 462 | require: '?ngModel', |
454 | link: function(scope, element, attrs, ngModelCtrl) { | 463 | link: function(scope, element, attrs, ngModelCtrl) { |
455 | if(!ngModelCtrl) { | 464 | if(!ngModelCtrl) { |
456 | return; | 465 | return; |
457 | } | 466 | } |
458 | 467 | ||
459 | ngModelCtrl.$parsers.push(function(val) { | 468 | ngModelCtrl.$parsers.push(function(val) { |
460 | if (angular.isUndefined(val)) { | 469 | if (angular.isUndefined(val)) { |
461 | var val = ''; | 470 | var val = ''; |
462 | } | 471 | } |
463 | 472 | ||
464 | var clean = val.replace(/[^-0-9\.]/g, ''); | 473 | var clean = val.replace(/[^-0-9\.]/g, ''); |
465 | var negativeCheck = clean.split('-'); | 474 | var negativeCheck = clean.split('-'); |
466 | var decimalCheck = clean.split('.'); | 475 | var decimalCheck = clean.split('.'); |
467 | if(!angular.isUndefined(negativeCheck[1])) { | 476 | if(!angular.isUndefined(negativeCheck[1])) { |
468 | negativeCheck[1] = negativeCheck[1].slice(0, negativeCheck[1].length); | 477 | negativeCheck[1] = negativeCheck[1].slice(0, negativeCheck[1].length); |
469 | clean =negativeCheck[0] + '-' + negativeCheck[1]; | 478 | clean =negativeCheck[0] + '-' + negativeCheck[1]; |
470 | if(negativeCheck[0].length > 0) { | 479 | if(negativeCheck[0].length > 0) { |
471 | clean =negativeCheck[0]; | 480 | clean =negativeCheck[0]; |
472 | } | 481 | } |
473 | 482 | ||
474 | } | 483 | } |
475 | 484 | ||
476 | if(!angular.isUndefined(decimalCheck[1])) { | 485 | if(!angular.isUndefined(decimalCheck[1])) { |
477 | decimalCheck[1] = decimalCheck[1].slice(0,4); | 486 | decimalCheck[1] = decimalCheck[1].slice(0,4); |
478 | clean =decimalCheck[0] + '.' + decimalCheck[1]; | 487 | clean =decimalCheck[0] + '.' + decimalCheck[1]; |
479 | } | 488 | } |
480 | 489 | ||
481 | if (val !== clean) { | 490 | if (val !== clean) { |
482 | ngModelCtrl.$setViewValue(clean); | 491 | ngModelCtrl.$setViewValue(clean); |
483 | ngModelCtrl.$render(); | 492 | ngModelCtrl.$render(); |
484 | } | 493 | } |
485 | return clean; | 494 | return clean; |
486 | }); | 495 | }); |
487 | 496 | ||
488 | element.bind('keypress', function(event) { | 497 | element.bind('keypress', function(event) { |
489 | if(event.keyCode === 32) { | 498 | if(event.keyCode === 32) { |
490 | event.preventDefault(); | 499 | event.preventDefault(); |
491 | } | 500 | } |
492 | }); | 501 | }); |
493 | } | 502 | } |
494 | }; | 503 | }; |
495 | }) | 504 | }) |
496 | /* Valid number for upto 2 decimal points-Input type */ | 505 | /* Valid number for upto 2 decimal points-Input type */ |
497 | .directive('decimalNumber', function() { | 506 | .directive('decimalNumber', function() { |
498 | return { | 507 | return { |
499 | require: '?ngModel', | 508 | require: '?ngModel', |
500 | link: function(scope, element, attrs, ngModelCtrl) { | 509 | link: function(scope, element, attrs, ngModelCtrl) { |
501 | if(!ngModelCtrl) { | 510 | if(!ngModelCtrl) { |
502 | return; | 511 | return; |
503 | } | 512 | } |
504 | 513 | ||
505 | ngModelCtrl.$parsers.push(function(val) { | 514 | ngModelCtrl.$parsers.push(function(val) { |
506 | if (angular.isUndefined(val)) { | 515 | if (angular.isUndefined(val)) { |
507 | var val = ''; | 516 | var val = ''; |
508 | } | 517 | } |
509 | 518 | ||
510 | var clean = val.replace(/[^-0-9\.]/g, ''); | 519 | var clean = val.replace(/[^-0-9\.]/g, ''); |
511 | var negativeCheck = clean.split('-'); | 520 | var negativeCheck = clean.split('-'); |
512 | var decimalCheck = clean.split('.'); | 521 | var decimalCheck = clean.split('.'); |
513 | if(!angular.isUndefined(negativeCheck[1])) { | 522 | if(!angular.isUndefined(negativeCheck[1])) { |
514 | negativeCheck[1] = negativeCheck[1].slice(0, negativeCheck[1].length); | 523 | negativeCheck[1] = negativeCheck[1].slice(0, negativeCheck[1].length); |
515 | clean =negativeCheck[0] + '-' + negativeCheck[1]; | 524 | clean =negativeCheck[0] + '-' + negativeCheck[1]; |
516 | if(negativeCheck[0].length > 0) { | 525 | if(negativeCheck[0].length > 0) { |
517 | clean =negativeCheck[0]; | 526 | clean =negativeCheck[0]; |
518 | } | 527 | } |
519 | 528 | ||
520 | } | 529 | } |
521 | 530 | ||
522 | if(!angular.isUndefined(decimalCheck[1])) { | 531 | if(!angular.isUndefined(decimalCheck[1])) { |
523 | decimalCheck[1] = decimalCheck[1].slice(0,2); | 532 | decimalCheck[1] = decimalCheck[1].slice(0,2); |
524 | clean =decimalCheck[0] + '.' + decimalCheck[1]; | 533 | clean =decimalCheck[0] + '.' + decimalCheck[1]; |
525 | } | 534 | } |
526 | 535 | ||
527 | if (val !== clean) { | 536 | if (val !== clean) { |
528 | ngModelCtrl.$setViewValue(clean); | 537 | ngModelCtrl.$setViewValue(clean); |
529 | ngModelCtrl.$render(); | 538 | ngModelCtrl.$render(); |
530 | } | 539 | } |
531 | return clean; | 540 | return clean; |
532 | }); | 541 | }); |
533 | 542 | ||
534 | element.bind('keypress', function(event) { | 543 | element.bind('keypress', function(event) { |
535 | if(event.keyCode === 32) { | 544 | if(event.keyCode === 32) { |
536 | event.preventDefault(); | 545 | event.preventDefault(); |
537 | } | 546 | } |
538 | }); | 547 | }); |
539 | } | 548 | } |
540 | }; | 549 | }; |
541 | }); | 550 | }); |
542 | 551 | ||
543 | 552 |
app/partials/dashboard/dashboard.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:first-child > a{ | 2 | .subnavbar .mainnav > li:first-child > a{ |
3 | color: #ca5c6a; | 3 | color: #ca5c6a; |
4 | } | 4 | } |
5 | 5 | ||
6 | </style> | 6 | </style> |
7 | <!-- <style> | 7 | <!-- <style> |
8 | table, th , td { | 8 | table, th , td { |
9 | border: 1px solid grey; | 9 | border: 1px solid grey; |
10 | border-collapse: collapse; | 10 | border-collapse: collapse; |
11 | padding: 5px; | 11 | padding: 5px; |
12 | } | 12 | } |
13 | table tr:nth-child(odd) { | 13 | table tr:nth-child(odd) { |
14 | background-color: #f1f1f1; | 14 | background-color: #f1f1f1; |
15 | } | 15 | } |
16 | table tr:nth-child(even) { | 16 | table tr:nth-child(even) { |
17 | background-color: #ffffff; | 17 | background-color: #ffffff; |
18 | } | 18 | } |
19 | </style> --> | 19 | </style> --> |
20 | <div class="main"> | 20 | <div class="main"> |
21 | <div class="container" ng-if="isAuthenticated"> | 21 | <div class="container" ng-if="isAuthenticated"> |
22 | <div class="row"> | 22 | <div class="row"> |
23 | <div class="col-md-7"> | 23 | <div class="col-md-7"> |
24 | <div class="widget stacked"> | 24 | <div class="widget stacked"> |
25 | <div class="row"> | 25 | <div class="row"> |
26 | <div class="col-md-3"> | 26 | <div class="col-md-3"> |
27 | <a ui-sref="app.filterFuelOrders({status:'paid'})"> | ||
27 | <div class="widget-header"> | 28 | <div class="widget-header"> |
28 | <i class="fa fa-tint"></i> Reconciled Orders | 29 | <i class="fa fa-tint"></i> Reconciled Orders |
29 | 30 | ||
30 | </div> | 31 | </div></a> |
31 | <div class="custom-widget-content"> | 32 | <div class="custom-widget-content"> |
32 | <div> | 33 | <div> |
33 | <div class="col-xs-12"> | 34 | <div class="col-xs-12"> |
34 | <label class="pull-left" style="font-size: 13px" >Completed</label> | 35 | <label class="pull-left" style="font-size: 13px" >Completed</label> |
35 | <span style="font-size: 11px"> Monthly</span> | 36 | <span style="font-size: 11px"> Monthly</span> |
36 | <!-- <button class="btn btn-success btn-xs pull-right" style="cursor: default"> --> | 37 | <!-- <button class="btn btn-success btn-xs pull-right" style="cursor: default"> --> |
37 | <!-- <label class="pull-right">Montly</label> --> | 38 | <!-- <label class="pull-right">Montly</label> --> |
38 | <!-- <span style="font-size:13px;">(Monthly)</span> --> | 39 | <!-- <span style="font-size:13px;">(Monthly)</span> --> |
39 | <div class="clearfix"></div> | 40 | <div class="clearfix"></div> |
40 | </div> | 41 | </div> |
41 | <div class="clearfix"></div> | 42 | <div class="clearfix"></div> |
42 | </div> | 43 | </div> |
43 | <hr class="hr"> | 44 | <hr class="hr"> |
44 | <div class="col-xs-12"> | 45 | <div class="col-xs-12"> |
45 | <h2 style="margin-bottom: 0px;">{{completeOrderCount}}</h2> | 46 | <h2 style="margin-bottom: 0px;">{{completeOrderCount}}</h2> |
46 | <span>Fuel Orders</span> | 47 | <span>Fuel Orders</span> |
47 | </div> | 48 | </div> |
48 | <div class="clearfix"></div> | 49 | <div class="clearfix"></div> |
49 | </div> | 50 | </div> |
50 | </div> | 51 | </div> |
51 | <div class="col-md-3"> | 52 | <div class="col-md-3"> |
52 | <div class="widget-header"> | 53 | <div class="widget-header"> |
53 | <i class="fa fa-tint"></i> Pending Orders | 54 | <i class="fa fa-tint"></i> Pending Orders |
54 | 55 | ||
55 | </div> | 56 | </div> |
56 | <div class="custom-widget-content"> | 57 | <div class="custom-widget-content"> |
57 | <div> | 58 | <div> |
58 | <div class="col-xs-12"> | 59 | <div class="col-xs-12"> |
59 | <label class="pull-left" style="font-size: 13px" >Pending</label> | 60 | <label class="pull-left" style="font-size: 13px" >Pending</label> |
60 | <span style="font-size: 11px"> Monthly</span> | 61 | <span style="font-size: 11px"> Monthly</span> |
61 | <!-- <span class="pull-left">Pending</span><button class="btn btn-success btn-xs pull-right pull-right-color " style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> | 62 | <!-- <span class="pull-left">Pending</span><button class="btn btn-success btn-xs pull-right pull-right-color " style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> |
62 | <div class="clearfix"></div> | 63 | <div class="clearfix"></div> |
63 | </div> | 64 | </div> |
64 | <div class="clearfix"></div> | 65 | <div class="clearfix"></div> |
65 | </div> | 66 | </div> |
66 | <hr class="hr"> | 67 | <hr class="hr"> |
67 | <div class="col-xs-12"> | 68 | <div class="col-xs-12"> |
68 | <h2 style="margin-bottom: 0px;">{{pendingOrderCount}}</h2> | 69 | <h2 style="margin-bottom: 0px;">{{pendingOrderCount}}</h2> |
69 | <span>Fuel Orders</span> | 70 | <span>Fuel Orders</span> |
70 | </div> | 71 | </div> |
71 | <div class="clearfix"></div> | 72 | <div class="clearfix"></div> |
72 | </div> | 73 | </div> |
73 | </div> | 74 | </div> |
74 | <div class="col-md-6"> | 75 | <div class="col-md-6"> |
75 | <div class="widget-header"> | 76 | <div class="widget-header"> |
76 | <i class="fa fa-list-alt "></i> | 77 | <i class="fa fa-list-alt "></i> |
77 | <h3>Airport Operations</h3> | 78 | <h3>Airport Operations</h3> |
78 | </div> | 79 | </div> |
79 | <div class="custom-widget-content"> | 80 | <div class="custom-widget-content"> |
80 | <div> | 81 | <div> |
81 | <div class="col-xs-12"> | 82 | <div class="col-xs-12"> |
82 | <label class="pull-left" style="font-size: 12px" >Activity : Airport Operations</label> | 83 | <label class="pull-left" style="font-size: 12px" >Activity : Airport Operations</label> |
83 | <span style="font-size: 11px"> Monthly</span> | 84 | <span style="font-size: 11px"> Monthly</span> |
84 | <!-- <span class="pull-left">Activity: Airport Operations</span><button class="btn btn-primary btn-xs pull-right" style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> | 85 | <!-- <span class="pull-left">Activity: Airport Operations</span><button class="btn btn-primary btn-xs pull-right" style="cursor: default"><span style="font-size:9px;">Monthly</span></button> --> |
85 | <div class="clearfix"></div> | 86 | <div class="clearfix"></div> |
86 | </div> | 87 | </div> |
87 | <div class="clearfix"></div> | 88 | <div class="clearfix"></div> |
88 | </div> | 89 | </div> |
89 | <hr class="hr"> | 90 | <hr class="hr"> |
90 | <div class="col-xs-6"> | 91 | <div class="col-xs-6"> |
91 | <h2 style="margin-bottom:0px;">280</h2> | 92 | <h2 style="margin-bottom:0px;">280</h2> |
92 | <span>Based-Aircraft</span> | 93 | <span>Based-Aircraft</span> |
93 | </div> | 94 | </div> |
94 | <div class="col-xs-6"> | 95 | <div class="col-xs-6"> |
95 | <h2 style="margin-bottom: 0px;">280</h2> | 96 | <h2 style="margin-bottom: 0px;">280</h2> |
96 | <span>Take-offs & Landings</span> | 97 | <span>Take-offs & Landings</span> |
97 | </div> | 98 | </div> |
98 | <div class="clearfix"></div> | 99 | <div class="clearfix"></div> |
99 | </div> | 100 | </div> |
100 | </div> | 101 | </div> |
101 | </div> | 102 | </div> |
102 | </br> | 103 | </br> |
103 | <div class="row"> | 104 | <div class="row"> |
104 | <div class="col-md-12"> | 105 | <div class="col-md-12"> |
105 | <!-- <div class="widget stacked"> --> | 106 | <!-- <div class="widget stacked"> --> |
106 | <div class="widget-header"> | 107 | <div class="widget-header"> |
107 | <i class="icon-bar-chart"></i> | 108 | <i class="icon-bar-chart"></i> |
108 | <h3>${{ordersCost | number :2}}/{{ordersCount}} Fuel Sales</h3> | 109 | <h3>${{ordersCost | number :2}}/{{ordersCount}} Fuel Sales</h3> |
109 | </div> | 110 | </div> |
110 | <!-- /widget-header --> | 111 | <!-- /widget-header --> |
111 | <div class="widget-content"> | 112 | <div class="widget-content"> |
112 | <nvd3 options="optionsmfs" data="datamfs"></nvd3> | 113 | <nvd3 options="optionsmfs" data="datamfs"></nvd3> |
113 | <!-- /bar-chart --> | 114 | <!-- /bar-chart --> |
114 | <!-- </div> --> | 115 | <!-- </div> --> |
115 | <!-- /widget-content --> | 116 | <!-- /widget-content --> |
116 | </div> | 117 | </div> |
117 | <!-- /widget-content --> | 118 | <!-- /widget-content --> |
118 | </div> | 119 | </div> |
119 | <!-- /widget --> | 120 | <!-- /widget --> |
120 | </div> | 121 | </div> |
121 | </div> | 122 | </div> |
122 | </div> | 123 | </div> |
123 | <!-- /span6 --> | 124 | <!-- /span6 --> |
124 | <div class="col-md-5"> | 125 | <div class="col-md-5"> |
125 | <div class="widget stacked"> | 126 | <div class="widget stacked"> |
126 | <div class="widget-header"> | 127 | <div class="widget-header"> |
127 | <i class="fa fa-pencil"></i> | 128 | <i class="fa fa-pencil"></i> |
128 | <h3>Price Manager Active</h3> | 129 | <h3>Price Manager Active</h3> |
129 | <select ng-show="isShowEmail" style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-click="confirmMail()"> | 130 | <select ng-show="isShowEmail" style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-click="confirmMail()"> |
130 | <option value="" disabled selected="selected">Email All Pricing</option> | 131 | <option value="" disabled selected="selected">Email All Pricing</option> |
131 | <option value="JET-A">Email JET-A pricing only</option> | 132 | <option value="JET-A">Email JET-A pricing only</option> |
132 | <option value="AVGAS">Email AVGAS pricing only</option> | 133 | <option value="AVGAS">Email AVGAS pricing only</option> |
133 | <option disabled>_______________________________</option> | 134 | <option disabled>_______________________________</option> |
134 | <option value="all">Distribute All</option> | 135 | <option value="all">Distribute All</option> |
135 | </select> | 136 | </select> |
136 | </div> | 137 | </div> |
137 | <!-- /widget-header --> | 138 | <!-- /widget-header --> |
138 | <div class="widget-content"> | 139 | <div class="widget-content"> |
139 | <h4>Deployed Fuel Prices</h4> | 140 | <h4>Deployed Fuel Prices</h4> |
140 | <table class="table vertical-center""> | 141 | <table class="table vertical-center""> |
141 | <thead> | 142 | <thead> |
142 | <tr> | 143 | <tr> |
143 | <th> Product</th> | 144 | <th> Product</th> |
144 | <th> Cost</th> | 145 | <th> Cost</th> |
145 | <th> Margin</th> | 146 | <th> Margin</th> |
146 | <th> PAP(Total)</th> | 147 | <th> PAP(Total)</th> |
147 | <th style="color: #F90;"> Expires</th> | 148 | <th style="color: #F90;"> Expires</th> |
148 | </tr> | 149 | </tr> |
149 | </thead> | 150 | </thead> |
150 | <tbody> | 151 | <tbody> |
151 | <tr ng-repeat="fuelPricing in newFuelPricing | orderBy : 'namejetrest'| filter:{ status: true }"> | 152 | <tr ng-repeat="fuelPricing in newFuelPricing | orderBy : 'namejetrest'| filter:{ status: true }"> |
152 | <td> | 153 | <td> |
153 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | 154 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> |
154 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | 155 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> |
155 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | 156 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> |
156 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | 157 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> |
157 | </td> | 158 | </td> |
158 | <td> | 159 | <td> |
159 | <span>{{fuelPricing.fuelPricing.cost | number : 4}}</span> | 160 | <span>{{fuelPricing.fuelPricing.cost | number : 4}}</span> |
160 | </td> | 161 | </td> |
161 | <td> | 162 | <td> |
162 | <span>{{fuelPricing.fuelPricing.papMargin | number : 4}}</span> | 163 | <span>{{fuelPricing.fuelPricing.papMargin | number : 4}}</span> |
163 | </td> | 164 | </td> |
164 | <td> | 165 | <td> |
165 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 4 }}</span> | 166 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 4 }}</span> |
166 | </td> | 167 | </td> |
167 | <td> | 168 | <td> |
168 | <span>{{fuelPricing.fuelPricing.expirationDate}}</span> | 169 | <span>{{fuelPricing.fuelPricing.expirationDate}}</span> |
169 | </td> | 170 | </td> |
170 | </tr> | 171 | </tr> |
171 | </tbody> | 172 | </tbody> |
172 | </table> | 173 | </table> |
173 | </div> | 174 | </div> |
174 | <!-- /widget-content --> | 175 | <!-- /widget-content --> |
175 | </div> | 176 | </div> |
176 | <!-- /widget --> | 177 | <!-- /widget --> |
177 | <div class="widget widget-nopad stacked"> | 178 | <div class="widget widget-nopad stacked"> |
178 | <div class="widget-header"> | 179 | <div class="widget-header"> |
179 | <i class="fa fa-comment" aria-hidden="true"></i> | 180 | <i class="fa fa-comment" aria-hidden="true"></i> |
180 | <h3>Needs Attention</h3> | 181 | <h3>Needs Attention</h3> |
181 | </div> | 182 | </div> |
182 | <!-- /widget-header --> | 183 | <!-- /widget-header --> |
183 | <div class="widget-content"> | 184 | <div class="widget-content"> |
184 | <h4 style="padding:10px">Messages</h4> | 185 | <h4 style="padding:10px">Messages</h4> |
185 | <hr class="hr"> | 186 | <hr class="hr"> |
186 | <table> | 187 | <table> |
187 | <tr ng-repeat="msg in pendingMessageRecord"> | 188 | <tr ng-repeat="msg in pendingMessageRecord"> |
188 | <td>Fuel Order is Pending for the company {{ msg[5] }} </td> | 189 | <td>Fuel Order is Pending for the company {{ msg[5] }} </td> |
189 | </tr> | 190 | </tr> |
190 | </table> | 191 | </table> |
191 | <!-- <ul class="news-items"><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li></ul> --> | 192 | <!-- <ul class="news-items"><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li><li><div class="news-item-detail"><a href="javascript:;" class="news-item-title">Duis aute irure dolor in reprehenderit</a><p class="news-item-preview">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p></div><div class="news-item-date"><span class="news-item-day">08</span><span class="news-item-month">Mar</span></div></li></ul> --> |
192 | </div> | 193 | </div> |
193 | <!-- /widget-content --> | 194 | <!-- /widget-content --> |
194 | </div> | 195 | </div> |
195 | <!-- /widget --> | 196 | <!-- /widget --> |
196 | </div> | 197 | </div> |
197 | <!-- /span6 --> | 198 | <!-- /span6 --> |
198 | </div> | 199 | </div> |
199 | <!-- /row --> | 200 | <!-- /row --> |
200 | </div> | 201 | </div> |
201 | <!-- /container --> | 202 | <!-- /container --> |
202 | </div> | 203 | </div> |
203 | <!-- /main --> | 204 | <!-- /main --> |
204 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> | 205 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> |
205 | <div class="customModalInner"> | 206 | <div class="customModalInner"> |
206 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 207 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
207 | <table> | 208 | <table> |
208 | <tr> | 209 | <tr> |
209 | <td> | 210 | <td> |
210 | <img src="img/info.png" style="width: 50px;"> | 211 | <img src="img/info.png" style="width: 50px;"> |
211 | </td> | 212 | </td> |
212 | <td> | 213 | <td> |
213 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 214 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
214 | </td> | 215 | </td> |
215 | </tr> | 216 | </tr> |
216 | </table> | 217 | </table> |
217 | </div> | 218 | </div> |
218 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 219 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
219 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> | 220 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> |
220 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 221 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
221 | </div> | 222 | </div> |
222 | </div> | 223 | </div> |
223 | </div> | 224 | </div> |
224 | 225 |
app/partials/fuelOrders/fuelOrders.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); | 5 | .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','$stateParams','fuelOrdersService','CustomersService','ViewCompanyService', fuelOrdersController]); |
6 | 6 | ||
7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService,CustomersService,ViewCompanyService) { | 7 | function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,$stateParams,fuelOrdersService,CustomersService,ViewCompanyService) { |
8 | 8 | ||
9 | $scope.showFuelOrderModal = false; | 9 | $scope.showFuelOrderModal = false; |
10 | $scope.optionSelected; | 10 | $scope.optionSelected; |
11 | $scope.orderdata = {}; | 11 | $scope.orderdata = {}; |
12 | $scope.showLoader = false; | 12 | $scope.showLoader = false; |
13 | $scope.jetShow = []; | 13 | $scope.jetShow = []; |
14 | $scope.marginShow = []; | 14 | $scope.marginShow = []; |
15 | 15 | ||
16 | $scope.jetShow[0] = true; | 16 | $scope.jetShow[0] = true; |
17 | $scope.marginShow[0] = true; | 17 | $scope.marginShow[0] = true; |
18 | 18 | ||
19 | $scope.data = {}; | 19 | $scope.data = {}; |
20 | $scope.order = {}; | 20 | $scope.order = {}; |
21 | $scope.dispatchOrder = {}; | 21 | $scope.dispatchOrder = {}; |
22 | $scope.dispatchOrder.fuelOrderList = []; | 22 | $scope.dispatchOrder.fuelOrderList = []; |
23 | 23 | $scope.defaultStatus = ''; | |
24 | $scope.statusFilterOptions = []; | 24 | $scope.statusFilterOptions = []; |
25 | $scope.statusFilterOptions.push({ | 25 | $scope.statusFilterOptions.push({ |
26 | 'id': '', 'title': 'Show All' | 26 | 'id': '', 'title': 'Show All' |
27 | },{ | 27 | },{ |
28 | 'id': 'pending', 'title': 'Pending' | 28 | 'id': 'pending', 'title': 'Pending' |
29 | },{ | 29 | },{ |
30 | 'id': 'invoiced', 'title': 'Invoiced' | 30 | 'id': 'invoiced', 'title': 'Invoiced' |
31 | },{ | 31 | },{ |
32 | 'id': 'paid', 'title': 'Paid' | 32 | 'id': 'paid', 'title': 'Paid' |
33 | },{ | 33 | },{ |
34 | 'id': 'cancelled', 'title': 'Cancelled' | 34 | 'id': 'cancelled', 'title': 'Cancelled' |
35 | },{ | 35 | },{ |
36 | 'id': 'archived', 'title': 'Archived' | 36 | 'id': 'archived', 'title': 'Archived' |
37 | } | 37 | } |
38 | 38 | ||
39 | ); | 39 | ); |
40 | 40 | ||
41 | if($stateParams.status =="paid"){ | ||
42 | $scope.defaultStatus = "paid"; | ||
43 | } | ||
44 | |||
41 | getAllCompanies(); | 45 | getAllCompanies(); |
42 | 46 | ||
43 | function getAllCompanies(){ | 47 | function getAllCompanies(){ |
44 | fuelOrdersService.getAllCompanies().then(function(result) { | 48 | fuelOrdersService.getAllCompanies().then(function(result) { |
45 | $scope.companyList = result; | 49 | $scope.companyList = result; |
46 | for (var i = 0; i < $scope.companyList.length; i++) { | 50 | for (var i = 0; i < $scope.companyList.length; i++) { |
47 | if ($scope.companyList[i].companyContact != null) { | 51 | if ($scope.companyList[i].companyContact != null) { |
48 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { | 52 | if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { |
49 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; | 53 | $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; |
50 | } | 54 | } |
51 | } | 55 | } |
52 | if ($scope.companyList[i].primaryContact != null) { | 56 | if ($scope.companyList[i].primaryContact != null) { |
53 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { | 57 | if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { |
54 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; | 58 | $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; |
55 | } | 59 | } |
56 | } | 60 | } |
57 | if ($scope.companyList[i].margin != null) { | 61 | if ($scope.companyList[i].margin != null) { |
58 | if ($scope.companyList[i].margin.marginName != null) { | 62 | if ($scope.companyList[i].margin.marginName != null) { |
59 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; | 63 | $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; |
60 | } | 64 | } |
61 | } | 65 | } |
62 | } | 66 | } |
63 | $scope.displayCompanyList = new NgTableParams({ | 67 | $scope.displayCompanyList = new NgTableParams({ |
64 | page: 1, | 68 | page: 1, |
65 | count: 10, | 69 | count: 10, |
66 | }, { | 70 | }, { |
67 | data: $scope.companyList | 71 | data: $scope.companyList |
68 | }); | 72 | }); |
69 | $scope.showLoader = false; | 73 | $scope.showLoader = false; |
70 | }) | 74 | }) |
71 | } | 75 | } |
72 | 76 | ||
73 | 77 | ||
74 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | 78 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) |
75 | $scope.reset2 = function(){ | 79 | $scope.reset2 = function(){ |
76 | $("input").val(""); | 80 | $("input").val(""); |
77 | $scope.removeMarginValidation(); | 81 | $scope.removeMarginValidation(); |
78 | } | 82 | } |
79 | 83 | ||
80 | function colourFunction() { | 84 | function colourFunction() { |
81 | var myselect = document.getElementById('colorfulSelectbox'), | 85 | var myselect = document.getElementById('colorfulSelectbox'), |
82 | colour = myselect.options[myselect.selectedIndex].className; | 86 | colour = myselect.options[myselect.selectedIndex].className; |
83 | myselect.style.background = colour; | 87 | myselect.style.background = colour; |
84 | myselect.blur(); | 88 | myselect.blur(); |
85 | } | 89 | } |
86 | 90 | ||
87 | 91 | ||
88 | /*setInterval(function(){ | 92 | /*setInterval(function(){ |
89 | colourFunction(); | 93 | colourFunction(); |
90 | }, 1)*/ | 94 | }, 1)*/ |
91 | 95 | ||
92 | 96 | ||
93 | $scope.attachmentFilterOptions = []; | 97 | $scope.attachmentFilterOptions = []; |
94 | $scope.attachmentFilterOptions.push({ | 98 | $scope.attachmentFilterOptions.push({ |
95 | 'id': '', 'title': 'Show All' | 99 | 'id': '', 'title': 'Show All' |
96 | },{ | 100 | },{ |
97 | 'id': '!null', 'title': 'Attachments' | 101 | 'id': '!null', 'title': 'Attachments' |
98 | },{ | 102 | },{ |
99 | 'id': 'null', 'title': 'No Attachments' | 103 | 'id': 'null', 'title': 'No Attachments' |
100 | } | 104 | } |
101 | ); | 105 | ); |
102 | 106 | ||
103 | // $(document).ready(function() { | 107 | // $(document).ready(function() { |
104 | // $scope.showLoader = true; | 108 | // $scope.showLoader = true; |
105 | // $('#example').DataTable(); | 109 | // $('#example').DataTable(); |
106 | // $scope.showLoader = false; | 110 | // $scope.showLoader = false; |
107 | // }); | 111 | // }); |
108 | 112 | ||
109 | $scope.getOrders = function() { | 113 | $scope.getOrders = function() { |
110 | fuelOrdersService.getOrders().then(function(result) { | 114 | fuelOrdersService.getOrders().then(function(result) { |
111 | $scope.orderdata = result; | 115 | $scope.orderdata = result; |
112 | for(var i=0 ; i < $scope.orderdata.length ; i++){ | 116 | for(var i=0 ; i < $scope.orderdata.length ; i++){ |
113 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); | 117 | $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); |
114 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); | 118 | $scope.orderdata[i].departingDateS = new Date($scope.orderdata[i].departingDate); |
115 | 119 | ||
116 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); | 120 | var str = "" + ($scope.orderdata[i].upliftDateS.getMonth() + 1) + "/" + $scope.orderdata[i].upliftDateS.getDate() + "/" + $scope.orderdata[i].upliftDateS.getFullYear(); |
117 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); | 121 | var departingStr = "" + ($scope.orderdata[i].departingDateS.getMonth() + 1) + "/" + $scope.orderdata[i].departingDateS.getDate() + "/" + $scope.orderdata[i].departingDateS.getFullYear(); |
118 | $scope.orderdata[i].upliftDateString = str; | 122 | $scope.orderdata[i].upliftDateString = str; |
119 | $scope.orderdata[i].departingDateString = departingStr; | 123 | $scope.orderdata[i].departingDateString = departingStr; |
120 | //not working in input type Time | 124 | //not working in input type Time |
121 | /*if ($scope.orderdata[i].etaTime != null) { | 125 | /*if ($scope.orderdata[i].etaTime != null) { |
122 | var now = new Date(); | 126 | var now = new Date(); |
123 | 127 | ||
124 | var hr = $scope.orderdata[i].etaTime.slice(0, 2); | 128 | var hr = $scope.orderdata[i].etaTime.slice(0, 2); |
125 | var mm = $scope.orderdata[i].etaTime.slice(3, 5); | 129 | var mm = $scope.orderdata[i].etaTime.slice(3, 5); |
126 | now.setHours(hr); | 130 | now.setHours(hr); |
127 | now.setMinutes(mm); | 131 | now.setMinutes(mm); |
128 | $scope.orderdata[i].etaTime = now; | 132 | $scope.orderdata[i].etaTime = now; |
129 | console.log("===eta====", now, hr, mm); | 133 | console.log("===eta====", now, hr, mm); |
130 | }*/ | 134 | }*/ |
131 | 135 | ||
132 | } | 136 | } |
133 | 137 | ||
134 | $scope.displayFuelOrderList = new NgTableParams({ | 138 | $scope.displayFuelOrderList = new NgTableParams({ |
135 | page: 1, | 139 | page: 1, |
136 | count: 10, | 140 | count: 10, |
137 | }, { | 141 | }, { |
138 | data: $scope.orderdata | 142 | data: $scope.orderdata |
139 | }); | 143 | }); |
140 | $(document).ready(function(){ | 144 | $(document).ready(function(){ |
141 | function changeSelectboxBg(){ | 145 | function changeSelectboxBg(){ |
142 | setInterval(function(){ | 146 | setInterval(function(){ |
143 | if ($('.table select').is(':focus')) { | 147 | if ($('.table select').is(':focus')) { |
144 | 148 | ||
145 | }else{ | 149 | }else{ |
146 | var myselect = document.getElementsByClassName('colorfulSelectbox'); | 150 | var myselect = document.getElementsByClassName('colorfulSelectbox'); |
147 | 151 | ||
148 | for (var i = 0; i < myselect.length; i++) { | 152 | for (var i = 0; i < myselect.length; i++) { |
149 | var colourIndex = $(myselect[i]).prop('selectedIndex'); | 153 | var colourIndex = $(myselect[i]).prop('selectedIndex'); |
150 | colourIndex = colourIndex + 1; | 154 | colourIndex = colourIndex + 1; |
151 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); | 155 | var getColor = $('.colorfulSelectbox option:nth-child('+colourIndex+')').css('color'); |
152 | $(myselect[i]).css('background-color', getColor); | 156 | $(myselect[i]).css('background-color', getColor); |
153 | myselect[i].blur(); | 157 | myselect[i].blur(); |
154 | } | 158 | } |
155 | } | 159 | } |
156 | }, 1000) | 160 | }, 1000) |
157 | } | 161 | } |
158 | changeSelectboxBg(); | 162 | changeSelectboxBg(); |
159 | 163 | ||
160 | /*$('.pagination , .recordCountSelect').click(function(){ | 164 | /*$('.pagination , .recordCountSelect').click(function(){ |
161 | changeSelectboxBg(); | 165 | changeSelectboxBg(); |
162 | }) | 166 | }) |
163 | $('.input-filter').keydown(function(){ | 167 | $('.input-filter').keydown(function(){ |
164 | console.log('function..........'); | 168 | console.log('function..........'); |
165 | changeSelectboxBg(); | 169 | changeSelectboxBg(); |
166 | })*/ | 170 | })*/ |
167 | }) | 171 | }) |
168 | }) | 172 | }) |
169 | } | 173 | } |
170 | 174 | ||
171 | $scope.getOrders(); | 175 | $scope.getOrders(); |
172 | $scope.optionSelected=''; | 176 | $scope.optionSelected=''; |
173 | $scope.onFWSelect = function() { | 177 | $scope.onFWSelect = function() { |
174 | if($scope.optionSelected == 'dt'){ | 178 | if($scope.optionSelected == 'dt'){ |
175 | $('#demo-modal-4').css('display', 'block'); | 179 | $('#demo-modal-4').css('display', 'block'); |
176 | $scope.optionSelected=''; | 180 | $scope.optionSelected=''; |
177 | 181 | ||
178 | } | 182 | } |
179 | if($scope.optionSelected == 'efo'){ | 183 | if($scope.optionSelected == 'efo'){ |
180 | $scope.showLoader = true; | 184 | $scope.showLoader = true; |
181 | var fileName = "orders.csv"; | 185 | var fileName = "orders.csv"; |
182 | var a = document.createElement("a"); | 186 | var a = document.createElement("a"); |
183 | document.body.appendChild(a); | 187 | document.body.appendChild(a); |
184 | fuelOrdersService.exportCompany().then(function(result) { | 188 | fuelOrdersService.exportCompany().then(function(result) { |
185 | var file = new Blob([result], {type: 'application/csv'}); | 189 | var file = new Blob([result], {type: 'application/csv'}); |
186 | var fileURL = URL.createObjectURL(file); | 190 | var fileURL = URL.createObjectURL(file); |
187 | a.href = fileURL; | 191 | a.href = fileURL; |
188 | a.download = fileName; | 192 | a.download = fileName; |
189 | a.click(); | 193 | a.click(); |
190 | $scope.showLoader = false; | 194 | $scope.showLoader = false; |
191 | $scope.optionSelected=''; | 195 | $scope.optionSelected=''; |
192 | }) | 196 | }) |
193 | } | 197 | } |
194 | } | 198 | } |
195 | $scope.attachmentrowid = "" | 199 | $scope.attachmentrowid = "" |
196 | 200 | ||
197 | 201 | ||
198 | $scope.attachment = function(id, value, url) { | 202 | $scope.attachment = function(id, value, url) { |
199 | $scope.attachmentrowid = id | 203 | $scope.attachmentrowid = id |
200 | if(value == 'uploadAttachment'){ | 204 | if(value == 'uploadAttachment'){ |
201 | $('#demo-modal-6').css('display', 'block'); | 205 | $('#demo-modal-6').css('display', 'block'); |
202 | }else if(value == 'viewAttachment'){ | 206 | }else if(value == 'viewAttachment'){ |
203 | var win = window.open(url, '_blank'); | 207 | var win = window.open(url, '_blank'); |
204 | win.focus(); | 208 | win.focus(); |
205 | }else if(value == 'deleteAttachment'){ | 209 | }else if(value == 'deleteAttachment'){ |
206 | $('#delete1').css('display', 'block'); | 210 | $('#delete1').css('display', 'block'); |
207 | } | 211 | } |
208 | } | 212 | } |
209 | 213 | ||
210 | $scope.cancelDeleteAttachment = function() { | 214 | $scope.cancelDeleteAttachment = function() { |
211 | $('#delete1').css('display', ''); | 215 | $('#delete1').css('display', ''); |
212 | } | 216 | } |
213 | 217 | ||
214 | $scope.deleteAttachment = function() { | 218 | $scope.deleteAttachment = function() { |
215 | $scope.showLoader = true; | 219 | $scope.showLoader = true; |
216 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { | 220 | fuelOrdersService.deleteAttachment($scope.attachmentrowid).then(function(result) { |
217 | 221 | ||
218 | if(result.success){ | 222 | if(result.success){ |
219 | toastr.success(''+result.success+'', { | 223 | toastr.success(''+result.success+'', { |
220 | closeButton: true | 224 | closeButton: true |
221 | }) | 225 | }) |
222 | } | 226 | } |
223 | }) | 227 | }) |
224 | $scope.showLoader = false; | 228 | $scope.showLoader = false; |
225 | $('#delete1').css('display', ''); | 229 | $('#delete1').css('display', ''); |
226 | } | 230 | } |
227 | 231 | ||
228 | $scope.saveUploadAttachment = function(attachmentData) { | 232 | $scope.saveUploadAttachment = function(attachmentData) { |
229 | $scope.showLoader = true; | 233 | $scope.showLoader = true; |
230 | $scope.data.media = attachmentData | 234 | $scope.data.media = attachmentData |
231 | $scope.data.id = $scope.attachmentrowid | 235 | $scope.data.id = $scope.attachmentrowid |
232 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { | 236 | fuelOrdersService.uploadAttachment($scope.data).then(function(result) { |
233 | if(result){ | 237 | if(result){ |
234 | toastr.success(''+"Upload Successful"+'', { | 238 | toastr.success(''+"Upload Successful"+'', { |
235 | closeButton: true | 239 | closeButton: true |
236 | }) | 240 | }) |
237 | } | 241 | } |
238 | 242 | ||
239 | }) | 243 | }) |
240 | $scope.showLoader = false; | 244 | $scope.showLoader = false; |
241 | $('#demo-modal-6').css('display', 'none'); | 245 | $('#demo-modal-6').css('display', 'none'); |
242 | } | 246 | } |
243 | 247 | ||
244 | $scope.cancelUploadAttachment = function() { | 248 | $scope.cancelUploadAttachment = function() { |
245 | $('#demo-modal-6').css('display', 'none'); | 249 | $('#demo-modal-6').css('display', 'none'); |
246 | } | 250 | } |
247 | 251 | ||
248 | $scope.editdata = {}; | 252 | $scope.editdata = {}; |
249 | 253 | ||
250 | 254 | ||
251 | $scope.editTableRow = function(rowData){ | 255 | $scope.editTableRow = function(rowData){ |
252 | //console.log('row data', rowData); | 256 | //console.log('row data', rowData); |
253 | $scope.editdata = rowData; | 257 | $scope.editdata = rowData; |
254 | $('#demo-modal-5').css('display', 'block'); | 258 | $('#demo-modal-5').css('display', 'block'); |
255 | } | 259 | } |
256 | 260 | ||
257 | $scope.updateTotal = function(value, valueOf){ | 261 | $scope.updateTotal = function(value, valueOf){ |
258 | if(valueOf == 'v'){ | 262 | if(valueOf == 'v'){ |
259 | $scope.editdata.total = value * $scope.editdata.invoiced | 263 | $scope.editdata.total = value * $scope.editdata.invoiced |
260 | }else if(valueOf == 'i'){ | 264 | }else if(valueOf == 'i'){ |
261 | $scope.editdata.total = $scope.editdata.requestedVolume * value | 265 | $scope.editdata.total = $scope.editdata.requestedVolume * value |
262 | } | 266 | } |
263 | } | 267 | } |
264 | 268 | ||
265 | $scope.setCost = function(cost){ | 269 | $scope.setCost = function(cost){ |
266 | if(cost != null) { | 270 | if(cost != null) { |
267 | var obj =JSON.parse(cost); | 271 | var obj =JSON.parse(cost); |
268 | $scope.order.fboCost = obj.cost; | 272 | $scope.order.fboCost = obj.cost; |
269 | } | 273 | } |
270 | 274 | ||
271 | } | 275 | } |
272 | 276 | ||
273 | $scope.addTotal = function(value, valueOf) { | 277 | $scope.addTotal = function(value, valueOf) { |
274 | if (value != undefined && valueOf != undefined) { | 278 | if (value != undefined && valueOf != undefined) { |
275 | value = JSON.parse(value) | 279 | value = JSON.parse(value) |
276 | $scope.order.total = value.cost * valueOf; | 280 | $scope.order.total = value.cost * valueOf; |
277 | } | 281 | } |
278 | } | 282 | } |
279 | 283 | ||
280 | $scope.addFuelData = function() { | 284 | $scope.addFuelData = function() { |
281 | // $scope.showLoader = true; | 285 | $scope.showLoader = true; |
282 | $scope.fuelData = {}; | 286 | $scope.fuelData = {}; |
283 | $scope.fuelData.companyId = $scope.selectedCompanyId; | 287 | $scope.fuelData.companyId = $scope.selectedCompanyId; |
284 | 288 | ||
285 | $scope.fuelData.companyName = $scope.order.companyName; | 289 | $scope.fuelData.companyName = $scope.order.companyName; |
286 | var aircraftObj =JSON.parse($scope.order.aircraftName); | 290 | var aircraftObj =JSON.parse($scope.order.aircraftName); |
287 | $scope.fuelData.aircraftName = aircraftObj.tail; | 291 | $scope.fuelData.aircraftName = aircraftObj.tail; |
288 | $scope.fuelData.make = aircraftObj.make; | 292 | $scope.fuelData.make = aircraftObj.make; |
289 | $scope.fuelData.model = aircraftObj.model; | 293 | $scope.fuelData.model = aircraftObj.model; |
290 | $scope.fuelData.fuelOn = $scope.order.fuelOn; | 294 | $scope.fuelData.fuelOn = $scope.order.fuelOn; |
291 | $scope.fuelData.invoiced = $scope.order.invoiced; | 295 | $scope.fuelData.invoiced = $scope.order.invoiced; |
292 | $scope.fuelData.volume = $scope.order.volume; | 296 | $scope.fuelData.volume = $scope.order.volume; |
293 | // $scope.fuelData.source = $scope.order.source; | 297 | // $scope.fuelData.source = $scope.order.source; |
294 | 298 | ||
295 | $scope.fuelData.total = $scope.order.total; | 299 | $scope.fuelData.total = $scope.order.total; |
296 | //tier no use | 300 | //tier no use |
297 | $scope.fuelData.tierBreak = $scope.order.tierBreak; | 301 | $scope.fuelData.tierBreak = $scope.order.tierBreak; |
298 | 302 | ||
299 | var obj =JSON.parse($scope.order.priceQuote); | 303 | var obj =JSON.parse($scope.order.priceQuote); |
300 | $scope.fuelData.priceQuote = obj.papTotal; | 304 | $scope.fuelData.priceQuote = obj.papTotal; |
301 | $scope.fuelData.fboCost = obj.cost; | 305 | $scope.fuelData.fboCost = obj.cost; |
302 | $scope.fuelData.productName = obj.productName; | 306 | $scope.fuelData.productName = obj.productName; |
303 | 307 | ||
304 | $scope.fuelData.etaTime = $scope.order.etaTime; | 308 | $scope.fuelData.etaTime = $scope.order.etaTime; |
305 | $scope.fuelData.etdTime = $scope.order.etdTime; | 309 | $scope.fuelData.etdTime = $scope.order.etdTime; |
306 | $scope.fuelData.certificateType = $scope.order.certificateType; | 310 | $scope.fuelData.certificateType = $scope.order.certificateType; |
307 | var currentDate = new Date(); | 311 | var currentDate = new Date(); |
308 | var hours = currentDate.getHours(); | 312 | var hours = currentDate.getHours(); |
309 | var min = currentDate.getMinutes(); | 313 | var min = currentDate.getMinutes(); |
310 | var sec = currentDate.getSeconds(); | 314 | var sec = currentDate.getSeconds(); |
311 | if ($scope.order.upliftDate != '') { | 315 | if ($scope.order.upliftDate != '') { |
312 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; | 316 | $scope.order.upliftDate = $scope.order.upliftDate + ' ' + hours + ':' + min + ':' + sec; |
313 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 317 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
314 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); | 318 | $scope.fuelData.upliftDate = $scope.order.upliftDate.getTime(); |
315 | } | 319 | } |
316 | 320 | ||
317 | 321 | ||
318 | if ($scope.order.departingDate != '') { | 322 | if ($scope.order.departingDate != '') { |
319 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; | 323 | $scope.order.departingDate = $scope.order.departingDate + ' ' + hours + ':' + min + ':' + sec; |
320 | $scope.order.departingDate = new Date($scope.order.departingDate); | 324 | $scope.order.departingDate = new Date($scope.order.departingDate); |
321 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); | 325 | $scope.fuelData.departingDate = $scope.order.departingDate.getTime(); |
322 | } | 326 | } |
323 | 327 | ||
324 | if($scope.order.status === null || $scope.order.status === undefined){ | 328 | if($scope.order.status === null || $scope.order.status === undefined){ |
325 | 329 | ||
326 | $scope.fuelData.status = "pending"; //default status | 330 | $scope.fuelData.status = "pending"; //default status |
327 | 331 | ||
328 | }else { | 332 | }else { |
329 | 333 | ||
330 | $scope.fuelData.status = $scope.order.status; | 334 | $scope.fuelData.status = $scope.order.status; |
331 | } | 335 | } |
332 | 336 | ||
333 | if($scope.baseTenant && $scope.contractFuelVendor ){ | 337 | if($scope.baseTenant && $scope.contractFuelVendor ){ |
334 | $scope.fuelData.source = "Tenant/Base Customer CAA Member" ; | 338 | $scope.fuelData.source = "Tenant/Base Customer CAA Member" ; |
335 | }else if($scope.baseTenant) | 339 | }else if($scope.baseTenant) |
336 | { | 340 | { |
337 | $scope.fuelData.source = "Tenant/Base Customer"; | 341 | $scope.fuelData.source = "Tenant/Base Customer"; |
338 | }else if($scope.contractFuelVendor){ | 342 | }else if($scope.contractFuelVendor){ |
339 | $scope.fuelData.source = "CAA Member"; | 343 | $scope.fuelData.source = "CAA Member"; |
340 | } | 344 | } |
341 | 345 | ||
342 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 346 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
343 | // console.log("=====$scope.fueldata======",$scope.fuelData) | 347 | // console.log("=====$scope.fueldata======",$scope.fuelData) |
344 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 348 | fuelOrdersService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
345 | $scope.showLoader = false; | 349 | $scope.showLoader = false; |
346 | $scope.order = {}; | 350 | $scope.order = {}; |
347 | $scope.dispatchOrder.fuelOrderList = []; | 351 | $scope.dispatchOrder.fuelOrderList = []; |
348 | $('#demo-modal-4').css('display', ''); | 352 | $('#demo-modal-4').css('display', ''); |
349 | $scope.getOrders(); | 353 | $scope.getOrders(); |
350 | toastr.success('Fuel Order Dispatched Successfully', { | 354 | toastr.success('Fuel Order Dispatched Successfully', { |
351 | closeButton: true | 355 | closeButton: true |
352 | }) | 356 | }) |
353 | }) | 357 | }) |
354 | 358 | ||
355 | 359 | ||
356 | } | 360 | } |
357 | 361 | ||
358 | $scope.updateStatus = function(row, status) { | 362 | $scope.updateStatus = function(row, status) { |
363 | |||
359 | $scope.showLoader = true; | 364 | $scope.showLoader = true; |
360 | $scope.fuelData = {}; | 365 | $scope.fuelData = {}; |
361 | $scope.fuelData.aircraftName = row.aircraftName | 366 | $scope.fuelData.aircraftName = row.aircraftName |
362 | $scope.fuelData.companyName = row.companyName | 367 | $scope.fuelData.companyName = row.companyName |
363 | $scope.fuelData.departingDate = row.departingDate | 368 | $scope.fuelData.departingDate = row.departingDate |
364 | $scope.fuelData.fboCost = row.fboCost | 369 | $scope.fuelData.fboCost = row.fboCost |
365 | $scope.fuelData.id = row.id | 370 | $scope.fuelData.id = row.id |
366 | $scope.fuelData.invoiced = row.invoiced | 371 | $scope.fuelData.invoiced = row.invoiced |
367 | $scope.fuelData.priceQuote = row.priceQuote | 372 | $scope.fuelData.priceQuote = row.priceQuote |
368 | $scope.fuelData.volume = row.requestedVolume | 373 | $scope.fuelData.volume = row.requestedVolume |
369 | $scope.fuelData.source = row.source | 374 | $scope.fuelData.source = row.source |
370 | $scope.fuelData.status = status | 375 | $scope.fuelData.status = status |
371 | $scope.fuelData.tierBreak = row.tierBreak | 376 | $scope.fuelData.tierBreak = row.tierBreak |
372 | $scope.fuelData.total = row.total | 377 | $scope.fuelData.total = row.total |
373 | $scope.fuelData.upliftDate = row.upliftDate | 378 | $scope.fuelData.upliftDate = row.upliftDate |
374 | 379 | ||
375 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 380 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
376 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 381 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
377 | $scope.showLoader = false; | 382 | $scope.showLoader = false; |
378 | $scope.editdata = {}; | 383 | $scope.editdata = {}; |
379 | $scope.fuelData = {}; | 384 | $scope.fuelData = {}; |
380 | $scope.dispatchOrder.fuelOrderList = []; | 385 | $scope.dispatchOrder.fuelOrderList = []; |
381 | $('#demo-modal-5').css('display', ''); | 386 | $('#demo-modal-5').css('display', ''); |
382 | $scope.getOrders(); | 387 | $scope.getOrders(); |
383 | toastr.success('Fuel Order Updated Successfully', { | 388 | toastr.success('Fuel Order Updated Successfully', { |
384 | closeButton: true | 389 | closeButton: true |
385 | }); | 390 | }); |
386 | }) | 391 | }) |
387 | 392 | ||
388 | } | 393 | } |
389 | $scope.fuelData = {}; | 394 | $scope.fuelData = {}; |
390 | $scope.updateData = function() { | 395 | $scope.updateData = function() { |
391 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ | 396 | if($scope.editdata.etaTime != null && $scope.editdata.etdTime != null){ |
392 | if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) { | 397 | if($scope.editdata.fuelOn != null || $scope.editdata.fuelOn != undefined) { |
393 | $scope.showLoader = true; | 398 | $scope.showLoader = true; |
394 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; | 399 | $scope.fuelData.aircraftName = $scope.editdata.aircraftName; |
395 | $scope.fuelData.companyName = $scope.editdata.companyName; | 400 | $scope.fuelData.companyName = $scope.editdata.companyName; |
396 | $scope.fuelData.fboCost = $scope.editdata.fboCost; | 401 | $scope.fuelData.fboCost = $scope.editdata.fboCost; |
397 | $scope.fuelData.id = $scope.editdata.id; | 402 | $scope.fuelData.id = $scope.editdata.id; |
398 | $scope.fuelData.invoiced = $scope.editdata.invoiced; | 403 | $scope.fuelData.invoiced = $scope.editdata.invoiced; |
399 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; | 404 | $scope.fuelData.priceQuote = $scope.editdata.priceQuote; |
400 | $scope.fuelData.volume = $scope.editdata.requestedVolume; | 405 | $scope.fuelData.volume = $scope.editdata.requestedVolume; |
401 | $scope.fuelData.source = $scope.editdata.source; | 406 | $scope.fuelData.source = $scope.editdata.source; |
402 | $scope.fuelData.status = $scope.editdata.status; | 407 | $scope.fuelData.status = $scope.editdata.status; |
403 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; | 408 | $scope.fuelData.tierBreak = $scope.editdata.tierBreak; |
404 | $scope.fuelData.total = $scope.editdata.total; | 409 | $scope.fuelData.total = $scope.editdata.total; |
405 | 410 | ||
406 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); | 411 | $scope.editdata.upliftDateString = new Date($scope.editdata.upliftDateString); |
407 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); | 412 | $scope.editdata.upliftDateString = $scope.editdata.upliftDateString.getTime(); |
408 | 413 | ||
409 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); | 414 | $scope.editdata.departingDateString = new Date($scope.editdata.departingDateString); |
410 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); | 415 | $scope.editdata.departingDateString = $scope.editdata.departingDateString.getTime(); |
411 | 416 | ||
412 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; | 417 | $scope.fuelData.upliftDate = $scope.editdata.upliftDateString; |
413 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; | 418 | $scope.fuelData.departingDate = $scope.editdata.departingDateString; |
414 | $scope.fuelData.productName = $scope.editdata.productName; | 419 | $scope.fuelData.productName = $scope.editdata.productName; |
415 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); | 420 | /*$scope.fuelData.etaTime = $scope.editdata.etaTime.toLocaleTimeString(); |
416 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ | 421 | $scope.fuelData.etdTime = $scope.editdata.etdTime.toLocaleTimeString();*/ |
417 | $scope.fuelData.etaTime = $scope.editdata.etaTime; | 422 | $scope.fuelData.etaTime = $scope.editdata.etaTime; |
418 | $scope.fuelData.etdTime = $scope.editdata.etdTime; | 423 | $scope.fuelData.etdTime = $scope.editdata.etdTime; |
419 | $scope.fuelData.certificateType = $scope.editdata.certificateType; | 424 | $scope.fuelData.certificateType = $scope.editdata.certificateType; |
420 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn; | 425 | $scope.fuelData.fuelOn = $scope.editdata.fuelOn; |
421 | 426 | ||
422 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); | 427 | $scope.dispatchOrder.fuelOrderList.push($scope.fuelData); |
423 | // console.log("====fueldata===",$scope.dispatchOrder); | 428 | // console.log("====fueldata===",$scope.dispatchOrder); |
424 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { | 429 | fuelOrdersService.updateFuelOrder($scope.dispatchOrder).then(function(result) { |
425 | // console.log('result', result); | 430 | // console.log('result', result); |
426 | $scope.showLoader = false; | 431 | $scope.showLoader = false; |
427 | $scope.editdata = {}; | 432 | $scope.editdata = {}; |
428 | $('#demo-modal-5').css('display', ''); | 433 | $('#demo-modal-5').css('display', ''); |
429 | $scope.getOrders(); | 434 | $scope.getOrders(); |
430 | toastr.success('Fuel Order Updated Successfully', { | 435 | toastr.success('Fuel Order Updated Successfully', { |
431 | closeButton: true | 436 | closeButton: true |
432 | }) | 437 | }) |
433 | }) | 438 | }) |
434 | 439 | ||
435 | 440 | ||
436 | } else{ | 441 | } else{ |
437 | { | 442 | { |
438 | toastr.error('Please select fuelOn.', { | 443 | toastr.error('Please select fuelOn.', { |
439 | closeButton: true | 444 | closeButton: true |
440 | }) | 445 | }) |
441 | } | 446 | } |
442 | } | 447 | } |
443 | 448 | ||
444 | }else | 449 | }else |
445 | { | 450 | { |
446 | toastr.error('Please select Arrival Time and Departure time both.', { | 451 | toastr.error('Please select Arrival Time and Departure time both.', { |
447 | closeButton: true | 452 | closeButton: true |
448 | }) | 453 | }) |
449 | } | 454 | } |
450 | 455 | ||
451 | } | 456 | } |
452 | 457 | ||
453 | $scope.getAircraft = function(company){ | 458 | $scope.getAircraft = function(company){ |
454 | 459 | ||
455 | $scope.selectedCompanyName = company; | 460 | $scope.selectedCompanyName = company; |
456 | //$scope.showLoader = true; | 461 | //$scope.showLoader = true; |
457 | for (var i = 0; i < $scope.companyList.length; i++) { | 462 | for (var i = 0; i < $scope.companyList.length; i++) { |
458 | if ($scope.companyList[i].companyName == company) { | 463 | if ($scope.companyList[i].companyName == company) { |
459 | $scope.order.certificateType = $scope.companyList[i].certificateType; | 464 | $scope.order.certificateType = $scope.companyList[i].certificateType; |
460 | $scope.baseTenant = $scope.companyList[i].baseTenant; | 465 | $scope.baseTenant = $scope.companyList[i].baseTenant; |
461 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; | 466 | $scope.contractFuelVendor = $scope.companyList[i].contractFuelVendor; |
462 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; | 467 | $scope.fuelerlinxCustomer = $scope.companyList[i].fuelerlinxCustomer; |
463 | 468 | ||
464 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ | 469 | if($scope.companyList[i].margin != null && $scope.companyList[i].marginAVGAS != null){ |
465 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { | 470 | fuelOrdersService.getFuelCost($scope.companyList[i].id).then(function(margins) { |
466 | $scope.marginList = margins; | 471 | $scope.marginList = margins; |
467 | }) | 472 | }) |
468 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { | 473 | } else if ($scope.companyList[i].margin != null || $scope.companyList[i].marginAVGAS == null) { |
469 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 474 | fuelOrdersService.getATypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
470 | $scope.marginList = margins; | 475 | $scope.marginList = margins; |
471 | }) | 476 | }) |
472 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { | 477 | } else if ($scope.companyList[i].margin == null || $scope.companyList[i].marginAVGAS != null) { |
473 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { | 478 | fuelOrdersService.getVTypeFuelPricing($scope.companyList[i].id).then(function(margins) { |
474 | $scope.marginList = margins; | 479 | $scope.marginList = margins; |
475 | }) | 480 | }) |
476 | } | 481 | } |
477 | $scope.selectedCompanyId = $scope.companyList[i].id; | 482 | $scope.selectedCompanyId = $scope.companyList[i].id; |
478 | $scope.marginId = $scope.companyList[i].margin.id; | 483 | $scope.marginId = $scope.companyList[i].margin.id; |
479 | if ($scope.selectedCompanyId != '') { | 484 | if ($scope.selectedCompanyId != '') { |
480 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 485 | fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
481 | $scope.aircraftList = aircraft; | 486 | $scope.aircraftList = aircraft; |
482 | }) | 487 | }) |
483 | } | 488 | } |
484 | if ($scope.marginId != '') { | 489 | if ($scope.marginId != '') { |
485 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { | 490 | fuelOrdersService.getJetTiers($scope.marginId).then(function(tiers) { |
486 | $scope.tierList = tiers; | 491 | $scope.tierList = tiers; |
487 | // $scope.showLoader = false; | 492 | // $scope.showLoader = false; |
488 | }) | 493 | }) |
489 | }else{ | 494 | }else{ |
490 | // $scope.showLoader = false; | 495 | // $scope.showLoader = false; |
491 | } | 496 | } |
492 | } | 497 | } |
493 | } | 498 | } |
494 | 499 | ||
495 | } | 500 | } |
496 | 501 | ||
497 | 502 | ||
498 | 503 | ||
499 | $scope.cancelData = function() { | 504 | $scope.cancelData = function() { |
500 | $('#demo-modal-4').css('display', ''); | 505 | $('#demo-modal-4').css('display', ''); |
501 | } | 506 | } |
502 | $scope.canceleditdata = function() { | 507 | $scope.canceleditdata = function() { |
503 | $('#demo-modal-5').css('display', ''); | 508 | $('#demo-modal-5').css('display', ''); |
504 | } | 509 | } |
505 | 510 | ||
506 | 511 | ||
507 | 512 | ||
508 | $scope.companyList = {}; | 513 | $scope.companyList = {}; |
509 | 514 | ||
510 | fuelOrdersService.getAllCompanies().then(function(result) { | 515 | fuelOrdersService.getAllCompanies().then(function(result) { |
511 | $scope.showLoader = true; | 516 | $scope.showLoader = true; |
512 | $scope.companyList = result; | 517 | $scope.companyList = result; |
513 | $scope.showLoader = false; | 518 | $scope.showLoader = false; |
514 | }) | 519 | }) |
515 | 520 | ||
516 | /*Add a company services API used from customersService */ | 521 | /*Add a company services API used from customersService */ |
517 | getCompanyName(); | 522 | getCompanyName(); |
518 | function getCompanyName(){ | 523 | function getCompanyName(){ |
519 | CustomersService.getCompanyName().then(function(result) { | 524 | CustomersService.getCompanyName().then(function(result) { |
520 | $scope.showLoader = true; | 525 | $scope.showLoader = true; |
521 | $scope.compNameList = result; | 526 | $scope.compNameList = result; |
522 | $scope.showLoader = false; | 527 | $scope.showLoader = false; |
523 | }) | 528 | }) |
524 | } | 529 | } |
525 | 530 | ||
526 | $scope.marginFilterOptions = []; | 531 | $scope.marginFilterOptions = []; |
527 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | 532 | CustomersService.getJetMargin($scope.userProfileId).then(function(result) { |
528 | $scope.showLoader = true; | 533 | $scope.showLoader = true; |
529 | $scope.jetMarginList = result; | 534 | $scope.jetMarginList = result; |
530 | $scope.marginFilterOptions.push({ | 535 | $scope.marginFilterOptions.push({ |
531 | 'id': '', 'title': 'Show All' | 536 | 'id': '', 'title': 'Show All' |
532 | }); | 537 | }); |
533 | for (var i = 0; i < result.length; i++) { | 538 | for (var i = 0; i < result.length; i++) { |
534 | $scope.marginFilterOptions.push({ | 539 | $scope.marginFilterOptions.push({ |
535 | 'id': result[i].id, | 540 | 'id': result[i].id, |
536 | 'title': result[i].marginName | 541 | 'title': result[i].marginName |
537 | }) | 542 | }) |
538 | } | 543 | } |
539 | $scope.showLoader = false; | 544 | $scope.showLoader = false; |
540 | }) | 545 | }) |
541 | 546 | ||
542 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | 547 | CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { |
543 | $scope.avgsMarginList = result; | 548 | $scope.avgsMarginList = result; |
544 | }) | 549 | }) |
545 | 550 | ||
546 | $scope.showCompanyError = false; | 551 | $scope.showCompanyError = false; |
547 | $scope.showMarginError = false; | 552 | $scope.showMarginError = false; |
548 | 553 | ||
549 | $scope.removeValidation = function(){ | 554 | $scope.removeValidation = function(){ |
550 | $scope.showCompanyError = false; | 555 | $scope.showCompanyError = false; |
551 | $('.companyNameInput').removeClass('customErrorInput'); | 556 | $('.companyNameInput').removeClass('customErrorInput'); |
552 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { | 557 | if($scope.data.companyName == 'undefined' || $scope.data.companyName == '') { |
553 | $('.companyNameInput').addClass('customErrorInput'); | 558 | $('.companyNameInput').addClass('customErrorInput'); |
554 | $scope.showCompanyError = true; | 559 | $scope.showCompanyError = true; |
555 | } | 560 | } |
556 | } | 561 | } |
557 | 562 | ||
558 | $scope.removeMarginValidation = function(){ | 563 | $scope.removeMarginValidation = function(){ |
559 | $scope.showMarginError = false; | 564 | $scope.showMarginError = false; |
560 | $('.marginSelectBox').removeClass('customErrorInput'); | 565 | $('.marginSelectBox').removeClass('customErrorInput'); |
561 | } | 566 | } |
562 | 567 | ||
563 | getData(); | 568 | getData(); |
564 | function getData(){ | 569 | function getData(){ |
565 | $scope.showLoader = true; | 570 | $scope.showLoader = true; |
566 | CustomersService.getAircraftMake().then(function(result) { | 571 | CustomersService.getAircraftMake().then(function(result) { |
567 | $scope.aircraftMakeList = result; | 572 | $scope.aircraftMakeList = result; |
568 | $scope.showLoader = false; | 573 | $scope.showLoader = false; |
569 | }) | 574 | }) |
570 | } | 575 | } |
571 | var companyData; | 576 | var companyData; |
572 | $scope.addFirstData = function(sel, step){ | 577 | $scope.addFirstData = function(sel, step){ |
573 | $scope.showLoader = true; | 578 | $scope.showLoader = true; |
574 | if($scope.data.companyName == undefined){ | 579 | if($scope.data.companyName == undefined){ |
575 | $scope.showCompanyError = true; | 580 | $scope.showCompanyError = true; |
576 | $('.companyNameInput').addClass('customErrorInput'); | 581 | $('.companyNameInput').addClass('customErrorInput'); |
577 | }else if($scope.data.masterMargin == undefined){ | 582 | }else if($scope.data.masterMargin == undefined){ |
578 | $scope.showMarginError = true; | 583 | $scope.showMarginError = true; |
579 | $('.marginSelectBox').addClass('customErrorInput'); | 584 | $('.marginSelectBox').addClass('customErrorInput'); |
580 | }else{ | 585 | }else{ |
581 | $scope.aircraftDetails = [{ | 586 | $scope.aircraftDetails = [{ |
582 | 'tail':'', | 587 | 'tail':'', |
583 | 'make': '', | 588 | 'make': '', |
584 | 'model': '', | 589 | 'model': '', |
585 | 'sizeId' : '', | 590 | 'sizeId' : '', |
586 | 'marginId': $scope.data.masterMargin, | 591 | 'marginId': $scope.data.masterMargin, |
587 | 'avgasMarginId': $scope.data.avgasMargin | 592 | 'avgasMarginId': $scope.data.avgasMargin |
588 | }]; | 593 | }]; |
589 | 594 | ||
590 | $(sel).trigger('next.m.' + step); | 595 | $(sel).trigger('next.m.' + step); |
591 | getData(); | 596 | getData(); |
592 | } | 597 | } |
593 | $scope.showLoader = false; | 598 | $scope.showLoader = false; |
594 | } | 599 | } |
595 | $scope.addNew = function(){ | 600 | $scope.addNew = function(){ |
596 | $scope.showLoader = true; | 601 | $scope.showLoader = true; |
597 | $scope.aircraftDetails.push({ | 602 | $scope.aircraftDetails.push({ |
598 | 'tail':'', | 603 | 'tail':'', |
599 | 'make': '', | 604 | 'make': '', |
600 | 'model': '', | 605 | 'model': '', |
601 | 'sizeId' : '', | 606 | 'sizeId' : '', |
602 | 'marginId': $scope.data.masterMargin, | 607 | 'marginId': $scope.data.masterMargin, |
603 | 'avgasMarginId': $scope.data.avgasMargin | 608 | 'avgasMarginId': $scope.data.avgasMargin |
604 | }); | 609 | }); |
605 | $scope.showLoader = false; | 610 | $scope.showLoader = false; |
606 | }; | 611 | }; |
607 | 612 | ||
608 | $scope.aircraft = {}; | 613 | $scope.aircraft = {}; |
609 | $scope.getModal = function(makeId, index){ | 614 | $scope.getModal = function(makeId, index){ |
610 | $scope.showLoader = true; | 615 | $scope.showLoader = true; |
611 | $scope.aircraft.make = makeId; | 616 | $scope.aircraft.make = makeId; |
612 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 617 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
613 | $scope.showLoader = false; | 618 | $scope.showLoader = false; |
614 | $scope.aircraftDetails[index].aircraftModalList = result; | 619 | $scope.aircraftDetails[index].aircraftModalList = result; |
615 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 620 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
616 | }) | 621 | }) |
617 | } | 622 | } |
618 | 623 | ||
619 | $scope.getSize = function(model, index){ | 624 | $scope.getSize = function(model, index){ |
620 | $scope.showLoader = true; | 625 | $scope.showLoader = true; |
621 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 626 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
622 | $scope.showLoader = false; | 627 | $scope.showLoader = false; |
623 | $scope.aircraftDetails[index].aircraftSizeList = result; | 628 | $scope.aircraftDetails[index].aircraftSizeList = result; |
624 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | 629 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
625 | }) | 630 | }) |
626 | } | 631 | } |
627 | 632 | ||
628 | $scope.aircraftListData = {}; | 633 | $scope.aircraftListData = {}; |
629 | $scope.addData = []; | 634 | $scope.addData = []; |
630 | 635 | ||
631 | $scope.saveCompanyData = function(){ | 636 | $scope.saveCompanyData = function(){ |
632 | CustomersService.addCompany($scope.data).then(function(result) { | 637 | CustomersService.addCompany($scope.data).then(function(result) { |
633 | $scope.accountId = result; | 638 | $scope.accountId = result; |
634 | $scope.aircraft.accountId = $scope.accountId; | 639 | $scope.aircraft.accountId = $scope.accountId; |
635 | 640 | ||
636 | for(var i=0; i<$scope.aircraftDetails.length;i++){ | 641 | for(var i=0; i<$scope.aircraftDetails.length;i++){ |
637 | $scope.addData.push({ | 642 | $scope.addData.push({ |
638 | 'tail': $scope.aircraftDetails[i].tail, | 643 | 'tail': $scope.aircraftDetails[i].tail, |
639 | 'make': $scope.aircraftDetails[i].make, | 644 | 'make': $scope.aircraftDetails[i].make, |
640 | 'model': $scope.aircraftDetails[i].model, | 645 | 'model': $scope.aircraftDetails[i].model, |
641 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 646 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
642 | 'marginId': $scope.aircraftDetails[i].marginId, | 647 | 'marginId': $scope.aircraftDetails[i].marginId, |
643 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | 648 | 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId |
644 | }); | 649 | }); |
645 | } | 650 | } |
646 | $scope.aircraftListData.aircraftList = $scope.addData; | 651 | $scope.aircraftListData.aircraftList = $scope.addData; |
647 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; | 652 | $scope.aircraftListData.accountId = $scope.aircraft.accountId; |
648 | 653 | ||
649 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ | 654 | if($scope.aircraftListData.aircraftList[0].tail == "" || $scope.aircraftListData.aircraftList[0].make == null || $scope.aircraftListData.aircraftList[0].model == null){ |
650 | $scope.aircraftListData.aircraftList = []; | 655 | $scope.aircraftListData.aircraftList = []; |
651 | } | 656 | } |
652 | 657 | ||
653 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 658 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
654 | 659 | ||
655 | if(result != null && result.success){ | 660 | if(result != null && result.success){ |
656 | toastr.success(''+result.success+'', { | 661 | toastr.success(''+result.success+'', { |
657 | closeButton: true | 662 | closeButton: true |
658 | }) | 663 | }) |
659 | $('#demo-modal-3').modal('hide'); | 664 | $('#demo-modal-3').modal('hide'); |
660 | getAllCompanies(); | 665 | getAllCompanies(); |
661 | }else{ | 666 | }else{ |
662 | toastr.error(''+result.statusText+'', { | 667 | toastr.error(''+result.statusText+'', { |
663 | closeButton: true | 668 | closeButton: true |
664 | }) | 669 | }) |
665 | } | 670 | } |
666 | }); | 671 | }); |
667 | 672 | ||
668 | }) | 673 | }) |
669 | 674 | ||
670 | 675 | ||
671 | } | 676 | } |
672 | 677 | ||
673 | $scope.checkJetWithTail = function(tail, index){ | 678 | $scope.checkJetWithTail = function(tail, index){ |
674 | 679 | ||
675 | ViewCompanyService.checkJetType(tail).then(function(result) { | 680 | ViewCompanyService.checkJetType(tail).then(function(result) { |
676 | if(result.jetA == "true"){ | 681 | if(result.jetA == "true"){ |
677 | $scope.jetShow[index] = false; | 682 | $scope.jetShow[index] = false; |
678 | $scope.marginShow[index] = true; | 683 | $scope.marginShow[index] = true; |
679 | }else{ | 684 | }else{ |
680 | $scope.jetShow[index] = true; | 685 | $scope.jetShow[index] = true; |
681 | $scope.marginShow[index] = false; | 686 | $scope.marginShow[index] = false; |
682 | } | 687 | } |
683 | }) | 688 | }) |
684 | } | 689 | } |
685 | 690 | ||
686 | $scope.etaTimeList=[]; | 691 | $scope.etaTimeList=[]; |
687 | $scope.etdTimeList =[]; | 692 | $scope.etdTimeList =[]; |
688 | 693 | ||
689 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; | 694 | $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; |
690 | $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, | 695 | $scope.etaTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
691 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, | 696 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
692 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, | 697 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
693 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, | 698 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
694 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, | 699 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
695 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; | 700 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
696 | 701 | ||
697 | $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, | 702 | $scope.etdTimeList = [{time:"12:00 AM"},{time:"12:30 AM"},{time:"01:00 AM"},{time:"01:30 AM"},{time:"02:00 AM"},{time:"02:30 AM"},{time:"03:00 AM"},{time:"03:30 AM"}, |
698 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, | 703 | {time:"04:00 AM"},{time:"04:30 AM"},{time:"05:00 AM"},{time:"05:30 AM"},{time:"06:00 AM"},{time:"06:30 AM"},{time:"07:00 AM"},{time:"07:30 AM"}, |
699 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, | 704 | {time:"08:00 AM"},{time:"08:30 AM"},{time:"09:00 AM"},{time:"09:30 AM"},{time:"10:00 AM"},{time:"10:30 AM"},{time:"11:00 AM"},{time:"11:30 AM"}, |
700 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, | 705 | {time:"12:00 PM"},{time:"12:30 PM"},{time:"01:00 PM"},{time:"01:30 PM"},{time:"02:00 PM"},{time:"02:30 PM"},{time:"03:00 PM"},{time:"03:30 PM"}, |
701 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, | 706 | {time:"04:00 PM"},{time:"04:30 PM"},{time:"05:00 PM"},{time:"05:30 PM"},{time:"06:00 PM"},{time:"06:30 PM"},{time:"07:00 PM"},{time:"07:30 PM"}, |
702 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; | 707 | {time:"08:00 PM"},{time:"08:30 PM"},{time:"9:00 PM"},{time:"09:30 PM"},{time:"10:00 PM"},{time:"10:30 PM"},{time:"11:00 PM"},{time:"11:30 PM"},]; |
703 | 708 | ||
704 | $scope.data = {}; | 709 | $scope.data = {}; |
705 | 710 | ||
706 | 711 | ||
707 | 712 | ||
708 | } | 713 | } |
app/partials/fuelOrders/fuelOrders.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(4) > a{ | 2 | .subnavbar .mainnav > li:nth-child(4) > a{ |
3 | color: #c44646; | 3 | color: #c44646; |
4 | } | 4 | } |
5 | 5 | ||
6 | .button1 { | 6 | .button1 { |
7 | display: inline-block; | 7 | display: inline-block; |
8 | height: 35px; | 8 | height: 35px; |
9 | line-height: 35px; | 9 | line-height: 35px; |
10 | padding-right: 15px; | 10 | padding-right: 15px; |
11 | padding-left: 50px; | 11 | padding-left: 50px; |
12 | position: relative; | 12 | position: relative; |
13 | background-color:rgb(41,127,184); | 13 | background-color:rgb(41,127,184); |
14 | color:rgb(255,255,255); | 14 | color:rgb(255,255,255); |
15 | text-decoration: none; | 15 | text-decoration: none; |
16 | text-transform: uppercase; | 16 | text-transform: uppercase; |
17 | letter-spacing: 1px; | 17 | letter-spacing: 1px; |
18 | margin-bottom: 15px; | 18 | margin-bottom: 15px; |
19 | border: 0; | 19 | border: 0; |
20 | 20 | ||
21 | 21 | ||
22 | border-radius: 5px; | 22 | border-radius: 5px; |
23 | -moz-border-radius: 5px; | 23 | -moz-border-radius: 5px; |
24 | -webkit-border-radius: 5px; | 24 | -webkit-border-radius: 5px; |
25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 25 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); |
26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | 26 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; |
27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | 27 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
28 | 28 | ||
29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 29 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 30 | -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 31 | box-shadow:0px 2px 2px rgba(0,0,0,0.2); |
32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | 32 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; |
33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | 33 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
34 | } | 34 | } |
35 | 35 | ||
36 | .button1 span { | 36 | .button1 span { |
37 | position: absolute; | 37 | position: absolute; |
38 | left: 0; | 38 | left: 0; |
39 | top: 0; | 39 | top: 0; |
40 | width: 35px; | 40 | width: 35px; |
41 | background-color:rgba(0,0,0,0.5); | 41 | background-color:rgba(0,0,0,0.5); |
42 | 42 | ||
43 | -webkit-border-top-left-radius: 5px; | 43 | -webkit-border-top-left-radius: 5px; |
44 | -webkit-border-bottom-left-radius: 5px; | 44 | -webkit-border-bottom-left-radius: 5px; |
45 | -moz-border-radius-topleft: 5px; | 45 | -moz-border-radius-topleft: 5px; |
46 | -moz-border-radius-bottomleft: 5px; | 46 | -moz-border-radius-bottomleft: 5px; |
47 | border-top-left-radius: 5px; | 47 | border-top-left-radius: 5px; |
48 | border-bottom-left-radius: 5px; | 48 | border-bottom-left-radius: 5px; |
49 | border-right: 1px solid rgba(0,0,0,0.15); | 49 | border-right: 1px solid rgba(0,0,0,0.15); |
50 | } | 50 | } |
51 | 51 | ||
52 | .button1:hover span, .button1.active span { | 52 | .button1:hover span, .button1.active span { |
53 | background-color:rgb(0,102,26); | 53 | background-color:rgb(0,102,26); |
54 | border-right: 1px solid rgba(0,0,0,0.3); | 54 | border-right: 1px solid rgba(0,0,0,0.3); |
55 | } | 55 | } |
56 | 56 | ||
57 | .button1:active { | 57 | .button1:active { |
58 | margin-top: 2px; | 58 | margin-top: 2px; |
59 | margin-bottom: 13px; | 59 | margin-bottom: 13px; |
60 | 60 | ||
61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 61 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 62 | -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 63 | box-shadow:0px 1px 0px rgba(255,255,255,0.5); |
64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | 64 | -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; |
65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | 65 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
66 | } | 66 | } |
67 | 67 | ||
68 | .button1.turquoise { | 68 | .button1.turquoise { |
69 | background: #449d44; | 69 | background: #449d44; |
70 | } | 70 | } |
71 | </style> | 71 | </style> |
72 | 72 | ||
73 | <div class="myLoader" ng-show="showLoader"> | 73 | <div class="myLoader" ng-show="showLoader"> |
74 | <img src="../img/hourglass.gif" width="50px;"> | 74 | <img src="../img/hourglass.gif" width="50px;"> |
75 | </div> | 75 | </div> |
76 | 76 | ||
77 | 77 | ||
78 | <div class="main"> | 78 | <div class="main"> |
79 | <div class="container"> | 79 | <div class="container"> |
80 | <div class="row"> | 80 | <div class="row"> |
81 | <div class="col-md-12"> | 81 | <div class="col-md-12"> |
82 | <div class="widget stacked "> | 82 | <div class="widget stacked "> |
83 | <div class="widget-content"> | 83 | <div class="widget-content"> |
84 | <div class="tabbable"> | 84 | <div class="tabbable"> |
85 | <ul class="nav nav-tabs"> | 85 | <ul class="nav nav-tabs"> |
86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> | 86 | <li style="margin: 0px 10px 4px 10px;"><input type="text" style="height:31px;"class="form-control" name="name" id="name" ng-model="searchText" placeholder="Search In Table"></li> |
87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> | 87 | <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> |
88 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> | 88 | <li style="float:right"><button type="submit" data-toggle="modal" data-target="#demo-modal-3" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Company</button></li> |
89 | </ul> | 89 | </ul> |
90 | <br> | 90 | <br> |
91 | <div class="tab-content customer-table" style="margin:0px"> | 91 | <div class="tab-content customer-table" style="margin:0px"> |
92 | <div class="tab-pane active" id="companyView"> | 92 | <div class="tab-pane active" id="companyView"> |
93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> | 93 | <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> |
94 | <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" > | 94 | <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" > |
95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> | 95 | <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> |
96 | {{row.companyName}} | 96 | {{row.companyName}} |
97 | </td> | 97 | </td> |
98 | <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> | 98 | <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> |
99 | {{row.upliftDateString}} | 99 | {{row.upliftDateString}} |
100 | </td> | 100 | </td> |
101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> | 101 | <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> |
102 | {{row.aircraftName}} | 102 | {{row.aircraftName}} |
103 | </td> | 103 | </td> |
104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> | 104 | <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> |
105 | {{row.source}} | 105 | {{row.source}} |
106 | </td> | 106 | </td> |
107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> | 107 | <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> |
108 | {{row.requestedVolume}} | 108 | {{row.requestedVolume}} |
109 | </td> | 109 | </td> |
110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> | 110 | <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> |
111 | {{row.fboCost | number : 4}} | 111 | {{row.fboCost | number : 4}} |
112 | </td> | 112 | </td> |
113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> | 113 | <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> |
114 | {{row.priceQuote | number : 4}} | 114 | {{row.priceQuote | number : 4}} |
115 | </td> | 115 | </td> |
116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> | 116 | <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> |
117 | {{row.invoiced | number : 4}} | 117 | {{row.invoiced | number : 4}} |
118 | </td> | 118 | </td> |
119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> | 119 | <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> |
120 | {{row.total | number : 4}} | 120 | {{row.total | number : 4}} |
121 | </td> | 121 | </td> |
122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> | 122 | <td data-title="'Status'" filter="{status: 'select'}" filter-data="statusFilterOptions" sortable="'status'"> |
123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)"> | 123 | <select class="btn btn-regular colorfulSelectbox" ng-model="row.status" ng-style="abc" ng-change="updateStatus(row, row.status)" ng-init="{{defaultStatus != '' ? row.status = defaultStatus : '' }}"> |
124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> | 124 | <option class="blackOption" value="pending" ng-selected="row.status == pending"> Pending</option> |
125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> | 125 | <option class="blueOption" value="invoiced" ng-selected="row.status == invoiced" >Invoiced</option> |
126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> | 126 | <option class="greenOption" value="paid" ng-selected="row.status == paid" >Paid</option> |
127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> | 127 | <option class="redOption" value="cancelled" ng-selected="row.status == cancelled" >Cancelled</option> |
128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> | 128 | <option class="yellowOption" value="archived" ng-selected="row.status == archived" >Archived</option> |
129 | </select> | 129 | </select> |
130 | |||
130 | </td> | 131 | </td> |
131 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> | 132 | <td data-title="'Attachments'" filter="{orderInvoice : 'select'}" filter-data="attachmentFilterOptions" sortable="'orderInvoice '"> |
132 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > | 133 | <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected,row.orderInvoice.link, row)" > |
133 | <option value="" disabled selected="selected" >Invoice</option> | 134 | <option value="" disabled selected="selected" >Invoice</option> |
134 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> | 135 | <option value="viewAttachment" ng-if="row.orderInvoice !== null" >View</option> |
135 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> | 136 | <option value="deleteAttachment" ng-if="row.orderInvoice !== null">Delete</option> |
136 | <option value="0" disabled >_____________</option> | 137 | <option value="0" disabled >_____________</option> |
137 | <option value="uploadAttachment" >Upload</option> | 138 | <option value="uploadAttachment" >Upload</option> |
138 | </select> | 139 | </select> |
139 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> | 140 | <i class="fa fa-paperclip" ng-if="row.orderInvoice !== null"></i> |
140 | </td> | 141 | </td> |
141 | </tr> | 142 | </tr> |
142 | </table> | 143 | </table> |
143 | 144 | ||
144 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> | 145 | <select class="btn btn-primary exportBtn" ng-model="optionSelected" ng-change="onFWSelect()"> |
145 | <option value="" disabled selected="selected">Fuel Widget</option> | 146 | <option value="" disabled selected="selected">Fuel Widget</option> |
146 | <option value="dt" >Direct Transaction</option> | 147 | <option value="dt" >Direct Transaction</option> |
147 | <option value="efo" >Export Fuel Orders</option> | 148 | <option value="efo" >Export Fuel Orders</option> |
148 | </select> | 149 | </select> |
149 | 150 | ||
150 | </div> | 151 | </div> |
151 | </div> | 152 | </div> |
152 | </div> | 153 | </div> |
153 | </div> | 154 | </div> |
154 | <!-- /widget-content --> | 155 | <!-- /widget-content --> |
155 | </div> | 156 | </div> |
156 | <!-- /widget --> | 157 | <!-- /widget --> |
157 | </div> | 158 | </div> |
158 | <!-- /span8 --> | 159 | <!-- /span8 --> |
159 | </div> | 160 | </div> |
160 | <!-- /row --> | 161 | <!-- /row --> |
161 | </div> | 162 | </div> |
162 | <!-- /container --> | 163 | <!-- /container --> |
163 | 164 | ||
164 | 165 | ||
165 | </div> | 166 | </div> |
166 | <!-- /main --> | 167 | <!-- /main --> |
167 | 168 | ||
168 | 169 | ||
169 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> | 170 | <form class="modal multi-step" id="demo-modal-3" name="companyForm"> |
170 | <div class="modal-dialog modal-lg"> | 171 | <div class="modal-dialog modal-lg"> |
171 | <div class="modal-content"> | 172 | <div class="modal-content"> |
172 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 173 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
173 | <div> | 174 | <div> |
174 | <div class="row" style="margin: 0;"> | 175 | <div class="row" style="margin: 0;"> |
175 | <div> | 176 | <div> |
176 | <div class="widget" style="margin-bottom: 0;"> | 177 | <div class="widget" style="margin-bottom: 0;"> |
177 | <div class="widget-header"> | 178 | <div class="widget-header"> |
178 | <i class="icon-pencil"></i> | 179 | <i class="icon-pencil"></i> |
179 | <i class="fa fa-tasks" aria-hidden="true"></i> | 180 | <i class="fa fa-tasks" aria-hidden="true"></i> |
180 | <h3>Add a New Company</h3> | 181 | <h3>Add a New Company</h3> |
181 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> | 182 | <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> |
182 | <div style="color: #ff9a01;">Activate     | 183 | <div style="color: #ff9a01;">Activate     |
183 | <toggle ng-model="data.activate" size="customToogle"></toggle> | 184 | <toggle ng-model="data.activate" size="customToogle"></toggle> |
184 | </div> | 185 | </div> |
185 | </div> | 186 | </div> |
186 | <div class="clearfix"></div> | 187 | <div class="clearfix"></div> |
187 | </div> | 188 | </div> |
188 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 189 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
189 | <div class="col-xs-12"> | 190 | <div class="col-xs-12"> |
190 | <div class="col-md-8"> | 191 | <div class="col-md-8"> |
191 | <div class="pull-left"> | 192 | <div class="pull-left"> |
192 | <label class="new-input-label"><b>Company Name *</b></label> | 193 | <label class="new-input-label"><b>Company Name *</b></label> |
193 | </div> | 194 | </div> |
194 | <div class="pull-left" style="margin-left: 15px;"> | 195 | <div class="pull-left" style="margin-left: 15px;"> |
195 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> | 196 | <!-- <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> --> |
196 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> | 197 | <input type="text" ng-keyup="removeValidation()" ng-model="data.companyName" uib-typeahead="company.companyName for company in compNameList | filter:$viewValue | limitTo:8" class="form-control companyNameInput"> |
197 | 198 | ||
198 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> | 199 | <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> |
199 | </div> | 200 | </div> |
200 | <div class="clearfix"></div> | 201 | <div class="clearfix"></div> |
201 | </div> | 202 | </div> |
202 | <div class="col-md-4"> | 203 | <div class="col-md-4"> |
203 | 204 | ||
204 | <div class="pull-right"> | 205 | <div class="pull-right"> |
205 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> | 206 | <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> |
206 | </div> | 207 | </div> |
207 | <div class="pull-right"> | 208 | <div class="pull-right"> |
208 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> | 209 | <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> |
209 | </div> | 210 | </div> |
210 | <div class="clearfix"></div> | 211 | <div class="clearfix"></div> |
211 | </div> | 212 | </div> |
212 | </div> | 213 | </div> |
213 | <div class="clearfix"></div><br> | 214 | <div class="clearfix"></div><br> |
214 | <div class="col-xs-12"> | 215 | <div class="col-xs-12"> |
215 | <div class="col-md-7"> | 216 | <div class="col-md-7"> |
216 | <div class="pull-left"> | 217 | <div class="pull-left"> |
217 | <label class="new-input-label"><b>Relationship </b></label> | 218 | <label class="new-input-label"><b>Relationship </b></label> |
218 | </div> | 219 | </div> |
219 | <div class="pull-left" style="margin-left: 32px;"> | 220 | <div class="pull-left" style="margin-left: 32px;"> |
220 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> | 221 | <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> |
221 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> | 222 | <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> |
222 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor | 223 | <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor |
223 | </div> | 224 | </div> |
224 | <div class="clearfix"></div> | 225 | <div class="clearfix"></div> |
225 | </div> | 226 | </div> |
226 | <div class="col-md-2 Airport" style="text-align: right;"> | 227 | <div class="col-md-2 Airport" style="text-align: right;"> |
227 | <b>Certificate Type</b> | 228 | <b>Certificate Type</b> |
228 | </div> | 229 | </div> |
229 | <div class="col-md-3 Airport"> | 230 | <div class="col-md-3 Airport"> |
230 | <select required class="form-control" ng-model="data.certificateType"> | 231 | <select required class="form-control" ng-model="data.certificateType"> |
231 | <option value="" disabled selected hidden>Select...</option> | 232 | <option value="" disabled selected hidden>Select...</option> |
232 | <option value="corporate">Part 91 (Corporate)</option> | 233 | <option value="corporate">Part 91 (Corporate)</option> |
233 | <option value="charter">Part 135 (Charter)</option> | 234 | <option value="charter">Part 135 (Charter)</option> |
234 | <option value="scheduled">Part 121 (Scheduled)</option> | 235 | <option value="scheduled">Part 121 (Scheduled)</option> |
235 | <option value="military">Military</option> | 236 | <option value="military">Military</option> |
236 | <option value="government">Government</option> | 237 | <option value="government">Government</option> |
237 | </select> | 238 | </select> |
238 | </div> | 239 | </div> |
239 | <div class="clearfix"></div> | 240 | <div class="clearfix"></div> |
240 | </div> | 241 | </div> |
241 | <div class="clearfix"></div> | 242 | <div class="clearfix"></div> |
242 | <br/> | 243 | <br/> |
243 | <div class="col-xs-12"> | 244 | <div class="col-xs-12"> |
244 | <div class="col-md-6"> | 245 | <div class="col-md-6"> |
245 | <div class="pull-left" style="width: 110px;"> | 246 | <div class="pull-left" style="width: 110px;"> |
246 | <b>JET A Margin *</b> | 247 | <b>JET A Margin *</b> |
247 | </div> | 248 | </div> |
248 | <div class="pull-left"> | 249 | <div class="pull-left"> |
249 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | 250 | <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> |
250 | <option value="" disabled>Select...</option> | 251 | <option value="" disabled>Select...</option> |
251 | </select> | 252 | </select> |
252 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | 253 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
253 | 254 | ||
254 | <div class="clearfix"></div> | 255 | <div class="clearfix"></div> |
255 | </div> | 256 | </div> |
256 | </div> | 257 | </div> |
257 | 258 | ||
258 | <div class="col-md-3 Airport" style="text-align: right;"> | 259 | <div class="col-md-3 Airport" style="text-align: right;"> |
259 | <b>AVGAS 100LL Margin</b> | 260 | <b>AVGAS 100LL Margin</b> |
260 | </div> | 261 | </div> |
261 | <div class="col-md-3 Airport"> | 262 | <div class="col-md-3 Airport"> |
262 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 263 | <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
263 | <option value="" disabled>Select...</option> | 264 | <option value="" disabled>Select...</option> |
264 | </select> | 265 | </select> |
265 | </div> | 266 | </div> |
266 | <div class="clearfix"></div> | 267 | <div class="clearfix"></div> |
267 | </div> | 268 | </div> |
268 | <div class="clearfix"></div> | 269 | <div class="clearfix"></div> |
269 | <br/> | 270 | <br/> |
270 | <div class="col-xs-12"> | 271 | <div class="col-xs-12"> |
271 | <div class="col-md-12"> | 272 | <div class="col-md-12"> |
272 | <div class="pull-left" style="width: 110px;"> | 273 | <div class="pull-left" style="width: 110px;"> |
273 | <label class="new-input-label"><b>Address</b></label> | 274 | <label class="new-input-label"><b>Address</b></label> |
274 | </div> | 275 | </div> |
275 | <div class="pull-left" style="width: calc(100% - 110px);"> | 276 | <div class="pull-left" style="width: calc(100% - 110px);"> |
276 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> | 277 | <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> |
277 | </div> | 278 | </div> |
278 | <div class="clearfix"></div> | 279 | <div class="clearfix"></div> |
279 | </div> | 280 | </div> |
280 | </div> | 281 | </div> |
281 | <div class="clearfix"></div> | 282 | <div class="clearfix"></div> |
282 | <br/> | 283 | <br/> |
283 | <div class="col-xs-12"> | 284 | <div class="col-xs-12"> |
284 | <div class="col-md-12"> | 285 | <div class="col-md-12"> |
285 | <div class="pull-left" style="width: 110px;"> | 286 | <div class="pull-left" style="width: 110px;"> |
286 | <label class="new-input-label"><b>Address2</b></label> | 287 | <label class="new-input-label"><b>Address2</b></label> |
287 | </div> | 288 | </div> |
288 | <div class="pull-left" style="width: calc(100% - 110px);"> | 289 | <div class="pull-left" style="width: calc(100% - 110px);"> |
289 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> | 290 | <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> |
290 | </div> | 291 | </div> |
291 | <div class="clearfix"></div> | 292 | <div class="clearfix"></div> |
292 | </div> | 293 | </div> |
293 | </div> | 294 | </div> |
294 | <div class="clearfix"></div> | 295 | <div class="clearfix"></div> |
295 | <br/> | 296 | <br/> |
296 | <div class="col-xs-12"> | 297 | <div class="col-xs-12"> |
297 | 298 | ||
298 | <div class="col-md-6"> | 299 | <div class="col-md-6"> |
299 | <div class="pull-left" style="width: 110px;"> | 300 | <div class="pull-left" style="width: 110px;"> |
300 | <label class="new-input-label"><b>City</b></label> | 301 | <label class="new-input-label"><b>City</b></label> |
301 | </div> | 302 | </div> |
302 | <div class="pull-left" style="width: calc(100% - 110px);"> | 303 | <div class="pull-left" style="width: calc(100% - 110px);"> |
303 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> | 304 | <input type="text" ng-model="data.city" class="form-control" placeholder=""> |
304 | </div> | 305 | </div> |
305 | <div class="clearfix"></div> | 306 | <div class="clearfix"></div> |
306 | </div> | 307 | </div> |
307 | <div class="col-md-3"> | 308 | <div class="col-md-3"> |
308 | <div class="pull-left" style="width: 40px;"> | 309 | <div class="pull-left" style="width: 40px;"> |
309 | <label class="new-input-label"><b>State</b></label> | 310 | <label class="new-input-label"><b>State</b></label> |
310 | </div> | 311 | </div> |
311 | <div class="pull-left" style="width: calc(100% - 110px);"> | 312 | <div class="pull-left" style="width: calc(100% - 110px);"> |
312 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> | 313 | <input type="text" ng-model="data.state" class="form-control" placeholder=""> |
313 | </div> | 314 | </div> |
314 | <div class="clearfix"></div> | 315 | <div class="clearfix"></div> |
315 | </div> | 316 | </div> |
316 | <div class="col-md-3"> | 317 | <div class="col-md-3"> |
317 | <div class="pull-left"> | 318 | <div class="pull-left"> |
318 | <label class="new-input-label"><b>Zip Code</b></label> | 319 | <label class="new-input-label"><b>Zip Code</b></label> |
319 | </div> | 320 | </div> |
320 | <div class="pull-right" style="width: calc(100% - 60px);"> | 321 | <div class="pull-right" style="width: calc(100% - 60px);"> |
321 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> | 322 | <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> |
322 | </div> | 323 | </div> |
323 | <div class="clearfix"></div> | 324 | <div class="clearfix"></div> |
324 | </div> | 325 | </div> |
325 | </div> | 326 | </div> |
326 | <div class="clearfix"></div> | 327 | <div class="clearfix"></div> |
327 | <br/> | 328 | <br/> |
328 | <div class="col-xs-12"> | 329 | <div class="col-xs-12"> |
329 | 330 | ||
330 | <div class="col-md-6"> | 331 | <div class="col-md-6"> |
331 | <div class="pull-left" style="width: 110px;"> | 332 | <div class="pull-left" style="width: 110px;"> |
332 | <label class="new-input-label"><b>Country</b></label> | 333 | <label class="new-input-label"><b>Country</b></label> |
333 | </div> | 334 | </div> |
334 | <div class="pull-left" style="width: calc(100% - 110px);"> | 335 | <div class="pull-left" style="width: calc(100% - 110px);"> |
335 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> | 336 | <input type="text" ng-model="data.country" class="form-control" placeholder=""> |
336 | </div> | 337 | </div> |
337 | <div class="clearfix"></div> | 338 | <div class="clearfix"></div> |
338 | </div> | 339 | </div> |
339 | <div class="col-md-6"> | 340 | <div class="col-md-6"> |
340 | <div class="pull-left" style="width: 110px;"> | 341 | <div class="pull-left" style="width: 110px;"> |
341 | <label class="new-input-label"><b>Internal Note</b></label> | 342 | <label class="new-input-label"><b>Internal Note</b></label> |
342 | </div> | 343 | </div> |
343 | <div class="pull-left" style="width: calc(100% - 110px);"> | 344 | <div class="pull-left" style="width: calc(100% - 110px);"> |
344 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> | 345 | <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> |
345 | </div> | 346 | </div> |
346 | <div class="clearfix"></div> | 347 | <div class="clearfix"></div> |
347 | </div> | 348 | </div> |
348 | </div> | 349 | </div> |
349 | <div class="clearfix"></div> | 350 | <div class="clearfix"></div> |
350 | <!-- <br/> | 351 | <!-- <br/> |
351 | <div class="col-xs-12"> | 352 | <div class="col-xs-12"> |
352 | <div class="col-md-2 Airport"></div> | 353 | <div class="col-md-2 Airport"></div> |
353 | <div class="col-md-10 Airport"> | 354 | <div class="col-md-10 Airport"> |
354 | <div class="pull-right"> | 355 | <div class="pull-right"> |
355 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | 356 | <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> |
356 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | 357 | <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> |
357 | </div> | 358 | </div> |
358 | </div> | 359 | </div> |
359 | </div> --> | 360 | </div> --> |
360 | </div> | 361 | </div> |
361 | </div> | 362 | </div> |
362 | <div class="clearfix"></div> | 363 | <div class="clearfix"></div> |
363 | </div> | 364 | </div> |
364 | </div> | 365 | </div> |
365 | </div> | 366 | </div> |
366 | </div> | 367 | </div> |
367 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 368 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
368 | <div> | 369 | <div> |
369 | <div class="row" style="margin: 0;"> | 370 | <div class="row" style="margin: 0;"> |
370 | <div> | 371 | <div> |
371 | <div class="widget" style="margin-bottom: 0;"> | 372 | <div class="widget" style="margin-bottom: 0;"> |
372 | <div class="widget-header"> | 373 | <div class="widget-header"> |
373 | <i class="icon-pencil"></i> | 374 | <i class="icon-pencil"></i> |
374 | <i class="fa fa-tasks" aria-hidden="true"></i> | 375 | <i class="fa fa-tasks" aria-hidden="true"></i> |
375 | <h3>Add a New Company</h3> | 376 | <h3>Add a New Company</h3> |
376 | <div class="clearfix"></div> | 377 | <div class="clearfix"></div> |
377 | </div> | 378 | </div> |
378 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 379 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
379 | <div class="col-xs-12"> | 380 | <div class="col-xs-12"> |
380 | <div class="widget-header"> | 381 | <div class="widget-header"> |
381 | <i class="fa fa-list"></i> | 382 | <i class="fa fa-list"></i> |
382 | <h3>Aircraft List</h3> | 383 | <h3>Aircraft List</h3> |
383 | </div> | 384 | </div> |
384 | <div class="widget-content" style="padding:0px;border: 0px; "> | 385 | <div class="widget-content" style="padding:0px;border: 0px; "> |
385 | <div class="table-responsive"> | 386 | <div class="table-responsive"> |
386 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> | 387 | <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> |
387 | <thead> | 388 | <thead> |
388 | <tr> | 389 | <tr> |
389 | <th>Tail</th> | 390 | <th>Tail</th> |
390 | <th>Make</th> | 391 | <th>Make</th> |
391 | <th>Model</th> | 392 | <th>Model</th> |
392 | <th>Size</th> | 393 | <th>Size</th> |
393 | <th>Margin</th> | 394 | <th>Margin</th> |
394 | </tr> | 395 | </tr> |
395 | </thead> | 396 | </thead> |
396 | <tbody> | 397 | <tbody> |
397 | <tr> | 398 | <tr> |
398 | <td> | 399 | <td> |
399 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> | 400 | <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> |
400 | </td> | 401 | </td> |
401 | <td style="width: 25%;"> | 402 | <td style="width: 25%;"> |
402 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> | 403 | <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> |
403 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> | 404 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
404 | </select> | 405 | </select> |
405 | </td> | 406 | </td> |
406 | <td style="width: 20%;"> | 407 | <td style="width: 20%;"> |
407 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> | 408 | <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> |
408 | <option ng-repeat="model in aircraftModalList">{{model}}</option> | 409 | <option ng-repeat="model in aircraftModalList">{{model}}</option> |
409 | </select> | 410 | </select> |
410 | </td> | 411 | </td> |
411 | <td style="width: 25%;"> | 412 | <td style="width: 25%;"> |
412 | <select class="form-control" ng-model="aircraft.size"> | 413 | <select class="form-control" ng-model="aircraft.size"> |
413 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> | 414 | <option ng-repeat="size in aircraftSizeList">{{size}}</option> |
414 | </select> | 415 | </select> |
415 | </td> | 416 | </td> |
416 | <td> | 417 | <td> |
417 | <select class="form-control"> | 418 | <select class="form-control"> |
418 | <option>Margin1</option> | 419 | <option>Margin1</option> |
419 | <option>Margin2</option> | 420 | <option>Margin2</option> |
420 | </select> | 421 | </select> |
421 | </td> | 422 | </td> |
422 | </tr> | 423 | </tr> |
423 | </tbody> | 424 | </tbody> |
424 | 425 | ||
425 | </table> --> | 426 | </table> --> |
426 | <table class="table table-striped table-bordered"> | 427 | <table class="table table-striped table-bordered"> |
427 | <thead> | 428 | <thead> |
428 | <tr> | 429 | <tr> |
429 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 430 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
430 | <th>Tail</th> | 431 | <th>Tail</th> |
431 | <th>Make</th> | 432 | <th>Make</th> |
432 | <th>Model</th> | 433 | <th>Model</th> |
433 | <th>Size</th> | 434 | <th>Size</th> |
434 | <th>JET A Margin</th> | 435 | <th>JET A Margin</th> |
435 | <th>AVGS 100LL Margin</th> | 436 | <th>AVGS 100LL Margin</th> |
436 | </tr> | 437 | </tr> |
437 | </thead> | 438 | </thead> |
438 | <tbody> | 439 | <tbody> |
439 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 440 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
440 | <!-- <td> | 441 | <!-- <td> |
441 | <input type="checkbox" ng-model="aircraftData.selected"/> | 442 | <input type="checkbox" ng-model="aircraftData.selected"/> |
442 | </td> --> | 443 | </td> --> |
443 | <td style="width: 15%"> | 444 | <td style="width: 15%"> |
444 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> | 445 | <input type="text" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/> |
445 | </td> | 446 | </td> |
446 | <td style="width: 17%"> | 447 | <td style="width: 17%"> |
447 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 448 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
448 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> | 449 | <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option> |
449 | <option value="" disabled>Select...</option> | 450 | <option value="" disabled>Select...</option> |
450 | </select> | 451 | </select> |
451 | </td> | 452 | </td> |
452 | <td style="width: 17%"> | 453 | <td style="width: 17%"> |
453 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 454 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
454 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> | 455 | <option ng-repeat="model in aircraftData.aircraftModalList | orderBy">{{model}}</option> |
455 | <option value="" disabled>Select...</option> | 456 | <option value="" disabled>Select...</option> |
456 | </select> | 457 | </select> |
457 | </td> | 458 | </td> |
458 | <td style="width: 17%"> | 459 | <td style="width: 17%"> |
459 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> | 460 | <!-- <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> |
460 | <option value="" disabled>Select...</option> | 461 | <option value="" disabled>Select...</option> |
461 | </select> --> | 462 | </select> --> |
462 | <select class="form-control" ng-model="aircraftData.sizeId"> | 463 | <select class="form-control" ng-model="aircraftData.sizeId"> |
463 | <option value="" disabled>Select</option> | 464 | <option value="" disabled>Select</option> |
464 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> | 465 | <option ng-repeat="size in aircraftData.aircraftSizeList" value="{{size.aircraftSize.id}}">{{size.aircraftSize.size}}</option> |
465 | </select> | 466 | </select> |
466 | <!-- <select class="form-control" ng-model="aircraftData.size"> | 467 | <!-- <select class="form-control" ng-model="aircraftData.size"> |
467 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | 468 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> |
468 | </select> --> | 469 | </select> --> |
469 | </td> | 470 | </td> |
470 | <td style="width: 17%"> | 471 | <td style="width: 17%"> |
471 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> | 472 | <!-- <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> |
472 | <option value="" disabled>Select...</option> | 473 | <option value="" disabled>Select...</option> |
473 | </select> --> | 474 | </select> --> |
474 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> | 475 | <select class="form-control" ng-model="aircraftData.marginId" ng-disabled="jetShow[$index]"> |
475 | <option value="" disabled>Select</option> | 476 | <option value="" disabled>Select</option> |
476 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> | 477 | <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> |
477 | </select> | 478 | </select> |
478 | </td> | 479 | </td> |
479 | <td style="width: 17%"> | 480 | <td style="width: 17%"> |
480 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | 481 | <!-- <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> |
481 | <option value="" disabled>Select...</option> | 482 | <option value="" disabled>Select...</option> |
482 | </select> --> | 483 | </select> --> |
483 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> | 484 | <select class="form-control" ng-model="aircraftData.avgasMarginId" ng-disabled="marginShow[$index]"> |
484 | <option value="" disabled>Select</option> | 485 | <option value="" disabled>Select</option> |
485 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> | 486 | <option ng-repeat="avgs in avgsMarginList" value="{{avgs.id}}">{{avgs.marginName}}</option> |
486 | </select> | 487 | </select> |
487 | </td> | 488 | </td> |
488 | </tr> | 489 | </tr> |
489 | </tbody> | 490 | </tbody> |
490 | </table> | 491 | </table> |
491 | </div> | 492 | </div> |
492 | <div class="clearfix"></div> | 493 | <div class="clearfix"></div> |
493 | </div> | 494 | </div> |
494 | </div> | 495 | </div> |
495 | <div class="clearfix"></div> | 496 | <div class="clearfix"></div> |
496 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 497 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
497 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 498 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
498 | </div> | 499 | </div> |
499 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> | 500 | <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> |
500 | <div class="pull-right"> | 501 | <div class="pull-right"> |
501 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> | 502 | <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> |
502 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> | 503 | <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> |
503 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> | 504 | <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> |
504 | </div> | 505 | </div> |
505 | </div> --> | 506 | </div> --> |
506 | </div> | 507 | </div> |
507 | </div> | 508 | </div> |
508 | <div class="clearfix"></div> | 509 | <div class="clearfix"></div> |
509 | </div> | 510 | </div> |
510 | </div> | 511 | </div> |
511 | </div> | 512 | </div> |
512 | </div> | 513 | </div> |
513 | <!-- <div class="modal-body step-3" data-step="3"> | 514 | <!-- <div class="modal-body step-3" data-step="3"> |
514 | This is the final step. | 515 | This is the final step. |
515 | </div> --> | 516 | </div> --> |
516 | <div class="modal-footer" style="border-top: 0;"> | 517 | <div class="modal-footer" style="border-top: 0;"> |
517 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> | 518 | <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> |
518 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> | 519 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> |
519 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> | 520 | <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> |
520 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> | 521 | <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> |
521 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> | 522 | <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> |
522 | </div> | 523 | </div> |
523 | </div> | 524 | </div> |
524 | </div> | 525 | </div> |
525 | </form> | 526 | </form> |
526 | 527 | ||
527 | 528 | ||
528 | 529 | ||
529 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> | 530 | <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> |
530 | <div class="modal-dialog modal-lg"> | 531 | <div class="modal-dialog modal-lg"> |
531 | <div class="modal-content"> | 532 | <div class="modal-content"> |
532 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 533 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
533 | <div> | 534 | <div> |
534 | <div class="row" style="margin: 0;"> | 535 | <div class="row" style="margin: 0;"> |
535 | <div> | 536 | <div> |
536 | <div class="widget" style="margin-bottom: 0;"> | 537 | <div class="widget" style="margin-bottom: 0;"> |
537 | <div class="widget-header"> | 538 | <div class="widget-header"> |
538 | <i class="icon-pencil"></i> | 539 | <i class="icon-pencil"></i> |
539 | <i class="fa fa-tasks" aria-hidden="true"></i> | 540 | <i class="fa fa-tasks" aria-hidden="true"></i> |
540 | <h3>Add a Fuel Order</h3> | 541 | <h3>Add a Fuel Order</h3> |
541 | <div class="clearfix"></div> | 542 | <div class="clearfix"></div> |
542 | </div> | 543 | </div> |
543 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 544 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
544 | <div class="col-xs-12"> | 545 | <div class="col-xs-12"> |
545 | <div class="col-xs-12"> | 546 | <div class="col-xs-12"> |
546 | 547 | ||
547 | <div class="col-md-6"> | 548 | <div class="col-md-6"> |
548 | <div class="pull-left" style="width: 110px;"> | 549 | <div class="pull-left" style="width: 110px;"> |
549 | <label class="new-input-label"><b>Company</b></label> | 550 | <label class="new-input-label"><b>Company</b></label> |
550 | </div> | 551 | </div> |
551 | <div class="pull-left" style="width: calc(100% - 110px);"> | 552 | <div class="pull-left" style="width: calc(100% - 110px);"> |
552 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> | 553 | <select ui-select2 ng-model="order.companyName" ng-change="getAircraft(order.companyName)" style="width: 100%;" required> |
553 | <option value="" selected disabled>Select Company</option> | 554 | <option value="" selected disabled>Select Company</option> |
554 | <option ng-repeat="list in companyList">{{list.companyName}}</option> | 555 | <option ng-repeat="list in companyList">{{list.companyName}}</option> |
555 | </select> | 556 | </select> |
556 | </div> | 557 | </div> |
557 | <div class="clearfix"></div> | 558 | <div class="clearfix"></div> |
558 | </div> | 559 | </div> |
559 | <div class="col-md-6"> | 560 | <div class="col-md-6"> |
560 | <div class="pull-left" style="width: 110px;"> | 561 | <div class="pull-left" style="width: 110px;"> |
561 | <label class="new-input-label"><b>Product</b></label> | 562 | <label class="new-input-label"><b>Product</b></label> |
562 | </div> | 563 | </div> |
563 | <div class="pull-left" style="width: calc(100% - 110px);"> | 564 | <div class="pull-left" style="width: calc(100% - 110px);"> |
564 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> | 565 | <select class="form-control" ng-model="order.priceQuote" ng-change="setCost(order.priceQuote);addTotal(order.priceQuote, order.volume)" required> |
565 | <option value="" selected disabled>Select Product</option> | 566 | <option value="" selected disabled>Select Product</option> |
566 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> | 567 | <option ng-repeat="margin in marginList" value="{{margin}}">${{margin.papTotal | number : 4}} {{margin.productName}}</option> |
567 | </select> | 568 | </select> |
568 | </div> | 569 | </div> |
569 | <div class="clearfix"></div> | 570 | <div class="clearfix"></div> |
570 | </div> | 571 | </div> |
571 | 572 | ||
572 | </div> | 573 | </div> |
573 | <div class="clearfix"></div> | 574 | <div class="clearfix"></div> |
574 | <br/> | 575 | <br/> |
575 | 576 | ||
576 | 577 | ||
577 | <div class="col-xs-12"> | 578 | <div class="col-xs-12"> |
578 | 579 | ||
579 | <div class="col-md-6"> | 580 | <div class="col-md-6"> |
580 | <div class="pull-left" style="width: 110px;"> | 581 | <div class="pull-left" style="width: 110px;"> |
581 | <label class="new-input-label"><b>Aircraft</b></label> | 582 | <label class="new-input-label"><b>Aircraft</b></label> |
582 | </div> | 583 | </div> |
583 | <div class="pull-left" style="width: calc(100% - 110px);"> | 584 | <div class="pull-left" style="width: calc(100% - 110px);"> |
584 | <select class="form-control" ng-model="order.aircraftName" required> | 585 | <select class="form-control" ng-model="order.aircraftName" required> |
585 | <option selected disabled value="">Select Aircraft</option> | 586 | <option selected disabled value="">Select Aircraft</option> |
586 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> | 587 | <option ng-repeat="list in aircraftList" value="{{list}}">{{list.tail}}</option> |
587 | </select> | 588 | </select> |
588 | </div> | 589 | </div> |
589 | <div class="clearfix"></div> | 590 | <div class="clearfix"></div> |
590 | </div> | 591 | </div> |
591 | <div class="col-md-6"> | 592 | <div class="col-md-6"> |
592 | <div class="pull-left" style="width: 110px;"> | 593 | <div class="pull-left" style="width: 110px;"> |
593 | <label class="new-input-label"><b>Volume</b></label> | 594 | <label class="new-input-label"><b>Volume</b></label> |
594 | </div> | 595 | </div> |
595 | <div class="pull-left" style="width: calc(100% - 110px);"> | 596 | <div class="pull-left" style="width: calc(100% - 110px);"> |
596 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> | 597 | <input type="text" ng-model="order.volume" ng-keyup="addTotal(order.priceQuote, order.volume)" class="form-control" placeholder="" required> |
597 | </div> | 598 | </div> |
598 | <div class="clearfix"></div> | 599 | <div class="clearfix"></div> |
599 | </div> | 600 | </div> |
600 | 601 | ||
601 | </div> | 602 | </div> |
602 | <div class="clearfix"></div> | 603 | <div class="clearfix"></div> |
603 | <br/> | 604 | <br/> |
604 | 605 | ||
605 | <div class="col-xs-12"> | 606 | <div class="col-xs-12"> |
606 | 607 | ||
607 | <div class="col-md-6"> | 608 | <div class="col-md-6"> |
608 | <div class="pull-left" style="width: 110px;"> | 609 | <div class="pull-left" style="width: 110px;"> |
609 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 610 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
610 | </div> | 611 | </div> |
611 | <div class="pull-left" style="width: calc(100% - 110px);"> | 612 | <div class="pull-left" style="width: calc(100% - 110px);"> |
612 | <div style="width: 50%; float: left;"> | 613 | <div style="width: 50%; float: left;"> |
613 | Date | 614 | Date |
614 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> | 615 | <input type="text" style="width: 90%;" ng-model="order.upliftDate" class="form-control" placeholder="" datepicker required/> |
615 | </div> | 616 | </div> |
616 | <div style="width: 50%; float: left;"> | 617 | <div style="width: 50%; float: left;"> |
617 | Time | 618 | Time |
618 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> | 619 | <select class="form-control" ng-model="order.etaTime" style="width: 100%;" required> |
619 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 620 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
620 | </select> | 621 | </select> |
621 | 622 | ||
622 | </div> | 623 | </div> |
623 | </div> | 624 | </div> |
624 | <div class="clearfix"></div> | 625 | <div class="clearfix"></div> |
625 | </div> | 626 | </div> |
626 | 627 | ||
627 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> | 628 | <div class="col-md-6" style="margin-top: 22px;" ng-if ="order.status === 'invoiced'"> |
628 | <div class="pull-left" style="width: 110px;"> | 629 | <div class="pull-left" style="width: 110px;"> |
629 | <label class="new-input-label"><b>Invoiced</b></label> | 630 | <label class="new-input-label"><b>Invoiced</b></label> |
630 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 631 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
631 | </div> | 632 | </div> |
632 | <div class="pull-left" style="width: calc(100% - 110px);"> | 633 | <div class="pull-left" style="width: calc(100% - 110px);"> |
633 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> | 634 | <input type="text" ng-model="order.invoiced" class="form-control" placeholder=""> |
634 | </div> | 635 | </div> |
635 | <div class="clearfix"></div> | 636 | <div class="clearfix"></div> |
636 | </div> | 637 | </div> |
637 | </div> | 638 | </div> |
638 | <div class="clearfix"></div><br> | 639 | <div class="clearfix"></div><br> |
639 | 640 | ||
640 | 641 | ||
641 | <div class="col-xs-12"> | 642 | <div class="col-xs-12"> |
642 | 643 | ||
643 | <div class="col-md-6"> | 644 | <div class="col-md-6"> |
644 | <div class="pull-left" style="width: 110px;"> | 645 | <div class="pull-left" style="width: 110px;"> |
645 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> | 646 | <label class="new-input-label" style="margin-top: 25px;"><b>ETD</b></label> |
646 | </div> | 647 | </div> |
647 | <div class="pull-left" style="width: calc(100% - 110px);"> | 648 | <div class="pull-left" style="width: calc(100% - 110px);"> |
648 | <div style="width: 50%; float: left;"> | 649 | <div style="width: 50%; float: left;"> |
649 | Date | 650 | Date |
650 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> | 651 | <input type="text" style="width: 90%;" ng-model="order.departingDate" class="form-control" placeholder="" datepicker/> |
651 | </div> | 652 | </div> |
652 | <div style="width: 50%; float: left;"> | 653 | <div style="width: 50%; float: left;"> |
653 | Time | 654 | Time |
654 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> | 655 | <select class="form-control" ng-model="order.etdTime" style="width: 100%;"> |
655 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 656 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
656 | </select> | 657 | </select> |
657 | 658 | ||
658 | </div> | 659 | </div> |
659 | </div> | 660 | </div> |
660 | <div class="clearfix"></div> | 661 | <div class="clearfix"></div> |
661 | </div> | 662 | </div> |
662 | 663 | ||
663 | <div class="col-md-6" style="margin-top: 22px;"> | 664 | <div class="col-md-6" style="margin-top: 22px;"> |
664 | <div class="pull-left" style="width: 110px;"> | 665 | <div class="pull-left" style="width: 110px;"> |
665 | <label class="new-input-label"><b>Total</b></label> | 666 | <label class="new-input-label"><b>Total</b></label> |
666 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 667 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
667 | </div> | 668 | </div> |
668 | <div class="pull-left" style="width: calc(100% - 110px);"> | 669 | <div class="pull-left" style="width: calc(100% - 110px);"> |
669 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> | 670 | <input type="text" class="form-control" disabled ng-model="order.total | number : 4" placeholder="" ng-value="{{order.volume * order.invoiced}}"> |
670 | </div> | 671 | </div> |
671 | </div> | 672 | </div> |
672 | </div> | 673 | </div> |
673 | <div class="clearfix"></div><br> | 674 | <div class="clearfix"></div><br> |
674 | 675 | ||
675 | 676 | ||
676 | <div class="col-xs-12"> | 677 | <div class="col-xs-12"> |
677 | 678 | ||
678 | <div class="col-md-6"> | 679 | <div class="col-md-6"> |
679 | <div class="pull-left" style="width: 110px;"> | 680 | <div class="pull-left" style="width: 110px;"> |
680 | <label class="new-input-label"><b>Fuel on</b></label> | 681 | <label class="new-input-label"><b>Fuel on</b></label> |
681 | </div> | 682 | </div> |
682 | <div class="pull-left" style="width: calc(100% - 110px);"> | 683 | <div class="pull-left" style="width: calc(100% - 110px);"> |
683 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> | 684 | <select class="form-control" ng-model="order.fuelOn" style="width: 100%;"> |
684 | <option value="" disabled selected hidden>Select...</option> | 685 | <option value="" disabled selected hidden>Select...</option> |
685 | <option value="Arrival">Arrival</option> | 686 | <option value="Arrival">Arrival</option> |
686 | <option value="Departure">Departure</option> | 687 | <option value="Departure">Departure</option> |
687 | </select> | 688 | </select> |
688 | </div> | 689 | </div> |
689 | <div class="clearfix"></div> | 690 | <div class="clearfix"></div> |
690 | </div> | 691 | </div> |
691 | 692 | ||
692 | <div class="col-md-6"> | 693 | <div class="col-md-6"> |
693 | <div class="pull-left" style="width: 110px;"> | 694 | <div class="pull-left" style="width: 110px;"> |
694 | <label class="new-input-label"><b>FBO Cost</b></label> | 695 | <label class="new-input-label"><b>FBO Cost</b></label> |
695 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 696 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
696 | </div> | 697 | </div> |
697 | <div class="pull-left" style="width: calc(100% - 110px);"> | 698 | <div class="pull-left" style="width: calc(100% - 110px);"> |
698 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> | 699 | <input type="text" disabled ng-model="order.fboCost" class="form-control" placeholder="0.0000" valid-number /> |
699 | </div> | 700 | </div> |
700 | <div class="clearfix"></div> | 701 | <div class="clearfix"></div> |
701 | </div> | 702 | </div> |
702 | </div> | 703 | </div> |
703 | <div class="clearfix"></div><br> | 704 | <div class="clearfix"></div><br> |
704 | 705 | ||
705 | <div class="col-xs-12"> | 706 | <div class="col-xs-12"> |
706 | <div class="col-md-6"> | 707 | <div class="col-md-6"> |
707 | <div class="pull-left" style="width: 110px;"> | 708 | <div class="pull-left" style="width: 110px;"> |
708 | <label class="new-input-label"><b>Source</b></label> | 709 | <label class="new-input-label"><b>Source</b></label> |
709 | </div> | 710 | </div> |
710 | <div class="pull-left" style="width: calc(100% - 110px);"> | 711 | <div class="pull-left" style="width: calc(100% - 110px);"> |
711 | <div style="font-weight: normal;" ng-if="baseTenant">Tenant/Base Customer</br></div> | 712 | <div style="font-weight: normal;" ng-if="baseTenant">Tenant/Base Customer</br></div> |
712 | <div style="font-weight: normal;" ng-if="contractFuelVendor">CAA Member</div> | 713 | <div style="font-weight: normal;" ng-if="contractFuelVendor">CAA Member</div> |
713 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> | 714 | <!-- <select class="form-control" ng-model="order.source" style="width: 100%;"> |
714 | <option value="" disabled selected hidden>Select Source</option> | 715 | <option value="" disabled selected hidden>Select Source</option> |
715 | <option value="Tenant">Tenant</option> | 716 | <option value="Tenant">Tenant</option> |
716 | <option value="CAA">CAA</option> | 717 | <option value="CAA">CAA</option> |
717 | <option value="Tenant/CAA">Tenant/CAA</option> | 718 | <option value="Tenant/CAA">Tenant/CAA</option> |
718 | </select> --> | 719 | </select> --> |
719 | </div> | 720 | </div> |
720 | <div class="clearfix"></div> | 721 | <div class="clearfix"></div> |
721 | </div> | 722 | </div> |
722 | </div> | 723 | </div> |
723 | <div class="clearfix"></div> | 724 | <div class="clearfix"></div> |
724 | <br/> | 725 | <br/> |
725 | <div class="col-xs-12"> | 726 | <div class="col-xs-12"> |
726 | 727 | ||
727 | 728 | ||
728 | <div class="col-md-6"> | 729 | <div class="col-md-6"> |
729 | <div class="pull-left" style="width: 110px;"> | 730 | <div class="pull-left" style="width: 110px;"> |
730 | <label class="new-input-label"><b>Certificate Type</b></label> | 731 | <label class="new-input-label"><b>Certificate Type</b></label> |
731 | </div> | 732 | </div> |
732 | <div class="pull-left" style="width: calc(100% - 110px);"> | 733 | <div class="pull-left" style="width: calc(100% - 110px);"> |
733 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> | 734 | <select class="form-control" disabled ng-model="order.certificateType" style="width: 100%;"> |
734 | <option value="" disabled selected hidden>Select...</option> | 735 | <option value="" disabled selected hidden>Select...</option> |
735 | <option value="corporate">Part 91 (Corporate)</option> | 736 | <option value="corporate">Part 91 (Corporate)</option> |
736 | <option value="charter">Part 135 (Charter)</option> | 737 | <option value="charter">Part 135 (Charter)</option> |
737 | <option value="scheduled">Part 121 (Scheduled)</option> | 738 | <option value="scheduled">Part 121 (Scheduled)</option> |
738 | <option value="military">Military</option> | 739 | <option value="military">Military</option> |
739 | <option value="government">Government</option> | 740 | <option value="government">Government</option> |
740 | </select> | 741 | </select> |
741 | </div> | 742 | </div> |
742 | <div class="clearfix"></div> | 743 | <div class="clearfix"></div> |
743 | </div> | 744 | </div> |
744 | <div class="col-md-6"> | 745 | <div class="col-md-6"> |
745 | <div class="pull-left" style="width: 110px;"> | 746 | <div class="pull-left" style="width: 110px;"> |
746 | <label class="new-input-label"><b>Status</b></label> | 747 | <label class="new-input-label"><b>Status</b></label> |
747 | </div> | 748 | </div> |
748 | <div class="pull-left" style="width: calc(100% - 110px);"> | 749 | <div class="pull-left" style="width: calc(100% - 110px);"> |
749 | <select class="form-control" ng-model="order.status" style="width: 100%;"> | 750 | <select class="form-control" ng-model="order.status" style="width: 100%;"> |
750 | <option value="" disabled selected hidden>pending</option> | 751 | <option value="" disabled selected hidden>pending</option> |
751 | <option value="pending">pending</option> | 752 | <option value="pending">pending</option> |
752 | <option value="invoiced">invoiced</option> | 753 | <option value="invoiced">invoiced</option> |
753 | <option value="paid">paid</option> | 754 | <option value="paid">paid</option> |
754 | <!-- <option value="cancelled">cancelled</option> | 755 | <!-- <option value="cancelled">cancelled</option> |
755 | <option value="archived">archived</option> --> | 756 | <option value="archived">archived</option> --> |
756 | </select> | 757 | </select> |
757 | </div> | 758 | </div> |
758 | <div class="clearfix"></div> | 759 | <div class="clearfix"></div> |
759 | </div> | 760 | </div> |
760 | </div> | 761 | </div> |
761 | <div class="clearfix"></div><br> | 762 | <div class="clearfix"></div><br> |
762 | 763 | ||
763 | </div> | 764 | </div> |
764 | </div> | 765 | </div> |
765 | </div> | 766 | </div> |
766 | </div> | 767 | </div> |
767 | </div> | 768 | </div> |
768 | </div> | 769 | </div> |
769 | <div class="modal-footer" style="border-top: 0;"> | 770 | <div class="modal-footer" style="border-top: 0;"> |
770 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> | 771 | <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> |
771 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> | 772 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-disabled="fuelOrderForm.$invalid" ng-click="addFuelData()">Save</button> |
772 | </div> | 773 | </div> |
773 | </div> | 774 | </div> |
774 | </div> | 775 | </div> |
775 | </div> | 776 | </div> |
776 | </form> | 777 | </form> |
777 | 778 | ||
778 | 779 | ||
779 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> | 780 | <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> |
780 | <div class="modal-dialog modal-lg"> | 781 | <div class="modal-dialog modal-lg"> |
781 | <div class="modal-content"> | 782 | <div class="modal-content"> |
782 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 783 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
783 | <div> | 784 | <div> |
784 | <div class="row" style="margin: 0;"> | 785 | <div class="row" style="margin: 0;"> |
785 | <div> | 786 | <div> |
786 | <div class="widget" style="margin-bottom: 0;"> | 787 | <div class="widget" style="margin-bottom: 0;"> |
787 | <div class="widget-header"> | 788 | <div class="widget-header"> |
788 | <i class="icon-pencil"></i> | 789 | <i class="icon-pencil"></i> |
789 | <i class="fa fa-tasks" aria-hidden="true"></i> | 790 | <i class="fa fa-tasks" aria-hidden="true"></i> |
790 | <h3>Update Fuel Order</h3> | 791 | <h3>Update Fuel Order</h3> |
791 | <div class="clearfix"></div> | 792 | <div class="clearfix"></div> |
792 | </div> | 793 | </div> |
793 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 794 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
794 | <div class="col-xs-12"> | 795 | <div class="col-xs-12"> |
795 | <div class="col-xs-12"> | 796 | <div class="col-xs-12"> |
796 | 797 | ||
797 | <div class="col-md-6"> | 798 | <div class="col-md-6"> |
798 | <div class="pull-left" style="width: 110px;"> | 799 | <div class="pull-left" style="width: 110px;"> |
799 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> | 800 | <label class="new-input-label" style="margin-top: 25px;"><b>ETA</b></label> |
800 | </div> | 801 | </div> |
801 | <div class="pull-left" style="width: calc(100% - 110px);"> | 802 | <div class="pull-left" style="width: calc(100% - 110px);"> |
802 | <div style="width: 50%; float: left;"> | 803 | <div style="width: 50%; float: left;"> |
803 | Date | 804 | Date |
804 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> | 805 | <input type="text" style="width: 90%;" ng-model="editdata.upliftDateString" class="form-control" placeholder="" datepicker/> |
805 | </div> | 806 | </div> |
806 | <div style="width: 50%; float: left;"> | 807 | <div style="width: 50%; float: left;"> |
807 | Time | 808 | Time |
808 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> | 809 | <select class="form-control" ng-model="editdata.etaTime" style="width: 90%;"> |
809 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> | 810 | <option ng-repeat="li in etaTimeList">{{li.time}}</option> |
810 | </select> | 811 | </select> |
811 | 812 | ||
812 | </div> | 813 | </div> |
813 | </div> | 814 | </div> |
814 | <div class="clearfix"></div> | 815 | <div class="clearfix"></div> |
815 | </div> | 816 | </div> |
816 | <div class="col-md-6" style="margin-top: 25px;"> | 817 | <div class="col-md-6" style="margin-top: 25px;"> |
817 | <div class="pull-left" style="width: 110px;"> | 818 | <div class="pull-left" style="width: 110px;"> |
818 | <label class="new-input-label"><b>Volume</b></label> | 819 | <label class="new-input-label"><b>Volume</b></label> |
819 | </div> | 820 | </div> |
820 | <div class="pull-left" style="width: calc(100% - 110px);"> | 821 | <div class="pull-left" style="width: calc(100% - 110px);"> |
821 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> | 822 | <input type="text" ng-model="editdata.requestedVolume" ng-keyup="updateTotal(editdata.requestedVolume,'v')" class="form-control" placeholder=""> |
822 | </div> | 823 | </div> |
823 | <div class="clearfix"></div> | 824 | <div class="clearfix"></div> |
824 | </div> | 825 | </div> |
825 | </div> | 826 | </div> |
826 | <div class="clearfix"></div><br> | 827 | <div class="clearfix"></div><br> |
827 | 828 | ||
828 | <div class="col-xs-12"> | 829 | <div class="col-xs-12"> |
829 | 830 | ||
830 | <div class="col-md-6"> | 831 | <div class="col-md-6"> |
831 | <div class="pull-left" style="width: 110px;"> | 832 | <div class="pull-left" style="width: 110px;"> |
832 | <label class="new-input-label"><b>ETD</b></label> | 833 | <label class="new-input-label"><b>ETD</b></label> |
833 | </div> | 834 | </div> |
834 | <div class="pull-left" style="width: calc(100% - 110px);"> | 835 | <div class="pull-left" style="width: calc(100% - 110px);"> |
835 | <div style="width: 50%; float: left;"> | 836 | <div style="width: 50%; float: left;"> |
836 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> | 837 | <input type="text" style="width: 90%" ng-model="editdata.departingDateString" class="form-control" placeholder="" datepicker/> |
837 | </div> | 838 | </div> |
838 | <div style="width: 50%; float: left;"> | 839 | <div style="width: 50%; float: left;"> |
839 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> | 840 | <select class="form-control" ng-model="editdata.etdTime" style="width: 90%;"> |
840 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> | 841 | <option ng-repeat="list in etdTimeList">{{list.time}}</option> |
841 | </select> | 842 | </select> |
842 | </div> | 843 | </div> |
843 | </div> | 844 | </div> |
844 | <div class="clearfix"></div> | 845 | <div class="clearfix"></div> |
845 | </div> | 846 | </div> |
846 | <div class="col-md-6"> | 847 | <div class="col-md-6"> |
847 | <div class="pull-left" style="width: 110px;"> | 848 | <div class="pull-left" style="width: 110px;"> |
848 | <label class="new-input-label"><b>Fuel on</b></label> | 849 | <label class="new-input-label"><b>Fuel on</b></label> |
849 | </div> | 850 | </div> |
850 | <div class="pull-left" style="width: calc(100% - 110px);"> | 851 | <div class="pull-left" style="width: calc(100% - 110px);"> |
851 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> | 852 | <select class="form-control" ng-model="editdata.fuelOn" style="width: 100%;"> |
852 | <option value="" disabled selected hidden>Select...</option> | 853 | <option value="" disabled selected hidden>Select...</option> |
853 | <option value="Arrival">Arrival</option> | 854 | <option value="Arrival">Arrival</option> |
854 | <option value="Departure">Departure</option> | 855 | <option value="Departure">Departure</option> |
855 | </select> | 856 | </select> |
856 | </div> | 857 | </div> |
857 | <div class="clearfix"></div> | 858 | <div class="clearfix"></div> |
858 | </div> | 859 | </div> |
859 | </div> | 860 | </div> |
860 | <div class="clearfix"></div><br> | 861 | <div class="clearfix"></div><br> |
861 | 862 | ||
862 | <div class="col-xs-12"> | 863 | <div class="col-xs-12"> |
863 | 864 | ||
864 | <div class="col-md-6"> | 865 | <div class="col-md-6"> |
865 | <div class="pull-left" style="width: 110px;"> | 866 | <div class="pull-left" style="width: 110px;"> |
866 | <label class="new-input-label"><b>Company</b></label> | 867 | <label class="new-input-label"><b>Company</b></label> |
867 | </div> | 868 | </div> |
868 | <div class="pull-left" style="width: calc(100% - 110px);"> | 869 | <div class="pull-left" style="width: calc(100% - 110px);"> |
869 | {{editdata.companyName}} | 870 | {{editdata.companyName}} |
870 | </div> | 871 | </div> |
871 | <div class="clearfix"></div> | 872 | <div class="clearfix"></div> |
872 | </div> | 873 | </div> |
873 | <div class="col-md-6"> | 874 | <div class="col-md-6"> |
874 | <div class="pull-left" style="width: 110px;"> | 875 | <div class="pull-left" style="width: 110px;"> |
875 | <label class="new-input-label"><b>Invoiced</b></label> | 876 | <label class="new-input-label"><b>Invoiced</b></label> |
876 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 877 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
877 | </div> | 878 | </div> |
878 | <div class="pull-left" style="width: calc(100% - 110px);"> | 879 | <div class="pull-left" style="width: calc(100% - 110px);"> |
879 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> | 880 | <input type="text" ng-model="editdata.invoiced" ng-keyup="updateTotal(editdata.invoiced,'i')" class="form-control" placeholder=""> |
880 | </div> | 881 | </div> |
881 | <div class="clearfix"></div> | 882 | <div class="clearfix"></div> |
882 | </div> | 883 | </div> |
883 | 884 | ||
884 | </div> | 885 | </div> |
885 | <div class="clearfix"></div> | 886 | <div class="clearfix"></div> |
886 | <br/> | 887 | <br/> |
887 | 888 | ||
888 | 889 | ||
889 | <div class="col-xs-12"> | 890 | <div class="col-xs-12"> |
890 | 891 | ||
891 | <div class="col-md-6"> | 892 | <div class="col-md-6"> |
892 | <div class="pull-left" style="width: 110px;"> | 893 | <div class="pull-left" style="width: 110px;"> |
893 | <label class="new-input-label"><b>Tail #</b></label> | 894 | <label class="new-input-label"><b>Tail #</b></label> |
894 | </div> | 895 | </div> |
895 | <div class="pull-left" style="width: calc(100% - 110px);"> | 896 | <div class="pull-left" style="width: calc(100% - 110px);"> |
896 | {{editdata.aircraftName}} | 897 | {{editdata.aircraftName}} |
897 | </div> | 898 | </div> |
898 | <div class="clearfix"></div> | 899 | <div class="clearfix"></div> |
899 | </div> | 900 | </div> |
900 | <div class="col-md-6"> | 901 | <div class="col-md-6"> |
901 | <div class="pull-left" style="width: 110px;"> | 902 | <div class="pull-left" style="width: 110px;"> |
902 | <label class="new-input-label"><b>Total</b></label> | 903 | <label class="new-input-label"><b>Total</b></label> |
903 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> | 904 | <span style="margin-top: 6px; margin-right: 3px; float: right;">$</span> |
904 | </div> | 905 | </div> |
905 | <div class="pull-left" style="width: calc(100% - 110px);"> | 906 | <div class="pull-left" style="width: calc(100% - 110px);"> |
906 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> | 907 | <input type="text" class="form-control" disabled ng-model="editdata.total | number : 4" placeholder="" ng-value="{{editdata.requestedVolume * editdata.invoiced}}"> |
907 | </div> | 908 | </div> |
908 | <div class="clearfix"></div> | 909 | <div class="clearfix"></div> |
909 | </div> | 910 | </div> |
910 | </div> | 911 | </div> |
911 | <div class="clearfix"></div> | 912 | <div class="clearfix"></div> |
912 | <br/> | 913 | <br/> |
913 | <div class="col-xs-12"> | 914 | <div class="col-xs-12"> |
914 | 915 | ||
915 | 916 | ||
916 | <div class="col-md-6"> | 917 | <div class="col-md-6"> |
917 | <div class="pull-left" style="width: 110px;"> | 918 | <div class="pull-left" style="width: 110px;"> |
918 | <label class="new-input-label"><b>Source</b></label> | 919 | <label class="new-input-label"><b>Source</b></label> |
919 | </div> | 920 | </div> |
920 | <div class="pull-left" style="width: calc(100% - 110px);"> | 921 | <div class="pull-left" style="width: calc(100% - 110px);"> |
921 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> | 922 | <select class="form-control" ng-model="editdata.source" style="width: 100%;"> |
922 | <option value="" disabled selected hidden>Select Source</option> | 923 | <option value="" disabled selected hidden>Select Source</option> |
923 | <option value="Tenant">Tenant</option> | 924 | <option value="Tenant">Tenant</option> |
924 | <option value="CAA">CAA</option> | 925 | <option value="CAA">CAA</option> |
925 | <option value="Tenant/CAA">Tenant/CAA</option> | 926 | <option value="Tenant/CAA">Tenant/CAA</option> |
926 | </select> | 927 | </select> |
927 | </div> | 928 | </div> |
928 | <div class="clearfix"></div> | 929 | <div class="clearfix"></div> |
929 | </div> | 930 | </div> |
930 | <div class="col-md-6"> | 931 | <div class="col-md-6"> |
931 | <div class="pull-left" style="width: 110px;"> | 932 | <div class="pull-left" style="width: 110px;"> |
932 | <label class="new-input-label"><b>Product</b></label> | 933 | <label class="new-input-label"><b>Product</b></label> |
933 | </div> | 934 | </div> |
934 | <div class="pull-left" style="width: calc(100% - 110px);"> | 935 | <div class="pull-left" style="width: calc(100% - 110px);"> |
935 | {{editdata.productName}} | 936 | {{editdata.productName}} |
936 | </div> | 937 | </div> |
937 | <div class="clearfix"></div> | 938 | <div class="clearfix"></div> |
938 | </div> | 939 | </div> |
939 | </div> | 940 | </div> |
940 | <div class="clearfix"></div> | 941 | <div class="clearfix"></div> |
941 | <br/> | 942 | <br/> |
942 | 943 | ||
943 | <div class="col-xs-12"> | 944 | <div class="col-xs-12"> |
944 | 945 | ||
945 | <div class="col-md-6"> | 946 | <div class="col-md-6"> |
946 | <div class="pull-left" style="width: 110px;"> | 947 | <div class="pull-left" style="width: 110px;"> |
947 | <label class="new-input-label"><b>Status</b></label> | 948 | <label class="new-input-label"><b>Status</b></label> |
948 | </div> | 949 | </div> |
949 | <div class="pull-left" style="width: calc(100% - 110px);"> | 950 | <div class="pull-left" style="width: calc(100% - 110px);"> |
950 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> | 951 | <select class="form-control" ng-model="editdata.status" style="width: 100%;"> |
951 | <option value="" disabled selected hidden>Select Status</option> | 952 | <option value="" disabled selected hidden>Select Status</option> |
952 | <option value="pending">pending</option> | 953 | <option value="pending">pending</option> |
953 | <option value="invoiced">invoiced</option> | 954 | <option value="invoiced">invoiced</option> |
954 | <option value="paid">paid</option> | 955 | <option value="paid">paid</option> |
955 | <option value="cancelled">cancelled</option> | 956 | <option value="cancelled">cancelled</option> |
956 | <option value="archived">archived</option> | 957 | <option value="archived">archived</option> |
957 | </select> | 958 | </select> |
958 | </div> | 959 | </div> |
959 | <div class="clearfix"></div> | 960 | <div class="clearfix"></div> |
960 | </div> | 961 | </div> |
961 | <div class="col-md-6"> | 962 | <div class="col-md-6"> |
962 | <div class="pull-left" style="width: 110px;"> | 963 | <div class="pull-left" style="width: 110px;"> |
963 | <label class="new-input-label"><b>Certificate Type</b></label> | 964 | <label class="new-input-label"><b>Certificate Type</b></label> |
964 | </div> | 965 | </div> |
965 | <div class="pull-left" style="width: calc(100% - 110px);"> | 966 | <div class="pull-left" style="width: calc(100% - 110px);"> |
966 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> | 967 | <select class="form-control" ng-model="editdata.certificateType" style="width: 100%;" required> |
967 | <option value="" disabled selected hidden>Select...</option> | 968 | <option value="" disabled selected hidden>Select...</option> |
968 | <option value="corporate">Part 91 (Corporate)</option> | 969 | <option value="corporate">Part 91 (Corporate)</option> |
969 | <option value="charter">Part 135 (Charter)</option> | 970 | <option value="charter">Part 135 (Charter)</option> |
970 | <option value="scheduled">Part 121 (Scheduled)</option> | 971 | <option value="scheduled">Part 121 (Scheduled)</option> |
971 | <option value="military">Military</option> | 972 | <option value="military">Military</option> |
972 | <option value="government">Government</option> | 973 | <option value="government">Government</option> |
973 | </select> | 974 | </select> |
974 | </div> | 975 | </div> |
975 | 976 | ||
976 | </div> | 977 | </div> |
977 | <div class="clearfix"></div> | 978 | <div class="clearfix"></div> |
978 | <br/> | 979 | <br/> |
979 | <div class="col-xs-12"> | 980 | <div class="col-xs-12"> |
980 | </div> | 981 | </div> |
981 | <div class="clearfix"></div> | 982 | <div class="clearfix"></div> |
982 | <br/> | 983 | <br/> |
983 | <div class="col-xs-12"> | 984 | <div class="col-xs-12"> |
984 | 985 | ||
985 | </div> | 986 | </div> |
986 | <div class="clearfix"></div> | 987 | <div class="clearfix"></div> |
987 | 988 | ||
988 | </div> | 989 | </div> |
989 | </div> | 990 | </div> |
990 | <div class="clearfix"></div> | 991 | <div class="clearfix"></div> |
991 | </div> | 992 | </div> |
992 | </div> | 993 | </div> |
993 | </div> | 994 | </div> |
994 | </div> | 995 | </div> |
995 | 996 | ||
996 | <div class="modal-footer" style="border-top: 0;"> | 997 | <div class="modal-footer" style="border-top: 0;"> |
997 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> | 998 | <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> |
998 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> | 999 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData()">Save</button> |
999 | </div> | 1000 | </div> |
1000 | </div> | 1001 | </div> |
1001 | </div> | 1002 | </div> |
1002 | </div> | 1003 | </div> |
1003 | </form> | 1004 | </form> |
1004 | 1005 | ||
1005 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> | 1006 | <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> |
1006 | <div class="modal-dialog modal-xs"> | 1007 | <div class="modal-dialog modal-xs"> |
1007 | <div class="modal-content"> | 1008 | <div class="modal-content"> |
1008 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 1009 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
1009 | <div> | 1010 | <div> |
1010 | <div class="row" style="margin: 0;"> | 1011 | <div class="row" style="margin: 0;"> |
1011 | <div> | 1012 | <div> |
1012 | <div class="widget" style="margin-bottom: 0;"> | 1013 | <div class="widget" style="margin-bottom: 0;"> |
1013 | <div class="widget-header"> | 1014 | <div class="widget-header"> |
1014 | <i class="icon-pencil"></i> | 1015 | <i class="icon-pencil"></i> |
1015 | <i class="fa fa-tasks" aria-hidden="true"></i> | 1016 | <i class="fa fa-tasks" aria-hidden="true"></i> |
1016 | <h3>Upload Attachment</h3> | 1017 | <h3>Upload Attachment</h3> |
1017 | <div class="clearfix"></div> | 1018 | <div class="clearfix"></div> |
1018 | </div> | 1019 | </div> |
1019 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 1020 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
1020 | <div class="col-xs-6"> | 1021 | <div class="col-xs-6"> |
1021 | <div class="col-xs-6"> | 1022 | <div class="col-xs-6"> |
1022 | 1023 | ||
1023 | <div class="col-md-6"> | 1024 | <div class="col-md-6"> |
1024 | <div class="pull-left" style="width: 110px;"> | 1025 | <div class="pull-left" style="width: 110px;"> |
1025 | <label class="new-input-label"><b>Upload</b></label> | 1026 | <label class="new-input-label"><b>Upload</b></label> |
1026 | <br> | 1027 | <br> |
1027 | <br> | 1028 | <br> |
1028 | </div> | 1029 | </div> |
1029 | <div class="pull-left" style="width: calc(100% - 110px);"> | 1030 | <div class="pull-left" style="width: calc(100% - 110px);"> |
1030 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> | 1031 | <input type="file" accept=".pdf" file-model = "uploadFile.attachment"> |
1031 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> | 1032 | <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> |
1032 | </div> | 1033 | </div> |
1033 | <div class="clearfix"></div> | 1034 | <div class="clearfix"></div> |
1034 | </div> | 1035 | </div> |
1035 | </div> | 1036 | </div> |
1036 | <div class="clearfix"></div><br> | 1037 | <div class="clearfix"></div><br> |
1037 | 1038 | ||
1038 | </div> | 1039 | </div> |
1039 | </div> | 1040 | </div> |
1040 | <div class="clearfix"></div> | 1041 | <div class="clearfix"></div> |
1041 | </div> | 1042 | </div> |
1042 | </div> | 1043 | </div> |
1043 | </div> | 1044 | </div> |
1044 | </div> | 1045 | </div> |
1045 | 1046 | ||
1046 | <div class="modal-footer" style="border-top: 0;"> | 1047 | <div class="modal-footer" style="border-top: 0;"> |
1047 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> | 1048 | <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> |
1048 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> | 1049 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> |
1049 | </div> | 1050 | </div> |
1050 | </div> | 1051 | </div> |
1051 | </div> | 1052 | </div> |
1052 | </div> | 1053 | </div> |
1053 | </form> | 1054 | </form> |
1054 | 1055 | ||
1055 | <div class="customConfirmPopBackdrop" id="delete1"> | 1056 | <div class="customConfirmPopBackdrop" id="delete1"> |
1056 | <div class="customModalInner" style="max-width: 400px;"> | 1057 | <div class="customModalInner" style="max-width: 400px;"> |
1057 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 1058 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
1058 | <table> | 1059 | <table> |
1059 | <tr> | 1060 | <tr> |
1060 | <td> | 1061 | <td> |
1061 | <img src="img/info.png" style="width: 50px;"> | 1062 | <img src="img/info.png" style="width: 50px;"> |
1062 | </td> | 1063 | </td> |
1063 | <td> | 1064 | <td> |
1064 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> | 1065 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p> |
1065 | </td> | 1066 | </td> |
1066 | </tr> | 1067 | </tr> |
1067 | </table> | 1068 | </table> |
1068 | </div> | 1069 | </div> |
1069 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 1070 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
1070 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> | 1071 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button> |
1071 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> | 1072 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button> |
1072 | </div> | 1073 | </div> |
1073 | </div> | 1074 | </div> |
1074 | </div> | 1075 | </div> |
1075 | 1076 | ||
1076 | 1077 | ||
1077 | 1078 | ||
1078 | <div class="myLoader" ng-show="showLoader"> | 1079 | <div class="myLoader" ng-show="showLoader"> |
1079 | <img src="../img/hourglass.gif" width="50px;"> | 1080 | <img src="../img/hourglass.gif" width="50px;"> |
1080 | </div> | 1081 | </div> |
1081 | <script src="js/multi-step-modal.js"></script> | 1082 | <script src="js/multi-step-modal.js"></script> |
1082 | <script> | 1083 | <script> |
1083 | sendEvent = function(sel, step) { | 1084 | sendEvent = function(sel, step) { |
1084 | $(sel).trigger('next.m.' + step); | 1085 | $(sel).trigger('next.m.' + step); |
1085 | } | 1086 | } |
1086 | </script> | 1087 | </script> |
1087 | 1088 | ||
1088 | <script> | 1089 | <script> |
1089 | angular.module("KendoDemos", [ "kendo.directives" ]) | 1090 | angular.module("KendoDemos", [ "kendo.directives" ]) |
1090 | .controller("MyCtrl", function($scope){ | 1091 | .controller("MyCtrl", function($scope){ |
1091 | $scope.getType = function(x) { | 1092 | $scope.getType = function(x) { |
1092 | return typeof x; | 1093 | return typeof x; |
1093 | }; | 1094 | }; |
1094 | $scope.isDate = function(x) { | 1095 | $scope.isDate = function(x) { |
1095 | return x instanceof Date; | 1096 | return x instanceof Date; |
1096 | }; | 1097 | }; |
1097 | }) | 1098 | }) |
1098 | </script> | 1099 | </script> |