Commit 71c760e0c0c44c4b24e4d792529a5d4ab00a990e
1 parent
6284a85b90
Exists in
master
update Fuel Manager updates suggested by client
Showing
2 changed files
with
101 additions
and
49 deletions
Show diff stats
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 | |
10 | |||
11 | |||
12 | $scope.showLoader = true; | ||
10 | $scope.yes = function(data){ | 13 | $scope.yes = function(data){ |
11 | console.log('========'); | 14 | console.log('========'); |
12 | console.log('value', data); | 15 | console.log('value', data); |
13 | $uibModal.yes({ | 16 | $uibModal.yes({ |
14 | templateUrl: 'partials/pricingcontact/pricingcontact.html', | 17 | templateUrl: 'partials/pricingcontact/pricingcontact.html', |
15 | backdrop: true, | 18 | backdrop: true, |
16 | scope: $scope, | 19 | scope: $scope, |
17 | }) | 20 | }) |
18 | } | 21 | } |
19 | 22 | ||
20 | $scope.options = { | 23 | $scope.options = { |
21 | language: 'en', | 24 | language: 'en', |
22 | allowedContent: true, | 25 | allowedContent: true, |
23 | entities: false | 26 | entities: false |
24 | }; | 27 | }; |
25 | 28 | ||
26 | // Called when the editor is completely ready. | 29 | // Called when the editor is completely ready. |
27 | $scope.onReady = function () { | 30 | $scope.onReady = function () { |
28 | // ... | 31 | // ... |
29 | }; | 32 | }; |
30 | 33 | ||
31 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); | 34 | $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); |
32 | 35 | ||
33 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 36 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
34 | $scope.aTypeJets = result; | 37 | $scope.aTypeJets = result; |
35 | $scope.showLoader = false; | 38 | $scope.showLoader = false; |
36 | }) | 39 | }) |
37 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 40 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
38 | $scope.vTypeJets = result; | 41 | $scope.vTypeJets = result; |
39 | $scope.showLoader = false; | 42 | $scope.showLoader = false; |
40 | }) | 43 | }) |
41 | $scope.toggleJestAccordian = function(id, index){ | 44 | $scope.toggleJestAccordian = function(id, index){ |
42 | $scope.showLoader = true; | 45 | $scope.showLoader = true; |
43 | $('.'+id).slideDown(); | 46 | $('.'+id).slideDown(); |
44 | $('#'+id).addClass('customActive'); | 47 | $('#'+id).addClass('customActive'); |
45 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 48 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
46 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 49 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
47 | $('#'+id+' .btn-default').css('display', 'none'); | 50 | $('#'+id+' .btn-default').css('display', 'none'); |
51 | $('#'+id+' .btn-primary').css('display', 'none'); | ||
48 | 52 | ||
49 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 53 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
50 | $scope.aTypeJets[index].tierList = tiers; | 54 | $scope.aTypeJets[index].tierList = tiers; |
51 | $scope.showLoader = false; | 55 | $scope.showLoader = false; |
52 | }) | 56 | }) |
53 | } | 57 | } |
54 | $scope.toggleVtypeJestAccordian = function(id, index){ | 58 | $scope.toggleVtypeJestAccordian = function(id, index){ |
55 | $scope.showLoader = true; | 59 | $scope.showLoader = true; |
56 | $('.'+id).slideDown(); | 60 | $('.'+id).slideDown(); |
57 | $('#'+id).addClass('customActive'); | 61 | $('#'+id).addClass('customActive'); |
58 | $('#'+id+' select, #'+id+' input').prop("disabled", false); | 62 | $('#'+id+' select, #'+id+' input').prop("disabled", false); |
59 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); | 63 | $('#'+id+' .btn-success, #'+id+' .btn-danger').css('display', 'inline-block'); |
60 | $('#'+id+' .btn-default').css('display', 'none'); | 64 | $('#'+id+' .btn-default').css('display', 'none'); |
65 | $('#'+id+' .btn-primary').css('display', 'none'); | ||
61 | 66 | ||
62 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 67 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
63 | $scope.vTypeJets[index].tierList = tiers; | 68 | $scope.vTypeJets[index].tierList = tiers; |
64 | $scope.showLoader = false; | 69 | $scope.showLoader = false; |
65 | }) | 70 | }) |
66 | } | 71 | } |
67 | //$scope.trData = {}; | 72 | //$scope.trData = {}; |
68 | $scope.addNewTier = function(id, trData, index){ | 73 | $scope.addNewTier = function(id, trData, index){ |
69 | $scope.showLoader = true; | 74 | $scope.showLoader = true; |
70 | $scope.tr = {}; | 75 | $scope.tr = {}; |
71 | $scope.tr[index] = {}; | 76 | $scope.tr[index] = {}; |
72 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; | 77 | $scope.tr[index].minTierBreak = trData[index].minTierBreak; |
73 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; | 78 | $scope.tr[index].maxTierBreak = trData[index].maxTierBreak; |
74 | $scope.tr[index].margin = trData[index].margin; | 79 | $scope.tr[index].margin = trData[index].margin; |
75 | $scope.tr[index].marginTotal = '1.00'; | 80 | $scope.tr[index].marginTotal = '1.00'; |
76 | $scope.tr[index].marginTemplateId = id; | 81 | $scope.tr[index].marginTemplateId = id; |
77 | 82 | ||
78 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 83 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ |
79 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 84 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
80 | 85 | ||
81 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 86 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
82 | toastr.success('Successfully Added', { | 87 | toastr.success('Successfully Added', { |
83 | closeButton: true | 88 | closeButton: true |
84 | }) | 89 | }) |
85 | trData[index].minTierBreak = ''; | 90 | trData[index].minTierBreak = ''; |
86 | trData[index].maxTierBreak = ''; | 91 | trData[index].maxTierBreak = ''; |
87 | trData[index].margin = ''; | 92 | trData[index].margin = ''; |
88 | 93 | ||
89 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 94 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
90 | $scope.aTypeJets[index].tierList = tiers; | 95 | $scope.aTypeJets[index].tierList = tiers; |
91 | $scope.showLoader = false; | 96 | $scope.showLoader = false; |
92 | }) | 97 | }) |
93 | }) | 98 | }) |
94 | } | 99 | } |
95 | 100 | ||
96 | $scope.addNewVtypeTier = function(id, vtrData, index){ | 101 | $scope.addNewVtypeTier = function(id, vtrData, index){ |
97 | $scope.showLoader = true; | 102 | $scope.showLoader = true; |
98 | $scope.tr = {}; | 103 | $scope.tr = {}; |
99 | $scope.tr[index] = {}; | 104 | $scope.tr[index] = {}; |
100 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; | 105 | $scope.tr[index].minTierBreak = vtrData[index].minTierBreak; |
101 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; | 106 | $scope.tr[index].maxTierBreak = vtrData[index].maxTierBreak; |
102 | $scope.tr[index].margin = vtrData[index].margin; | 107 | $scope.tr[index].margin = vtrData[index].margin; |
103 | $scope.tr[index].marginTotal = '1.00'; | 108 | $scope.tr[index].marginTotal = '1.00'; |
104 | $scope.tr[index].marginTemplateId = id; | 109 | $scope.tr[index].marginTemplateId = id; |
105 | 110 | ||
106 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ | 111 | var tierData = 'minTierBreak='+$scope.tr[index].minTierBreak+'&maxTierBreak='+$scope.tr[index].maxTierBreak+'&margin='+$scope.tr[index].margin+ |
107 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; | 112 | '&marginTotal='+$scope.tr[index].marginTotal+'&marginTemplateId='+$scope.tr[index].marginTemplateId; |
108 | 113 | ||
109 | updateFuelManagerService.addNewTier(tierData).then(function(result) { | 114 | updateFuelManagerService.addNewTier(tierData).then(function(result) { |
110 | toastr.success('Successfully Added', { | 115 | toastr.success('Successfully Added', { |
111 | closeButton: true | 116 | closeButton: true |
112 | }) | 117 | }) |
113 | vtrData[index].minTierBreak = ''; | 118 | vtrData[index].minTierBreak = ''; |
114 | vtrData[index].maxTierBreak = ''; | 119 | vtrData[index].maxTierBreak = ''; |
115 | vtrData[index].margin = ''; | 120 | vtrData[index].margin = ''; |
116 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { | 121 | updateFuelManagerService.getJetTiers(id).then(function(tiers) { |
117 | $scope.vTypeJets[index].tierList = tiers; | 122 | $scope.vTypeJets[index].tierList = tiers; |
118 | $scope.showLoader = false; | 123 | $scope.showLoader = false; |
119 | }) | 124 | }) |
120 | }) | 125 | }) |
121 | } | 126 | } |
122 | 127 | ||
123 | $scope.editTier = function(tier, index){ | 128 | $scope.editTier = function(tier, index){ |
124 | $scope.showLoader = true; | 129 | $scope.showLoader = true; |
125 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 130 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
126 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 131 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
127 | 132 | ||
128 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 133 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
129 | toastr.success('Successfully Updated', { | 134 | toastr.success('Successfully Updated', { |
130 | closeButton: true | 135 | closeButton: true |
131 | }) | 136 | }) |
132 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 137 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
133 | $scope.aTypeJets[index].tierList = tiers; | 138 | $scope.aTypeJets[index].tierList = tiers; |
134 | $scope.showLoader = false; | 139 | $scope.showLoader = false; |
135 | }) | 140 | }) |
136 | }) | 141 | }) |
137 | 142 | ||
138 | } | 143 | } |
139 | 144 | ||
140 | $scope.editVtypeTier = function(tier, index){ | 145 | $scope.editVtypeTier = function(tier, index){ |
141 | $scope.showLoader = true; | 146 | $scope.showLoader = true; |
142 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ | 147 | var editTierData = 'minTierBreak='+tier.minTierBreak+'&maxTierBreak='+tier.maxTierBreak+'&margin='+tier.margin+ |
143 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; | 148 | '&marginTotal='+tier.marginTotal+'&marginTemplateId='+tier.marginTemplate.id+'&marginId='+tier.id; |
144 | 149 | ||
145 | updateFuelManagerService.editTier(editTierData).then(function(result) { | 150 | updateFuelManagerService.editTier(editTierData).then(function(result) { |
146 | toastr.success('Successfully Updated', { | 151 | toastr.success('Successfully Updated', { |
147 | closeButton: true | 152 | closeButton: true |
148 | }) | 153 | }) |
149 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { | 154 | updateFuelManagerService.getJetTiers(tier.marginTemplate.id).then(function(tiers) { |
150 | $scope.vTypeJets[index].tierList = tiers; | 155 | $scope.vTypeJets[index].tierList = tiers; |
151 | $scope.showLoader = false; | 156 | $scope.showLoader = false; |
152 | }) | 157 | }) |
153 | }) | 158 | }) |
154 | 159 | ||
155 | } | 160 | } |
156 | 161 | ||
157 | $scope.deleteTierObject = {}; | 162 | $scope.deleteTierObject = {}; |
158 | $scope.deleteTier = function(id, jetid, index){ | 163 | $scope.deleteTier = function(id, jetid, index){ |
159 | $scope.deleteTierObject.id = id; | 164 | $scope.deleteTierObject.id = id; |
160 | $scope.deleteTierObject.jetId = jetid; | 165 | $scope.deleteTierObject.jetId = jetid; |
161 | $scope.deleteTierObject.index = index; | 166 | $scope.deleteTierObject.index = index; |
162 | $('#deleteTierConfirm').css('display', 'block'); | 167 | $('#deleteTierConfirm').css('display', 'block'); |
163 | } | 168 | } |
164 | 169 | ||
165 | $scope.confirmDeleteTier = function(){ | 170 | $scope.confirmDeleteTier = function(){ |
166 | $scope.showLoader = true; | 171 | $scope.showLoader = true; |
167 | updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) { | 172 | updateFuelManagerService.deleteTier($scope.deleteTierObject.id).then(function(result) { |
168 | toastr.success(''+result.success+'', { | 173 | toastr.success(''+result.success+'', { |
169 | closeButton: true | 174 | closeButton: true |
170 | }) | 175 | }) |
171 | updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) { | 176 | updateFuelManagerService.getJetTiers($scope.deleteTierObject.jetId).then(function(tiers) { |
172 | $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers; | 177 | $scope.aTypeJets[$scope.deleteTierObject.index].tierList = tiers; |
173 | $scope.showLoader = false; | 178 | $scope.showLoader = false; |
174 | $scope.deleteTierObject = {}; | 179 | $scope.deleteTierObject = {}; |
175 | }) | 180 | }) |
176 | }) | 181 | }) |
177 | $('#deleteTierConfirm').css('display', 'none'); | 182 | $('#deleteTierConfirm').css('display', 'none'); |
178 | } | 183 | } |
179 | 184 | ||
180 | $scope.cancelTierDelete = function(){ | 185 | $scope.cancelTierDelete = function(){ |
181 | console.log('cancel'); | 186 | console.log('cancel'); |
182 | $('#deleteTierConfirm').css('display', 'none'); | 187 | $('#deleteTierConfirm').css('display', 'none'); |
183 | $scope.deleteTierObject = {}; | 188 | $scope.deleteTierObject = {}; |
184 | } | 189 | } |
185 | 190 | ||
186 | /*$scope.deleteVtypeTier = function(id, jetid, index){ | 191 | /*$scope.deleteVtypeTier = function(id, jetid, index){ |
187 | $scope.showLoader = true; | 192 | $scope.showLoader = true; |
188 | updateFuelManagerService.deleteTier(id).then(function(result) { | 193 | updateFuelManagerService.deleteTier(id).then(function(result) { |
189 | toastr.success(''+result.success+'', { | 194 | toastr.success(''+result.success+'', { |
190 | closeButton: true | 195 | closeButton: true |
191 | }) | 196 | }) |
192 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { | 197 | updateFuelManagerService.getJetTiers(jetid).then(function(tiers) { |
193 | $scope.vTypeJets[index].tierList = tiers; | 198 | $scope.vTypeJets[index].tierList = tiers; |
194 | $scope.showLoader = false; | 199 | $scope.showLoader = false; |
195 | }) | 200 | }) |
196 | }) | 201 | }) |
197 | }*/ | 202 | }*/ |
198 | 203 | ||
199 | $scope.deleteVtypeTierObject = {}; | 204 | $scope.deleteVtypeTierObject = {}; |
200 | $scope.deleteVtypeTier = function(id, jetid, index){ | 205 | $scope.deleteVtypeTier = function(id, jetid, index){ |
201 | $scope.deleteVtypeTierObject.id = id; | 206 | $scope.deleteVtypeTierObject.id = id; |
202 | $scope.deleteVtypeTierObject.jetId = jetid; | 207 | $scope.deleteVtypeTierObject.jetId = jetid; |
203 | $scope.deleteVtypeTierObject.index = index; | 208 | $scope.deleteVtypeTierObject.index = index; |
204 | $('#deleteVtypeTierConfirm').css('display', 'block'); | 209 | $('#deleteVtypeTierConfirm').css('display', 'block'); |
205 | } | 210 | } |
206 | 211 | ||
207 | $scope.confirmDeleteVtypeTier = function(){ | 212 | $scope.confirmDeleteVtypeTier = function(){ |
208 | $scope.showLoader = true; | 213 | $scope.showLoader = true; |
209 | updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) { | 214 | updateFuelManagerService.deleteTier($scope.deleteVtypeTierObject.id).then(function(result) { |
210 | toastr.success(''+result.success+'', { | 215 | toastr.success(''+result.success+'', { |
211 | closeButton: true | 216 | closeButton: true |
212 | }) | 217 | }) |
213 | updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) { | 218 | updateFuelManagerService.getJetTiers($scope.deleteVtypeTierObject.jetId).then(function(tiers) { |
214 | $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers; | 219 | $scope.vTypeJets[$scope.deleteVtypeTierObject.index].tierList = tiers; |
215 | $scope.showLoader = false; | 220 | $scope.showLoader = false; |
216 | $scope.deleteVtypeTierObject = {}; | 221 | $scope.deleteVtypeTierObject = {}; |
217 | }) | 222 | }) |
218 | }) | 223 | }) |
219 | $('#deleteVtypeTierConfirm').css('display', 'none'); | 224 | $('#deleteVtypeTierConfirm').css('display', 'none'); |
220 | } | 225 | } |
221 | 226 | ||
222 | $scope.cancelVtypeTierDelete = function(){ | 227 | $scope.cancelVtypeTierDelete = function(){ |
223 | console.log('cancel'); | 228 | console.log('cancel'); |
224 | $('#deleteVtypeTierConfirm').css('display', 'none'); | 229 | $('#deleteVtypeTierConfirm').css('display', 'none'); |
225 | $scope.deleteVtypeTierObject = {}; | 230 | $scope.deleteVtypeTierObject = {}; |
226 | } | 231 | } |
227 | 232 | ||
228 | $scope.saveJetAccordian = function(jets){ | 233 | $scope.saveJetAccordian = function(jets){ |
229 | $scope.showLoader = true; | 234 | $scope.showLoader = true; |
230 | $scope.jetsDetail = jets; | 235 | $scope.jetsDetail = jets; |
231 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 236 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
232 | //console.log('jets', $scope.jetsDetail); | 237 | //console.log('jets', $scope.jetsDetail); |
233 | $('.'+$scope.jetsDetail.id).slideUp(); | 238 | $('.'+$scope.jetsDetail.id).slideUp(); |
234 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 239 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
235 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 240 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
236 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 241 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
237 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 242 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
243 | $('#'+$scope.jetsDetail.id+' .btn-primary').css('display', 'inline-block'); | ||
238 | 244 | ||
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; | 245 | var editJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; |
240 | 246 | ||
241 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { | 247 | updateFuelManagerService.editAtypeJetMargin(editJetData).then(function(result) { |
242 | console.log('newJet', editJetData); | 248 | console.log('newJet', editJetData); |
243 | toastr.success('Successfully Updated', { | 249 | toastr.success('Successfully Updated', { |
244 | closeButton: true | 250 | closeButton: true |
245 | }) | 251 | }) |
246 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 252 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
247 | console.log('result', result); | 253 | console.log('result', result); |
248 | $scope.aTypeJets = result; | 254 | $scope.aTypeJets = result; |
249 | $scope.showLoader = false; | 255 | $scope.showLoader = false; |
250 | }) | 256 | }) |
251 | }) | 257 | }) |
252 | 258 | ||
253 | } | 259 | } |
254 | 260 | ||
255 | $scope.closeAccordian = function(jets){ | 261 | $scope.closeAccordian = function(jets){ |
256 | $('.'+jets.id).slideUp(); | 262 | $('.'+jets.id).slideUp(); |
257 | $('#'+jets.id).removeClass('customActive'); | 263 | $('#'+jets.id).removeClass('customActive'); |
258 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | 264 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); |
259 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | 265 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); |
260 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | 266 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); |
267 | $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | ||
261 | } | 268 | } |
262 | 269 | ||
263 | $scope.closeAccordianVtype = function(jets){ | 270 | $scope.closeAccordianVtype = function(jets){ |
264 | $('.'+jets.id).slideUp(); | 271 | $('.'+jets.id).slideUp(); |
265 | $('#'+jets.id).removeClass('customActive'); | 272 | $('#'+jets.id).removeClass('customActive'); |
266 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); | 273 | $('#'+jets.id+' select, #'+jets.id+' input').prop("disabled", true); |
267 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); | 274 | $('#'+jets.id+' .btn-success, #'+jets.id+' .btn-danger').css('display', 'none'); |
268 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); | 275 | $('#'+jets.id+' .btn-default').css('display', 'inline-block'); |
276 | $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | ||
269 | } | 277 | } |
270 | 278 | ||
271 | $scope.saveVtypeJetAccordian = function(jets){ | 279 | $scope.saveVtypeJetAccordian = function(jets){ |
272 | $scope.showLoader = true; | 280 | $scope.showLoader = true; |
273 | $scope.jetsDetail = jets; | 281 | $scope.jetsDetail = jets; |
274 | $scope.jetsDetail.userProfileId = $scope.userProfileId; | 282 | $scope.jetsDetail.userProfileId = $scope.userProfileId; |
275 | //console.log('jets', $scope.jetsDetail); | 283 | //console.log('jets', $scope.jetsDetail); |
276 | $('.'+$scope.jetsDetail.id).slideUp(); | 284 | $('.'+$scope.jetsDetail.id).slideUp(); |
277 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); | 285 | $('#'+$scope.jetsDetail.id).removeClass('customActive'); |
278 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); | 286 | $('#'+$scope.jetsDetail.id+' select, #'+$scope.jetsDetail.id+' input').prop("disabled", true); |
279 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); | 287 | $('#'+$scope.jetsDetail.id+' .btn-success, #'+$scope.jetsDetail.id+' .btn-danger').css('display', 'none'); |
280 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); | 288 | $('#'+$scope.jetsDetail.id+' .btn-default').css('display', 'inline-block'); |
289 | $('#'+jets.id+' .btn-primary').css('display', 'inline-block'); | ||
281 | 290 | ||
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; | 291 | var editVtypeJetData = 'productType='+$scope.jetsDetail.productType+'&marginName='+$scope.jetsDetail.marginName+'&pricingStructure='+$scope.jetsDetail.pricingStructure+'&marginValue='+$scope.jetsDetail.marginValue+'&userProfileId='+$scope.jetsDetail.userProfileId+'&marginId='+$scope.jetsDetail.id+'&message='+$scope.jetsDetail.message; |
283 | 292 | ||
284 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { | 293 | updateFuelManagerService.editVtypeJetMargin(editVtypeJetData).then(function(result) { |
285 | console.log('newJet', editVtypeJetData); | 294 | console.log('newJet', editVtypeJetData); |
286 | toastr.success('Successfully Updated', { | 295 | toastr.success('Successfully Updated', { |
287 | closeButton: true | 296 | closeButton: true |
288 | }) | 297 | }) |
289 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 298 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
290 | $scope.vTypeJets = result; | 299 | $scope.vTypeJets = result; |
291 | console.log('second jets', result); | 300 | console.log('second jets', result); |
292 | $scope.showLoader = false; | 301 | $scope.showLoader = false; |
293 | }) | 302 | }) |
294 | }) | 303 | }) |
295 | 304 | ||
296 | } | 305 | } |
297 | 306 | ||
298 | $scope.newJet = {}; | 307 | $scope.newJet = {}; |
299 | 308 | ||
300 | $scope.addNewMarginBtn = function(){ | 309 | $scope.addNewMarginBtn = function(){ |
301 | $('.addNewMargin').css('display', 'block'); | 310 | $('.addNewMargin').css('display', 'block'); |
302 | } | 311 | } |
303 | $scope.closeMarginPopup = function(){ | 312 | $scope.closeMarginPopup = function(){ |
304 | $('.addNewMargin').css('display', 'none'); | 313 | $('.addNewMargin').css('display', 'none'); |
305 | $scope.newJet = {}; | 314 | $scope.newJet = {}; |
306 | } | 315 | } |
307 | 316 | ||
308 | //$scope.newJet.productType = ''; | 317 | //$scope.newJet.productType = ''; |
309 | 318 | ||
310 | $scope.addNewATypeJet = function(){ | 319 | $scope.addNewATypeJet = function(){ |
311 | $scope.showLoader = true; | 320 | $scope.showLoader = true; |
312 | $scope.newJet.productType = 'JET-A'; | 321 | $scope.newJet.productType = 'JET-A'; |
313 | $scope.newJet.userProfileId = $scope.userProfileId; | 322 | $scope.newJet.userProfileId = $scope.userProfileId; |
314 | 323 | ||
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; | 324 | var jetData = 'productType='+$scope.newJet.productType+'&marginName='+$scope.newJet.marginName+'&pricingStructure='+$scope.newJet.pricingStructure+'&marginValue='+$scope.newJet.marginValue+'&userProfileId='+$scope.newJet.userProfileId+'&message='+$scope.newJet.message; |
316 | 325 | ||
317 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { | 326 | updateFuelManagerService.addNewAtypeJetMargin(jetData).then(function(result) { |
318 | console.log('newJet', jetData); | 327 | console.log('newJet', jetData); |
319 | toastr.success('Successfully Added', { | 328 | toastr.success('Successfully Added', { |
320 | closeButton: true | 329 | closeButton: true |
321 | }) | 330 | }) |
322 | $('.addNewMargin').css('display', 'none'); | 331 | $('.addNewMargin').css('display', 'none'); |
323 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 332 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
324 | console.log('result', result); | 333 | console.log('result', result); |
325 | $scope.aTypeJets = result; | 334 | $scope.aTypeJets = result; |
326 | $scope.showLoader = false; | 335 | $scope.showLoader = false; |
327 | }) | 336 | }) |
328 | }) | 337 | }) |
329 | } | 338 | } |
330 | 339 | ||
331 | $scope.newVtypeJet = {}; | 340 | $scope.newVtypeJet = {}; |
332 | 341 | ||
333 | $scope.addNewVtypePop = function(){ | 342 | $scope.addNewVtypePop = function(){ |
334 | $('.addNewVtype').css('display', 'block'); | 343 | $('.addNewVtype').css('display', 'block'); |
335 | } | 344 | } |
336 | $scope.closeNewVtypePop = function(){ | 345 | $scope.closeNewVtypePop = function(){ |
337 | $('.addNewVtype').css('display', 'none'); | 346 | $('.addNewVtype').css('display', 'none'); |
338 | $scope.newVtypeJet = {}; | 347 | $scope.newVtypeJet = {}; |
339 | } | 348 | } |
340 | 349 | ||
341 | $scope.addNewVTypeJet = function(){ | 350 | $scope.addNewVTypeJet = function(){ |
342 | $scope.showLoader = true; | 351 | $scope.showLoader = true; |
343 | $scope.newVtypeJet.productType = 'AVGAS'; | 352 | $scope.newVtypeJet.productType = 'AVGAS'; |
344 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; | 353 | $scope.newVtypeJet.userProfileId = $scope.userProfileId; |
345 | 354 | ||
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; | 355 | var vJetData = 'productType='+$scope.newVtypeJet.productType+'&marginName='+$scope.newVtypeJet.marginName+'&pricingStructure='+$scope.newVtypeJet.pricingStructure+'&marginValue='+$scope.newVtypeJet.marginValue+'&userProfileId='+$scope.newVtypeJet.userProfileId+'&message='+$scope.newVtypeJet.message; |
347 | 356 | ||
348 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { | 357 | updateFuelManagerService.addNewVtypeJet(vJetData).then(function(result) { |
349 | 358 | ||
350 | toastr.success('Successfully Added', { | 359 | toastr.success('Successfully Added', { |
351 | closeButton: true | 360 | closeButton: true |
352 | }) | 361 | }) |
353 | $('.addNewVtype').css('display', 'none'); | 362 | $('.addNewVtype').css('display', 'none'); |
354 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 363 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
355 | $scope.vTypeJets = result; | 364 | $scope.vTypeJets = result; |
356 | $scope.showLoader = false; | 365 | $scope.showLoader = false; |
357 | }) | 366 | }) |
358 | }) | 367 | }) |
359 | 368 | ||
360 | } | 369 | } |
361 | 370 | ||
362 | 371 | ||
363 | $scope.sendEmail = {}; | 372 | $scope.sendEmail = {}; |
364 | 373 | ||
365 | $scope.confirmMail = function(){ | 374 | $scope.confirmMail = function(){ |
366 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { | 375 | if ($scope.sendEmail.pricing != '' && $scope.sendEmail.pricing != null && $scope.sendEmail.pricing != undefined) { |
367 | $('#confirm1').css('display', 'block'); | 376 | $('#confirm1').css('display', 'block'); |
368 | } | 377 | } |
369 | } | 378 | } |
370 | 379 | ||
371 | $scope.saveAndCloseConfirm = function(){ | 380 | $scope.saveAndCloseConfirm = function(){ |
372 | $('#confirm1').css('display', 'none'); | 381 | $('#confirm1').css('display', 'none'); |
373 | updateFuelManagerService.sendMailToMargin($scope.sendEmail.pricing).then(function(result) { | 382 | updateFuelManagerService.sendMailToMargin($scope.sendEmail.pricing).then(function(result) { |
374 | toastr.success(''+result.success+'', { | 383 | toastr.success(''+result.success+'', { |
375 | closeButton: true | 384 | closeButton: true |
376 | }) | 385 | }) |
377 | }) | 386 | }) |
378 | } | 387 | } |
379 | $scope.cancelAndCloseConfirm = function(){ | 388 | $scope.cancelAndCloseConfirm = function(){ |
380 | $scope.sendEmail = {}; | 389 | $scope.sendEmail = {}; |
381 | $scope.sendEmail.pricing = ''; | 390 | $scope.sendEmail.pricing = ''; |
382 | $('#confirm1').css('display', 'none'); | 391 | $('#confirm1').css('display', 'none'); |
383 | } | 392 | } |
384 | 393 | ||
385 | $scope.newFuelPricing = {}; | 394 | $scope.newFuelPricing = {}; |
386 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 395 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
387 | $scope.newFuelPricing = result; | 396 | $scope.newFuelPricing = result; |
388 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 397 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
389 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 398 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
390 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 399 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { |
391 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 400 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
392 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 401 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
393 | var day = newTime.getUTCDate(); | 402 | var day = newTime.getUTCDate(); |
394 | var year = newTime.getUTCFullYear(); | 403 | var year = newTime.getUTCFullYear(); |
395 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 404 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
396 | } | 405 | } |
397 | } | 406 | } |
398 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 407 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
399 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 408 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
400 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 409 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { |
401 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 410 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
402 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 411 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
403 | var nextDay = newTime.getUTCDate(); | 412 | var nextDay = newTime.getUTCDate(); |
404 | var nextYear = newTime.getUTCFullYear(); | 413 | var nextYear = newTime.getUTCFullYear(); |
405 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 414 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
406 | } | 415 | } |
407 | } | 416 | } |
408 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 417 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
409 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 418 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
410 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 419 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
411 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 420 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
412 | var dday = newTime.getUTCDate(); | 421 | var dday = newTime.getUTCDate(); |
413 | var dyear = newTime.getUTCFullYear(); | 422 | var dyear = newTime.getUTCFullYear(); |
414 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 423 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
415 | } | 424 | } |
416 | } | 425 | } |
417 | } | 426 | } |
427 | |||
428 | var str =""+ $scope.newFuelPricing[i].name | ||
429 | if(str.startsWith("J")){ | ||
430 | $scope.newFuelPricing[i].jeta = true; | ||
431 | var str1 = str.substring(0,5) | ||
432 | var str2 = str.substring(6, str.length) | ||
433 | $scope.newFuelPricing[i].name = str1 | ||
434 | $scope.newFuelPricing[i].namejetrest = str2 | ||
435 | |||
436 | |||
437 | }else if(str.startsWith("100")){ | ||
438 | $scope.newFuelPricing[i].avgas = true; | ||
439 | var str1 = str.substring(0,5) | ||
440 | var str2 = str.substring(6, str.length) | ||
441 | $scope.newFuelPricing[i].name = str1 | ||
442 | $scope.newFuelPricing[i].nameavgasrest = str2 | ||
443 | } | ||
418 | } | 444 | } |
419 | $scope.showLoader = false; | 445 | $scope.showLoader = false; |
446 | |||
420 | }) | 447 | }) |
421 | $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ | 448 | $scope.$watch("fuelPricing.fuelPricing.expirationDate",function(old,newv){ |
422 | }); | 449 | }); |
423 | $scope.updateFuelPricing = {}; | 450 | $scope.updateFuelPricing = {}; |
424 | $scope.updateFuelPricing.fuelPricingList = []; | 451 | $scope.updateFuelPricing.fuelPricingList = []; |
425 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; | 452 | $scope.updateFuelPricing.userProfileId = $scope.userProfileId; |
426 | $scope.updateFuelPricingClick = function(){ | 453 | $scope.updateFuelPricingClick = function(){ |
427 | $scope.showLoader = true; | 454 | $scope.showLoader = true; |
428 | 455 | ||
429 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 456 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
430 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 457 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
431 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 458 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
432 | if ($scope.newFuelPricing[i].fuelPricing.cost == null) { | 459 | if ($scope.newFuelPricing[i].fuelPricing.cost == null) { |
433 | $scope.newFuelPricing[i].fuelPricing.cost = ''; | 460 | $scope.newFuelPricing[i].fuelPricing.cost = ''; |
434 | } | 461 | } |
435 | if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { | 462 | if ($scope.newFuelPricing[i].fuelPricing.papMargin == null) { |
436 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; | 463 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; |
437 | } | 464 | } |
438 | if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { | 465 | if ($scope.newFuelPricing[i].fuelPricing.papTotal == null) { |
439 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; | 466 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; |
440 | } | 467 | } |
441 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { | 468 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate == null) { |
442 | $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; | 469 | $scope.newFuelPricing[i].fuelPricing.expirationDate = ''; |
443 | }else{ | 470 | }else{ |
444 | $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 471 | $scope.newFuelPricing[i].fuelPricing.expirationDate = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
445 | console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); | 472 | console.log('$scope.newFuelPricing[i].fuelPricing.expirationDate', $scope.newFuelPricing[i].fuelPricing.expirationDate); |
446 | $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); | 473 | $scope.newFuelPricing[i].fuelPricing.expirationDate = $scope.newFuelPricing[i].fuelPricing.expirationDate.getTime(); |
447 | } | 474 | } |
448 | 475 | ||
449 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 476 | $scope.newFuelPricing[i].fuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].fuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
450 | $scope.updateFuelPricing.fuelPricingList.push({ | 477 | $scope.updateFuelPricing.fuelPricingList.push({ |
451 | 'cost': $scope.newFuelPricing[i].fuelPricing.cost, | 478 | 'cost': $scope.newFuelPricing[i].fuelPricing.cost, |
452 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, | 479 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, |
453 | 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, | 480 | 'papTotal': $scope.newFuelPricing[i].fuelPricing.papTotal, |
454 | 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, | 481 | 'expirationDate': $scope.newFuelPricing[i].fuelPricing.expirationDate, |
455 | 'productId': $scope.newFuelPricing[i].id, | 482 | 'productId': $scope.newFuelPricing[i].id, |
456 | 'id': $scope.newFuelPricing[i].fuelPricing.id, | 483 | 'id': $scope.newFuelPricing[i].fuelPricing.id, |
457 | }) | 484 | }) |
458 | 485 | ||
459 | }else{ | 486 | }else{ |
460 | /*$scope.newFuelPricing[i].fuelPricing.cost = ''; | 487 | /*$scope.newFuelPricing[i].fuelPricing.cost = ''; |
461 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; | 488 | $scope.newFuelPricing[i].fuelPricing.papMargin = ''; |
462 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; | 489 | $scope.newFuelPricing[i].fuelPricing.papTotal = ''; |
463 | $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ | 490 | $scope.newFuelPricing[i].fuelPricing.expirationDate = '';*/ |
464 | } | 491 | } |
465 | 492 | ||
466 | } | 493 | } |
467 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { | 494 | updateFuelManagerService.updateFuelPricing($scope.updateFuelPricing).then(function(result) { |
468 | toastr.success('Successfully Updated', { | 495 | toastr.success('Successfully Updated', { |
469 | closeButton: true | 496 | closeButton: true |
470 | }) | 497 | }) |
471 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 498 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
472 | $scope.newFuelPricing = result; | 499 | $scope.newFuelPricing = result; |
473 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 500 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
474 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 501 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
475 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 502 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { |
476 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 503 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
477 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 504 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
478 | var day = newTime.getUTCDate(); | 505 | var day = newTime.getUTCDate(); |
479 | var year = newTime.getUTCFullYear(); | 506 | var year = newTime.getUTCFullYear(); |
480 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 507 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
481 | } | 508 | } |
482 | } | 509 | } |
483 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 510 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
484 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 511 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
485 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 512 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { |
486 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 513 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
487 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 514 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
488 | var nextDay = newTime.getUTCDate(); | 515 | var nextDay = newTime.getUTCDate(); |
489 | var nextYear = newTime.getUTCFullYear(); | 516 | var nextYear = newTime.getUTCFullYear(); |
490 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 517 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
491 | } | 518 | } |
492 | } | 519 | } |
493 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 520 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
494 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 521 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
495 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 522 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
496 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 523 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
497 | var dday = newTime.getUTCDate(); | 524 | var dday = newTime.getUTCDate(); |
498 | var dyear = newTime.getUTCFullYear(); | 525 | var dyear = newTime.getUTCFullYear(); |
499 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 526 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
500 | } | 527 | } |
501 | } | 528 | } |
502 | } | 529 | } |
503 | } | 530 | } |
504 | $scope.showLoader = false; | 531 | $scope.showLoader = false; |
505 | }) | 532 | }) |
506 | }) | 533 | }) |
507 | 534 | ||
508 | } | 535 | } |
509 | 536 | ||
510 | $scope.updateFutureFuelPricing = {}; | 537 | $scope.updateFutureFuelPricing = {}; |
511 | $scope.updateFutureFuelPricing.futureFuelPricingList = []; | 538 | $scope.updateFutureFuelPricing.futureFuelPricingList = []; |
512 | $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; | 539 | $scope.updateFutureFuelPricing.userProfileId = $scope.userProfileId; |
513 | $scope.updateFutureFuelPricingClick = function(){ | 540 | $scope.updateFutureFuelPricingClick = function(){ |
514 | $scope.showLoader = true; | 541 | $scope.showLoader = true; |
515 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 542 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
516 | //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin)); | 543 | //console.log(parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin)); |
517 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 544 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
518 | if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) { | 545 | if ($scope.newFuelPricing[i].futureFuelPricing.cost != null || $scope.newFuelPricing[i].futureFuelPricing.cost != '' || $scope.newFuelPricing[i].futureFuelPricing.cost != undefined) { |
519 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 546 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
520 | if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { | 547 | if ($scope.newFuelPricing[i].futureFuelPricing.cost == null) { |
521 | $scope.newFuelPricing[i].futureFuelPricing.cost = ''; | 548 | $scope.newFuelPricing[i].futureFuelPricing.cost = ''; |
522 | } | 549 | } |
523 | if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { | 550 | if ($scope.newFuelPricing[i].futureFuelPricing.papMargin == null) { |
524 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; | 551 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; |
525 | } | 552 | } |
526 | if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { | 553 | if ($scope.newFuelPricing[i].futureFuelPricing.papTotal == null) { |
527 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; | 554 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; |
528 | } | 555 | } |
529 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) { | 556 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration == null) { |
530 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = ''; | 557 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = ''; |
531 | }else{ | 558 | }else{ |
532 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 559 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
533 | console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 560 | console.log('$scope.newFuelPricing[i].futureFuelPricing.nextExpiration', $scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
534 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime(); | 561 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = $scope.newFuelPricing[i].futureFuelPricing.nextExpiration.getTime(); |
535 | } | 562 | } |
536 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) { | 563 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate == null) { |
537 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = ''; | 564 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = ''; |
538 | }else{ | 565 | }else{ |
539 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 566 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
540 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime(); | 567 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = $scope.newFuelPricing[i].futureFuelPricing.deployDate.getTime(); |
541 | } | 568 | } |
542 | 569 | ||
543 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); | 570 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = parseFloat($scope.newFuelPricing[i].futureFuelPricing.cost) + parseFloat($scope.newFuelPricing[i].fuelPricing.papMargin); |
544 | $scope.updateFutureFuelPricing.futureFuelPricingList.push({ | 571 | $scope.updateFutureFuelPricing.futureFuelPricingList.push({ |
545 | 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, | 572 | 'cost': $scope.newFuelPricing[i].futureFuelPricing.cost, |
546 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, | 573 | 'papMargin': $scope.newFuelPricing[i].fuelPricing.papMargin, |
547 | //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, | 574 | //'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, |
548 | 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, | 575 | 'papTotal': $scope.newFuelPricing[i].futureFuelPricing.papTotal, |
549 | 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration, | 576 | 'expirationDate': $scope.newFuelPricing[i].futureFuelPricing.nextExpiration, |
550 | 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate, | 577 | 'deployDate': $scope.newFuelPricing[i].futureFuelPricing.deployDate, |
551 | 'productId': $scope.newFuelPricing[i].id, | 578 | 'productId': $scope.newFuelPricing[i].id, |
552 | 'id': $scope.newFuelPricing[i].futureFuelPricing.id, | 579 | 'id': $scope.newFuelPricing[i].futureFuelPricing.id, |
553 | }) | 580 | }) |
554 | } | 581 | } |
555 | }else{ | 582 | }else{ |
556 | /*$scope.newFuelPricing[i].futureFuelPricing.cost = ''; | 583 | /*$scope.newFuelPricing[i].futureFuelPricing.cost = ''; |
557 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; | 584 | $scope.newFuelPricing[i].futureFuelPricing.papMargin = ''; |
558 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; | 585 | $scope.newFuelPricing[i].futureFuelPricing.papTotal = ''; |
559 | $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; | 586 | $scope.newFuelPricing[i].futureFuelPricing.expirationDate = ''; |
560 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/ | 587 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = '';*/ |
561 | } | 588 | } |
562 | } | 589 | } |
563 | updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) { | 590 | updateFuelManagerService.updateFutureFuelPricing($scope.updateFutureFuelPricing).then(function(result) { |
564 | toastr.success('Successfully Updated', { | 591 | toastr.success('Successfully Updated', { |
565 | closeButton: true | 592 | closeButton: true |
566 | }) | 593 | }) |
567 | updateFuelManagerService.getFuelPricingNew().then(function(result) { | 594 | updateFuelManagerService.getFuelPricingNew().then(function(result) { |
568 | $scope.newFuelPricing = result; | 595 | $scope.newFuelPricing = result; |
569 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { | 596 | for (var i = 0; i<$scope.newFuelPricing.length; i++) { |
570 | if ($scope.newFuelPricing[i].fuelPricing != null) { | 597 | if ($scope.newFuelPricing[i].fuelPricing != null) { |
571 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { | 598 | if ($scope.newFuelPricing[i].fuelPricing.expirationDate != null && $scope.newFuelPricing[i].fuelPricing.expirationDate != '') { |
572 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); | 599 | var newTime = new Date($scope.newFuelPricing[i].fuelPricing.expirationDate); |
573 | var month = newTime.getUTCMonth() + 1; //months from 1-12 | 600 | var month = newTime.getUTCMonth() + 1; //months from 1-12 |
574 | var day = newTime.getUTCDate(); | 601 | var day = newTime.getUTCDate(); |
575 | var year = newTime.getUTCFullYear(); | 602 | var year = newTime.getUTCFullYear(); |
576 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; | 603 | $scope.newFuelPricing[i].fuelPricing.expirationDate = month+'/'+day+'/'+year; |
577 | } | 604 | } |
578 | } | 605 | } |
579 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 606 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
580 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 607 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
581 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { | 608 | if ($scope.newFuelPricing[i].futureFuelPricing.nextExpiration != null && $scope.newFuelPricing[i].futureFuelPricing.nextExpiration != '') { |
582 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); | 609 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.nextExpiration); |
583 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 | 610 | var nextMonth = newTime.getUTCMonth() + 1; //months from 1-12 |
584 | var nextDay = newTime.getUTCDate(); | 611 | var nextDay = newTime.getUTCDate(); |
585 | var nextYear = newTime.getUTCFullYear(); | 612 | var nextYear = newTime.getUTCFullYear(); |
586 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; | 613 | $scope.newFuelPricing[i].futureFuelPricing.nextExpiration = nextMonth+'/'+nextDay+'/'+nextYear; |
587 | } | 614 | } |
588 | } | 615 | } |
589 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { | 616 | if ($scope.newFuelPricing[i].futureFuelPricing != null) { |
590 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { | 617 | if ($scope.newFuelPricing[i].futureFuelPricing.deployDate != null && $scope.newFuelPricing[i].futureFuelPricing.deployDate != '') { |
591 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); | 618 | var newTime = new Date($scope.newFuelPricing[i].futureFuelPricing.deployDate); |
592 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 619 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
593 | var dday = newTime.getUTCDate(); | 620 | var dday = newTime.getUTCDate(); |
594 | var dyear = newTime.getUTCFullYear(); | 621 | var dyear = newTime.getUTCFullYear(); |
595 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 622 | $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
596 | } | 623 | } |
597 | } | 624 | } |
598 | } | 625 | } |
599 | } | 626 | } |
600 | $scope.showLoader = false; | 627 | $scope.showLoader = false; |
601 | }) | 628 | }) |
602 | }) | 629 | }) |
603 | 630 | ||
604 | 631 | ||
605 | } | 632 | } |
606 | 633 | ||
607 | updateFuelManagerService.getMargin().then(function(result) { | 634 | updateFuelManagerService.getMargin().then(function(result) { |
608 | $scope.marginList = result; | 635 | $scope.marginList = result; |
609 | }) | 636 | }) |
610 | 637 | ||
611 | $scope.marginIdDelete = ''; | 638 | $scope.marginIdDelete = ''; |
612 | $scope.deleteJetAccordian = function(id){ | 639 | $scope.deleteJetAccordian = function(id){ |
613 | $scope.marginIdDelete = id; | 640 | $scope.marginIdDelete = id; |
614 | $('#deleteMargin').css('display', 'block'); | 641 | $('#deleteMargin').css('display', 'block'); |
615 | } | 642 | } |
616 | 643 | ||
617 | $scope.confirmDeleteMargin = function(){ | 644 | $scope.confirmDeleteMargin = function(){ |
618 | $('#deleteMargin').css('display', 'none'); | 645 | $('#deleteMargin').css('display', 'none'); |
619 | $scope.showLoader = true; | 646 | $scope.showLoader = true; |
620 | updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) { | 647 | updateFuelManagerService.deleteMargin($scope.marginIdDelete).then(function(result) { |
621 | toastr.success(''+result.success+'', { | 648 | toastr.success(''+result.success+'', { |
622 | closeButton: true | 649 | closeButton: true |
623 | }) | 650 | }) |
624 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { | 651 | updateFuelManagerService.getATypeJets($scope.userProfileId).then(function(result) { |
625 | $scope.aTypeJets = result; | 652 | $scope.aTypeJets = result; |
626 | $scope.showLoader = false; | 653 | $scope.showLoader = false; |
627 | }) | 654 | }) |
628 | }) | 655 | }) |
629 | } | 656 | } |
630 | 657 | ||
631 | $scope.cancelMarginDelete = function(){ | 658 | $scope.cancelMarginDelete = function(){ |
632 | $scope.marginIdDelete = ''; | 659 | $scope.marginIdDelete = ''; |
633 | $('#deleteMargin').css('display', 'none'); | 660 | $('#deleteMargin').css('display', 'none'); |
634 | } | 661 | } |
635 | 662 | ||
636 | $scope.marginVtypeIdDelete = ''; | 663 | $scope.marginVtypeIdDelete = ''; |
637 | $scope.deleteVtypeJetAccordian = function(id){ | 664 | $scope.deleteVtypeJetAccordian = function(id){ |
638 | $scope.marginVtypeIdDelete = id; | 665 | $scope.marginVtypeIdDelete = id; |
639 | $('#deleteVtypeMargin').css('display', 'block'); | 666 | $('#deleteVtypeMargin').css('display', 'block'); |
640 | } | 667 | } |
641 | 668 | ||
642 | $scope.confirmDeletVtypeMargin = function(){ | 669 | $scope.confirmDeletVtypeMargin = function(){ |
643 | $('#deleteVtypeMargin').css('display', 'none'); | 670 | $('#deleteVtypeMargin').css('display', 'none'); |
644 | $scope.showLoader = true; | 671 | $scope.showLoader = true; |
645 | updateFuelManagerService.deleteMargin($scope.marginVtypeIdDelete).then(function(result) { | 672 | updateFuelManagerService.deleteMargin($scope.marginVtypeIdDelete).then(function(result) { |
646 | toastr.success(''+result.success+'', { | 673 | toastr.success(''+result.success+'', { |
647 | closeButton: true | 674 | closeButton: true |
648 | }) | 675 | }) |
649 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { | 676 | updateFuelManagerService.getVTypeJets($scope.userProfileId).then(function(result) { |
650 | $scope.vTypeJets = result; | 677 | $scope.vTypeJets = result; |
651 | $scope.showLoader = false; | 678 | $scope.showLoader = false; |
652 | }) | 679 | }) |
653 | }) | 680 | }) |
654 | } | 681 | } |
655 | 682 | ||
656 | $scope.cancelVtypeMarginDelete = function(){ | 683 | $scope.cancelVtypeMarginDelete = function(){ |
657 | $scope.marginVtypeIdDelete = ''; | 684 | $scope.marginVtypeIdDelete = ''; |
658 | $('#deleteVtypeMargin').css('display', 'none'); | 685 | $('#deleteVtypeMargin').css('display', 'none'); |
659 | } | 686 | } |
660 | 687 | ||
688 | |||
689 | |||
690 | |||
691 | |||
661 | }]); | 692 | }]); |
662 | 693 | ||
663 | 694 | ||
664 | 695 |
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 style="width: 90%; margin-left: 5%;"> |
12 | <div class="row"> | 12 | <div class="row"> |
13 | <div class="col-md-5"> | 13 | |
14 | <div class="col-md-6"> | ||
14 | <div class="widget stacked"> | 15 | <div class="widget stacked"> |
15 | <div class="widget-header"> | 16 | <div class="widget-header"> |
16 | <i class="fa fa-pencil"></i> | 17 | <i class="fa fa-pencil"></i> |
17 | <h3>Price Manager</h3> | 18 | <h3>Price Manager Staging</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()"> | ||
19 | <option value="" disabled selected="selected">Send Pricing Email</option> | ||
20 | <option ng-repeat="margins in marginList" value="{{margins.id}}">{{margins.marginName}}</option> | ||
21 | <option disabled>_______________</option> | ||
22 | <option value="all">Distribute All</option> | ||
23 | </select> | ||
24 | </div> | 19 | </div> |
25 | <!-- /widget-header --> | 20 | <!-- /widget-header --> |
26 | <div class="widget-content"> | 21 | <div class="widget-content"> |
27 | <h4>Update Fuel Price Here</h4> | 22 | <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6> |
23 | <form> | ||
28 | <table class="table"> | 24 | <table class="table"> |
29 | <thead> | 25 | <thead> |
30 | <tr> | 26 | <tr> |
31 | <th> Product</th> | 27 | <th> Product</th> |
32 | <th> Cost</th> | 28 | <th> Cost</th> |
33 | <th> Margin</th> | 29 | <th> PAP(Margin)</th> |
30 | <th> Deploy Date</th> | ||
31 | <th style="color: #F90;">Price Expires</th> | ||
34 | <th> PAP(Total)</th> | 32 | <th> PAP(Total)</th> |
35 | <th style="color: #F90;"> Expires</th> | ||
36 | </tr> | 33 | </tr> |
37 | </thead> | 34 | </thead> |
38 | <tbody> | 35 | <tbody> |
39 | <tr ng-repeat="fuelPricing in newFuelPricing"> | 36 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
40 | <td> | 37 | <td> |
41 | <span>{{fuelPricing.name}}</span> | 38 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> |
39 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | ||
40 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | ||
41 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</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.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> |
45 | </td> | ||
46 | <td> | ||
47 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;"> | ||
45 | </td> | 48 | </td> |
46 | <td> | 49 | <td> |
47 | <input type="text" class="form-control" ng-model="fuelPricing.fuelPricing.papMargin" style="height:31px; width: 50px; padding: 6px 6px;"> | 50 | <input type="text" class="form-control" ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" datepicker ng-model="fuelPricing.futureFuelPricing.deployDate" style="height:31px; width: 80px; padding: 6px 6px;"> |
48 | </td> | 51 | </td> |
49 | <td> | 52 | <td> |
50 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | 53 | <input type="text" class="form-control" datepicker ng-disabled="fuelPricing.futureFuelPricing.cost == undefined || fuelPricing.futureFuelPricing.cost == null || fuelPricing.futureFuelPricing.cost == ''" ng-model="fuelPricing.futureFuelPricing.nextExpiration" style="height:31px; width: 80px; padding: 6px 6px;"> |
51 | </td> | 54 | </td> |
52 | <td> | 55 | <td> |
53 | <input type="text" class="form-control" datepicker ng-model="fuelPricing.fuelPricing.expirationDate" style="height:31px; width: 100px; padding: 6px 6px;"> | 56 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> |
54 | </td> | 57 | </td> |
55 | </tr> | 58 | </tr> |
56 | </tbody> | 59 | </tbody> |
57 | </table> | 60 | </table> |
58 | <div class="row" style="margin-left: 0px;"> | 61 | <div class="row" style="margin-left: 0px;"> |
59 | <div class="col-md-12" style= "text-align: right;"> | 62 | <div class="col-md-12" style= "text-align: right;"> |
60 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()">Save</button> | 63 | <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button> |
64 | |||
65 | <button type="reset" class="btn btn-default btn-xs" style="margin-right:33%">Reset All</button> | ||
66 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button> | ||
61 | </div> | 67 | </div> |
62 | </div> | 68 | </div> |
63 | </div> | 69 | </form> |
70 | </div> | ||
64 | <!-- /widget-content --> | 71 | <!-- /widget-content --> |
65 | </div> | 72 | </div> |
66 | <!-- /widget --> | 73 | <!-- /widget --> |
67 | </div> | 74 | </div> |
68 | 75 | ||
69 | <div class="col-md-7"> | 76 | <div class="col-md-6"> |
70 | <div class="widget stacked"> | 77 | <div class="widget stacked"> |
71 | <div class="widget-header"> | 78 | <div class="widget-header"> |
72 | <i class="fa fa-pencil"></i> | 79 | <i class="fa fa-pencil"></i> |
73 | <h3><b>JET-A</b> Customer Margin Template</h3> | 80 | <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3> |
74 | <div class="pull-right"> | 81 | |
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> | ||
77 | </div> | 82 | </div> |
78 | <!-- /widget-header --> | 83 | <!-- /widget-header --> |
79 | <div class="widget-content" style="padding-top: 10px;"> | 84 | <div class="widget-content" style="padding-top: 10px;"> |
80 | <section id="accordions"> | 85 | <section id="accordions"> |
81 | <div class="newCustomAccordian"> | 86 | <div class="newCustomAccordian"> |
82 | <!-- tab 1 --> | 87 | <!-- tab 1 --> |
83 | <div ng-repeat="jets in aTypeJets"> | 88 | <div ng-repeat="jets in aTypeJets"> |
84 | <div class="customAccordianHeader" id="{{jets.id}}"> | 89 | <div class="customAccordianHeader" id="{{jets.id}}"> |
85 | <span>{{jets.marginName}}</span> | 90 | <span>{{jets.marginName}}</span> |
86 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 91 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
87 | <option value="" disabled selected>Pricing Structure</option> | 92 | <option value="" disabled selected>Pricing Structure</option> |
88 | <option value="minus">Retail-(minus)</option> | 93 | <option value="minus">Retail/PAP-(minus)</option> |
89 | <option value="plus">Cost+(plus)</option> | 94 | <option value="plus">Cost+(plus)</option> |
90 | <option value="equal">Direct=(equal)</option> | ||
91 | </select> | 95 | </select> |
92 | <span style="margin-right: 0;">$</span> | 96 | <span style="margin-right: 0;">$</span> |
93 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 97 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
94 | <div class="pull-right"> | 98 | <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> | 99 | <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> | 100 | <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> | 101 | <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> | 102 | <button type="button" class="btn btn-primary" ng-click="updateFutureFuelPricingClick()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> |
103 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | ||
99 | </div> | 104 | </div> |
100 | <div class="clearfix"></div> | 105 | <div class="clearfix"></div> |
101 | </div> | 106 | </div> |
102 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 107 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
103 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> | 108 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> |
104 | <div class="tierListHead" style="height: 36px;"> | 109 | <div class="tierListHead" style="height: 36px;"> |
105 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 110 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
106 | </span> | 111 | </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> | 112 | <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 | 113 | ||
109 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 114 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
110 | <span ng-show="showEditTier">-</span> | 115 | <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> | 116 | <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> | 117 | <div class="clearfix"></div> |
113 | </div> | 118 | </div> |
114 | <div class="tierListBody" style="height: 35px;"> | 119 | <div class="tierListBody" style="height: 35px;"> |
115 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 120 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
116 | 121 | ||
117 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 122 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
118 | 123 | ||
119 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | 124 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> |
120 | 125 | ||
121 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 126 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
122 | 127 | ||
123 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 128 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
124 | 129 | ||
125 | <div class="clearfix"></div> | 130 | <div class="clearfix"></div> |
126 | </div> | 131 | </div> |
127 | </div> | 132 | </div> |
128 | <div class="tierListWrap" style="width: 160px;"> | 133 | <div class="tierListWrap" style="width: 160px;"> |
129 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 134 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
130 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> | 135 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> |
131 | <span>-</span> | 136 | <span>-</span> |
132 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> | 137 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> |
133 | <div class="clearfix"></div> | 138 | <div class="clearfix"></div> |
134 | </div> | 139 | </div> |
135 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 140 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
136 | <span style="color: #449d44;">$</span> | 141 | <span style="color: #449d44;">$</span> |
137 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 142 | <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> | 143 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> |
139 | <div class="clearfix"></div> | 144 | <div class="clearfix"></div> |
140 | </div> | 145 | </div> |
141 | </div> | 146 | </div> |
142 | <!-- <div class="tierListWrap" style="width: 32px;"> | 147 | <!-- <div class="tierListWrap" style="width: 32px;"> |
143 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 148 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
144 | | 149 | |
145 | </div> | 150 | </div> |
146 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 151 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
147 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 152 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
148 | </div> | 153 | </div> |
149 | </div> --> | 154 | </div> --> |
150 | <div class="clearfix"></div> | 155 | <div class="clearfix"></div> |
151 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> | 156 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> |
152 | <br/> | 157 | <br/> |
153 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 158 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> |
154 | </div> | 159 | </div> |
155 | </div> | 160 | </div> |
156 | </div> | 161 | </div> |
162 | <div class="pull-right"> | ||
163 | <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> | ||
164 | </div> | ||
157 | </section> | 165 | </section> |
158 | <!-- <div class="row"> </div> | 166 | <!-- <div class="row"> </div> |
159 | <div class="row"> | 167 | <div class="row"> |
160 | <div class="form-group"> | 168 | <div class="form-group"> |
161 | <div class="col-lg-12 text-right"> | 169 | <div class="col-lg-12 text-right"> |
162 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 170 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
163 | <button type="reset" class="btn btn-default">Cancel</button> | 171 | <button type="reset" class="btn btn-default">Cancel</button> |
164 | </div> | 172 | </div> |
165 | </div> | 173 | </div> |
166 | </div> --> | 174 | </div> --> |
167 | </div> | 175 | </div> |
168 | <!-- /widget-content --> | 176 | <!-- /widget-content --> |
169 | </div> | 177 | </div> |
170 | <!-- /widget --> | 178 | <!-- /widget --> |
171 | </div> | 179 | </div> |
172 | <!-- /span6 --> | 180 | <!-- /span6 --> |
173 | </div> | 181 | </div> |
174 | <!-- /span12 --> | 182 | <!-- /span12 --> |
175 | </div> | 183 | </div> |
176 | <!-- /row --> | 184 | <!-- /row --> |
177 | <div class="container"> | 185 | <div style="width: 90%; margin-left: 5%;"> |
178 | <div class="row"> | 186 | <div class="row"> |
179 | <div class="col-md-5"> | 187 | <div class="col-md-6"> |
180 | <div class="widget stacked"> | 188 | <div class="widget stacked"> |
181 | <div class="widget-header"> | 189 | <div class="widget-header"> |
182 | <i class="fa fa-pencil"></i> | 190 | <i class="fa fa-pencil"></i> |
183 | <h3>Queue Future Pricing</h3> | 191 | <h3>Price Manager</h3> |
192 | <select style="float: right; margin: 7px 10px; width: 150px; height: 26px; padding: 0 0;" class="btn btn-primary" class="form-control" ng-model="sendEmail.pricing" ng-change="confirmMail()"> | ||
193 | <option value="" disabled selected="selected">Email All Pricing</option> | ||
194 | <option value="JET-A">Email JET-A pricing only</option> | ||
195 | <option value="AVGAS">Email AVGAS pricing only</option> | ||
196 | <option disabled>_______________________________</option> | ||
197 | <option value="all">Distribute All</option> | ||
198 | </select> | ||
184 | </div> | 199 | </div> |
185 | <!-- /widget-header --> | 200 | <!-- /widget-header --> |
186 | <div class="widget-content"> | 201 | <div class="widget-content"> |
187 | <h4>Update Queue Future Fuel Pricing Here</h4> | 202 | <h4>Update Fuel Price Here</h4> |
188 | <table class="table"> | 203 | <table class="table"> |
189 | <thead> | 204 | <thead> |
190 | <tr> | 205 | <tr> |
191 | <th> Product</th> | 206 | <th> Product</th> |
192 | <th> Cost</th> | 207 | <th> Cost</th> |
208 | <th> Margin</th> | ||
193 | <th> PAP(Total)</th> | 209 | <th> PAP(Total)</th> |
194 | <th> Deploy</th> | 210 | <th style="color: #F90;"> Expires</th> |
195 | <th style="color: #F90;"> Next Expiration</th> | ||
196 | </tr> | 211 | </tr> |
197 | </thead> | 212 | </thead> |
198 | <tbody> | 213 | <tbody> |
199 | <tr ng-repeat="fuelPricing in newFuelPricing"> | 214 | <tr ng-repeat="fuelPricing in newFuelPricing"> |
200 | <td> | 215 | <td> |
201 | <span>{{fuelPricing.name}}</span> | 216 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> |
217 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | ||
218 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | ||
219 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | ||
202 | </td> | 220 | </td> |
203 | <td> | 221 | <td> |
204 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> | 222 | <span>{{fuelPricing.fuelPricing.cost}}</span> |
205 | </td> | 223 | </td> |
206 | <td> | 224 | <td> |
207 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> | 225 | <span>{{fuelPricing.fuelPricing.papMargin}}</span> |
208 | </td> | 226 | </td> |
209 | <td> | 227 | <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;"> | 228 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> |
211 | </td> | 229 | </td> |
212 | <td> | 230 | <td> |
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;"> | 231 | <span>{{fuelPricing.fuelPricing.expirationDate}}</span> |
214 | </td> | 232 | </td> |
215 | </tr> | 233 | </tr> |
216 | </tbody> | 234 | </tbody> |
217 | </table> | 235 | </table> |
218 | <div class="row" style="margin-left: 0px;"> | 236 | <div class="row" style="margin-left: 0px;"> |
219 | <div class="col-md-12" style= "text-align: right;"> | 237 | <div class="col-md-12" style= "text-align: right;"> |
220 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()">Save</button> | 238 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFuelPricingClick()" style="font-size:14px; margin-right:3%">Save</button> |
221 | </div> | 239 | </div> |
222 | </div> | 240 | </div> |
223 | </div> | 241 | </div> |
224 | <!-- /widget-content --> | 242 | <!-- /widget-content --> |
225 | </div> | 243 | </div> |
226 | <!-- /widget --> | 244 | <!-- /widget --> |
227 | </div> | 245 | </div> |
228 | <div class="col-md-7"> | 246 | |
247 | <div class="col-md-6"> | ||
229 | <div class="widget stacked"> | 248 | <div class="widget stacked"> |
230 | <div class="widget-header"> | 249 | <div class="widget-header"> |
231 | <i class="fa fa-pencil"></i> | 250 | <i class="fa fa-pencil"></i> |
232 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> | 251 | <h3><b style="color: 39c;">AVGAS 100LL </b> <i>Customer Margin Template</i></h3> |
233 | <div class="pull-right"> | 252 | |
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> | ||
235 | </div> | ||
236 | </div> | 253 | </div> |
237 | <!-- /widget-header --> | 254 | <!-- /widget-header --> |
238 | <div class="widget-content" style="padding-top: 10px;"> | 255 | <div class="widget-content" style="padding-top: 10px;"> |
239 | <section id="accordions"> | 256 | <section id="accordions"> |
240 | <div class="newCustomAccordian"> | 257 | <div class="newCustomAccordian"> |
241 | <!-- tab 1 --> | 258 | <!-- tab 1 --> |
242 | <div ng-repeat="jets in vTypeJets"> | 259 | <div ng-repeat="jets in vTypeJets"> |
243 | <div class="customAccordianHeader" id="{{jets.id}}"> | 260 | <div class="customAccordianHeader" id="{{jets.id}}"> |
244 | <span>{{jets.marginName}}</span> | 261 | <span>{{jets.marginName}}</span> |
245 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 262 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
246 | <option value="" disabled selected>Pricing Structure</option> | 263 | <option value="" disabled selected>Pricing Structure</option> |
247 | <option value="minus">Retail-(minus)</option> | 264 | <option value="minus">Retail-(minus)</option> |
248 | <option value="plus">Cost+(plus)</option> | 265 | <option value="plus">Cost+(plus)</option> |
249 | <option value="equal">Direct=(equal)</option> | 266 | <option value="equal">Direct=(equal)</option> |
250 | </select> | 267 | </select> |
251 | <span style="margin-right: 0;">$</span> | 268 | <span style="margin-right: 0;">$</span> |
252 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 269 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
253 | <div class="pull-right"> | 270 | <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> | 271 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordianVtype(jets)">Close</button> |
255 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> | 272 | <button class="btn btn-success" style="display: none;" ng-click="saveVtypeJetAccordian(jets)">Save</button> |
256 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> | 273 | <button class="btn btn-danger" style="display: none;" ng-click="deleteVtypeJetAccordian(jets.id)">Delete</button> |
257 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)">Edit</button> | 274 | <button type="button" class="btn btn-primary" ng-click="updateFutureFuelPricingClick()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> |
275 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | ||
258 | </div> | 276 | </div> |
259 | <div class="clearfix"></div> | 277 | <div class="clearfix"></div> |
260 | </div> | 278 | </div> |
261 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 279 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
262 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> | 280 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> |
263 | <div class="tierListHead" style="height: 36px;"> | 281 | <div class="tierListHead" style="height: 36px;"> |
264 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 282 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
265 | </span> | 283 | </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> | 284 | <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> |
267 | 285 | ||
268 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 286 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
269 | <span ng-show="showEditTier">-</span> | 287 | <span ng-show="showEditTier">-</span> |
270 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 288 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
271 | <div class="clearfix"></div> | 289 | <div class="clearfix"></div> |
272 | </div> | 290 | </div> |
273 | <div class="tierListBody" style="height: 35px;"> | 291 | <div class="tierListBody" style="height: 35px;"> |
274 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 292 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
275 | 293 | ||
276 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 294 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
277 | 295 | ||
278 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | 296 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> |
279 | 297 | ||
280 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 298 | <button class="addTierBtn" ng-click="editVtypeTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
281 | 299 | ||
282 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 300 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVtypeTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
283 | 301 | ||
284 | <div class="clearfix"></div> | 302 | <div class="clearfix"></div> |
285 | </div> | 303 | </div> |
286 | </div> | 304 | </div> |
287 | <div class="tierListWrap" style="width: 160px;"> | 305 | <div class="tierListWrap" style="width: 160px;"> |
288 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 306 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
289 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> | 307 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> |
290 | <span>-</span> | 308 | <span>-</span> |
291 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> | 309 | <input type="text" placeholder="max" ng-model="vtrData[$index].maxTierBreak"> <b>gal.</b> |
292 | <div class="clearfix"></div> | 310 | <div class="clearfix"></div> |
293 | </div> | 311 | </div> |
294 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 312 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
295 | <span style="color: #449d44;">$</span> | 313 | <span style="color: #449d44;">$</span> |
296 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 314 | <input type="text" placeholder="margin" ng-model="vtrData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
297 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> | 315 | <button class="addTierBtn" ng-click="addNewVtypeTier(jets.id, vtrData, $index)">Add Tier</button> |
298 | <div class="clearfix"></div> | 316 | <div class="clearfix"></div> |
299 | </div> | 317 | </div> |
300 | </div> | 318 | </div> |
301 | <!-- <div class="tierListWrap" style="width: 32px;"> | 319 | <!-- <div class="tierListWrap" style="width: 32px;"> |
302 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 320 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
303 | | 321 | |
304 | </div> | 322 | </div> |
305 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 323 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
306 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 324 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
307 | </div> | 325 | </div> |
308 | </div> --> | 326 | </div> --> |
309 | <div class="clearfix"></div> | 327 | <div class="clearfix"></div> |
310 | <br/> | 328 | <br/> |
311 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 329 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> |
312 | </div> | 330 | </div> |
313 | </div> | 331 | </div> |
314 | </div> | 332 | </div> |
333 | <div class="pull-right"> | ||
334 | <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> | ||
335 | </div> | ||
315 | </section> | 336 | </section> |
316 | <!-- <div class="row"> </div> | 337 | <!-- <div class="row"> </div> |
317 | <div class="row"> | 338 | <div class="row"> |
318 | <div class="form-group"> | 339 | <div class="form-group"> |
319 | <div class="col-lg-12 text-right"> | 340 | <div class="col-lg-12 text-right"> |
320 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 341 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
321 | <button type="reset" class="btn btn-default">Cancel</button> | 342 | <button type="reset" class="btn btn-default">Cancel</button> |
322 | </div> | 343 | </div> |
323 | </div> | 344 | </div> |
324 | </div> --> | 345 | </div> --> |
325 | </div> | 346 | </div> |
326 | <!-- /widget-content --> | 347 | <!-- /widget-content --> |
327 | </div> | 348 | </div> |
328 | <!-- /widget --> | 349 | <!-- /widget --> |
329 | </div> | 350 | </div> |
330 | <!-- /span6 --> | 351 | <!-- /span6 --> |
331 | </div> | 352 | </div> |
332 | </div> | 353 | </div> |
333 | </div> | 354 | </div> |
334 | </div> <!-- /container --> | 355 | </div> <!-- /container --> |
335 | 356 | ||
336 | 357 | ||
337 | <div class="addNewMargin" style="display: none;"> | 358 | <div class="addNewMargin" style="display: none;"> |
338 | <div class="customBackdrop"> | 359 | <div class="customBackdrop"> |
339 | <div class="customModalInner" style="max-width: 700px;"> | 360 | <div class="customModalInner" style="max-width: 700px;"> |
340 | <div class="customModelHead"> | 361 | <div class="customModelHead"> |
341 | <p class="pull-left"> | 362 | <p class="pull-left"> |
342 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 363 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
343 | Add New JET-A Customer Margin | 364 | Add New JET-A Customer Margin |
344 | </p> | 365 | </p> |
345 | <p class="pull-right"> | 366 | <p class="pull-right"> |
346 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> | 367 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> |
347 | </p> | 368 | </p> |
348 | <div class="clearfix"></div> | 369 | <div class="clearfix"></div> |
349 | </div> | 370 | </div> |
350 | <div class="customModelBody"> | 371 | <div class="customModelBody"> |
351 | 372 | ||
352 | <div class="customAccordianHeader customActive"> | 373 | <div class="customAccordianHeader customActive"> |
353 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> | 374 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> |
354 | <select class="form-control" ng-model="newJet.pricingStructure"> | 375 | <select class="form-control" ng-model="newJet.pricingStructure"> |
355 | <option value="" disabled selected>Pricing Structure</option> | 376 | <option value="" disabled selected>Pricing Structure</option> |
356 | <option value="minus">Retail-(minus)</option> | 377 | <option value="minus">Retail-(minus)</option> |
357 | <option value="plus">Cost+(plus)</option> | 378 | <option value="plus">Cost+(plus)</option> |
358 | <option value="equal">Direct=(equal)</option> | 379 | <option value="equal">Direct=(equal)</option> |
359 | </select> | 380 | </select> |
360 | <span style="margin-right: 0;">$</span> | 381 | <span style="margin-right: 0;">$</span> |
361 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> | 382 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> |
362 | <div class="clearfix"></div> | 383 | <div class="clearfix"></div> |
363 | </div> | 384 | </div> |
364 | <div class="customAccordianTabBody"> | 385 | <div class="customAccordianTabBody"> |
365 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> | 386 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> |
366 | </div> | 387 | </div> |
367 | 388 | ||
368 | </div> | 389 | </div> |
369 | <div class="customModelFooter text-center"> | 390 | <div class="customModelFooter text-center"> |
370 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> | 391 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> |
371 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> | 392 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> |
372 | </div> | 393 | </div> |
373 | </div> | 394 | </div> |
374 | </div> | 395 | </div> |
375 | </div> | 396 | </div> |
376 | 397 | ||
377 | <div class="addNewVtype" style="display: none;"> | 398 | <div class="addNewVtype" style="display: none;"> |
378 | <div class="customBackdrop"> | 399 | <div class="customBackdrop"> |
379 | <div class="customModalInner" style="max-width: 700px;"> | 400 | <div class="customModalInner" style="max-width: 700px;"> |
380 | <div class="customModelHead"> | 401 | <div class="customModelHead"> |
381 | <p class="pull-left"> | 402 | <p class="pull-left"> |
382 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 403 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
383 | Add New AVGAS 100LL Customer Margin Template | 404 | Add New AVGAS 100LL Customer Margin Template |
384 | </p> | 405 | </p> |
385 | <p class="pull-right"> | 406 | <p class="pull-right"> |
386 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> | 407 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> |
387 | </p> | 408 | </p> |
388 | <div class="clearfix"></div> | 409 | <div class="clearfix"></div> |
389 | </div> | 410 | </div> |
390 | <div class="customModelBody"> | 411 | <div class="customModelBody"> |
391 | 412 | ||
392 | <div class="customAccordianHeader customActive"> | 413 | <div class="customAccordianHeader customActive"> |
393 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> | 414 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> |
394 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> | 415 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> |
395 | <option value="" disabled selected>Pricing Structure</option> | 416 | <option value="" disabled selected>Pricing Structure</option> |
396 | <option value="minus">Retail-(minus)</option> | 417 | <option value="minus">Retail-(minus)</option> |
397 | <option value="plus">Cost+(plus)</option> | 418 | <option value="plus">Cost+(plus)</option> |
398 | <option value="equal">Direct=(equal)</option> | 419 | <option value="equal">Direct=(equal)</option> |
399 | </select> | 420 | </select> |
400 | <span style="margin-right: 0;">$</span> | 421 | <span style="margin-right: 0;">$</span> |
401 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> | 422 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> |
402 | <div class="clearfix"></div> | 423 | <div class="clearfix"></div> |
403 | </div> | 424 | </div> |
404 | <div class="customAccordianTabBody"> | 425 | <div class="customAccordianTabBody"> |
405 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> | 426 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> |
406 | </div> | 427 | </div> |
407 | 428 | ||
408 | </div> | 429 | </div> |
409 | <div class="customModelFooter text-center"> | 430 | <div class="customModelFooter text-center"> |
410 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> | 431 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> |
411 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> | 432 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> |
412 | </div> | 433 | </div> |
413 | </div> | 434 | </div> |
414 | </div> | 435 | </div> |
415 | </div> | 436 | </div> |
416 | 437 | ||
417 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> | 438 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> |
418 | <div class="customModalInner"> | 439 | <div class="customModalInner"> |
419 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 440 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
420 | <table> | 441 | <table> |
421 | <tr> | 442 | <tr> |
422 | <td> | 443 | <td> |
423 | <img src="img/info.png" style="width: 50px;"> | 444 | <img src="img/info.png" style="width: 50px;"> |
424 | </td> | 445 | </td> |
425 | <td> | 446 | <td> |
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> | 447 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
427 | </td> | 448 | </td> |
428 | </tr> | 449 | </tr> |
429 | </table> | 450 | </table> |
430 | </div> | 451 | </div> |
431 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 452 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
432 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> | 453 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> |
433 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 454 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
434 | </div> | 455 | </div> |
435 | </div> | 456 | </div> |
436 | </div> | 457 | </div> |
437 | 458 | ||
438 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> | 459 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> |
439 | <div class="customModalInner"> | 460 | <div class="customModalInner"> |
440 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 461 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
441 | <table> | 462 | <table> |
442 | <tr> | 463 | <tr> |
443 | <td> | 464 | <td> |
444 | <img src="img/info.png" style="width: 50px;"> | 465 | <img src="img/info.png" style="width: 50px;"> |
445 | </td> | 466 | </td> |
446 | <td> | 467 | <td> |
447 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 468 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |
448 | </td> | 469 | </td> |
449 | </tr> | 470 | </tr> |
450 | </table> | 471 | </table> |
451 | </div> | 472 | </div> |
452 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 473 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
453 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> | 474 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> |
454 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> | 475 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> |
455 | </div> | 476 | </div> |
456 | </div> | 477 | </div> |
457 | </div> | 478 | </div> |
458 | 479 | ||
459 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> | 480 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> |
460 | <div class="customModalInner"> | 481 | <div class="customModalInner"> |
461 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 482 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
462 | <table> | 483 | <table> |
463 | <tr> | 484 | <tr> |
464 | <td> | 485 | <td> |
465 | <img src="img/info.png" style="width: 50px;"> | 486 | <img src="img/info.png" style="width: 50px;"> |
466 | </td> | 487 | </td> |
467 | <td> | 488 | <td> |
468 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 489 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |
469 | </td> | 490 | </td> |
470 | </tr> | 491 | </tr> |
471 | </table> | 492 | </table> |
472 | </div> | 493 | </div> |
473 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 494 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
474 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button> | 495 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteVtypeTier()">Yes</button> |
475 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button> | 496 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeTierDelete()">Cancel</button> |
476 | </div> | 497 | </div> |
477 | </div> | 498 | </div> |
478 | </div> | 499 | </div> |
479 | 500 | ||
480 | <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;"> | 501 | <div class="customConfirmPopBackdrop" id="deleteMargin" style="display: none;"> |
481 | <div class="customModalInner"> | 502 | <div class="customModalInner"> |
482 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 503 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
483 | <table> | 504 | <table> |
484 | <tr> | 505 | <tr> |
485 | <td> | 506 | <td> |
486 | <img src="img/info.png" style="width: 50px;"> | 507 | <img src="img/info.png" style="width: 50px;"> |
487 | </td> | 508 | </td> |
488 | <td> | 509 | <td> |
489 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> | 510 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> |
490 | </td> | 511 | </td> |
491 | </tr> | 512 | </tr> |
492 | </table> | 513 | </table> |
493 | </div> | 514 | </div> |
494 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 515 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
495 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button> | 516 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteMargin()">Yes</button> |
496 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button> | 517 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelMarginDelete()">Cancel</button> |
497 | </div> | 518 | </div> |
498 | </div> | 519 | </div> |
499 | </div> | 520 | </div> |
500 | 521 | ||
501 | <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;"> | 522 | <div class="customConfirmPopBackdrop" id="deleteVtypeMargin" style="display: none;"> |
502 | <div class="customModalInner"> | 523 | <div class="customModalInner"> |
503 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 524 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
504 | <table> | 525 | <table> |
505 | <tr> | 526 | <tr> |
506 | <td> | 527 | <td> |
507 | <img src="img/info.png" style="width: 50px;"> | 528 | <img src="img/info.png" style="width: 50px;"> |
508 | </td> | 529 | </td> |
509 | <td> | 530 | <td> |
510 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> | 531 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Margin Template ?</p> |
511 | </td> | 532 | </td> |
512 | </tr> | 533 | </tr> |
513 | </table> | 534 | </table> |
514 | </div> | 535 | </div> |
515 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 536 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
516 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeletVtypeMargin()">Yes</button> | 537 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeletVtypeMargin()">Yes</button> |
517 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button> | 538 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelVtypeMarginDelete()">Cancel</button> |