Commit 3e51f9b1d43bb7b1259d91a21082d42eda853290
Exists in
master
Merge branch 'master' of http://git.viithiisys.com/viithiisys/acufuel
Showing
7 changed files
Show diff stats
app/index.html
1 | <html ng-app="acufuel"> | 1 | <html ng-app="acufuel"> |
2 | <head lang="en"> | 2 | <head lang="en"> |
3 | <meta charset="utf-8"> | 3 | <meta charset="utf-8"> |
4 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 4 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
5 | <meta name="description" content=""> | 5 | <meta name="description" content=""> |
6 | <meta name="author" content=""> | 6 | <meta name="author" content=""> |
7 | <title>Acefuel</title> | 7 | <title>Acefuel</title> |
8 | <!-- styles --> | 8 | <!-- styles --> |
9 | <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/> | 9 | <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/> |
10 | <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> | 10 | <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> |
11 | <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/> | 11 | <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/> |
12 | <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" /> | 12 | <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" /> |
13 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/> | 13 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/> |
14 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> | 14 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> |
15 | <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/> | 15 | <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/> |
16 | <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/> | 16 | <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/> |
17 | <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet"> | 17 | <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet"> |
18 | <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"> | 18 | <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"> |
19 | <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css" | 19 | <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css" |
20 | rel="stylesheet"> | 20 | rel="stylesheet"> |
21 | 21 | ||
22 | 22 | ||
23 | <link rel="stylesheet" href="css/main.css"/> | 23 | <link rel="stylesheet" href="css/main.css"/> |
24 | <link rel="stylesheet" href="css/base-admin-3.css"/> | 24 | <link rel="stylesheet" href="css/base-admin-3.css"/> |
25 | <link rel="stylesheet" href="css/base-admin-3-responsive.css"/> | 25 | <link rel="stylesheet" href="css/base-admin-3-responsive.css"/> |
26 | <link rel="stylesheet" href="css/custom.css"/> | 26 | <link rel="stylesheet" href="css/custom.css"/> |
27 | 27 | ||
28 | <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> | 28 | <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> |
29 | <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> | 29 | <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> |
30 | <link href="js/plugins/cirque/cirque.css" rel="stylesheet"> | 30 | <link href="js/plugins/cirque/cirque.css" rel="stylesheet"> |
31 | 31 | ||
32 | <link href="css/pages/dashboard.css" rel="stylesheet"> | 32 | <link href="css/pages/dashboard.css" rel="stylesheet"> |
33 | <link href="js/plugins/faq/faq.css" rel="stylesheet"> | 33 | <link href="js/plugins/faq/faq.css" rel="stylesheet"> |
34 | <link href="css/pages/plans.css" rel="stylesheet"> | 34 | <link href="css/pages/plans.css" rel="stylesheet"> |
35 | 35 | ||
36 | <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"> | 36 | <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"> |
37 | <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet"> | 37 | <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet"> |
38 | <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"> | 38 | <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"> |
39 | <link href="css/pages/pricing.css" rel="stylesheet"> | 39 | <link href="css/pages/pricing.css" rel="stylesheet"> |
40 | <link href="css/pages/reports.css" rel="stylesheet"> | 40 | <link href="css/pages/reports.css" rel="stylesheet"> |
41 | <link rel="stylesheet" type="text/css" href="css/datepicker3.css"> | 41 | <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css"> |
42 | |||
42 | 43 | ||
43 | 44 | ||
44 | 45 | ||
45 | </head> | 46 | </head> |
46 | <body> | 47 | <body> |
47 | <!-- views --> | 48 | <!-- views --> |
48 | 49 | ||
49 | <!-- scripts --> | 50 | <!-- scripts --> |
50 | <script src="bower_components/jquery/dist/jquery.min.js"></script> | 51 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
51 | <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script> | 52 | <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script> |
53 | <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js"></script> | ||
52 | <!--<script src="js/plugins/flot/jquery.flot.js"></script> | 54 | <!--<script src="js/plugins/flot/jquery.flot.js"></script> |
53 | <script src="js/plugins/flot/jquery.flot.pie.js"></script> | 55 | <script src="js/plugins/flot/jquery.flot.pie.js"></script> |
54 | <script src="js/plugins/flot/jquery.flot.resize.js"></script> | 56 | <script src="js/plugins/flot/jquery.flot.resize.js"></script> |
55 | <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>--> | 57 | <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>--> |
56 | <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script> | 58 | <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script> |
57 | <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script> | 59 | <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script> |
58 | <script src="js/plugins/validate/jquery.validate.js"></script> | 60 | <script src="js/plugins/validate/jquery.validate.js"></script> |
59 | <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script> | 61 | <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script> |
60 | 62 | ||
61 | <script src="bower_components/angular/angular.min.js"></script> | 63 | <script src="bower_components/angular/angular.min.js"></script> |
62 | <script src="bower_components/angular-route/angular-route.js"></script> | 64 | <script src="bower_components/angular-route/angular-route.js"></script> |
63 | <script src="bower_components/angular-cookies/angular-cookies.min.js"></script> | 65 | <script src="bower_components/angular-cookies/angular-cookies.min.js"></script> |
64 | <script src="bower_components/angular-resource/angular-resource.min.js"></script> | 66 | <script src="bower_components/angular-resource/angular-resource.min.js"></script> |
65 | <script src="bower_components/angular-animate/angular-animate.js"></script> | 67 | <script src="bower_components/angular-animate/angular-animate.js"></script> |
66 | <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> | 68 | <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> |
67 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> | 69 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> |
68 | <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script> | 70 | <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script> |
69 | <script src='bower_components/moment/min/moment.min.js'></script> | 71 | <script src='bower_components/moment/min/moment.min.js'></script> |
70 | <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> | 72 | <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> |
71 | <script src='bower_components/toastr/toastr.min.js'></script> | 73 | <script src='bower_components/toastr/toastr.min.js'></script> |
72 | <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script> | 74 | <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script> |
73 | <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> | 75 | <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> |
74 | <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script> | 76 | <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script> |
75 | <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script> | 77 | <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script> |
76 | <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script> | 78 | <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script> |
77 | <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script> | 79 | <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script> |
78 | 80 | ||
79 | 81 | ||
80 | <!-- | 82 | <!-- |
81 | <script src="scripts/inspinia.js"></script> | 83 | <script src="scripts/inspinia.js"></script> |
82 | <script src="plugins/iCheck/icheck.min.js"></script> | 84 | <script src="plugins/iCheck/icheck.min.js"></script> |
83 | --> | 85 | --> |
84 | 86 | ||
85 | <!-- <script src="./js/Application.js"></script> | 87 | <!-- <script src="./js/Application.js"></script> |
86 | <script src="js/charts/area.js"></script> | 88 | <script src="js/charts/area.js"></script> |
87 | <script src="js/charts/donut.js"></script> | 89 | <script src="js/charts/donut.js"></script> |
88 | <script src="js/charts/pie.js"></script> | 90 | <script src="js/charts/pie.js"></script> |
89 | <script src="js/charts/bar.js"></script> | 91 | <script src="js/charts/bar.js"></script> |
90 | <script src="js/demo/validation.js"></script> | 92 | <script src="js/demo/validation.js"></script> |
91 | <script src="js/charts/line.js"></script> --> | 93 | <script src="js/charts/line.js"></script> --> |
92 | <script src="js/demo/faq.js"></script> | 94 | <script src="js/demo/faq.js"></script> |
93 | <script src="js/plugins/faq/faq.js"></script> | 95 | <script src="js/plugins/faq/faq.js"></script> |
94 | <script src="js/demo/gallery.js"></script> | 96 | <script src="js/demo/gallery.js"></script> |
95 | <script src="js/demo/sliders.js"></script> | 97 | <script src="js/demo/sliders.js"></script> |
96 | <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script> | 98 | <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script> |
97 | <script src="js/demo/notifications.js"></script> | 99 | <script src="js/demo/notifications.js"></script> |
98 | <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script> | 100 | <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script> |
99 | <script src="https://code.highcharts.com/maps/highmaps.js"></script> | 101 | <script src="https://code.highcharts.com/maps/highmaps.js"></script> |
100 | <script src="https://code.highcharts.com/maps/modules/data.js"></script> | 102 | <script src="https://code.highcharts.com/maps/modules/data.js"></script> |
101 | <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script> | 103 | <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script> |
102 | <!-- Controllers --> | 104 | <!-- Controllers --> |
103 | <script src="js/app.js"></script> | 105 | <script src="js/app.js"></script> |
104 | <script src="js/app.constant.js"></script> | 106 | <script src="js/app.constant.js"></script> |
105 | <script src="partials/login/login.controller.js"></script> | 107 | <script src="partials/login/login.controller.js"></script> |
106 | <script src="partials/customers/customers.controller.js"></script> | 108 | <script src="partials/customers/customers.controller.js"></script> |
107 | <script src="partials/analytics/analytics.controller.js"></script> | 109 | <script src="partials/analytics/analytics.controller.js"></script> |
108 | <script src="partials/account/account.controller.js"></script> | 110 | <script src="partials/account/account.controller.js"></script> |
109 | <script src="partials/elements/elements.controller.js"></script> | 111 | <script src="partials/elements/elements.controller.js"></script> |
110 | <script src="partials/error/error.controller.js"></script> | 112 | <script src="partials/error/error.controller.js"></script> |
111 | <script src="partials/faq/faq.controller.js"></script> | 113 | <script src="partials/faq/faq.controller.js"></script> |
112 | <script src="partials/forms/forms.controller.js"></script> | 114 | <script src="partials/forms/forms.controller.js"></script> |
113 | <script src="partials/fuelManager/fuelManager.controller.js"></script> | 115 | <script src="partials/fuelManager/fuelManager.controller.js"></script> |
114 | <script src="partials/pricing/pricing.controller.js"></script> | 116 | <script src="partials/pricing/pricing.controller.js"></script> |
115 | <script src="partials/reports/reports.controller.js"></script> | 117 | <script src="partials/reports/reports.controller.js"></script> |
116 | <script src="partials/scheduler/scheduler.controller.js"></script> | 118 | <script src="partials/scheduler/scheduler.controller.js"></script> |
117 | <script src="partials/signup/signup.controller.js"></script> | 119 | <script src="partials/signup/signup.controller.js"></script> |
118 | <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> | 120 | <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> |
119 | <script src="partials/viewCompany/viewCompany.controller.js"></script> | 121 | <script src="partials/viewCompany/viewCompany.controller.js"></script> |
120 | <script src="partials/dashboard/dashboard.controller.js"></script> | 122 | <script src="partials/dashboard/dashboard.controller.js"></script> |
121 | <script src="partials/fuelOrders/fuelOrders.controller.js"></script> | 123 | <script src="partials/fuelOrders/fuelOrders.controller.js"></script> |
122 | <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> | 124 | <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> |
123 | <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> | 125 | <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> |
124 | <script src="partials/Accept/Accept.controller.js"></script> | 126 | <script src="partials/Accept/Accept.controller.js"></script> |
125 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> | 127 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> |
126 | <script src="partials/ContactView/ContactView.controller.js"></script> | 128 | <script src="partials/ContactView/ContactView.controller.js"></script> |
127 | <script src="partials/FuelVendors/FuelVendors.controller.js"></script> | 129 | <script src="partials/FuelVendors/FuelVendors.controller.js"></script> |
128 | <script src="partials/delselected/delselected.controller.js"></script> | 130 | <script src="partials/delselected/delselected.controller.js"></script> |
129 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> | 131 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> |
130 | <script src="partials/viewcontact/viewcontact.controller.js"></script> | 132 | <script src="partials/viewcontact/viewcontact.controller.js"></script> |
131 | <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> | 133 | <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> |
132 | <script src="partials/accountSetting/accountSetting.Controller.js"></script> | 134 | <script src="partials/accountSetting/accountSetting.Controller.js"></script> |
133 | 135 | ||
134 | <script src="partials/main/main.controller.js"></script> | 136 | <script src="partials/main/main.controller.js"></script> |
135 | <div ui-view></div> | 137 | <div ui-view></div> |
136 | <!-- End controllers --> | 138 | <!-- End controllers --> |
137 | 139 | ||
138 | 140 | ||
139 | <!-- services --> | 141 | <!-- services --> |
140 | <script src="partials/login/login.service.js"></script> | 142 | <script src="partials/login/login.service.js"></script> |
141 | <script src="partials/customers/customers.service.js"></script> | 143 | <script src="partials/customers/customers.service.js"></script> |
142 | <script src="partials/analytics/analytics.service.js"></script> | 144 | <script src="partials/analytics/analytics.service.js"></script> |
143 | <script src="partials/account/account.service.js"></script> | 145 | <script src="partials/account/account.service.js"></script> |
144 | <script src="partials/elements/elements.service.js"></script> | 146 | <script src="partials/elements/elements.service.js"></script> |
145 | <script src="partials/error/error.service.js"></script> | 147 | <script src="partials/error/error.service.js"></script> |
146 | <script src="partials/faq/faq.service.js"></script> | 148 | <script src="partials/faq/faq.service.js"></script> |
147 | <script src="partials/forms/forms.service.js"></script> | 149 | <script src="partials/forms/forms.service.js"></script> |
148 | <script src="partials/fuelManager/fuelManager.service.js"></script> | 150 | <script src="partials/fuelManager/fuelManager.service.js"></script> |
149 | <script src="partials/pricing/pricing.service.js"></script> | 151 | <script src="partials/pricing/pricing.service.js"></script> |
150 | <script src="partials/reports/reports.service.js"></script> | 152 | <script src="partials/reports/reports.service.js"></script> |
151 | <script src="partials/scheduler/scheduler.service.js"></script> | 153 | <script src="partials/scheduler/scheduler.service.js"></script> |
152 | <script src="partials/signup/signup.service.js"></script> | 154 | <script src="partials/signup/signup.service.js"></script> |
153 | <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> | 155 | <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> |
154 | <script src="partials/viewCompany/viewCompany.service.js"></script> | 156 | <script src="partials/viewCompany/viewCompany.service.js"></script> |
155 | <script src="partials/dashboard/dashboard.service.js"></script> | 157 | <script src="partials/dashboard/dashboard.service.js"></script> |
156 | <script src="partials/fuelOrders/fuelOrders.service.js"></script> | 158 | <script src="partials/fuelOrders/fuelOrders.service.js"></script> |
157 | <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> | 159 | <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> |
158 | <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> | 160 | <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> |
159 | <script src="partials/Accept/Accept.service.js"></script> | 161 | <script src="partials/Accept/Accept.service.js"></script> |
160 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> | 162 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> |
161 | <script src="partials/ContactView/ContactView.service.js"></script> | 163 | <script src="partials/ContactView/ContactView.service.js"></script> |
162 | <script src="partials/FuelVendors/FuelVendors.service.js"></script> | 164 | <script src="partials/FuelVendors/FuelVendors.service.js"></script> |
163 | <script src="partials/delselected/delselected.service.js"></script> | 165 | <script src="partials/delselected/delselected.service.js"></script> |
164 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> | 166 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> |
165 | <script src="partials/viewcontact/viewcontact.service.js"></script> | 167 | <script src="partials/viewcontact/viewcontact.service.js"></script> |
166 | <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> | 168 | <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> |
167 | <script src="partials/accountSetting/accountSetting.Service.js"></script> | 169 | <script src="partials/accountSetting/accountSetting.Service.js"></script> |
168 | 170 | ||
169 | <script src="partials/main/main.service.js"></script> | 171 | <script src="partials/main/main.service.js"></script> |
170 | </body> | 172 | </body> |
171 | </html> | 173 | </html> |
app/js/app.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | 3 | ||
4 | angular.module('acufuel', ['ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle']) | 4 | angular.module('acufuel', ['ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle']) |
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 | }) | 84 | }) |
85 | 85 | ||
86 | .state("app.accountSetting", { | 86 | .state("app.accountSetting", { |
87 | url: "/accountSetting", | 87 | url: "/accountSetting", |
88 | templateUrl: "partials/accountSetting/accountSetting.html", | 88 | templateUrl: "partials/accountSetting/accountSetting.html", |
89 | controller: "AccountSettingController" | 89 | controller: "AccountSettingController" |
90 | }) | 90 | }) |
91 | 91 | ||
92 | .state("app.ContactView", { | 92 | .state("app.ContactView", { |
93 | url: "/ContactView", | 93 | url: "/ContactView", |
94 | templateUrl: "partials/ContactView/ContactView.html", | 94 | templateUrl: "partials/ContactView/ContactView.html", |
95 | controller: "ContactViewController" | 95 | controller: "ContactViewController" |
96 | }) | 96 | }) |
97 | .state("app.FuelVendors", { | 97 | .state("app.FuelVendors", { |
98 | url: "/FuelVendors", | 98 | url: "/FuelVendors", |
99 | templateUrl: "partials/FuelVendors/FuelVendors.html", | 99 | templateUrl: "partials/FuelVendors/FuelVendors.html", |
100 | controller: "FuelVendorsController" | 100 | controller: "FuelVendorsController" |
101 | }) | 101 | }) |
102 | 102 | ||
103 | .state("app.analytics", { | 103 | .state("app.analytics", { |
104 | url: "/analytics", | 104 | url: "/analytics", |
105 | templateUrl: "partials/analytics/analytics.html", | 105 | templateUrl: "partials/analytics/analytics.html", |
106 | controller: "analyticsController" | 106 | controller: "analyticsController" |
107 | }) | 107 | }) |
108 | 108 | ||
109 | .state("app.account", { | 109 | .state("app.account", { |
110 | url: "/account", | 110 | url: "/account", |
111 | templateUrl: "partials/account/account.html", | 111 | templateUrl: "partials/account/account.html", |
112 | controller: "accountController" | 112 | controller: "accountController" |
113 | }) | 113 | }) |
114 | 114 | ||
115 | .state("app.dashboard", { | 115 | .state("app.dashboard", { |
116 | url: "/dashboard", | 116 | url: "/dashboard", |
117 | templateUrl: "partials/dashboard/dashboard.html", | 117 | templateUrl: "partials/dashboard/dashboard.html", |
118 | controller: "dashboardController" | 118 | controller: "dashboardController" |
119 | }) | 119 | }) |
120 | 120 | ||
121 | .state("app.elements", { | 121 | .state("app.elements", { |
122 | url: "/elements", | 122 | url: "/elements", |
123 | templateUrl: "partials/elements/elements.html", | 123 | templateUrl: "partials/elements/elements.html", |
124 | controller: "elementsController" | 124 | controller: "elementsController" |
125 | }) | 125 | }) |
126 | 126 | ||
127 | .state("app.error", { | 127 | .state("app.error", { |
128 | url: "/error", | 128 | url: "/error", |
129 | templateUrl: "partials/error/error.html", | 129 | templateUrl: "partials/error/error.html", |
130 | controller: "errorController" | 130 | controller: "errorController" |
131 | }) | 131 | }) |
132 | 132 | ||
133 | .state("app.faq", { | 133 | .state("app.faq", { |
134 | url: "/faq", | 134 | url: "/faq", |
135 | templateUrl: "partials/faq/faq.html", | 135 | templateUrl: "partials/faq/faq.html", |
136 | controller: "faqController" | 136 | controller: "faqController" |
137 | }) | 137 | }) |
138 | 138 | ||
139 | .state("app.forms", { | 139 | .state("app.forms", { |
140 | url: "/forms", | 140 | url: "/forms", |
141 | templateUrl: "partials/forms/forms.html", | 141 | templateUrl: "partials/forms/forms.html", |
142 | controller: "formsController" | 142 | controller: "formsController" |
143 | }) | 143 | }) |
144 | 144 | ||
145 | .state("app.fuelManager", { | 145 | .state("app.fuelManager", { |
146 | url: "/fuelManager", | 146 | url: "/fuelManager", |
147 | templateUrl: "partials/fuelManager/fuelManager.html", | 147 | templateUrl: "partials/fuelManager/fuelManager.html", |
148 | controller: "fuelManagerController" | 148 | controller: "fuelManagerController" |
149 | }) | 149 | }) |
150 | 150 | ||
151 | .state("app.pricing", { | 151 | .state("app.pricing", { |
152 | url: "/pricing", | 152 | url: "/pricing", |
153 | templateUrl: "partials/pricing/pricing.html", | 153 | templateUrl: "partials/pricing/pricing.html", |
154 | controller: "pricingController" | 154 | controller: "pricingController" |
155 | }) | 155 | }) |
156 | 156 | ||
157 | .state("app.reports", { | 157 | .state("app.reports", { |
158 | url: "/reports", | 158 | url: "/reports", |
159 | templateUrl: "partials/reports/reports.html", | 159 | templateUrl: "partials/reports/reports.html", |
160 | controller: "reportsController" | 160 | controller: "reportsController" |
161 | }) | 161 | }) |
162 | 162 | ||
163 | .state("app.scheduler", { | 163 | .state("app.scheduler", { |
164 | url: "/scheduler", | 164 | url: "/scheduler", |
165 | templateUrl: "partials/scheduler/scheduler.html", | 165 | templateUrl: "partials/scheduler/scheduler.html", |
166 | controller: "schedulerController" | 166 | controller: "schedulerController" |
167 | }) | 167 | }) |
168 | .state("app.signup", { | 168 | .state("app.signup", { |
169 | url: "/signup", | 169 | url: "/signup", |
170 | templateUrl: "partials/signup/signup.html", | 170 | templateUrl: "partials/signup/signup.html", |
171 | controller: "signupController" | 171 | controller: "signupController" |
172 | }) | 172 | }) |
173 | 173 | ||
174 | .state("app.updateFuelManager", { | 174 | .state("app.updateFuelManager", { |
175 | url: "/updateFuelManager", | 175 | url: "/updateFuelManager", |
176 | templateUrl: "partials/updateFuelManager/updateFuelManager.html", | 176 | templateUrl: "partials/updateFuelManager/updateFuelManager.html", |
177 | controller: "updateFuelManagerController", | 177 | controller: "updateFuelManagerController", |
178 | // data: { | 178 | // data: { |
179 | // authorizedRoles: ["fbo"], | 179 | // authorizedRoles: ["fbo"], |
180 | // } | 180 | // } |
181 | }) | 181 | }) |
182 | 182 | ||
183 | .state("app.viewCompany", { | 183 | .state("app.viewCompany", { |
184 | url: "/viewCompany/:id", | 184 | url: "/viewCompany/:id", |
185 | templateUrl: "partials/viewCompany/viewCompany.html", | 185 | templateUrl: "partials/viewCompany/viewCompany.html", |
186 | controller: "viewCompanyController" | 186 | controller: "viewCompanyController" |
187 | }) | 187 | }) |
188 | 188 | ||
189 | .state("app.viewFuelVendor", { | 189 | .state("app.viewFuelVendor", { |
190 | url: "/viewFuelVendor/:id", | 190 | url: "/viewFuelVendor/:id", |
191 | templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", | 191 | templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", |
192 | controller: "ViewFuelVendorController" | 192 | controller: "ViewFuelVendorController" |
193 | }) | 193 | }) |
194 | 194 | ||
195 | .state("app.fuelOrders", { | 195 | .state("app.fuelOrders", { |
196 | url: "/fuelOrders", | 196 | url: "/fuelOrders", |
197 | templateUrl: "partials/fuelOrders/fuelOrders.html", | 197 | templateUrl: "partials/fuelOrders/fuelOrders.html", |
198 | controller: "fuelOrdersController" | 198 | controller: "fuelOrdersController" |
199 | }) | 199 | }) |
200 | 200 | ||
201 | .state("app.DispatchFuel", { | 201 | .state("app.DispatchFuel", { |
202 | url: "/DispatchFuel", | 202 | url: "/DispatchFuel", |
203 | templateUrl: "partials/DispatchFuel/DispatchFuel.html", | 203 | templateUrl: "partials/DispatchFuel/DispatchFuel.html", |
204 | controller: "DispatchFuelController" | 204 | controller: "DispatchFuelController" |
205 | }) | 205 | }) |
206 | 206 | ||
207 | .state("app.searchDispatchFuel", { | 207 | .state("app.searchDispatchFuel", { |
208 | url: "/searchDispatchFuel", | 208 | url: "/searchDispatchFuel", |
209 | templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html", | 209 | templateUrl: "partials/searchDispatchFuel/searchDispatchFuel.html", |
210 | controller: "searchDispatchFuelController" | 210 | controller: "searchDispatchFuelController" |
211 | }) | 211 | }) |
212 | 212 | ||
213 | .state("app.Accept", { | 213 | .state("app.Accept", { |
214 | url: "/Accept", | 214 | url: "/Accept", |
215 | templateUrl: "partials/Accept/Accept.html", | 215 | templateUrl: "partials/Accept/Accept.html", |
216 | controller: "AcceptController" | 216 | controller: "AcceptController" |
217 | }) | 217 | }) |
218 | 218 | ||
219 | .state("app.delselected", { | 219 | .state("app.delselected", { |
220 | url: "/delselected", | 220 | url: "/delselected", |
221 | templateUrl: "partials/delselected/delselected.html", | 221 | templateUrl: "partials/delselected/delselected.html", |
222 | controller: "delselectedController" | 222 | controller: "delselectedController" |
223 | }) | 223 | }) |
224 | 224 | ||
225 | .state("app.pricingcontact", { | 225 | .state("app.pricingcontact", { |
226 | url: "/pricingcontact", | 226 | url: "/pricingcontact", |
227 | templateUrl: "partials/pricingcontact/pricingcontact.html", | 227 | templateUrl: "partials/pricingcontact/pricingcontact.html", |
228 | controller: "pricingcontactController" | 228 | controller: "pricingcontactController" |
229 | }) | 229 | }) |
230 | 230 | ||
231 | .state("app.viewContact", { | 231 | .state("app.viewContact", { |
232 | url: "/viewContact/:id", | 232 | url: "/viewContact/:id", |
233 | templateUrl: "partials/viewcontact/viewcontact.html", | 233 | templateUrl: "partials/viewcontact/viewcontact.html", |
234 | controller: "viewcontactController" | 234 | controller: "viewcontactController" |
235 | }) | 235 | }) |
236 | } | 236 | } |
237 | ]) | 237 | ]) |
238 | 238 | ||
239 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { | 239 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { |
240 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { | 240 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { |
241 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); | 241 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); |
242 | 242 | ||
243 | LoginService.isAuthorized = function (authorizedRoles) { | 243 | LoginService.isAuthorized = function (authorizedRoles) { |
244 | if (!angular.isArray(authorizedRoles)) { | 244 | if (!angular.isArray(authorizedRoles)) { |
245 | authorizedRoles = [authorizedRoles]; | 245 | authorizedRoles = [authorizedRoles]; |
246 | } | 246 | } |
247 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); | 247 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); |
248 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); | 248 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); |
249 | } | 249 | } |
250 | 250 | ||
251 | if ('data' in next && 'authorizedRoles' in next.data) { | 251 | if ('data' in next && 'authorizedRoles' in next.data) { |
252 | var authorizedRoles = next.data.authorizedRoles; | 252 | var authorizedRoles = next.data.authorizedRoles; |
253 | if (!LoginService.isAuthorized(authorizedRoles)) { | 253 | if (!LoginService.isAuthorized(authorizedRoles)) { |
254 | event.preventDefault(); | 254 | event.preventDefault(); |
255 | if($state.current.name.length == 0) { | 255 | if($state.current.name.length == 0) { |
256 | $state.go('login') | 256 | $state.go('login') |
257 | } else { | 257 | } else { |
258 | $state.go($state.current, {}, {reload: true}); | 258 | $state.go($state.current, {}, {reload: true}); |
259 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); | 259 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); |
260 | } | 260 | } |
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | if (LoginService.isAuthenticated()) { | 264 | if (LoginService.isAuthenticated()) { |
265 | if (next.name == 'login') { | 265 | if (next.name == 'login') { |
266 | event.preventDefault(); | 266 | event.preventDefault(); |
267 | $state.go('app.dashboard'); | 267 | $state.go('app.dashboard'); |
268 | } | 268 | } |
269 | } | 269 | } |
270 | }); | 270 | }); |
271 | }]) | 271 | }]) |
272 | 272 | ||
273 | 273 | ||
274 | .directive("datepicker", function () { | ||
275 | return { | ||
276 | restrict: "A", | ||
277 | require: "ngModel", | ||
278 | link: function (scope, elem, attrs, ngModelCtrl) { | ||
279 | var updateModel = function (dateText) { | ||
280 | scope.$apply(function () { | ||
281 | ngModelCtrl.$setViewValue(dateText); | ||
282 | }); | ||
283 | }; | ||
284 | var options = { | ||
285 | dateFormat: "dd/mm/yy", | ||
286 | onSelect: function (dateText) { | ||
287 | updateModel(dateText); | ||
288 | } | ||
289 | }; | ||
290 | elem.datepicker(options); | ||
291 | } | ||
292 | } | ||
293 | }) | ||
294 | |||
295 | |||
274 | 296 | ||
275 | 297 |
app/partials/fuelManager/fuelManager.controller.js
1 | 1 | ||
2 | 'use strict'; | 2 | 'use strict'; |
3 | 3 | ||
4 | //Load controller | 4 | //Load controller |
5 | angular.module('acufuel') | 5 | angular.module('acufuel') |
6 | 6 | ||
7 | //.controller('fuelManagerController', ['$scope', 'fuelManagerService',function($scope, fuelManagerService) { | 7 | //.controller('fuelManagerController', ['$scope', 'fuelManagerService',function($scope, fuelManagerService) { |
8 | .controller('fuelManagerController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'fuelManagerService', fuelManagerController]); | 8 | .controller('fuelManagerController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'fuelManagerService', fuelManagerController]); |
9 | 9 | ||
10 | function fuelManagerController($scope, $rootScope, $uibModal, $filter, $http, fuelManagerService) { | 10 | function fuelManagerController($scope, $rootScope, $uibModal, $filter, $http, fuelManagerService) { |
11 | 11 | ||
12 | $scope.currentUserData = JSON.parse(localStorage.getItem('userProfileId')); | 12 | $scope.currentUserData = JSON.parse(localStorage.getItem('userProfileId')); |
13 | $scope.showLoader = true; | 13 | $scope.showLoader = true; |
14 | 14 | ||
15 | fuelManagerService.getFullList().then(function(result) { | 15 | fuelManagerService.getFullList().then(function(result) { |
16 | $scope.fullJetList = result; | 16 | $scope.fullJetList = result; |
17 | $scope.showLoader = false; | 17 | $scope.showLoader = false; |
18 | }) | 18 | }) |
19 | 19 | ||
20 | $scope.avoidanceList = {}; | 20 | $scope.avoidanceList = {}; |
21 | 21 | ||
22 | $scope.updateList = function(fullJetList){ | 22 | $scope.updateList = function(fullJetList){ |
23 | $scope.showLoader = true; | 23 | $scope.showLoader = true; |
24 | $scope.addData = []; | 24 | $scope.addData = []; |
25 | $scope.newJetList = fullJetList; | 25 | $scope.newJetList = fullJetList; |
26 | if ($scope.currentUserData == undefined || $scope.currentUserData == null) { | 26 | if ($scope.currentUserData == undefined || $scope.currentUserData == null) { |
27 | 27 | ||
28 | }else{ | 28 | }else{ |
29 | 29 | ||
30 | for(var i=0; i<$scope.newJetList.length;i++){ | 30 | for(var i=0; i<$scope.newJetList.length;i++){ |
31 | for(var j = 0; j < $scope.newJetList[i].aircraftsSize.length; j++){ | 31 | for(var j = 0; j < $scope.newJetList[i].aircraftsSize.length; j++){ |
32 | if($scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null){ | 32 | if($scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance != null){ |
33 | console.log('fullJetList', $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance); | 33 | console.log('fullJetList', $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance); |
34 | $scope.addData.push({ | 34 | $scope.addData.push({ |
35 | //'aircraftType': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.aircraftType, | 35 | //'aircraftType': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.aircraftType, |
36 | 'id': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.id, | 36 | 'id': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.id, |
37 | 'aircraftSizeId': $scope.newJetList[i].aircraftsSize[j].id, | 37 | 'aircraftSizeId': $scope.newJetList[i].aircraftsSize[j].id, |
38 | 'rampFees': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees, | 38 | 'rampFees': $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.rampFees, |
39 | 'avoidance' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.avoidance, | 39 | 'avoidance' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.avoidance, |
40 | 'applicable' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.applicable, | 40 | 'applicable' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.applicable, |
41 | 'expirationDate' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate, | 41 | 'expirationDate' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.expirationDate, |
42 | 'notes' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.notes | 42 | 'notes' : $scope.newJetList[i].aircraftsSize[j].rampFeesAndAvoidance.notes |
43 | }); | 43 | }); |
44 | 44 | ||
45 | } | 45 | } |
46 | } | 46 | } |
47 | } | 47 | } |
48 | $scope.avoidanceList.rampFeesAndAvoidanceList = $scope.addData; | 48 | $scope.avoidanceList.rampFeesAndAvoidanceList = $scope.addData; |
49 | $scope.avoidanceList.fboUserId = $scope.currentUserData; | 49 | $scope.avoidanceList.fboUserId = $scope.currentUserData; |
50 | 50 | ||
51 | fuelManagerService.updateFullList($scope.avoidanceList).then(function(result) { | 51 | fuelManagerService.updateFullList($scope.avoidanceList).then(function(result) { |
52 | toastr.success(''+result.success+'', { | 52 | toastr.success(''+result.success+'', { |
53 | closeButton: true | 53 | closeButton: true |
54 | }) | 54 | }) |
55 | fuelManagerService.getFullList().then(function(result) { | 55 | fuelManagerService.getFullList().then(function(result) { |
56 | $scope.fullJetList = result; | 56 | $scope.fullJetList = result; |
57 | $scope.showLoader = false; | 57 | $scope.showLoader = false; |
58 | }) | 58 | }) |
59 | }) | 59 | }) |
60 | 60 | ||
61 | } | 61 | } |
62 | 62 | ||
63 | } | 63 | } |
64 | 64 | ||
65 | $scope.dropOptions = {}; | 65 | $scope.dropOptions = {}; |
66 | 66 | ||
67 | fuelManagerService.getOptions().then(function(result) { | 67 | fuelManagerService.getOptions().then(function(result) { |
68 | $scope.dropOptions = result; | 68 | $scope.dropOptions = result; |
69 | }) | 69 | }) |
70 | 70 | ||
71 | fuelManagerService.getAircrafts().then(function(result) { | 71 | fuelManagerService.getAircrafts().then(function(result) { |
72 | $scope.aircrafts = result; | 72 | $scope.aircrafts = result; |
73 | }) | 73 | }) |
74 | 74 | ||
75 | $scope.openRampFeeModal = false; | 75 | $scope.openRampFeeModal = false; |
76 | $scope.customRampData = {}; | 76 | $scope.customRampData = {}; |
77 | $scope.customRampData.rampFeesAndAvoidanceList = {}; | 77 | $scope.customRampData.rampFeesAndAvoidanceList = {}; |
78 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; | 78 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; |
79 | 79 | ||
80 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; | 80 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; |
81 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftSizeId = ''; | 81 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftSizeId = ''; |
82 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; | 82 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; |
83 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; | 83 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; |
84 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; | 84 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; |
85 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; | 85 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; |
86 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; | 86 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; |
87 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; | 87 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; |
88 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; | 88 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; |
89 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; | 89 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; |
90 | //$scope.customRampData.fboUserId = ''; | 90 | //$scope.customRampData.fboUserId = ''; |
91 | 91 | ||
92 | //$scope.rampFeeType = ''; | 92 | //$scope.rampFeeType = ''; |
93 | 93 | ||
94 | $scope.openRampModal = function(){ | 94 | $scope.openRampModal = function(){ |
95 | //console.log('$scope.dropOptions', $scope.dropOptions) | 95 | //console.log('$scope.dropOptions', $scope.dropOptions) |
96 | 96 | ||
97 | 97 | ||
98 | if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'WEIGHT') { | 98 | if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'WEIGHT') { |
99 | $scope.openRampFeeModal = true; | 99 | $scope.openRampFeeModal = true; |
100 | $scope.showWeight = true; | 100 | $scope.showWeight = true; |
101 | $scope.showWingspan = false; | 101 | $scope.showWingspan = false; |
102 | $scope.showTail = false; | 102 | $scope.showTail = false; |
103 | $scope.showAircraft = false; | 103 | $scope.showAircraft = false; |
104 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; | 104 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; |
105 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; | 105 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; |
106 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; | 106 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; |
107 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; | 107 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; |
108 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; | 108 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; |
109 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; | 109 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; |
110 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'MAKE_AND_MODEL') { | 110 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'MAKE_AND_MODEL') { |
111 | $scope.openRampFeeModal = true; | 111 | $scope.openRampFeeModal = true; |
112 | $scope.showWeight = false; | 112 | $scope.showWeight = false; |
113 | $scope.showWingspan = false; | 113 | $scope.showWingspan = false; |
114 | $scope.showTail = false; | 114 | $scope.showTail = false; |
115 | $scope.showAircraft = true; | 115 | $scope.showAircraft = true; |
116 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; | 116 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; |
117 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; | 117 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; |
118 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; | 118 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; |
119 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; | 119 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; |
120 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; | 120 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; |
121 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; | 121 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; |
122 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; | 122 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; |
123 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'WINGSPAN') { | 123 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'WINGSPAN') { |
124 | $scope.openRampFeeModal = true; | 124 | $scope.openRampFeeModal = true; |
125 | $scope.showWeight = false; | 125 | $scope.showWeight = false; |
126 | $scope.showWingspan = true; | 126 | $scope.showWingspan = true; |
127 | $scope.showTail = false; | 127 | $scope.showTail = false; |
128 | $scope.showAircraft = false; | 128 | $scope.showAircraft = false; |
129 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; | 129 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; |
130 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; | 130 | $scope.customRampData.rampFeesAndAvoidanceList.tailNumber = ''; |
131 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; | 131 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; |
132 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; | 132 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; |
133 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; | 133 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; |
134 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; | 134 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; |
135 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'TAIL') { | 135 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === 'TAIL') { |
136 | $scope.openRampFeeModal = true; | 136 | $scope.openRampFeeModal = true; |
137 | $scope.showWeight = false; | 137 | $scope.showWeight = false; |
138 | $scope.showWingspan = false; | 138 | $scope.showWingspan = false; |
139 | $scope.showTail = true; | 139 | $scope.showTail = true; |
140 | $scope.showAircraft = false; | 140 | $scope.showAircraft = false; |
141 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; | 141 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftMake = ''; |
142 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; | 142 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMin = ''; |
143 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; | 143 | $scope.customRampData.rampFeesAndAvoidanceList.wingspanMax = ''; |
144 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; | 144 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMin = ''; |
145 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; | 145 | $scope.customRampData.rampFeesAndAvoidanceList.weightRangeMax = ''; |
146 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; | 146 | $scope.customRampData.rampFeesAndAvoidanceList.rampFees = ''; |
147 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; | 147 | $scope.customRampData.rampFeesAndAvoidanceList.avoidance = ''; |
148 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null){ | 148 | }else if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null){ |
149 | $scope.openRampFeeModal = false; | 149 | $scope.openRampFeeModal = false; |
150 | $scope.showWeight = false; | 150 | $scope.showWeight = false; |
151 | $scope.showWingspan = false; | 151 | $scope.showWingspan = false; |
152 | $scope.showTail = false; | 152 | $scope.showTail = false; |
153 | $scope.showAircraft = false; | 153 | $scope.showAircraft = false; |
154 | }else{ | 154 | }else{ |
155 | $scope.openRampFeeModal = false; | 155 | $scope.openRampFeeModal = false; |
156 | $scope.showWeight = false; | 156 | $scope.showWeight = false; |
157 | $scope.showWingspan = false; | 157 | $scope.showWingspan = false; |
158 | $scope.showTail = false; | 158 | $scope.showTail = false; |
159 | $scope.showAircraft = false; | 159 | $scope.showAircraft = false; |
160 | } | 160 | } |
161 | for (var i = 0; $scope.dropOptions.length; i++) { | 161 | for (var i = 0; $scope.dropOptions.length; i++) { |
162 | if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === $scope.dropOptions[i].size) { | 162 | if ($scope.customRampData.rampFeesAndAvoidanceList.aircraftType === $scope.dropOptions[i].size) { |
163 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftSizeId = $scope.dropOptions[i].id; | 163 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftSizeId = $scope.dropOptions[i].id; |
164 | } | 164 | } |
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | $scope.addCustomRamp = function(){ | 170 | $scope.addCustomRamp = function(){ |
171 | 171 | ||
172 | $scope.newData = {}; | 172 | $scope.newData = {}; |
173 | $scope.newData.rampFeesAndAvoidanceList = []; | 173 | $scope.newData.rampFeesAndAvoidanceList = []; |
174 | $scope.newData.rampFeesAndAvoidanceList.push($scope.customRampData.rampFeesAndAvoidanceList); | 174 | $scope.newData.rampFeesAndAvoidanceList.push($scope.customRampData.rampFeesAndAvoidanceList); |
175 | $scope.newData.fboUserId = $scope.currentUserData; | 175 | $scope.newData.fboUserId = $scope.currentUserData; |
176 | console.log('$scope.customRampData', $scope.newData) | 176 | console.log('$scope.customRampData', $scope.newData) |
177 | fuelManagerService.updateFullList($scope.newData).then(function(result) { | 177 | fuelManagerService.updateFullList($scope.newData).then(function(result) { |
178 | toastr.success(''+result.success+'', { | 178 | toastr.success(''+result.success+'', { |
179 | closeButton: true | 179 | closeButton: true |
180 | }); | 180 | }); |
181 | $scope.openRampFeeModal = false; | 181 | $scope.openRampFeeModal = false; |
182 | $scope.customRampData.rampFeesAndAvoidanceList = {}; | 182 | $scope.customRampData.rampFeesAndAvoidanceList = {}; |
183 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; | 183 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; |
184 | $scope.newData = {}; | 184 | $scope.newData = {}; |
185 | $scope.newData.rampFeesAndAvoidanceList = []; | 185 | $scope.newData.rampFeesAndAvoidanceList = []; |
186 | fuelManagerService.getFullList().then(function(result) { | 186 | fuelManagerService.getFullList().then(function(result) { |
187 | $scope.fullJetList = result; | 187 | $scope.fullJetList = result; |
188 | }) | 188 | }) |
189 | }) | 189 | }) |
190 | } | 190 | } |
191 | 191 | ||
192 | $scope.closeRampFeeModel = function(){ | 192 | $scope.closeRampFeeModel = function(){ |
193 | $scope.openRampFeeModal = false; | 193 | $scope.openRampFeeModal = false; |
194 | $scope.showWeight = false; | 194 | $scope.showWeight = false; |
195 | $scope.showWingspan = false; | 195 | $scope.showWingspan = false; |
196 | $scope.showTail = false; | 196 | $scope.showTail = false; |
197 | $scope.showAircraft = false; | 197 | $scope.showAircraft = false; |
198 | $scope.customRampData.rampFeesAndAvoidanceList = {}; | 198 | $scope.customRampData.rampFeesAndAvoidanceList = {}; |
199 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; | 199 | $scope.customRampData.rampFeesAndAvoidanceList.aircraftType = null; |
200 | } | 200 | } |
201 | 201 | ||
202 | $scope.parentOpen = function(index){ | 202 | $scope.parentOpen = function(index){ |
203 | $('#parentOpen'+index).css('display', 'none'); | 203 | $('#parentOpen'+index).css('display', 'none'); |
204 | $('#parentClose'+index).css('display', 'initial'); | 204 | $('#parentClose'+index).css('display', 'initial'); |
205 | $('#parentTogglebody'+index).slideDown(); | 205 | $('#parentTogglebody'+index).slideDown(); |
206 | } | 206 | } |
207 | $scope.parentClose = function(index){ | 207 | $scope.parentClose = function(index){ |
208 | $('#parentOpen'+index).css('display', 'initial'); | 208 | $('#parentOpen'+index).css('display', 'initial'); |
209 | $('#parentClose'+index).css('display', 'none'); | 209 | $('#parentClose'+index).css('display', 'none'); |
210 | $('#parentTogglebody'+index).slideUp(); | 210 | $('#parentTogglebody'+index).slideUp(); |
211 | } | 211 | } |
212 | 212 | ||
213 | $scope.toggleChild = function(id){ | 213 | $scope.toggleChild = function(id){ |
214 | if ($('.'+id).hasClass('fa-plus-circle')) { | 214 | if ($('.'+id).hasClass('fa-plus-circle')) { |
215 | $('.'+id).removeClass('fa-plus-circle'); | 215 | $('.'+id).removeClass('fa-plus-circle'); |
216 | $('.'+id).addClass('fa-minus-circle'); | 216 | $('.'+id).addClass('fa-minus-circle'); |
217 | }else{ | 217 | }else{ |
218 | $('.'+id).removeClass('fa-minus-circle'); | 218 | $('.'+id).removeClass('fa-minus-circle'); |
219 | $('.'+id).addClass('fa-plus-circle'); | 219 | $('.'+id).addClass('fa-plus-circle'); |
220 | } | 220 | } |
221 | $('#'+id).slideToggle(); | 221 | $('#'+id).slideToggle(); |
222 | } | 222 | } |
223 | 223 | ||
224 | $scope.dates = [{date:'01-05-2001'}, {date:'05-05-2014'}, {date:'10-11-2008'}] | ||
225 | |||
226 | $scope.open = function($event, dt) { | ||
227 | $event.preventDefault(); | ||
228 | $event.stopPropagation(); | ||
229 | |||
230 | dt.opened = true; | ||
231 | }; | ||
232 | |||
233 | $scope.dateOptions = { | ||
234 | formatYear: 'yy', | ||
235 | startingDay: 1 | ||
236 | }; | ||
237 | |||
238 | |||
239 | $scope.format = 'dd-MMMM-yyyy' | ||
240 | |||
241 | |||
224 | $(document).ready(function(){ | 242 | $(document).ready(function(){ |
225 | 243 | ||
226 | setInterval(function(){ | 244 | setInterval(function(){ |
227 | var newHeight = $('.feeManagerLeft').height(); | 245 | var newHeight = $('.feeManagerLeft').height(); |
228 | $('.feeManagerRight').css('height', newHeight); | 246 | $('.feeManagerRight').css('height', newHeight); |
229 | }, 3); | 247 | }, 3); |
230 | 248 | ||
231 | $('#customTabToggle1').click(function(){ | 249 | $('#customTabToggle1').click(function(){ |
232 | console.log('tab 1'); | 250 | console.log('tab 1'); |
233 | $('#customTabsBody1').slideDown(); | 251 | $('#customTabsBody1').slideDown(); |
234 | $('#customTabsBody2').slideUp(); | 252 | $('#customTabsBody2').slideUp(); |
235 | $('#customTabsBody3').slideUp(); | 253 | $('#customTabsBody3').slideUp(); |
236 | $('#customTabsBody4').slideUp(); | 254 | $('#customTabsBody4').slideUp(); |
237 | $('#customTabs1').addClass('customActive'); | 255 | $('#customTabs1').addClass('customActive'); |
238 | $('#customTabs2').removeClass('customActive'); | 256 | $('#customTabs2').removeClass('customActive'); |
239 | $('#customTabs3').removeClass('customActive'); | 257 | $('#customTabs3').removeClass('customActive'); |
240 | $('#customTabs4').removeClass('customActive'); | 258 | $('#customTabs4').removeClass('customActive'); |
241 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); | 259 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); |
242 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); | 260 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); |
243 | 261 | ||
244 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'none'); | 262 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'none'); |
245 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'inline-block'); | 263 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'inline-block'); |
246 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'inline-block'); | 264 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'inline-block'); |
247 | 265 | ||
248 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); | 266 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); |
249 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); | 267 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); |
250 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); | 268 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); |
251 | 269 | ||
252 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); | 270 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); |
253 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); | 271 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); |
254 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); | 272 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); |
255 | 273 | ||
256 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); | 274 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); |
257 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); | 275 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); |
258 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); | 276 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); |
259 | 277 | ||
260 | }) | 278 | }) |
261 | $('#customTabToggle2').click(function(){ | 279 | $('#customTabToggle2').click(function(){ |
262 | console.log('tab 2'); | 280 | console.log('tab 2'); |
263 | $('#customTabsBody1').slideUp(); | 281 | $('#customTabsBody1').slideUp(); |
264 | $('#customTabsBody2').slideDown(); | 282 | $('#customTabsBody2').slideDown(); |
265 | $('#customTabsBody3').slideUp(); | 283 | $('#customTabsBody3').slideUp(); |
266 | $('#customTabsBody4').slideUp(); | 284 | $('#customTabsBody4').slideUp(); |
267 | $('#customTabs1').removeClass('customActive'); | 285 | $('#customTabs1').removeClass('customActive'); |
268 | $('#customTabs2').addClass('customActive'); | 286 | $('#customTabs2').addClass('customActive'); |
269 | $('#customTabs3').removeClass('customActive'); | 287 | $('#customTabs3').removeClass('customActive'); |
270 | $('#customTabs4').removeClass('customActive'); | 288 | $('#customTabs4').removeClass('customActive'); |
271 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); | 289 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); |
272 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); | 290 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); |
273 | 291 | ||
274 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); | 292 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); |
275 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); | 293 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); |
276 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); | 294 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); |
277 | 295 | ||
278 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'none'); | 296 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'none'); |
279 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'inline-block'); | 297 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'inline-block'); |
280 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'inline-block'); | 298 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'inline-block'); |
281 | 299 | ||
282 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); | 300 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); |
283 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); | 301 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); |
284 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); | 302 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); |
285 | 303 | ||
286 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); | 304 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); |
287 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); | 305 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); |
288 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); | 306 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); |
289 | 307 | ||
290 | }) | 308 | }) |
291 | $('#customTabToggle3').click(function(){ | 309 | $('#customTabToggle3').click(function(){ |
292 | console.log('tab 3'); | 310 | console.log('tab 3'); |
293 | $('#customTabsBody1').slideUp(); | 311 | $('#customTabsBody1').slideUp(); |
294 | $('#customTabsBody2').slideUp(); | 312 | $('#customTabsBody2').slideUp(); |
295 | $('#customTabsBody3').slideDown(); | 313 | $('#customTabsBody3').slideDown(); |
296 | $('#customTabsBody4').slideUp(); | 314 | $('#customTabsBody4').slideUp(); |
297 | $('#customTabs1').removeClass('customActive'); | 315 | $('#customTabs1').removeClass('customActive'); |
298 | $('#customTabs2').removeClass('customActive'); | 316 | $('#customTabs2').removeClass('customActive'); |
299 | $('#customTabs3').addClass('customActive'); | 317 | $('#customTabs3').addClass('customActive'); |
300 | $('#customTabs4').removeClass('customActive'); | 318 | $('#customTabs4').removeClass('customActive'); |
301 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); | 319 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); |
302 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); | 320 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); |
303 | 321 | ||
304 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); | 322 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); |
305 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); | 323 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); |
306 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); | 324 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); |
307 | 325 | ||
308 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); | 326 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); |
309 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); | 327 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); |
310 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); | 328 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); |
311 | 329 | ||
312 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'none'); | 330 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'none'); |
313 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'inline-block'); | 331 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'inline-block'); |
314 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'inline-block'); | 332 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'inline-block'); |
315 | 333 | ||
316 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); | 334 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'inline-block'); |
317 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); | 335 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'none'); |
318 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); | 336 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'none'); |
319 | 337 | ||
320 | }) | 338 | }) |
321 | $('#customTabToggle4').click(function(){ | 339 | $('#customTabToggle4').click(function(){ |
322 | console.log('tab 4'); | 340 | console.log('tab 4'); |
323 | $('#customTabsBody1').slideUp(); | 341 | $('#customTabsBody1').slideUp(); |
324 | $('#customTabsBody2').slideUp(); | 342 | $('#customTabsBody2').slideUp(); |
325 | $('#customTabsBody3').slideUp(); | 343 | $('#customTabsBody3').slideUp(); |
326 | $('#customTabsBody4').slideDown(); | 344 | $('#customTabsBody4').slideDown(); |
327 | $('#customTabs1').removeClass('customActive'); | 345 | $('#customTabs1').removeClass('customActive'); |
328 | $('#customTabs2').removeClass('customActive'); | 346 | $('#customTabs2').removeClass('customActive'); |
329 | $('#customTabs3').removeClass('customActive'); | 347 | $('#customTabs3').removeClass('customActive'); |
330 | $('#customTabs4').addClass('customActive'); | 348 | $('#customTabs4').addClass('customActive'); |
331 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); | 349 | $('.customAccordianHeader > select, .customAccordianHeader > input').prop("disabled", true); |
332 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); | 350 | $('.customAccordianHeader.customActive > select, .customAccordianHeader.customActive > input').prop("disabled", false); |
333 | 351 | ||
334 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); | 352 | $('#customTabs1 > .pull-right > .btn-default').css('display', 'inline-block'); |
335 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); | 353 | $('#customTabs1 > .pull-right > .btn-success').css('display', 'none'); |
336 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); | 354 | $('#customTabs1 > .pull-right > .btn-danger').css('display', 'none'); |
337 | 355 | ||
338 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); | 356 | $('#customTabs2 > .pull-right > .btn-default').css('display', 'inline-block'); |
339 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); | 357 | $('#customTabs2 > .pull-right > .btn-success').css('display', 'none'); |
340 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); | 358 | $('#customTabs2 > .pull-right > .btn-danger').css('display', 'none'); |
341 | 359 | ||
342 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); | 360 | $('#customTabs3 > .pull-right > .btn-default').css('display', 'inline-block'); |
343 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); | 361 | $('#customTabs3 > .pull-right > .btn-success').css('display', 'none'); |
344 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); | 362 | $('#customTabs3 > .pull-right > .btn-danger').css('display', 'none'); |
345 | 363 | ||
346 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'none'); | 364 | $('#customTabs4 > .pull-right > .btn-default').css('display', 'none'); |
347 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'inline-block'); | 365 | $('#customTabs4 > .pull-right > .btn-success').css('display', 'inline-block'); |
348 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'inline-block'); | 366 | $('#customTabs4 > .pull-right > .btn-danger').css('display', 'inline-block'); |
349 | 367 | ||
350 | }) | 368 | }) |
351 | 369 | ||
352 | }) | 370 | }) |
353 | 371 | ||
354 | } | 372 | } |
355 | 373 |
app/partials/fuelManager/fuelManager.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ff9900; | 3 | color: #ff9900; |
4 | } | 4 | } |
5 | </style> | 5 | </style> |
6 | <div class="myLoader" ng-show="showLoader"> | 6 | <div class="myLoader" ng-show="showLoader"> |
7 | <img src="../img/hourglass.gif" width="50px;"> | 7 | <img src="../img/hourglass.gif" width="50px;"> |
8 | </div> | 8 | </div> |
9 | 9 | ||
10 | <div class="container" style="display: none;"> | 10 | |
11 | |||
12 | |||
13 | <div class="container"> | ||
11 | <div class="row"> | 14 | <div class="row"> |
12 | <div class="col-md-10"> | 15 | <div class="col-md-10"> |
13 | <div class="widget stacked"> | 16 | <div class="widget stacked"> |
14 | <div class="widget-header"> | 17 | <div class="widget-header"> |
15 | <i class="fa fa-pencil"></i> | 18 | <i class="fa fa-pencil"></i> |
16 | <h3>Ramp Fee Manager</h3> | 19 | <h3>Ramp Fee Manager</h3> |
17 | <select> | 20 | <select style="float: right; margin: 8px 10px;" ng-model="customRampData.rampFeesAndAvoidanceList.aircraftType" ng-change="openRampModal()"> |
18 | <option>Ramp Fee By Category</option> | 21 | <option disabled selected value="">Ramp Fee By Category</option> |
19 | <option>Make And Model</option> | 22 | <option ng-repeat="modals in dropOptions" value="{{modals.size}}">{{modals.size}}</option> |
20 | <option>Weight</option> | ||
21 | <option>Wingspan</option> | ||
22 | </select> | 23 | </select> |
23 | </div> | 24 | </div> |
24 | <!-- /widget-header --> | 25 | <!-- /widget-header --> |
25 | <div class="widget-content"> | 26 | <div class="widget-content new-widget-content"> |
26 | <h3>Ramp Fees & Avoidance</h3> | 27 | <section id="accordions1"> |
27 | <section id="accordions"> | ||
28 | <div class="newCustomAccordian"> | 28 | <div class="newCustomAccordian"> |
29 | <!-- tab 1 --> | 29 | |
30 | <div class="customAccordianHeader customActive" id="customTabs1"> | 30 | <div class="col-md-9 feeManagerLeft" style="padding: 0;"> |
31 | <span>Jet Aircraft</span> | 31 | |
32 | <select class="form-control"> | 32 | <div ng-repeat="list in fullJetList"> |
33 | <option>Pricing Structure</option> | 33 | <div class="new-tab-heading"> |
34 | <option>Retail-(minus)</option> | 34 | <i class="fa fa-plus-circle" ng-click="parentOpen($index)" id="parentOpen{{$index}}" aria-hidden="true"></i> |
35 | <option>Cost+(plus)</option> | 35 | <i class="fa fa-minus-circle" ng-click="parentClose($index)" id="parentClose{{$index}}" aria-hidden="true" style="display: none;"></i> |
36 | <option>Direct=(equals)</option> | 36 | <span>{{list.type}}</span> |
37 | </select> | 37 | </div> |
38 | <input type="text" name="" class="form-control" value="$1.7500"> | 38 | <div class="new-tab-body" id="parentTogglebody{{$index}}" style="display: none;"> |
39 | <div class="pull-right"> | 39 | <div class="new-tab-body-th"> |
40 | <button class="btn btn-success">Save</button> | 40 | <div class="col-md-4"> |
41 | <button class="btn btn-danger">Delete</button> | 41 | Aircraft Size |
42 | <button class="btn btn-default" id="customTabToggle1" style="display: none;">Edit</button> | 42 | </div> |
43 | <div class="col-md-2"> | ||
44 | Ramp/Facil. Fee | ||
45 | </div> | ||
46 | <div class="col-md-2"> | ||
47 | Avoidance | ||
48 | </div> | ||
49 | <div class="col-md-2"> | ||
50 | Expiration Date | ||
51 | </div> | ||
52 | <div class="col-md-2"> | ||
53 | Applicable | ||
54 | </div> | ||
55 | <div class="clearfix"></div> | ||
56 | </div> | ||
57 | <div class="new-tab-body-td" ng-repeat="jets in list.aircraftsSize"> | ||
58 | <div> | ||
59 | <div class="col-md-4"> | ||
60 | <i class="fa fa-plus-circle {{jets.id}}" ng-click="toggleChild(jets.id)" aria-hidden="true"></i> | ||
61 | <span style="margin-left: 5px;">{{jets.size}}</span> | ||
62 | </div> | ||
63 | <div class="col-md-2"> | ||
64 | <input type="text" ng-disabled="jets.rampFeesAndAvoidance.applicable == false || jets.rampFeesAndAvoidance.applicable == null" ng-model="jets.rampFeesAndAvoidance.rampFees" style="padding: 5px 5px;"> | ||
65 | </div> | ||
66 | <div class="col-md-2"> | ||
67 | <input type="text" ng-disabled="jets.rampFeesAndAvoidance.applicable == false || jets.rampFeesAndAvoidance.applicable == null" ng-model="jets.rampFeesAndAvoidance.avoidance" style="padding: 5px 5px;"> | ||
68 | </div> | ||
69 | <div class="col-md-2"> | ||
70 | <!-- <input type="date" ng-disabled="jets.rampFeesAndAvoidance.applicable == false || jets.rampFeesAndAvoidance.applicable == null" name="" ng-model="jets.rampFeesAndAvoidance.expirationDate"> --> | ||
71 | |||
72 | |||
73 | <input type="text" ng-model="datePicker" datepicker -disabled="jets.rampFeesAndAvoidance.applicable == false || jets.rampFeesAndAvoidance.applicable == null" ng-model="jets.rampFeesAndAvoidance.expirationDate" style="width: 90px; padding: 5px 5px;" /> | ||
74 | |||
75 | </div> | ||
76 | <div class="col-md-2"> | ||
77 | <!-- <input type="checkbox" ng-model="jets.rampFeesAndAvoidance.applicable"> --> | ||
78 | <div class="onoffswitch"> | ||
79 | <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="{{jets.id}}{{$index}}" ng-model="jets.rampFeesAndAvoidance.applicable"> | ||
80 | <label class="onoffswitch-label" for="{{jets.id}}{{$index}}"> | ||
81 | <span class="onoffswitch-inner"></span> | ||
82 | <span class="onoffswitch-switch"> | ||
83 | <i class="fa fa-check" ng-show="jets.rampFeesAndAvoidance.applicable" aria-hidden="true"></i> | ||
84 | <i class="fa fa-times" ng-hide="jets.rampFeesAndAvoidance.applicable" aria-hidden="true"></i> | ||
85 | </span> | ||
86 | </label> | ||
87 | </div> | ||
88 | </div> | ||
89 | <div class="clearfix"></div> | ||
90 | </div> | ||
91 | <div style="display: none;" class="toggleCHildBody" id="{{jets.id}}"> | ||
92 | <div class="col-xs-12"> | ||
93 | <div class="col-xs-12"> | ||
94 | <div class="appliesTableHeading">Applies To:</div> | ||
95 | <div class="appliesTableBody"> | ||
96 | <div class="firstDiv"> | ||
97 | <label style="font-weight: normal;" ng-repeat="aircraftList in jets.aircrafts">{{aircraftList.model}}</label> | ||
98 | </div> | ||
99 | <div class="lastDiv"> | ||
100 | <textarea ng-model="jets.rampFeesAndAvoidance.notes"></textarea> | ||
101 | <div class="reportedByTag"> | ||
102 | <div class="confirmedTag">Confirmed</div> | ||
103 | <table> | ||
104 | <tr> | ||
105 | <td width="50%"> | ||
106 | Reported By: | ||
107 | </td> | ||
108 | <td width="50%"> | ||
109 | {{jets.rampFeesAndAvoidance.reportedBy}} | ||
110 | </td> | ||
111 | </tr> | ||
112 | <tr> | ||
113 | <td width="50%"> | ||
114 | Reported On: | ||
115 | </td> | ||
116 | <td width="50%"> | ||
117 | {{jets.rampFeesAndAvoidance.reportedOn}} | ||
118 | </td> | ||
119 | </tr> | ||
120 | <tr> | ||
121 | <td colspan="2"> | ||
122 | <i>Click the Save Form button to Re-Confirm</i> | ||
123 | </td> | ||
124 | </tr> | ||
125 | </table> | ||
126 | </div> | ||
127 | </div> | ||
128 | <div class="clearfix"></div> | ||
129 | </div> | ||
130 | </div> | ||
131 | <div class="clearfix"></div> | ||
132 | </div> | ||
133 | <div class="clearfix"></div> | ||
134 | </div> | ||
135 | </div> | ||
136 | </div> | ||
43 | </div> | 137 | </div> |
44 | <div class="clearfix"></div> | ||
45 | </div> | 138 | </div> |
46 | <div class="customAccordianTabBody" id="customTabsBody1"> | 139 | <div class="col-md-3 text-center feeManagerRight" style="padding: 0;"> |
47 | <table class="customTableWithFilter"> | 140 | <div class="text-center"> |
48 | <thead> | 141 | <button type="submit" ng-click="updateList(fullJetList)" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
49 | <tr> | 142 | <button type="reset" class="btn btn-default">Cancel</button> |
50 | <th> | 143 | </div> |
51 | <span class="pull-left">1-250 gal.</span> | ||
52 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | ||
53 | </th> | ||
54 | <th> | ||
55 | <span class="pull-left">1-250 gal.</span> | ||
56 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | ||
57 | </th> | ||
58 | <th> | ||
59 | <input type="text" placeholder="min" name=""> - | ||
60 | <input type="text" placeholder="max" name=""> | ||
61 | <span>gal.</span> | ||
62 | </th> | ||
63 | <th> </th> | ||
64 | </tr> | ||
65 | </thead> | ||
66 | <tbody> | ||
67 | <tr> | ||
68 | <td> | ||
69 | <span class="pull-left">-$0.0000</span> | ||
70 | <span class="pull-right">($1.7500)</span> | ||
71 | </td> | ||
72 | <td> | ||
73 | <span class="pull-left">-$0.0000</span> | ||
74 | <span class="pull-right">($1.7500)</span> | ||
75 | </td> | ||
76 | <td> | ||
77 | <span>$</span> | ||
78 | <input type="text" placeholder="margin" class="tierTextBox" name=""> | ||
79 | <button class="addTierButton">Add Tier</button> | ||
80 | </td> | ||
81 | <td> | ||
82 | <i class="fa fa-trash-o" aria-hidden="true"></i> | ||
83 | </td> | ||
84 | </tr> | ||
85 | </tbody> | ||
86 | </table> | ||
87 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | ||
88 | </div> | 144 | </div> |
145 | <div class="clearfix"></div> | ||
146 | <br/> | ||
147 | </div> | ||
148 | </section> | ||
149 | </div> | ||
150 | <!-- /widget-content --> | ||
151 | </div> | ||
152 | <!-- /widget --> | ||
153 | </div> | ||
154 | <!-- /span6 --> | ||
155 | </div> | ||
156 | <!-- /span12 --> | ||
157 | </div> <!-- /container 2 --> | ||
158 | |||
159 | <div ng-show="openRampFeeModal"> | ||
160 | <div class="customBackdrop"> | ||
161 | <div class="customModalInner"> | ||
162 | <div class="customModelHead"> | ||
163 | <p class="pull-left"> | ||
164 | <i class="fa fa-list-alt" aria-hidden="true"></i> | ||
165 | Add Ramp Fee | ||
166 | </p> | ||
167 | <p class="pull-right"> | ||
168 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeRampFeeModel()"></i> | ||
169 | </p> | ||
170 | <div class="clearfix"></div> | ||
171 | </div> | ||
172 | <div class="customModelBody"> | ||
173 | |||
174 | <div class="col-xs-12 col-sm-4"> | ||
175 | Type: | ||
176 | </div> | ||
177 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
178 | <select class="form-control" style="border-radius: 0; height: 26px; padding: 0;" ng-model="customRampData.rampFeesAndAvoidanceList.aircraftType" ng-change="openRampModal()"> | ||
179 | <option ng-repeat="modalsNew in dropOptions" value="{{modalsNew.size}}">{{modalsNew.size}}</option> | ||
180 | </select> | ||
181 | </div> | ||
182 | <div class="clearfix"></div> | ||
183 | <br/> | ||
184 | |||
185 | <div ng-show="showAircraft"> | ||
186 | <div class="col-xs-12 col-sm-4"> | ||
187 | Aircraft Make: | ||
188 | </div> | ||
189 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
190 | <select class="form-control" style="border-radius: 0; height: 26px; padding: 0;" ng-model="customRampData.rampFeesAndAvoidanceList.aircraftMake"> | ||
191 | <option ng-repeat="crafts in aircrafts" value="{{crafts}}">{{crafts}}</option> | ||
192 | </select> | ||
193 | </div> | ||
194 | <div class="clearfix"></div> | ||
195 | <br/> | ||
196 | </div> | ||
197 | |||
198 | <div ng-show="showTail"> | ||
199 | <div class="col-xs-12 col-sm-4"> | ||
200 | Tail Numbers: | ||
201 | </div> | ||
202 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
203 | <select class="form-control" style="border-radius: 0; height: 26px; padding: 0;" ng-model="customRampData.rampFeesAndAvoidanceList.tailNumber"> | ||
204 | <!-- <option ng-repeat="crafts in aircrafts" value="{{crafts}}">{{crafts}}</option> --> | ||
205 | </select> | ||
206 | </div> | ||
207 | <div class="clearfix"></div> | ||
208 | <br/> | ||
209 | </div> | ||
210 | |||
211 | <div ng-show="showWingspan"> | ||
212 | <div class="col-xs-12 col-sm-4"> | ||
213 | Wingspan Min: | ||
214 | </div> | ||
215 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
216 | <input type="number" value="0.00" ng-model="customRampData.rampFeesAndAvoidanceList.wingspanMin" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
217 | </div> | ||
218 | <div class="col-xs-12 col-sm-4" style="padding-left: 5px;"> | ||
219 | ft. | ||
220 | </div> | ||
221 | <div class="clearfix"></div> | ||
222 | <br/> | ||
223 | <div class="col-xs-12 col-sm-4"> | ||
224 | Wingspan Max: | ||
225 | </div> | ||
226 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
227 | <input type="number" value="0.00" ng-model="customRampData.rampFeesAndAvoidanceList.wingspanMax" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
228 | </div> | ||
229 | <div class="col-xs-12 col-sm-4" style="padding-left: 5px;"> | ||
230 | ft. | ||
231 | </div> | ||
232 | <div class="clearfix"></div> | ||
233 | <br/> | ||
234 | </div> | ||
235 | |||
236 | <div ng-show="showWeight"> | ||
237 | <div class="col-xs-12 col-sm-4"> | ||
238 | Weight Range Min: | ||
239 | </div> | ||
240 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
241 | <input type="number" value="0.00" ng-model="customRampData.rampFeesAndAvoidanceList.weightRangeMin" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
242 | </div> | ||
243 | <div class="col-xs-12 col-sm-4" style="padding-left: 5px;"> | ||
244 | lbs. | ||
245 | </div> | ||
246 | <div class="clearfix"></div> | ||
247 | <br/> | ||
248 | <div class="col-xs-12 col-sm-4"> | ||
249 | Weight Range Max: | ||
250 | </div> | ||
251 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
252 | <input type="number" value="0.00" ng-model="customRampData.rampFeesAndAvoidanceList.weightRangeMax" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
253 | </div> | ||
254 | <div class="col-xs-12 col-sm-4" style="padding-left: 5px;"> | ||
255 | lbs. | ||
256 | </div> | ||
257 | <div class="clearfix"></div> | ||
258 | <br/> | ||
259 | </div> | ||
260 | |||
261 | <div> | ||
262 | <div class="col-xs-12 col-sm-4"> | ||
263 | Ramp/Facil. Fee($): | ||
264 | </div> | ||
265 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
266 | <input type="number" value="0" ng-model="customRampData.rampFeesAndAvoidanceList.rampFees" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
267 | </div> | ||
268 | <div class="clearfix"></div> | ||
269 | <br/> | ||
270 | </div> | ||
271 | <div> | ||
272 | <div class="col-xs-12 col-sm-4"> | ||
273 | Avoidance: | ||
274 | </div> | ||
275 | <div class="col-xs-12 col-sm-4" style="padding-right: 0;"> | ||
276 | <input type="number" value="0" ng-model="customRampData.rampFeesAndAvoidanceList.avoidance" class="form-control" style="border-radius: 0; height: 26px; padding: 0 5px;" > | ||
277 | </div> | ||
278 | <div class="col-xs-12 col-sm-4" style="padding-left: 5px;"> | ||
279 | gal. | ||
280 | </div> | ||
281 | <div class="clearfix"></div> | ||
282 | </div> | ||
283 | |||
284 | </div> | ||
285 | <div class="customModelFooter text-center"> | ||
286 | <input type="submit" value="Save" class="btn" ng-click="addCustomRamp(customRampData)"> | ||
287 | <button class="btn" ng-click="closeRampFeeModel()">Cancel</button> | ||
288 | </div> | ||
289 | </div> | ||
290 | </div> | ||
291 | </div> | ||
292 | |||
293 | |||
294 | |||
295 | |||
296 | |||
89 | 297 | ||
90 | <!-- tab 2 --> | ||
91 | 298 | ||
92 | <div class="customAccordianHeader" id="customTabs2"> | 299 | |
300 | |||
301 | |||
302 | |||
303 | |||
304 | |||
305 | <div class="container" style="display: none;"> | ||
306 | <div class="row"> | ||
307 | <div class="col-md-10"> | ||
308 | <div class="widget stacked"> | ||
309 | <div class="widget-header"> | ||
310 | <i class="fa fa-pencil"></i> | ||
311 | <h3>Ramp Fee Manager</h3> | ||
312 | <select> | ||
313 | <option>Ramp Fee By Category</option> | ||
314 | <option>Make And Model</option> | ||
315 | <option>Weight</option> | ||
316 | <option>Wingspan</option> | ||
317 | </select> | ||
318 | </div> | ||
319 | <!-- /widget-header --> | ||
320 | <div class="widget-content"> | ||
321 | <h3>Ramp Fees & Avoidance</h3> | ||
322 | <section id="accordions"> | ||
323 | <div class="newCustomAccordian"> | ||
324 | <!-- tab 1 --> | ||
325 | <div class="customAccordianHeader customActive" id="customTabs1"> | ||
93 | <span>Jet Aircraft</span> | 326 | <span>Jet Aircraft</span> |
94 | <select class="form-control" disabled="true"> | 327 | <select class="form-control"> |
95 | <option>Pricing Structure</option> | 328 | <option>Pricing Structure</option> |
96 | <option>Retail-(minus)</option> | 329 | <option>Retail-(minus)</option> |
97 | <option>Cost+(plus)</option> | 330 | <option>Cost+(plus)</option> |
98 | <option>Direct=(equals)</option> | 331 | <option>Direct=(equals)</option> |
99 | </select> | 332 | </select> |
100 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> | 333 | <input type="text" name="" class="form-control" value="$1.7500"> |
101 | <div class="pull-right"> | 334 | <div class="pull-right"> |
102 | <button class="btn btn-success" style="display: none;">Save</button> | 335 | <button class="btn btn-success">Save</button> |
103 | <button class="btn btn-danger" style="display: none;">Delete</button> | 336 | <button class="btn btn-danger">Delete</button> |
104 | <button class="btn btn-default" id="customTabToggle2">Edit</button> | 337 | <button class="btn btn-default" id="customTabToggle1" style="display: none;">Edit</button> |
105 | </div> | 338 | </div> |
106 | <div class="clearfix"></div> | 339 | <div class="clearfix"></div> |
107 | </div> | 340 | </div> |
108 | <div class="customAccordianTabBody" id="customTabsBody2" style="display: none;"> | 341 | <div class="customAccordianTabBody" id="customTabsBody1"> |
109 | <table class="customTableWithFilter"> | 342 | <table class="customTableWithFilter"> |
110 | <thead> | 343 | <thead> |
111 | <tr> | 344 | <tr> |
112 | <th> | 345 | <th> |
113 | <span class="pull-left">1-250 gal.</span> | 346 | <span class="pull-left">1-250 gal.</span> |
114 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 347 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
115 | </th> | 348 | </th> |
116 | <th> | 349 | <th> |
117 | <span class="pull-left">1-250 gal.</span> | 350 | <span class="pull-left">1-250 gal.</span> |
118 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 351 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
119 | </th> | 352 | </th> |
120 | <th> | 353 | <th> |
121 | <input type="text" placeholder="min" name=""> - | 354 | <input type="text" placeholder="min" name=""> - |
122 | <input type="text" placeholder="max" name=""> | 355 | <input type="text" placeholder="max" name=""> |
123 | <span>gal.</span> | 356 | <span>gal.</span> |
124 | </th> | 357 | </th> |
125 | <th> </th> | 358 | <th> </th> |
126 | </tr> | 359 | </tr> |
127 | </thead> | 360 | </thead> |
128 | <tbody> | 361 | <tbody> |
129 | <tr> | 362 | <tr> |
130 | <td> | 363 | <td> |
131 | <span class="pull-left">-$0.0000</span> | 364 | <span class="pull-left">-$0.0000</span> |
132 | <span class="pull-right">($1.7500)</span> | 365 | <span class="pull-right">($1.7500)</span> |
133 | </td> | 366 | </td> |
134 | <td> | 367 | <td> |
135 | <span class="pull-left">-$0.0000</span> | 368 | <span class="pull-left">-$0.0000</span> |
136 | <span class="pull-right">($1.7500)</span> | 369 | <span class="pull-right">($1.7500)</span> |
137 | </td> | 370 | </td> |
138 | <td> | 371 | <td> |
139 | <span>$</span> | 372 | <span>$</span> |
140 | <input type="text" placeholder="margin" class="tierTextBox" name=""> | 373 | <input type="text" placeholder="margin" class="tierTextBox" name=""> |
141 | <button class="addTierButton">Add Tier</button> | 374 | <button class="addTierButton">Add Tier</button> |
142 | </td> | 375 | </td> |
143 | <td> | 376 | <td> |
144 | <i class="fa fa-trash-o" aria-hidden="true"></i> | 377 | <i class="fa fa-trash-o" aria-hidden="true"></i> |
145 | </td> | 378 | </td> |
146 | </tr> | 379 | </tr> |
147 | </tbody> | 380 | </tbody> |
148 | </table> | 381 | </table> |
149 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 382 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
150 | </div> | 383 | </div> |
151 | 384 | ||
152 | <!-- tab 3 --> | 385 | <!-- tab 2 --> |
153 | 386 | ||
154 | <div class="customAccordianHeader" id="customTabs3"> | 387 | <div class="customAccordianHeader" id="customTabs2"> |
155 | <span>Jet Aircraft</span> | 388 | <span>Jet Aircraft</span> |
156 | <select class="form-control" disabled="true"> | 389 | <select class="form-control" disabled="true"> |
157 | <option>Pricing Structure</option> | 390 | <option>Pricing Structure</option> |
158 | <option>Retail-(minus)</option> | 391 | <option>Retail-(minus)</option> |
159 | <option>Cost+(plus)</option> | 392 | <option>Cost+(plus)</option> |
160 | <option>Direct=(equals)</option> | 393 | <option>Direct=(equals)</option> |
161 | </select> | 394 | </select> |
162 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> | 395 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> |
163 | <div class="pull-right"> | 396 | <div class="pull-right"> |
164 | <button class="btn btn-success" style="display: none;">Save</button> | 397 | <button class="btn btn-success" style="display: none;">Save</button> |
165 | <button class="btn btn-danger" style="display: none;">Delete</button> | 398 | <button class="btn btn-danger" style="display: none;">Delete</button> |
166 | <button class="btn btn-default" id="customTabToggle3">Edit</button> | 399 | <button class="btn btn-default" id="customTabToggle2">Edit</button> |
167 | </div> | 400 | </div> |
168 | <div class="clearfix"></div> | 401 | <div class="clearfix"></div> |
169 | </div> | 402 | </div> |
170 | <div class="customAccordianTabBody" id="customTabsBody3" style="display: none;"> | 403 | <div class="customAccordianTabBody" id="customTabsBody2" style="display: none;"> |
171 | <table class="customTableWithFilter"> | 404 | <table class="customTableWithFilter"> |
172 | <thead> | 405 | <thead> |
173 | <tr> | 406 | <tr> |
174 | <th> | 407 | <th> |
175 | <span class="pull-left">1-250 gal.</span> | 408 | <span class="pull-left">1-250 gal.</span> |
176 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 409 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
177 | </th> | 410 | </th> |
178 | <th> | 411 | <th> |
179 | <span class="pull-left">1-250 gal.</span> | 412 | <span class="pull-left">1-250 gal.</span> |
180 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 413 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
181 | </th> | 414 | </th> |
182 | <th> | 415 | <th> |
183 | <input type="text" placeholder="min" name=""> - | 416 | <input type="text" placeholder="min" name=""> - |
184 | <input type="text" placeholder="max" name=""> | 417 | <input type="text" placeholder="max" name=""> |
185 | <span>gal.</span> | 418 | <span>gal.</span> |
186 | </th> | 419 | </th> |
187 | <th> </th> | 420 | <th> </th> |
188 | </tr> | 421 | </tr> |
189 | </thead> | 422 | </thead> |
190 | <tbody> | 423 | <tbody> |
191 | <tr> | 424 | <tr> |
192 | <td> | 425 | <td> |
193 | <span class="pull-left">-$0.0000</span> | 426 | <span class="pull-left">-$0.0000</span> |
194 | <span class="pull-right">($1.7500)</span> | 427 | <span class="pull-right">($1.7500)</span> |
195 | </td> | 428 | </td> |
196 | <td> | 429 | <td> |
197 | <span class="pull-left">-$0.0000</span> | 430 | <span class="pull-left">-$0.0000</span> |
198 | <span class="pull-right">($1.7500)</span> | 431 | <span class="pull-right">($1.7500)</span> |
199 | </td> | 432 | </td> |
200 | <td> | 433 | <td> |
201 | <span>$</span> | 434 | <span>$</span> |
202 | <input type="text" placeholder="margin" class="tierTextBox" name=""> | 435 | <input type="text" placeholder="margin" class="tierTextBox" name=""> |
203 | <button class="addTierButton">Add Tier</button> | 436 | <button class="addTierButton">Add Tier</button> |
204 | </td> | 437 | </td> |
205 | <td> | 438 | <td> |
206 | <i class="fa fa-trash-o" aria-hidden="true"></i> | 439 | <i class="fa fa-trash-o" aria-hidden="true"></i> |
207 | </td> | 440 | </td> |
208 | </tr> | 441 | </tr> |
209 | </tbody> | 442 | </tbody> |
210 | </table> | 443 | </table> |
211 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 444 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
212 | </div> | 445 | </div> |
213 | 446 | ||
214 | <!-- tab 4 --> | 447 | <!-- tab 3 --> |
215 | 448 | ||
216 | <div class="customAccordianHeader" id="customTabs4"> | 449 | <div class="customAccordianHeader" id="customTabs3"> |
217 | <span>Jet Aircraft</span> | 450 | <span>Jet Aircraft</span> |
218 | <select class="form-control" disabled="true"> | 451 | <select class="form-control" disabled="true"> |
219 | <option>Pricing Structure</option> | 452 | <option>Pricing Structure</option> |
220 | <option>Retail-(minus)</option> | 453 | <option>Retail-(minus)</option> |
221 | <option>Cost+(plus)</option> | 454 | <option>Cost+(plus)</option> |
222 | <option>Direct=(equals)</option> | 455 | <option>Direct=(equals)</option> |
223 | </select> | 456 | </select> |
224 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> | 457 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> |
225 | <div class="pull-right"> | 458 | <div class="pull-right"> |
226 | <button class="btn btn-success" style="display: none;">Save</button> | 459 | <button class="btn btn-success" style="display: none;">Save</button> |
227 | <button class="btn btn-danger" style="display: none;">Delete</button> | 460 | <button class="btn btn-danger" style="display: none;">Delete</button> |
228 | <button class="btn btn-default" id="customTabToggle4">Edit</button> | 461 | <button class="btn btn-default" id="customTabToggle3">Edit</button> |
229 | </div> | 462 | </div> |
230 | <div class="clearfix"></div> | 463 | <div class="clearfix"></div> |
231 | </div> | 464 | </div> |
232 | <div class="customAccordianTabBody" id="customTabsBody4" style="display: none;"> | 465 | <div class="customAccordianTabBody" id="customTabsBody3" style="display: none;"> |
233 | <table class="customTableWithFilter"> | 466 | <table class="customTableWithFilter"> |
234 | <thead> | 467 | <thead> |
235 | <tr> | 468 | <tr> |
236 | <th> | 469 | <th> |
237 | <span class="pull-left">1-250 gal.</span> | 470 | <span class="pull-left">1-250 gal.</span> |
238 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 471 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
239 | </th> | 472 | </th> |
240 | <th> | 473 | <th> |
241 | <span class="pull-left">1-250 gal.</span> | 474 | <span class="pull-left">1-250 gal.</span> |
242 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> | 475 | <i class="fa fa-pencil-square-o pull-right" aria-hidden="true"></i> |
243 | </th> | 476 | </th> |
244 | <th> | 477 | <th> |
245 | <input type="text" placeholder="min" name=""> - | 478 | <input type="text" placeholder="min" name=""> - |
246 | <input type="text" placeholder="max" name=""> | 479 | <input type="text" placeholder="max" name=""> |
247 | <span>gal.</span> | 480 | <span>gal.</span> |
248 | </th> | 481 | </th> |
249 | <th> </th> | 482 | <th> </th> |
250 | </tr> | 483 | </tr> |
251 | </thead> | 484 | </thead> |
252 | <tbody> | 485 | <tbody> |
253 | <tr> | 486 | <tr> |
254 | <td> | 487 | <td> |
255 | <span class="pull-left">-$0.0000</span> | 488 | <span class="pull-left">-$0.0000</span> |
256 | <span class="pull-right">($1.7500)</span> | 489 | <span class="pull-right">($1.7500)</span> |
257 | </td> | 490 | </td> |
258 | <td> | 491 | <td> |
259 | <span class="pull-left">-$0.0000</span> | 492 | <span class="pull-left">-$0.0000</span> |
260 | <span class="pull-right">($1.7500)</span> | 493 | <span class="pull-right">($1.7500)</span> |
261 | </td> | 494 | </td> |
262 | <td> | 495 | <td> |
263 | <span>$</span> | 496 | <span>$</span> |
264 | <input type="text" placeholder="margin" class="tierTextBox" name=""> | 497 | <input type="text" placeholder="margin" class="tierTextBox" name=""> |
265 | <button class="addTierButton">Add Tier</button> | 498 | <button class="addTierButton">Add Tier</button> |
266 | </td> | 499 | </td> |
267 | <td> | 500 | <td> |
268 | <i class="fa fa-trash-o" aria-hidden="true"></i> | 501 | <i class="fa fa-trash-o" aria-hidden="true"></i> |
269 | </td> | 502 | </td> |
270 | </tr> | 503 | </tr> |
271 | </tbody> | 504 | </tbody> |
272 | </table> | 505 | </table> |
273 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 506 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
274 | </div> | 507 | </div> |
275 | 508 | ||
276 | 509 | <!-- tab 4 --> | |
277 | </div> | 510 | |
278 | </section> | 511 | <div class="customAccordianHeader" id="customTabs4"> |
279 | <div class="row"> </div> | 512 | <span>Jet Aircraft</span> |
280 | <div class="row"> | 513 | <select class="form-control" disabled="true"> |
281 | <div class="col-md-7"> | 514 | <option>Pricing Structure</option> |
282 | </div> | 515 | <option>Retail-(minus)</option> |
283 | <div class="col-md-5"> | 516 | <option>Cost+(plus)</option> |
284 | <div class="form-group"> | 517 | <option>Direct=(equals)</option> |
285 | <div class="col-lg-4"></div> | 518 | </select> |
286 | <div class="col-lg-8"> | 519 | <input type="text" name="" disabled="true" class="form-control" value="$1.7500"> |
287 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 520 | <div class="pull-right"> |
288 | <button type="reset" class="btn btn-default">Cancel</button> | 521 | <button class="btn btn-success" style="display: none;">Save</button> |
289 | </div> | 522 | <button class="btn btn-danger" style="display: none;">Delete</button> |
290 | </div> | 523 | <button class="btn btn-default" id="customTabToggle4">Edit</button> |
291 | </div> | ||
292 | </div> | ||
293 | </div> | ||
294 | <!-- /widget-content --> | ||
295 | </div> | ||
296 | <!-- /widget --> | ||
297 | </div> | ||
298 | <!-- /span6 --> | ||
299 | </div> | ||
300 | <!-- /span12 --> | ||
301 | </div> <!-- /container 1 --> | ||
302 | <!-- Le javascript | ||
303 | ================================================== --> | ||
304 | <!-- Placed at the end of the document so the pages load faster --> | ||
305 | |||
306 | |||
307 | |||
308 | |||
309 | |||
310 | |||
311 | |||
312 | |||
313 | |||
314 | |||
315 | |||
316 | |||
317 | <div class="container"> | ||
318 | <div class="row"> | ||
319 | <div class="col-md-10"> | ||
320 | <div class="widget stacked"> | ||
321 | <div class="widget-header"> | ||
322 | <i class="fa fa-pencil"></i> | ||
323 | <h3>Ramp Fee Manager</h3> | ||
324 | <select style="float: right; margin: 8px 10px;" ng-model="customRampData.rampFeesAndAvoidanceList.aircraftType" ng-change="openRampModal()"> | ||
325 | <option disabled selected value="">Ramp Fee By Category</option> | ||
326 | <option ng-repeat="modals in dropOptions" value="{{modals.size}}">{{modals.size}}</option> | ||
327 | </select> | ||
328 | </div> | ||
329 | <!-- /widget-header --> | ||
330 | <div class="widget-content new-widget-content"> | ||
331 | <section id="accordions1"> | ||
332 | <div class="newCustomAccordian"> | ||
333 | |||
334 | <div class="col-md-9 feeManagerLeft" style="padding: 0;"> | ||
335 | |||
336 | <div ng-repeat="list in fullJetList"> | ||
337 | <div class="new-tab-heading"> | ||
338 | <i class="fa fa-plus-circle" ng-click="parentOpen($index)" id="parentOpen{{$index}}" aria-hidden="true"></i> | ||
339 | <i class="fa fa-minus-circle" ng-click="parentClose($index)" id="parentClose{{$index}}" aria-hidden="true" style="display: none;"></i> | ||
340 | <span>{{list.type}}</span> |
app/partials/updateFuelManager/updateFuelManager.controller.js
1 | 1 | ||
2 | 'use strict'; | 2 | 'use strict'; |
3 | 3 | ||
4 | //Load controller | 4 | //Load controller |
5 | angular.module('acufuel') | 5 | angular.module('acufuel') |
6 | 6 | ||
7 | 7 | ||
8 | .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) { | 8 | .controller('updateFuelManagerController', ['$scope','$uibModal', 'updateFuelManagerService', function($scope , $uibModal, updateFuelManagerService) { |
9 | $scope.showLoader = true; | 9 | $scope.showLoader = true; |
10 | $scope.yes = function(data){ | 10 | $scope.yes = function(data){ |
11 | console.log('========'); | 11 | console.log('========'); |
12 | console.log('value', data); | 12 | console.log('value', data); |
13 | $uibModal.yes({ | 13 | $uibModal.yes({ |
14 | templateUrl: 'partials/pricingcontact/pricingcontact.html', | 14 | templateUrl: 'partials/pricingcontact/pricingcontact.html', |
15 | backdrop: true, | 15 | backdrop: true, |
16 | scope: $scope, | 16 | scope: $scope, |
17 | }) | 17 | }) |
18 | } | 18 | } |
19 | 19 | ||
20 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); | 20 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); |
21 | 21 | ||
22 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 22 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
23 | $scope.aTypeJets = result; | 23 | $scope.aTypeJets = result; |
24 | $scope.showLoader = false; | 24 | $scope.showLoader = false; |
25 | }) | 25 | }) |
26 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 26 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
27 | $scope.vTypeJets = result; | 27 | $scope.vTypeJets = result; |
28 | $scope.showLoader = false; | 28 | $scope.showLoader = false; |
29 | }) | 29 | }) |
30 | $scope.toggleJestAccordian = function(id, index){ | 30 | $scope.toggleJestAccordian = function(id, index){ |
31 | $scope.showLoader = true; | 31 | $scope.showLoader = true; |
32 | $('.'+id).slideDown(); | 32 | $('.'+id).slideDown(); |
33 | $('#'+id).addClass('customActive'); | 33 | $('#'+id).addClass('customActive'); |
34 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 34 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
35 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 35 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
36 | $('#'+id+' .btn-default').css('display', 'none'); | 36 | $('#'+id+' .btn-default').css('display', 'none'); |
37 | 37 | ||
38 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 38 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
39 | $scope.aTypeJets[index].tierList = tiers; | 39 | $scope.aTypeJets[index].tierList = tiers; |
40 | $scope.showLoader = false; | 40 | $scope.showLoader = false; |
41 | }) | 41 | }) |
42 | } | 42 | } |
43 | $scope.toggleVtypeJestAccordian = function(id, index){ | 43 | $scope.toggleVtypeJestAccordian = function(id, index){ |
44 | $scope.showLoader = true; | 44 | $scope.showLoader = true; |
45 | $('.'+id).slideDown(); | 45 | $('.'+id).slideDown(); |
46 | $('#'+id).addClass('customActive'); | 46 | $('#'+id).addClass('customActive'); |
47 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 47 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
48 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 48 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
49 | $('#'+id+' .btn-default').css('display', 'none'); | 49 | $('#'+id+' .btn-default').css('display', 'none'); |
50 | 50 | ||
51 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 51 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
52 | $scope.vTypeJets[index].tierList = tiers; | 52 | $scope.vTypeJets[index].tierList = tiers; |
53 | $scope.showLoader = false; | 53 | $scope.showLoader = false; |
54 | }) | 54 | }) |
55 | } | 55 | } |
56 | //$scope.trData = {}; | 56 | //$scope.trData = {}; |
57 | $scope.addNewTier = function(id, trData, index){ | 57 | $scope.addNewTier = function(id, trData, index){ |
58 | $scope.showLoader = true; | 58 | $scope.showLoader = true; |
59 | $scope.tr = {}; | 59 | $scope.tr = {}; |
60 | $scope.tr[index] = {}; | 60 | $scope.tr[index] = {}; |
61 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; | 61 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; |
62 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; | 62 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; |
63 | $scope.tr[index].margin = trData[index].margin; | 63 | $scope.tr[index].margin = trData[index].margin; |
64 | $scope.tr[index].marginTotal = '1.00'; | 64 | $scope.tr[index].marginTotal = '1.00'; |
65 | $scope.tr[index].marginTemplateId = id; | 65 | $scope.tr[index].marginTemplateId = id; |
66 | 66 | ||
67 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 67 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ |
68 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 68 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
69 | 69 | ||
70 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 70 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
71 | toastr.success('Successfully Added', { | 71 | toastr.success('Successfully Added', { |
72 | closeButton: true | 72 | closeButton: true |
73 | }) | 73 | }) |
74 | trData[index].minTierBreak = ''; | 74 | trData[index].minTierBreak = ''; |
75 | trData[index].maxTierBreak = ''; | 75 | trData[index].maxTierBreak = ''; |
76 | trData[index].margin = ''; | 76 | trData[index].margin = ''; |
77 | 77 | ||
78 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 78 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
79 | $scope.aTypeJets[index].tierList = tiers; | 79 | $scope.aTypeJets[index].tierList = tiers; |
80 | $scope.showLoader = false; | 80 | $scope.showLoader = false; |
81 | }) | 81 | }) |
82 | }) | 82 | }) |
83 | } | 83 | } |
84 | 84 | ||
85 | $scope.addNewVtypeTier = function(id, vtrData, index){ | 85 | $scope.addNewVtypeTier = function(id, vtrData, index){ |
86 | $scope.showLoader = true; | 86 | $scope.showLoader = true; |
87 | $scope.tr = {}; | 87 | $scope.tr = {}; |
88 | $scope.tr[index] = {}; | 88 | $scope.tr[index] = {}; |
89 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; | 89 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; |
90 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; | 90 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; |
91 | $scope.tr[index].margin = vtrData[index].margin; | 91 | $scope.tr[index].margin = vtrData[index].margin; |
92 | $scope.tr[index].marginTotal = '1.00'; | 92 | $scope.tr[index].marginTotal = '1.00'; |
93 | $scope.tr[index].marginTemplateId = id; | 93 | $scope.tr[index].marginTemplateId = id; |
94 | 94 | ||
95 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 95 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ |
96 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 96 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
97 | 97 | ||
98 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 98 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
99 | toastr.success('Successfully Added', { | 99 | toastr.success('Successfully Added', { |
100 | closeButton: true | 100 | closeButton: true |
101 | }) | 101 | }) |
102 | vtrData[index].minTierBreak = ''; | 102 | vtrData[index].minTierBreak = ''; |
103 | vtrData[index].maxTierBreak = ''; | 103 | vtrData[index].maxTierBreak = ''; |
104 | vtrData[index].margin = ''; | 104 | vtrData[index].margin = ''; |
105 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 105 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
106 | $scope.vTypeJets[index].tierList = tiers; | 106 | $scope.vTypeJets[index].tierList = tiers; |
107 | $scope.showLoader = false; | 107 | $scope.showLoader = false; |
108 | }) | 108 | }) |
109 | }) | 109 | }) |
110 | } | 110 | } |
111 | 111 | ||
112 | $scope.editTier = function(tier, index){ | 112 | $scope.editTier = function(tier, index){ |
113 | $scope.showLoader = true; | 113 | $scope.showLoader = true; |
114 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 114 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
115 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 115 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
116 | 116 | ||
117 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 117 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
118 | toastr.success('Successfully Updated', { | 118 | toastr.success('Successfully Updated', { |
119 | closeButton: true | 119 | closeButton: true |
120 | }) | 120 | }) |
121 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 121 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
122 | $scope.aTypeJets[index].tierList = tiers; | 122 | $scope.aTypeJets[index].tierList = tiers; |
123 | $scope.showLoader = false; | 123 | $scope.showLoader = false; |
124 | }) | 124 | }) |
125 | }) | 125 | }) |
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | $scope.editVtypeTier = function(tier, index){ | 129 | $scope.editVtypeTier = function(tier, index){ |
130 | $scope.showLoader = true; | 130 | $scope.showLoader = true; |
131 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 131 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
132 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 132 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
133 | 133 | ||
134 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 134 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
135 | toastr.success('Successfully Updated', { | 135 | toastr.success('Successfully Updated', { |
136 | closeButton: true | 136 | closeButton: true |
137 | }) | 137 | }) |
138 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 138 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
139 | $scope.vTypeJets[index].tierList = tiers; | 139 | $scope.vTypeJets[index].tierList = tiers; |
140 | $scope.showLoader = false; | 140 | $scope.showLoader = false; |
141 | }) | 141 | }) |
142 | }) | 142 | }) |
143 | 143 | ||
144 | } | 144 | } |
145 | 145 | ||
146 | $scope.deleteTier = function(id, jetid, index){ | 146 | $scope.deleteTier = function(id, jetid, index){ |
147 | $scope.showLoader = true; | 147 | $scope.showLoader = true; |
148 | updateFuelManagerService.deleteTier(id).then(function(result) { | 148 | updateFuelManagerService.deleteTier(id).then(function(result) { |
149 | toastr.success(''+result.success+'', { | 149 | toastr.success(''+result.success+'', { |
150 | closeButton: true | 150 | closeButton: true |
151 | }) | 151 | }) |
152 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { | 152 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { |
153 | $scope.aTypeJets[index].tierList = tiers; | 153 | $scope.aTypeJets[index].tierList = tiers; |
154 | $scope.showLoader = false; | 154 | $scope.showLoader = false; |
155 | }) | 155 | }) |
156 | }) | 156 | }) |
157 | } | 157 | } |
158 | 158 | ||
159 | $scope.deleteVtypeTier = function(id, jetid, index){ | 159 | $scope.deleteVtypeTier = function(id, jetid, index){ |
160 | $scope.showLoader = true; | 160 | $scope.showLoader = true; |
161 | updateFuelManagerService.deleteTier(id).then(function(result) { | 161 | updateFuelManagerService.deleteTier(id).then(function(result) { |
162 | toastr.success(''+result.success+'', { | 162 | toastr.success(''+result.success+'', { |
163 | closeButton: true | 163 | closeButton: true |
164 | }) | 164 | }) |
165 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { | 165 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { |
166 | $scope.vTypeJets[index].tierList = tiers; | 166 | $scope.vTypeJets[index].tierList = tiers; |
167 | $scope.showLoader = false; | 167 | $scope.showLoader = false; |
168 | }) | 168 | }) |
169 | }) | 169 | }) |
170 | } | 170 | } |
171 | 171 | ||
172 | $scope.saveJetAccordian = function(jets){ | 172 | $scope.saveJetAccordian = function(jets){ |
173 | $scope.showLoader = true; | 173 | $scope.showLoader = true; |
174 | $scope.jetsDetail = jets; | 174 | $scope.jetsDetail = jets; |
175 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 175 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
176 | //console.log('jets', $scope.jetsDetail); | 176 | //console.log('jets', $scope.jetsDetail); |
177 | $('.'+$scope.jetsDetail.id).slideUp(); | 177 | $('.'+$scope.jetsDetail.id).slideUp(); |
178 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 178 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
179 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 179 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
180 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 180 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
181 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 181 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
182 | 182 | ||
183 | var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id; | 183 | var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id; |
184 | 184 | ||
185 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { | 185 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { |
186 | console.log('newJet', editJetData); | 186 | console.log('newJet', editJetData); |
187 | toastr.success('Successfully Updated', { | 187 | toastr.success('Successfully Updated', { |
188 | closeButton: true | 188 | closeButton: true |
189 | }) | 189 | }) |
190 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 190 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
191 | console.log('result', result); | 191 | console.log('result', result); |
192 | $scope.aTypeJets = result; | 192 | $scope.aTypeJets = result; |
193 | $scope.showLoader = false; | 193 | $scope.showLoader = false; |
194 | }) | 194 | }) |
195 | }) | 195 | }) |
196 | 196 | ||
197 | } | 197 | } |
198 | 198 | ||
199 | $scope.saveVtypeJetAccordian = function(jets){ | 199 | $scope.saveVtypeJetAccordian = function(jets){ |
200 | $scope.showLoader = true; | 200 | $scope.showLoader = true; |
201 | $scope.jetsDetail = jets; | 201 | $scope.jetsDetail = jets; |
202 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 202 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
203 | //console.log('jets', $scope.jetsDetail); | 203 | //console.log('jets', $scope.jetsDetail); |
204 | $('.'+$scope.jetsDetail.id).slideUp(); | 204 | $('.'+$scope.jetsDetail.id).slideUp(); |
205 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 205 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
206 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 206 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
207 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 207 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
208 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 208 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
209 | 209 | ||
210 | var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id; | 210 | var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id; |
211 | 211 | ||
212 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { | 212 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { |
213 | console.log('newJet', editVtypeJetData); | 213 | console.log('newJet', editVtypeJetData); |
214 | toastr.success('Successfully Updated', { | 214 | toastr.success('Successfully Updated', { |
215 | closeButton: true | 215 | closeButton: true |
216 | }) | 216 | }) |
217 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 217 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
218 | $scope.vTypeJets = result; | 218 | $scope.vTypeJets = result; |
219 | console.log('second jets', result); | 219 | console.log('second jets', result); |
220 | $scope.showLoader = false; | 220 | $scope.showLoader = false; |
221 | }) | 221 | }) |
222 | }) | 222 | }) |
223 | 223 | ||
224 | } | 224 | } |
225 | 225 | ||
226 | $scope.newJet = {}; | 226 | $scope.newJet = {}; |
227 | 227 | ||
228 | $scope.addNewMarginBtn = function(){ | 228 | $scope.addNewMarginBtn = function(){ |
229 | $('.addNewMargin').css('display', 'block'); | 229 | $('.addNewMargin').css('display', 'block'); |
230 | } | 230 | } |
231 | $scope.closeMarginPopup = function(){ | 231 | $scope.closeMarginPopup = function(){ |
232 | $('.addNewMargin').css('display', 'none'); | 232 | $('.addNewMargin').css('display', 'none'); |
233 | $scope.newJet = {}; | 233 | $scope.newJet = {}; |
234 | } | 234 | } |
235 | 235 | ||
236 | //$scope.newJet.productType = ''; | 236 | //$scope.newJet.productType = ''; |
237 | 237 | ||
238 | $scope.addNewATypeJet = function(){ | 238 | $scope.addNewATypeJet = function(){ |
239 | $scope.showLoader = true; | 239 | $scope.showLoader = true; |
240 | $scope.newJet.productType = 'JET-A'; | 240 | $scope.newJet.productType = 'JET-A'; |
241 | $scope.newJet.userProfileId = $scope.userProfileId; | 241 | $scope.newJet.userProfileId = $scope.userProfileId; |
242 | 242 | ||
243 | var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId; | 243 | var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId; |
244 | 244 | ||
245 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { | 245 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { |
246 | console.log('newJet', jetData); | 246 | console.log('newJet', jetData); |
247 | toastr.success('Successfully Added', { | 247 | toastr.success('Successfully Added', { |
248 | closeButton: true | 248 | closeButton: true |
249 | }) | 249 | }) |
250 | $('.addNewMargin').css('display', 'none'); | 250 | $('.addNewMargin').css('display', 'none'); |
251 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 251 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
252 | console.log('result', result); | 252 | console.log('result', result); |
253 | $scope.aTypeJets = result; | 253 | $scope.aTypeJets = result; |
254 | $scope.showLoader = false; | 254 | $scope.showLoader = false; |
255 | }) | 255 | }) |
256 | }) | 256 | }) |
257 | } | 257 | } |
258 | 258 | ||
259 | $scope.newVtypeJet = {}; | 259 | $scope.newVtypeJet = {}; |
260 | 260 | ||
261 | $scope.addNewVtypePop = function(){ | 261 | $scope.addNewVtypePop = function(){ |
262 | $('.addNewVtype').css('display', 'block'); | 262 | $('.addNewVtype').css('display', 'block'); |
263 | } | 263 | } |
264 | $scope.closeNewVtypePop = function(){ | 264 | $scope.closeNewVtypePop = function(){ |
265 | $('.addNewVtype').css('display', 'none'); | 265 | $('.addNewVtype').css('display', 'none'); |
266 | $scope.newVtypeJet = {}; | 266 | $scope.newVtypeJet = {}; |
267 | } | 267 | } |
268 | 268 | ||
269 | $scope.addNewVTypeJet = function(){ | 269 | $scope.addNewVTypeJet = function(){ |
270 | $scope.showLoader = true; | 270 | $scope.showLoader = true; |
271 | $scope.newVtypeJet.productType = 'AVGAS'; | 271 | $scope.newVtypeJet.productType = 'AVGAS'; |
272 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; | 272 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; |
273 | 273 | ||
274 | var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId; | 274 | var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId; |
275 | 275 | ||
276 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { | 276 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { |
277 | 277 | ||
278 | toastr.success('Successfully Added', { | 278 | toastr.success('Successfully Added', { |
279 | closeButton: true | 279 | closeButton: true |
280 | }) | 280 | }) |
281 | $('.addNewVtype').css('display', 'none'); | 281 | $('.addNewVtype').css('display', 'none'); |
282 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 282 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
283 | $scope.vTypeJets = result; | 283 | $scope.vTypeJets = result; |
284 | $scope.showLoader = false; | 284 | $scope.showLoader = false; |
285 | }) | 285 | }) |
286 | }) | 286 | }) |
287 | 287 | ||
288 | } | 288 | } |
289 | 289 | ||
290 | 290 | ||
291 | $scope.sendEmail = {}; | 291 | $scope.sendEmail = {}; |
292 | $scope.sendEmail.pricing = ''; | 292 | $scope.sendEmail.pricing = ''; |
293 | 293 | ||
294 | $scope.confirmMail = function(){ | 294 | $scope.confirmMail = function(){ |
295 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null) { | 295 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null) { |
296 | $('#confirm1').css('display', 'block'); | 296 | $('#confirm1').css('display', 'block'); |
297 | } | 297 | } |
298 | } | 298 | } |
299 | $scope.saveAndCloseConfirm = function(){ | 299 | $scope.saveAndCloseConfirm = function(){ |
300 | $('#confirm1').css('display', 'none'); | 300 | $('#confirm1').css('display', 'none'); |
301 | } | 301 | } |
302 | $scope.cancelAndCloseConfirm = function(){ | 302 | $scope.cancelAndCloseConfirm = function(){ |
303 | $scope.sendEmail = {}; | 303 | $scope.sendEmail = {}; |
304 | $scope.sendEmail.pricing = ''; | 304 | $scope.sendEmail.pricing = ''; |
305 | $('#confirm1').css('display', 'none'); | 305 | $('#confirm1').css('display', 'none'); |
306 | } | 306 | } |
307 | $scope.fuelPricing; | 307 | |
308 | updateFuelManagerService.getFuelPricing($scope.userProfileId).then(function(result) { | 308 | $scope.newFuelPricing = {}; |
309 | $scope.fuelPricing = result; | 309 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
310 | for (var i = 0; i<$scope.fuelPricing.length; i++) { | 310 | $scope.newFuelPricing = result; |
311 | if ($scope.fuelPricing[i].expirationDate != null) { | ||
312 | $scope.fuelPricing[i].expirationDate = new Date($scope.fuelPricing[i].expirationDate) | ||
313 | } | ||
314 | } | ||
315 | }) | 311 | }) |
312 | |||
316 | $scope.updateFuelPricing = {}; | 313 | $scope.updateFuelPricing = {}; |
317 | $scope.updateFuelPricing.fuelPricingList = []; | 314 | $scope.updateFuelPricing.fuelPricingList = []; |
318 | //$scope.testingArray = []; | ||
319 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; | 315 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; |
320 | $scope.updateFuelPricingClick = function(){ | 316 | $scope.updateFuelPricingClick = function(){ |
321 | for (var i = 0; i<$scope.fuelPricing.length; i++) { | 317 | $scope.showLoader = true; |
322 | if ($scope.fuelPricing[i].expirationDate != null) { | 318 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
323 | $scope.fuelPricing[i].expirationDate = $scope.fuelPricing[i].expirationDate.getTime(); | 319 | /*if ($scope.newFuelPricing[i].expirationDate != null) { |
320 | $scope.newFuelPricing[i].expirationDate = $scope.newFuelPricing[i].expirationDate.getTime(); | ||
321 | }*/ | ||
322 | if ($scope.newFuelPricing[i].fuelPricing != null) { | ||
323 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | ||
324 | if ($scope.newFuelPricing[i].fuelPricing.cost == null) { | ||
325 | $scope.newFuelPricing[i].fuelPricing.cost = ''; | ||
326 | } | ||
327 | if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { | ||
328 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; | ||
329 | } | ||
330 | if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { | ||
331 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; | ||
332 | } | ||
333 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { | ||
334 | $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; | ||
335 | } | ||
336 | $scope.updateFuelPricing.fuelPricingList.push({ | ||
337 | 'cost': $scope.newFuelPricing[i].fuelPricing.cost, | ||
338 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, | ||
339 | 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, | ||
340 | 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, | ||
341 | 'productId': $scope.newFuelPricing[i].id, | ||
342 | 'id': $scope.newFuelPricing[i].fuelPricing.id, | ||
343 | }) | ||
324 | } | 344 | } |
325 | |||
326 | $scope.updateFuelPricing.fuelPricingList.push({ | ||
327 | 'cost': $scope.fuelPricing[i].cost, | ||
328 | 'papMargin': $scope.fuelPricing[i].papMargin, | ||
329 | 'papTotal': $scope.fuelPricing[i].papTotal, | ||
330 | 'productId': $scope.fuelPricing[i].product.id, | ||
331 | 'expirationDate': $scope.fuelPricing[i].expirationDate | ||
332 | }) | ||
333 | } | 345 | } |
334 | |||
335 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { | 346 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { |
336 | toastr.success('Successfully Updated', { | 347 | toastr.success('Successfully Updated', { |
337 | closeButton: true | 348 | closeButton: true |
338 | }) | 349 | }) |
339 | updateFuelManagerService.getFuelPricing($scope.userProfileId).then(function(result) { | 350 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
340 | $scope.fuelPricing = result; | 351 | $scope.newFuelPricing = result; |
341 | for (var i = 0; i<$scope.fuelPricing.length; i++) { | 352 | $scope.showLoader = false; |
342 | if ($scope.fuelPricing[i].expirationDate != null) { | ||
343 | $scope.fuelPricing[i].expirationDate = new Date($scope.fuelPricing[i].expirationDate) | ||
344 | } | ||
345 | } | ||
346 | }) | 353 | }) |
347 | }) | 354 | }) |
348 | 355 | ||
349 | } | 356 | } |
350 | 357 | ||
351 | updateFuelManagerService.getFutureFuelPricing($scope.userProfileId).then(function(result) { | 358 | $scope.updateFutureFuelPricing = {}; |
352 | $scope.futureFuelPricing = result; | 359 | $scope.updateFutureFuelPricing.fuelPricingList = []; |
353 | console.log('$scope.futureFuelPricing', $scope.futureFuelPricing); | 360 | $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; |
354 | /*for (var i = 0; i<$scope.fuelPricing.length; i++) { | 361 | $scope.updateFutureFuelPricingClick = function(){ |
355 | if ($scope.fuelPricing[i].expirationDate != null) { | 362 | $scope.showLoader = true; |
356 | $scope.fuelPricing[i].expirationDate = new Date($scope.fuelPricing[i].expirationDate) | 363 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
364 | /*if ($scope.newFuelPricing[i].expirationDate != null) { | ||
365 | $scope.newFuelPricing[i].expirationDate = $scope.newFuelPricing[i].expirationDate.getTime(); | ||
366 | }*/ | ||
367 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | ||
368 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].futureFuelPricing.papMargin); | ||
369 | if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { | ||
370 | $scope.newFuelPricing[i].futureFuelPricing.cost = ''; | ||
371 | } | ||
372 | if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { | ||
373 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; | ||
374 | } | ||
375 | if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { | ||
376 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; | ||
377 | } | ||
378 | if ($scope.newFuelPricing[i].futureFuelPricing.expirationDate == null) { | ||
379 | $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; | ||
380 | } | ||
381 | $scope.updateFutureFuelPricing.fuelPricingList.push({ | ||
382 | 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, | ||
383 | 'papMargin': $scope.newFuelPricing[i].futureFuelPricing.papMargin, | ||
384 | 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, | ||
385 | 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.expirationDate, | ||
386 | 'productId': $scope.newFuelPricing[i].id, | ||
387 | 'id': $scope.newFuelPricing[i].futureFuelPricing.id, | ||
388 | }) |
app/partials/updateFuelManager/updateFuelManager.html
1 | <style> | 1 | <style> |
2 | .subnavbar .mainnav > li:nth-child(2) > a{ | 2 | .subnavbar .mainnav > li:nth-child(2) > a{ |
3 | color: #ff9900; | 3 | color: #ff9900; |
4 | } | 4 | } |
5 | </style> | 5 | </style> |
6 | <div class="myLoader" ng-show="showLoader"> | 6 | <div class="myLoader" ng-show="showLoader"> |
7 | <img src="../img/hourglass.gif" width="50px;"> | 7 | <img src="../img/hourglass.gif" width="50px;"> |
8 | </div> | 8 | </div> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <div class="row"> | 10 | <div class="row"> |
11 | <div class="col-md-5"> | 11 | <div class="col-md-5"> |
12 | <div class="widget stacked"> | 12 | <div class="widget stacked"> |
13 | <div class="widget-header"> | 13 | <div class="widget-header"> |
14 | <i class="fa fa-pencil"></i> | 14 | <i class="fa fa-pencil"></i> |
15 | <h3>Price Manager</h3> | 15 | <h3>Price Manager</h3> |
16 | <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> | 16 | <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> |
17 | <option value="" disabled selected="selected">Send Pricing Email</option> | 17 | <option value="" disabled selected="selected">Send Pricing Email</option> |
18 | <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> | 18 | <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> |
19 | <option disabled>_______________</option> | 19 | <option disabled>_______________</option> |
20 | <option value="all">Distribute All</option> | 20 | <option value="all">Distribute All</option> |
21 | </select> | 21 | </select> |
22 | </div> | 22 | </div> |
23 | <!-- /widget-header --> | 23 | <!-- /widget-header --> |
24 | <div class="widget-content"> | 24 | <div class="widget-content"> |
25 | <h4>Update Fuel Price Here</h4> | 25 | <h4>Update Fuel Price Here</h4> |
26 | <table class="table"> | 26 | <table class="table"> |
27 | <thead> | 27 | <thead> |
28 | <tr> | 28 | <tr> |
29 | <th> Product</th> | 29 | <th> Product</th> |
30 | <th> Cost</th> | 30 | <th> Cost</th> |
31 | <th> Margin</th> | 31 | <th> Margin</th> |
32 | <th> PAP(Total)</th> | 32 | <th> PAP(Total)</th> |
33 | <th style="color: #F90;"> Expires</th> | 33 | <th style="color: #F90;"> Expires</th> |
34 | </tr> | 34 | </tr> |
35 | </thead> | 35 | </thead> |
36 | <tbody> | 36 | <tbody> |
37 | <tr ng-repeat="fuelPricing in fuelPricing"> | 37 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
38 | <td> | 38 | <td> |
39 | <span style="line-height: 31px;">{{fuelPricing.product.name}}</span> | 39 | <span>{{fuelPricing.name}}</span> |
40 | </td> | 40 | </td> |
41 | <td> | 41 | <td> |
42 | <input type="text" class="form-control" ng-model="fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 0;"> | 42 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 0;"> |
43 | </td> | 43 | </td> |
44 | <td> | 44 | <td> |
45 | <input type="text" class="form-control" ng-model="fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 0;"> | 45 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 0;"> |
46 | </td> | 46 | </td> |
47 | <td> | 47 | <td> |
48 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.cost -- fuelPricing.papMargin}}</span> | 48 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin}}</span> |
49 | </td> | 49 | </td> |
50 | <td> | 50 | <td> |
51 | <input type="date" class="form-control" ng-model="fuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px; color: #F90;"> | 51 | <input type="date" class="form-control" ng-model="fuelPricing.fuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px; color: #F90;"> |
52 | </td> | 52 | </td> |
53 | </tr> | 53 | </tr> |
54 | </tbody> | 54 | </tbody> |
55 | </table> | 55 | </table> |
56 | <div class="row" style="margin-left: 0px;"> | 56 | <div class="row" style="margin-left: 0px;"> |
57 | <div class="col-md-12" style= "text-align: right;"> | 57 | <div class="col-md-12" style= "text-align: right;"> |
58 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> | 58 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | <!-- /widget-content --> | 62 | <!-- /widget-content --> |
63 | </div> | 63 | </div> |
64 | <!-- /widget --> | 64 | <!-- /widget --> |
65 | </div> | 65 | </div> |
66 | 66 | ||
67 | <div class="col-md-7"> | 67 | <div class="col-md-7"> |
68 | <div class="widget stacked"> | 68 | <div class="widget stacked"> |
69 | <div class="widget-header"> | 69 | <div class="widget-header"> |
70 | <i class="fa fa-pencil"></i> | 70 | <i class="fa fa-pencil"></i> |
71 | <h3><b>JET-A</b> Customer Margin Template</h3> | 71 | <h3><b>JET-A</b> Customer Margin Template</h3> |
72 | <div class="pull-right"> | 72 | <div class="pull-right"> |
73 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="icon-ok"></i>+   Add Aircraft</button> | 73 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="icon-ok"></i>+   Add Aircraft</button> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | <!-- /widget-header --> | 76 | <!-- /widget-header --> |
77 | <div class="widget-content"> | 77 | <div class="widget-content"> |
78 | <section id="accordions"> | 78 | <section id="accordions"> |
79 | <div class="newCustomAccordian"> | 79 | <div class="newCustomAccordian"> |
80 | <!-- tab 1 --> | 80 | <!-- tab 1 --> |
81 | <div ng-repeat="jets in aTypeJets"> | 81 | <div ng-repeat="jets in aTypeJets"> |
82 | <div class="customAccordianHeader" id="{{jets.id}}"> | 82 | <div class="customAccordianHeader" id="{{jets.id}}"> |
83 | <span>{{jets.marginName}}</span> | 83 | <span>{{jets.marginName}}</span> |
84 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 84 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
85 | <option value="" disabled selected>Pricing Structure</option> | 85 | <option value="" disabled selected>Pricing Structure</option> |
86 | <option value="minus">Retail-(minus)</option> | 86 | <option value="minus">Retail-(minus)</option> |
87 | <option value="plus">Cost+(plus)</option> | 87 | <option value="plus">Cost+(plus)</option> |
88 | <option value="equal">Direct=(equal)</option> | 88 | <option value="equal">Direct=(equal)</option> |
89 | </select> | 89 | </select> |
90 | <span style="margin-right: 0;">$</span> | 90 | <span style="margin-right: 0;">$</span> |
91 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 91 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
92 | <div class="pull-right"> | 92 | <div class="pull-right"> |
93 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> | 93 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> |
94 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> | 94 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> |
95 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)">Edit</button> | 95 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)">Edit</button> |
96 | </div> | 96 | </div> |
97 | <div class="clearfix"></div> | 97 | <div class="clearfix"></div> |
98 | </div> | 98 | </div> |
99 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 99 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
100 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> | 100 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> |
101 | <div class="tierListHead" style="height: 36px;"> | 101 | <div class="tierListHead" style="height: 36px;"> |
102 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 102 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
103 | </span> | 103 | </span> |
104 | <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> | 104 | <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> |
105 | 105 | ||
106 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 106 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
107 | <span ng-show="showEditTier">-</span> | 107 | <span ng-show="showEditTier">-</span> |
108 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 108 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
109 | <div class="clearfix"></div> | 109 | <div class="clearfix"></div> |
110 | </div> | 110 | </div> |
111 | <div class="tierListBody" style="height: 35px;"> | 111 | <div class="tierListBody" style="height: 35px;"> |
112 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 112 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
113 | 113 | ||
114 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 114 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
115 | 115 | ||
116 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal}})</span> | 116 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal}})</span> |
117 | 117 | ||
118 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 118 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
119 | 119 | ||
120 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 120 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
121 | 121 | ||
122 | <div class="clearfix"></div> | 122 | <div class="clearfix"></div> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | <div class="tierListWrap" style="width: 160px;"> | 125 | <div class="tierListWrap" style="width: 160px;"> |
126 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 126 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
127 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> | 127 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> |
128 | <span>-</span> | 128 | <span>-</span> |
129 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> | 129 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> |
130 | <div class="clearfix"></div> | 130 | <div class="clearfix"></div> |
131 | </div> | 131 | </div> |
132 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 132 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
133 | <span style="color: #449d44;">$</span> | 133 | <span style="color: #449d44;">$</span> |
134 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 134 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
135 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> | 135 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> |
136 | <div class="clearfix"></div> | 136 | <div class="clearfix"></div> |
137 | </div> | 137 | </div> |
138 | </div> | 138 | </div> |
139 | <!-- <div class="tierListWrap" style="width: 32px;"> | 139 | <!-- <div class="tierListWrap" style="width: 32px;"> |
140 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 140 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
141 | | 141 | |
142 | </div> | 142 | </div> |
143 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 143 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
144 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 144 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
145 | </div> | 145 | </div> |
146 | </div> --> | 146 | </div> --> |
147 | <div class="clearfix"></div> | 147 | <div class="clearfix"></div> |
148 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 148 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
149 | </div> | 149 | </div> |
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | </section> | 152 | </section> |
153 | <div class="row"> </div> | 153 | <div class="row"> </div> |
154 | <div class="row"> | 154 | <div class="row"> |
155 | <div class="form-group"> | 155 | <div class="form-group"> |
156 | <div class="col-lg-12 text-right"> | 156 | <div class="col-lg-12 text-right"> |
157 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 157 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
158 | <button type="reset" class="btn btn-default">Cancel</button> | 158 | <button type="reset" class="btn btn-default">Cancel</button> |
159 | </div> | 159 | </div> |
160 | </div> | 160 | </div> |
161 | </div> | 161 | </div> |
162 | </div> | 162 | </div> |
163 | <!-- /widget-content --> | 163 | <!-- /widget-content --> |
164 | </div> | 164 | </div> |
165 | <!-- /widget --> | 165 | <!-- /widget --> |
166 | </div> | 166 | </div> |
167 | <!-- /span6 --> | 167 | <!-- /span6 --> |
168 | </div> | 168 | </div> |
169 | <!-- /span12 --> | 169 | <!-- /span12 --> |
170 | </div> | 170 | </div> |
171 | <!-- /row --> | 171 | <!-- /row --> |
172 | <div class="container"> | 172 | <div class="container"> |
173 | <div class="row"> | 173 | <div class="row"> |
174 | <div class="col-md-5"> | 174 | <div class="col-md-5"> |
175 | <div class="widget stacked"> | 175 | <div class="widget stacked"> |
176 | <div class="widget-header"> | 176 | <div class="widget-header"> |
177 | <i class="fa fa-pencil"></i> | 177 | <i class="fa fa-pencil"></i> |
178 | <h3>Queue Future Pricing</h3> | 178 | <h3>Queue Future Pricing</h3> |
179 | </div> | 179 | </div> |
180 | <!-- /widget-header --> | 180 | <!-- /widget-header --> |
181 | <div class="widget-content"> | 181 | <div class="widget-content"> |
182 | <h4>Update Queue Future Fuel Pricing Here</h4> | 182 | <h4>Update Queue Future Fuel Pricing Here</h4> |
183 | <table class="table"> | 183 | <table class="table"> |
184 | <thead> | 184 | <thead> |
185 | <tr> | 185 | <tr> |
186 | <th> Product</th> | 186 | <th> Product</th> |
187 | <th> Cost</th> | 187 | <th> Cost</th> |
188 | <th> PAP(Total)</th> | 188 | <th> PAP(Total)</th> |
189 | <th> Deploy</th> | 189 | <th> Deploy</th> |
190 | <th style="color: #F90;"> Next Expiration</th> | 190 | <th style="color: #F90;"> Next Expiration</th> |
191 | </tr> | 191 | </tr> |
192 | </thead> | 192 | </thead> |
193 | <tbody> | 193 | <tbody> |
194 | <tr ng-repeat="fuelPricing in futureFuelPricing"> | 194 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
195 | <td> | 195 | <td> |
196 | <span style="line-height: 31px;">{{fuelPricing.product.name}}</span> | 196 | <span>{{fuelPricing.name}}</span> |
197 | </td> | 197 | </td> |
198 | <td> | 198 | <td> |
199 | <input type="text" class="form-control" ng-model="fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 0;"> | 199 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 0;"> |
200 | </td> | 200 | </td> |
201 | <td> | 201 | <td> |
202 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.cost -- fuelPricing.papMargin}}</span> | 202 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.papMargin}}</span> |
203 | </td> | 203 | </td> |
204 | <td> | 204 | <td> |
205 | <input type="date" class="form-control" ng-model="fuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px;"> | 205 | <input type="date" class="form-control " ng-model="fuelPricing.futureFuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px;"> |
206 | </td> | 206 | </td> |
207 | <td> | 207 | <td> |
208 | <input type="date" class="form-control" ng-model="fuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px; color: #F90;"> | 208 | <input type="date" class="form-control" ng-model="fuelPricing.futureFuelPricing.expirationDate" style="height:31px; padding: 6px 0; width: 100px; color: #F90;"> |
209 | </td> | 209 | </td> |
210 | </tr> | 210 | </tr> |
211 | </tbody> | 211 | </tbody> |
212 | </table> | 212 | </table> |
213 | <div class="row" style="margin-left: 0px;"> | 213 | <div class="row" style="margin-left: 0px;"> |
214 | <div class="col-md-12" style= "text-align: right;"> | 214 | <div class="col-md-12" style= "text-align: right;"> |
215 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> | 215 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()">Save</button> |
216 | </div> | 216 | </div> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | <!-- /widget-content --> | 219 | <!-- /widget-content --> |
220 | </div> | 220 | </div> |
221 | <!-- /widget --> | 221 | <!-- /widget --> |
222 | </div> | 222 | </div> |
223 | <div class="col-md-7"> | 223 | <div class="col-md-7"> |
224 | <div class="widget stacked"> | 224 | <div class="widget stacked"> |
225 | <div class="widget-header"> | 225 | <div class="widget-header"> |
226 | <i class="fa fa-pencil"></i> | 226 | <i class="fa fa-pencil"></i> |
227 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> | 227 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> |
228 | <div class="pull-right"> | 228 | <div class="pull-right"> |
229 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="icon-ok"></i>+   Add Aircraft</button> | 229 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="icon-ok"></i>+   Add Aircraft</button> |
230 | </div> | 230 | </div> |
231 | </div> | 231 | </div> |
232 | <!-- /widget-header --> | 232 | <!-- /widget-header --> |
233 | <div class="widget-content"> | 233 | <div class="widget-content"> |
234 | <section id="accordions"> | 234 | <section id="accordions"> |
235 | <div class="newCustomAccordian"> | 235 | <div class="newCustomAccordian"> |
236 | <!-- tab 1 --> | 236 | <!-- tab 1 --> |
237 | <div ng-repeat="jets in vTypeJets"> | 237 | <div ng-repeat="jets in vTypeJets"> |
238 | <div class="customAccordianHeader" id="{{jets.id}}"> | 238 | <div class="customAccordianHeader" id="{{jets.id}}"> |
239 | <span>{{jets.marginName}}</span> | 239 | <span>{{jets.marginName}}</span> |
240 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 240 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
241 | <option value="" disabled selected>Pricing Structure</option> | 241 | <option value="" disabled selected>Pricing Structure</option> |
242 | <option value="minus">Retail-(minus)</option> | 242 | <option value="minus">Retail-(minus)</option> |
243 | <option value="plus">Cost+(plus)</option> | 243 | <option value="plus">Cost+(plus)</option> |
244 | <option value="equal">Direct=(equal)</option> | 244 | <option value="equal">Direct=(equal)</option> |
245 | </select> | 245 | </select> |
246 | <span style="margin-right: 0;">$</span> | 246 | <span style="margin-right: 0;">$</span> |
247 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 247 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
248 | <div class="pull-right"> | 248 | <div class="pull-right"> |
249 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> | 249 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> |
250 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> | 250 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> |
251 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> | 251 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> |
252 | </div> | 252 | </div> |
253 | <div class="clearfix"></div> | 253 | <div class="clearfix"></div> |
254 | </div> | 254 | </div> |
255 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 255 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
256 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> | 256 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> |
257 | <div class="tierListHead" style="height: 36px;"> | 257 | <div class="tierListHead" style="height: 36px;"> |
258 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 258 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
259 | </span> | 259 | </span> |
260 | <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> | 260 | <i class="fa fa-pencil-square-o pull-right" ng-click="showEditTier = ! showEditTier" ng-hide="showEditTier" style="margin-top: 5px; cursor: pointer;" aria-hidden="true"></i> |
261 | 261 | ||
262 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 262 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
263 | <span ng-show="showEditTier">-</span> | 263 | <span ng-show="showEditTier">-</span> |
264 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 264 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
265 | <div class="clearfix"></div> | 265 | <div class="clearfix"></div> |
266 | </div> | 266 | </div> |
267 | <div class="tierListBody" style="height: 35px;"> | 267 | <div class="tierListBody" style="height: 35px;"> |
268 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 268 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
269 | 269 | ||
270 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 270 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
271 | 271 | ||
272 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal}})</span> | 272 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal}})</span> |
273 | 273 | ||
274 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 274 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
275 | 275 | ||
276 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 276 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
277 | 277 | ||
278 | <div class="clearfix"></div> | 278 | <div class="clearfix"></div> |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div class="tierListWrap" style="width: 160px;"> | 281 | <div class="tierListWrap" style="width: 160px;"> |
282 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 282 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
283 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> | 283 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> |
284 | <span>-</span> | 284 | <span>-</span> |
285 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> | 285 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> |
286 | <div class="clearfix"></div> | 286 | <div class="clearfix"></div> |
287 | </div> | 287 | </div> |
288 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 288 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
289 | <span style="color: #449d44;">$</span> | 289 | <span style="color: #449d44;">$</span> |
290 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 290 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
291 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> | 291 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> |
292 | <div class="clearfix"></div> | 292 | <div class="clearfix"></div> |
293 | </div> | 293 | </div> |
294 | </div> | 294 | </div> |
295 | <!-- <div class="tierListWrap" style="width: 32px;"> | 295 | <!-- <div class="tierListWrap" style="width: 32px;"> |
296 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 296 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
297 | | 297 | |
298 | </div> | 298 | </div> |
299 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 299 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
300 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 300 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
301 | </div> | 301 | </div> |
302 | </div> --> | 302 | </div> --> |
303 | <div class="clearfix"></div> | 303 | <div class="clearfix"></div> |
304 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 304 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
305 | </div> | 305 | </div> |
306 | </div> | 306 | </div> |
307 | </div> | 307 | </div> |
308 | </section> | 308 | </section> |
309 | <div class="row"> </div> | 309 | <div class="row"> </div> |
310 | <div class="row"> | 310 | <div class="row"> |
311 | <div class="form-group"> | 311 | <div class="form-group"> |
312 | <div class="col-lg-12 text-right"> | 312 | <div class="col-lg-12 text-right"> |
313 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 313 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
314 | <button type="reset" class="btn btn-default">Cancel</button> | 314 | <button type="reset" class="btn btn-default">Cancel</button> |
315 | </div> | 315 | </div> |
316 | </div> | 316 | </div> |
317 | </div> | 317 | </div> |
318 | </div> | 318 | </div> |
319 | <!-- /widget-content --> | 319 | <!-- /widget-content --> |
320 | </div> | 320 | </div> |
321 | <!-- /widget --> | 321 | <!-- /widget --> |
322 | </div> | 322 | </div> |
323 | <!-- /span6 --> | 323 | <!-- /span6 --> |
324 | </div> | 324 | </div> |
325 | </div> | 325 | </div> |
326 | </div> | 326 | </div> |
327 | </div> <!-- /container --> | 327 | </div> <!-- /container --> |
328 | 328 | ||
329 | 329 | ||
330 | <div class="addNewMargin" style="display: none;"> | 330 | <div class="addNewMargin" style="display: none;"> |
331 | <div class="customBackdrop"> | 331 | <div class="customBackdrop"> |
332 | <div class="customModalInner" style="max-width: 700px;"> | 332 | <div class="customModalInner" style="max-width: 700px;"> |
333 | <div class="customModelHead"> | 333 | <div class="customModelHead"> |
334 | <p class="pull-left"> | 334 | <p class="pull-left"> |
335 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 335 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
336 | Add New JET-A Customer Margin | 336 | Add New JET-A Customer Margin |
337 | </p> | 337 | </p> |
338 | <p class="pull-right"> | 338 | <p class="pull-right"> |
339 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> | 339 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> |
340 | </p> | 340 | </p> |
341 | <div class="clearfix"></div> | 341 | <div class="clearfix"></div> |
342 | </div> | 342 | </div> |
343 | <div class="customModelBody"> | 343 | <div class="customModelBody"> |
344 | 344 | ||
345 | <div class="customAccordianHeader customActive"> | 345 | <div class="customAccordianHeader customActive"> |
346 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> | 346 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> |
347 | <select class="form-control" ng-model="newJet.pricingStructure"> | 347 | <select class="form-control" ng-model="newJet.pricingStructure"> |
348 | <option value="" disabled selected>Pricing Structure</option> | 348 | <option value="" disabled selected>Pricing Structure</option> |
349 | <option value="minus">Retail-(minus)</option> | 349 | <option value="minus">Retail-(minus)</option> |
350 | <option value="plus">Cost+(plus)</option> | 350 | <option value="plus">Cost+(plus)</option> |
351 | <option value="equal">Direct=(equal)</option> | 351 | <option value="equal">Direct=(equal)</option> |
352 | </select> | 352 | </select> |
353 | <span style="margin-right: 0;">$</span> | 353 | <span style="margin-right: 0;">$</span> |
354 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> | 354 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> |
355 | <div class="clearfix"></div> | 355 | <div class="clearfix"></div> |
356 | </div> | 356 | </div> |
357 | <div class="customAccordianTabBody"> | 357 | <div class="customAccordianTabBody"> |
358 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 358 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
359 | </div> | 359 | </div> |
360 | 360 | ||
361 | </div> | 361 | </div> |
362 | <div class="customModelFooter text-center"> | 362 | <div class="customModelFooter text-center"> |
363 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> | 363 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> |
364 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> | 364 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> |
365 | </div> | 365 | </div> |
366 | </div> | 366 | </div> |
367 | </div> | 367 | </div> |
368 | </div> | 368 | </div> |
369 | 369 | ||
370 | <div class="addNewVtype" style="display: none;"> | 370 | <div class="addNewVtype" style="display: none;"> |
371 | <div class="customBackdrop"> | 371 | <div class="customBackdrop"> |
372 | <div class="customModalInner" style="max-width: 700px;"> | 372 | <div class="customModalInner" style="max-width: 700px;"> |
373 | <div class="customModelHead"> | 373 | <div class="customModelHead"> |
374 | <p class="pull-left"> | 374 | <p class="pull-left"> |
375 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 375 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
376 | Add New AVGAS 100LL Customer Margin Template | 376 | Add New AVGAS 100LL Customer Margin Template |
377 | </p> | 377 | </p> |
378 | <p class="pull-right"> | 378 | <p class="pull-right"> |
379 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> | 379 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> |
380 | </p> | 380 | </p> |
381 | <div class="clearfix"></div> | 381 | <div class="clearfix"></div> |
382 | </div> | 382 | </div> |
383 | <div class="customModelBody"> | 383 | <div class="customModelBody"> |
384 | 384 | ||
385 | <div class="customAccordianHeader customActive"> | 385 | <div class="customAccordianHeader customActive"> |
386 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> | 386 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> |
387 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> | 387 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> |
388 | <option value="" disabled selected>Pricing Structure</option> | 388 | <option value="" disabled selected>Pricing Structure</option> |
389 | <option value="minus">Retail-(minus)</option> | 389 | <option value="minus">Retail-(minus)</option> |
390 | <option value="plus">Cost+(plus)</option> | 390 | <option value="plus">Cost+(plus)</option> |
391 | <option value="equal">Direct=(equal)</option> | 391 | <option value="equal">Direct=(equal)</option> |
392 | </select> | 392 | </select> |
393 | <span style="margin-right: 0;">$</span> | 393 | <span style="margin-right: 0;">$</span> |
394 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> | 394 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> |
395 | <div class="clearfix"></div> | 395 | <div class="clearfix"></div> |
396 | </div> | 396 | </div> |
397 | <div class="customAccordianTabBody"> | 397 | <div class="customAccordianTabBody"> |
398 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> | 398 | <textarea class="form-control resizeTextarea" placeholder="Message..."></textarea> |
399 | </div> | 399 | </div> |
400 | 400 | ||
401 | </div> | 401 | </div> |
402 | <div class="customModelFooter text-center"> | 402 | <div class="customModelFooter text-center"> |
403 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> | 403 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> |
404 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> | 404 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> |
405 | </div> | 405 | </div> |
406 | </div> | 406 | </div> |
407 | </div> | 407 | </div> |
408 | </div> | 408 | </div> |
409 | 409 | ||
410 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> | 410 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> |
411 | <div class="customModalInner"> | 411 | <div class="customModalInner"> |
412 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 412 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
413 | <table> | 413 | <table> |
414 | <tr> | 414 | <tr> |
415 | <td> | 415 | <td> |
416 | <img src="img/info.png" style="width: 50px;"> | 416 | <img src="img/info.png" style="width: 50px;"> |
417 | </td> | 417 | </td> |
418 | <td> | 418 | <td> |
419 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 419 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
420 | </td> | 420 | </td> |
421 | </tr> | 421 | </tr> |
422 | </table> | 422 | </table> |
423 | </div> | 423 | </div> |
424 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 424 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
425 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> | 425 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> |
426 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 426 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
427 | </div> | 427 | </div> |
428 | </div> | 428 | </div> |
429 | </div> | 429 | </div> |
430 | 430 | ||
431 | <!-- Le javascript | 431 | <!-- Le javascript |
432 | ================================================== --> | 432 | ================================================== --> |
433 | <!-- Placed at the end of the document so the pages load faster --> | 433 | <!-- Placed at the end of the document so the pages load faster --> |
434 | <!-- <script> | 434 | <!-- <script> |
435 | CKEDITOR.replace( 'editor2', { | 435 | CKEDITOR.replace( 'editor2', { |
436 | height: 250, | 436 | height: 250, |
437 | extraPlugins: 'divarea' | 437 | extraPlugins: 'divarea' |
438 | } ); | 438 | } ); |
439 | </script> --> | 439 | </script> --> |
app/partials/updateFuelManager/updateFuelManager.service.js
1 | (function(){ | 1 | (function(){ |
2 | 'use strict'; | 2 | 'use strict'; |
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | .service('updateFuelManagerService', ['$q', '$http', 'BASE_URL', updateFuelManagerService]); | 4 | .service('updateFuelManagerService', ['$q', '$http', 'BASE_URL', updateFuelManagerService]); |
5 | 5 | ||
6 | function updateFuelManagerService($q, $http, BASE_URL) { | 6 | function updateFuelManagerService($q, $http, BASE_URL) { |
7 | var temp = {}; | 7 | var temp = {}; |
8 | 8 | ||
9 | this.getATypeJets = function(id) { | 9 | this.getATypeJets = function(id) { |
10 | 10 | ||
11 | var deferred = $q.defer(); | 11 | var deferred = $q.defer(); |
12 | $http({ | 12 | $http({ |
13 | method : 'GET', | 13 | method : 'GET', |
14 | url : BASE_URL.url +'/margin/getJetAType/'+id, | 14 | url : BASE_URL.url +'/margin/getJetAType/'+id, |
15 | headers : {'Content-Type': 'application/json'}, | 15 | headers : {'Content-Type': 'application/json'}, |
16 | }) | 16 | }) |
17 | .then(function (result){ | 17 | .then(function (result){ |
18 | deferred.resolve(result.data); | 18 | deferred.resolve(result.data); |
19 | },function (result){ | 19 | },function (result){ |
20 | deferred.resolve(result.data); | 20 | deferred.resolve(result.data); |
21 | }) | 21 | }) |
22 | return deferred.promise; | 22 | return deferred.promise; |
23 | } | 23 | } |
24 | 24 | ||
25 | this.getVTypeJets = function(id) { | 25 | this.getVTypeJets = function(id) { |
26 | 26 | ||
27 | var deferred = $q.defer(); | 27 | var deferred = $q.defer(); |
28 | $http({ | 28 | $http({ |
29 | method : 'GET', | 29 | method : 'GET', |
30 | url : BASE_URL.url +'/margin/getAVGASType/'+id, | 30 | url : BASE_URL.url +'/margin/getAVGASType/'+id, |
31 | headers : {'Content-Type': 'application/json'}, | 31 | headers : {'Content-Type': 'application/json'}, |
32 | }) | 32 | }) |
33 | .then(function (result){ | 33 | .then(function (result){ |
34 | deferred.resolve(result.data); | 34 | deferred.resolve(result.data); |
35 | },function (result){ | 35 | },function (result){ |
36 | deferred.resolve(result.data); | 36 | deferred.resolve(result.data); |
37 | }) | 37 | }) |
38 | return deferred.promise; | 38 | return deferred.promise; |
39 | } | 39 | } |
40 | 40 | ||
41 | this.addNewAtypeJetMargin = function(data){ | 41 | this.addNewAtypeJetMargin = function(data){ |
42 | var deferred = $q.defer(); | 42 | var deferred = $q.defer(); |
43 | $http({ | 43 | $http({ |
44 | method : 'POST', | 44 | method : 'POST', |
45 | url : BASE_URL.url +'/margin', | 45 | url : BASE_URL.url +'/margin', |
46 | headers : {'Content-Type': 'application/json'}, | 46 | headers : {'Content-Type': 'application/json'}, |
47 | data: data | 47 | data: data |
48 | }) | 48 | }) |
49 | .then(function (result){ | 49 | .then(function (result){ |
50 | deferred.resolve(result.data); | 50 | deferred.resolve(result.data); |
51 | },function (result){ | 51 | },function (result){ |
52 | deferred.resolve(result.data); | 52 | deferred.resolve(result.data); |
53 | }) | 53 | }) |
54 | return deferred.promise; | 54 | return deferred.promise; |
55 | } | 55 | } |
56 | 56 | ||
57 | this.addNewVtypeJet = function(data){ | 57 | this.addNewVtypeJet = function(data){ |
58 | var deferred = $q.defer(); | 58 | var deferred = $q.defer(); |
59 | $http({ | 59 | $http({ |
60 | method : 'POST', | 60 | method : 'POST', |
61 | url : BASE_URL.url +'/margin', | 61 | url : BASE_URL.url +'/margin', |
62 | headers : {'Content-Type': 'application/json'}, | 62 | headers : {'Content-Type': 'application/json'}, |
63 | data: data | 63 | data: data |
64 | }) | 64 | }) |
65 | .then(function (result){ | 65 | .then(function (result){ |
66 | deferred.resolve(result.data); | 66 | deferred.resolve(result.data); |
67 | },function (result){ | 67 | },function (result){ |
68 | deferred.resolve(result.data); | 68 | deferred.resolve(result.data); |
69 | }) | 69 | }) |
70 | return deferred.promise; | 70 | return deferred.promise; |
71 | } | 71 | } |
72 | 72 | ||
73 | this.editAtypeJetMargin = function(data){ | 73 | this.editAtypeJetMargin = function(data){ |
74 | var deferred = $q.defer(); | 74 | var deferred = $q.defer(); |
75 | $http({ | 75 | $http({ |
76 | method : 'PUT', | 76 | method : 'PUT', |
77 | url : BASE_URL.url +'/margin', | 77 | url : BASE_URL.url +'/margin', |
78 | headers : {'Content-Type': 'application/json'}, | 78 | headers : {'Content-Type': 'application/json'}, |
79 | data: data | 79 | data: data |
80 | }) | 80 | }) |
81 | .then(function (result){ | 81 | .then(function (result){ |
82 | deferred.resolve(result.data); | 82 | deferred.resolve(result.data); |
83 | },function (result){ | 83 | },function (result){ |
84 | deferred.resolve(result.data); | 84 | deferred.resolve(result.data); |
85 | }) | 85 | }) |
86 | return deferred.promise; | 86 | return deferred.promise; |
87 | } | 87 | } |
88 | 88 | ||
89 | this.editVtypeJetMargin = function(data){ | 89 | this.editVtypeJetMargin = function(data){ |
90 | var deferred = $q.defer(); | 90 | var deferred = $q.defer(); |
91 | $http({ | 91 | $http({ |
92 | method : 'PUT', | 92 | method : 'PUT', |
93 | url : BASE_URL.url +'/margin', | 93 | url : BASE_URL.url +'/margin', |
94 | headers : {'Content-Type': 'application/json'}, | 94 | headers : {'Content-Type': 'application/json'}, |
95 | data: data | 95 | data: data |
96 | }) | 96 | }) |
97 | .then(function (result){ | 97 | .then(function (result){ |
98 | deferred.resolve(result.data); | 98 | deferred.resolve(result.data); |
99 | },function (result){ | 99 | },function (result){ |
100 | deferred.resolve(result.data); | 100 | deferred.resolve(result.data); |
101 | }) | 101 | }) |
102 | return deferred.promise; | 102 | return deferred.promise; |
103 | } | 103 | } |
104 | 104 | ||
105 | this.getJetTiers = function(id) { | 105 | this.getJetTiers = function(id) { |
106 | 106 | ||
107 | var deferred = $q.defer(); | 107 | var deferred = $q.defer(); |
108 | $http({ | 108 | $http({ |
109 | method : 'GET', | 109 | method : 'GET', |
110 | url : BASE_URL.url +'/margin/getCustomMargins/'+id, | 110 | url : BASE_URL.url +'/margin/getCustomMargins/'+id, |
111 | headers : {'Content-Type': 'application/json'}, | 111 | headers : {'Content-Type': 'application/json'}, |
112 | }) | 112 | }) |
113 | .then(function (result){ | 113 | .then(function (result){ |
114 | deferred.resolve(result.data); | 114 | deferred.resolve(result.data); |
115 | },function (result){ | 115 | },function (result){ |
116 | deferred.resolve(result.data); | 116 | deferred.resolve(result.data); |
117 | }) | 117 | }) |
118 | return deferred.promise; | 118 | return deferred.promise; |
119 | } | 119 | } |
120 | 120 | ||
121 | this.addNewTier = function(data){ | 121 | this.addNewTier = function(data){ |
122 | var deferred = $q.defer(); | 122 | var deferred = $q.defer(); |
123 | $http({ | 123 | $http({ |
124 | method : 'POST', | 124 | method : 'POST', |
125 | url : BASE_URL.url +'/margin/custom', | 125 | url : BASE_URL.url +'/margin/custom', |
126 | headers : {'Content-Type': 'application/json'}, | 126 | headers : {'Content-Type': 'application/json'}, |
127 | data: data | 127 | data: data |
128 | }) | 128 | }) |
129 | .then(function (result){ | 129 | .then(function (result){ |
130 | deferred.resolve(result.data); | 130 | deferred.resolve(result.data); |
131 | },function (result){ | 131 | },function (result){ |
132 | deferred.resolve(result.data); | 132 | deferred.resolve(result.data); |
133 | }) | 133 | }) |
134 | return deferred.promise; | 134 | return deferred.promise; |
135 | } | 135 | } |
136 | 136 | ||
137 | this.editTier = function(data){ | 137 | this.editTier = function(data){ |
138 | var deferred = $q.defer(); | 138 | var deferred = $q.defer(); |
139 | $http({ | 139 | $http({ |
140 | method : 'PUT', | 140 | method : 'PUT', |
141 | url : BASE_URL.url +'/margin/custom', | 141 | url : BASE_URL.url +'/margin/custom', |
142 | headers : {'Content-Type': 'application/json'}, | 142 | headers : {'Content-Type': 'application/json'}, |
143 | data: data | 143 | data: data |
144 | }) | 144 | }) |
145 | .then(function (result){ | 145 | .then(function (result){ |
146 | deferred.resolve(result.data); | 146 | deferred.resolve(result.data); |
147 | },function (result){ | 147 | },function (result){ |
148 | deferred.resolve(result.data); | 148 | deferred.resolve(result.data); |
149 | }) | 149 | }) |
150 | return deferred.promise; | 150 | return deferred.promise; |
151 | } | 151 | } |
152 | 152 | ||
153 | this.deleteTier = function(id) { | 153 | this.deleteTier = function(id) { |
154 | 154 | ||
155 | var deferred = $q.defer(); | 155 | var deferred = $q.defer(); |
156 | $http({ | 156 | $http({ |
157 | method : 'DELETE', | 157 | method : 'DELETE', |
158 | url : BASE_URL.url +'/margin/customMargins/'+id, | 158 | url : BASE_URL.url +'/margin/customMargins/'+id, |
159 | headers : {'Content-Type': 'application/json'}, | 159 | headers : {'Content-Type': 'application/json'}, |
160 | }) | 160 | }) |
161 | .then(function (result){ | 161 | .then(function (result){ |
162 | deferred.resolve(result.data); | 162 | deferred.resolve(result.data); |
163 | },function (result){ | 163 | },function (result){ |
164 | deferred.resolve(result.data); | 164 | deferred.resolve(result.data); |
165 | }) | 165 | }) |
166 | return deferred.promise; | 166 | return deferred.promise; |
167 | } | 167 | } |
168 | 168 | ||
169 | this.getFuelPricing = function(id) { | 169 | this.getFuelPricingNew = function() { |
170 | 170 | ||
171 | var deferred = $q.defer(); | 171 | var deferred = $q.defer(); |
172 | $http({ | 172 | $http({ |
173 | method : 'GET', | 173 | method : 'GET', |
174 | url : BASE_URL.url +'/fuelPricing/getPriceManagerProducts/'+id, | 174 | url : BASE_URL.url +'/user/products', |
175 | headers : {'Content-Type': 'application/json'}, | 175 | headers : {'Content-Type': 'application/json'}, |
176 | }) | 176 | }) |
177 | .then(function (result){ | 177 | .then(function (result){ |
178 | deferred.resolve(result.data); | 178 | deferred.resolve(result.data); |
179 | },function (result){ | 179 | },function (result){ |
180 | deferred.resolve(result.data); | 180 | deferred.resolve(result.data); |
181 | }) | 181 | }) |
182 | return deferred.promise; | 182 | return deferred.promise; |
183 | } | 183 | } |
184 | 184 | ||
185 | this.updateFuelPricing = function(data){ | 185 | this.updateFuelPricing = function(data){ |
186 | var deferred = $q.defer(); | 186 | var deferred = $q.defer(); |
187 | $http({ | 187 | $http({ |
188 | method : 'POST', | 188 | method : 'POST', |
189 | url : BASE_URL.url +'/fuelPricing', | 189 | url : BASE_URL.url +'/fuelPricing', |
190 | headers : {'Content-Type': 'application/json'}, | 190 | headers : {'Content-Type': 'application/json'}, |
191 | data: data | 191 | data: data |
192 | }) | 192 | }) |
193 | .then(function (result){ | 193 | .then(function (result){ |
194 | deferred.resolve(result.data); | 194 | deferred.resolve(result.data); |
195 | },function (result){ | 195 | },function (result){ |
196 | deferred.resolve(result.data); | 196 | deferred.resolve(result.data); |
197 | }) | 197 | }) |
198 | return deferred.promise; | 198 | return deferred.promise; |
199 | } | 199 | } |
200 | 200 | ||
201 | this.getFutureFuelPricing = function(id) { | ||
202 | |||
203 | var deferred = $q.defer(); | ||
204 | $http({ | ||
205 | method : 'GET', | ||
206 | url : BASE_URL.url +'/fuelPricing/getFuturePriceManagerProducts/'+id, | ||
207 | headers : {'Content-Type': 'application/json'}, | ||
208 | }) | ||
209 | .then(function (result){ | ||
210 | deferred.resolve(result.data); | ||
211 | },function (result){ | ||
212 | deferred.resolve(result.data); | ||
213 | }) | ||
214 | return deferred.promise; | ||
215 | } | ||
216 | 201 | ||
217 | 202 | ||
218 | } | 203 | } |
219 | 204 | ||
220 | })(); | 205 | })(); |