Compare View
Commits (2)
Showing
8 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>Acufuel</title> | 7 | <title>Acufuel</title> |
8 | <!-- styles --> | 8 | <!-- styles --> |
9 | <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/> | 9 | <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.0.custom.min.css"/> |
10 | <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> | 10 | <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> |
11 | <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/> | 11 | <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"/> |
12 | <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" /> | 12 | <link rel="stylesheet" href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" /> |
13 | <!-- <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/> | 13 | <!-- <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.min.css"/> |
14 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> --> | 14 | <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.print.min.css"/> --> |
15 | <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/> | 15 | <link rel="stylesheet" href="bower_components/toastr/toastr.min.css"/> |
16 | <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/> | 16 | <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css"/> |
17 | <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet"> | 17 | <link href="bower_components/jqGrid/css/ui.jqgrid.css" rel="stylesheet"> |
18 | <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"> | 18 | <link href="bower_components/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"> |
19 | <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css" | 19 | <link href="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.css" |
20 | rel="stylesheet"> | 20 | rel="stylesheet"> |
21 | 21 | ||
22 | 22 | ||
23 | <link rel="stylesheet" href="css/main.css"/> | 23 | <link rel="stylesheet" href="css/main.css"/> |
24 | <link rel="stylesheet" href="css/base-admin-3.css"/> | 24 | <link rel="stylesheet" href="css/base-admin-3.css"/> |
25 | <link rel="stylesheet" href="css/base-admin-3-responsive.css"/> | 25 | <link rel="stylesheet" href="css/base-admin-3-responsive.css"/> |
26 | <link rel="stylesheet" href="css/custom.css"/> | 26 | <link rel="stylesheet" href="css/custom.css"/> |
27 | 27 | ||
28 | <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> | 28 | <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> |
29 | <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> | 29 | <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet"> |
30 | <link href="js/plugins/cirque/cirque.css" rel="stylesheet"> | 30 | <link href="js/plugins/cirque/cirque.css" rel="stylesheet"> |
31 | 31 | ||
32 | <link href="css/pages/dashboard.css" rel="stylesheet"> | 32 | <link href="css/pages/dashboard.css" rel="stylesheet"> |
33 | <link href="js/plugins/faq/faq.css" rel="stylesheet"> | 33 | <link href="js/plugins/faq/faq.css" rel="stylesheet"> |
34 | <link href="css/pages/plans.css" rel="stylesheet"> | 34 | <link href="css/pages/plans.css" rel="stylesheet"> |
35 | 35 | ||
36 | <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"> | 36 | <link href="js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"> |
37 | <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet"> | 37 | <link href="js/plugins/msgGrowl/css/msgGrowl.css" rel="stylesheet"> |
38 | <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"> | 38 | <link href="js/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"> |
39 | <link href="css/pages/pricing.css" rel="stylesheet"> | 39 | <link href="css/pages/pricing.css" rel="stylesheet"> |
40 | <link href="css/pages/reports.css" rel="stylesheet"> | 40 | <link href="css/pages/reports.css" rel="stylesheet"> |
41 | 41 | ||
42 | <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" /> | 42 | <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" /> |
43 | 43 | ||
44 | <link rel="stylesheet" type="text/css" href="css/ngTable.css"> | 44 | <link rel="stylesheet" type="text/css" href="css/ngTable.css"> |
45 | <link rel="stylesheet" href="bower_components/select2/select2.css"> | 45 | <link rel="stylesheet" href="bower_components/select2/select2.css"> |
46 | 46 | ||
47 | <!-- <link rel="stylesheet" type="text/css" href="css/fullcalender.css"> | 47 | <!-- <link rel="stylesheet" type="text/css" href="css/fullcalender.css"> |
48 | <link rel="stylesheet" type="text/css" href="css/fullcalenderprint.css"> --> | 48 | <link rel="stylesheet" type="text/css" href="css/fullcalenderprint.css"> --> |
49 | 49 | ||
50 | <!-- <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css"> --> | 50 | <!-- <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css"> --> |
51 | 51 | ||
52 | <!-- <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css' rel='stylesheet' /> | ||
53 | <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.print.min.css' rel='stylesheet' media='print' /> | ||
54 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js'></script> | ||
55 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js'></script> | ||
56 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery-ui.min.js'></script> --> | ||
57 | |||
58 | |||
52 | <!-- <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css' rel='stylesheet' /> | 59 | </head> |
53 | <link href='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.print.min.css' rel='stylesheet' media='print' /> | 60 | <body> |
54 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js'></script> | 61 | <!-- views --> |
55 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js'></script> | 62 | |
56 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery-ui.min.js'></script> --> | 63 | <!-- scripts --> |
57 | 64 | ||
58 | 65 | <script src="bower_components/jquery/dist/jquery.min.js"></script> | |
59 | </head> | 66 | <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> |
60 | <body> | 67 | <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script> |
61 | <!-- views --> | 68 | <!--<script src="js/plugins/flot/jquery.flot.js"></script> |
62 | 69 | <script src="js/plugins/flot/jquery.flot.pie.js"></script> | |
63 | <!-- scripts --> | 70 | <script src="js/plugins/flot/jquery.flot.resize.js"></script> |
64 | 71 | <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>--> | |
65 | <script src="bower_components/jquery/dist/jquery.min.js"></script> | 72 | <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script> |
66 | <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> | 73 | <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script> |
67 | <script src="js/libs/jquery-ui-1.10.0.custom.min.js"></script> | 74 | <script src="js/plugins/validate/jquery.validate.js"></script> |
68 | <!--<script src="js/plugins/flot/jquery.flot.js"></script> | 75 | <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script> |
69 | <script src="js/plugins/flot/jquery.flot.pie.js"></script> | 76 | |
70 | <script src="js/plugins/flot/jquery.flot.resize.js"></script> | 77 | <script src="bower_components/angular/angular.min.js"></script> |
71 | <script src="js/plugins/flot/jquery.flot.orderBars.js"></script>--> | 78 | <script src="bower_components/angular-route/angular-route.js"></script> |
72 | <script src="js/plugins/hoverIntent/jquery.hoverIntent.minified.js"></script> | 79 | <script src="bower_components/angular-cookies/angular-cookies.min.js"></script> |
73 | <script src="js/plugins/lightbox/jquery.lightbox.min.js"></script> | 80 | <script src="bower_components/angular-resource/angular-resource.min.js"></script> |
74 | <script src="js/plugins/validate/jquery.validate.js"></script> | 81 | <script src="bower_components/angular-animate/angular-animate.js"></script> |
75 | <script src="js/plugins/msgbox/jquery.msgbox.min.js"></script> | 82 | <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> |
76 | 83 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> | |
77 | <script src="bower_components/angular/angular.min.js"></script> | 84 | <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script> |
78 | <script src="bower_components/angular-route/angular-route.js"></script> | 85 | <script src='bower_components/moment/min/moment.min.js'></script> |
79 | <script src="bower_components/angular-cookies/angular-cookies.min.js"></script> | 86 | <!-- <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> --> |
80 | <script src="bower_components/angular-resource/angular-resource.min.js"></script> | 87 | <script src='bower_components/toastr/toastr.min.js'></script> |
81 | <script src="bower_components/angular-animate/angular-animate.js"></script> | 88 | <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script> |
82 | <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> | 89 | <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> |
83 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> | 90 | <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script> |
84 | <script src="bower_components/angular-ui-router/release/angular-ui-router.min.js"></script> | 91 | <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script> |
85 | <script src='bower_components/moment/min/moment.min.js'></script> | 92 | <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script> |
86 | <!-- <script src="bower_components/fullcalendar/dist/fullcalendar.min.js"></script> --> | 93 | <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script> |
87 | <script src='bower_components/toastr/toastr.min.js'></script> | 94 | <script src="bower_components/select2/select2.js"></script> |
88 | <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script> | 95 | <script src="bower_components/angular-ui-select2/src/select2.js"></script> |
89 | <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> | 96 | <script src="bower_components/angular-ckeditor/angular-ckeditor.js"></script> |
90 | <script src="bower_components/jqGrid/js/i18n/grid.locale-en.js"></script> | 97 | |
91 | <script src="bower_components/jqGrid/js/jquery.jqGrid.min.js"></script> | 98 | <!-- <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script> --> |
92 | <script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script> | 99 | |
93 | <script src="bower_components/angular-bootstrap-toggle/dist/angular-bootstrap-toggle.min.js"></script> | 100 | |
94 | <script src="bower_components/select2/select2.js"></script> | 101 | <!-- |
95 | <script src="bower_components/angular-ui-select2/src/select2.js"></script> | 102 | <script src="scripts/inspinia.js"></script> |
96 | <script src="bower_components/angular-ckeditor/angular-ckeditor.js"></script> | 103 | <script src="plugins/iCheck/icheck.min.js"></script> |
97 | 104 | --> | |
98 | <!-- <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script> --> | 105 | |
99 | 106 | <!-- <script src="./js/Application.js"></script> | |
100 | 107 | <script src="js/charts/area.js"></script> | |
101 | <!-- | 108 | <script src="js/charts/donut.js"></script> |
102 | <script src="scripts/inspinia.js"></script> | 109 | <script src="js/charts/pie.js"></script> |
103 | <script src="plugins/iCheck/icheck.min.js"></script> | 110 | <script src="js/charts/bar.js"></script> |
104 | --> | 111 | <script src="js/demo/validation.js"></script> |
105 | 112 | <script src="js/charts/line.js"></script> --> | |
106 | <!-- <script src="./js/Application.js"></script> | 113 | <script src="js/demo/faq.js"></script> |
107 | <script src="js/charts/area.js"></script> | 114 | <script src="js/plugins/faq/faq.js"></script> |
108 | <script src="js/charts/donut.js"></script> | 115 | <script src="js/demo/gallery.js"></script> |
109 | <script src="js/charts/pie.js"></script> | 116 | <script src="js/demo/sliders.js"></script> |
110 | <script src="js/charts/bar.js"></script> | 117 | <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script> |
111 | <script src="js/demo/validation.js"></script> | 118 | <script src="js/demo/notifications.js"></script> |
112 | <script src="js/charts/line.js"></script> --> | 119 | |
113 | <script src="js/demo/faq.js"></script> | 120 | <script src="js/ngTable.js"></script> |
114 | <script src="js/plugins/faq/faq.js"></script> | 121 | |
115 | <script src="js/demo/gallery.js"></script> | 122 | <!-- <script src="js/fullcalender.js"></script> --> |
116 | <script src="js/demo/sliders.js"></script> | 123 | |
117 | <script src="js/plugins/msgGrowl/js/msgGrowl.js"></script> | 124 | <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script> |
118 | <script src="js/demo/notifications.js"></script> | 125 | <script src="https://code.highcharts.com/maps/highmaps.js"></script> |
119 | 126 | <script src="https://code.highcharts.com/maps/modules/data.js"></script> | |
120 | <script src="js/ngTable.js"></script> | 127 | <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script> |
121 | 128 | <!-- Controllers --> | |
122 | <!-- <script src="js/fullcalender.js"></script> --> | 129 | <script src="js/app.js"></script> |
123 | 130 | <script src="js/app.constant.js"></script> | |
124 | <script src="http://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js"></script> | 131 | <script src="partials/login/login.controller.js"></script> |
125 | <script src="https://code.highcharts.com/maps/highmaps.js"></script> | 132 | <script src="partials/customers/customers.controller.js"></script> |
126 | <script src="https://code.highcharts.com/maps/modules/data.js"></script> | 133 | <script src="partials/analytics/analytics.controller.js"></script> |
127 | <script src="https://code.highcharts.com/mapdata/countries/us/us-all.js"></script> | 134 | <script src="partials/account/account.controller.js"></script> |
128 | <!-- Controllers --> | 135 | <script src="partials/elements/elements.controller.js"></script> |
129 | <script src="js/app.js"></script> | 136 | <script src="partials/error/error.controller.js"></script> |
130 | <script src="js/app.constant.js"></script> | 137 | <script src="partials/faq/faq.controller.js"></script> |
131 | <script src="partials/login/login.controller.js"></script> | 138 | <script src="partials/forms/forms.controller.js"></script> |
132 | <script src="partials/customers/customers.controller.js"></script> | 139 | <script src="partials/fuelManager/fuelManager.controller.js"></script> |
133 | <script src="partials/analytics/analytics.controller.js"></script> | 140 | <script src="partials/pricing/pricing.controller.js"></script> |
134 | <script src="partials/account/account.controller.js"></script> | 141 | <script src="partials/reports/reports.controller.js"></script> |
135 | <script src="partials/elements/elements.controller.js"></script> | 142 | <script src="partials/scheduler/scheduler.controller.js"></script> |
136 | <script src="partials/error/error.controller.js"></script> | 143 | <script src="partials/signup/signup.controller.js"></script> |
137 | <script src="partials/faq/faq.controller.js"></script> | 144 | <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> |
138 | <script src="partials/forms/forms.controller.js"></script> | 145 | <script src="partials/viewCompany/viewCompany.controller.js"></script> |
139 | <script src="partials/fuelManager/fuelManager.controller.js"></script> | 146 | <script src="partials/dashboard/dashboard.controller.js"></script> |
140 | <script src="partials/pricing/pricing.controller.js"></script> | 147 | <script src="partials/fuelOrders/fuelOrders.controller.js"></script> |
141 | <script src="partials/reports/reports.controller.js"></script> | 148 | <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> |
142 | <script src="partials/scheduler/scheduler.controller.js"></script> | 149 | <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> |
143 | <script src="partials/signup/signup.controller.js"></script> | 150 | <script src="partials/Accept/Accept.controller.js"></script> |
144 | <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> | 151 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> |
145 | <script src="partials/viewCompany/viewCompany.controller.js"></script> | 152 | <script src="partials/ContactView/ContactView.controller.js"></script> |
146 | <script src="partials/dashboard/dashboard.controller.js"></script> | 153 | <script src="partials/FuelVendors/FuelVendors.controller.js"></script> |
147 | <script src="partials/fuelOrders/fuelOrders.controller.js"></script> | 154 | <script src="partials/delselected/delselected.controller.js"></script> |
148 | <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> | 155 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> |
149 | <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> | 156 | <script src="partials/viewcontact/viewcontact.controller.js"></script> |
150 | <script src="partials/Accept/Accept.controller.js"></script> | 157 | <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> |
151 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> | 158 | <script src="partials/accountSetting/accountSetting.Controller.js"></script> |
152 | <script src="partials/ContactView/ContactView.controller.js"></script> | 159 | <script src="partials/viewVendorContact/viewVendorContact.Controller.js"></script> |
153 | <script src="partials/FuelVendors/FuelVendors.controller.js"></script> | 160 | <script src="partials/enterFuelOrder/enterFuelOrder.controller.js"></script> |
154 | <script src="partials/delselected/delselected.controller.js"></script> | 161 | |
155 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> | 162 | <script src="partials/main/main.controller.js"></script> |
156 | <script src="partials/viewcontact/viewcontact.controller.js"></script> | 163 | <div ui-view></div> |
157 | <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> | 164 | <!-- End controllers --> |
158 | <script src="partials/accountSetting/accountSetting.Controller.js"></script> | 165 | |
159 | <script src="partials/viewVendorContact/viewVendorContact.Controller.js"></script> | 166 | |
160 | <script src="partials/enterFuelOrder/enterFuelOrder.controller.js"></script> | 167 | <!-- services --> |
161 | 168 | <script src="partials/login/login.service.js"></script> | |
162 | <script src="partials/main/main.controller.js"></script> | 169 | <script src="partials/customers/customers.service.js"></script> |
163 | <div ui-view></div> | 170 | <script src="partials/analytics/analytics.service.js"></script> |
164 | <!-- End controllers --> | 171 | <script src="partials/account/account.service.js"></script> |
165 | 172 | <script src="partials/elements/elements.service.js"></script> | |
166 | 173 | <script src="partials/error/error.service.js"></script> | |
167 | <!-- services --> | 174 | <script src="partials/faq/faq.service.js"></script> |
168 | <script src="partials/login/login.service.js"></script> | 175 | <script src="partials/forms/forms.service.js"></script> |
169 | <script src="partials/customers/customers.service.js"></script> | 176 | <script src="partials/fuelManager/fuelManager.service.js"></script> |
170 | <script src="partials/analytics/analytics.service.js"></script> | 177 | <script src="partials/pricing/pricing.service.js"></script> |
171 | <script src="partials/account/account.service.js"></script> | 178 | <script src="partials/reports/reports.service.js"></script> |
172 | <script src="partials/elements/elements.service.js"></script> | 179 | <script src="partials/scheduler/scheduler.service.js"></script> |
173 | <script src="partials/error/error.service.js"></script> | 180 | <script src="partials/signup/signup.service.js"></script> |
174 | <script src="partials/faq/faq.service.js"></script> | 181 | <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> |
175 | <script src="partials/forms/forms.service.js"></script> | 182 | <script src="partials/viewCompany/viewCompany.service.js"></script> |
176 | <script src="partials/fuelManager/fuelManager.service.js"></script> | 183 | <script src="partials/dashboard/dashboard.service.js"></script> |
177 | <script src="partials/pricing/pricing.service.js"></script> | 184 | <script src="partials/fuelOrders/fuelOrders.service.js"></script> |
178 | <script src="partials/reports/reports.service.js"></script> | 185 | <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> |
179 | <script src="partials/scheduler/scheduler.service.js"></script> | 186 | <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> |
180 | <script src="partials/signup/signup.service.js"></script> | 187 | <script src="partials/Accept/Accept.service.js"></script> |
181 | <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> | 188 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> |
182 | <script src="partials/viewCompany/viewCompany.service.js"></script> | 189 | <script src="partials/ContactView/ContactView.service.js"></script> |
183 | <script src="partials/dashboard/dashboard.service.js"></script> | 190 | <script src="partials/FuelVendors/FuelVendors.service.js"></script> |
184 | <script src="partials/fuelOrders/fuelOrders.service.js"></script> | 191 | <script src="partials/delselected/delselected.service.js"></script> |
185 | <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> | 192 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> |
186 | <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> | 193 | <script src="partials/viewcontact/viewcontact.service.js"></script> |
187 | <script src="partials/Accept/Accept.service.js"></script> | 194 | <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> |
188 | <!-- <script src="partials/AircraftList/AircraftList.controller.js"></script> --> | 195 | <script src="partials/accountSetting/accountSetting.Service.js"></script> |
189 | <script src="partials/ContactView/ContactView.service.js"></script> | 196 | <script src="partials/viewVendorContact/viewVendorContact.Service.js"></script> |
190 | <script src="partials/FuelVendors/FuelVendors.service.js"></script> | 197 | <script src="partials/enterFuelOrder/enterFuelOrder.service.js"></script> |
191 | <script src="partials/delselected/delselected.service.js"></script> | 198 | |
192 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> | 199 | <script src="partials/main/main.service.js"></script> |
193 | <script src="partials/viewcontact/viewcontact.service.js"></script> | 200 | <script src='https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.js'></script> |
194 | <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> | 201 | |
195 | <script src="partials/accountSetting/accountSetting.Service.js"></script> | 202 | </body> |
196 | <script src="partials/viewVendorContact/viewVendorContact.Service.js"></script> | 203 | </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', 'ngTable', 'ui.select2', 'ckeditor']) | 4 | angular.module('acufuel', ['ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor']) |
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 | .state("app.viewVendorContact", { | 237 | .state("app.viewVendorContact", { |
238 | url: "/viewVendorContact/:id", | 238 | url: "/viewVendorContact/:id", |
239 | templateUrl: "partials/viewVendorContact/viewVendorContact.html", | 239 | templateUrl: "partials/viewVendorContact/viewVendorContact.html", |
240 | controller: "viewVendorContactController" | 240 | controller: "viewVendorContactController" |
241 | }) | 241 | }) |
242 | 242 | ||
243 | .state("app.enterFuelOrder", { | 243 | .state("app.enterFuelOrder", { |
244 | url: "/enterFuelOrder", | 244 | url: "/enterFuelOrder", |
245 | templateUrl: "partials/enterFuelOrder/enterFuelOrder.html", | 245 | templateUrl: "partials/enterFuelOrder/enterFuelOrder.html", |
246 | controller: "enterFuelOrderController" | 246 | controller: "enterFuelOrderController" |
247 | }) | 247 | }) |
248 | 248 | ||
249 | } | 249 | } |
250 | ]) | 250 | ]) |
251 | 251 | ||
252 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { | 252 | .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { |
253 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { | 253 | $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { |
254 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); | 254 | $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); |
255 | 255 | ||
256 | LoginService.isAuthorized = function (authorizedRoles) { | 256 | LoginService.isAuthorized = function (authorizedRoles) { |
257 | if (!angular.isArray(authorizedRoles)) { | 257 | if (!angular.isArray(authorizedRoles)) { |
258 | authorizedRoles = [authorizedRoles]; | 258 | authorizedRoles = [authorizedRoles]; |
259 | } | 259 | } |
260 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); | 260 | var userdata = JSON.parse(window.localStorage.getItem('currentUser')); |
261 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); | 261 | return (userdata? (authorizedRoles.indexOf(userdata.type) !== -1): false); |
262 | } | 262 | } |
263 | 263 | ||
264 | if ('data' in next && 'authorizedRoles' in next.data) { | 264 | if ('data' in next && 'authorizedRoles' in next.data) { |
265 | var authorizedRoles = next.data.authorizedRoles; | 265 | var authorizedRoles = next.data.authorizedRoles; |
266 | if (!LoginService.isAuthorized(authorizedRoles)) { | 266 | if (!LoginService.isAuthorized(authorizedRoles)) { |
267 | event.preventDefault(); | 267 | event.preventDefault(); |
268 | if($state.current.name.length == 0) { | 268 | if($state.current.name.length == 0) { |
269 | $state.go('login') | 269 | $state.go('login') |
270 | } else { | 270 | } else { |
271 | $state.go($state.current, {}, {reload: true}); | 271 | $state.go($state.current, {}, {reload: true}); |
272 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); | 272 | $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); |
273 | } | 273 | } |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | if (LoginService.isAuthenticated()) { | 277 | if (LoginService.isAuthenticated()) { |
278 | if (next.name == 'login') { | 278 | if (next.name == 'login') { |
279 | event.preventDefault(); | 279 | event.preventDefault(); |
280 | $state.go('app.dashboard'); | 280 | $state.go('app.dashboard'); |
281 | } | 281 | } |
282 | } | 282 | } |
283 | }); | 283 | }); |
284 | }]) | 284 | }]) |
285 | 285 | ||
286 | 286 | ||
287 | .directive("datepicker",function(){ | 287 | .directive("datepicker",function(){ |
288 | return { | 288 | return { |
289 | restrict:"A", | 289 | restrict:"A", |
290 | link:function(scope,el,attr){ | 290 | link:function(scope,el,attr){ |
291 | el.datepicker(); | 291 | el.datepicker(); |
292 | } | 292 | } |
293 | }; | 293 | }; |
294 | }) | 294 | }) |
295 | 295 | ||
296 | 296 | ||
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | ||
301 | 301 |
app/partials/enterFuelOrder/enterFuelOrder.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]); | 5 | .controller('enterFuelOrderController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'enterFuelOrderService', enterFuelOrderController]); |
6 | 6 | ||
7 | function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) { | 7 | function enterFuelOrderController($scope, $rootScope, $uibModal, $filter, $http, enterFuelOrderService) { |
8 | $scope.showLoader = true; | 8 | $scope.showLoader = true; |
9 | 9 | ||
10 | $scope.companyList = {}; | 10 | $scope.companyList = {}; |
11 | 11 | ||
12 | enterFuelOrderService.getAllCompanies().then(function(result) { | 12 | enterFuelOrderService.getAllCompanies().then(function(result) { |
13 | $scope.showLoader = false; | 13 | $scope.showLoader = false; |
14 | $scope.companyList = result; | 14 | $scope.companyList = result; |
15 | }) | 15 | }) |
16 | 16 | ||
17 | $scope.order = {}; | 17 | $scope.order = {}; |
18 | $scope.dispatchOrder = {}; | 18 | $scope.dispatchOrder = {}; |
19 | $scope.dispatchOrder.fuelOrderList = []; | 19 | $scope.dispatchOrder.fuelOrderList = []; |
20 | $scope.order.upliftDate = ''; | 20 | $scope.order.upliftDate = ''; |
21 | $scope.order.departingDate = ''; | 21 | $scope.order.departingDate = ''; |
22 | $scope.selectedCompanyName = ''; | 22 | $scope.selectedCompanyName = ''; |
23 | $scope.selectedCompanyId = ''; | 23 | $scope.selectedCompanyId = ''; |
24 | $scope.marginId = ''; | 24 | $scope.marginId = ''; |
25 | 25 | ||
26 | enterFuelOrderService.getFuelPricingNew().then(function(margins) { | 26 | enterFuelOrderService.getFuelPricingNew().then(function(margins) { |
27 | $scope.marginList = margins; | 27 | $scope.marginList = margins; |
28 | //console.log('$scope.marginList', $scope.marginList); | 28 | //console.log('$scope.marginList', $scope.marginList); |
29 | }) | 29 | }) |
30 | 30 | ||
31 | $scope.getAircraft = function(company){ | 31 | $scope.getAircraft = function(company){ |
32 | $scope.selectedCompanyName = company; | 32 | $scope.selectedCompanyName = company; |
33 | $scope.showLoader = true; | 33 | $scope.showLoader = true; |
34 | for (var i = 0; i < $scope.companyList.length; i++) { | 34 | for (var i = 0; i < $scope.companyList.length; i++) { |
35 | if ($scope.companyList[i].companyName == company) { | 35 | if ($scope.companyList[i].companyName == company) { |
36 | $scope.selectedCompanyId = $scope.companyList[i].id; | 36 | $scope.selectedCompanyId = $scope.companyList[i].id; |
37 | $scope.marginId = $scope.companyList[i].margin.id; | 37 | $scope.marginId = $scope.companyList[i].margin.id; |
38 | if ($scope.selectedCompanyId != '') { | 38 | if ($scope.selectedCompanyId != '') { |
39 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { | 39 | enterFuelOrderService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { |
40 | $scope.aircraftList = aircraft; | 40 | $scope.aircraftList = aircraft; |
41 | }) | 41 | }) |
42 | } | 42 | } |
43 | if ($scope.marginId != '') { | 43 | if ($scope.marginId != '') { |
44 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { | 44 | enterFuelOrderService.getJetTiers($scope.marginId).then(function(tiers) { |
45 | $scope.tierList = tiers; | 45 | $scope.tierList = tiers; |
46 | $scope.showLoader = false; | 46 | $scope.showLoader = false; |
47 | }) | 47 | }) |
48 | }else{ | 48 | }else{ |
49 | $scope.showLoader = false; | 49 | $scope.showLoader = false; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | } | 54 | } |
55 | 55 | ||
56 | $scope.dispatchFuel = function(){ | 56 | $scope.dispatchFuel = function(){ |
57 | $scope.showLoader = true; | ||
57 | $scope.showLoader = true; | 58 | $scope.order.companyId = $scope.selectedCompanyId; |
58 | $scope.order.companyId = $scope.selectedCompanyId; | 59 | if ($scope.order.upliftDate != '') { |
59 | if ($scope.order.upliftDate != '') { | 60 | $scope.order.upliftDate = new Date($scope.order.upliftDate); |
60 | $scope.order.upliftDate = new Date($scope.order.upliftDate); | 61 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); |
61 | $scope.order.upliftDate = $scope.order.upliftDate.getTime(); | 62 | } |
62 | } | 63 | if ($scope.order.departingDate != '') { |
63 | if ($scope.order.departingDate != '') { | 64 | $scope.order.departingDate = new Date($scope.order.departingDate); |
64 | $scope.order.departingDate = new Date($scope.order.departingDate); | 65 | $scope.order.departingDate = $scope.order.departingDate.getTime(); |
65 | $scope.order.departingDate = $scope.order.departingDate.getTime(); | 66 | } |
66 | } | 67 | $scope.dispatchOrder.fuelOrderList.push($scope.order); |
67 | $scope.dispatchOrder.fuelOrderList.push($scope.order); | 68 | console.log('$scope.order', $scope.dispatchOrder); |
68 | console.log('$scope.order', $scope.dispatchOrder); | 69 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { |
69 | enterFuelOrderService.dispathFuelOrder($scope.dispatchOrder).then(function(result) { | 70 | console.log('result', result); |
71 | $scope.showLoader = false; | ||
72 | $scope.order = {}; | ||
73 | toastr.success('Fuel Order Dispatched Successfully', { | ||
74 | closeButton: true | ||
75 | }) | ||
70 | console.log('result', result); | 76 | }) |
71 | $scope.showLoader = false; | 77 | } |
72 | $scope.order = {}; | 78 | |
73 | toastr.success('Fuel Order Dispatched Successfully', { | 79 | } |
app/partials/scheduler/scheduler.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | //Load controller | 3 | //Load controller |
4 | angular.module('acufuel') | 4 | angular.module('acufuel') |
5 | 5 | ||
6 | .controller('schedulerController', ['$scope', function($scope) { | 6 | .controller('schedulerController', ['$scope', function($scope) { |
7 | 7 | ||
8 | $scope.test = "Testing..."; | 8 | $scope.test = "Testing..."; |
9 | 9 | ||
10 | |||
11 | /*$('#calendar').fullCalendar({ | 10 | |
12 | header: { | 11 | /*$('#calendar').fullCalendar({ |
13 | left: 'prev,next today', | 12 | header: { |
14 | center: 'title', | 13 | left: 'prev,next today', |
15 | right: 'month,agendaWeek,agendaDay,listWeek' | 14 | center: 'title', |
16 | }, | 15 | right: 'month,agendaWeek,agendaDay,listWeek' |
17 | defaultDate: '2017-05-12', | 16 | }, |
18 | navLinks: true, // can click day/week names to navigate views | 17 | defaultDate: '2017-05-12', |
19 | editable: true, | 18 | navLinks: true, // can click day/week names to navigate views |
20 | eventLimit: true, // allow "more" link when too many events | 19 | editable: true, |
21 | events: [ | 20 | eventLimit: true, // allow "more" link when too many events |
22 | { | 21 | events: [ |
23 | title: 'All Day Event', | 22 | { |
24 | start: '2017-05-01' | 23 | title: 'All Day Event', |
25 | }, | 24 | start: '2017-05-01' |
26 | { | 25 | }, |
27 | title: 'Long Event', | 26 | { |
28 | start: '2017-05-07', | 27 | title: 'Long Event', |
29 | end: '2017-05-10' | 28 | start: '2017-05-07', |
30 | }, | 29 | end: '2017-05-10' |
31 | { | 30 | }, |
32 | id: 999, | 31 | { |
33 | title: 'Repeating Event', | 32 | id: 999, |
34 | start: '2017-05-09T16:00:00' | 33 | title: 'Repeating Event', |
35 | }, | 34 | start: '2017-05-09T16:00:00' |
36 | { | 35 | }, |
37 | id: 999, | 36 | { |
38 | title: 'Repeating Event', | 37 | id: 999, |
39 | start: '2017-05-16T16:00:00' | 38 | title: 'Repeating Event', |
40 | }, | 39 | start: '2017-05-16T16:00:00' |
41 | { | 40 | }, |
42 | title: 'Conference', | 41 | { |
43 | start: '2017-05-11', | 42 | title: 'Conference', |
44 | end: '2017-05-13' | 43 | start: '2017-05-11', |
45 | }, | 44 | end: '2017-05-13' |
46 | { | 45 | }, |
47 | title: 'Meeting', | 46 | { |
48 | start: '2017-05-12T10:30:00', | 47 | title: 'Meeting', |
49 | end: '2017-05-12T12:30:00' | 48 | start: '2017-05-12T10:30:00', |
50 | }, | 49 | end: '2017-05-12T12:30:00' |
51 | { | 50 | }, |
52 | title: 'Lunch', | 51 | { |
53 | start: '2017-05-12T12:00:00' | 52 | title: 'Lunch', |
54 | }, | 53 | start: '2017-05-12T12:00:00' |
55 | { | 54 | }, |
56 | title: 'Meeting', | 55 | { |
57 | start: '2017-05-12T14:30:00' | 56 | title: 'Meeting', |
58 | }, | 57 | start: '2017-05-12T14:30:00' |
59 | { | 58 | }, |
60 | title: 'Happy Hour', | 59 | { |
61 | start: '2017-05-12T17:30:00' | 60 | title: 'Happy Hour', |
62 | }, | 61 | start: '2017-05-12T17:30:00' |
63 | { | 62 | }, |
64 | title: 'Dinner', | 63 | { |
65 | start: '2017-05-12T20:00:00' | 64 | title: 'Dinner', |
66 | }, | 65 | start: '2017-05-12T20:00:00' |
67 | { | 66 | }, |
68 | title: 'Birthday Party', | 67 | { |
69 | start: '2017-05-13T07:00:00' | 68 | title: 'Birthday Party', |
70 | }, | 69 | start: '2017-05-13T07:00:00' |
71 | { | 70 | }, |
72 | title: 'Click for Google', | 71 | { |
73 | start: '2017-05-28' | 72 | title: 'Click for Google', |
74 | } | 73 | start: '2017-05-28' |
75 | ] | 74 | } |
76 | }); | 75 | ] |
77 | 76 | }); | |
78 | });*/ | 77 | |
79 | 78 | });*/ | |
80 | 79 | ||
81 | }]); | 80 | |
82 | 81 | }]); | |
83 | 82 |
app/partials/scheduler/scheduler.html
1 | <style type="text/css"> | 1 | <style type="text/css"> |
2 | .newUlView { | 2 | .newUlView { |
3 | padding: 5px; | 3 | padding: 5px; |
4 | margin: 3px; | 4 | margin: 3px; |
5 | } | 5 | } |
6 | .subnavbar .mainnav > li:nth-child(4) > a{ | 6 | .subnavbar .mainnav > li:nth-child(4) > a{ |
7 | color: #ff9900; | 7 | color: #ff9900; |
8 | } | 8 | } |
9 | .fc button, .fc-button-group, .fc-time-grid .fc-event .fc-time span{ | 9 | .fc button, .fc-button-group, .fc-time-grid .fc-event .fc-time span{ |
10 | display: block; | 10 | display: block; |
11 | } | 11 | } |
12 | .fc-state-default{ | 12 | .fc-state-default{ |
13 | background-color: #fff; | 13 | background-color: #fff; |
14 | background-image: none; | 14 | background-image: none; |
15 | } | 15 | } |
16 | .fc-state-active, .fc-state-down{ | 16 | .fc-state-active, .fc-state-down{ |
17 | box-shadow: none; | 17 | box-shadow: none; |
18 | color: #fff; | 18 | color: #fff; |
19 | background-color: #ff9900; | 19 | background-color: #ff9900; |
20 | } | 20 | } |
21 | |||
22 | |||
23 | /*#wrap { | ||
24 | width: 1100px; | ||
25 | margin: 0 auto; | ||
26 | } | ||
27 | |||
28 | #external-events { | ||
29 | float: left; | ||
30 | width: 150px; | ||
31 | padding: 0 10px; | ||
32 | border: 1px solid #ccc; | ||
33 | background: #eee; | ||
34 | text-align: left; | ||
35 | } | ||
36 | |||
37 | #external-events h4 { | ||
38 | font-size: 16px; | ||
39 | margin-top: 0; | ||
40 | padding-top: 1em; | ||
41 | } | ||
42 | |||
43 | #external-events .fc-event { | ||
44 | margin: 10px 0; | ||
45 | cursor: pointer; | ||
46 | } | ||
47 | |||
48 | #external-events p { | ||
49 | margin: 1.5em 0; | ||
50 | font-size: 11px; | ||
51 | color: #666; | ||
52 | } | ||
53 | |||
54 | #external-events p input { | ||
55 | margin: 0; | ||
56 | vertical-align: middle; | ||
57 | } | ||
58 | |||
59 | #calendar { | ||
60 | float: right; | ||
61 | width: 900px; | ||
62 | }*/ | ||
21 | 63 | </style> | |
22 | 64 | <div class="main"> | |
23 | /*#wrap { | 65 | <div class="container"> |
24 | width: 1100px; | 66 | <div class="row"> |
25 | margin: 0 auto; | 67 | <div class="col-xs-12"> |
26 | } | 68 | <!-- <div id='wrap'> |
27 | 69 | ||
28 | #external-events { | 70 | <div id='external-events'> |
29 | float: left; | 71 | <h4>Draggable Events</h4> |
30 | width: 150px; | 72 | <div class='fc-event'>My Event 1</div> |
31 | padding: 0 10px; | 73 | <div class='fc-event'>My Event 2</div> |
32 | border: 1px solid #ccc; | 74 | <div class='fc-event'>My Event 3</div> |
33 | background: #eee; | 75 | <div class='fc-event'>My Event 4</div> |
34 | text-align: left; | 76 | <div class='fc-event'>My Event 5</div> |
35 | } | 77 | <p> |
36 | 78 | <input type='checkbox' id='drop-remove' /> | |
37 | #external-events h4 { | 79 | <label for='drop-remove'>remove after drop</label> |
38 | font-size: 16px; | 80 | </p> |
39 | margin-top: 0; | 81 | </div> |
40 | padding-top: 1em; | 82 | |
41 | } | 83 | <div id='calendar'></div> |
42 | 84 | ||
43 | #external-events .fc-event { | 85 | <div style='clear:both'></div> |
44 | margin: 10px 0; | ||
45 | cursor: pointer; | ||
46 | } | ||
47 | |||
48 | #external-events p { | ||
49 | margin: 1.5em 0; | ||
50 | font-size: 11px; | ||
51 | color: #666; | ||
52 | } | ||
53 | |||
54 | #external-events p input { | ||
55 | margin: 0; |
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.options = { | ||
21 | language: 'en', | ||
22 | allowedContent: true, | ||
23 | entities: false | ||
24 | }; | ||
25 | |||
26 | // Called when the editor is completely ready. | ||
27 | $scope.onReady = function () { | ||
28 | // ... | ||
29 | }; | ||
30 | |||
20 | $scope.options = { | 31 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); |
21 | language: 'en', | 32 | |
22 | allowedContent: true, | 33 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
23 | entities: false | 34 | $scope.aTypeJets = result; |
24 | }; | 35 | $scope.showLoader = false; |
25 | 36 | }) | |
26 | // Called when the editor is completely ready. | 37 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
27 | $scope.onReady = function () { | 38 | $scope.vTypeJets = result; |
28 | // ... | 39 | $scope.showLoader = false; |
29 | }; | 40 | }) |
30 | 41 | $scope.toggleJestAccordian = function(id, index){ | |
31 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); | 42 | $scope.showLoader = true; |
32 | 43 | $('.'+id).slideDown(); | |
33 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 44 | $('#'+id).addClass('customActive'); |
34 | $scope.aTypeJets = result; | 45 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
35 | $scope.showLoader = false; | 46 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
36 | }) | 47 | $('#'+id+' .btn-default').css('display', 'none'); |
37 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 48 | |
38 | $scope.vTypeJets = result; | 49 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
39 | $scope.showLoader = false; | 50 | $scope.aTypeJets[index].tierList = tiers; |
40 | }) | 51 | $scope.showLoader = false; |
41 | $scope.toggleJestAccordian = function(id, index){ | 52 | }) |
42 | $scope.showLoader = true; | 53 | } |
43 | $('.'+id).slideDown(); | 54 | $scope.toggleVtypeJestAccordian = function(id, index){ |
44 | $('#'+id).addClass('customActive'); | 55 | $scope.showLoader = true; |
45 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 56 | $('.'+id).slideDown(); |
46 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 57 | $('#'+id).addClass('customActive'); |
47 | $('#'+id+' .btn-default').css('display', 'none'); | 58 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
48 | 59 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | |
49 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 60 | $('#'+id+' .btn-default').css('display', 'none'); |
50 | $scope.aTypeJets[index].tierList = tiers; | 61 | |
51 | $scope.showLoader = false; | 62 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
52 | }) | 63 | $scope.vTypeJets[index].tierList = tiers; |
53 | } | 64 | $scope.showLoader = false; |
54 | $scope.toggleVtypeJestAccordian = function(id, index){ | 65 | }) |
55 | $scope.showLoader = true; | 66 | } |
56 | $('.'+id).slideDown(); | 67 | //$scope.trData = {}; |
57 | $('#'+id).addClass('customActive'); | 68 | $scope.addNewTier = function(id, trData, index){ |
58 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 69 | $scope.showLoader = true; |
59 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 70 | $scope.tr = {}; |
60 | $('#'+id+' .btn-default').css('display', 'none'); | 71 | $scope.tr[index] = {}; |
61 | 72 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; | |
62 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 73 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; |
63 | $scope.vTypeJets[index].tierList = tiers; | 74 | $scope.tr[index].margin = trData[index].margin; |
64 | $scope.showLoader = false; | 75 | $scope.tr[index].marginTotal = '1.00'; |
65 | }) | 76 | $scope.tr[index].marginTemplateId = id; |
66 | } | 77 | |
67 | //$scope.trData = {}; | 78 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ |
68 | $scope.addNewTier = function(id, trData, index){ | 79 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
69 | $scope.showLoader = true; | 80 | |
70 | $scope.tr = {}; | 81 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
71 | $scope.tr[index] = {}; | 82 | toastr.success('Successfully Added', { |
72 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; | 83 | closeButton: true |
73 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; | 84 | }) |
74 | $scope.tr[index].margin = trData[index].margin; | 85 | trData[index].minTierBreak = ''; |
75 | $scope.tr[index].marginTotal = '1.00'; | 86 | trData[index].maxTierBreak = ''; |
76 | $scope.tr[index].marginTemplateId = id; | 87 | trData[index].margin = ''; |
77 | 88 | ||
78 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 89 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
79 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 90 | $scope.aTypeJets[index].tierList = tiers; |
80 | 91 | $scope.showLoader = false; | |
81 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 92 | }) |
82 | toastr.success('Successfully Added', { | 93 | }) |
83 | closeButton: true | 94 | } |
84 | }) | 95 | |
85 | trData[index].minTierBreak = ''; | 96 | $scope.addNewVtypeTier = function(id, vtrData, index){ |
86 | trData[index].maxTierBreak = ''; | 97 | $scope.showLoader = true; |
87 | trData[index].margin = ''; | 98 | $scope.tr = {}; |
88 | 99 | $scope.tr[index] = {}; | |
89 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 100 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; |
90 | $scope.aTypeJets[index].tierList = tiers; | 101 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; |
91 | $scope.showLoader = false; | 102 | $scope.tr[index].margin = vtrData[index].margin; |
92 | }) | 103 | $scope.tr[index].marginTotal = '1.00'; |
93 | }) | 104 | $scope.tr[index].marginTemplateId = id; |
94 | } | 105 | |
95 | 106 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | |
96 | $scope.addNewVtypeTier = function(id, vtrData, index){ | 107 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
97 | $scope.showLoader = true; | 108 | |
98 | $scope.tr = {}; | 109 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
99 | $scope.tr[index] = {}; | 110 | toastr.success('Successfully Added', { |
100 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; | 111 | closeButton: true |
101 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; | 112 | }) |
102 | $scope.tr[index].margin = vtrData[index].margin; | 113 | vtrData[index].minTierBreak = ''; |
103 | $scope.tr[index].marginTotal = '1.00'; | 114 | vtrData[index].maxTierBreak = ''; |
104 | $scope.tr[index].marginTemplateId = id; | 115 | vtrData[index].margin = ''; |
105 | 116 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | |
106 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 117 | $scope.vTypeJets[index].tierList = tiers; |
107 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 118 | $scope.showLoader = false; |
108 | 119 | }) | |
109 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 120 | }) |
110 | toastr.success('Successfully Added', { | 121 | } |
111 | closeButton: true | 122 | |
112 | }) | 123 | $scope.editTier = function(tier, index){ |
113 | vtrData[index].minTierBreak = ''; | 124 | $scope.showLoader = true; |
114 | vtrData[index].maxTierBreak = ''; | 125 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
115 | vtrData[index].margin = ''; | 126 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
116 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 127 | |
117 | $scope.vTypeJets[index].tierList = tiers; | 128 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
118 | $scope.showLoader = false; | 129 | toastr.success('Successfully Updated', { |
119 | }) | 130 | closeButton: true |
120 | }) | 131 | }) |
121 | } | 132 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
122 | 133 | $scope.aTypeJets[index].tierList = tiers; | |
123 | $scope.editTier = function(tier, index){ | 134 | $scope.showLoader = false; |
124 | $scope.showLoader = true; | 135 | }) |
125 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 136 | }) |
126 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 137 | |
127 | 138 | } | |
128 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 139 | |
129 | toastr.success('Successfully Updated', { | 140 | $scope.editVtypeTier = function(tier, index){ |
130 | closeButton: true | 141 | $scope.showLoader = true; |
131 | }) | 142 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
132 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 143 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
133 | $scope.aTypeJets[index].tierList = tiers; | 144 | |
134 | $scope.showLoader = false; | 145 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
135 | }) | 146 | toastr.success('Successfully Updated', { |
136 | }) | 147 | closeButton: true |
137 | 148 | }) | |
138 | } | 149 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
139 | 150 | $scope.vTypeJets[index].tierList = tiers; | |
140 | $scope.editVtypeTier = function(tier, index){ | 151 | $scope.showLoader = false; |
141 | $scope.showLoader = true; | 152 | }) |
142 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 153 | }) |
143 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 154 | |
144 | 155 | } | |
145 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 156 | |
146 | toastr.success('Successfully Updated', { | 157 | $scope.deleteTierObject = {}; |
147 | closeButton: true | 158 | $scope.deleteTier = function(id, jetid, index){ |
148 | }) | 159 | $scope.deleteTierObject.id = id; |
149 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 160 | $scope.deleteTierObject.jetId = jetid; |
150 | $scope.vTypeJets[index].tierList = tiers; | 161 | $scope.deleteTierObject.index = index; |
151 | $scope.showLoader = false; | 162 | $('#deleteTierConfirm').css('display', 'block'); |
152 | }) | 163 | } |
153 | }) | 164 | |
154 | 165 | $scope.confirmDeleteTier = function(){ | |
155 | } | 166 | $scope.showLoader = true; |
156 | 167 | updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) { | |
157 | $scope.deleteTierObject = {}; | 168 | toastr.success(''+result.success+'', { |
158 | $scope.deleteTier = function(id, jetid, index){ | 169 | closeButton: true |
159 | $scope.deleteTierObject.id = id; | 170 | }) |
160 | $scope.deleteTierObject.jetId = jetid; | 171 | updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) { |
161 | $scope.deleteTierObject.index = index; | 172 | $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers; |
162 | $('#deleteTierConfirm').css('display', 'block'); | 173 | $scope.showLoader = false; |
163 | } | 174 | $scope.deleteTierObject = {}; |
164 | 175 | }) | |
165 | $scope.confirmDeleteTier = function(){ | 176 | }) |
166 | $scope.showLoader = true; | 177 | $('#deleteTierConfirm').css('display', 'none'); |
167 | updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) { | 178 | } |
168 | toastr.success(''+result.success+'', { | 179 | |
169 | closeButton: true | 180 | $scope.cancelTierDelete = function(){ |
170 | }) | 181 | console.log('cancel'); |
171 | updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) { | 182 | $('#deleteTierConfirm').css('display', 'none'); |
172 | $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers; | 183 | $scope.deleteTierObject = {}; |
173 | $scope.showLoader = false; | 184 | } |
174 | $scope.deleteTierObject = {}; | 185 | |
175 | }) | 186 | /*$scope.deleteVtypeTier = function(id, jetid, index){ |
176 | }) | 187 | $scope.showLoader = true; |
177 | $('#deleteTierConfirm').css('display', 'none'); | 188 | updateFuelManagerService.deleteTier(id).then(function(result) { |
178 | } | 189 | toastr.success(''+result.success+'', { |
179 | 190 | closeButton: true | |
180 | $scope.cancelTierDelete = function(){ | 191 | }) |
181 | console.log('cancel'); | 192 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { |
182 | $('#deleteTierConfirm').css('display', 'none'); | 193 | $scope.vTypeJets[index].tierList = tiers; |
183 | $scope.deleteTierObject = {}; | 194 | $scope.showLoader = false; |
184 | } | 195 | }) |
185 | 196 | }) | |
186 | /*$scope.deleteVtypeTier = function(id, jetid, index){ | 197 | }*/ |
187 | $scope.showLoader = true; | 198 | |
188 | updateFuelManagerService.deleteTier(id).then(function(result) { | 199 | $scope.deleteVtypeTierObject = {}; |
189 | toastr.success(''+result.success+'', { | 200 | $scope.deleteVtypeTier = function(id, jetid, index){ |
190 | closeButton: true | 201 | $scope.deleteVtypeTierObject.id = id; |
191 | }) | 202 | $scope.deleteVtypeTierObject.jetId = jetid; |
192 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { | 203 | $scope.deleteVtypeTierObject.index = index; |
193 | $scope.vTypeJets[index].tierList = tiers; | 204 | $('#deleteVtypeTierConfirm').css('display', 'block'); |
194 | $scope.showLoader = false; | 205 | } |
195 | }) | 206 | |
196 | }) | 207 | $scope.confirmDeleteVtypeTier = function(){ |
197 | }*/ | 208 | $scope.showLoader = true; |
198 | 209 | updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) { | |
199 | $scope.deleteVtypeTierObject = {}; | 210 | toastr.success(''+result.success+'', { |
200 | $scope.deleteVtypeTier = function(id, jetid, index){ | 211 | closeButton: true |
201 | $scope.deleteVtypeTierObject.id = id; | 212 | }) |
202 | $scope.deleteVtypeTierObject.jetId = jetid; | 213 | updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) { |
203 | $scope.deleteVtypeTierObject.index = index; | 214 | $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers; |
204 | $('#deleteVtypeTierConfirm').css('display', 'block'); | 215 | $scope.showLoader = false; |
205 | } | 216 | $scope.deleteVtypeTierObject = {}; |
206 | 217 | }) | |
207 | $scope.confirmDeleteVtypeTier = function(){ | 218 | }) |
208 | $scope.showLoader = true; | 219 | $('#deleteVtypeTierConfirm').css('display', 'none'); |
209 | updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) { | 220 | } |
210 | toastr.success(''+result.success+'', { | 221 | |
211 | closeButton: true | 222 | $scope.cancelVtypeTierDelete = function(){ |
212 | }) | 223 | console.log('cancel'); |
213 | updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) { | 224 | $('#deleteVtypeTierConfirm').css('display', 'none'); |
214 | $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers; | 225 | $scope.deleteVtypeTierObject = {}; |
215 | $scope.showLoader = false; | 226 | } |
216 | $scope.deleteVtypeTierObject = {}; | 227 | |
217 | }) | 228 | $scope.saveJetAccordian = function(jets){ |
218 | }) | 229 | $scope.showLoader = true; |
219 | $('#deleteVtypeTierConfirm').css('display', 'none'); | 230 | $scope.jetsDetail = jets; |
220 | } | 231 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
221 | 232 | //console.log('jets', $scope.jetsDetail); | |
222 | $scope.cancelVtypeTierDelete = function(){ | 233 | $('.'+$scope.jetsDetail.id).slideUp(); |
223 | console.log('cancel'); | 234 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
224 | $('#deleteVtypeTierConfirm').css('display', 'none'); | 235 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
225 | $scope.deleteVtypeTierObject = {}; | 236 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
226 | } | 237 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
227 | 238 | ||
228 | $scope.saveJetAccordian = function(jets){ | 239 | var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; |
229 | $scope.showLoader = true; | 240 | |
230 | $scope.jetsDetail = jets; | 241 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { |
231 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 242 | console.log('newJet', editJetData); |
232 | //console.log('jets', $scope.jetsDetail); | 243 | toastr.success('Successfully Updated', { |
233 | $('.'+$scope.jetsDetail.id).slideUp(); | 244 | closeButton: true |
234 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 245 | }) |
235 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 246 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
236 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 247 | console.log('result', result); |
237 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 248 | $scope.aTypeJets = result; |
238 | 249 | $scope.showLoader = false; | |
239 | var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; | 250 | }) |
240 | 251 | }) | |
241 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { | 252 | |
242 | console.log('newJet', editJetData); | 253 | } |
243 | toastr.success('Successfully Updated', { | 254 | |
255 | $scope.closeAccordian = function(jets){ | ||
256 | $('.'+jets.id).slideUp(); | ||
257 | $('#'+jets.id).removeClass('customActive'); | ||
258 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | ||
259 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | ||
260 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | ||
261 | } | ||
262 | |||
263 | $scope.closeAccordianVtype = function(jets){ | ||
264 | $('.'+jets.id).slideUp(); | ||
265 | $('#'+jets.id).removeClass('customActive'); | ||
266 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | ||
267 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | ||
268 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | ||
269 | } | ||
270 | |||
244 | closeButton: true | 271 | $scope.saveVtypeJetAccordian = function(jets){ |
245 | }) | 272 | $scope.showLoader = true; |
246 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 273 | $scope.jetsDetail = jets; |
247 | console.log('result', result); | 274 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
248 | $scope.aTypeJets = result; | 275 | //console.log('jets', $scope.jetsDetail); |
249 | $scope.showLoader = false; | 276 | $('.'+$scope.jetsDetail.id).slideUp(); |
250 | }) | 277 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
251 | }) | 278 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
252 | 279 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | |
253 | } | 280 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
254 | 281 | ||
255 | $scope.closeAccordian = function(jets){ | 282 | var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; |
256 | $('.'+jets.id).slideUp(); | 283 | |
257 | $('#'+jets.id).removeClass('customActive'); | 284 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { |
258 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | 285 | console.log('newJet', editVtypeJetData); |
259 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | 286 | toastr.success('Successfully Updated', { |
260 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | 287 | closeButton: true |
261 | } | 288 | }) |
262 | 289 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | |
263 | $scope.closeAccordianVtype = function(jets){ | 290 | $scope.vTypeJets = result; |
264 | $('.'+jets.id).slideUp(); | 291 | console.log('second jets', result); |
265 | $('#'+jets.id).removeClass('customActive'); | 292 | $scope.showLoader = false; |
266 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | 293 | }) |
267 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | 294 | }) |
268 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | 295 | |
269 | } | 296 | } |
270 | 297 | ||
271 | $scope.saveVtypeJetAccordian = function(jets){ | 298 | $scope.newJet = {}; |
272 | $scope.showLoader = true; | 299 | |
273 | $scope.jetsDetail = jets; | 300 | $scope.addNewMarginBtn = function(){ |
274 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 301 | $('.addNewMargin').css('display', 'block'); |
275 | //console.log('jets', $scope.jetsDetail); | 302 | } |
276 | $('.'+$scope.jetsDetail.id).slideUp(); | 303 | $scope.closeMarginPopup = function(){ |
277 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 304 | $('.addNewMargin').css('display', 'none'); |
278 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 305 | $scope.newJet = {}; |
279 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 306 | } |
280 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 307 | |
281 | 308 | //$scope.newJet.productType = ''; | |
282 | var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; | 309 | |
283 | 310 | $scope.addNewATypeJet = function(){ | |
284 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { | 311 | $scope.showLoader = true; |
285 | console.log('newJet', editVtypeJetData); | 312 | $scope.newJet.productType = 'JET-A'; |
286 | toastr.success('Successfully Updated', { | 313 | $scope.newJet.userProfileId = $scope.userProfileId; |
287 | closeButton: true | 314 | |
288 | }) | 315 | var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message; |
289 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 316 | |
290 | $scope.vTypeJets = result; | 317 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { |
291 | console.log('second jets', result); | 318 | console.log('newJet', jetData); |
292 | $scope.showLoader = false; | 319 | toastr.success('Successfully Added', { |
293 | }) | 320 | closeButton: true |
294 | }) | 321 | }) |
295 | 322 | $('.addNewMargin').css('display', 'none'); | |
296 | } | 323 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
297 | 324 | console.log('result', result); | |
298 | $scope.newJet = {}; | 325 | $scope.aTypeJets = result; |
299 | 326 | $scope.showLoader = false; | |
300 | $scope.addNewMarginBtn = function(){ | 327 | }) |
301 | $('.addNewMargin').css('display', 'block'); | 328 | }) |
302 | } | 329 | } |
303 | $scope.closeMarginPopup = function(){ | 330 | |
304 | $('.addNewMargin').css('display', 'none'); | 331 | $scope.newVtypeJet = {}; |
305 | $scope.newJet = {}; | 332 | |
306 | } | 333 | $scope.addNewVtypePop = function(){ |
307 | 334 | $('.addNewVtype').css('display', 'block'); | |
308 | //$scope.newJet.productType = ''; | 335 | } |
309 | 336 | $scope.closeNewVtypePop = function(){ | |
310 | $scope.addNewATypeJet = function(){ | 337 | $('.addNewVtype').css('display', 'none'); |
311 | $scope.showLoader = true; | 338 | $scope.newVtypeJet = {}; |
312 | $scope.newJet.productType = 'JET-A'; | 339 | } |
313 | $scope.newJet.userProfileId = $scope.userProfileId; | 340 | |
314 | 341 | $scope.addNewVTypeJet = function(){ | |
315 | var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message; | 342 | $scope.showLoader = true; |
316 | 343 | $scope.newVtypeJet.productType = 'AVGAS'; | |
317 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { | 344 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; |
318 | console.log('newJet', jetData); | 345 | |
319 | toastr.success('Successfully Added', { | 346 | var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId+'&message='+$scope.newVtypeJet.message; |
320 | closeButton: true | 347 | |
321 | }) | 348 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { |
322 | $('.addNewMargin').css('display', 'none'); | 349 | |
323 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 350 | toastr.success('Successfully Added', { |
324 | console.log('result', result); | 351 | closeButton: true |
325 | $scope.aTypeJets = result; | 352 | }) |
326 | $scope.showLoader = false; | 353 | $('.addNewVtype').css('display', 'none'); |
327 | }) | 354 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
328 | }) | 355 | $scope.vTypeJets = result; |
329 | } | 356 | $scope.showLoader = false; |
330 | 357 | }) | |
331 | $scope.newVtypeJet = {}; | 358 | }) |
332 | 359 | ||
333 | $scope.addNewVtypePop = function(){ | 360 | } |
334 | $('.addNewVtype').css('display', 'block'); | 361 | |
335 | } | 362 | |
336 | $scope.closeNewVtypePop = function(){ | 363 | $scope.sendEmail = {}; |
337 | $('.addNewVtype').css('display', 'none'); | 364 | |
338 | $scope.newVtypeJet = {}; | 365 | $scope.confirmMail = function(){ |
339 | } | 366 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { |
340 | 367 | $('#confirm1').css('display', 'block'); | |
341 | $scope.addNewVTypeJet = function(){ | 368 | } |
342 | $scope.showLoader = true; | 369 | } |
343 | $scope.newVtypeJet.productType = 'AVGAS'; | 370 | |
344 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; | 371 | $scope.saveAndCloseConfirm = function(){ |
345 | 372 | $('#confirm1').css('display', 'none'); | |
346 | var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId+'&message='+$scope.newVtypeJet.message; | 373 | updateFuelManagerService.sendMailToMargin($scope.sendEmail.pricing).then(function(result) { |
347 | 374 | toastr.success(''+result.success+'', { | |
348 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { | 375 | closeButton: true |
349 | 376 | }) | |
350 | toastr.success('Successfully Added', { | 377 | }) |
351 | closeButton: true | 378 | } |
352 | }) | 379 | $scope.cancelAndCloseConfirm = function(){ |
353 | $('.addNewVtype').css('display', 'none'); | 380 | $scope.sendEmail = {}; |
354 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 381 | $scope.sendEmail.pricing = ''; |
355 | $scope.vTypeJets = result; | 382 | $('#confirm1').css('display', 'none'); |
356 | $scope.showLoader = false; | 383 | } |
357 | }) | 384 | |
358 | }) | 385 | $scope.newFuelPricing = {}; |
359 | 386 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | |
360 | } | 387 | $scope.newFuelPricing = result; |
361 | 388 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | |
362 | 389 | if ($scope.newFuelPricing[i].fuelPricing != null) { | |
363 | $scope.sendEmail = {}; | 390 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { |
364 | 391 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | |
365 | $scope.confirmMail = function(){ | 392 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
366 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { | 393 | var day = newTime.getUTCDate(); |
367 | $('#confirm1').css('display', 'block'); | 394 | var year = newTime.getUTCFullYear(); |
368 | } | 395 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
369 | } | 396 | } |
370 | 397 | } | |
371 | $scope.saveAndCloseConfirm = function(){ | 398 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
372 | $('#confirm1').css('display', 'none'); | 399 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
373 | updateFuelManagerService.sendMailToMargin($scope.sendEmail.pricing).then(function(result) { | 400 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { |
374 | toastr.success(''+result.success+'', { | 401 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
375 | closeButton: true | 402 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
376 | }) | 403 | var nextDay = newTime.getUTCDate(); |
377 | }) | 404 | var nextYear = newTime.getUTCFullYear(); |
378 | } | 405 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
379 | $scope.cancelAndCloseConfirm = function(){ | 406 | } |
380 | $scope.sendEmail = {}; | 407 | } |
381 | $scope.sendEmail.pricing = ''; | 408 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
382 | $('#confirm1').css('display', 'none'); | 409 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
383 | } | 410 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
384 | 411 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | |
385 | $scope.newFuelPricing = {}; | 412 | var dday = newTime.getUTCDate(); |
386 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 413 | var dyear = newTime.getUTCFullYear(); |
387 | $scope.newFuelPricing = result; | 414 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
388 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 415 | } |
389 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 416 | } |
390 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 417 | } |
391 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 418 | } |
392 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 419 | $scope.showLoader = false; |
393 | var day = newTime.getUTCDate(); | 420 | }) |
394 | var year = newTime.getUTCFullYear(); | 421 | $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ |
395 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 422 | }); |
396 | } | 423 | $scope.updateFuelPricing = {}; |
397 | } | 424 | $scope.updateFuelPricing.fuelPricingList = []; |
398 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 425 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; |
399 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 426 | $scope.updateFuelPricingClick = function(){ |
400 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 427 | $scope.showLoader = true; |
401 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 428 | |
402 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 429 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
403 | var nextDay = newTime.getUTCDate(); | 430 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
404 | var nextYear = newTime.getUTCFullYear(); | 431 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
405 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 432 | if ($scope.newFuelPricing[i].fuelPricing.cost == null) { |
406 | } | 433 | $scope.newFuelPricing[i].fuelPricing.cost = ''; |
407 | } | 434 | } |
408 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 435 | if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { |
409 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 436 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; |
410 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 437 | } |
411 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 438 | if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { |
412 | var dday = newTime.getUTCDate(); | 439 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; |
413 | var dyear = newTime.getUTCFullYear(); | 440 | } |
414 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 441 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { |
415 | } | 442 | $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; |
416 | } | 443 | }else{ |
417 | } | 444 | $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
418 | } | 445 | console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); |
419 | $scope.showLoader = false; | 446 | $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); |
420 | }) | 447 | } |
421 | $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ | 448 | |
422 | }); | 449 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
423 | $scope.updateFuelPricing = {}; | 450 | $scope.updateFuelPricing.fuelPricingList.push({ |
424 | $scope.updateFuelPricing.fuelPricingList = []; | 451 | 'cost': $scope.newFuelPricing[i].fuelPricing.cost, |
425 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; | 452 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, |
426 | $scope.updateFuelPricingClick = function(){ | 453 | 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, |
427 | $scope.showLoader = true; | 454 | 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, |
428 | 455 | 'productId': $scope.newFuelPricing[i].id, | |
429 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 456 | 'id': $scope.newFuelPricing[i].fuelPricing.id, |
430 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 457 | }) |
431 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 458 | |
432 | if ($scope.newFuelPricing[i].fuelPricing.cost == null) { | 459 | }else{ |
433 | $scope.newFuelPricing[i].fuelPricing.cost = ''; | 460 | /*$scope.newFuelPricing[i].fuelPricing.cost = ''; |
434 | } | 461 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; |
435 | if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { | 462 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; |
436 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; | 463 | $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ |
437 | } | 464 | } |
438 | if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { | 465 | |
439 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; | 466 | } |
440 | } | 467 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { |
441 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { | 468 | toastr.success('Successfully Updated', { |
442 | $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; | 469 | closeButton: true |
443 | }else{ | 470 | }) |
444 | $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 471 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
445 | console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); | 472 | $scope.newFuelPricing = result; |
446 | $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); | 473 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
447 | } | 474 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
448 | 475 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | |
449 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 476 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
450 | $scope.updateFuelPricing.fuelPricingList.push({ | 477 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
451 | 'cost': $scope.newFuelPricing[i].fuelPricing.cost, | 478 | var day = newTime.getUTCDate(); |
452 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, | 479 | var year = newTime.getUTCFullYear(); |
453 | 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, | 480 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
454 | 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, | 481 | } |
455 | 'productId': $scope.newFuelPricing[i].id, | 482 | } |
456 | 'id': $scope.newFuelPricing[i].fuelPricing.id, | 483 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
457 | }) | 484 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
458 | 485 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | |
459 | }else{ | 486 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
460 | /*$scope.newFuelPricing[i].fuelPricing.cost = ''; | 487 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
461 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; | 488 | var nextDay = newTime.getUTCDate(); |
462 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; | 489 | var nextYear = newTime.getUTCFullYear(); |
463 | $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ | 490 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
464 | } | 491 | } |
465 | 492 | } | |
466 | } | 493 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
467 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { | 494 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
468 | toastr.success('Successfully Updated', { | 495 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
469 | closeButton: true | 496 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
470 | }) | 497 | var dday = newTime.getUTCDate(); |
471 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 498 | var dyear = newTime.getUTCFullYear(); |
472 | $scope.newFuelPricing = result; | 499 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
473 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 500 | } |
474 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 501 | } |
475 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 502 | } |
476 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 503 | } |
477 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 504 | $scope.showLoader = false; |
478 | var day = newTime.getUTCDate(); | 505 | }) |
479 | var year = newTime.getUTCFullYear(); | 506 | }) |
480 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 507 | |
481 | } | 508 | } |
482 | } | 509 | |
483 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 510 | $scope.updateFutureFuelPricing = {}; |
484 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 511 | $scope.updateFutureFuelPricing.futureFuelPricingList = []; |
485 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 512 | $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; |
486 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 513 | $scope.updateFutureFuelPricingClick = function(){ |
487 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 514 | $scope.showLoader = true; |
488 | var nextDay = newTime.getUTCDate(); | 515 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
489 | var nextYear = newTime.getUTCFullYear(); | 516 | //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin)); |
490 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 517 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
491 | } | 518 | if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) { |
492 | } | 519 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
493 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 520 | if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { |
494 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 521 | $scope.newFuelPricing[i].futureFuelPricing.cost = ''; |
495 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 522 | } |
496 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 523 | if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { |
497 | var dday = newTime.getUTCDate(); | 524 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; |
498 | var dyear = newTime.getUTCFullYear(); | 525 | } |
499 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 526 | if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { |
500 | } | 527 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; |
501 | } | 528 | } |
502 | } | 529 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) { |
503 | } | 530 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = ''; |
504 | $scope.showLoader = false; | 531 | }else{ |
505 | }) | 532 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
506 | }) | 533 | console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
507 | 534 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime(); | |
508 | } | 535 | } |
509 | 536 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) { | |
510 | $scope.updateFutureFuelPricing = {}; | 537 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = ''; |
511 | $scope.updateFutureFuelPricing.futureFuelPricingList = []; | 538 | }else{ |
512 | $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; | 539 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
513 | $scope.updateFutureFuelPricingClick = function(){ | 540 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime(); |
514 | $scope.showLoader = true; | 541 | } |
515 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 542 | |
516 | //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin)); | 543 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
517 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 544 | $scope.updateFutureFuelPricing.futureFuelPricingList.push({ |
518 | if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) { | 545 | 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, |
519 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 546 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, |
520 | if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { | 547 | //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, |
521 | $scope.newFuelPricing[i].futureFuelPricing.cost = ''; | 548 | 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, |
522 | } | 549 | 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration, |
523 | if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { | 550 | 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate, |
524 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; | 551 | 'productId': $scope.newFuelPricing[i].id, |
525 | } | 552 | 'id': $scope.newFuelPricing[i].futureFuelPricing.id, |
526 | if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { | 553 | }) |
527 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; | 554 | } |
528 | } | 555 | }else{ |
529 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) { | 556 | /*$scope.newFuelPricing[i].futureFuelPricing.cost = ''; |
530 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = ''; | 557 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; |
531 | }else{ | 558 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; |
532 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 559 | $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; |
533 | console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 560 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/ |
534 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime(); | 561 | } |
535 | } | 562 | } |
536 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) { | 563 | updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) { |
537 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = ''; | 564 | toastr.success('Successfully Updated', { |
538 | }else{ | 565 | closeButton: true |
539 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 566 | }) |
540 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime(); | 567 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
541 | } | 568 | $scope.newFuelPricing = result; |
542 | 569 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | |
543 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 570 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
544 | $scope.updateFutureFuelPricing.futureFuelPricingList.push({ | 571 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { |
545 | 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, | 572 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
546 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, | 573 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
547 | //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, | 574 | var day = newTime.getUTCDate(); |
548 | 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, | 575 | var year = newTime.getUTCFullYear(); |
549 | 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration, | 576 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
550 | 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate, | 577 | } |
551 | 'productId': $scope.newFuelPricing[i].id, | 578 | } |
552 | 'id': $scope.newFuelPricing[i].futureFuelPricing.id, | 579 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
553 | }) | 580 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
554 | } | 581 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { |
555 | }else{ | 582 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
556 | /*$scope.newFuelPricing[i].futureFuelPricing.cost = ''; | 583 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
557 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; | 584 | var nextDay = newTime.getUTCDate(); |
558 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; | 585 | var nextYear = newTime.getUTCFullYear(); |
559 | $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; | 586 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
560 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/ | 587 | } |
561 | } | 588 | } |
562 | } | 589 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
563 | updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) { | 590 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
564 | toastr.success('Successfully Updated', { | 591 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
565 | closeButton: true | 592 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
566 | }) | 593 | var dday = newTime.getUTCDate(); |
567 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 594 | var dyear = newTime.getUTCFullYear(); |
568 | $scope.newFuelPricing = result; | 595 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
569 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 596 | } |
570 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 597 | } |
571 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 598 | } |
572 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 599 | } |
573 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 600 | $scope.showLoader = false; |
574 | var day = newTime.getUTCDate(); | 601 | }) |
575 | var year = newTime.getUTCFullYear(); | 602 | }) |
576 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 603 | |
577 | } | 604 | |
578 | } | 605 | } |
579 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 606 | |
580 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 607 | updateFuelManagerService.getMargin().then(function(result) { |
581 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 608 | $scope.marginList = result; |
582 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 609 | }) |
583 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 610 | |
584 | var nextDay = newTime.getUTCDate(); | 611 | $scope.marginIdDelete = ''; |
585 | var nextYear = newTime.getUTCFullYear(); | 612 | $scope.deleteJetAccordian = function(id){ |
586 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 613 | $scope.marginIdDelete = id; |
587 | } | 614 | $('#deleteMargin').css('display', 'block'); |
588 | } | 615 | } |
589 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 616 | |
590 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 617 | $scope.confirmDeleteMargin = function(){ |
591 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 618 | $('#deleteMargin').css('display', 'none'); |
592 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 619 | $scope.showLoader = true; |
593 | var dday = newTime.getUTCDate(); | 620 | updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) { |
594 | var dyear = newTime.getUTCFullYear(); | 621 | toastr.success(''+result.success+'', { |
595 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 622 | closeButton: true |
596 | } | 623 | }) |
597 | } | 624 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
598 | } | 625 | $scope.aTypeJets = result; |
599 | } | 626 | $scope.showLoader = false; |
600 | $scope.showLoader = false; | 627 | }) |
601 | }) | 628 | }) |
602 | }) | 629 | } |
603 | 630 | ||
604 | 631 | $scope.cancelMarginDelete = function(){ | |
605 | } | 632 | $scope.marginIdDelete = ''; |
606 | 633 | $('#deleteMargin').css('display', 'none'); | |
607 | updateFuelManagerService.getMargin().then(function(result) { | 634 | } |
608 | $scope.marginList = result; | 635 | |
609 | }) | 636 | $scope.marginVtypeIdDelete = ''; |
610 | 637 | $scope.deleteVtypeJetAccordian = function(id){ | |
611 | $scope.marginIdDelete = ''; | 638 | $scope.marginVtypeIdDelete = id; |
612 | $scope.deleteJetAccordian = function(id){ | 639 | $('#deleteVtypeMargin').css('display', 'block'); |
613 | $scope.marginIdDelete = id; | 640 | } |
614 | $('#deleteMargin').css('display', 'block'); | 641 | |
615 | } | 642 | $scope.confirmDeletVtypeMargin = function(){ |
616 | 643 | $('#deleteVtypeMargin').css('display', 'none'); | |
617 | $scope.confirmDeleteMargin = function(){ | 644 | $scope.showLoader = true; |
618 | $('#deleteMargin').css('display', 'none'); | 645 | updateFuelManagerService.deleteMargin($scope.marginVtypeIdDelete).then(function(result) { |
619 | $scope.showLoader = true; | 646 | toastr.success(''+result.success+'', { |
620 | updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) { | 647 | closeButton: true |
621 | toastr.success(''+result.success+'', { | 648 | }) |
622 | closeButton: true | 649 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
623 | }) | 650 | $scope.vTypeJets = result; |
624 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 651 | $scope.showLoader = false; |
625 | $scope.aTypeJets = result; | 652 | }) |
626 | $scope.showLoader = false; | 653 | }) |
627 | }) | 654 | } |
628 | }) | 655 | |
629 | } | 656 | $scope.cancelVtypeMarginDelete = function(){ |
630 | 657 | $scope.marginVtypeIdDelete = ''; | |
631 | $scope.cancelMarginDelete = function(){ | 658 | $('#deleteVtypeMargin').css('display', 'none'); |
632 | $scope.marginIdDelete = ''; | 659 | } |
633 | $('#deleteMargin').css('display', 'none'); | 660 | |
634 | } | 661 | }]); |
635 | 662 | ||
636 | $scope.marginVtypeIdDelete = ''; | 663 | |
637 | $scope.deleteVtypeJetAccordian = function(id){ | 664 |
app/partials/updateFuelManager/updateFuelManager.html
1 | 1 | ||
2 | 2 | ||
3 | <style> | 3 | <style> |
4 | .subnavbar .mainnav > li:nth-child(2) > a{ | 4 | .subnavbar .mainnav > li:nth-child(2) > a{ |
5 | color: #ff9900; | 5 | color: #ff9900; |
6 | } | 6 | } |
7 | </style> | 7 | </style> |
8 | <div class="myLoader" ng-show="showLoader"> | 8 | <div class="myLoader" ng-show="showLoader"> |
9 | <img src="../img/hourglass.gif" width="50px;"> | 9 | <img src="../img/hourglass.gif" width="50px;"> |
10 | </div> | 10 | </div> |
11 | <div class="container"> | 11 | <div class="container"> |
12 | <div class="row"> | 12 | <div class="row"> |
13 | <div class="col-md-5"> | 13 | <div class="col-md-5"> |
14 | <div class="widget stacked"> | 14 | <div class="widget stacked"> |
15 | <div class="widget-header"> | 15 | <div class="widget-header"> |
16 | <i class="fa fa-pencil"></i> | 16 | <i class="fa fa-pencil"></i> |
17 | <h3>Price Manager</h3> | 17 | <h3>Price Manager</h3> |
18 | <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> | 18 | <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> |
19 | <option value="" disabled selected="selected">Send Pricing Email</option> | 19 | <option value="" disabled selected="selected">Send Pricing Email</option> |
20 | <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> | 20 | <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> |
21 | <option disabled>_______________</option> | 21 | <option disabled>_______________</option> |
22 | <option value="all">Distribute All</option> | 22 | <option value="all">Distribute All</option> |
23 | </select> | 23 | </select> |
24 | </div> | 24 | </div> |
25 | <!-- /widget-header --> | 25 | <!-- /widget-header --> |
26 | <div class="widget-content"> | 26 | <div class="widget-content"> |
27 | <h4>Update Fuel Price Here</h4> | 27 | <h4>Update Fuel Price Here</h4> |
28 | <table class="table"> | 28 | <table class="table"> |
29 | <thead> | 29 | <thead> |
30 | <tr> | 30 | <tr> |
31 | <th> Product</th> | 31 | <th> Product</th> |
32 | <th> Cost</th> | 32 | <th> Cost</th> |
33 | <th> Margin</th> | 33 | <th> Margin</th> |
34 | <th> PAP(Total)</th> | 34 | <th> PAP(Total)</th> |
35 | <th style="color: #F90;"> Expires</th> | 35 | <th style="color: #F90;"> Expires</th> |
36 | </tr> | 36 | </tr> |
37 | </thead> | 37 | </thead> |
38 | <tbody> | 38 | <tbody> |
39 | <tr ng-repeat="fuelPricing in newFuelPricing"> | 39 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
40 | <td> | 40 | <td> |
41 | <span>{{fuelPricing.name}}</span> | 41 | <span>{{fuelPricing.name}}</span> |
42 | </td> | 42 | </td> |
43 | <td> | 43 | <td> |
44 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px"> | 44 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px"> |
45 | </td> | 45 | </td> |
46 | <td> | 46 | <td> |
47 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 6px;"> | 47 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 6px;"> |
48 | </td> | 48 | </td> |
49 | <td> | 49 | <td> |
50 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | 50 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> |
51 | </td> | 51 | </td> |
52 | <td> | 52 | <td> |
53 | <input type="text" class="form-control" datepicker ng-model="fuelPricing.fuelPricing.expirationDate" style="height:31px; width: 100px; padding: 6px 6px;"> | 53 | <input type="text" class="form-control" datepicker ng-model="fuelPricing.fuelPricing.expirationDate" style="height:31px; width: 100px; padding: 6px 6px;"> |
54 | </td> | 54 | </td> |
55 | </tr> | 55 | </tr> |
56 | </tbody> | 56 | </tbody> |
57 | </table> | 57 | </table> |
58 | <div class="row" style="margin-left: 0px;"> | 58 | <div class="row" style="margin-left: 0px;"> |
59 | <div class="col-md-12" style= "text-align: right;"> | 59 | <div class="col-md-12" style= "text-align: right;"> |
60 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> | 60 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> |
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | <!-- /widget-content --> | 64 | <!-- /widget-content --> |
65 | </div> | 65 | </div> |
66 | <!-- /widget --> | 66 | <!-- /widget --> |
67 | </div> | 67 | </div> |
68 | 68 | ||
69 | <div class="col-md-7"> | 69 | <div class="col-md-7"> |
70 | <div class="widget stacked"> | 70 | <div class="widget stacked"> |
71 | <div class="widget-header"> | 71 | <div class="widget-header"> |
72 | <i class="fa fa-pencil"></i> | 72 | <i class="fa fa-pencil"></i> |
73 | <h3><b>JET-A</b> Customer Margin Template</h3> | 73 | <h3><b>JET-A</b> Customer Margin Template</h3> |
74 | <div class="pull-right"> | 74 | <div class="pull-right"> |
75 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | 75 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewMarginBtn()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> |
76 | </div> | 76 | </div> |
77 | </div> | 77 | </div> |
78 | <!-- /widget-header --> | 78 | <!-- /widget-header --> |
79 | <div class="widget-content" style="padding-top: 10px;"> | 79 | <div class="widget-content" style="padding-top: 10px;"> |
80 | <section id="accordions"> | 80 | <section id="accordions"> |
81 | <div class="newCustomAccordian"> | 81 | <div class="newCustomAccordian"> |
82 | <!-- tab 1 --> | 82 | <!-- tab 1 --> |
83 | <div ng-repeat="jets in aTypeJets"> | 83 | <div ng-repeat="jets in aTypeJets"> |
84 | <div class="customAccordianHeader" id="{{jets.id}}"> | 84 | <div class="customAccordianHeader" id="{{jets.id}}"> |
85 | <span>{{jets.marginName}}</span> | 85 | <span>{{jets.marginName}}</span> |
86 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 86 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
87 | <option value="" disabled selected>Pricing Structure</option> | 87 | <option value="" disabled selected>Pricing Structure</option> |
88 | <option value="minus">Retail-(minus)</option> | 88 | <option value="minus">Retail-(minus)</option> |
89 | <option value="plus">Cost+(plus)</option> | 89 | <option value="plus">Cost+(plus)</option> |
90 | <option value="equal">Direct=(equal)</option> | 90 | <option value="equal">Direct=(equal)</option> |
91 | </select> | 91 | </select> |
92 | <span style="margin-right: 0;">$</span> | 92 | <span style="margin-right: 0;">$</span> |
93 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 93 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
94 | <div class="pull-right"> | 94 | <div class="pull-right"> |
95 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> | ||
95 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> | 96 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> |
96 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> | 97 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> |
97 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> | 98 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)">Edit</button> |
98 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)">Edit</button> | 99 | </div> |
99 | </div> | 100 | <div class="clearfix"></div> |
100 | <div class="clearfix"></div> | 101 | </div> |
101 | </div> | 102 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
102 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 103 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> |
103 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> | 104 | <div class="tierListHead" style="height: 36px;"> |
104 | <div class="tierListHead" style="height: 36px;"> | 105 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
105 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 106 | </span> |
106 | </span> | 107 | <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> |
107 | <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> | 108 | |
108 | 109 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | |
109 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 110 | <span ng-show="showEditTier">-</span> |
110 | <span ng-show="showEditTier">-</span> | 111 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
111 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 112 | <div class="clearfix"></div> |
112 | <div class="clearfix"></div> | 113 | </div> |
113 | </div> | 114 | <div class="tierListBody" style="height: 35px;"> |
114 | <div class="tierListBody" style="height: 35px;"> | 115 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
115 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 116 | |
116 | 117 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | |
117 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 118 | |
118 | 119 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | |
119 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | 120 | |
120 | 121 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | |
121 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 122 | |
122 | 123 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | |
123 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 124 | |
124 | 125 | <div class="clearfix"></div> | |
125 | <div class="clearfix"></div> | 126 | </div> |
126 | </div> | 127 | </div> |
127 | </div> | 128 | <div class="tierListWrap" style="width: 160px;"> |
128 | <div class="tierListWrap" style="width: 160px;"> | 129 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
129 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 130 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> |
130 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> | 131 | <span>-</span> |
131 | <span>-</span> | 132 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> |
132 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> | 133 | <div class="clearfix"></div> |
133 | <div class="clearfix"></div> | 134 | </div> |
134 | </div> | 135 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
135 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 136 | <span style="color: #449d44;">$</span> |
136 | <span style="color: #449d44;">$</span> | 137 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
137 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 138 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> |
138 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> | 139 | <div class="clearfix"></div> |
139 | <div class="clearfix"></div> | 140 | </div> |
140 | </div> | 141 | </div> |
141 | </div> | 142 | <!-- <div class="tierListWrap" style="width: 32px;"> |
142 | <!-- <div class="tierListWrap" style="width: 32px;"> | 143 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
143 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 144 | |
144 | | 145 | </div> |
145 | </div> | 146 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
146 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 147 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
147 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 148 | </div> |
148 | </div> | 149 | </div> --> |
149 | </div> --> | 150 | <div class="clearfix"></div> |
150 | <div class="clearfix"></div> | 151 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> |
152 | <br/> | ||
153 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | ||
151 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> | 154 | </div> |
152 | <br/> | 155 | </div> |
153 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 156 | </div> |
154 | </div> | 157 | </section> |
155 | </div> | 158 | <!-- <div class="row"> </div> |
156 | </div> | 159 | <div class="row"> |
157 | </section> | 160 | <div class="form-group"> |
158 | <!-- <div class="row"> </div> | 161 | <div class="col-lg-12 text-right"> |
159 | <div class="row"> | 162 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
160 | <div class="form-group"> | 163 | <button type="reset" class="btn btn-default">Cancel</button> |
161 | <div class="col-lg-12 text-right"> | 164 | </div> |
162 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 165 | </div> |
163 | <button type="reset" class="btn btn-default">Cancel</button> | 166 | </div> --> |
164 | </div> | 167 | </div> |
165 | </div> | 168 | <!-- /widget-content --> |
166 | </div> --> | 169 | </div> |
167 | </div> | 170 | <!-- /widget --> |
168 | <!-- /widget-content --> | 171 | </div> |
169 | </div> | 172 | <!-- /span6 --> |
170 | <!-- /widget --> | 173 | </div> |
171 | </div> | 174 | <!-- /span12 --> |
172 | <!-- /span6 --> | 175 | </div> |
173 | </div> | 176 | <!-- /row --> |
174 | <!-- /span12 --> | 177 | <div class="container"> |
175 | </div> | 178 | <div class="row"> |
176 | <!-- /row --> | 179 | <div class="col-md-5"> |
177 | <div class="container"> | 180 | <div class="widget stacked"> |
178 | <div class="row"> | 181 | <div class="widget-header"> |
179 | <div class="col-md-5"> | 182 | <i class="fa fa-pencil"></i> |
180 | <div class="widget stacked"> | 183 | <h3>Queue Future Pricing</h3> |
181 | <div class="widget-header"> | 184 | </div> |
182 | <i class="fa fa-pencil"></i> | 185 | <!-- /widget-header --> |
183 | <h3>Queue Future Pricing</h3> | 186 | <div class="widget-content"> |
184 | </div> | 187 | <h4>Update Queue Future Fuel Pricing Here</h4> |
185 | <!-- /widget-header --> | 188 | <table class="table"> |
186 | <div class="widget-content"> | 189 | <thead> |
187 | <h4>Update Queue Future Fuel Pricing Here</h4> | 190 | <tr> |
188 | <table class="table"> | 191 | <th> Product</th> |
189 | <thead> | 192 | <th> Cost</th> |
190 | <tr> | 193 | <th> PAP(Total)</th> |
191 | <th> Product</th> | 194 | <th> Deploy</th> |
192 | <th> Cost</th> | 195 | <th style="color: #F90;"> Next Expiration</th> |
193 | <th> PAP(Total)</th> | 196 | </tr> |
194 | <th> Deploy</th> | 197 | </thead> |
195 | <th style="color: #F90;"> Next Expiration</th> | 198 | <tbody> |
196 | </tr> | 199 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
197 | </thead> | 200 | <td> |
198 | <tbody> | 201 | <span>{{fuelPricing.name}}</span> |
199 | <tr ng-repeat="fuelPricing in newFuelPricing"> | 202 | </td> |
200 | <td> | 203 | <td> |
201 | <span>{{fuelPricing.name}}</span> | 204 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> |
202 | </td> | 205 | </td> |
203 | <td> | 206 | <td> |
204 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> | 207 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> |
205 | </td> | 208 | </td> |
206 | <td> | 209 | <td> |
207 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> | 210 | <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 100px; padding: 6px 6px;"> |
208 | </td> | 211 | </td> |
209 | <td> | 212 | <td> |
210 | <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 100px; padding: 6px 6px;"> | 213 | <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 100px; padding: 6px 6px;"> |
211 | </td> | 214 | </td> |
212 | <td> | 215 | </tr> |
213 | <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 100px; padding: 6px 6px;"> | 216 | </tbody> |
214 | </td> | 217 | </table> |
215 | </tr> | 218 | <div class="row" style="margin-left: 0px;"> |
216 | </tbody> | 219 | <div class="col-md-12" style= "text-align: right;"> |
217 | </table> | 220 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()">Save</button> |
218 | <div class="row" style="margin-left: 0px;"> | 221 | </div> |
219 | <div class="col-md-12" style= "text-align: right;"> | 222 | </div> |
220 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()">Save</button> | 223 | </div> |
221 | </div> | 224 | <!-- /widget-content --> |
222 | </div> | 225 | </div> |
223 | </div> | 226 | <!-- /widget --> |
224 | <!-- /widget-content --> | 227 | </div> |
225 | </div> | 228 | <div class="col-md-7"> |
226 | <!-- /widget --> | 229 | <div class="widget stacked"> |
227 | </div> | 230 | <div class="widget-header"> |
228 | <div class="col-md-7"> | 231 | <i class="fa fa-pencil"></i> |
229 | <div class="widget stacked"> | 232 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> |
230 | <div class="widget-header"> | 233 | <div class="pull-right"> |
231 | <i class="fa fa-pencil"></i> | 234 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> |
232 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> | 235 | </div> |
233 | <div class="pull-right"> | 236 | </div> |
234 | <button type="submit" class="btn btn-success btn-sm" ng-click="addNewVtypePop()" style="margin-top: 4px; margin-right: 10px;"><i class="fa fa-plus" aria-hidden="true"></i> Add New Margin</button> | 237 | <!-- /widget-header --> |
235 | </div> | 238 | <div class="widget-content" style="padding-top: 10px;"> |
236 | </div> | 239 | <section id="accordions"> |
237 | <!-- /widget-header --> | 240 | <div class="newCustomAccordian"> |
238 | <div class="widget-content" style="padding-top: 10px;"> | 241 | <!-- tab 1 --> |
239 | <section id="accordions"> | 242 | <div ng-repeat="jets in vTypeJets"> |
240 | <div class="newCustomAccordian"> | 243 | <div class="customAccordianHeader" id="{{jets.id}}"> |
241 | <!-- tab 1 --> | 244 | <span>{{jets.marginName}}</span> |
242 | <div ng-repeat="jets in vTypeJets"> | 245 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
243 | <div class="customAccordianHeader" id="{{jets.id}}"> | 246 | <option value="" disabled selected>Pricing Structure</option> |
244 | <span>{{jets.marginName}}</span> | 247 | <option value="minus">Retail-(minus)</option> |
245 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 248 | <option value="plus">Cost+(plus)</option> |
246 | <option value="" disabled selected>Pricing Structure</option> | 249 | <option value="equal">Direct=(equal)</option> |
247 | <option value="minus">Retail-(minus)</option> | 250 | </select> |
248 | <option value="plus">Cost+(plus)</option> | 251 | <span style="margin-right: 0;">$</span> |
249 | <option value="equal">Direct=(equal)</option> | 252 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
250 | </select> | 253 | <div class="pull-right"> |
254 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button> | ||
251 | <span style="margin-right: 0;">$</span> | 255 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> |
252 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 256 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> |
253 | <div class="pull-right"> | 257 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> |
254 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button> | 258 | </div> |
255 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> | 259 | <div class="clearfix"></div> |
256 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> | 260 | </div> |
257 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> | 261 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
258 | </div> | 262 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> |
259 | <div class="clearfix"></div> | 263 | <div class="tierListHead" style="height: 36px;"> |
260 | </div> | 264 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
261 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 265 | </span> |
262 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> | 266 | <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> |
263 | <div class="tierListHead" style="height: 36px;"> | 267 | |
264 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 268 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
265 | </span> | 269 | <span ng-show="showEditTier">-</span> |
266 | <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> | 270 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
267 | 271 | <div class="clearfix"></div> | |
268 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 272 | </div> |
269 | <span ng-show="showEditTier">-</span> | 273 | <div class="tierListBody" style="height: 35px;"> |
270 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 274 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
271 | <div class="clearfix"></div> | 275 | |
272 | </div> | 276 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
273 | <div class="tierListBody" style="height: 35px;"> | 277 | |
274 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 278 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> |
275 | 279 | ||
276 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 280 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
277 | 281 | ||
278 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | 282 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
279 | 283 | ||
280 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 284 | <div class="clearfix"></div> |
281 | 285 | </div> | |
282 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 286 | </div> |
283 | 287 | <div class="tierListWrap" style="width: 160px;"> | |
284 | <div class="clearfix"></div> | 288 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
285 | </div> | 289 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> |
286 | </div> | 290 | <span>-</span> |
287 | <div class="tierListWrap" style="width: 160px;"> | 291 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> |
288 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 292 | <div class="clearfix"></div> |
289 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> | 293 | </div> |
290 | <span>-</span> | 294 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
291 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> | 295 | <span style="color: #449d44;">$</span> |
292 | <div class="clearfix"></div> | 296 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
293 | </div> | 297 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> |
294 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 298 | <div class="clearfix"></div> |
295 | <span style="color: #449d44;">$</span> | 299 | </div> |
296 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 300 | </div> |
297 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> | 301 | <!-- <div class="tierListWrap" style="width: 32px;"> |
298 | <div class="clearfix"></div> | 302 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
299 | </div> | 303 | |
300 | </div> | 304 | </div> |
301 | <!-- <div class="tierListWrap" style="width: 32px;"> | 305 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
302 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 306 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
303 | | 307 | </div> |
304 | </div> | 308 | </div> --> |
305 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 309 | <div class="clearfix"></div> |
306 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 310 | <br/> |
311 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | ||
307 | </div> | 312 | </div> |
308 | </div> --> | 313 | </div> |
309 | <div class="clearfix"></div> | 314 | </div> |
310 | <br/> | 315 | </section> |
311 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 316 | <!-- <div class="row"> </div> |
312 | </div> | 317 | <div class="row"> |
313 | </div> | 318 | <div class="form-group"> |
314 | </div> | 319 | <div class="col-lg-12 text-right"> |
315 | </section> | 320 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
316 | <!-- <div class="row"> </div> | 321 | <button type="reset" class="btn btn-default">Cancel</button> |
317 | <div class="row"> | 322 | </div> |
318 | <div class="form-group"> | 323 | </div> |
319 | <div class="col-lg-12 text-right"> | 324 | </div> --> |
320 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 325 | </div> |
321 | <button type="reset" class="btn btn-default">Cancel</button> | 326 | <!-- /widget-content --> |
322 | </div> | 327 | </div> |
323 | </div> | 328 | <!-- /widget --> |
324 | </div> --> | 329 | </div> |
325 | </div> | 330 | <!-- /span6 --> |
326 | <!-- /widget-content --> | 331 | </div> |
327 | </div> | 332 | </div> |
328 | <!-- /widget --> | 333 | </div> |
329 | </div> | 334 | </div> <!-- /container --> |
330 | <!-- /span6 --> | 335 | |
331 | </div> | 336 | |
332 | </div> | 337 | <div class="addNewMargin" style="display: none;"> |
333 | </div> | 338 | <div class="customBackdrop"> |
334 | </div> <!-- /container --> | 339 | <div class="customModalInner" style="max-width: 700px;"> |
335 | 340 | <div class="customModelHead"> | |
336 | 341 | <p class="pull-left"> | |
337 | <div class="addNewMargin" style="display: none;"> | 342 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
338 | <div class="customBackdrop"> | 343 | Add New JET-A Customer Margin |
339 | <div class="customModalInner" style="max-width: 700px;"> | 344 | </p> |
340 | <div class="customModelHead"> | 345 | <p class="pull-right"> |
341 | <p class="pull-left"> | 346 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> |
342 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 347 | </p> |
343 | Add New JET-A Customer Margin | 348 | <div class="clearfix"></div> |
344 | </p> | 349 | </div> |
345 | <p class="pull-right"> | 350 | <div class="customModelBody"> |
346 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> | 351 | |
347 | </p> | 352 | <div class="customAccordianHeader customActive"> |
348 | <div class="clearfix"></div> | 353 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> |
349 | </div> | 354 | <select class="form-control" ng-model="newJet.pricingStructure"> |
350 | <div class="customModelBody"> | 355 | <option value="" disabled selected>Pricing Structure</option> |
351 | 356 | <option value="minus">Retail-(minus)</option> | |
352 | <div class="customAccordianHeader customActive"> | 357 | <option value="plus">Cost+(plus)</option> |
353 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> | 358 | <option value="equal">Direct=(equal)</option> |
354 | <select class="form-control" ng-model="newJet.pricingStructure"> | 359 | </select> |
355 | <option value="" disabled selected>Pricing Structure</option> | 360 | <span style="margin-right: 0;">$</span> |
356 | <option value="minus">Retail-(minus)</option> | 361 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> |
357 | <option value="plus">Cost+(plus)</option> | 362 | <div class="clearfix"></div> |
358 | <option value="equal">Direct=(equal)</option> | 363 | </div> |
359 | </select> | 364 | <div class="customAccordianTabBody"> |
360 | <span style="margin-right: 0;">$</span> | 365 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> |
361 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> | 366 | </div> |
362 | <div class="clearfix"></div> | 367 | |
363 | </div> | 368 | </div> |
364 | <div class="customAccordianTabBody"> | 369 | <div class="customModelFooter text-center"> |
365 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> | 370 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> |
366 | </div> | 371 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> |
367 | 372 | </div> | |
368 | </div> | 373 | </div> |
369 | <div class="customModelFooter text-center"> | 374 | </div> |
370 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> | 375 | </div> |
371 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> | 376 | |
372 | </div> | 377 | <div class="addNewVtype" style="display: none;"> |
373 | </div> | 378 | <div class="customBackdrop"> |
374 | </div> | 379 | <div class="customModalInner" style="max-width: 700px;"> |
375 | </div> | 380 | <div class="customModelHead"> |
376 | 381 | <p class="pull-left"> | |
377 | <div class="addNewVtype" style="display: none;"> | 382 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
378 | <div class="customBackdrop"> | 383 | Add New AVGAS 100LL Customer Margin Template |
379 | <div class="customModalInner" style="max-width: 700px;"> | 384 | </p> |
380 | <div class="customModelHead"> | 385 | <p class="pull-right"> |
381 | <p class="pull-left"> | 386 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> |
382 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 387 | </p> |
383 | Add New AVGAS 100LL Customer Margin Template | 388 | <div class="clearfix"></div> |
384 | </p> | 389 | </div> |
385 | <p class="pull-right"> | 390 | <div class="customModelBody"> |
386 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> | 391 | |
387 | </p> | 392 | <div class="customAccordianHeader customActive"> |
388 | <div class="clearfix"></div> | 393 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> |
389 | </div> | 394 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> |
390 | <div class="customModelBody"> | 395 | <option value="" disabled selected>Pricing Structure</option> |
391 | 396 | <option value="minus">Retail-(minus)</option> | |
392 | <div class="customAccordianHeader customActive"> | 397 | <option value="plus">Cost+(plus)</option> |
393 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> | 398 | <option value="equal">Direct=(equal)</option> |
394 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> | 399 | </select> |
395 | <option value="" disabled selected>Pricing Structure</option> | 400 | <span style="margin-right: 0;">$</span> |
396 | <option value="minus">Retail-(minus)</option> | 401 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> |
397 | <option value="plus">Cost+(plus)</option> | 402 | <div class="clearfix"></div> |
398 | <option value="equal">Direct=(equal)</option> | 403 | </div> |
399 | </select> | 404 | <div class="customAccordianTabBody"> |
400 | <span style="margin-right: 0;">$</span> | 405 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> |
401 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> | 406 | </div> |
402 | <div class="clearfix"></div> | 407 | |
403 | </div> | 408 | </div> |
404 | <div class="customAccordianTabBody"> | 409 | <div class="customModelFooter text-center"> |
405 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> | 410 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> |
406 | </div> | 411 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> |
407 | 412 | </div> | |
408 | </div> | 413 | </div> |
409 | <div class="customModelFooter text-center"> | 414 | </div> |
410 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> | 415 | </div> |
411 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> | 416 | |
412 | </div> | 417 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> |
413 | </div> | 418 | <div class="customModalInner"> |
414 | </div> | 419 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
415 | </div> | 420 | <table> |
416 | 421 | <tr> | |
417 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> | 422 | <td> |
418 | <div class="customModalInner"> | 423 | <img src="img/info.png" style="width: 50px;"> |
419 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 424 | </td> |
420 | <table> | 425 | <td> |
421 | <tr> | 426 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
422 | <td> | 427 | </td> |
423 | <img src="img/info.png" style="width: 50px;"> | 428 | </tr> |
424 | </td> | 429 | </table> |
425 | <td> | 430 | </div> |
426 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 431 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
427 | </td> | 432 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> |
428 | </tr> | 433 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
429 | </table> | 434 | </div> |
430 | </div> | 435 | </div> |
431 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 436 | </div> |
432 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> | 437 | |
433 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 438 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> |
434 | </div> | 439 | <div class="customModalInner"> |
435 | </div> | 440 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
436 | </div> | 441 | <table> |
437 | 442 | <tr> | |
438 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> | 443 | <td> |
439 | <div class="customModalInner"> | 444 | <img src="img/info.png" style="width: 50px;"> |
440 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 445 | </td> |
441 | <table> | 446 | <td> |
442 | <tr> | 447 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |
443 | <td> | 448 | </td> |
444 | <img src="img/info.png" style="width: 50px;"> | 449 | </tr> |
445 | </td> | 450 | </table> |
446 | <td> | 451 | </div> |
447 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 452 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
448 | </td> | 453 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> |
449 | </tr> | 454 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> |
450 | </table> | 455 | </div> |
451 | </div> | 456 | </div> |
452 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 457 | </div> |
453 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> | 458 | |
454 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> | 459 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> |
455 | </div> | 460 | <div class="customModalInner"> |
456 | </div> | 461 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
457 | </div> | 462 | <table> |
458 | 463 | <tr> | |
459 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> | 464 | <td> |
460 | <div class="customModalInner"> | 465 | <img src="img/info.png" style="width: 50px;"> |
461 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 466 | </td> |
462 | <table> | 467 | <td> |
463 | <tr> | 468 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |
464 | <td> | 469 | </td> |
465 | <img src="img/info.png" style="width: 50px;"> | 470 | </tr> |
466 | </td> | 471 | </table> |
467 | <td> | 472 | </div> |
468 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 473 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
469 | </td> | 474 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button> |
470 | </tr> | 475 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button> |
471 | </table> | 476 | </div> |
472 | </div> | 477 | </div> |
473 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 478 | </div> |
474 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button> | 479 | |
475 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button> | 480 | <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;"> |
476 | </div> | 481 | <div class="customModalInner"> |
477 | </div> | 482 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
478 | </div> | 483 | <table> |
479 | 484 | <tr> | |
480 | <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;"> | 485 | <td> |
481 | <div class="customModalInner"> | 486 | <img src="img/info.png" style="width: 50px;"> |
482 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 487 | </td> |
483 | <table> | 488 | <td> |
484 | <tr> | 489 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> |
485 | <td> | 490 | </td> |
486 | <img src="img/info.png" style="width: 50px;"> | 491 | </tr> |
487 | </td> | 492 | </table> |
488 | <td> | 493 | </div> |
489 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> | 494 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
490 | </td> | 495 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button> |
491 | </tr> | 496 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button> |
492 | </table> | 497 | </div> |
493 | </div> | 498 | </div> |
494 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 499 | </div> |
495 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button> | 500 | |
496 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button> | 501 | <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;"> |
497 | </div> | 502 | <div class="customModalInner"> |
498 | </div> | 503 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
499 | </div> | 504 | <table> |
500 | 505 | <tr> | |
501 | <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;"> | 506 | <td> |
502 | <div class="customModalInner"> | 507 | <img src="img/info.png" style="width: 50px;"> |
503 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 508 | </td> |
504 | <table> | 509 | <td> |
505 | <tr> | 510 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> |
506 | <td> | 511 | </td> |
507 | <img src="img/info.png" style="width: 50px;"> | 512 | </tr> |
508 | </td> | 513 | </table> |
509 | <td> | 514 | </div> |
510 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> | 515 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
511 | </td> | 516 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeletVtypeMargin()">Yes</button> |
512 | </tr> | 517 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button> |
513 | </table> | 518 | </div> |
514 | </div> | 519 | </div> |
515 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 520 | </div> |
516 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeletVtypeMargin()">Yes</button> | 521 | |
517 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button> | 522 | <!-- Le javascript |
518 | </div> | 523 | ================================================== --> |
519 | </div> | 524 | <!-- Placed at the end of the document so the pages load faster --> |
520 | </div> | 525 | <!-- <script> |
521 | 526 | CKEDITOR.replace( 'editor2', { | |
522 | <!-- Le javascript | 527 | height: 250, |
523 | ================================================== --> | 528 | extraPlugins: 'divarea' |
524 | <!-- Placed at the end of the document so the pages load faster --> | 529 | } ); |
525 | <!-- <script> | 530 | </script> --> |
bower.json
1 | { | 1 | { |
2 | "name": "acufuel", | 2 | "name": "acufuel", |
3 | "description": "", | 3 | "description": "", |
4 | "main": "index.js", | 4 | "main": "index.js", |
5 | "authors": [ | 5 | "authors": [ |
6 | "Rishav <rsingla.rishu@gmail.com>" | 6 | "Rishav <rsingla.rishu@gmail.com>" |
7 | ], | 7 | ], |
8 | "license": "ISC", | 8 | "license": "ISC", |
9 | "homepage": "", | 9 | "homepage": "", |
10 | "ignore": [ | 10 | "ignore": [ |
11 | "**/.*", | 11 | "**/.*", |
12 | "node_modules", | 12 | "node_modules", |
13 | "bower_components", | 13 | "bower_components", |
14 | "test", | 14 | "test", |
15 | "tests" | 15 | "tests" |
16 | ], | 16 | ], |
17 | "dependencies": { | 17 | "dependencies": { |
18 | "angular": "^1.6.2", | 18 | "angular": "^1.6.2", |
19 | "angular-animate": "^1.6.2", | 19 | "angular-animate": "^1.6.2", |
20 | "angular-route": "^1.6.2", | 20 | "angular-route": "^1.6.2", |
21 | "jquery": "^3.1.1", | 21 | "jquery": "^3.1.1", |
22 | "animate.css": "^3.5.2", | 22 | "animate.css": "^3.5.2", |
23 | "bootstrap": "^3.3.7", | 23 | "bootstrap": "^3.3.7", |
24 | "font-awesome": "fontawesome#^4.7.0", | 24 | "font-awesome": "fontawesome#^4.7.0", |
25 | "angular-ui-router": "^0.4.2", | 25 | "angular-ui-router": "^0.4.2", |
26 | "bootstrap-toggle": "^2.2.2", | 26 | "bootstrap-toggle": "^2.2.2", |
27 | "fullcalendar": "^3.2.0", | 27 | "fullcalendar": "^3.2.0", |
28 | "toastr": "^2.1.3", | 28 | "toastr": "^2.1.3", |
29 | "angular-bootstrap": "^2.5.0", | 29 | "angular-bootstrap": "^2.5.0", |
30 | "jqGrid": "^5.2.0", | 30 | "jqGrid": "^5.2.0", |
31 | "Autocomplete": "autocomplete#^2.0.5", | 31 | "Autocomplete": "autocomplete#^2.0.5", |
32 | "DataTables": "~1.10.15", | 32 | "DataTables": "~1.10.15", |
33 | "angular-cookies": "~1.6.4", | 33 | "angular-cookies": "~1.6.4", |
34 | "angular-resource": "~1.6.4", | 34 | "angular-resource": "~1.6.4", |
35 | "angular-xeditable": "~0.7.1", | 35 | "angular-xeditable": "~0.7.1", |
36 | "angular-bootstrap-toggle": "~0.1.2", | 36 | "angular-bootstrap-toggle": "~0.1.2", |
37 | "angular-ui-select2": "^0.0.5", | 37 | "angular-ui-select2": "^0.0.5", |
38 | "angular-ckeditor": "^1.0.3", | ||
39 | "angular-ui-calendar": "^1.0.2" | ||
38 | "angular-ckeditor": "^1.0.3", | 40 | } |
39 | "angular-ui-calendar": "^1.0.2" | 41 | } |
40 | } | 42 |