Commit 1e35fc06bad8cf2c56fc00934a578e0557ac5cde
Exists in
master
`:Merge branch 'master' of http://git.viithiisys.com/viithiisys/acufuel
Showing
2 changed files
Show diff stats
app/partials/scheduler/scheduler.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | 4 | ||
5 | .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', 'schedulerService', function($scope, $compile, uiCalendarConfig, schedulerService) { | 5 | .controller('schedulerController', ['$scope','$compile', 'uiCalendarConfig', 'schedulerService', function($scope, $compile, uiCalendarConfig, schedulerService) { |
6 | 6 | ||
7 | $scope.showLoader = true; | 7 | $scope.showLoader = true; |
8 | getEventsList(); | 8 | getEventsList(); |
9 | 9 | ||
10 | $scope.events = []; | 10 | $scope.events = []; |
11 | function getEventsList(){ | 11 | function getEventsList(){ |
12 | schedulerService.getEvents().then(function(result) { | 12 | schedulerService.getEvents().then(function(result) { |
13 | for (var i = 0; i < result.length; i++) { | 13 | for (var i = 0; i < result.length; i++) { |
14 | var newTime = new Date(result[i].deployDate); | 14 | var newTime = new Date(result[i].deployDate); |
15 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 | 15 | var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 |
16 | var dday = newTime.getUTCDate(); | 16 | var dday = newTime.getUTCDate(); |
17 | var dyear = newTime.getUTCFullYear(); | 17 | var dyear = newTime.getUTCFullYear(); |
18 | 18 | ||
19 | $scope.events.push({ | 19 | $scope.events.push({ |
20 | 'id': result[i].id, | 20 | 'id': result[i].id, |
21 | 'title': result[i].aircraft, | 21 | 'title': result[i].aircraft, |
22 | 'start': dyear+'-'+dmonth+'-'+dday | 22 | 'start': dyear+'-'+dmonth+'-'+dday |
23 | }) | 23 | }) |
24 | $scope.showLoader = false; | 24 | $scope.showLoader = false; |
25 | } | 25 | } |
26 | 26 | ||
27 | // $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; | 27 | // $scope.newFuelPricing[i].futureFuelPricing.deployDate = dmonth+'/'+dday+'/'+dyear; |
28 | }) | 28 | }) |
29 | } | 29 | } |
30 | 30 | ||
31 | $scope.newEvent = {}; | 31 | $scope.newEvent = {}; |
32 | $scope.addNewEvent = function(){ | 32 | $scope.addNewEvent = function(){ |
33 | console.log('newEvent', $scope.newEvent); | 33 | console.log('newEvent', $scope.newEvent); |
34 | $scope.showLoader = true; | 34 | $scope.showLoader = true; |
35 | if ($scope.newEvent.deployDate != undefined) { | 35 | if ($scope.newEvent.deployDate != undefined) { |
36 | $scope.newEvent.deployDate = new Date($scope.newEvent.deployDate); | 36 | $scope.newEvent.deployDate = new Date($scope.newEvent.deployDate); |
37 | $scope.newEvent.deployDate = $scope.newEvent.deployDate.getTime(); | 37 | $scope.newEvent.deployDate = $scope.newEvent.deployDate.getTime(); |
38 | } | 38 | } |
39 | //var data = 'aircraft='+$scope.newEvent.aircraft+'&deployDate='+$scope.newEvent.deployDate; | 39 | //var data = 'aircraft='+$scope.newEvent.aircraft+'&deployDate='+$scope.newEvent.deployDate; |
40 | schedulerService.addNewEventService($scope.newEvent).then(function(response){ | 40 | schedulerService.addNewEventService($scope.newEvent).then(function(response){ |
41 | $scope.newEvent = {}; | 41 | $scope.newEvent = {}; |
42 | $('#addEvent').modal('hide'); | 42 | $('#addEvent').modal('hide'); |
43 | $scope.events = []; | ||
43 | getEventsList(); | 44 | getEventsList(); |
44 | }) | 45 | }) |
45 | } | 46 | } |
46 | 47 | ||
47 | $scope.cancelAdd = function(){ | 48 | $scope.cancelAdd = function(){ |
48 | $scope.newEvent = {}; | 49 | $scope.newEvent = {}; |
49 | } | 50 | } |
50 | 51 | ||
51 | $scope.editData = {}; | 52 | $scope.editData = {}; |
52 | $scope.editEvent = function(data){ | 53 | $scope.editEvent = function(data){ |
53 | $scope.editData = data; | 54 | $scope.editData = data; |
54 | $('#editEvent').modal('show'); | 55 | $('#editEvent').modal('show'); |
55 | } | 56 | } |
56 | $scope.updateEvent = function(){ | 57 | $scope.updateEvent = function(){ |
57 | $scope.showLoader = true; | 58 | $scope.showLoader = true; |
58 | $scope.updatedData = {}; | 59 | $scope.updatedData = {}; |
59 | $scope.updatedData.id = $scope.editData.id; | 60 | $scope.updatedData.id = $scope.editData.id; |
60 | $scope.updatedData.aircraft = $scope.editData.title; | 61 | $scope.updatedData.aircraft = $scope.editData.title; |
61 | $scope.updatedData.deployDate = $scope.editData.start; | 62 | $scope.updatedData.deployDate = $scope.editData.start; |
62 | if ($scope.updatedData.deployDate != undefined) { | 63 | if ($scope.updatedData.deployDate != undefined) { |
63 | $scope.updatedData.deployDate = new Date($scope.updatedData.deployDate); | 64 | $scope.updatedData.deployDate = new Date($scope.updatedData.deployDate); |
64 | $scope.updatedData.deployDate = $scope.updatedData.deployDate.getTime(); | 65 | $scope.updatedData.deployDate = $scope.updatedData.deployDate.getTime(); |
65 | } | 66 | } |
66 | schedulerService.updateScheduledEvent($scope.updatedData).then(function(response){ | 67 | schedulerService.updateScheduledEvent($scope.updatedData).then(function(response){ |
67 | console.log('response', response); | 68 | console.log('response', response); |
68 | $scope.updatedData = {}; | 69 | $scope.updatedData = {}; |
69 | $('#editEvent').modal('hide'); | 70 | $('#editEvent').modal('hide'); |
70 | toastr.success('Updated Successfully', { | 71 | toastr.success('Updated Successfully', { |
71 | closeButton: true | 72 | closeButton: true |
72 | }) | 73 | }) |
74 | $scope.events = []; | ||
73 | getEventsList(); | 75 | getEventsList(); |
74 | }) | 76 | }) |
75 | } | 77 | } |
76 | 78 | ||
77 | 79 | ||
78 | /* code for calendar */ | 80 | /* code for calendar */ |
79 | 81 | ||
80 | var date = new Date(); | 82 | var date = new Date(); |
81 | var d = date.getDate(); | 83 | var d = date.getDate(); |
82 | var m = date.getMonth(); | 84 | var m = date.getMonth(); |
83 | var y = date.getFullYear(); | 85 | var y = date.getFullYear(); |
84 | 86 | ||
85 | $scope.changeTo = 'Hungarian'; | 87 | $scope.changeTo = 'Hungarian'; |
86 | 88 | ||
87 | $scope.eventSource = {}; | 89 | $scope.eventSource = {}; |
88 | 90 | ||
89 | $scope.eventsF = function (start, end, timezone, callback) { | 91 | $scope.eventsF = function (start, end, timezone, callback) { |
90 | var s = new Date(start).getTime() / 1000; | 92 | var s = new Date(start).getTime() / 1000; |
91 | var e = new Date(end).getTime() / 1000; | 93 | var e = new Date(end).getTime() / 1000; |
92 | var m = new Date(start).getMonth(); | 94 | var m = new Date(start).getMonth(); |
93 | var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}]; | 95 | var events = [{title: 'Feed Me ' + m,start: s + (50000),end: s + (100000),allDay: false, className: ['customFeed']}]; |
94 | callback(events); | 96 | callback(events); |
95 | }; | 97 | }; |
96 | 98 | ||
97 | $scope.calEventsExt = { | 99 | $scope.calEventsExt = { |
98 | color: '#f00', | 100 | color: '#f00', |
99 | textColor: 'yellow', | 101 | textColor: 'yellow', |
100 | events: [] | 102 | events: [] |
101 | }; | 103 | }; |
102 | 104 | ||
103 | $scope.alertOnEventClick = function( date, jsEvent, view){ | 105 | $scope.alertOnEventClick = function( date, jsEvent, view){ |
104 | $scope.alertMessage = (date.title + ' was clicked '); | 106 | $scope.alertMessage = (date.title + ' was clicked '); |
105 | }; | 107 | }; |
106 | 108 | ||
107 | $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){ | 109 | $scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){ |
108 | var dmonth = event.start._d.getUTCMonth() + 1; //months from 1-12 | 110 | var dmonth = event.start._d.getUTCMonth() + 1; //months from 1-12 |
109 | var dday = event.start._d.getUTCDate(); | 111 | var dday = event.start._d.getUTCDate(); |
110 | var dyear = event.start._d.getUTCFullYear(); | 112 | var dyear = event.start._d.getUTCFullYear(); |
111 | console.log('date', dyear+'-'+dmonth+'-'+dday); | 113 | console.log('date', dyear+'-'+dmonth+'-'+dday); |
112 | for (var i = 0; i < $scope.events.length; i++) { | 114 | for (var i = 0; i < $scope.events.length; i++) { |
113 | if ($scope.events[i].id == event.id) { | 115 | if ($scope.events[i].id == event.id) { |
116 | |||
114 | console.log('events', $scope.events[i]); | 117 | console.log('events', $scope.events[i]); |
115 | $scope.events[i].start = dyear+'-'+dmonth+'-'+dday; | 118 | //$scope.events[i].start = dyear+'-'+dmonth+'-'+dday; |
119 | $scope.showLoader = true; | ||
120 | $scope.updatedDataDrop = {}; | ||
121 | $scope.updatedDataDrop.id = $scope.events[i].id; | ||
122 | $scope.updatedDataDrop.aircraft = $scope.events[i].title; | ||
123 | $scope.updatedDataDrop.deployDate = dyear+'-'+dmonth+'-'+dday; | ||
124 | if ($scope.updatedDataDrop.deployDate != undefined) { | ||
125 | $scope.updatedDataDrop.deployDate = new Date($scope.updatedDataDrop.deployDate); | ||
126 | $scope.updatedDataDrop.deployDate = $scope.updatedDataDrop.deployDate.getTime(); | ||
127 | } | ||
128 | schedulerService.updateScheduledEvent($scope.updatedDataDrop).then(function(response){ | ||
129 | console.log('response', response); | ||
130 | $scope.updatedDataDrop = {}; | ||
131 | $('#editEvent').modal('hide'); | ||
132 | toastr.success('Updated Successfully', { | ||
133 | closeButton: true | ||
134 | }) | ||
135 | $scope.events = []; | ||
136 | getEventsList(); | ||
137 | }) | ||
138 | |||
116 | } | 139 | } |
117 | } | 140 | } |
118 | console.log('$scope.events new', $scope.events); | 141 | console.log('$scope.events new', $scope.events); |
119 | $scope.alertMessage = ('Event Droped to make dayDelta ' + delta); | 142 | $scope.alertMessage = ('Event Droped to make dayDelta ' + delta); |
120 | }; | 143 | }; |
121 | 144 | ||
122 | $scope.alertOnResize = function(event, delta, revertFunc, jsEvent, ui, view ){ | 145 | $scope.alertOnResize = function(event, delta, revertFunc, jsEvent, ui, view ){ |
123 | $scope.alertMessage = ('Event Resized to make dayDelta ' + delta); | 146 | $scope.alertMessage = ('Event Resized to make dayDelta ' + delta); |
124 | }; | 147 | }; |
125 | 148 | ||
126 | $scope.addRemoveEventSource = function(sources,source) { | 149 | $scope.addRemoveEventSource = function(sources,source) { |
127 | var canAdd = 0; | 150 | var canAdd = 0; |
128 | angular.forEach(sources,function(value, key){ | 151 | angular.forEach(sources,function(value, key){ |
129 | if(sources[key] === source){ | 152 | if(sources[key] === source){ |
130 | sources.splice(key,1); | 153 | sources.splice(key,1); |
131 | canAdd = 1; | 154 | canAdd = 1; |
132 | } | 155 | } |
133 | }); | 156 | }); |
134 | if(canAdd === 0){ | 157 | if(canAdd === 0){ |
135 | sources.push(source); | 158 | sources.push(source); |
136 | } | 159 | } |
137 | }; | 160 | }; |
138 | 161 | ||
139 | $scope.addEvent = function() { | 162 | $scope.addEvent = function() { |
140 | $scope.events.push({ | 163 | $scope.events.push({ |
141 | title: 'Open Sesame', | 164 | title: 'Open Sesame', |
142 | start: new Date(y, m, 28), | 165 | start: new Date(y, m, 28), |
143 | end: new Date(y, m, 29), | 166 | end: new Date(y, m, 29), |
144 | className: ['openSesame'] | 167 | className: ['openSesame'] |
145 | }); | 168 | }); |
146 | }; | 169 | }; |
147 | 170 | ||
148 | $scope.remove = function(index) { | 171 | $scope.remove = function(index) { |
149 | $scope.events.splice(index,1); | 172 | $scope.events.splice(index,1); |
150 | }; | 173 | }; |
151 | 174 | ||
152 | $scope.changeView = function(view,calendar) { | 175 | $scope.changeView = function(view,calendar) { |
153 | uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view); | 176 | uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view); |
154 | }; | 177 | }; |
155 | 178 | ||
156 | $scope.renderCalender = function(calendar) { | 179 | $scope.renderCalender = function(calendar) { |
157 | if(uiCalendarConfig.calendars[calendar]){ | 180 | if(uiCalendarConfig.calendars[calendar]){ |
158 | uiCalendarConfig.calendars[calendar].fullCalendar('render'); | 181 | uiCalendarConfig.calendars[calendar].fullCalendar('render'); |
159 | } | 182 | } |
160 | }; | 183 | }; |
161 | 184 | ||
162 | $scope.eventRender = function( event, element, view ) { | 185 | $scope.eventRender = function( event, element, view ) { |
163 | element.attr({'tooltip': event.title, | 186 | element.attr({'tooltip': event.title, |
164 | 'tooltip-append-to-body': true}); | 187 | 'tooltip-append-to-body': true}); |
165 | $compile(element)($scope); | 188 | $compile(element)($scope); |
166 | }; | 189 | }; |
167 | 190 | ||
168 | $scope.uiConfig = { | 191 | $scope.uiConfig = { |
169 | calendar:{ | 192 | calendar:{ |
170 | height: 450, | 193 | height: 450, |
171 | editable: true, | 194 | editable: true, |
172 | droppable: true, | 195 | droppable: true, |
173 | drop: function (event, delta, revertFunc, jsEvent, ui, view) { | 196 | drop: function (event, delta, revertFunc, jsEvent, ui, view) { |
174 | }, | 197 | }, |
175 | header:{ | 198 | header:{ |
176 | right: 'month basicWeek basicDay', | 199 | right: 'month basicWeek basicDay', |
177 | center: 'title', | 200 | center: 'title', |
178 | left: 'prev,next, today' | 201 | left: 'prev,next, today' |
179 | }, | 202 | }, |
180 | eventClick: $scope.alertOnEventClick, | 203 | eventClick: $scope.alertOnEventClick, |
181 | eventDrop: $scope.alertOnDrop, | 204 | eventDrop: $scope.alertOnDrop, |
182 | eventResize: $scope.alertOnResize, | 205 | eventResize: $scope.alertOnResize, |
183 | eventRender: $scope.eventRender | 206 | eventRender: $scope.eventRender |
184 | } | 207 | } |
185 | }; | 208 | }; |
186 | 209 | ||
187 | $scope.addEvent = function(index) { | 210 | $scope.addEvent = function(index) { |
188 | //console.log('INDEX', index); | 211 | //console.log('INDEX', index); |
189 | //console.log('EVENTS', $scope.eventSources); | 212 | //console.log('EVENTS', $scope.eventSources); |
190 | //$scope.events.push($scope.eventList[index]); | 213 | //$scope.events.push($scope.eventList[index]); |
191 | } | 214 | } |
192 | 215 | ||
193 | $scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; | 216 | $scope.eventSources = [$scope.events, $scope.eventSource, $scope.eventsF]; |
194 | $scope.eventSources2 = [$scope.calEventsExt, $scope.eventsF, $scope.events]; | 217 | $scope.eventSources2 = [$scope.calEventsExt, $scope.eventsF, $scope.events]; |
195 | 218 | ||
196 | }]); | 219 | }]); |
197 | 220 | ||
198 | 221 |
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 | .extraClasToMerge{ | 7 | .extraClasToMerge{ |
8 | color: #fff; | 8 | color: #fff; |
9 | } | 9 | } |
10 | </style> | 10 | </style> |
11 | <div class="myLoader" ng-show="showLoader"> | 11 | <div class="myLoader" ng-show="showLoader"> |
12 | <img src="../img/hourglass.gif" width="50px;"> | 12 | <img src="../img/hourglass.gif" width="50px;"> |
13 | </div> | 13 | </div> |
14 | <div style="width: 90%; margin-left: 5%;"> | 14 | |
15 | <div class="row"> | 15 | <div class="col-xs-12 col-md-6"> |
16 | 16 | ||
17 | <div class="col-md-6"> | ||
18 | <div class="widget stacked"> | 17 | <div class="widget stacked"> |
19 | <div class="widget-header"> | 18 | <div class="widget-header"> |
20 | <i class="fa fa-pencil"></i> | 19 | <i class="fa fa-pencil"></i> |
21 | <h3>Price Manager Staging</h3> | 20 | <h3>Price Manager Staging</h3> |
22 | </div> | 21 | </div> |
23 | <!-- /widget-header --> | 22 | <!-- /widget-header --> |
24 | <div class="widget-content"> | 23 | <div class="widget-content"> |
25 | <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6> | 24 | <h6 style="color:#F90">Queue Pricing for Deployment in the Price Manager below</h6> |
26 | <form> | 25 | <form> |
27 | <table class="table"> | 26 | <table class="table"> |
28 | <thead> | 27 | <thead> |
29 | <tr> | 28 | <tr> |
30 | <th> Product</th> | 29 | <th> Product</th> |
31 | <th> Cost</th> | 30 | <th> Cost</th> |
32 | <th> PAP(Margin)</th> | 31 | <th> PAP(Margin)</th> |
33 | <th> Deploy Date</th> | 32 | <th> Deploy Date</th> |
34 | <th style="color: #F90;">Price Expires</th> | 33 | <th style="color: #F90;">Price Expires</th> |
35 | <th> PAP(Total)</th> | 34 | <th> PAP(Total)</th> |
36 | </tr> | 35 | </tr> |
37 | </thead> | 36 | </thead> |
38 | <tbody> | 37 | <tbody> |
39 | <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }"> | 38 | <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }"> |
40 | <td> | 39 | <td> |
41 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | 40 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> |
42 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | 41 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> |
43 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | 42 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> |
44 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | 43 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> |
45 | </td> | 44 | </td> |
46 | <td> | 45 | <td> |
47 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> | 46 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.cost" style="height:31px; width: 50px; padding: 6px 6px;"> |
48 | </td> | 47 | </td> |
49 | <td> | 48 | <td> |
50 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;"> | 49 | <input type="text" class="form-control" ng-model="fuelPricing.futureFuelPricing.papMargin" style="height:31px; width: 80px; padding: 6px 6px;"> |
51 | </td> | 50 | </td> |
52 | <td> | 51 | <td> |
53 | <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;"> | 52 | <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;"> |
54 | </td> | 53 | </td> |
55 | <td> | 54 | <td> |
56 | <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;"> | 55 | <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;"> |
57 | </td> | 56 | </td> |
58 | <td> | 57 | <td> |
59 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> | 58 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}}</span> |
60 | </td> | 59 | </td> |
61 | </tr> | 60 | </tr> |
62 | </tbody> | 61 | </tbody> |
63 | </table> | 62 | </table> |
64 | <div class="row" style="margin-left: 0px;"> | 63 | <div class="row" style="margin-left: 0px;"> |
65 | <div class="col-md-12" style= "text-align: right;"> | 64 | <div class="col-md-12" style= "text-align: right;"> |
66 | <div style="float: left;"> | 65 | <div style="float: left;"> |
67 | <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingImmediatelyClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button> | 66 | <button type="button" class="btn btn-primary btn-xs" ng-click="updateFutureFuelPricingImmediatelyClick()" style= "text-align: center; font-size:12px">Save & Deploy Immediately</button> |
68 | 67 | ||
69 | <button type="reset" class="btn btn-default btn-xs">Reset All</button> | 68 | <button type="reset" class="btn btn-default btn-xs">Reset All</button> |
70 | </div> | 69 | </div> |
71 | <div style="float: right;"> | 70 | <div style="float: right;"> |
72 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button> | 71 | <button type="button" class="btn btn-success btn-xs" ng-click="updateFutureFuelPricingClick()" style="margin-right:3%">Save & Stage for Deploy</button> |
73 | </div> | 72 | </div> |
74 | <div style="clear: both;"></div> | 73 | <div style="clear: both;"></div> |
75 | </div> | 74 | </div> |
76 | </div> | 75 | </div> |
77 | </form> | 76 | </form> |
78 | </div> | 77 | </div> |
79 | <!-- /widget-content --> | 78 | <!-- /widget-content --> |
80 | </div> | 79 | </div> |
81 | <!-- /widget --> | 80 | <!-- /widget --> |
82 | </div> | ||
83 | 81 | ||
84 | <div class="col-md-6"> | 82 | |
83 | |||
84 | <div class="widget stacked"> | ||
85 | <div class="widget-header"> | ||
86 | <i class="fa fa-pencil"></i> | ||
87 | <h3>Price Manager</h3> | ||
88 | <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()"> | ||
89 | <option value="" disabled selected="selected">Email All Pricing</option> | ||
90 | <option value="JET-A">Email JET-A pricing only</option> | ||
91 | <option value="AVGAS">Email AVGAS pricing only</option> | ||
92 | <option disabled>_______________________________</option> | ||
93 | <option value="all">Distribute All</option> | ||
94 | </select> | ||
95 | </div> | ||
96 | <!-- /widget-header --> | ||
97 | <div class="widget-content"> | ||
98 | <h4>Deployed Fuel Prices</h4> | ||
99 | <table class="table"> | ||
100 | <thead> | ||
101 | <tr> | ||
102 | <th> Product</th> | ||
103 | <th> Cost</th> | ||
104 | <th> Margin</th> | ||
105 | <th> PAP(Total)</th> | ||
106 | <th style="color: #F90;"> Expires</th> | ||
107 | </tr> | ||
108 | </thead> | ||
109 | <tbody> | ||
110 | <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }"> | ||
111 | <td> | ||
112 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | ||
113 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | ||
114 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | ||
115 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | ||
116 | </td> | ||
117 | <td> | ||
118 | <span>{{fuelPricing.fuelPricing.cost}}</span> | ||
119 | </td> | ||
120 | <td> | ||
121 | <span>{{fuelPricing.fuelPricing.papMargin}}</span> | ||
122 | </td> | ||
123 | <td> | ||
124 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | ||
125 | </td> | ||
126 | <td> | ||
127 | <span>{{fuelPricing.fuelPricing.expirationDate}}</span> | ||
128 | </td> | ||
129 | </tr> | ||
130 | </tbody> | ||
131 | </table> | ||
132 | |||
133 | </div> | ||
134 | <!-- /widget-content --> | ||
135 | </div> | ||
136 | <!-- /widget --> | ||
137 | |||
138 | |||
139 | </div> | ||
140 | <div class="col-xs-12 col-md-6"> | ||
141 | |||
142 | |||
85 | <div class="widget stacked"> | 143 | <div class="widget stacked"> |
86 | <div class="widget-header"> | 144 | <div class="widget-header"> |
87 | <i class="fa fa-pencil"></i> | 145 | <i class="fa fa-pencil"></i> |
88 | <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3> | 146 | <h3 style="font-style: italic"><b style="color: #2196f3; font-style: normal">JET-A</b> Customer Margin Template</h3> |
89 | 147 | ||
90 | </div> | 148 | </div> |
91 | <!-- /widget-header --> | 149 | <!-- /widget-header --> |
92 | <div class="widget-content" style="padding-top: 10px;"> | 150 | <div class="widget-content" style="padding-top: 10px;"> |
93 | <section id="accordions"> | 151 | <section id="accordions"> |
94 | <div class="newCustomAccordian"> | 152 | <div class="newCustomAccordian"> |
95 | <!-- tab 1 --> | 153 | <!-- tab 1 --> |
96 | <div ng-repeat="jets in aTypeJets"> | 154 | <div ng-repeat="jets in aTypeJets"> |
97 | <div class="customAccordianHeader" id="{{jets.id}}"> | 155 | <div class="customAccordianHeader" id="{{jets.id}}"> |
98 | <span>{{jets.marginName}}</span> | 156 | <span>{{jets.marginName}}</span> |
99 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 157 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
100 | <option value="" disabled selected>Pricing Structure</option> | 158 | <option value="" disabled selected>Pricing Structure</option> |
101 | <option value="minus">Retail/PAP-(minus)</option> | 159 | <option value="minus">Retail/PAP-(minus)</option> |
102 | <option value="plus">Cost+(plus)</option> | 160 | <option value="plus">Cost+(plus)</option> |
103 | </select> | 161 | </select> |
104 | <span style="margin-right: 0;">$</span> | 162 | <span style="margin-right: 0;">$</span> |
105 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> | 163 | <input type="text" disabled="true" class="form-control" ng-model="jets.marginValue"> |
106 | <div class="pull-right"> | 164 | <div class="pull-right"> |
107 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> | 165 | <button class="btn btn-success" style="display: none; background-image: none; background-color: #f3f3f3; color: #333; border:0;" ng-click="closeAccordian(jets)">Close</button> |
108 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> | 166 | <button class="btn btn-success" style="display: none;" ng-click="saveJetAccordian(jets)">Save</button> |
109 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> | 167 | <button class="btn btn-danger" style="display: none;" ng-click="deleteJetAccordian(jets.id)">Delete</button> |
110 | <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin(jets.id)" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> | 168 | <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin(jets.id)" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> |
111 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | 169 | <button class="btn btn-default" ng-click="toggleJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> |
112 | </div> | 170 | </div> |
113 | <div class="clearfix"></div> | 171 | <div class="clearfix"></div> |
114 | </div> | 172 | </div> |
115 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 173 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
116 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> | 174 | <div class="tierListWrap" ng-repeat="tier in aTypeJets[$index].tierList"> |
117 | <div class="tierListHead" style="height: 36px;"> | 175 | <div class="tierListHead" style="height: 36px;"> |
118 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. | 176 | <span class="pull-left tierHeadingSpan" ng-hide="showEditTier">{{tier.minTierBreak}}-{{tier.maxTierBreak}} gal. |
119 | </span> | 177 | </span> |
120 | <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> | 178 | <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> |
121 | 179 | ||
122 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> | 180 | <input type="text" placeholder="min" style="width: 36px;" ng-model="tier.minTierBreak" ng-show="showEditTier"> |
123 | <span ng-show="showEditTier">-</span> | 181 | <span ng-show="showEditTier">-</span> |
124 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> | 182 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.maxTierBreak" ng-show="showEditTier"> <b ng-show="showEditTier">gal.</b> |
125 | <div class="clearfix"></div> | 183 | <div class="clearfix"></div> |
126 | </div> | 184 | </div> |
127 | <div class="tierListBody" style="height: 35px;"> | 185 | <div class="tierListBody" style="height: 35px;"> |
128 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 186 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
129 | 187 | ||
130 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> | 188 | <input type="text" placeholder="max" style="width: 36px;" ng-model="tier.margin" ng-show="showEditTier"> |
131 | 189 | ||
132 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> | 190 | <span class="pull-right maxTierSpan" ng-hide="showEditTier">(${{tier.marginTotal | number : 2}})</span> |
133 | 191 | ||
134 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> | 192 | <button class="addTierBtn" ng-click="editTier(tier, $parent.$index)" ng-show="showEditTier">Save</button> |
135 | 193 | ||
136 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> | 194 | <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteTier(tier.id, jets.id, $parent.$index)" aria-hidden="true" ng-show="showEditTier"></i> |
137 | 195 | ||
138 | <div class="clearfix"></div> | 196 | <div class="clearfix"></div> |
139 | </div> | 197 | </div> |
140 | </div> | 198 | </div> |
141 | <div class="tierListWrap" style="width: 160px;"> | 199 | <div class="tierListWrap" style="width: 160px;"> |
142 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 200 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
143 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> | 201 | <input type="text" placeholder="min" ng-model="trData[$index].minTierBreak"> |
144 | <span>-</span> | 202 | <span>-</span> |
145 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> | 203 | <input type="text" placeholder="max" ng-model="trData[$index].maxTierBreak"> <b>gal.</b> |
146 | <div class="clearfix"></div> | 204 | <div class="clearfix"></div> |
147 | </div> | 205 | </div> |
148 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 206 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
149 | <span style="color: #449d44;">$</span> | 207 | <span style="color: #449d44;">$</span> |
150 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> | 208 | <input type="text" placeholder="margin" ng-model="trData[$index].margin" class="tierTextBox" style="width: 70px; height: 24px;"> |
151 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> | 209 | <button class="addTierBtn" ng-click="addNewTier(jets.id, trData, $index)">Add Tier</button> |
152 | <div class="clearfix"></div> | 210 | <div class="clearfix"></div> |
153 | </div> | 211 | </div> |
154 | </div> | 212 | </div> |
155 | <!-- <div class="tierListWrap" style="width: 32px;"> | 213 | <!-- <div class="tierListWrap" style="width: 32px;"> |
156 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 214 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
157 | | 215 | |
158 | </div> | 216 | </div> |
159 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 217 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
160 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 218 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
161 | </div> | 219 | </div> |
162 | </div> --> | 220 | </div> --> |
163 | <div class="clearfix"></div> | 221 | <div class="clearfix"></div> |
164 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> | 222 | <!-- <textarea class="form-control resizeTextarea" ng-model="jets.message" placeholder="Message..."></textarea> --> |
165 | <br/> | 223 | <br/> |
166 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 224 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> |
167 | </div> | 225 | </div> |
168 | </div> | 226 | </div> |
169 | </div> | 227 | </div> |
170 | <div class="pull-right"> | 228 | <div class="pull-right"> |
171 | <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> | 229 | <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> |
172 | </div> | 230 | </div> |
173 | </section> | 231 | </section> |
174 | <!-- <div class="row"> </div> | 232 | <!-- <div class="row"> </div> |
175 | <div class="row"> | 233 | <div class="row"> |
176 | <div class="form-group"> | 234 | <div class="form-group"> |
177 | <div class="col-lg-12 text-right"> | 235 | <div class="col-lg-12 text-right"> |
178 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> | 236 | <button type="submit" class="btn btn-success"><i class="icon-ok"></i> Save Form</button> |
179 | <button type="reset" class="btn btn-default">Cancel</button> | 237 | <button type="reset" class="btn btn-default">Cancel</button> |
180 | </div> | 238 | </div> |
181 | </div> | 239 | </div> |
182 | </div> --> | 240 | </div> --> |
183 | </div> | 241 | </div> |
184 | <!-- /widget-content --> | 242 | <!-- /widget-content --> |
185 | </div> | 243 | </div> |
186 | <!-- /widget --> | 244 | <!-- /widget --> |
187 | </div> | 245 | |
188 | <!-- /span6 --> | 246 | |
189 | </div> | 247 | |
190 | <!-- /span12 --> | ||
191 | </div> | ||
192 | <!-- /row --> | ||
193 | <div style="width: 96%; margin-left: 2%;"> | ||
194 | <div class="row"> | ||
195 | <div class="col-md-6"> | ||
196 | <div class="widget stacked"> | ||
197 | <div class="widget-header"> | ||
198 | <i class="fa fa-pencil"></i> | ||
199 | <h3>Price Manager</h3> | ||
200 | <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()"> | ||
201 | <option value="" disabled selected="selected">Email All Pricing</option> | ||
202 | <option value="JET-A">Email JET-A pricing only</option> | ||
203 | <option value="AVGAS">Email AVGAS pricing only</option> | ||
204 | <option disabled>_______________________________</option> | ||
205 | <option value="all">Distribute All</option> | ||
206 | </select> | ||
207 | </div> | ||
208 | <!-- /widget-header --> | ||
209 | <div class="widget-content"> | ||
210 | <h4>Deployed Fuel Prices</h4> | ||
211 | <table class="table"> | ||
212 | <thead> | ||
213 | <tr> | ||
214 | <th> Product</th> | ||
215 | <th> Cost</th> | ||
216 | <th> Margin</th> | ||
217 | <th> PAP(Total)</th> | ||
218 | <th style="color: #F90;"> Expires</th> | ||
219 | </tr> | ||
220 | </thead> | ||
221 | <tbody> | ||
222 | <tr ng-repeat="fuelPricing in newFuelPricing | filter:{ status: true }"> | ||
223 | <td> | ||
224 | <span style="color: #2196f3" ng-show="fuelPricing.jeta">{{fuelPricing.name}}</span> | ||
225 | <span ng-show="fuelPricing.jeta">{{fuelPricing.namejetrest}}</span> | ||
226 | <span style="color: 39c" ng-show="fuelPricing.avgas">{{fuelPricing.name}}</span> | ||
227 | <span ng-show="fuelPricing.avgas">{{fuelPricing.nameavgasrest}}</span> | ||
228 | </td> | ||
229 | <td> | ||
230 | <span>{{fuelPricing.fuelPricing.cost}}</span> | ||
231 | </td> | ||
232 | <td> | ||
233 | <span>{{fuelPricing.fuelPricing.papMargin}}</span> | ||
234 | </td> | ||
235 | <td> | ||
236 | <span style="line-height: 31px; color: #1ab394;">$ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }}</span> | ||
237 | </td> | ||
238 | <td> | ||
239 | <span>{{fuelPricing.fuelPricing.expirationDate}}</span> | ||
240 | </td> | ||
241 | </tr> | ||
242 | </tbody> | ||
243 | </table> | ||
244 | |||
245 | </div> | ||
246 | <!-- /widget-content --> | ||
247 | </div> | ||
248 | <!-- /widget --> | ||
249 | </div> | ||
250 | |||
251 | <div class="col-md-6"> | ||
252 | <div class="widget stacked"> | 248 | <div class="widget stacked"> |
253 | <div class="widget-header"> | 249 | <div class="widget-header"> |
254 | <i class="fa fa-pencil"></i> | 250 | <i class="fa fa-pencil"></i> |
255 | <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> |
256 | 252 | ||
257 | </div> | 253 | </div> |
258 | <!-- /widget-header --> | 254 | <!-- /widget-header --> |
259 | <div class="widget-content" style="padding-top: 10px;"> | 255 | <div class="widget-content" style="padding-top: 10px;"> |
260 | <section id="accordions"> | 256 | <section id="accordions"> |
261 | <div class="newCustomAccordian"> | 257 | <div class="newCustomAccordian"> |
262 | <!-- tab 1 --> | 258 | <!-- tab 1 --> |
263 | <div ng-repeat="jets in vTypeJets"> | 259 | <div ng-repeat="jets in vTypeJets"> |
264 | <div class="customAccordianHeader" id="{{jets.id}}"> | 260 | <div class="customAccordianHeader" id="{{jets.id}}"> |
265 | <span>{{jets.marginName}}</span> | 261 | <span>{{jets.marginName}}</span> |
266 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> | 262 | <select class="form-control" disabled="true" ng-model="jets.pricingStructure"> |
267 | <option value="" disabled selected>Pricing Structure</option> | 263 | <option value="" disabled selected>Pricing Structure</option> |
268 | <option value="minus">Retail-(minus)</option> | 264 | <option value="minus">Retail-(minus)</option> |
269 | <option value="plus">Cost+(plus)</option> | 265 | <option value="plus">Cost+(plus)</option> |
270 | <option value="equal">Direct=(equal)</option> | 266 | <option value="equal">Direct=(equal)</option> |
271 | </select> | 267 | </select> |
272 | <span style="margin-right: 0;">$</span> | 268 | <span style="margin-right: 0;">$</span> |
273 | <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"> |
274 | <div class="pull-right"> | 270 | <div class="pull-right"> |
275 | <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> |
276 | <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> |
277 | <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> |
278 | <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> | 274 | <button type="button" class="btn btn-primary" ng-click="emailPricingForMargin()" style= "font-weight: normal; text-align: center; font-size:12px">Email Pricing for this Margin</button> |
279 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> | 275 | <button class="btn btn-default" ng-click="toggleVtypeJestAccordian(jets.id, $index)" style= "text-align: center; font-size:12px">Edit</button> |
280 | </div> | 276 | </div> |
281 | <div class="clearfix"></div> | 277 | <div class="clearfix"></div> |
282 | </div> | 278 | </div> |
283 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> | 279 | <div class="customAccordianTabBody {{jets.id}}" style="display: none;"> |
284 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> | 280 | <div class="tierListWrap" ng-repeat="tier in vTypeJets[$index].tierList"> |
285 | <div class="tierListHead" style="height: 36px;"> | 281 | <div class="tierListHead" style="height: 36px;"> |
286 | <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. |
287 | </span> | 283 | </span> |
288 | <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> |
289 | 285 | ||
290 | <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"> |
291 | <span ng-show="showEditTier">-</span> | 287 | <span ng-show="showEditTier">-</span> |
292 | <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> |
293 | <div class="clearfix"></div> | 289 | <div class="clearfix"></div> |
294 | </div> | 290 | </div> |
295 | <div class="tierListBody" style="height: 35px;"> | 291 | <div class="tierListBody" style="height: 35px;"> |
296 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> | 292 | <span class="pull-left minTierSpan" ng-hide="showEditTier">-${{tier.margin}}</span> |
297 | 293 | ||
298 | <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"> |
299 | 295 | ||
300 | <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> |
301 | 297 | ||
302 | <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> |
303 | 299 | ||
304 | <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> |
305 | 301 | ||
306 | <div class="clearfix"></div> | 302 | <div class="clearfix"></div> |
307 | </div> | 303 | </div> |
308 | </div> | 304 | </div> |
309 | <div class="tierListWrap" style="width: 160px;"> | 305 | <div class="tierListWrap" style="width: 160px;"> |
310 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> | 306 | <div class="tierListHead" style="border-right: 1px solid #ddd;"> |
311 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> | 307 | <input type="text" placeholder="min" ng-model="vtrData[$index].minTierBreak"> |
312 | <span>-</span> | 308 | <span>-</span> |
313 | <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> |
314 | <div class="clearfix"></div> | 310 | <div class="clearfix"></div> |
315 | </div> | 311 | </div> |
316 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> | 312 | <div class="tierListBody" style="border-right: 1px solid #ddd;"> |
317 | <span style="color: #449d44;">$</span> | 313 | <span style="color: #449d44;">$</span> |
318 | <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;"> |
319 | <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> |
320 | <div class="clearfix"></div> | 316 | <div class="clearfix"></div> |
321 | </div> | 317 | </div> |
322 | </div> | 318 | </div> |
323 | <!-- <div class="tierListWrap" style="width: 32px;"> | 319 | <!-- <div class="tierListWrap" style="width: 32px;"> |
324 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> | 320 | <div class="tierListHead" style="height: 36px; border-right: 1px solid #ddd;"> |
325 | | 321 | |
326 | </div> | 322 | </div> |
327 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> | 323 | <div class="tierListBody" style="height: 35px; border-right: 1px solid #ddd;"> |
328 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> | 324 | <i class="fa fa-trash-o deleteTierIcon" aria-hidden="true"></i> |
329 | </div> | 325 | </div> |
330 | </div> --> | 326 | </div> --> |
331 | <div class="clearfix"></div> | 327 | <div class="clearfix"></div> |
332 | <br/> | 328 | <br/> |
333 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> | 329 | <div ckeditor="options" ng-model="jets.message" ready="onReady()"></div> |
334 | </div> | 330 | </div> |
335 | </div> | 331 | </div> |
336 | </div> | 332 | </div> |
337 | <div class="pull-right"> | 333 | <div class="pull-right"> |
338 | <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> | 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> |
339 | </div> | 335 | </div> |
340 | </section> | 336 | </section> |
341 | <!-- <div class="row"> </div> | 337 | <!-- <div class="row"> </div> |
342 | <div class="row"> | 338 | <div class="row"> |
343 | <div class="form-group"> | 339 | <div class="form-group"> |
344 | <div class="col-lg-12 text-right"> | 340 | <div class="col-lg-12 text-right"> |
345 | <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> |
346 | <button type="reset" class="btn btn-default">Cancel</button> | 342 | <button type="reset" class="btn btn-default">Cancel</button> |
347 | </div> | 343 | </div> |
348 | </div> | 344 | </div> |
349 | </div> --> | 345 | </div> --> |
350 | </div> | 346 | </div> |
351 | <!-- /widget-content --> | 347 | <!-- /widget-content --> |
352 | </div> | 348 | </div> |
353 | <!-- /widget --> | 349 | <!-- /widget --> |
354 | </div> | 350 | |
355 | <!-- /span6 --> | 351 | |
356 | </div> | ||
357 | </div> | ||
358 | </div> | ||
359 | </div> <!-- /container --> | ||
360 | 352 | ||
353 | </div> | ||
354 | <div class="clearfix"></div> | ||
361 | 355 | ||
362 | <div class="addNewMargin" style="display: none;"> | 356 | <div class="addNewMargin" style="display: none;"> |
363 | <div class="customBackdrop"> | 357 | <div class="customBackdrop"> |
364 | <div class="customModalInner" style="max-width: 700px;"> | 358 | <div class="customModalInner" style="max-width: 700px;"> |
365 | <div class="customModelHead"> | 359 | <div class="customModelHead"> |
366 | <p class="pull-left"> | 360 | <p class="pull-left"> |
367 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 361 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
368 | Add New JET-A Customer Margin | 362 | Add New JET-A Customer Margin |
369 | </p> | 363 | </p> |
370 | <p class="pull-right"> | 364 | <p class="pull-right"> |
371 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> | 365 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeMarginPopup()"></i> |
372 | </p> | 366 | </p> |
373 | <div class="clearfix"></div> | 367 | <div class="clearfix"></div> |
374 | </div> | 368 | </div> |
375 | <div class="customModelBody"> | 369 | <div class="customModelBody"> |
376 | 370 | ||
377 | <div class="customAccordianHeader customActive"> | 371 | <div class="customAccordianHeader customActive"> |
378 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> | 372 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newJet.marginName"> |
379 | <select class="form-control" ng-model="newJet.pricingStructure"> | 373 | <select class="form-control" ng-model="newJet.pricingStructure"> |
380 | <option value="" disabled selected>Pricing Structure</option> | 374 | <option value="" disabled selected>Pricing Structure</option> |
381 | <option value="minus">Retail-(minus)</option> | 375 | <option value="minus">Retail-(minus)</option> |
382 | <option value="plus">Cost+(plus)</option> | 376 | <option value="plus">Cost+(plus)</option> |
383 | <option value="equal">Direct=(equal)</option> | 377 | <option value="equal">Direct=(equal)</option> |
384 | </select> | 378 | </select> |
385 | <span style="margin-right: 0;">$</span> | 379 | <span style="margin-right: 0;">$</span> |
386 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> | 380 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newJet.marginValue"> |
387 | <div class="clearfix"></div> | 381 | <div class="clearfix"></div> |
388 | </div> | 382 | </div> |
389 | <div class="customAccordianTabBody"> | 383 | <div class="customAccordianTabBody"> |
390 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> | 384 | <div ckeditor="options" ng-model="newJet.message" ready="onReady()"></div> |
391 | </div> | 385 | </div> |
392 | 386 | ||
393 | </div> | 387 | </div> |
394 | <div class="customModelFooter text-center"> | 388 | <div class="customModelFooter text-center"> |
395 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> | 389 | <input type="submit" value="Save" class="btn" ng-click="addNewATypeJet()"> |
396 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> | 390 | <button class="btn" ng-click="closeMarginPopup()">Cancel</button> |
397 | </div> | 391 | </div> |
398 | </div> | 392 | </div> |
399 | </div> | 393 | </div> |
400 | </div> | 394 | </div> |
401 | 395 | ||
402 | <div class="addNewVtype" style="display: none;"> | 396 | <div class="addNewVtype" style="display: none;"> |
403 | <div class="customBackdrop"> | 397 | <div class="customBackdrop"> |
404 | <div class="customModalInner" style="max-width: 700px;"> | 398 | <div class="customModalInner" style="max-width: 700px;"> |
405 | <div class="customModelHead"> | 399 | <div class="customModelHead"> |
406 | <p class="pull-left"> | 400 | <p class="pull-left"> |
407 | <i class="fa fa-list-alt" aria-hidden="true"></i> | 401 | <i class="fa fa-list-alt" aria-hidden="true"></i> |
408 | Add New AVGAS 100LL Customer Margin Template | 402 | Add New AVGAS 100LL Customer Margin Template |
409 | </p> | 403 | </p> |
410 | <p class="pull-right"> | 404 | <p class="pull-right"> |
411 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> | 405 | <i class="fa fa-times" aria-hidden="true" style="cursor: pointer;" ng-click="closeNewVtypePop()"></i> |
412 | </p> | 406 | </p> |
413 | <div class="clearfix"></div> | 407 | <div class="clearfix"></div> |
414 | </div> | 408 | </div> |
415 | <div class="customModelBody"> | 409 | <div class="customModelBody"> |
416 | 410 | ||
417 | <div class="customAccordianHeader customActive"> | 411 | <div class="customAccordianHeader customActive"> |
418 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> | 412 | <input type="text" class="form-control" style="width: 120px; margin-right: 10px;" placeholder="Margin Name" ng-model="newVtypeJet.marginName"> |
419 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> | 413 | <select class="form-control" ng-model="newVtypeJet.pricingStructure"> |
420 | <option value="" disabled selected>Pricing Structure</option> | 414 | <option value="" disabled selected>Pricing Structure</option> |
421 | <option value="minus">Retail-(minus)</option> | 415 | <option value="minus">Retail-(minus)</option> |
422 | <option value="plus">Cost+(plus)</option> | 416 | <option value="plus">Cost+(plus)</option> |
423 | <option value="equal">Direct=(equal)</option> | 417 | <option value="equal">Direct=(equal)</option> |
424 | </select> | 418 | </select> |
425 | <span style="margin-right: 0;">$</span> | 419 | <span style="margin-right: 0;">$</span> |
426 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> | 420 | <input type="text" class="form-control" style="width: 120px;" placeholder="Margin Price" ng-model="newVtypeJet.marginValue"> |
427 | <div class="clearfix"></div> | 421 | <div class="clearfix"></div> |
428 | </div> | 422 | </div> |
429 | <div class="customAccordianTabBody"> | 423 | <div class="customAccordianTabBody"> |
430 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> | 424 | <div ckeditor="options" ng-model="newVtypeJet.message" ready="onReady()"></div> |
431 | </div> | 425 | </div> |
432 | 426 | ||
433 | </div> | 427 | </div> |
434 | <div class="customModelFooter text-center"> | 428 | <div class="customModelFooter text-center"> |
435 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> | 429 | <input type="submit" value="Save" class="btn" ng-click="addNewVTypeJet()"> |
436 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> | 430 | <button class="btn" ng-click="closeNewVtypePop()">Cancel</button> |
437 | </div> | 431 | </div> |
438 | </div> | 432 | </div> |
439 | </div> | 433 | </div> |
440 | </div> | 434 | </div> |
441 | 435 | ||
442 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> | 436 | <div class="customConfirmPopBackdrop" id="confirm1" style="display: none;"> |
443 | <div class="customModalInner"> | 437 | <div class="customModalInner"> |
444 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 438 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
445 | <table> | 439 | <table> |
446 | <tr> | 440 | <tr> |
447 | <td> | 441 | <td> |
448 | <img src="img/info.png" style="width: 50px;"> | 442 | <img src="img/info.png" style="width: 50px;"> |
449 | </td> | 443 | </td> |
450 | <td> | 444 | <td> |
451 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 445 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
452 | </td> | 446 | </td> |
453 | </tr> | 447 | </tr> |
454 | </table> | 448 | </table> |
455 | </div> | 449 | </div> |
456 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 450 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
457 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> | 451 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseConfirm()">Yes</button> |
458 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 452 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
459 | </div> | 453 | </div> |
460 | </div> | 454 | </div> |
461 | </div> | 455 | </div> |
462 | <div class="customConfirmPopBackdrop" id="confirm2" style="display: none;"> | 456 | <div class="customConfirmPopBackdrop" id="confirm2" style="display: none;"> |
463 | <div class="customModalInner"> | 457 | <div class="customModalInner"> |
464 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 458 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
465 | <table> | 459 | <table> |
466 | <tr> | 460 | <tr> |
467 | <td> | 461 | <td> |
468 | <img src="img/info.png" style="width: 50px;"> | 462 | <img src="img/info.png" style="width: 50px;"> |
469 | </td> | 463 | </td> |
470 | <td> | 464 | <td> |
471 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing for this margin?</p> | 465 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing for this margin?</p> |
472 | </td> | 466 | </td> |
473 | </tr> | 467 | </tr> |
474 | </table> | 468 | </table> |
475 | </div> | 469 | </div> |
476 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 470 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
477 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseForMarginConfirm()">Yes</button> | 471 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="saveAndCloseForMarginConfirm()">Yes</button> |
478 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseForMarginConfirm()">Cancel</button> | 472 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseForMarginConfirm()">Cancel</button> |
479 | </div> | 473 | </div> |
480 | </div> | 474 | </div> |
481 | </div> | 475 | </div> |
482 | 476 | ||
483 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> | 477 | <div class="customConfirmPopBackdrop" id="deleteTierConfirm" style="display: none;"> |
484 | <div class="customModalInner"> | 478 | <div class="customModalInner"> |
485 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 479 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
486 | <table> | 480 | <table> |
487 | <tr> | 481 | <tr> |
488 | <td> | 482 | <td> |
489 | <img src="img/info.png" style="width: 50px;"> | 483 | <img src="img/info.png" style="width: 50px;"> |
490 | </td> | 484 | </td> |
491 | <td> | 485 | <td> |
492 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 486 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |
493 | </td> | 487 | </td> |
494 | </tr> | 488 | </tr> |
495 | </table> | 489 | </table> |
496 | </div> | 490 | </div> |
497 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 491 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
498 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> | 492 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="confirmDeleteTier()">Yes</button> |
499 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> | 493 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelTierDelete()">Cancel</button> |
500 | </div> | 494 | </div> |
501 | </div> | 495 | </div> |
502 | </div> | 496 | </div> |
503 | 497 | ||
504 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> | 498 | <div class="customConfirmPopBackdrop" id="deleteVtypeTierConfirm" style="display: none;"> |
505 | <div class="customModalInner"> | 499 | <div class="customModalInner"> |
506 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 500 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
507 | <table> | 501 | <table> |
508 | <tr> | 502 | <tr> |
509 | <td> | 503 | <td> |
510 | <img src="img/info.png" style="width: 50px;"> | 504 | <img src="img/info.png" style="width: 50px;"> |
511 | </td> | 505 | </td> |
512 | <td> | 506 | <td> |
513 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> | 507 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to delete this Tier ?</p> |