Commit c277275bbbf3e723d87e850029b1f1f3e228f9d2

Authored by Mr. Hot Foods
1 parent 945fcf7445
Exists in master

login changes

1 'use strict'; 1 'use strict';
2 2
3 3
4 angular.module('acufuel', ['nvd3', 'ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop']) 4 angular.module('acufuel', ['nvd3', 'ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop'])
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 .provider('myCSRF',[function(){ 30 .provider('myCSRF',[function(){
31 var headerName = 'X-CSRFToken'; 31 var headerName = 'X-CSRFToken';
32 var cookieName = 'csrftoken'; 32 var cookieName = 'csrftoken';
33 var allowedMethods = ['GET']; 33 var allowedMethods = ['GET'];
34 34
35 this.setHeaderName = function(n) { 35 this.setHeaderName = function(n) {
36 headerName = n; 36 headerName = n;
37 } 37 }
38 this.setCookieName = function(n) { 38 this.setCookieName = function(n) {
39 cookieName = n; 39 cookieName = n;
40 } 40 }
41 this.setAllowedMethods = function(n) { 41 this.setAllowedMethods = function(n) {
42 allowedMethods = n; 42 allowedMethods = n;
43 } 43 }
44 this.$get = ['$cookies', function($cookies){ 44 this.$get = ['$cookies', function($cookies){
45 return { 45 return {
46 'request': function(config) { 46 'request': function(config) {
47 if(allowedMethods.indexOf(config.method) === -1) { 47 if(allowedMethods.indexOf(config.method) === -1) {
48 // do something on success 48 // do something on success
49 config.headers[headerName] = $cookies[cookieName]; 49 config.headers[headerName] = $cookies[cookieName];
50 } 50 }
51 return config; 51 return config;
52 } 52 }
53 } 53 }
54 }]; 54 }];
55 }]) 55 }])
56 56
57 .config( 57 .config(
58 ['$locationProvider', '$stateProvider', '$urlRouterProvider', 58 ['$locationProvider', '$stateProvider', '$urlRouterProvider',
59 function($locationProvider, $stateProvider, $urlRouterProvider) { 59 function($locationProvider, $stateProvider, $urlRouterProvider) {
60 $locationProvider.hashPrefix('!'); 60 $locationProvider.hashPrefix('!');
61 // routes 61 // routes
62 $urlRouterProvider 62 $urlRouterProvider
63 .otherwise('/login'); 63 .otherwise('/login');
64 64
65 $stateProvider 65 $stateProvider
66 66
67 .state("app", { 67 .state("app", {
68 url: "", 68 url: "",
69 templateUrl: "partials/main/main.html", 69 templateUrl: "partials/main/main.html",
70 controller: "MainController", 70 controller: "MainController",
71 abstract: true 71 abstract: true
72 }) 72 })
73 73
74 .state("login", { 74 .state("login", {
75 url: "/login", 75 url: "/login",
76 templateUrl: "partials/login/login.html", 76 templateUrl: "partials/login/login.html",
77 controller: "LoginController" 77 controller: "LoginController"
78 }) 78 })
79 79
80 .state("app.customers", { 80 .state("app.customers", {
81 url: "/customers", 81 url: "/customers",
82 templateUrl: "partials/customers/customers.html", 82 templateUrl: "partials/customers/customers.html",
83 controller: "customersController", 83 controller: "customersController",
84 data: { 84 data: {
85 authorizedRoles: ["FBO"], 85 authorizedRoles: ["FBO"],
86 } 86 }
87 }) 87 })
88 88
89 .state("app.accountSetting", { 89 .state("app.accountSetting", {
90 url: "/accountSetting", 90 url: "/accountSetting",
91 templateUrl: "partials/accountSetting/accountSetting.html", 91 templateUrl: "partials/accountSetting/accountSetting.html",
92 controller: "AccountSettingController", 92 controller: "AccountSettingController",
93 data: { 93 data: {
94 authorizedRoles: ["FBO"], 94 authorizedRoles: ["FBO"],
95 } 95 }
96 }) 96 })
97 97
98 .state("app.ContactView", { 98 .state("app.ContactView", {
99 url: "/ContactView", 99 url: "/ContactView",
100 templateUrl: "partials/ContactView/ContactView.html", 100 templateUrl: "partials/ContactView/ContactView.html",
101 controller: "ContactViewController", 101 controller: "ContactViewController",
102 data: { 102 data: {
103 authorizedRoles: ["FBO"], 103 authorizedRoles: ["FBO"],
104 } 104 }
105 }) 105 })
106 .state("app.FuelVendors", { 106 .state("app.FuelVendors", {
107 url: "/FuelVendors", 107 url: "/FuelVendors",
108 templateUrl: "partials/FuelVendors/FuelVendors.html", 108 templateUrl: "partials/FuelVendors/FuelVendors.html",
109 controller: "FuelVendorsController", 109 controller: "FuelVendorsController",
110 data: { 110 data: {
111 authorizedRoles: ["FBO"], 111 authorizedRoles: ["FBO"],
112 } 112 }
113 }) 113 })
114 114
115 .state("app.analytics", { 115 .state("app.analytics", {
116 url: "/analytics", 116 url: "/analytics",
117 templateUrl: "partials/analytics/analytics.html", 117 templateUrl: "partials/analytics/analytics.html",
118 controller: "analyticsController", 118 controller: "analyticsController",
119 data: { 119 data: {
120 authorizedRoles: ["FBO"], 120 authorizedRoles: ["FBO"],
121 } 121 }
122 }) 122 })
123 123
124 .state("app.account", { 124 .state("app.account", {
125 url: "/account", 125 url: "/account",
126 templateUrl: "partials/account/account.html", 126 templateUrl: "partials/account/account.html",
127 controller: "accountController", 127 controller: "accountController",
128 data: { 128 data: {
129 authorizedRoles: ["FBO"], 129 authorizedRoles: ["FBO"],
130 } 130 }
131 }) 131 })
132 132
133 .state("app.dashboard", { 133 .state("app.dashboard", {
134 url: "/dashboard", 134 url: "/dashboard",
135 templateUrl: "partials/dashboard/dashboard.html", 135 templateUrl: "partials/dashboard/dashboard.html",
136 controller: "dashboardController", 136 controller: "dashboardController",
137 data: { 137 data: {
138 authorizedRoles: ["FBO"], 138 authorizedRoles: ["FBO"],
139 } 139 }
140 }) 140 })
141 141
142 .state("app.elements", { 142 .state("app.elements", {
143 url: "/elements", 143 url: "/elements",
144 templateUrl: "partials/elements/elements.html", 144 templateUrl: "partials/elements/elements.html",
145 controller: "elementsController", 145 controller: "elementsController",
146 data: { 146 data: {
147 authorizedRoles: ["FBO"], 147 authorizedRoles: ["FBO"],
148 } 148 }
149 }) 149 })
150 150
151 .state("app.error", { 151 .state("app.error", {
152 url: "/error", 152 url: "/error",
153 templateUrl: "partials/error/error.html", 153 templateUrl: "partials/error/error.html",
154 controller: "errorController" 154 controller: "errorController"
155 }) 155 })
156 156
157 .state("app.faq", { 157 .state("app.faq", {
158 url: "/faq", 158 url: "/faq",
159 templateUrl: "partials/faq/faq.html", 159 templateUrl: "partials/faq/faq.html",
160 controller: "faqController" 160 controller: "faqController"
161 }) 161 })
162 162
163 .state("app.forms", { 163 .state("app.forms", {
164 url: "/forms", 164 url: "/forms",
165 templateUrl: "partials/forms/forms.html", 165 templateUrl: "partials/forms/forms.html",
166 controller: "formsController", 166 controller: "formsController",
167 data: { 167 data: {
168 authorizedRoles: ["FBO"], 168 authorizedRoles: ["FBO"],
169 } 169 }
170 }) 170 })
171 171
172 .state("app.fuelManager", { 172 .state("app.fuelManager", {
173 url: "/fuelManager", 173 url: "/fuelManager",
174 templateUrl: "partials/fuelManager/fuelManager.html", 174 templateUrl: "partials/fuelManager/fuelManager.html",
175 controller: "fuelManagerController", 175 controller: "fuelManagerController",
176 data: { 176 data: {
177 authorizedRoles: ["FBO"], 177 authorizedRoles: ["FBO"],
178 } 178 }
179 }) 179 })
180 180
181 .state("app.pricing", { 181 .state("app.pricing", {
182 url: "/pricing", 182 url: "/pricing",
183 templateUrl: "partials/pricing/pricing.html", 183 templateUrl: "partials/pricing/pricing.html",
184 controller: "pricingController", 184 controller: "pricingController",
185 data: { 185 data: {
186 authorizedRoles: ["FBO"], 186 authorizedRoles: ["FBO"],
187 } 187 }
188 }) 188 })
189 189
190 .state("app.reports", { 190 .state("app.reports", {
191 url: "/reports", 191 url: "/reports",
192 templateUrl: "partials/reports/reports.html", 192 templateUrl: "partials/reports/reports.html",
193 controller: "reportsController", 193 controller: "reportsController",
194 data: { 194 data: {
195 authorizedRoles: ["FBO"], 195 authorizedRoles: ["FBO"],
196 } 196 }
197 }) 197 })
198 198
199 .state("app.scheduler", { 199 .state("app.scheduler", {
200 url: "/scheduler", 200 url: "/scheduler",
201 templateUrl: "partials/scheduler/scheduler.html", 201 templateUrl: "partials/scheduler/scheduler.html",
202 controller: "schedulerController", 202 controller: "schedulerController",
203 data: { 203 data: {
204 authorizedRoles: ["FBO"], 204 authorizedRoles: ["FBO"],
205 } 205 }
206 }) 206 })
207 .state("app.signup", { 207 .state("app.signup", {
208 url: "/signup", 208 url: "/signup",
209 templateUrl: "partials/signup/signup.html", 209 templateUrl: "partials/signup/signup.html",
210 controller: "signupController" 210 controller: "signupController"
211 }) 211 })
212 212
213 .state("app.updateFuelManager", { 213 .state("app.updateFuelManager", {
214 url: "/updateFuelManager", 214 url: "/updateFuelManager",
215 templateUrl: "partials/updateFuelManager/updateFuelManager.html", 215 templateUrl: "partials/updateFuelManager/updateFuelManager.html",
216 controller: "updateFuelManagerController", 216 controller: "updateFuelManagerController",
217 data: { 217 data: {
218 authorizedRoles: ["FBO"], 218 authorizedRoles: ["FBO"],
219 } 219 }
220 }) 220 })
221 221
222 .state("app.viewCompany", { 222 .state("app.viewCompany", {
223 url: "/viewCompany/:id", 223 url: "/viewCompany/:id",
224 templateUrl: "partials/viewCompany/viewCompany.html", 224 templateUrl: "partials/viewCompany/viewCompany.html",
225 controller: "viewCompanyController", 225 controller: "viewCompanyController",
226 data: { 226 data: {
227 authorizedRoles: ["FBO"], 227 authorizedRoles: ["FBO"],
228 } 228 }
229 }) 229 })
230 230
231 .state("app.viewFuelVendor", { 231 .state("app.viewFuelVendor", {
232 url: "/viewFuelVendor/:id", 232 url: "/viewFuelVendor/:id",
233 templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", 233 templateUrl: "partials/viewFuelVendor/viewFuelVendor.html",
234 controller: "ViewFuelVendorController", 234 controller: "ViewFuelVendorController",
235 data: { 235 data: {
236 authorizedRoles: ["FBO"], 236 authorizedRoles: ["FBO"],
237 } 237 }
238 }) 238 })
239 239
240 .state("app.fuelOrders", { 240 .state("app.fuelOrders", {
241 url: "/fuelOrders", 241 url: "/fuelOrders",
242 templateUrl: "partials/fuelOrders/fuelOrders.html", 242 templateUrl: "partials/fuelOrders/fuelOrders.html",
243 controller: "fuelOrdersController", 243 controller: "fuelOrdersController",
244 data: { 244 data: {
245 authorizedRoles: ["FBO"], 245 authorizedRoles: ["FBO"],
246 } 246 }
247 }) 247 })
248 248
249 .state("app.DispatchFuel", { 249 .state("app.DispatchFuel", {
250 url: "/DispatchFuel", 250 url: "/DispatchFuel",
251 templateUrl: "partials/DispatchFuel/DispatchFuel.html", 251 templateUrl: "partials/DispatchFuel/DispatchFuel.html",
252 controller: "DispatchFuelController", 252 controller: "DispatchFuelController",
253 data: { 253 data: {
254 authorizedRoles: ["FBO"], 254 authorizedRoles: ["FBO"],
255 } 255 }
256 }) 256 })
257 257
258 .state("app.searchDispatchFuel", { 258 .state("app.searchDispatchFuel", {
259 url: "/searchDispatchFuel", 259 url: "/searchDispatchFuel",
260 templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html", 260 templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html",
261 controller: "searchDispatchFuelController", 261 controller: "searchDispatchFuelController",
262 data: { 262 data: {
263 authorizedRoles: ["FBO"], 263 authorizedRoles: ["FBO"],
264 } 264 }
265 }) 265 })
266 266
267 .state("app.Accept", { 267 .state("app.Accept", {
268 url: "/Accept", 268 url: "/Accept",
269 templateUrl: "partials/Accept/Accept.html", 269 templateUrl: "partials/Accept/Accept.html",
270 controller: "AcceptController", 270 controller: "AcceptController",
271 data: { 271 data: {
272 authorizedRoles: ["FBO"], 272 authorizedRoles: ["FBO"],
273 } 273 }
274 }) 274 })
275 275
276 .state("app.delselected", { 276 .state("app.delselected", {
277 url: "/delselected", 277 url: "/delselected",
278 templateUrl: "partials/delselected/delselected.html", 278 templateUrl: "partials/delselected/delselected.html",
279 controller: "delselectedController", 279 controller: "delselectedController",
280 data: { 280 data: {
281 authorizedRoles: ["FBO"], 281 authorizedRoles: ["FBO"],
282 } 282 }
283 }) 283 })
284 284
285 .state("app.pricingcontact", { 285 .state("app.pricingcontact", {
286 url: "/pricingcontact", 286 url: "/pricingcontact",
287 templateUrl: "partials/pricingcontact/pricingcontact.html", 287 templateUrl: "partials/pricingcontact/pricingcontact.html",
288 controller: "pricingcontactController", 288 controller: "pricingcontactController",
289 data: { 289 data: {
290 authorizedRoles: ["FBO"], 290 authorizedRoles: ["FBO"],
291 } 291 }
292 }) 292 })
293 293
294 .state("app.viewContact", { 294 .state("app.viewContact", {
295 url: "/viewContact/:id", 295 url: "/viewContact/:id",
296 templateUrl: "partials/viewcontact/viewcontact.html", 296 templateUrl: "partials/viewcontact/viewcontact.html",
297 controller: "viewcontactController", 297 controller: "viewcontactController",
298 data: { 298 data: {
299 authorizedRoles: ["FBO"], 299 authorizedRoles: ["FBO"],
300 } 300 }
301 }) 301 })
302 302
303 .state("app.viewVendorContact", { 303 .state("app.viewVendorContact", {
304 url: "/viewVendorContact/:id", 304 url: "/viewVendorContact/:id",
305 templateUrl: "partials/viewVendorContact/viewVendorContact.html", 305 templateUrl: "partials/viewVendorContact/viewVendorContact.html",
306 controller: "viewVendorContactController", 306 controller: "viewVendorContactController",
307 data: { 307 data: {
308 authorizedRoles: ["FBO"], 308 authorizedRoles: ["FBO"],
309 } 309 }
310 }) 310 })
311 311
312 .state("app.enterFuelOrder", { 312 .state("app.enterFuelOrder", {
313 url: "/enterFuelOrder", 313 url: "/enterFuelOrder",
314 templateUrl: "partials/enterFuelOrder/enterFuelOrder.html", 314 templateUrl: "partials/enterFuelOrder/enterFuelOrder.html",
315 controller: "enterFuelOrderController", 315 controller: "enterFuelOrderController",
316 data: { 316 data: {
317 authorizedRoles: ["FBO"], 317 authorizedRoles: ["FBO"],
318 } 318 }
319 }) 319 })
320 320
321 .state("app.flightDepDashboard", { 321 .state("app.flightDepDashboard", {
322 url: "/flightDepDashboard", 322 url: "/flightDepDashboard",
323 templateUrl: "partials/flightDepDashboard/flightDepDashboard.html", 323 templateUrl: "partials/flightDepDashboard/flightDepDashboard.html",
324 controller: "flightDepDashboardController" 324 controller: "flightDepDashboardController"
325 }) 325 })
326 326
327 .state("app.flightDepOrders", { 327 .state("app.flightDepOrders", {
328 url: "/flightDepOrders", 328 url: "/flightDepOrders",
329 templateUrl: "partials/flightDepOrders/flightDepOrders.html", 329 templateUrl: "partials/flightDepOrders/flightDepOrders.html",
330 controller: "flightDepOrdersController" 330 controller: "flightDepOrdersController"
331 }) 331 })
332 332
333 } 333 }
334 ]) 334 ])
335 335
336 .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { 336 .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) {
337 $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { 337 $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {
338 $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); 338 $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser'));
339 339
340 LoginService.isAuthorized = function (authorizedRoles) { 340 LoginService.isAuthorized = function (authorizedRoles) {
341 if (!angular.isArray(authorizedRoles)) { 341 if (!angular.isArray(authorizedRoles)) {
342 authorizedRoles = [authorizedRoles]; 342 authorizedRoles = [authorizedRoles];
343 } 343 }
344 var userdata = JSON.parse(window.localStorage.getItem('currentUser')); 344 var userdata = JSON.parse(window.localStorage.getItem('currentUser'));
345 return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); 345 return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false);
346 } 346 }
347 347
348 if ('data' in next && 'authorizedRoles' in next.data) { 348 if ('data' in next && 'authorizedRoles' in next.data) {
349 var authorizedRoles = next.data.authorizedRoles; 349 var authorizedRoles = next.data.authorizedRoles;
350 if (!LoginService.isAuthorized(authorizedRoles)) { 350 if (!LoginService.isAuthorized(authorizedRoles)) {
351 event.preventDefault(); 351 event.preventDefault();
352 if($state.current.name.length == 0) { 352 if($state.current.name.length == 0) {
353 $state.go('login') 353 $state.go('login')
354 } else { 354 } else {
355 $state.go($state.current, {}, {reload: true}); 355 $state.go($state.current, {}, {reload: true});
356 $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); 356 $rootScope.$broadcast(AUTH_EVENTS.notAuthorized);
357 } 357 }
358 } 358 }
359 } 359 }
360 360
361 if (LoginService.isAuthenticated()) { 361 if (LoginService.isAuthenticated()) {
362 if (next.name == 'login') { 362 if (next.name == 'login') {
363 event.preventDefault(); 363 event.preventDefault();
364 $state.go('app.dashboard'); 364 $state.go('app.dashboard');
365 } 365 }
366 }else{ 366 }else{
367 $state.go('app.flightDepDashboard'); 367 // if (next.name == 'login') {
368 // event.preventDefault();
369 // $state.go('app.flightDepDashboard');
370 // }
371
368 372
369 } 373 }
370 }); 374 });
371 }]) 375 }])
372 376
373 377
374 .directive("datepicker",function(){ 378 .directive("datepicker",function(){
375 return { 379 return {
376 restrict:"A", 380 restrict:"A",
377 link:function(scope,el,attr){ 381 link:function(scope,el,attr){
378 el.datepicker(); 382 el.datepicker();
379 } 383 }
380 }; 384 };
381 }) 385 })
382 386
383 387
384 388
385 389
386 390
387 391
388 392
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', fuelOrdersController]); 5 .controller('fuelOrdersController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'NgTableParams','fuelOrdersService', fuelOrdersController]);
6 6
7 function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService) { 7 function fuelOrdersController($scope, $rootScope, $uibModal, $filter, $http, NgTableParams,fuelOrdersService) {
8 8
9 $scope.showFuelOrderModal = false; 9 $scope.showFuelOrderModal = false;
10 $scope.optionSelected; 10 $scope.optionSelected;
11 11
12 $scope.data = {}; 12 $scope.data = {};
13 13
14 fuelOrdersService.getOrders().then(function(result) { 14 fuelOrdersService.getOrders().then(function(result) {
15 $scope.orderdata = result; 15 $scope.orderdata = result;
16 for(var i=0;i<$scope.orderdata.length;i++){ 16 for(var i=0;i<$scope.orderdata.length;i++){
17 $scope.orderdata[i].departingDate = new Date($scope.orderdata[i].departingDate); 17 $scope.orderdata[i].departingDate = new Date($scope.orderdata[i].departingDate);
18 18
19 var str = ""+$scope.orderdata[i].departingDate; 19 var str = ""+$scope.orderdata[i].departingDate;
20 str = str.slice(4,16) 20 str = str.slice(4,16)
21 $scope.orderdata[i].departingDateString = str 21 $scope.orderdata[i].departingDateString = str
22 console.log(str); 22 console.log(str);
23 23
24 } 24 }
25 25
26 $scope.displayFuelOrderList = new NgTableParams({ 26 $scope.displayFuelOrderList = new NgTableParams({
27 page: 1, 27 page: 1,
28 count: 10, 28 count: 10,
29 }, { 29 }, {
30 data: $scope.orderdata 30 data: $scope.orderdata
31 }); 31 });
32 }) 32 })
33 33
34 34
35 $scope.onDTSelect = function() { 35 $scope.onDTSelect = function() {
36 if($scope.optionSelected == 'dt'){ 36 if($scope.optionSelected == 'dt'){
37 $('#demo-modal-4').css('display', 'block'); 37 $('#demo-modal-4').css('display', 'block');
38 } 38 }
39 } 39 }
40 $scope.attachmentid = "" 40 $scope.attachmentid = ""
41 $scope.attachment = function(id, value) { 41 $scope.attachment = function(id, value) {
42 console.log(id, value) 42 console.log(id, value)
43 $scope.attachmentid = id 43 $scope.attachmentid = id
44 if(value == 'uploadAttachment'){ 44 if(value == 'uploadAttachment'){
45 $('#demo-modal-6').css('display', 'block'); 45 $('#demo-modal-6').css('display', 'block');
46 }else if(value == 'viewAttachment'){
47 $('#demo-modal-7').css('display', 'block');
48 }else if(value == 'deleteAttachment'){
49 $('#delete1').css('display', 'block');
46 } 50 }
47 } 51 }
48 52
53 $scope.cancelDeleteAttachment = function() {
54 $('#delete1').css('display', '');
55 }
56
57 $scope.deleteAttachment = function() {
58 fuelOrdersService.deleteAttachment($scope.data).then(function(result) {
59 console.log(result)
60 })
61 $('#delete1').css('display', '');
62 }
63
49 $scope.saveUploadAttachment = function(attachmentData) { 64 $scope.saveUploadAttachment = function(attachmentData) {
50 $scope.data.media = attachmentData 65 $scope.data.media = attachmentData
51 $scope.data.id = $scope.attachmentid 66 $scope.data.id = $scope.attachmentid
52 fuelOrdersService.uploadAttachment($scope.data).then(function(result) { 67 fuelOrdersService.uploadAttachment($scope.data).then(function(result) {
53 console.log(result) 68 console.log(result)
54 }) 69 })
55 70
56 $('#demo-modal-6').css('display', ''); 71 $('#demo-modal-6').css('display', '');
57 } 72 }
58 73
59 $scope.cancelUploadAttachment = function() { 74 $scope.cancelUploadAttachment = function() {
60 $('#demo-modal-6').css('display', ''); 75 $('#demo-modal-6').css('display', '');
61 } 76 }
62 77
63 $scope.editdata = {}; 78 $scope.editdata = {};
64 $scope.editTableRow = function(rowData){ 79 $scope.editTableRow = function(rowData){
65 console.log('row data', rowData); 80 console.log('row data', rowData);
66 $scope.editdata = rowData; 81 $scope.editdata = rowData;
67 $('#demo-modal-5').css('display', 'block'); 82 $('#demo-modal-5').css('display', 'block');
68 } 83 }
69 84
70 $scope.cancelData = function() { 85 $scope.cancelData = function() {
71 $('#demo-modal-4').css('display', ''); 86 $('#demo-modal-4').css('display', '');
72 } 87 }
73 $scope.canceleditdata = function() { 88 $scope.canceleditdata = function() {
74 $('#demo-modal-5').css('display', ''); 89 $('#demo-modal-5').css('display', '');
75 } 90 }
76 91
77 92
78 93
79 $scope.companyList = {}; 94 $scope.companyList = {};
80 95
81 fuelOrdersService.getAllCompanies().then(function(result) { 96 fuelOrdersService.getAllCompanies().then(function(result) {
82 $scope.showLoader = false; 97 $scope.showLoader = false;
83 $scope.companyList = result; 98 $scope.companyList = result;
84 console.log(result) 99 console.log(result)
85 }) 100 })
86 101
87 $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}]; 102 $scope.sourceList = [{source:"Direct Jet-A"},{source:"Direct AVGAS 100LL"}];
88 103
89 $scope.data = {}; 104 $scope.data = {};
90 105
91 106
92 107
93 } 108 }
app/partials/fuelOrders/fuelOrders.html
1 <style> 1 <style>
2 .subnavbar .mainnav > li:nth-child(3) > a{ 2 .subnavbar .mainnav > li:nth-child(3) > a{
3 color: #ff9900; 3 color: #ff9900;
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="main"> 73 <div class="main">
74 <div class="container"> 74 <div class="container">
75 <div class="row"> 75 <div class="row">
76 <div class="col-md-12"> 76 <div class="col-md-12">
77 <div class="widget stacked "> 77 <div class="widget stacked ">
78 <div class="widget-content"> 78 <div class="widget-content">
79 <div class="tabbable"> 79 <div class="tabbable">
80 <ul class="nav nav-tabs"> 80 <ul class="nav nav-tabs">
81 <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> 81 <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>
82 <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li> 82 <li><button type="button" class="btn btn-default btn-sm " ng-click="displayFuelOrderList.filter({}); searchText=null">Clear Search And Filters</button></li>
83 <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> 83 <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>
84 </ul> 84 </ul>
85 <br> 85 <br>
86 <div class="tab-content customer-table" style="margin:0px"> 86 <div class="tab-content customer-table" style="margin:0px">
87 <div class="tab-pane active" id="companyView"> 87 <div class="tab-pane active" id="companyView">
88 <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true"> 88 <table ng-table="displayFuelOrderList" class="table table-striped table-condensed" show-filter="true">
89 <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" > 89 <tr ng-repeat="row in $data | filter:searchText" style="cursor: pointer;" >
90 <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)"> 90 <td data-title="'Company Name'" filter="{companyName: 'text'}" sortable="'companyName'" ng-click="editTableRow(row)">
91 {{row.companyName}} 91 {{row.companyName}}
92 </td> 92 </td>
93 <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)"> 93 <td data-title="'Fueling date'" filter="{departingDate: 'text'}" sortable="'departingDate'" ng-click="editTableRow(row)">
94 {{row.departingDateString}} 94 {{row.departingDateString}}
95 </td> 95 </td>
96 <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)"> 96 <td data-title="'Tail #'" filter="{aircraftName: 'text'}" sortable="'aircraftName'" ng-click="editTableRow(row)">
97 {{row.aircraftName}} 97 {{row.aircraftName}}
98 </td> 98 </td>
99 <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)"> 99 <td data-title="'Source'" filter="{source: 'text'}" sortable="'source'" ng-click="editTableRow(row)">
100 {{row.source}} 100 {{row.source}}
101 </td> 101 </td>
102 <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)"> 102 <td data-title="'Volume'" filter="{requestedVolume: 'text'}" sortable="'requestedVolume'" ng-click="editTableRow(row)">
103 {{row.requestedVolume}} 103 {{row.requestedVolume}}
104 </td> 104 </td>
105 <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)"> 105 <td data-title="'FBO Cost'" filter="{fboCost: 'text'}" sortable="'fboCost'" ng-click="editTableRow(row)">
106 {{row.fboCost}} 106 {{row.fboCost}}
107 </td> 107 </td>
108 <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)"> 108 <td data-title="'Quoted'" filter="{priceQuote: 'text'}" sortable="'priceQuote'" ng-click="editTableRow(row)">
109 {{row.priceQuote}} 109 {{row.priceQuote}}
110 </td> 110 </td>
111 <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)"> 111 <td data-title="'Invoiced'" filter="{invoiced: 'text'}" sortable="'invoiced'" ng-click="editTableRow(row)">
112 {{row.invoiced}} 112 {{row.invoiced}}
113 </td> 113 </td>
114 <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)"> 114 <td data-title="'Total'" filter="{total: 'text'}" sortable="'total'" ng-click="editTableRow(row)">
115 {{row.total}} 115 {{row.total}}
116 </td> 116 </td>
117 <td data-title="'Status'" filter="{status: 'text'}" sortable="'status'" ng-click="editTableRow(row)"> 117 <td data-title="'Status'" filter="{status: 'text'}" sortable="'status'" ng-click="editTableRow(row)">
118 {{row.status}} 118 {{row.status}}
119 </td> 119 </td>
120 <td data-title="'Attachments'" filter="{allIn: 'text'}" sortable="'allIn'"> 120 <td data-title="'Attachments'" filter="{allIn: 'text'}" sortable="'allIn'">
121 <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected)" > 121 <select class="btn btn-regular" ng-model="attachOptionSelected" ng-change="attachment(row.id,attachOptionSelected)" >
122 <option value="" disabled selected="selected" >Invoice</option> 122 <option value="" disabled selected="selected" >Invoice</option>
123 <option value="viewAttachment" >View</option> 123 <option value="viewAttachment" >View</option>
124 <option value="deleteAttachment" >Delete</option> 124 <option value="deleteAttachment" >Delete</option>
125 <option value="0" disabled >_____________</option> 125 <option value="0" disabled >_____________</option>
126 <option value="uploadAttachment" >Upload</option> 126 <option value="uploadAttachment" >Upload</option>
127 </select> 127 </select>
128 </td> 128 </td>
129 </tr> 129 </tr>
130 </table> 130 </table>
131 131
132 <select class="btn btn-warning exportBtn" ng-model="optionSelected" ng-change="onDTSelect()"> 132 <select class="btn btn-warning exportBtn" ng-model="optionSelected" ng-change="onDTSelect()">
133 <option value="" disabled selected="selected">Fuel Widget</option> 133 <option value="" disabled selected="selected">Fuel Widget</option>
134 <option value="dt" >Direct Transaction</option> 134 <option value="dt" >Direct Transaction</option>
135 <option value="efo" >Export Fuel Orders</option> 135 <option value="efo" >Export Fuel Orders</option>
136 </select> 136 </select>
137 137
138 </div> 138 </div>
139 </div> 139 </div>
140 </div> 140 </div>
141 </div> 141 </div>
142 <!-- /widget-content --> 142 <!-- /widget-content -->
143 </div> 143 </div>
144 <!-- /widget --> 144 <!-- /widget -->
145 </div> 145 </div>
146 <!-- /span8 --> 146 <!-- /span8 -->
147 </div> 147 </div>
148 <!-- /row --> 148 <!-- /row -->
149 </div> 149 </div>
150 <!-- /container --> 150 <!-- /container -->
151 151
152 152
153 </div> 153 </div>
154 <!-- /main --> 154 <!-- /main -->
155 155
156 156
157 <form class="modal multi-step" id="demo-modal-3" name="companyForm"> 157 <form class="modal multi-step" id="demo-modal-3" name="companyForm">
158 <div class="modal-dialog modal-lg"> 158 <div class="modal-dialog modal-lg">
159 <div class="modal-content"> 159 <div class="modal-content">
160 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 160 <div class="modal-body step-1" data-step="1" style="padding: 0;">
161 <div> 161 <div>
162 <div class="row" style="margin: 0;"> 162 <div class="row" style="margin: 0;">
163 <div> 163 <div>
164 <div class="widget" style="margin-bottom: 0;"> 164 <div class="widget" style="margin-bottom: 0;">
165 <div class="widget-header"> 165 <div class="widget-header">
166 <i class="icon-pencil"></i> 166 <i class="icon-pencil"></i>
167 <i class="fa fa-tasks" aria-hidden="true"></i> 167 <i class="fa fa-tasks" aria-hidden="true"></i>
168 <h3>Add a New Company</h3> 168 <h3>Add a New Company</h3>
169 <div class="pull-right my-toggle-switch" style="margin-right: 30px;"> 169 <div class="pull-right my-toggle-switch" style="margin-right: 30px;">
170 <div style="color: #ff9a01;">Activate &nbsp &nbsp 170 <div style="color: #ff9a01;">Activate &nbsp &nbsp
171 <toggle ng-model="data.activate" size="customToogle"></toggle> 171 <toggle ng-model="data.activate" size="customToogle"></toggle>
172 </div> 172 </div>
173 </div> 173 </div>
174 <div class="clearfix"></div> 174 <div class="clearfix"></div>
175 </div> 175 </div>
176 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 176 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
177 <div class="col-xs-12"> 177 <div class="col-xs-12">
178 <div class="col-md-8"> 178 <div class="col-md-8">
179 <div class="pull-left"> 179 <div class="pull-left">
180 <label class="new-input-label"><b>Company Name *</b></label> 180 <label class="new-input-label"><b>Company Name *</b></label>
181 </div> 181 </div>
182 <div class="pull-left" style="margin-left: 15px;"> 182 <div class="pull-left" style="margin-left: 15px;">
183 <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required> 183 <input type="text" ng-model="data.companyName" class="form-control companyNameInput" ng-keyup="removeValidation()" placeholder="" required>
184 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label> 184 <label class="customErrorMessage" ng-show="showCompanyError">This field is required.</label>
185 </div> 185 </div>
186 <div class="clearfix"></div> 186 <div class="clearfix"></div>
187 </div> 187 </div>
188 <div class="col-md-4"> 188 <div class="col-md-4">
189 189
190 <div class="pull-right"> 190 <div class="pull-right">
191 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder=""> 191 <input type="text" ng-model="data.baseIcao" style="width: 100px;" class="form-control" placeholder="">
192 </div> 192 </div>
193 <div class="pull-right"> 193 <div class="pull-right">
194 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label> 194 <label style="margin-right: 15px;" class="new-input-label"><b>Base ICAO</b></label>
195 </div> 195 </div>
196 <div class="clearfix"></div> 196 <div class="clearfix"></div>
197 </div> 197 </div>
198 </div> 198 </div>
199 <div class="clearfix"></div><br> 199 <div class="clearfix"></div><br>
200 <div class="col-xs-12"> 200 <div class="col-xs-12">
201 <div class="col-md-7"> 201 <div class="col-md-7">
202 <div class="pull-left"> 202 <div class="pull-left">
203 <label class="new-input-label"><b>Relationship&nbsp;</b></label> 203 <label class="new-input-label"><b>Relationship&nbsp;</b></label>
204 </div> 204 </div>
205 <div class="pull-left" style="margin-left: 32px;"> 205 <div class="pull-left" style="margin-left: 32px;">
206 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br> 206 <input type="checkbox" ng-model="data.baseTenant" name="vehicle" value="Bike"> Check here if this is a Base Tenant<br>
207 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br> 207 <input type="checkbox" ng-model="data.fuelerlinxCustomer" name="vehicle" value="Car" checked> Check here if this is a FuelerLinx Customer<br>
208 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor 208 <input type="checkbox" ng-model="data.contractFuelVendor" name="vehicle" value="Car" checked> Check here if this is a Contract Fuel Vendor
209 </div> 209 </div>
210 <div class="clearfix"></div> 210 <div class="clearfix"></div>
211 </div> 211 </div>
212 <div class="col-md-2 Airport" style="text-align: right;"> 212 <div class="col-md-2 Airport" style="text-align: right;">
213 <b>Certificate Type</b> 213 <b>Certificate Type</b>
214 </div> 214 </div>
215 <div class="col-md-3 Airport"> 215 <div class="col-md-3 Airport">
216 <select required class="form-control" ng-model="data.certificateType"> 216 <select required class="form-control" ng-model="data.certificateType">
217 <option value="" disabled selected hidden>Select...</option> 217 <option value="" disabled selected hidden>Select...</option>
218 <option value="corporate">Part 91 (Corporate)</option> 218 <option value="corporate">Part 91 (Corporate)</option>
219 <option value="charter">Part 135 (Charter)</option> 219 <option value="charter">Part 135 (Charter)</option>
220 <option value="scheduled">Part 121 (Scheduled)</option> 220 <option value="scheduled">Part 121 (Scheduled)</option>
221 <option value="military">Military</option> 221 <option value="military">Military</option>
222 <option value="government">Government</option> 222 <option value="government">Government</option>
223 </select> 223 </select>
224 </div> 224 </div>
225 <div class="clearfix"></div> 225 <div class="clearfix"></div>
226 </div> 226 </div>
227 <div class="clearfix"></div> 227 <div class="clearfix"></div>
228 <br/> 228 <br/>
229 <div class="col-xs-12"> 229 <div class="col-xs-12">
230 <div class="col-md-6"> 230 <div class="col-md-6">
231 <div class="pull-left" style="width: 110px;"> 231 <div class="pull-left" style="width: 110px;">
232 <b>JET A Margin *</b> 232 <b>JET A Margin *</b>
233 </div> 233 </div>
234 <div class="pull-left"> 234 <div class="pull-left">
235 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> 235 <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()">
236 <option value="" disabled>Select...</option> 236 <option value="" disabled>Select...</option>
237 </select> 237 </select>
238 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> 238 <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label>
239 239
240 <div class="clearfix"></div> 240 <div class="clearfix"></div>
241 </div> 241 </div>
242 </div> 242 </div>
243 243
244 <div class="col-md-3 Airport" style="text-align: right;"> 244 <div class="col-md-3 Airport" style="text-align: right;">
245 <b>AVGAS 100LL Margin</b> 245 <b>AVGAS 100LL Margin</b>
246 </div> 246 </div>
247 <div class="col-md-3 Airport"> 247 <div class="col-md-3 Airport">
248 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> 248 <select class="form-control" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList">
249 <option value="" disabled>Select...</option> 249 <option value="" disabled>Select...</option>
250 </select> 250 </select>
251 </div> 251 </div>
252 <div class="clearfix"></div> 252 <div class="clearfix"></div>
253 </div> 253 </div>
254 <div class="clearfix"></div> 254 <div class="clearfix"></div>
255 <br/> 255 <br/>
256 <div class="col-xs-12"> 256 <div class="col-xs-12">
257 <div class="col-md-12"> 257 <div class="col-md-12">
258 <div class="pull-left" style="width: 110px;"> 258 <div class="pull-left" style="width: 110px;">
259 <label class="new-input-label"><b>Address</b></label> 259 <label class="new-input-label"><b>Address</b></label>
260 </div> 260 </div>
261 <div class="pull-left" style="width: calc(100% - 110px);"> 261 <div class="pull-left" style="width: calc(100% - 110px);">
262 <input type="text" class="form-control" ng-model="data.addressOne" placeholder=""> 262 <input type="text" class="form-control" ng-model="data.addressOne" placeholder="">
263 </div> 263 </div>
264 <div class="clearfix"></div> 264 <div class="clearfix"></div>
265 </div> 265 </div>
266 </div> 266 </div>
267 <div class="clearfix"></div> 267 <div class="clearfix"></div>
268 <br/> 268 <br/>
269 <div class="col-xs-12"> 269 <div class="col-xs-12">
270 <div class="col-md-12"> 270 <div class="col-md-12">
271 <div class="pull-left" style="width: 110px;"> 271 <div class="pull-left" style="width: 110px;">
272 <label class="new-input-label"><b>Address2</b></label> 272 <label class="new-input-label"><b>Address2</b></label>
273 </div> 273 </div>
274 <div class="pull-left" style="width: calc(100% - 110px);"> 274 <div class="pull-left" style="width: calc(100% - 110px);">
275 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder=""> 275 <input type="text" ng-model="data.addressTwo" class="form-control" placeholder="">
276 </div> 276 </div>
277 <div class="clearfix"></div> 277 <div class="clearfix"></div>
278 </div> 278 </div>
279 </div> 279 </div>
280 <div class="clearfix"></div> 280 <div class="clearfix"></div>
281 <br/> 281 <br/>
282 <div class="col-xs-12"> 282 <div class="col-xs-12">
283 283
284 <div class="col-md-6"> 284 <div class="col-md-6">
285 <div class="pull-left" style="width: 110px;"> 285 <div class="pull-left" style="width: 110px;">
286 <label class="new-input-label"><b>City</b></label> 286 <label class="new-input-label"><b>City</b></label>
287 </div> 287 </div>
288 <div class="pull-left" style="width: calc(100% - 110px);"> 288 <div class="pull-left" style="width: calc(100% - 110px);">
289 <input type="text" ng-model="data.city" class="form-control" placeholder=""> 289 <input type="text" ng-model="data.city" class="form-control" placeholder="">
290 </div> 290 </div>
291 <div class="clearfix"></div> 291 <div class="clearfix"></div>
292 </div> 292 </div>
293 <div class="col-md-3"> 293 <div class="col-md-3">
294 <div class="pull-left" style="width: 40px;"> 294 <div class="pull-left" style="width: 40px;">
295 <label class="new-input-label"><b>State</b></label> 295 <label class="new-input-label"><b>State</b></label>
296 </div> 296 </div>
297 <div class="pull-left" style="width: calc(100% - 110px);"> 297 <div class="pull-left" style="width: calc(100% - 110px);">
298 <input type="text" ng-model="data.state" class="form-control" placeholder=""> 298 <input type="text" ng-model="data.state" class="form-control" placeholder="">
299 </div> 299 </div>
300 <div class="clearfix"></div> 300 <div class="clearfix"></div>
301 </div> 301 </div>
302 <div class="col-md-3"> 302 <div class="col-md-3">
303 <div class="pull-left"> 303 <div class="pull-left">
304 <label class="new-input-label"><b>Zip Code</b></label> 304 <label class="new-input-label"><b>Zip Code</b></label>
305 </div> 305 </div>
306 <div class="pull-right" style="width: calc(100% - 60px);"> 306 <div class="pull-right" style="width: calc(100% - 60px);">
307 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder=""> 307 <input type="tel" ng-model="data.zipcode" class="form-control" placeholder="">
308 </div> 308 </div>
309 <div class="clearfix"></div> 309 <div class="clearfix"></div>
310 </div> 310 </div>
311 </div> 311 </div>
312 <div class="clearfix"></div> 312 <div class="clearfix"></div>
313 <br/> 313 <br/>
314 <div class="col-xs-12"> 314 <div class="col-xs-12">
315 315
316 <div class="col-md-6"> 316 <div class="col-md-6">
317 <div class="pull-left" style="width: 110px;"> 317 <div class="pull-left" style="width: 110px;">
318 <label class="new-input-label"><b>Country</b></label> 318 <label class="new-input-label"><b>Country</b></label>
319 </div> 319 </div>
320 <div class="pull-left" style="width: calc(100% - 110px);"> 320 <div class="pull-left" style="width: calc(100% - 110px);">
321 <input type="text" ng-model="data.country" class="form-control" placeholder=""> 321 <input type="text" ng-model="data.country" class="form-control" placeholder="">
322 </div> 322 </div>
323 <div class="clearfix"></div> 323 <div class="clearfix"></div>
324 </div> 324 </div>
325 <div class="col-md-6"> 325 <div class="col-md-6">
326 <div class="pull-left" style="width: 110px;"> 326 <div class="pull-left" style="width: 110px;">
327 <label class="new-input-label"><b>Internal Note</b></label> 327 <label class="new-input-label"><b>Internal Note</b></label>
328 </div> 328 </div>
329 <div class="pull-left" style="width: calc(100% - 110px);"> 329 <div class="pull-left" style="width: calc(100% - 110px);">
330 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea> 330 <textarea name="message" ng-model="data.internalNote" rows="4" cols="34"></textarea>
331 </div> 331 </div>
332 <div class="clearfix"></div> 332 <div class="clearfix"></div>
333 </div> 333 </div>
334 </div> 334 </div>
335 <div class="clearfix"></div> 335 <div class="clearfix"></div>
336 <!-- <br/> 336 <!-- <br/>
337 <div class="col-xs-12"> 337 <div class="col-xs-12">
338 <div class="col-md-2 Airport"></div> 338 <div class="col-md-2 Airport"></div>
339 <div class="col-md-10 Airport"> 339 <div class="col-md-10 Airport">
340 <div class="pull-right"> 340 <div class="pull-right">
341 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> 341 <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
342 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> 342 <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button>
343 </div> 343 </div>
344 </div> 344 </div>
345 </div> --> 345 </div> -->
346 </div> 346 </div>
347 </div> 347 </div>
348 <div class="clearfix"></div> 348 <div class="clearfix"></div>
349 </div> 349 </div>
350 </div> 350 </div>
351 </div> 351 </div>
352 </div> 352 </div>
353 <div class="modal-body step-2" data-step="2" style="padding: 0;"> 353 <div class="modal-body step-2" data-step="2" style="padding: 0;">
354 <div> 354 <div>
355 <div class="row" style="margin: 0;"> 355 <div class="row" style="margin: 0;">
356 <div> 356 <div>
357 <div class="widget" style="margin-bottom: 0;"> 357 <div class="widget" style="margin-bottom: 0;">
358 <div class="widget-header"> 358 <div class="widget-header">
359 <i class="icon-pencil"></i> 359 <i class="icon-pencil"></i>
360 <i class="fa fa-tasks" aria-hidden="true"></i> 360 <i class="fa fa-tasks" aria-hidden="true"></i>
361 <h3>Add a New Company</h3> 361 <h3>Add a New Company</h3>
362 <div class="clearfix"></div> 362 <div class="clearfix"></div>
363 </div> 363 </div>
364 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 364 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
365 <div class="col-xs-12"> 365 <div class="col-xs-12">
366 <div class="widget-header"> 366 <div class="widget-header">
367 <i class="fa fa-list"></i> 367 <i class="fa fa-list"></i>
368 <h3>Aircraft List</h3> 368 <h3>Aircraft List</h3>
369 </div> 369 </div>
370 <div class="widget-content" style="padding:0px;border: 0px; "> 370 <div class="widget-content" style="padding:0px;border: 0px; ">
371 <div class="table-responsive"> 371 <div class="table-responsive">
372 <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> 372 <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;">
373 <thead> 373 <thead>
374 <tr> 374 <tr>
375 <th>Tail</th> 375 <th>Tail</th>
376 <th>Make</th> 376 <th>Make</th>
377 <th>Model</th> 377 <th>Model</th>
378 <th>Size</th> 378 <th>Size</th>
379 <th>Margin</th> 379 <th>Margin</th>
380 </tr> 380 </tr>
381 </thead> 381 </thead>
382 <tbody> 382 <tbody>
383 <tr> 383 <tr>
384 <td> 384 <td>
385 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> 385 <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control">
386 </td> 386 </td>
387 <td style="width: 25%;"> 387 <td style="width: 25%;">
388 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> 388 <select class="form-control" ng-model="aircraft.make" ng-change="getModal()">
389 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 389 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
390 </select> 390 </select>
391 </td> 391 </td>
392 <td style="width: 20%;"> 392 <td style="width: 20%;">
393 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> 393 <select class="form-control" ng-model="aircraft.model" ng-change="getSize()">
394 <option ng-repeat="model in aircraftModalList">{{model}}</option> 394 <option ng-repeat="model in aircraftModalList">{{model}}</option>
395 </select> 395 </select>
396 </td> 396 </td>
397 <td style="width: 25%;"> 397 <td style="width: 25%;">
398 <select class="form-control" ng-model="aircraft.size"> 398 <select class="form-control" ng-model="aircraft.size">
399 <option ng-repeat="size in aircraftSizeList">{{size}}</option> 399 <option ng-repeat="size in aircraftSizeList">{{size}}</option>
400 </select> 400 </select>
401 </td> 401 </td>
402 <td> 402 <td>
403 <select class="form-control"> 403 <select class="form-control">
404 <option>Margin1</option> 404 <option>Margin1</option>
405 <option>Margin2</option> 405 <option>Margin2</option>
406 </select> 406 </select>
407 </td> 407 </td>
408 </tr> 408 </tr>
409 </tbody> 409 </tbody>
410 410
411 </table> --> 411 </table> -->
412 <table class="table table-striped table-bordered"> 412 <table class="table table-striped table-bordered">
413 <thead> 413 <thead>
414 <tr> 414 <tr>
415 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> 415 <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> -->
416 <th>Tail</th> 416 <th>Tail</th>
417 <th>Make</th> 417 <th>Make</th>
418 <th>Model</th> 418 <th>Model</th>
419 <th>Size</th> 419 <th>Size</th>
420 <th>JET A Margin</th> 420 <th>JET A Margin</th>
421 <th>AVGS 100LL Margin</th> 421 <th>AVGS 100LL Margin</th>
422 </tr> 422 </tr>
423 </thead> 423 </thead>
424 <tbody> 424 <tbody>
425 <tr ng-repeat="aircraftData in aircraftDetails track by $index"> 425 <tr ng-repeat="aircraftData in aircraftDetails track by $index">
426 <!-- <td> 426 <!-- <td>
427 <input type="checkbox" ng-model="aircraftData.selected"/> 427 <input type="checkbox" ng-model="aircraftData.selected"/>
428 </td> --> 428 </td> -->
429 <td style="width: 15%"> 429 <td style="width: 15%">
430 <input type="text" class="form-control" ng-model="aircraftData.tail" required/> 430 <input type="text" class="form-control" ng-model="aircraftData.tail" required/>
431 </td> 431 </td>
432 <td style="width: 17%"> 432 <td style="width: 17%">
433 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> 433 <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)">
434 <option ng-repeat="make in aircraftMakeList">{{make}}</option> 434 <option ng-repeat="make in aircraftMakeList">{{make}}</option>
435 <option value="" disabled>Select...</option> 435 <option value="" disabled>Select...</option>
436 </select> 436 </select>
437 </td> 437 </td>
438 <td style="width: 17%"> 438 <td style="width: 17%">
439 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> 439 <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)">
440 <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> 440 <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option>
441 <option value="" disabled>Select...</option> 441 <option value="" disabled>Select...</option>
442 </select> 442 </select>
443 </td> 443 </td>
444 <td style="width: 17%"> 444 <td style="width: 17%">
445 <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> 445 <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList">
446 <option value="" disabled>Select...</option> 446 <option value="" disabled>Select...</option>
447 </select> 447 </select>
448 <!-- <select class="form-control" ng-model="aircraftData.size"> 448 <!-- <select class="form-control" ng-model="aircraftData.size">
449 <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> 449 <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option>
450 </select> --> 450 </select> -->
451 </td> 451 </td>
452 <td style="width: 17%"> 452 <td style="width: 17%">
453 <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> 453 <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList">
454 <option value="" disabled>Select...</option> 454 <option value="" disabled>Select...</option>
455 </select> 455 </select>
456 </td> 456 </td>
457 <td style="width: 17%"> 457 <td style="width: 17%">
458 <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> 458 <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList">
459 <option value="" disabled>Select...</option> 459 <option value="" disabled>Select...</option>
460 </select> 460 </select>
461 </td> 461 </td>
462 </tr> 462 </tr>
463 </tbody> 463 </tbody>
464 </table> 464 </table>
465 </div> 465 </div>
466 <div class="clearfix"></div> 466 <div class="clearfix"></div>
467 </div> 467 </div>
468 </div> 468 </div>
469 <div class="clearfix"></div> 469 <div class="clearfix"></div>
470 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> 470 <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;">
471 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> 471 <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button>
472 </div> 472 </div>
473 <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> 473 <!-- <div class="col-xs-12" style="margin-bottom: 20px;">
474 <div class="pull-right"> 474 <div class="pull-right">
475 <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> 475 <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button>
476 <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> 476 <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button>
477 <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> 477 <button type="button" class="btn btn-success" ng-click="goBack()">Save</button>
478 </div> 478 </div>
479 </div> --> 479 </div> -->
480 </div> 480 </div>
481 </div> 481 </div>
482 <div class="clearfix"></div> 482 <div class="clearfix"></div>
483 </div> 483 </div>
484 </div> 484 </div>
485 </div> 485 </div>
486 </div> 486 </div>
487 <!-- <div class="modal-body step-3" data-step="3"> 487 <!-- <div class="modal-body step-3" data-step="3">
488 This is the final step. 488 This is the final step.
489 </div> --> 489 </div> -->
490 <div class="modal-footer" style="border-top: 0;"> 490 <div class="modal-footer" style="border-top: 0;">
491 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button> 491 <button type="button" class="btn btn-default" ng-click="reset2()" data-dismiss="modal">Cancel</button>
492 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button> 492 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#demo-modal-3', 2)">Next: Add Aircraft</button>
493 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button> 493 <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 1)">Go Back</button>
494 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> --> 494 <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#demo-modal-3', 3)">Continue</button> -->
495 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button> 495 <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveCompanyData()">Save</button>
496 </div> 496 </div>
497 </div> 497 </div>
498 </div> 498 </div>
499 </form> 499 </form>
500 500
501 501
502 502
503 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm"> 503 <form class="modal multi-step" id="demo-modal-4" name="fuelOrderForm">
504 <div class="modal-dialog modal-lg"> 504 <div class="modal-dialog modal-lg">
505 <div class="modal-content"> 505 <div class="modal-content">
506 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 506 <div class="modal-body step-1" data-step="1" style="padding: 0;">
507 <div> 507 <div>
508 <div class="row" style="margin: 0;"> 508 <div class="row" style="margin: 0;">
509 <div> 509 <div>
510 <div class="widget" style="margin-bottom: 0;"> 510 <div class="widget" style="margin-bottom: 0;">
511 <div class="widget-header"> 511 <div class="widget-header">
512 <i class="icon-pencil"></i> 512 <i class="icon-pencil"></i>
513 <i class="fa fa-tasks" aria-hidden="true"></i> 513 <i class="fa fa-tasks" aria-hidden="true"></i>
514 <h3>Add a Fuel Order</h3> 514 <h3>Add a Fuel Order</h3>
515 <div class="clearfix"></div> 515 <div class="clearfix"></div>
516 </div> 516 </div>
517 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 517 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
518 <div class="col-xs-12"> 518 <div class="col-xs-12">
519 <div class="col-xs-12"> 519 <div class="col-xs-12">
520 520
521 <div class="col-md-6"> 521 <div class="col-md-6">
522 <div class="pull-left" style="width: 110px;"> 522 <div class="pull-left" style="width: 110px;">
523 <label class="new-input-label"><b>Fueling Date</b></label> 523 <label class="new-input-label"><b>Fueling Date</b></label>
524 </div> 524 </div>
525 <div class="pull-left" style="width: calc(100% - 110px);"> 525 <div class="pull-left" style="width: calc(100% - 110px);">
526 <input type="date" ng-model="data.date" class="form-control" placeholder=""> 526 <input type="date" ng-model="data.date" class="form-control" placeholder="">
527 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> 527 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>-->
528 </div> 528 </div>
529 <div class="clearfix"></div> 529 <div class="clearfix"></div>
530 </div> 530 </div>
531 <div class="col-md-6"> 531 <div class="col-md-6">
532 <div class="pull-left" style="width: 110px;"> 532 <div class="pull-left" style="width: 110px;">
533 <label class="new-input-label"><b>Tail #</b></label> 533 <label class="new-input-label"><b>Tail #</b></label>
534 </div> 534 </div>
535 <div class="pull-left" style="width: calc(100% - 110px);"> 535 <div class="pull-left" style="width: calc(100% - 110px);">
536 <input type="text" ng-model="data.tail" class="form-control" placeholder=""> 536 <input type="text" ng-model="data.tail" class="form-control" placeholder="">
537 </div> 537 </div>
538 <div class="clearfix"></div> 538 <div class="clearfix"></div>
539 </div> 539 </div>
540 </div> 540 </div>
541 <div class="clearfix"></div><br> 541 <div class="clearfix"></div><br>
542 542
543 <div class="col-xs-12"> 543 <div class="col-xs-12">
544 544
545 <div class="col-md-6"> 545 <div class="col-md-6">
546 <div class="pull-left" style="width: 110px;"> 546 <div class="pull-left" style="width: 110px;">
547 <label class="new-input-label"><b>Company</b></label> 547 <label class="new-input-label"><b>Company</b></label>
548 </div> 548 </div>
549 <div class="pull-left" style="width: calc(100% - 110px);"> 549 <div class="pull-left" style="width: calc(100% - 110px);">
550 <select ui-select2 ng-model="data.company" style="width: 100%;"> 550 <select ui-select2 ng-model="data.company" style="width: 100%;">
551 <option value="" selected disabled>Select Company</option> 551 <option value="" selected disabled>Select Company</option>
552 <option ng-repeat="list in companyList">{{list.companyName}}</option> 552 <option ng-repeat="list in companyList">{{list.companyName}}</option>
553 </select> 553 </select>
554 </div> 554 </div>
555 <div class="clearfix"></div> 555 <div class="clearfix"></div>
556 </div> 556 </div>
557 <div class="col-md-6"> 557 <div class="col-md-6">
558 <div class="pull-left" style="width: 110px;"> 558 <div class="pull-left" style="width: 110px;">
559 <label class="new-input-label"><b>Source</b></label> 559 <label class="new-input-label"><b>Source</b></label>
560 </div> 560 </div>
561 <div class="pull-left" style="width: calc(100% - 110px);"> 561 <div class="pull-left" style="width: calc(100% - 110px);">
562 <select ui-select2 ng-model="data.source" style="width: 100%;"> 562 <select ui-select2 ng-model="data.source" style="width: 100%;">
563 <option value="" selected disabled>Select Source</option> 563 <option value="" selected disabled>Select Source</option>
564 <option ng-repeat="list in sourceList">{{list.source}}</option> 564 <option ng-repeat="list in sourceList">{{list.source}}</option>
565 </select> 565 </select>
566 </div> 566 </div>
567 <div class="clearfix"></div> 567 <div class="clearfix"></div>
568 </div> 568 </div>
569 </div> 569 </div>
570 <div class="clearfix"></div> 570 <div class="clearfix"></div>
571 <br/> 571 <br/>
572 572
573 573
574 <div class="col-xs-12"> 574 <div class="col-xs-12">
575 575
576 <div class="col-md-6"> 576 <div class="col-md-6">
577 <div class="pull-left" style="width: 110px;"> 577 <div class="pull-left" style="width: 110px;">
578 <label class="new-input-label"><b>Volume</b></label> 578 <label class="new-input-label"><b>Volume</b></label>
579 </div> 579 </div>
580 <div class="pull-left" style="width: calc(100% - 110px);"> 580 <div class="pull-left" style="width: calc(100% - 110px);">
581 <input type="text" ng-model="data.volume" class="form-control" placeholder=""> 581 <input type="text" ng-model="data.volume" class="form-control" placeholder="">
582 </div> 582 </div>
583 <div class="clearfix"></div> 583 <div class="clearfix"></div>
584 </div> 584 </div>
585 <div class="col-md-6"> 585 <div class="col-md-6">
586 <div class="pull-left" style="width: 110px;"> 586 <div class="pull-left" style="width: 110px;">
587 <label class="new-input-label"><b>Invoiced</b></label> 587 <label class="new-input-label"><b>Invoiced</b></label>
588 </div> 588 </div>
589 <div class="pull-left" style="width: calc(100% - 110px);"> 589 <div class="pull-left" style="width: calc(100% - 110px);">
590 <input type="text" ng-model="data.invoiced" class="form-control" placeholder=""> 590 <input type="text" ng-model="data.invoiced" class="form-control" placeholder="">
591 </div> 591 </div>
592 <div class="clearfix"></div> 592 <div class="clearfix"></div>
593 </div> 593 </div>
594 </div> 594 </div>
595 <div class="clearfix"></div> 595 <div class="clearfix"></div>
596 <br/> 596 <br/>
597 <div class="col-xs-12"> 597 <div class="col-xs-12">
598 598
599 <div class="col-md-6"> 599 <div class="col-md-6">
600 <div class="pull-left" style="width: 110px;"> 600 <div class="pull-left" style="width: 110px;">
601 <label class="new-input-label"><b>Total</b></label> 601 <label class="new-input-label"><b>Total</b></label>
602 </div> 602 </div>
603 <div class="pull-left" style="width: calc(100% - 110px);"> 603 <div class="pull-left" style="width: calc(100% - 110px);">
604 <input type="text" class="form-control" placeholder="0.0" value="{{data.volume * data.invoiced}}"> 604 <input type="text" class="form-control" placeholder="0.0" value="{{data.volume * data.invoiced}}">
605 605
606 </div> 606 </div>
607 <div class="clearfix"></div> 607 <div class="clearfix"></div>
608 </div> 608 </div>
609 <div class="col-md-6"> 609 <div class="col-md-6">
610 <div class="pull-left" style="width: 110px;"> 610 <div class="pull-left" style="width: 110px;">
611 <label class="new-input-label"><b>FBO Cost</b></label> 611 <label class="new-input-label"><b>FBO Cost</b></label>
612 </div> 612 </div>
613 <div class="pull-left" style="width: calc(100% - 110px);"> 613 <div class="pull-left" style="width: calc(100% - 110px);">
614 <input type="text" ng-model="data.fbo" class="form-control" placeholder=""> 614 <input type="text" ng-model="data.fbo" class="form-control" placeholder="">
615 </div> 615 </div>
616 <div class="clearfix"></div> 616 <div class="clearfix"></div>
617 </div> 617 </div>
618 </div> 618 </div>
619 <div class="clearfix"></div> 619 <div class="clearfix"></div>
620 <br/> 620 <br/>
621 <div class="col-xs-12"> 621 <div class="col-xs-12">
622 622
623 623
624 <div class="col-md-6"> 624 <div class="col-md-6">
625 <div class="pull-left" style="width: 110px;"> 625 <div class="pull-left" style="width: 110px;">
626 <label class="new-input-label"><b>Status</b></label> 626 <label class="new-input-label"><b>Status</b></label>
627 </div> 627 </div>
628 <div class="pull-left" style="width: calc(100% - 110px);"> 628 <div class="pull-left" style="width: calc(100% - 110px);">
629 <select ui-select2 ng-model="data.status" style="width: 100%;"> 629 <select ui-select2 ng-model="data.status" style="width: 100%;">
630 <option value="" selected disabled>Select Status</option> 630 <option value="" selected disabled>Select Status</option>
631 <option>Pending</option> 631 <option>Pending</option>
632 <option>Invoiced</option> 632 <option>Invoiced</option>
633 <option>Paid</option> 633 <option>Paid</option>
634 <option>Cancelled</option> 634 <option>Cancelled</option>
635 <option>Archived</option> 635 <option>Archived</option>
636 </select> 636 </select>
637 </div> 637 </div>
638 <div class="clearfix"></div> 638 <div class="clearfix"></div>
639 </div> 639 </div>
640 </div> 640 </div>
641 <div class="clearfix"></div> 641 <div class="clearfix"></div>
642 <br/> 642 <br/>
643 <div class="col-xs-12"> 643 <div class="col-xs-12">
644 644
645 645
646 </div> 646 </div>
647 <div class="clearfix"></div> 647 <div class="clearfix"></div>
648 <br/> 648 <br/>
649 <div class="col-xs-12"> 649 <div class="col-xs-12">
650 650
651 </div> 651 </div>
652 <div class="clearfix"></div> 652 <div class="clearfix"></div>
653 653
654 </div> 654 </div>
655 </div> 655 </div>
656 <div class="clearfix"></div> 656 <div class="clearfix"></div>
657 </div> 657 </div>
658 </div> 658 </div>
659 </div> 659 </div>
660 </div> 660 </div>
661 661
662 <div class="modal-footer" style="border-top: 0;"> 662 <div class="modal-footer" style="border-top: 0;">
663 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button> 663 <button type="button" class="btn btn-default" ng-click="cancelData()" data-dismiss="modal">Cancel</button>
664 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addData">Save</button> 664 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addData">Save</button>
665 </div> 665 </div>
666 </div> 666 </div>
667 </div> 667 </div>
668 </div> 668 </div>
669 </form> 669 </form>
670 670
671 671
672 <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm"> 672 <form class="modal multi-step" id="demo-modal-5" name="fuelOrderUpdateForm">
673 <div class="modal-dialog modal-lg"> 673 <div class="modal-dialog modal-lg">
674 <div class="modal-content"> 674 <div class="modal-content">
675 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 675 <div class="modal-body step-1" data-step="1" style="padding: 0;">
676 <div> 676 <div>
677 <div class="row" style="margin: 0;"> 677 <div class="row" style="margin: 0;">
678 <div> 678 <div>
679 <div class="widget" style="margin-bottom: 0;"> 679 <div class="widget" style="margin-bottom: 0;">
680 <div class="widget-header"> 680 <div class="widget-header">
681 <i class="icon-pencil"></i> 681 <i class="icon-pencil"></i>
682 <i class="fa fa-tasks" aria-hidden="true"></i> 682 <i class="fa fa-tasks" aria-hidden="true"></i>
683 <h3>Update Fuel Order</h3> 683 <h3>Update Fuel Order</h3>
684 <div class="clearfix"></div> 684 <div class="clearfix"></div>
685 </div> 685 </div>
686 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 686 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
687 <div class="col-xs-12"> 687 <div class="col-xs-12">
688 <div class="col-xs-12"> 688 <div class="col-xs-12">
689 689
690 <div class="col-md-6"> 690 <div class="col-md-6">
691 <div class="pull-left" style="width: 110px;"> 691 <div class="pull-left" style="width: 110px;">
692 <label class="new-input-label"><b>Fueling Date</b></label> 692 <label class="new-input-label"><b>Fueling Date</b></label>
693 </div> 693 </div>
694 <div class="pull-left" style="width: calc(100% - 110px);"> 694 <div class="pull-left" style="width: calc(100% - 110px);">
695 <input type="date" ng-model="editdata.departingDate" class="form-control" placeholder=""> 695 <input type="date" ng-model="editdata.departingDate" class="form-control" placeholder="">
696 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> 696 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>-->
697 </div> 697 </div>
698 <div class="clearfix"></div> 698 <div class="clearfix"></div>
699 </div> 699 </div>
700 <div class="col-md-6"> 700 <div class="col-md-6">
701 <div class="pull-left" style="width: 110px;"> 701 <div class="pull-left" style="width: 110px;">
702 <label class="new-input-label"><b>Tail #</b></label> 702 <label class="new-input-label"><b>Tail #</b></label>
703 </div> 703 </div>
704 <div class="pull-left" style="width: calc(100% - 110px);"> 704 <div class="pull-left" style="width: calc(100% - 110px);">
705 <input type="text" ng-model="editdata.aircraftName" class="form-control" placeholder=""> 705 <input type="text" ng-model="editdata.aircraftName" class="form-control" placeholder="">
706 </div> 706 </div>
707 <div class="clearfix"></div> 707 <div class="clearfix"></div>
708 </div> 708 </div>
709 </div> 709 </div>
710 <div class="clearfix"></div><br> 710 <div class="clearfix"></div><br>
711 711
712 <div class="col-xs-12"> 712 <div class="col-xs-12">
713 713
714 <div class="col-md-6"> 714 <div class="col-md-6">
715 <div class="pull-left" style="width: 110px;"> 715 <div class="pull-left" style="width: 110px;">
716 <label class="new-input-label"><b>Company</b></label> 716 <label class="new-input-label"><b>Company</b></label>
717 </div> 717 </div>
718 <div class="pull-left" style="width: calc(100% - 110px);"> 718 <div class="pull-left" style="width: calc(100% - 110px);">
719 <select ui-select2 ng-model="editdata.companyName" style="width: 100%;"> 719 <select ui-select2 ng-model="editdata.companyName" style="width: 100%;">
720 <option value="" selected disabled>Select Company</option> 720 <option value="" selected disabled>Select Company</option>
721 <option ng-repeat="list in companyList">{{list.companyName}}</option> 721 <option ng-repeat="list in companyList">{{list.companyName}}</option>
722 </select> 722 </select>
723 </div> 723 </div>
724 <div class="clearfix"></div> 724 <div class="clearfix"></div>
725 </div> 725 </div>
726 <div class="col-md-6"> 726 <div class="col-md-6">
727 <div class="pull-left" style="width: 110px;"> 727 <div class="pull-left" style="width: 110px;">
728 <label class="new-input-label"><b>Source</b></label> 728 <label class="new-input-label"><b>Source</b></label>
729 </div> 729 </div>
730 <div class="pull-left" style="width: calc(100% - 110px);"> 730 <div class="pull-left" style="width: calc(100% - 110px);">
731 <select ui-select2 ng-model="editdata.source" style="width: 100%;"> 731 <select ui-select2 ng-model="editdata.source" style="width: 100%;">
732 <option value="" selected disabled>Select Source</option> 732 <option value="" selected disabled>Select Source</option>
733 <option ng-repeat="list in sourceList">{{list.source}}</option> 733 <option ng-repeat="list in sourceList">{{list.source}}</option>
734 </select> 734 </select>
735 </div> 735 </div>
736 <div class="clearfix"></div> 736 <div class="clearfix"></div>
737 </div> 737 </div>
738 </div> 738 </div>
739 <div class="clearfix"></div> 739 <div class="clearfix"></div>
740 <br/> 740 <br/>
741 741
742 742
743 <div class="col-xs-12"> 743 <div class="col-xs-12">
744 744
745 <div class="col-md-6"> 745 <div class="col-md-6">
746 <div class="pull-left" style="width: 110px;"> 746 <div class="pull-left" style="width: 110px;">
747 <label class="new-input-label"><b>Volume</b></label> 747 <label class="new-input-label"><b>Volume</b></label>
748 </div> 748 </div>
749 <div class="pull-left" style="width: calc(100% - 110px);"> 749 <div class="pull-left" style="width: calc(100% - 110px);">
750 <input type="text" ng-model="editdata.requestedVolume" class="form-control" placeholder=""> 750 <input type="text" ng-model="editdata.requestedVolume" class="form-control" placeholder="">
751 </div> 751 </div>
752 <div class="clearfix"></div> 752 <div class="clearfix"></div>
753 </div> 753 </div>
754 <div class="col-md-6"> 754 <div class="col-md-6">
755 <div class="pull-left" style="width: 110px;"> 755 <div class="pull-left" style="width: 110px;">
756 <label class="new-input-label"><b>Invoiced</b></label> 756 <label class="new-input-label"><b>Invoiced</b></label>
757 </div> 757 </div>
758 <div class="pull-left" style="width: calc(100% - 110px);"> 758 <div class="pull-left" style="width: calc(100% - 110px);">
759 <input type="text" ng-model="editdata.invoiced" class="form-control" placeholder=""> 759 <input type="text" ng-model="editdata.invoiced" class="form-control" placeholder="">
760 </div> 760 </div>
761 <div class="clearfix"></div> 761 <div class="clearfix"></div>
762 </div> 762 </div>
763 </div> 763 </div>
764 <div class="clearfix"></div> 764 <div class="clearfix"></div>
765 <br/> 765 <br/>
766 <div class="col-xs-12"> 766 <div class="col-xs-12">
767 767
768 <div class="col-md-6"> 768 <div class="col-md-6">
769 <div class="pull-left" style="width: 110px;"> 769 <div class="pull-left" style="width: 110px;">
770 <label class="new-input-label"><b>Total</b></label> 770 <label class="new-input-label"><b>Total</b></label>
771 </div> 771 </div>
772 <div class="pull-left" style="width: calc(100% - 110px);"> 772 <div class="pull-left" style="width: calc(100% - 110px);">
773 <input type="text" class="form-control" placeholder="0.0" value="{{editdata.requestedVolume * editdata.invoiced}}"> 773 <input type="text" class="form-control" placeholder="0.0" value="{{editdata.requestedVolume * editdata.invoiced}}">
774 774
775 </div> 775 </div>
776 <div class="clearfix"></div> 776 <div class="clearfix"></div>
777 </div> 777 </div>
778 <div class="col-md-6"> 778 <div class="col-md-6">
779 <div class="pull-left" style="width: 110px;"> 779 <div class="pull-left" style="width: 110px;">
780 <label class="new-input-label"><b>FBO Cost</b></label> 780 <label class="new-input-label"><b>FBO Cost</b></label>
781 </div> 781 </div>
782 <div class="pull-left" style="width: calc(100% - 110px);"> 782 <div class="pull-left" style="width: calc(100% - 110px);">
783 <input type="text" ng-model="editdata.fboCost" class="form-control" placeholder=""> 783 <input type="text" ng-model="editdata.fboCost" class="form-control" placeholder="">
784 </div> 784 </div>
785 <div class="clearfix"></div> 785 <div class="clearfix"></div>
786 </div> 786 </div>
787 </div> 787 </div>
788 <div class="clearfix"></div> 788 <div class="clearfix"></div>
789 <br/> 789 <br/>
790 <div class="col-xs-12"> 790 <div class="col-xs-12">
791 791
792 792
793 <div class="col-md-6"> 793 <div class="col-md-6">
794 <div class="pull-left" style="width: 110px;"> 794 <div class="pull-left" style="width: 110px;">
795 <label class="new-input-label"><b>Status</b></label> 795 <label class="new-input-label"><b>Status</b></label>
796 </div> 796 </div>
797 <div class="pull-left" style="width: calc(100% - 110px);"> 797 <div class="pull-left" style="width: calc(100% - 110px);">
798 <select ui-select2 ng-model="editdata.status" style="width: 100%;"> 798 <select ui-select2 ng-model="editdata.status" style="width: 100%;">
799 <option value="" selected disabled>Select Status</option> 799 <option value="" selected disabled>Select Status</option>
800 <option>Pending</option> 800 <option>Pending</option>
801 <option>Invoiced</option> 801 <option>Invoiced</option>
802 <option>Paid</option> 802 <option>Paid</option>
803 <option>Cancelled</option> 803 <option>Cancelled</option>
804 <option>Archived</option> 804 <option>Archived</option>
805 </select> 805 </select>
806 </div> 806 </div>
807 <div class="clearfix"></div> 807 <div class="clearfix"></div>
808 </div> 808 </div>
809 </div> 809 </div>
810 <div class="clearfix"></div> 810 <div class="clearfix"></div>
811 <br/> 811 <br/>
812 <div class="col-xs-12"> 812 <div class="col-xs-12">
813 813
814 814
815 </div> 815 </div>
816 <div class="clearfix"></div> 816 <div class="clearfix"></div>
817 <br/> 817 <br/>
818 <div class="col-xs-12"> 818 <div class="col-xs-12">
819 819
820 </div> 820 </div>
821 <div class="clearfix"></div> 821 <div class="clearfix"></div>
822 822
823 </div> 823 </div>
824 </div> 824 </div>
825 <div class="clearfix"></div> 825 <div class="clearfix"></div>
826 </div> 826 </div>
827 </div> 827 </div>
828 </div> 828 </div>
829 </div> 829 </div>
830 830
831 <div class="modal-footer" style="border-top: 0;"> 831 <div class="modal-footer" style="border-top: 0;">
832 <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button> 832 <button type="button" class="btn btn-default" ng-click="canceleditdata()" data-dismiss="modal">Cancel</button>
833 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData">Save</button> 833 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="updateData">Save</button>
834 </div> 834 </div>
835 </div> 835 </div>
836 </div> 836 </div>
837 </div> 837 </div>
838 </form> 838 </form>
839 839
840 <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm"> 840 <form class="modal multi-step" id="demo-modal-6" name="uploadAttachmentForm">
841 <div class="modal-dialog modal-xs"> 841 <div class="modal-dialog modal-xs">
842 <div class="modal-content"> 842 <div class="modal-content">
843 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 843 <div class="modal-body step-1" data-step="1" style="padding: 0;">
844 <div> 844 <div>
845 <div class="row" style="margin: 0;"> 845 <div class="row" style="margin: 0;">
846 <div> 846 <div>
847 <div class="widget" style="margin-bottom: 0;"> 847 <div class="widget" style="margin-bottom: 0;">
848 <div class="widget-header"> 848 <div class="widget-header">
849 <i class="icon-pencil"></i> 849 <i class="icon-pencil"></i>
850 <i class="fa fa-tasks" aria-hidden="true"></i> 850 <i class="fa fa-tasks" aria-hidden="true"></i>
851 <h3>Upload Attachment</h3> 851 <h3>Upload Attachment</h3>
852 <div class="clearfix"></div> 852 <div class="clearfix"></div>
853 </div> 853 </div>
854 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 854 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
855 <div class="col-xs-6"> 855 <div class="col-xs-6">
856 <div class="col-xs-6"> 856 <div class="col-xs-6">
857 857
858 <div class="col-md-6"> 858 <div class="col-md-6">
859 <div class="pull-left" style="width: 110px;"> 859 <div class="pull-left" style="width: 110px;">
860 <label class="new-input-label"><b>Upload</b></label> 860 <label class="new-input-label"><b>Upload</b></label>
861 </div> 861 </div>
862 <div class="pull-left" style="width: calc(100% - 110px);"> 862 <div class="pull-left" style="width: calc(100% - 110px);">
863 <input type="file" ng-model="uploadFile.attachment"> 863 <input type="file" ng-model="uploadFile.attachment">
864 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>--> 864 <!--<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>-->
865 </div> 865 </div>
866 <div class="clearfix"></div> 866 <div class="clearfix"></div>
867 </div> 867 </div>
868 </div> 868 </div>
869 <div class="clearfix"></div><br> 869 <div class="clearfix"></div><br>
870 870
871 </div> 871 </div>
872 </div> 872 </div>
873 <div class="clearfix"></div> 873 <div class="clearfix"></div>
874 </div> 874 </div>
875 </div> 875 </div>
876 </div> 876 </div>
877 </div> 877 </div>
878 878
879 <div class="modal-footer" style="border-top: 0;"> 879 <div class="modal-footer" style="border-top: 0;">
880 <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button> 880 <button type="button" class="btn btn-default" ng-click="cancelUploadAttachment()" data-dismiss="modal">Cancel</button>
881 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button> 881 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveUploadAttachment(uploadFile.attachment)">Upload</button>
882 </div> 882 </div>
883 </div> 883 </div>
884 </div> 884 </div>
885 </div> 885 </div>
886 </form> 886 </form>
887 887
888 <div class="customConfirmPopBackdrop" id="delete1">
889 <div class="customModalInner" style="max-width: 400px;">
890 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
891 <table>
892 <tr>
893 <td>
894 <img src="img/info.png" style="width: 50px;">
895 </td>
896 <td>
897 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to delete the attachment?</p>
898 </td>
899 </tr>
900 </table>
901 </div>
902 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
903 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteAttachment()">Yes</button>
904 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDeleteAttachment()">No</button>
905 </div>
906 </div>
907 </div>
908
888 909
889 910
890 <div class="myLoader" ng-show="showLoader"> 911 <div class="myLoader" ng-show="showLoader">
891 <img src="../img/hourglass.gif" width="50px;"> 912 <img src="../img/hourglass.gif" width="50px;">
892 </div> 913 </div>
893 <script src="js/multi-step-modal.js"></script> 914 <script src="js/multi-step-modal.js"></script>
894 <script> 915 <script>
895 sendEvent = function(sel, step) { 916 sendEvent = function(sel, step) {
896 $(sel).trigger('next.m.' + step); 917 $(sel).trigger('next.m.' + step);
897 } 918 }
898 </script> 919 </script>
899 920
app/partials/fuelOrders/fuelOrders.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('fuelOrdersService', ['$q', '$http', 'BASE_URL', fuelOrdersService]); 4 .service('fuelOrdersService', ['$q', '$http', 'BASE_URL', fuelOrdersService]);
5 5
6 function fuelOrdersService($q, $http, BASE_URL) { 6 function fuelOrdersService($q, $http, BASE_URL) {
7 7
8 this.getAllCompanies = function() { 8 this.getAllCompanies = function() {
9 var deferred = $q.defer(); 9 var deferred = $q.defer();
10 $http({ 10 $http({
11 method : 'GET', 11 method : 'GET',
12 url : BASE_URL.url +'/user/allCompanies', 12 url : BASE_URL.url +'/user/allCompanies',
13 headers : {'Content-Type': 'application/json'}, 13 headers : {'Content-Type': 'application/json'},
14 }) 14 })
15 .then(function (result){ 15 .then(function (result){
16 deferred.resolve(result.data); 16 deferred.resolve(result.data);
17 },function (result){ 17 },function (result){
18 deferred.resolve(result.data); 18 deferred.resolve(result.data);
19 }) 19 })
20 return deferred.promise; 20 return deferred.promise;
21 } 21 }
22 22
23 23
24 this.getOrders = function() { 24 this.getOrders = function() {
25 25
26 var deferred = $q.defer(); 26 var deferred = $q.defer();
27 $http({ 27 $http({
28 method : 'GET', 28 method : 'GET',
29 url : BASE_URL.url +'/user/orders', 29 url : BASE_URL.url +'/user/orders',
30 headers : {'Content-Type': 'application/json'}, 30 headers : {'Content-Type': 'application/json'},
31 }) 31 })
32 .then(function (result){ 32 .then(function (result){
33 deferred.resolve(result.data); 33 deferred.resolve(result.data);
34 },function (result){ 34 },function (result){
35 deferred.resolve(result.data); 35 deferred.resolve(result.data);
36 }) 36 })
37 return deferred.promise; 37 return deferred.promise;
38 } 38 }
39 39
40 40
41 41
42 this.dispathFuelOrder = function(data) { 42 this.dispathFuelOrder = function(data) {
43 var deferred = $q.defer(); 43 var deferred = $q.defer();
44 $http({ 44 $http({
45 method : 'POST', 45 method : 'POST',
46 url : BASE_URL.url +'/fuelOrder', 46 url : BASE_URL.url +'/fuelOrder',
47 headers : {'Content-Type': 'application/json'}, 47 headers : {'Content-Type': 'application/json'},
48 data: data 48 data: data
49 }) 49 })
50 .then(function (result){ 50 .then(function (result){
51 deferred.resolve(result.data); 51 deferred.resolve(result.data);
52 },function (result){ 52 },function (result){
53 deferred.resolve(result.data); 53 deferred.resolve(result.data);
54 }) 54 })
55 return deferred.promise; 55 return deferred.promise;
56 } 56 }
57 57
58 this.uploadAttachment = function (data) { 58 this.uploadAttachment = function (data) {
59 var fd = new FormData(); 59 var fd = new FormData();
60 60
61 angular.forEach(data, function(value, key) { 61 angular.forEach(data, function(value, key) {
62 fd.append(key, value); 62 fd.append(key, value);
63 }) 63 })
64 64
65 var deffered = $q.defer(); 65 var deffered = $q.defer();
66 $http({ 66 $http({
67 method : 'POST', 67 method : 'POST',
68 transformRequest: angular.identity, 68 transformRequest: angular.identity,
69 headers: {'Content-Type': undefined}, 69 headers: {'Content-Type': undefined},
70 url : BASE_URL.url+'/fuelOrder/upload/invoice', 70 url : BASE_URL.url+'/fuelOrder/upload/invoice',
71 data : fd 71 data : fd
72 }) 72 })
73 .success(function (data, status, headers, config) { 73 .success(function (data, status, headers, config) {
74 //console.log(data); 74 //console.log(data);
75 deffered.resolve(status); 75 deffered.resolve(status);
76 }) 76 })
77 .error(function (data, status, headers, config) { 77 .error(function (data, status, headers, config) {
78 //console.log(data); 78 //console.log(data);
79 deffered.reject(status); 79 deffered.reject(status);
80 }); 80 });
81 return deffered.promise; 81 return deffered.promise;
82 } 82 }
83 83
84 this.deleteAttachment = function (data) {
85 var fd = new FormData();
86
87 angular.forEach(data, function(value, key) {
88 fd.append(key, value);
89 })
90
91 var deffered = $q.defer();
92 $http({
93 method : 'POST',
94 transformRequest: angular.identity,
95 headers: {'Content-Type': undefined},
96 url : BE+'/fuelOrder/upload/invoice',
97 data : fd
98 })
99 .success(function (data, status, headers, config) {
100 //console.log(data);
101 deffered.resolve(status);
102 })
103 .error(function (data, status, headers, config) {
104 //console.log(data);
105 deffered.reject(status);
106 });
107 return deffered.promise;
108 }
109
84 110
85 111
86 } 112 }
87 113
88 })(); 114 })();
app/partials/login/login.controller.js
1 1
2 (function() { 2 (function() {
3 'use strict' 3 'use strict'
4 4
5 angular.module('acufuel') 5 angular.module('acufuel')
6 .controller('LoginController', [ '$scope', '$filter', '$rootScope', '$state', 'LoginService', LoginController]); 6 .controller('LoginController', [ '$scope', '$filter', '$rootScope', '$state', 'LoginService', LoginController]);
7 7
8 function LoginController($scope, $filter, $rootScope, $state, LoginService) { 8 function LoginController($scope, $filter, $rootScope, $state, LoginService) {
9 $scope.data = {}; 9 $scope.data = {};
10 $scope.submitLogin = function() { 10 $scope.submitLogin = function() {
11 var loginData = "username=" + $scope.data.username + "&password=" + $scope.data.password; 11 var loginData = "username=" + $scope.data.username + "&password=" + $scope.data.password;
12 LoginService.loginUser(loginData).then(function(result) { 12 LoginService.loginUser(loginData).then(function(result) {
13 LoginService.authenticate(); 13 LoginService.authenticate();
14 console.log("result is " ,result)
14 //LoginService.setAuth(true); 15 //LoginService.setAuth(true);
15 16
16 }) 17 })
17 //$state.go('app.dashboard'); 18 //$state.go('app.dashboard');
18 } 19 }
19 } 20 }
20 })(); 21 })();
21 22
22 23
app/partials/login/login.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('LoginService', ['$rootScope', '$q', '$http', '$state', 'BASE_URL', 'AUTH_EVENTS', 'USER_ROLES', LoginService]); 4 .service('LoginService', ['$rootScope', '$q', '$http', '$state', 'BASE_URL', 'AUTH_EVENTS', 'USER_ROLES', LoginService]);
5 5
6 function LoginService($rootScope, $q, $http, $state, BASE_URL, AUTH_EVENTS, USER_ROLES) { 6 function LoginService($rootScope, $q, $http, $state, BASE_URL, AUTH_EVENTS, USER_ROLES) {
7 var authService = {}, 7 var authService = {},
8 username = '', 8 username = '',
9 role = '', 9 role = '',
10 isAuthenticated = false; 10 isAuthenticated = false;
11 11
12 var currentUserDetail = JSON.parse(window.localStorage.getItem("currentUser")); 12 var currentUserDetail = JSON.parse(window.localStorage.getItem("currentUser"));
13 // console.log(currentUserDetail) 13 // console.log(currentUserDetail)
14 if (currentUserDetail) { 14 if (currentUserDetail) {
15 //console.log('aaya') 15 //console.log('aaya')
16 if(currentUserDetail.type == 'ADMIN' || currentUserDetail.type == 'FBO'){ 16 if(currentUserDetail.type == 'ADMIN' || currentUserDetail.type == 'FBO'){
17 $rootScope.isAuthenticated = true; 17 $rootScope.isAuthenticated = true;
18 role = USER_ROLES.admin; 18 role = USER_ROLES.admin;
19 }else if(currentUserDetail.type == 'FLIGHT_DEPT'){ 19 }else if(currentUserDetail.type == 'FLIGHT_DEPT'){
20 $rootScope.isAuthenticated = false; 20 $rootScope.isAuthenticated = false;
21 role = USER_ROLES.user; 21 role = USER_ROLES.user;
22 } 22 }
23 } 23 }
24 24
25 authService.loginUser = function(data) { 25 authService.loginUser = function(data) {
26 26
27 var deferred = $q.defer(); 27 var deferred = $q.defer();
28 $http({ 28 $http({
29 method : 'POST', 29 method : 'POST',
30 url : BASE_URL.url +'/login', 30 url : BASE_URL.url +'/login',
31 headers : {'Content-Type': 'application/x-www-form-urlencoded'}, 31 headers : {'Content-Type': 'application/x-www-form-urlencoded'},
32 data : data 32 data : data
33 }) 33 })
34 .then(function (result){ 34 .then(function (result){
35 deferred.resolve(result.data); 35 deferred.resolve(result.data);
36 },function (result){ 36 },function (result){
37 //console.log(result.data) 37 //console.log(result.data)
38 deferred.resolve(result.data); 38 deferred.resolve(result.data);
39 }) 39 })
40 return deferred.promise; 40 return deferred.promise;
41 } 41 }
42 42
43 authService.authenticate = function() { 43 authService.authenticate = function() {
44 var deferred = $q.defer(); 44 var deferred = $q.defer();
45 $http({ 45 $http({
46 method : 'GET', 46 method : 'GET',
47 url : BASE_URL.url+'/user/authenticate', 47 url : BASE_URL.url+'/user/authenticate',
48 headers : {'Content-Type': 'application/x-www-form-urlencoded'} 48 headers : {'Content-Type': 'application/x-www-form-urlencoded'}
49 }).then(function (result){ 49 }).then(function (result){
50 if(result.data.userProfile.userType.type == 'ADMIN' || result.data.userProfile.userType.type == 'FBO' || result.data.userProfile.userType.type == 'FLIGHT_DEPT'){ 50 if(result.data.userProfile.userType.type == 'ADMIN' || result.data.userProfile.userType.type == 'FBO'){
51 authService.setUser(result.data); 51 authService.setUser(result.data);
52 $state.go('app.dashboard') 52 $state.go('app.dashboard')
53 }else if(result.data.userProfile.userType.type == 'FLIGHT_DEPT'){
54 authService.setUser(result.data);
55 $state.go('app.flightDepDashboard')
53 }else{ 56 }else{
54 localStorage.clear(); 57 localStorage.clear();
55 toastr.info("Please check username and password"); 58 toastr.info("Please check username and password");
56 } 59 }
57 deferred.resolve(result.data); 60 deferred.resolve(result.data);
58 },function (result){ 61 },function (result){
59 deferred.resolve(result.data); 62 deferred.resolve(result.data);
60 }); 63 });
61 return deferred.promise; 64 return deferred.promise;
62 } 65 }
63 66
64 authService.setAuth = function(data) { 67 authService.setAuth = function(data) {
65 localStorage.setItem('loginStatus', data); 68 localStorage.setItem('loginStatus', data);
66 } 69 }
67 70
68 authService.logout = function(data) { 71 authService.logout = function(data) {
69 72
70 localStorage.clear(); 73 localStorage.clear();
71 $rootScope.isAuthenticated = false; 74 $rootScope.isAuthenticated = false;
72 $rootScope.$broadcast(AUTH_EVENTS.updateUser); 75 $rootScope.$broadcast(AUTH_EVENTS.updateUser);
73 76
74 var deferred = $q.defer(); 77 var deferred = $q.defer();
75 $http({ 78 $http({
76 method : 'POST', 79 method : 'POST',
77 url : BASE_URL.url +'/user/logout', 80 url : BASE_URL.url +'/user/logout',
78 headers : {'Content-Type': 'application/json'}, 81 headers : {'Content-Type': 'application/json'},
79 data : data 82 data : data
80 }) 83 })
81 .success(function(result) { 84 .success(function(result) {
82 deferred.resolve(result.data); 85 deferred.resolve(result.data);
83 }) 86 })
84 return deferred.promise; 87 return deferred.promise;
85 } 88 }
86 89
87 90
88 91
89 authService.getUser = function () { 92 authService.getUser = function () {
90 return JSON.parse(window.localStorage.getItem("currentUser")); 93 return JSON.parse(window.localStorage.getItem("currentUser"));
91 } 94 }
92 95
93 authService.setUser = function (authData) { 96 authService.setUser = function (authData) {
94 console.log('authdata', authData); 97 console.log('authdata', authData);
95 window.localStorage.setItem("currentUser", JSON.stringify(authData.userProfile.userType)); 98 window.localStorage.setItem("currentUser", JSON.stringify(authData.userProfile.userType));
96 window.localStorage.setItem("userProfileId", JSON.stringify(authData.userProfile.id)); 99 window.localStorage.setItem("userProfileId", JSON.stringify(authData.userProfile.id));
97 window.localStorage.setItem('currentUserName', JSON.stringify(authData.userProfile.firstName +' '+ authData.userProfile.lastName)); 100 window.localStorage.setItem('currentUserName', JSON.stringify(authData.userProfile.firstName +' '+ authData.userProfile.lastName));
98 if(authData.userProfile.userType.type == 'ADMIN' || authData.userProfile.userType.type == 'FBO'){ 101 if(authData.userProfile.userType.type == 'ADMIN' || authData.userProfile.userType.type == 'FBO'){
99 role = USER_ROLES.admin; 102 role = USER_ROLES.admin;
100 $rootScope.isAuthenticated = true; 103 $rootScope.isAuthenticated = true;
101 }else if(authData.userProfile.userType.type == 'FLIGHT_DEPT'){ 104 }else if(authData.userProfile.userType.type == 'FLIGHT_DEPT'){
102 role = USER_ROLES.user; 105 role = USER_ROLES.user;
103 $rootScope.isAuthenticated = false; 106 $rootScope.isAuthenticated = false;
104 } 107 }
105 } 108 }
106 109
107 authService.isAuthenticated = function () { 110 authService.isAuthenticated = function () {
108 return isAuthenticated; 111 return isAuthenticated;
109 } 112 }
110 113
111 authService.role = function () { 114 authService.role = function () {
112 return role; 115 return role;
113 } 116 }
114 117
115 authService.isAuthorized = function (authorizedRoles) { 118 authService.isAuthorized = function (authorizedRoles) {
116 if (!angular.isArray(authorizedRoles)) { 119 if (!angular.isArray(authorizedRoles)) {
117 authorizedRoles = [authorizedRoles]; 120 authorizedRoles = [authorizedRoles];
118 } 121 }
119 return (authService.isAuthenticated() && authorizedRoles.indexOf(role) !== -1); 122 return (authService.isAuthenticated() && authorizedRoles.indexOf(role) !== -1);
120 } 123 }
121 124
122 return authService; 125 return authService;
123 } 126 }
124 127
125 })(); 128 })();