Commit ea15674c8a7a7c68e489f3bce48d36e4abff505f
1 parent
cd330b5ee3
Exists in
master
minor changes for fuel vendor
Showing
9 changed files
with
988 additions
and
988 deletions
Show diff stats
app/index.html
... | ... | @@ -125,7 +125,7 @@ |
125 | 125 | <script src="partials/delselected/delselected.controller.js"></script> |
126 | 126 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> |
127 | 127 | <script src="partials/viewcontact/viewcontact.controller.js"></script> |
128 | - <script src="partials/viewFuelOrder/viewFuelOrder.controller.js"></script> | |
128 | + <script src="partials/viewFuelVendor/viewFuelVendor.controller.js"></script> | |
129 | 129 | |
130 | 130 | <script src="partials/main/main.controller.js"></script> |
131 | 131 | <div ui-view></div> |
... | ... | @@ -159,7 +159,7 @@ |
159 | 159 | <script src="partials/delselected/delselected.service.js"></script> |
160 | 160 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> |
161 | 161 | <script src="partials/viewcontact/viewcontact.service.js"></script> |
162 | - <script src="partials/viewFuelOrder/viewFuelOrder.service.js"></script> | |
162 | + <script src="partials/viewFuelVendor/viewFuelVendor.service.js"></script> | |
163 | 163 | |
164 | 164 | <script src="partials/main/main.service.js"></script> |
165 | 165 | </body> | ... | ... |
app/js/app.js
... | ... | @@ -186,10 +186,10 @@ |
186 | 186 | controller: "viewCompanyController" |
187 | 187 | }) |
188 | 188 | |
189 | - .state("app.viewFuelOrder", { | |
190 | - url: "/viewFuelOrder/:id", | |
191 | - templateUrl: "partials/viewFuelOrder/viewFuelOrder.html", | |
192 | - controller: "ViewFuelOrderController" | |
189 | + .state("app.viewFuelVendor", { | |
190 | + url: "/viewFuelVendor/:id", | |
191 | + templateUrl: "partials/viewFuelVendor/viewFuelVendor.html", | |
192 | + controller: "ViewFuelVendorController" | |
193 | 193 | }) |
194 | 194 | |
195 | 195 | .state("app.fuelOrders", { | ... | ... |
app/partials/FuelVendors/FuelVendors.html
... | ... | @@ -137,7 +137,7 @@ |
137 | 137 | <tbody> |
138 | 138 | <tr ng-repeat="vendor in vendorList"> |
139 | 139 | <td class="font-company"> |
140 | - <a style="color: #333; text-decoration: none;" href="#!/viewFuelOrder/{{vendor.id}}">{{vendor.vendorName}}</a> | |
140 | + <a style="color: #333; text-decoration: none;" href="#!/viewFuelVendor/{{vendor.id}}">{{vendor.vendorName}}</a> | |
141 | 141 | </td> |
142 | 142 | <td class="font-company">{{vendor.phone}}</td> |
143 | 143 | <td class="font-company">{{vendor.contact}}</td> | ... | ... |
app/partials/viewFuelOrder/viewFuelOrder.controller.js
... | ... | @@ -1,225 +0,0 @@ |
1 | - | |
2 | -'use strict'; | |
3 | - | |
4 | - //Load controller | |
5 | - angular.module('acufuel') | |
6 | - | |
7 | - .controller('ViewFuelOrderController', ['$scope','$uibModal', '$stateParams', 'ViewFuelOrderService', 'CustomersService', function($scope , $uibModal, $stateParams, ViewFuelOrderService, CustomersService) { | |
8 | - $scope.data = {}; | |
9 | - $scope.data.priceEmail = true; | |
10 | - $scope.aircraft = {}; | |
11 | - | |
12 | - $(function() { | |
13 | - $('#company-one2').bootstrapToggle(); | |
14 | - }) | |
15 | - | |
16 | - $(function() { | |
17 | - $('#toggle-one1').bootstrapToggle(); | |
18 | - }) | |
19 | - $(function() { | |
20 | - $('#toggle-two').bootstrapToggle(); | |
21 | - }) | |
22 | - $(function() { | |
23 | - $('#toggle-three').bootstrapToggle(); | |
24 | - }) | |
25 | - $(function() { | |
26 | - $('#toggle-four').bootstrapToggle(); | |
27 | - }) | |
28 | - | |
29 | - $(function() { | |
30 | - $('#price-one2').bootstrapToggle(); | |
31 | - $('#price-one2').change(function() { | |
32 | - $('#console-event').html('Toggle: ' + $(this).prop('checked')); | |
33 | - $scope.data.priceEmail = $(this).prop('checked'); | |
34 | - }) | |
35 | - }) | |
36 | - | |
37 | - var value = ""; | |
38 | - var vendorId = $stateParams.id; | |
39 | - ViewFuelOrderService.getFuelOrder(vendorId).then(function(result) { | |
40 | - $scope.vendorData = result; | |
41 | - if($scope.vendorData.activate == true){ | |
42 | - value = 'on'; | |
43 | - }else{ | |
44 | - value = 'off' | |
45 | - } | |
46 | - $('#company-one2').bootstrapToggle(value) | |
47 | - }) | |
48 | - | |
49 | - getContactList(); | |
50 | - function getContactList(){ | |
51 | - ViewFuelOrderService.getContact(vendorId).then(function(result) { | |
52 | - $scope.vendorContactList = result; | |
53 | - for(var i=0;i<$scope.vendorContactList.length; i++){ | |
54 | - if($scope.vendorContactList[i].priceEmail == true){ | |
55 | - $scope.vendorContactList[i].value1 = 'on'; | |
56 | - console.log('aya') | |
57 | - }else{ | |
58 | - $scope.vendorContactList[i].value1 = 'off'; | |
59 | - | |
60 | - } | |
61 | - console.log($scope.vendorContactList[i]) | |
62 | - $('#'+$scope.vendorContactList[i].id).bootstrapToggle($scope.vendorContactList[i].value1) | |
63 | - } | |
64 | - }) | |
65 | - } | |
66 | - | |
67 | - getAircraftList(); | |
68 | - function getAircraftList(){ | |
69 | - ViewFuelOrderService.getAircraft(vendorId).then(function(result) { | |
70 | - $scope.contactAircraftList = result; | |
71 | - }) | |
72 | - } | |
73 | - | |
74 | - | |
75 | - $scope.contactData = {}; | |
76 | - $scope.contactData.contactList = []; | |
77 | - $scope.addContact = function(){ | |
78 | - $scope.data.vendorId = vendorId; | |
79 | - $scope.contactData.contactList.push($scope.data); | |
80 | - ViewFuelOrderService.addContact($scope.contactData).then(function(result) { | |
81 | - if(result.success){ | |
82 | - toastr.success(''+result.success+'', { | |
83 | - closeButton: true | |
84 | - }) | |
85 | - $('#contact-modal-3').modal('hide'); | |
86 | - getContactList(); | |
87 | - }else{ | |
88 | - toastr.error(''+result.statusText+'', { | |
89 | - closeButton: true | |
90 | - }) | |
91 | - } | |
92 | - }) | |
93 | - } | |
94 | - | |
95 | - getData(); | |
96 | - function getData(){ | |
97 | - CustomersService.getAircraftMake().then(function(result) { | |
98 | - $scope.aircraftMakeList = result; | |
99 | - }) | |
100 | - } | |
101 | - | |
102 | - $scope.aircraftDetails = [{ | |
103 | - 'tail':'', | |
104 | - 'make': '', | |
105 | - 'model': '', | |
106 | - 'sizeId' : '' | |
107 | - }]; | |
108 | - | |
109 | - $scope.addNew = function(){ | |
110 | - $scope.aircraftDetails.push({ | |
111 | - 'tail':'', | |
112 | - 'make': '', | |
113 | - 'model': '', | |
114 | - 'sizeId' : '' | |
115 | - }); | |
116 | - console.log($scope.aircraftDetails) | |
117 | - }; | |
118 | - | |
119 | - $scope.getModal = function(makeId, index){ | |
120 | - $scope.aircraft.make = makeId; | |
121 | - //var makeId = makeId; | |
122 | - CustomersService.getModal($scope.aircraft.make).then(function(result) { | |
123 | - $scope.aircraftDetails[index].aircraftModalList = result; | |
124 | - //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | |
125 | - }) | |
126 | - } | |
127 | - | |
128 | - $scope.getSize = function(model, index){ | |
129 | - CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | |
130 | - $scope.aircraftDetails[index].aircraftSizeList = result; | |
131 | - //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | |
132 | - }) | |
133 | - } | |
134 | - | |
135 | - $scope.aircraftListData = {}; | |
136 | - $scope.addData = []; | |
137 | - $scope.saveVendorData = function(){ | |
138 | - for(var i=0; i<$scope.aircraftDetails.length;i++){ | |
139 | - $scope.addData.push({ | |
140 | - 'tail': $scope.aircraftDetails[i].tail, | |
141 | - 'make': $scope.aircraftDetails[i].make, | |
142 | - 'model': $scope.aircraftDetails[i].model, | |
143 | - 'sizeId' : $scope.aircraftDetails[i].sizeId | |
144 | - }); | |
145 | - } | |
146 | - console.log($scope.addData) | |
147 | - $scope.aircraftListData.aircraftList = $scope.addData; | |
148 | - $scope.aircraftListData.accountId = vendorId; | |
149 | - | |
150 | - CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | |
151 | - if(result != null && result.success){ | |
152 | - toastr.success(''+result.success+'', { | |
153 | - closeButton: true | |
154 | - }) | |
155 | - $('#aircraft-modal-3').modal('hide'); | |
156 | - getAircraftList(); | |
157 | - }else{ | |
158 | - toastr.error(''+result.statusText+'', { | |
159 | - closeButton: true | |
160 | - }) | |
161 | - } | |
162 | - }); | |
163 | - | |
164 | - } | |
165 | - $scope.showNoteData = true; | |
166 | - $scope.showCompanyName = true; | |
167 | - $scope.showAddress = true; | |
168 | - $scope.showNote = function(){ | |
169 | - $scope.showNoteData = false; | |
170 | - } | |
171 | - | |
172 | - $scope.company = function(){ | |
173 | - $scope.showCompanyName = false; | |
174 | - } | |
175 | - | |
176 | - $scope.addressChange = function(){ | |
177 | - $scope.showAddress = false; | |
178 | - } | |
179 | - | |
180 | - $scope.editData = function(inputName) { | |
181 | - console.log($scope.vendorData) | |
182 | - if(inputName == 'showNoteData'){ | |
183 | - $scope.showNoteData = true; | |
184 | - }else if(inputName == 'showCompanyName'){ | |
185 | - $scope.showCompanyName = true; | |
186 | - }else if(inputName == 'showAddress'){ | |
187 | - $scope.showAddress = true; | |
188 | - } | |
189 | - | |
190 | - var vendorData = "companyName=" + $scope.vendorData.companyName + "&masterMargin=" + $scope.vendorData.masterMargin | |
191 | - + "&addressOne=" + $scope.vendorData.addressOne + "&addressTwo=" + $scope.vendorData.addressTwo + "&city=" + $scope.vendorData.city + "&state=" | |
192 | - + $scope.vendorData.state + "&country=" + $scope.vendorData.country + "&zipcode=" + $scope.vendorData.zipcode + "&internalNote=" | |
193 | - + $scope.vendorData.internalNote + "&certificateType=" + $scope.vendorData.certificateType + "&baseTenant=" + $scope.vendorData.baseTenant | |
194 | - + "&fuelerlinxCustomer=" + $scope.vendorData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.vendorData.contractFuelVendor | |
195 | - + "&activate=" + $scope.vendorData.activate + "&baseIcao=" + $scope.vendorData.baseIcao + "&vendorId=" + vendorId; | |
196 | - | |
197 | - ViewFuelOrderService.updateContact(vendorData).then(function(result) { | |
198 | - if(result != null && result.success){ | |
199 | - toastr.success(''+result.success+'', { | |
200 | - closeButton: true | |
201 | - }) | |
202 | - }else{ | |
203 | - toastr.error(''+result.statusText+'', { | |
204 | - closeButton: true | |
205 | - }) | |
206 | - } | |
207 | - }) | |
208 | - | |
209 | - } | |
210 | - | |
211 | - $scope.sendMail = function(){ | |
212 | - ViewFuelOrderService.sendMail(vendorId).then(function(result) { | |
213 | - if(result != null && result.success){ | |
214 | - toastr.success(''+result.success+'', { | |
215 | - closeButton: true | |
216 | - }) | |
217 | - }else{ | |
218 | - toastr.error(''+result.statusText+'', { | |
219 | - closeButton: true | |
220 | - }) | |
221 | - } | |
222 | - }) | |
223 | - } | |
224 | - | |
225 | - }]); | |
226 | 0 | \ No newline at end of file |
app/partials/viewFuelOrder/viewFuelOrder.html
... | ... | @@ -1,648 +0,0 @@ |
1 | -<style> | |
2 | - .subnavbar .mainnav > li:nth-child(3) > a{ | |
3 | - color: #ff9900; | |
4 | - } | |
5 | - .widget-content{ | |
6 | - padding: 10px !important; | |
7 | - } | |
8 | - .widget-content input[type="text"], .widget-content select{ | |
9 | - height: 31px; | |
10 | - padding: 0; | |
11 | - } | |
12 | - .new-label span{ | |
13 | - float: left; | |
14 | - line-height: 31px; | |
15 | - } | |
16 | - .new-label span:first-child{ | |
17 | - margin-right: 5px; | |
18 | - font-weight: bold; | |
19 | - } | |
20 | - .new-label span:last-child{ | |
21 | - margin-left: 5px; | |
22 | - } | |
23 | - .new-label select{ | |
24 | - display: -webkit-inline-box; | |
25 | - display: inline-box; | |
26 | - float: left; | |
27 | - } | |
28 | - .new-address p{ | |
29 | - margin-bottom: 0; | |
30 | - } | |
31 | - .new-add-select{ | |
32 | - padding-left: 15px; | |
33 | - margin: 10px 0; | |
34 | - } | |
35 | - .new-add-select select{ | |
36 | - width: 100px; | |
37 | - } | |
38 | - .widget{ | |
39 | - -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
40 | - -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
41 | - box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
42 | - } | |
43 | - .optionclass { | |
44 | - background: #fff; | |
45 | - } | |
46 | - .timess { | |
47 | - float: right !important; | |
48 | - margin-top: 10px !important; | |
49 | - margin-right: 10px !important; | |
50 | - color: #999 !important; | |
51 | - cursor: pointer !important; | |
52 | - } | |
53 | - | |
54 | - .button1 { | |
55 | - display: inline-block; | |
56 | - height: 35px; | |
57 | - line-height: 35px; | |
58 | - padding-right: 15px; | |
59 | - padding-left: 50px; | |
60 | - position: relative; | |
61 | - background-color:rgb(41,127,184); | |
62 | - color:rgb(255,255,255); | |
63 | - text-decoration: none; | |
64 | - text-transform: uppercase; | |
65 | - letter-spacing: 1px; | |
66 | - margin-bottom: 15px; | |
67 | - border: 0; | |
68 | - | |
69 | - | |
70 | - border-radius: 5px; | |
71 | - -moz-border-radius: 5px; | |
72 | - -webkit-border-radius: 5px; | |
73 | - text-shadow:0px 1px 0px rgba(0,0,0,0.5); | |
74 | - -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | |
75 | - filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | |
76 | - | |
77 | - -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
78 | - -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
79 | - box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
80 | - -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | |
81 | - filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | |
82 | - } | |
83 | - | |
84 | - .button1 span { | |
85 | - position: absolute; | |
86 | - left: 0; | |
87 | - top: 0; | |
88 | - width: 35px; | |
89 | - background-color:rgba(0,0,0,0.5); | |
90 | - | |
91 | - -webkit-border-top-left-radius: 5px; | |
92 | - -webkit-border-bottom-left-radius: 5px; | |
93 | - -moz-border-radius-topleft: 5px; | |
94 | - -moz-border-radius-bottomleft: 5px; | |
95 | - border-top-left-radius: 5px; | |
96 | - border-bottom-left-radius: 5px; | |
97 | - border-right: 1px solid rgba(0,0,0,0.15); | |
98 | - } | |
99 | - | |
100 | - .button1:hover span, .button1.active span { | |
101 | - background-color:rgb(0,102,26); | |
102 | - border-right: 1px solid rgba(0,0,0,0.3); | |
103 | - } | |
104 | - | |
105 | - .button1:active { | |
106 | - margin-top: 2px; | |
107 | - margin-bottom: 13px; | |
108 | - | |
109 | - -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
110 | - -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
111 | - box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
112 | - -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | |
113 | - filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | |
114 | - } | |
115 | - | |
116 | - .button1.turquoise { | |
117 | - background: #449d44; | |
118 | - } | |
119 | - | |
120 | -</style> | |
121 | -<div class="col-xs-12 col-md-11"> | |
122 | - <div class="row" style="margin-left:0px"> | |
123 | - <div class="col-md-12"> | |
124 | - <div class="widget"> | |
125 | - <div class="widget-header"> | |
126 | - <i class="fa fa-building-o" aria-hidden="true"></i> | |
127 | - <h3>Antioch Flight Department</h3> | |
128 | - <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> | |
129 | - </div> | |
130 | - <!-- /widget-header --> | |
131 | - <div class="widget-content"> | |
132 | - <div class="row" style="margin-left:0px"> | |
133 | - <div class="col-md-6"> | |
134 | - <div class="widget"> | |
135 | - <div class="widget-header"> | |
136 | - <i class="fa fa-building-o" aria-hidden="true"></i> | |
137 | - <h3>Company Details</h3> | |
138 | - <label>BASE ICAO</label> | |
139 | - <input type="tel" ng-model="vendorData.baseIcao" style="line-height: 18px;width: 50px;padding: 0px 9px;" ng-blur="editData()"/> | |
140 | - <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 10px;"> | |
141 | - <div><input id="company-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="Active" data-off="Dactive"> | |
142 | - </div> | |
143 | - </div> | |
144 | - </div> | |
145 | - <div class="widget-content"> | |
146 | - <div class="row" style="margin-left:0px;"> | |
147 | - <div class="col-md-7" style="padding-left: 0;"> | |
148 | - <h4 ng-show="showCompanyName"> | |
149 | - <b style="color:#F90;">{{vendorData.vendorName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | |
150 | - </h4> | |
151 | - <input type="tel" ng-hide="showCompanyName" ng-model="vendorData.vendorName" class="form-control" ng-blur="editData('showCompanyName')"/> | |
152 | - </div> | |
153 | - <div class="col-md-5"> | |
154 | - <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="vendorData.certificateType" ng-click="editData()"> | |
155 | - <option class="optionclass" disabled selected>Certificate Type</option> | |
156 | - <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | |
157 | - <option class="optionclass" value="charter">Part 135 (Charter)</option> | |
158 | - <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | |
159 | - <option class="optionclass" value="military">Military</option> | |
160 | - <option class="optionclass" value="government">Government</option> | |
161 | - </select> | |
162 | - </div> | |
163 | - </div> | |
164 | - <div> | |
165 | - <p class="new-label"> | |
166 | - <span>Master Margin Setting </span> | |
167 | - <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-model="vendorData.masterMargin" ng-click="editData()"> | |
168 | - <option value="margin1">Margin1</option> | |
169 | - <option value="margin2">Margin2</option> | |
170 | - <option value="vendorsonly">Vendors Only</option> | |
171 | - <option value="margintenants">Margin Tenants</option> | |
172 | - </select> | |
173 | - <span> See Aircrart List</span> | |
174 | - <div class="clearfix"></div> | |
175 | - </p> | |
176 | - </div> | |
177 | - <div class="row" style="margin-left:0px;"> | |
178 | - <div class="col-md-5" style="padding-left: 0;"> | |
179 | - <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.baseTenant"> Tenant/Base Customer | |
180 | - </div> | |
181 | - <div class="col-md-5" style="padding-left: 0;"> | |
182 | - <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.fuelerlinxCustomer"> FuelerLinx Customer | |
183 | - </div> | |
184 | - </div> | |
185 | - <div> | |
186 | - <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.contractFuelVendor"> CAA Member | |
187 | - </div> | |
188 | - </br> | |
189 | - <div class="new-address"> | |
190 | - <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{vendorData.addressOne}} {{vendorData.addressTwo}} <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | |
191 | - | |
192 | - <div ng-hide="showAddress"> | |
193 | - <label>Address1</label> | |
194 | - <input type="tel" ng-hide="showAddress" ng-model="vendorData.addressOne" class="form-control" ng-blur="editData('showAddress')"/> | |
195 | - <label>Address2</label> | |
196 | - <input type="tel" ng-hide="showAddress" ng-model="vendorData.addressTwo" class="form-control" ng-blur="editData('showAddress')"/> | |
197 | - </div> | |
198 | - | |
199 | - <p><i class="fa fa-phone"></i> (310) 2342-3433 <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | |
200 | - <p><i class="fa fa-envelope"></i> freed@gmail.com <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | |
201 | - </div> | |
202 | - <div class="new-add-select"> | |
203 | - <select class="form-control" style="background: #ebebeb;padding: 4px 8px;width: 115px;"> | |
204 | - <option disabled selected>Add Field</option> | |
205 | - <option class="optionclass">Add Phone</option> | |
206 | - <option class="optionclass">Add Email</option> | |
207 | - </select> | |
208 | - </div> | |
209 | - <div> | |
210 | - <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | |
211 | - <p ng-show="showNoteData">{{vendorData.internalNote}}</p> | |
212 | - <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="vendorData.internalNote" ng-blur="editData('showNoteData')" rows="4" cols="34"></textarea> | |
213 | - </div> | |
214 | - <div class="dis"> | |
215 | - <button type="button" data-toggle="modal" data-target="#distribute-modal-3" class="btn btn-primary">Distribute Price to Company Contacts</button> | |
216 | - </div> | |
217 | - <div><button type="button" class="btn btn-info">Setup Fuel</button></div> | |
218 | - </div> | |
219 | - </div> | |
220 | - </div> | |
221 | - <div class="col-md-6"> | |
222 | - <div class="widget"> | |
223 | - <div class="widget-header"> | |
224 | - <i class="fa fa-plane"></i> | |
225 | - <h3>Aircraft List</h3> | |
226 | - <div class="pull-right"> | |
227 | - <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft</button> | |
228 | - </div> | |
229 | - </div> | |
230 | - <div class="widget-content" style="padding:0px"> | |
231 | - <div class="table-responsive"> | |
232 | - <table class="table table-bordered table-hover table-striped"> | |
233 | - <thead> | |
234 | - <tr> | |
235 | - <th>Tail #</th> | |
236 | - <th>Make</th> | |
237 | - <th>Model</th> | |
238 | - <th>JET-A</th> | |
239 | - <th>All in</th> | |
240 | - <th>AVGAS</th> | |
241 | - <th>All in</th> | |
242 | - <th></th> | |
243 | - </tr> | |
244 | - </thead> | |
245 | - <tbody> | |
246 | - <tr ng-repeat="aircraft in contactAircraftList"> | |
247 | - <td>{{aircraft.tail}}</td> | |
248 | - <td>{{aircraft.make}}</td> | |
249 | - <td>{{aircraft.model}}</td> | |
250 | - <td> | |
251 | - <select class="form-control" style="height:31px;"> | |
252 | - <option>Margin1</option> | |
253 | - <option>Margin2</option> | |
254 | - </select> | |
255 | - </td> | |
256 | - <td style="color:#55AF8B;">$3659</td> | |
257 | - <td> | |
258 | - <select class="form-control" style="height:31px;"> | |
259 | - <option>Margin1</option> | |
260 | - <option>Margin2</option> | |
261 | - </select> | |
262 | - </td> | |
263 | - <td style="color:#55AF8B;">$3659</td> | |
264 | - <td></td> | |
265 | - </tr> | |
266 | - </tbody> | |
267 | - </table> | |
268 | - </div> | |
269 | - </div> | |
270 | - </div> | |
271 | - </div> | |
272 | - </div> | |
273 | - <div class="row" style="margin-left:0px"> | |
274 | - <div class="col-md-6"> | |
275 | - <div class="widget"> | |
276 | - <div class="widget-header"> | |
277 | - <i class="fa fa-user"></i> | |
278 | - <h3>Contact List</h3> | |
279 | - <div class="pull-right"> | |
280 | - <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> | |
281 | - </div> | |
282 | - </div> | |
283 | - <div class="widget-content" style="padding:0px"> | |
284 | - <div class="table-responsive"> | |
285 | - <table class="table table-bordered table-hover table-striped"> | |
286 | - <thead> | |
287 | - <tr> | |
288 | - <th>Price Email</th> | |
289 | - <th>First Name</th> | |
290 | - <th>Last Name</th> | |
291 | - <th>Title</th> | |
292 | - </tr> | |
293 | - </thead> | |
294 | - <tbody> | |
295 | - <tr ng-repeat="contact in vendorContactList"> | |
296 | - <td class="my-toggle-switch"><input id="{{contact.id}}" checked type="checkbox" data-size="mini" data-toggle="toggle"></td> | |
297 | - <td> | |
298 | - <a href="#!/viewContact/{{contact.id}}"> | |
299 | - {{contact.firstName}} | |
300 | - </a> | |
301 | - </td> | |
302 | - <td>{{contact.lastName}}</td> | |
303 | - <td>{{contact.title}}</td> | |
304 | - </tr> | |
305 | - </tbody> | |
306 | - </table> | |
307 | - </div> | |
308 | - </div> | |
309 | - </div> | |
310 | - </div> | |
311 | - <div class="col-md-6"> | |
312 | - <div class="widget"> | |
313 | - <div class="widget-header"> | |
314 | - <i class="fa fa-pencil"></i> | |
315 | - <h3>Price Manager Reference</h3> | |
316 | - </div> | |
317 | - <div class="widget-content"> | |
318 | - <div class="table-responsive"> | |
319 | - <table class="table table-hover table-striped"> | |
320 | - <thead> | |
321 | - <tr> | |
322 | - <th>Omit</th> | |
323 | - <th>Product</th> | |
324 | - <th>Cost</th> | |
325 | - <th>PAP (Margin)</th> | |
326 | - <th>PAP (Total)</th> | |
327 | - <th style="color:#F90">Expires</th> | |
328 | - </tr> | |
329 | - </thead> | |
330 | - <tbody> | |
331 | - <tr> | |
332 | - <td><input type="checkbox"></td> | |
333 | - <td>Jet-A Full Service</td> | |
334 | - <td>$2.123</td> | |
335 | - <td>$23000</td> | |
336 | - <td style="color:#55AF8B;">$3659</td> | |
337 | - <td style="color:#F90">3/15/2017</td> | |
338 | - </tr> | |
339 | - <tr> | |
340 | - <td><input type="checkbox"></td> | |
341 | - <td>Jet-A Full Service</td> | |
342 | - <td>$2.123</td> | |
343 | - <td>$23000</td> | |
344 | - <td style="color:#55AF8B;">$3659</td> | |
345 | - <td style="color:#F90">3/15/2017</td> | |
346 | - </tr> | |
347 | - <tr> | |
348 | - <tr> | |
349 | - <td><input type="checkbox"></td> | |
350 | - <td>Jet-A Full Service</td> | |
351 | - <td>$2.123</td> | |
352 | - <td>$23000</td> | |
353 | - <td style="color:#55AF8B;">$3659</td> | |
354 | - <td style="color:#F90">3/15/2017</td> | |
355 | - </tr> | |
356 | - <tr> | |
357 | - <td><input type="checkbox"></td> | |
358 | - <td>Jet-A Full Service</td> | |
359 | - <td>$2.123</td> | |
360 | - <td>$23000</td> | |
361 | - <td style="color:#55AF8B;">$3659</td> | |
362 | - <td style="color:#F90">3/15/2017</td> | |
363 | - </tr> | |
364 | - </tbody> | |
365 | - </table> | |
366 | - </div> | |
367 | - </div> | |
368 | - </div> | |
369 | - </div> | |
370 | - </div> | |
371 | - </div> | |
372 | - <!-- /widget-content --> | |
373 | - </div> | |
374 | - <!-- /widget --> | |
375 | - </div> | |
376 | - <!-- /span6 --> | |
377 | - </div> | |
378 | - <!-- /widget --> | |
379 | -</div> | |
380 | -<!-- /container --> | |
381 | -<form class="modal multi-step" id="contact-modal-3" name="companyForm"> | |
382 | - <div class="modal-dialog modal-lg"> | |
383 | - <div class="modal-content"> | |
384 | - <div class="modal-body step-1" data-step="1" style="padding: 0;"> | |
385 | - <div> | |
386 | - <div class="row" style="margin: 0;"> | |
387 | - <div> | |
388 | - <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | |
389 | - <div class="widget-header"> | |
390 | - <i class="icon-pencil"></i> | |
391 | - <i class="fa fa-tasks" aria-hidden="true"></i> | |
392 | - <h3>Add a New Contact</h3> | |
393 | - <div class="clearfix"></div> | |
394 | - </div> | |
395 | - <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | |
396 | - <div class="col-xs-12"> | |
397 | - <div class="col-md-6"> | |
398 | - <div class="pull-left" style="width: 110px;"> | |
399 | - <label class="new-input-label"><b>First Name</b></label> | |
400 | - </div> | |
401 | - <div class="pull-left" style="margin-left: 15px;"> | |
402 | - <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | |
403 | - </div> | |
404 | - <div class="clearfix"></div> | |
405 | - </div> | |
406 | - <div class="col-md-6"> | |
407 | - | |
408 | - <div class="pull-left" style="width: 110px;"> | |
409 | - <label class="new-input-label"><b>Last Name</b></label> | |
410 | - </div> | |
411 | - <div class="pull-left" style="margin-left: 15px;"> | |
412 | - <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | |
413 | - </div> | |
414 | - <div class="clearfix"></div> | |
415 | - </div> | |
416 | - </div> | |
417 | - <div class="clearfix"></div><br> | |
418 | - <div class="col-xs-12"> | |
419 | - <div class="col-md-6"> | |
420 | - <div class="pull-left" style="width: 110px;"> | |
421 | - <label class="new-input-label"><b>Title</b></label> | |
422 | - </div> | |
423 | - <div class="pull-left" style="margin-left: 15px;"> | |
424 | - <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | |
425 | - </div> | |
426 | - <div class="clearfix"></div> | |
427 | - </div> | |
428 | - <div class="col-md-6"> | |
429 | - | |
430 | - <div class="pull-left" style="width: 110px;"> | |
431 | - <label class="new-input-label"><b>Email</b></label> | |
432 | - </div> | |
433 | - <div class="pull-left" style="margin-left: 15px;"> | |
434 | - <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | |
435 | - </div> | |
436 | - <div class="clearfix"></div> | |
437 | - </div> | |
438 | - </div> | |
439 | - <div class="clearfix"></div><br> | |
440 | - <div class="col-xs-12"> | |
441 | - <div class="col-md-6"> | |
442 | - <div class="pull-left" style="width: 110px;"> | |
443 | - <label class="new-input-label"><b>Username</b></label> | |
444 | - </div> | |
445 | - <div class="pull-left" style="margin-left: 15px;"> | |
446 | - <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | |
447 | - </div> | |
448 | - <div class="clearfix"></div> | |
449 | - </div> | |
450 | - <div class="col-md-6"> | |
451 | - | |
452 | - <div class="pull-left" style="width: 110px;"> | |
453 | - <label class="new-input-label"><b>Password</b></label> | |
454 | - </div> | |
455 | - <div class="pull-left" style="margin-left: 15px;"> | |
456 | - <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | |
457 | - </div> | |
458 | - <div class="clearfix"></div> | |
459 | - </div> | |
460 | - </div> | |
461 | - <div class="clearfix"></div><br> | |
462 | - <div class="col-xs-12"> | |
463 | - <div class="col-md-6"> | |
464 | - <div class="pull-left" style="width: 110px;"> | |
465 | - <label class="new-input-label"><b>Work Phone</b></label> | |
466 | - </div> | |
467 | - <div class="pull-left" style="margin-left: 15px;"> | |
468 | - <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | |
469 | - </div> | |
470 | - <div class="clearfix"></div> | |
471 | - </div> | |
472 | - <div class="col-md-6"> | |
473 | - | |
474 | - <div class="pull-left" style="width: 110px;"> | |
475 | - <label class="new-input-label"><b>Mobile Phone</b></label> | |
476 | - </div> | |
477 | - <div class="pull-left" style="margin-left: 15px;"> | |
478 | - <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | |
479 | - </div> | |
480 | - <div class="clearfix"></div> | |
481 | - </div> | |
482 | - </div> | |
483 | - <div class="clearfix"></div><br> | |
484 | - <div class="col-xs-12"> | |
485 | - <div class="col-md-12"> | |
486 | - <div class="pull-left" style="width: 110px;"> | |
487 | - <label class="new-input-label"><b>Address</b></label> | |
488 | - </div> | |
489 | - <div class="pull-right" style="width: calc(100% - 123px);"> | |
490 | - <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | |
491 | - </div> | |
492 | - <div class="clearfix"></div> | |
493 | - </div> | |
494 | - </div> | |
495 | - <div class="clearfix"></div> | |
496 | - <br/> | |
497 | - <div class="col-xs-12"> | |
498 | - <div class="col-md-3"> | |
499 | - <div class="pull-left my-toggle-switch"> | |
500 | - <div style="color: #ff9a01;">Price Email     | |
501 | - <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> | |
502 | - </div> | |
503 | - </div> | |
504 | - <div class="clearfix"></div> | |
505 | - </div> | |
506 | - <div class="col-md-3"> | |
507 | - <div class="pull-left my-toggle-switch"> | |
508 | - <div style="color: #ff9a01;">Primary Contact     | |
509 | - <input type="checkbox" ng-model="data.primaryContact"> | |
510 | - </div> | |
511 | - </div> | |
512 | - <div class="clearfix"></div> | |
513 | - </div> | |
514 | - <div class="col-md-6"> | |
515 | - <div class="pull-left" style="width: 110px;"> | |
516 | - <label class="new-input-label"><b>Internal Note</b></label> | |
517 | - </div> | |
518 | - <div class="pull-left" style="width: calc(100% - 110px);"> | |
519 | - <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | |
520 | - </div> | |
521 | - </div> | |
522 | - <div class="clearfix"></div> | |
523 | - </div> | |
524 | - <div class="clearfix"></div><br> | |
525 | - </div> | |
526 | - </div> | |
527 | - <div class="clearfix"></div> | |
528 | - </div> | |
529 | - </div> | |
530 | - </div> | |
531 | - </div> | |
532 | - <div class="modal-footer" style="border-top: 0;"> | |
533 | - <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
534 | - <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | |
535 | - </div> | |
536 | - </div> | |
537 | - </div> | |
538 | -</form> | |
539 | -<div class="clearfix"></div> | |
540 | - | |
541 | -<form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | |
542 | - <div class="modal-dialog modal-lg"> | |
543 | - <div class="modal-content"> | |
544 | - <div class="modal-body step-2" data-step="2" style="padding: 0;"> | |
545 | - <div> | |
546 | - <div class="row" style="margin: 0;"> | |
547 | - <div> | |
548 | - <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | |
549 | - <div class="widget-header"> | |
550 | - <i class="icon-pencil"></i> | |
551 | - <i class="fa fa-tasks" aria-hidden="true"></i> | |
552 | - <h3>Add a New Aircraft</h3> | |
553 | - <div class="clearfix"></div> | |
554 | - </div> | |
555 | - <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | |
556 | - <div class="col-xs-12"> | |
557 | - <div class="widget-header"> | |
558 | - <i class="fa fa-list"></i> | |
559 | - <h3>Aircraft List</h3> | |
560 | - </div> | |
561 | - <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | |
562 | - <div class="table-responsive"> | |
563 | - <table class="table table-striped table-bordered"> | |
564 | - <thead> | |
565 | - <tr> | |
566 | - <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | |
567 | - <th>Tail</th> | |
568 | - <th>Make</th> | |
569 | - <th>Model</th> | |
570 | - <th>Size</th> | |
571 | - </tr> | |
572 | - </thead> | |
573 | - <tbody> | |
574 | - <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | |
575 | - <!-- <td> | |
576 | - <input type="checkbox" ng-model="aircraftData.selected"/> | |
577 | - </td> --> | |
578 | - <td style="width: 20%"> | |
579 | - <input type="tel" class="form-control" ng-model="aircraftData.tail" required/> | |
580 | - </td> | |
581 | - <td style="width: 20%"> | |
582 | - <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | |
583 | - <option ng-repeat="make in aircraftMakeList">{{make}}</option> | |
584 | - </select> | |
585 | - </td> | |
586 | - <td style="width: 20%"> | |
587 | - <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | |
588 | - <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> | |
589 | - </select> | |
590 | - </td> | |
591 | - <td style="width: 20%"> | |
592 | - <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> | |
593 | - <!-- <select class="form-control" ng-model="aircraftData.size"> | |
594 | - <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | |
595 | - </select> --> | |
596 | - </td> | |
597 | - </tr> | |
598 | - </tbody> | |
599 | - </table> | |
600 | - </div> | |
601 | - <div class="clearfix"></div> | |
602 | - </div> | |
603 | - </div> | |
604 | - <div class="clearfix"></div> | |
605 | - <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | |
606 | - <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | |
607 | - </div> | |
608 | - </div> | |
609 | - </div> | |
610 | - <div class="clearfix"></div> | |
611 | - </div> | |
612 | - </div> | |
613 | - </div> | |
614 | - </div> | |
615 | - <div class="modal-footer" style="border-top: 0;"> | |
616 | - <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
617 | - <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveVendorData()">Save</button> | |
618 | - </div> | |
619 | - </div> | |
620 | - </div> | |
621 | -</form> | |
622 | - | |
623 | -<form class="modal multi-step" id="distribute-modal-3" name="aircraftForm"> | |
624 | - <div class="modal-dialog"> | |
625 | - <div class="modal-content"> | |
626 | - <div class="modal-body step-2" data-step="2" style="padding: 0;"> | |
627 | - <div> | |
628 | - <div class="row" style="margin: 0;"> | |
629 | - <p>Are you sure that you want to email pricing to everyone in your contact list</p> | |
630 | - </div> | |
631 | - </div> | |
632 | - </div> | |
633 | - <div class="modal-footer" style="border-top: 0;"> | |
634 | - <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
635 | - <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="sendMail()">Save</button> | |
636 | - </div> | |
637 | - </div> | |
638 | - </div> | |
639 | -</form> | |
640 | -<!-- Le javascript | |
641 | - ================================================== --> | |
642 | -<!-- Placed at the end of the document so the pages load faster --> | |
643 | -<!-- <script | |
644 | - CKEDITOR.replace( 'editor2', { | |
645 | - height: 250, | |
646 | - extraPlugins: 'divarea' | |
647 | - } ); | |
648 | - </script> --> |
app/partials/viewFuelOrder/viewFuelOrder.service.js
... | ... | @@ -1,108 +0,0 @@ |
1 | -(function(){ | |
2 | - 'use strict'; | |
3 | - angular.module('acufuel') | |
4 | - .service('ViewFuelOrderService', ['$q', '$http', 'BASE_URL', ViewFuelOrderService]); | |
5 | - | |
6 | - function ViewFuelOrderService($q, $http, BASE_URL) { | |
7 | - | |
8 | - this.getFuelOrder = function(id) { | |
9 | - | |
10 | - var deferred = $q.defer(); | |
11 | - $http({ | |
12 | - method : 'GET', | |
13 | - url : BASE_URL.url +'/vendor/'+id, | |
14 | - headers : {'Content-Type': 'application/json'}, | |
15 | - }) | |
16 | - .then(function (result){ | |
17 | - deferred.resolve(result.data); | |
18 | - },function (result){ | |
19 | - deferred.resolve(result.data); | |
20 | - }) | |
21 | - return deferred.promise; | |
22 | - } | |
23 | - | |
24 | - this.getContact = function(id) { | |
25 | - | |
26 | - var deferred = $q.defer(); | |
27 | - $http({ | |
28 | - method : 'GET', | |
29 | - url : BASE_URL.url +'/vendor/contacts/'+id, | |
30 | - headers : {'Content-Type': 'application/json'}, | |
31 | - }) | |
32 | - .then(function (result){ | |
33 | - deferred.resolve(result.data); | |
34 | - },function (result){ | |
35 | - deferred.resolve(result.data); | |
36 | - }) | |
37 | - return deferred.promise; | |
38 | - } | |
39 | - | |
40 | - this.addContact = function(data) { | |
41 | - | |
42 | - var deferred = $q.defer(); | |
43 | - $http({ | |
44 | - method : 'POST', | |
45 | - url : BASE_URL.url +'/vendor/add/contact', | |
46 | - data : data, | |
47 | - headers : {'Content-Type': 'application/json'}, | |
48 | - }) | |
49 | - .then(function (result){ | |
50 | - deferred.resolve(result.data); | |
51 | - },function (result){ | |
52 | - deferred.resolve(result.data); | |
53 | - }) | |
54 | - return deferred.promise; | |
55 | - } | |
56 | - | |
57 | - this.sendMail = function(id) { | |
58 | - | |
59 | - var deferred = $q.defer(); | |
60 | - $http({ | |
61 | - method : 'POST', | |
62 | - url : BASE_URL.url +'/mailPriceToContacts/'+id, | |
63 | - headers : {'Content-Type': 'application/json'}, | |
64 | - }) | |
65 | - .then(function (result){ | |
66 | - deferred.resolve(result.data); | |
67 | - },function (result){ | |
68 | - deferred.resolve(result.data); | |
69 | - }) | |
70 | - return deferred.promise; | |
71 | - } | |
72 | - | |
73 | - this.updateContact = function(data) { | |
74 | - | |
75 | - var deferred = $q.defer(); | |
76 | - $http({ | |
77 | - method : 'PUT', | |
78 | - url : BASE_URL.url +'/vendor', | |
79 | - data : data, | |
80 | - headers : {'Content-Type': 'application/json'}, | |
81 | - }) | |
82 | - .then(function (result){ | |
83 | - deferred.resolve(result.data); | |
84 | - },function (result){ | |
85 | - deferred.resolve(result.data); | |
86 | - }) | |
87 | - return deferred.promise; | |
88 | - } | |
89 | - | |
90 | - this.getAircraft = function(id) { | |
91 | - | |
92 | - var deferred = $q.defer(); | |
93 | - $http({ | |
94 | - method : 'GET', | |
95 | - url : BASE_URL.url +'/vendor/aircrafts/'+id, | |
96 | - headers : {'Content-Type': 'application/json'}, | |
97 | - }) | |
98 | - .then(function (result){ | |
99 | - deferred.resolve(result.data); | |
100 | - },function (result){ | |
101 | - deferred.resolve(result.data); | |
102 | - }) | |
103 | - return deferred.promise; | |
104 | - } | |
105 | - | |
106 | - } | |
107 | - | |
108 | -})(); | |
109 | 0 | \ No newline at end of file |
app/partials/viewFuelVendor/viewFuelVendor.controller.js
... | ... | @@ -0,0 +1,225 @@ |
1 | + | |
2 | +'use strict'; | |
3 | + | |
4 | + //Load controller | |
5 | + angular.module('acufuel') | |
6 | + | |
7 | + .controller('ViewFuelVendorController', ['$scope','$uibModal', '$stateParams', 'ViewFuelVendorService', 'CustomersService', function($scope , $uibModal, $stateParams, ViewFuelVendorService, CustomersService) { | |
8 | + $scope.data = {}; | |
9 | + $scope.data.priceEmail = true; | |
10 | + $scope.aircraft = {}; | |
11 | + | |
12 | + $(function() { | |
13 | + $('#company-one2').bootstrapToggle(); | |
14 | + }) | |
15 | + | |
16 | + $(function() { | |
17 | + $('#toggle-one1').bootstrapToggle(); | |
18 | + }) | |
19 | + $(function() { | |
20 | + $('#toggle-two').bootstrapToggle(); | |
21 | + }) | |
22 | + $(function() { | |
23 | + $('#toggle-three').bootstrapToggle(); | |
24 | + }) | |
25 | + $(function() { | |
26 | + $('#toggle-four').bootstrapToggle(); | |
27 | + }) | |
28 | + | |
29 | + $(function() { | |
30 | + $('#price-one2').bootstrapToggle(); | |
31 | + $('#price-one2').change(function() { | |
32 | + $('#console-event').html('Toggle: ' + $(this).prop('checked')); | |
33 | + $scope.data.priceEmail = $(this).prop('checked'); | |
34 | + }) | |
35 | + }) | |
36 | + | |
37 | + var value = ""; | |
38 | + var vendorId = $stateParams.id; | |
39 | + ViewFuelVendorService.getFuelOrder(vendorId).then(function(result) { | |
40 | + $scope.vendorData = result; | |
41 | + if($scope.vendorData.activate == true){ | |
42 | + value = 'on'; | |
43 | + }else{ | |
44 | + value = 'off' | |
45 | + } | |
46 | + $('#company-one2').bootstrapToggle(value) | |
47 | + }) | |
48 | + | |
49 | + getContactList(); | |
50 | + function getContactList(){ | |
51 | + ViewFuelVendorService.getContact(vendorId).then(function(result) { | |
52 | + $scope.vendorContactList = result; | |
53 | + for(var i=0;i<$scope.vendorContactList.length; i++){ | |
54 | + if($scope.vendorContactList[i].priceEmail == true){ | |
55 | + $scope.vendorContactList[i].value1 = 'on'; | |
56 | + console.log('aya') | |
57 | + }else{ | |
58 | + $scope.vendorContactList[i].value1 = 'off'; | |
59 | + | |
60 | + } | |
61 | + console.log($scope.vendorContactList[i]) | |
62 | + $('#'+$scope.vendorContactList[i].id).bootstrapToggle($scope.vendorContactList[i].value1) | |
63 | + } | |
64 | + }) | |
65 | + } | |
66 | + | |
67 | + getAircraftList(); | |
68 | + function getAircraftList(){ | |
69 | + ViewFuelVendorService.getAircraft(vendorId).then(function(result) { | |
70 | + $scope.contactAircraftList = result; | |
71 | + }) | |
72 | + } | |
73 | + | |
74 | + | |
75 | + $scope.contactData = {}; | |
76 | + $scope.contactData.contactList = []; | |
77 | + $scope.addContact = function(){ | |
78 | + $scope.data.vendorId = vendorId; | |
79 | + $scope.contactData.contactList.push($scope.data); | |
80 | + ViewFuelVendorService.addContact($scope.contactData).then(function(result) { | |
81 | + if(result.success){ | |
82 | + toastr.success(''+result.success+'', { | |
83 | + closeButton: true | |
84 | + }) | |
85 | + $('#contact-modal-3').modal('hide'); | |
86 | + getContactList(); | |
87 | + }else{ | |
88 | + toastr.error(''+result.statusText+'', { | |
89 | + closeButton: true | |
90 | + }) | |
91 | + } | |
92 | + }) | |
93 | + } | |
94 | + | |
95 | + getData(); | |
96 | + function getData(){ | |
97 | + CustomersService.getAircraftMake().then(function(result) { | |
98 | + $scope.aircraftMakeList = result; | |
99 | + }) | |
100 | + } | |
101 | + | |
102 | + $scope.aircraftDetails = [{ | |
103 | + 'tail':'', | |
104 | + 'make': '', | |
105 | + 'model': '', | |
106 | + 'sizeId' : '' | |
107 | + }]; | |
108 | + | |
109 | + $scope.addNew = function(){ | |
110 | + $scope.aircraftDetails.push({ | |
111 | + 'tail':'', | |
112 | + 'make': '', | |
113 | + 'model': '', | |
114 | + 'sizeId' : '' | |
115 | + }); | |
116 | + console.log($scope.aircraftDetails) | |
117 | + }; | |
118 | + | |
119 | + $scope.getModal = function(makeId, index){ | |
120 | + $scope.aircraft.make = makeId; | |
121 | + //var makeId = makeId; | |
122 | + CustomersService.getModal($scope.aircraft.make).then(function(result) { | |
123 | + $scope.aircraftDetails[index].aircraftModalList = result; | |
124 | + //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | |
125 | + }) | |
126 | + } | |
127 | + | |
128 | + $scope.getSize = function(model, index){ | |
129 | + CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | |
130 | + $scope.aircraftDetails[index].aircraftSizeList = result; | |
131 | + //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | |
132 | + }) | |
133 | + } | |
134 | + | |
135 | + $scope.aircraftListData = {}; | |
136 | + $scope.addData = []; | |
137 | + $scope.saveVendorData = function(){ | |
138 | + for(var i=0; i<$scope.aircraftDetails.length;i++){ | |
139 | + $scope.addData.push({ | |
140 | + 'tail': $scope.aircraftDetails[i].tail, | |
141 | + 'make': $scope.aircraftDetails[i].make, | |
142 | + 'model': $scope.aircraftDetails[i].model, | |
143 | + 'sizeId' : $scope.aircraftDetails[i].sizeId | |
144 | + }); | |
145 | + } | |
146 | + console.log($scope.addData) | |
147 | + $scope.aircraftListData.aircraftList = $scope.addData; | |
148 | + $scope.aircraftListData.accountId = vendorId; | |
149 | + | |
150 | + CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | |
151 | + if(result != null && result.success){ | |
152 | + toastr.success(''+result.success+'', { | |
153 | + closeButton: true | |
154 | + }) | |
155 | + $('#aircraft-modal-3').modal('hide'); | |
156 | + getAircraftList(); | |
157 | + }else{ | |
158 | + toastr.error(''+result.statusText+'', { | |
159 | + closeButton: true | |
160 | + }) | |
161 | + } | |
162 | + }); | |
163 | + | |
164 | + } | |
165 | + $scope.showNoteData = true; | |
166 | + $scope.showCompanyName = true; | |
167 | + $scope.showAddress = true; | |
168 | + $scope.showNote = function(){ | |
169 | + $scope.showNoteData = false; | |
170 | + } | |
171 | + | |
172 | + $scope.company = function(){ | |
173 | + $scope.showCompanyName = false; | |
174 | + } | |
175 | + | |
176 | + $scope.addressChange = function(){ | |
177 | + $scope.showAddress = false; | |
178 | + } | |
179 | + | |
180 | + $scope.editData = function(inputName) { | |
181 | + console.log($scope.vendorData) | |
182 | + if(inputName == 'showNoteData'){ | |
183 | + $scope.showNoteData = true; | |
184 | + }else if(inputName == 'showCompanyName'){ | |
185 | + $scope.showCompanyName = true; | |
186 | + }else if(inputName == 'showAddress'){ | |
187 | + $scope.showAddress = true; | |
188 | + } | |
189 | + | |
190 | + var vendorData = "companyName=" + $scope.vendorData.companyName + "&masterMargin=" + $scope.vendorData.masterMargin | |
191 | + + "&addressOne=" + $scope.vendorData.addressOne + "&addressTwo=" + $scope.vendorData.addressTwo + "&city=" + $scope.vendorData.city + "&state=" | |
192 | + + $scope.vendorData.state + "&country=" + $scope.vendorData.country + "&zipcode=" + $scope.vendorData.zipcode + "&internalNote=" | |
193 | + + $scope.vendorData.internalNote + "&certificateType=" + $scope.vendorData.certificateType + "&baseTenant=" + $scope.vendorData.baseTenant | |
194 | + + "&fuelerlinxCustomer=" + $scope.vendorData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.vendorData.contractFuelVendor | |
195 | + + "&activate=" + $scope.vendorData.activate + "&baseIcao=" + $scope.vendorData.baseIcao + "&vendorId=" + vendorId; | |
196 | + | |
197 | + ViewFuelVendorService.updateContact(vendorData).then(function(result) { | |
198 | + if(result != null && result.success){ | |
199 | + toastr.success(''+result.success+'', { | |
200 | + closeButton: true | |
201 | + }) | |
202 | + }else{ | |
203 | + toastr.error(''+result.statusText+'', { | |
204 | + closeButton: true | |
205 | + }) | |
206 | + } | |
207 | + }) | |
208 | + | |
209 | + } | |
210 | + | |
211 | + $scope.sendMail = function(){ | |
212 | + ViewFuelVendorService.sendMail(vendorId).then(function(result) { | |
213 | + if(result != null && result.success){ | |
214 | + toastr.success(''+result.success+'', { | |
215 | + closeButton: true | |
216 | + }) | |
217 | + }else{ | |
218 | + toastr.error(''+result.statusText+'', { | |
219 | + closeButton: true | |
220 | + }) | |
221 | + } | |
222 | + }) | |
223 | + } | |
224 | + | |
225 | + }]); | |
0 | 226 | \ No newline at end of file | ... | ... |
app/partials/viewFuelVendor/viewFuelVendor.html
... | ... | @@ -0,0 +1,648 @@ |
1 | +<style> | |
2 | + .subnavbar .mainnav > li:nth-child(3) > a{ | |
3 | + color: #ff9900; | |
4 | + } | |
5 | + .widget-content{ | |
6 | + padding: 10px !important; | |
7 | + } | |
8 | + .widget-content input[type="text"], .widget-content select{ | |
9 | + height: 31px; | |
10 | + padding: 0; | |
11 | + } | |
12 | + .new-label span{ | |
13 | + float: left; | |
14 | + line-height: 31px; | |
15 | + } | |
16 | + .new-label span:first-child{ | |
17 | + margin-right: 5px; | |
18 | + font-weight: bold; | |
19 | + } | |
20 | + .new-label span:last-child{ | |
21 | + margin-left: 5px; | |
22 | + } | |
23 | + .new-label select{ | |
24 | + display: -webkit-inline-box; | |
25 | + display: inline-box; | |
26 | + float: left; | |
27 | + } | |
28 | + .new-address p{ | |
29 | + margin-bottom: 0; | |
30 | + } | |
31 | + .new-add-select{ | |
32 | + padding-left: 15px; | |
33 | + margin: 10px 0; | |
34 | + } | |
35 | + .new-add-select select{ | |
36 | + width: 100px; | |
37 | + } | |
38 | + .widget{ | |
39 | + -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
40 | + -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
41 | + box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); | |
42 | + } | |
43 | + .optionclass { | |
44 | + background: #fff; | |
45 | + } | |
46 | + .timess { | |
47 | + float: right !important; | |
48 | + margin-top: 10px !important; | |
49 | + margin-right: 10px !important; | |
50 | + color: #999 !important; | |
51 | + cursor: pointer !important; | |
52 | + } | |
53 | + | |
54 | + .button1 { | |
55 | + display: inline-block; | |
56 | + height: 35px; | |
57 | + line-height: 35px; | |
58 | + padding-right: 15px; | |
59 | + padding-left: 50px; | |
60 | + position: relative; | |
61 | + background-color:rgb(41,127,184); | |
62 | + color:rgb(255,255,255); | |
63 | + text-decoration: none; | |
64 | + text-transform: uppercase; | |
65 | + letter-spacing: 1px; | |
66 | + margin-bottom: 15px; | |
67 | + border: 0; | |
68 | + | |
69 | + | |
70 | + border-radius: 5px; | |
71 | + -moz-border-radius: 5px; | |
72 | + -webkit-border-radius: 5px; | |
73 | + text-shadow:0px 1px 0px rgba(0,0,0,0.5); | |
74 | + -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; | |
75 | + filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); | |
76 | + | |
77 | + -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
78 | + -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
79 | + box-shadow:0px 2px 2px rgba(0,0,0,0.2); | |
80 | + -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; | |
81 | + filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); | |
82 | + } | |
83 | + | |
84 | + .button1 span { | |
85 | + position: absolute; | |
86 | + left: 0; | |
87 | + top: 0; | |
88 | + width: 35px; | |
89 | + background-color:rgba(0,0,0,0.5); | |
90 | + | |
91 | + -webkit-border-top-left-radius: 5px; | |
92 | + -webkit-border-bottom-left-radius: 5px; | |
93 | + -moz-border-radius-topleft: 5px; | |
94 | + -moz-border-radius-bottomleft: 5px; | |
95 | + border-top-left-radius: 5px; | |
96 | + border-bottom-left-radius: 5px; | |
97 | + border-right: 1px solid rgba(0,0,0,0.15); | |
98 | + } | |
99 | + | |
100 | + .button1:hover span, .button1.active span { | |
101 | + background-color:rgb(0,102,26); | |
102 | + border-right: 1px solid rgba(0,0,0,0.3); | |
103 | + } | |
104 | + | |
105 | + .button1:active { | |
106 | + margin-top: 2px; | |
107 | + margin-bottom: 13px; | |
108 | + | |
109 | + -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
110 | + -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
111 | + box-shadow:0px 1px 0px rgba(255,255,255,0.5); | |
112 | + -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; | |
113 | + filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); | |
114 | + } | |
115 | + | |
116 | + .button1.turquoise { | |
117 | + background: #449d44; | |
118 | + } | |
119 | + | |
120 | +</style> | |
121 | +<div class="col-xs-12 col-md-11"> | |
122 | + <div class="row" style="margin-left:0px"> | |
123 | + <div class="col-md-12"> | |
124 | + <div class="widget"> | |
125 | + <div class="widget-header"> | |
126 | + <i class="fa fa-building-o" aria-hidden="true"></i> | |
127 | + <h3>Antioch Flight Department</h3> | |
128 | + <i class="fa fa-times timess" ui-sref="app.customers" aria-hidden="true"></i> | |
129 | + </div> | |
130 | + <!-- /widget-header --> | |
131 | + <div class="widget-content"> | |
132 | + <div class="row" style="margin-left:0px"> | |
133 | + <div class="col-md-6"> | |
134 | + <div class="widget"> | |
135 | + <div class="widget-header"> | |
136 | + <i class="fa fa-building-o" aria-hidden="true"></i> | |
137 | + <h3>Company Details</h3> | |
138 | + <label>BASE ICAO</label> | |
139 | + <input type="tel" ng-model="vendorData.baseIcao" style="line-height: 18px;width: 50px;padding: 0px 9px;" ng-blur="editData()"/> | |
140 | + <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 10px;"> | |
141 | + <div><input id="company-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="Active" data-off="Dactive"> | |
142 | + </div> | |
143 | + </div> | |
144 | + </div> | |
145 | + <div class="widget-content"> | |
146 | + <div class="row" style="margin-left:0px;"> | |
147 | + <div class="col-md-7" style="padding-left: 0;"> | |
148 | + <h4 ng-show="showCompanyName"> | |
149 | + <b style="color:#F90;">{{vendorData.vendorName}}</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> | |
150 | + </h4> | |
151 | + <input type="tel" ng-hide="showCompanyName" ng-model="vendorData.vendorName" class="form-control" ng-blur="editData('showCompanyName')"/> | |
152 | + </div> | |
153 | + <div class="col-md-5"> | |
154 | + <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="vendorData.certificateType" ng-click="editData()"> | |
155 | + <option class="optionclass" disabled selected>Certificate Type</option> | |
156 | + <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | |
157 | + <option class="optionclass" value="charter">Part 135 (Charter)</option> | |
158 | + <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | |
159 | + <option class="optionclass" value="military">Military</option> | |
160 | + <option class="optionclass" value="government">Government</option> | |
161 | + </select> | |
162 | + </div> | |
163 | + </div> | |
164 | + <div> | |
165 | + <p class="new-label"> | |
166 | + <span>Master Margin Setting </span> | |
167 | + <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-model="vendorData.masterMargin" ng-click="editData()"> | |
168 | + <option value="margin1">Margin1</option> | |
169 | + <option value="margin2">Margin2</option> | |
170 | + <option value="vendorsonly">Vendors Only</option> | |
171 | + <option value="margintenants">Margin Tenants</option> | |
172 | + </select> | |
173 | + <span> See Aircrart List</span> | |
174 | + <div class="clearfix"></div> | |
175 | + </p> | |
176 | + </div> | |
177 | + <div class="row" style="margin-left:0px;"> | |
178 | + <div class="col-md-5" style="padding-left: 0;"> | |
179 | + <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.baseTenant"> Tenant/Base Customer | |
180 | + </div> | |
181 | + <div class="col-md-5" style="padding-left: 0;"> | |
182 | + <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.fuelerlinxCustomer"> FuelerLinx Customer | |
183 | + </div> | |
184 | + </div> | |
185 | + <div> | |
186 | + <input type="checkbox" name="" ng-click="editData()" ng-model="vendorData.contractFuelVendor"> CAA Member | |
187 | + </div> | |
188 | + </br> | |
189 | + <div class="new-address"> | |
190 | + <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{vendorData.addressOne}} {{vendorData.addressTwo}} <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | |
191 | + | |
192 | + <div ng-hide="showAddress"> | |
193 | + <label>Address1</label> | |
194 | + <input type="tel" ng-hide="showAddress" ng-model="vendorData.addressOne" class="form-control" ng-blur="editData('showAddress')"/> | |
195 | + <label>Address2</label> | |
196 | + <input type="tel" ng-hide="showAddress" ng-model="vendorData.addressTwo" class="form-control" ng-blur="editData('showAddress')"/> | |
197 | + </div> | |
198 | + | |
199 | + <p><i class="fa fa-phone"></i> (310) 2342-3433 <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | |
200 | + <p><i class="fa fa-envelope"></i> freed@gmail.com <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | |
201 | + </div> | |
202 | + <div class="new-add-select"> | |
203 | + <select class="form-control" style="background: #ebebeb;padding: 4px 8px;width: 115px;"> | |
204 | + <option disabled selected>Add Field</option> | |
205 | + <option class="optionclass">Add Phone</option> | |
206 | + <option class="optionclass">Add Email</option> | |
207 | + </select> | |
208 | + </div> | |
209 | + <div> | |
210 | + <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | |
211 | + <p ng-show="showNoteData">{{vendorData.internalNote}}</p> | |
212 | + <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="vendorData.internalNote" ng-blur="editData('showNoteData')" rows="4" cols="34"></textarea> | |
213 | + </div> | |
214 | + <div class="dis"> | |
215 | + <button type="button" data-toggle="modal" data-target="#distribute-modal-3" class="btn btn-primary">Distribute Price to Company Contacts</button> | |
216 | + </div> | |
217 | + <div><button type="button" class="btn btn-info">Setup Fuel</button></div> | |
218 | + </div> | |
219 | + </div> | |
220 | + </div> | |
221 | + <div class="col-md-6"> | |
222 | + <div class="widget"> | |
223 | + <div class="widget-header"> | |
224 | + <i class="fa fa-plane"></i> | |
225 | + <h3>Aircraft List</h3> | |
226 | + <div class="pull-right"> | |
227 | + <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft</button> | |
228 | + </div> | |
229 | + </div> | |
230 | + <div class="widget-content" style="padding:0px"> | |
231 | + <div class="table-responsive"> | |
232 | + <table class="table table-bordered table-hover table-striped"> | |
233 | + <thead> | |
234 | + <tr> | |
235 | + <th>Tail #</th> | |
236 | + <th>Make</th> | |
237 | + <th>Model</th> | |
238 | + <th>JET-A</th> | |
239 | + <th>All in</th> | |
240 | + <th>AVGAS</th> | |
241 | + <th>All in</th> | |
242 | + <th></th> | |
243 | + </tr> | |
244 | + </thead> | |
245 | + <tbody> | |
246 | + <tr ng-repeat="aircraft in contactAircraftList"> | |
247 | + <td>{{aircraft.tail}}</td> | |
248 | + <td>{{aircraft.make}}</td> | |
249 | + <td>{{aircraft.model}}</td> | |
250 | + <td> | |
251 | + <select class="form-control" style="height:31px;"> | |
252 | + <option>Margin1</option> | |
253 | + <option>Margin2</option> | |
254 | + </select> | |
255 | + </td> | |
256 | + <td style="color:#55AF8B;">$3659</td> | |
257 | + <td> | |
258 | + <select class="form-control" style="height:31px;"> | |
259 | + <option>Margin1</option> | |
260 | + <option>Margin2</option> | |
261 | + </select> | |
262 | + </td> | |
263 | + <td style="color:#55AF8B;">$3659</td> | |
264 | + <td></td> | |
265 | + </tr> | |
266 | + </tbody> | |
267 | + </table> | |
268 | + </div> | |
269 | + </div> | |
270 | + </div> | |
271 | + </div> | |
272 | + </div> | |
273 | + <div class="row" style="margin-left:0px"> | |
274 | + <div class="col-md-6"> | |
275 | + <div class="widget"> | |
276 | + <div class="widget-header"> | |
277 | + <i class="fa fa-user"></i> | |
278 | + <h3>Contact List</h3> | |
279 | + <div class="pull-right"> | |
280 | + <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Contact</button> | |
281 | + </div> | |
282 | + </div> | |
283 | + <div class="widget-content" style="padding:0px"> | |
284 | + <div class="table-responsive"> | |
285 | + <table class="table table-bordered table-hover table-striped"> | |
286 | + <thead> | |
287 | + <tr> | |
288 | + <th>Price Email</th> | |
289 | + <th>First Name</th> | |
290 | + <th>Last Name</th> | |
291 | + <th>Title</th> | |
292 | + </tr> | |
293 | + </thead> | |
294 | + <tbody> | |
295 | + <tr ng-repeat="contact in vendorContactList"> | |
296 | + <td class="my-toggle-switch"><input id="{{contact.id}}" checked type="checkbox" data-size="mini" data-toggle="toggle"></td> | |
297 | + <td> | |
298 | + <a href="#!/viewContact/{{contact.id}}"> | |
299 | + {{contact.firstName}} | |
300 | + </a> | |
301 | + </td> | |
302 | + <td>{{contact.lastName}}</td> | |
303 | + <td>{{contact.title}}</td> | |
304 | + </tr> | |
305 | + </tbody> | |
306 | + </table> | |
307 | + </div> | |
308 | + </div> | |
309 | + </div> | |
310 | + </div> | |
311 | + <div class="col-md-6"> | |
312 | + <div class="widget"> | |
313 | + <div class="widget-header"> | |
314 | + <i class="fa fa-pencil"></i> | |
315 | + <h3>Price Manager Reference</h3> | |
316 | + </div> | |
317 | + <div class="widget-content"> | |
318 | + <div class="table-responsive"> | |
319 | + <table class="table table-hover table-striped"> | |
320 | + <thead> | |
321 | + <tr> | |
322 | + <th>Omit</th> | |
323 | + <th>Product</th> | |
324 | + <th>Cost</th> | |
325 | + <th>PAP (Margin)</th> | |
326 | + <th>PAP (Total)</th> | |
327 | + <th style="color:#F90">Expires</th> | |
328 | + </tr> | |
329 | + </thead> | |
330 | + <tbody> | |
331 | + <tr> | |
332 | + <td><input type="checkbox"></td> | |
333 | + <td>Jet-A Full Service</td> | |
334 | + <td>$2.123</td> | |
335 | + <td>$23000</td> | |
336 | + <td style="color:#55AF8B;">$3659</td> | |
337 | + <td style="color:#F90">3/15/2017</td> | |
338 | + </tr> | |
339 | + <tr> | |
340 | + <td><input type="checkbox"></td> | |
341 | + <td>Jet-A Full Service</td> | |
342 | + <td>$2.123</td> | |
343 | + <td>$23000</td> | |
344 | + <td style="color:#55AF8B;">$3659</td> | |
345 | + <td style="color:#F90">3/15/2017</td> | |
346 | + </tr> | |
347 | + <tr> | |
348 | + <tr> | |
349 | + <td><input type="checkbox"></td> | |
350 | + <td>Jet-A Full Service</td> | |
351 | + <td>$2.123</td> | |
352 | + <td>$23000</td> | |
353 | + <td style="color:#55AF8B;">$3659</td> | |
354 | + <td style="color:#F90">3/15/2017</td> | |
355 | + </tr> | |
356 | + <tr> | |
357 | + <td><input type="checkbox"></td> | |
358 | + <td>Jet-A Full Service</td> | |
359 | + <td>$2.123</td> | |
360 | + <td>$23000</td> | |
361 | + <td style="color:#55AF8B;">$3659</td> | |
362 | + <td style="color:#F90">3/15/2017</td> | |
363 | + </tr> | |
364 | + </tbody> | |
365 | + </table> | |
366 | + </div> | |
367 | + </div> | |
368 | + </div> | |
369 | + </div> | |
370 | + </div> | |
371 | + </div> | |
372 | + <!-- /widget-content --> | |
373 | + </div> | |
374 | + <!-- /widget --> | |
375 | + </div> | |
376 | + <!-- /span6 --> | |
377 | + </div> | |
378 | + <!-- /widget --> | |
379 | +</div> | |
380 | +<!-- /container --> | |
381 | +<form class="modal multi-step" id="contact-modal-3" name="companyForm"> | |
382 | + <div class="modal-dialog modal-lg"> | |
383 | + <div class="modal-content"> | |
384 | + <div class="modal-body step-1" data-step="1" style="padding: 0;"> | |
385 | + <div> | |
386 | + <div class="row" style="margin: 0;"> | |
387 | + <div> | |
388 | + <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | |
389 | + <div class="widget-header"> | |
390 | + <i class="icon-pencil"></i> | |
391 | + <i class="fa fa-tasks" aria-hidden="true"></i> | |
392 | + <h3>Add a New Contact</h3> | |
393 | + <div class="clearfix"></div> | |
394 | + </div> | |
395 | + <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | |
396 | + <div class="col-xs-12"> | |
397 | + <div class="col-md-6"> | |
398 | + <div class="pull-left" style="width: 110px;"> | |
399 | + <label class="new-input-label"><b>First Name</b></label> | |
400 | + </div> | |
401 | + <div class="pull-left" style="margin-left: 15px;"> | |
402 | + <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | |
403 | + </div> | |
404 | + <div class="clearfix"></div> | |
405 | + </div> | |
406 | + <div class="col-md-6"> | |
407 | + | |
408 | + <div class="pull-left" style="width: 110px;"> | |
409 | + <label class="new-input-label"><b>Last Name</b></label> | |
410 | + </div> | |
411 | + <div class="pull-left" style="margin-left: 15px;"> | |
412 | + <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | |
413 | + </div> | |
414 | + <div class="clearfix"></div> | |
415 | + </div> | |
416 | + </div> | |
417 | + <div class="clearfix"></div><br> | |
418 | + <div class="col-xs-12"> | |
419 | + <div class="col-md-6"> | |
420 | + <div class="pull-left" style="width: 110px;"> | |
421 | + <label class="new-input-label"><b>Title</b></label> | |
422 | + </div> | |
423 | + <div class="pull-left" style="margin-left: 15px;"> | |
424 | + <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | |
425 | + </div> | |
426 | + <div class="clearfix"></div> | |
427 | + </div> | |
428 | + <div class="col-md-6"> | |
429 | + | |
430 | + <div class="pull-left" style="width: 110px;"> | |
431 | + <label class="new-input-label"><b>Email</b></label> | |
432 | + </div> | |
433 | + <div class="pull-left" style="margin-left: 15px;"> | |
434 | + <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | |
435 | + </div> | |
436 | + <div class="clearfix"></div> | |
437 | + </div> | |
438 | + </div> | |
439 | + <div class="clearfix"></div><br> | |
440 | + <div class="col-xs-12"> | |
441 | + <div class="col-md-6"> | |
442 | + <div class="pull-left" style="width: 110px;"> | |
443 | + <label class="new-input-label"><b>Username</b></label> | |
444 | + </div> | |
445 | + <div class="pull-left" style="margin-left: 15px;"> | |
446 | + <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | |
447 | + </div> | |
448 | + <div class="clearfix"></div> | |
449 | + </div> | |
450 | + <div class="col-md-6"> | |
451 | + | |
452 | + <div class="pull-left" style="width: 110px;"> | |
453 | + <label class="new-input-label"><b>Password</b></label> | |
454 | + </div> | |
455 | + <div class="pull-left" style="margin-left: 15px;"> | |
456 | + <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | |
457 | + </div> | |
458 | + <div class="clearfix"></div> | |
459 | + </div> | |
460 | + </div> | |
461 | + <div class="clearfix"></div><br> | |
462 | + <div class="col-xs-12"> | |
463 | + <div class="col-md-6"> | |
464 | + <div class="pull-left" style="width: 110px;"> | |
465 | + <label class="new-input-label"><b>Work Phone</b></label> | |
466 | + </div> | |
467 | + <div class="pull-left" style="margin-left: 15px;"> | |
468 | + <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | |
469 | + </div> | |
470 | + <div class="clearfix"></div> | |
471 | + </div> | |
472 | + <div class="col-md-6"> | |
473 | + | |
474 | + <div class="pull-left" style="width: 110px;"> | |
475 | + <label class="new-input-label"><b>Mobile Phone</b></label> | |
476 | + </div> | |
477 | + <div class="pull-left" style="margin-left: 15px;"> | |
478 | + <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | |
479 | + </div> | |
480 | + <div class="clearfix"></div> | |
481 | + </div> | |
482 | + </div> | |
483 | + <div class="clearfix"></div><br> | |
484 | + <div class="col-xs-12"> | |
485 | + <div class="col-md-12"> | |
486 | + <div class="pull-left" style="width: 110px;"> | |
487 | + <label class="new-input-label"><b>Address</b></label> | |
488 | + </div> | |
489 | + <div class="pull-right" style="width: calc(100% - 123px);"> | |
490 | + <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | |
491 | + </div> | |
492 | + <div class="clearfix"></div> | |
493 | + </div> | |
494 | + </div> | |
495 | + <div class="clearfix"></div> | |
496 | + <br/> | |
497 | + <div class="col-xs-12"> | |
498 | + <div class="col-md-3"> | |
499 | + <div class="pull-left my-toggle-switch"> | |
500 | + <div style="color: #ff9a01;">Price Email     | |
501 | + <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> | |
502 | + </div> | |
503 | + </div> | |
504 | + <div class="clearfix"></div> | |
505 | + </div> | |
506 | + <div class="col-md-3"> | |
507 | + <div class="pull-left my-toggle-switch"> | |
508 | + <div style="color: #ff9a01;">Primary Contact     | |
509 | + <input type="checkbox" ng-model="data.primaryContact"> | |
510 | + </div> | |
511 | + </div> | |
512 | + <div class="clearfix"></div> | |
513 | + </div> | |
514 | + <div class="col-md-6"> | |
515 | + <div class="pull-left" style="width: 110px;"> | |
516 | + <label class="new-input-label"><b>Internal Note</b></label> | |
517 | + </div> | |
518 | + <div class="pull-left" style="width: calc(100% - 110px);"> | |
519 | + <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | |
520 | + </div> | |
521 | + </div> | |
522 | + <div class="clearfix"></div> | |
523 | + </div> | |
524 | + <div class="clearfix"></div><br> | |
525 | + </div> | |
526 | + </div> | |
527 | + <div class="clearfix"></div> | |
528 | + </div> | |
529 | + </div> | |
530 | + </div> | |
531 | + </div> | |
532 | + <div class="modal-footer" style="border-top: 0;"> | |
533 | + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
534 | + <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | |
535 | + </div> | |
536 | + </div> | |
537 | + </div> | |
538 | +</form> | |
539 | +<div class="clearfix"></div> | |
540 | + | |
541 | +<form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | |
542 | + <div class="modal-dialog modal-lg"> | |
543 | + <div class="modal-content"> | |
544 | + <div class="modal-body step-2" data-step="2" style="padding: 0;"> | |
545 | + <div> | |
546 | + <div class="row" style="margin: 0;"> | |
547 | + <div> | |
548 | + <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | |
549 | + <div class="widget-header"> | |
550 | + <i class="icon-pencil"></i> | |
551 | + <i class="fa fa-tasks" aria-hidden="true"></i> | |
552 | + <h3>Add a New Aircraft</h3> | |
553 | + <div class="clearfix"></div> | |
554 | + </div> | |
555 | + <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | |
556 | + <div class="col-xs-12"> | |
557 | + <div class="widget-header"> | |
558 | + <i class="fa fa-list"></i> | |
559 | + <h3>Aircraft List</h3> | |
560 | + </div> | |
561 | + <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | |
562 | + <div class="table-responsive"> | |
563 | + <table class="table table-striped table-bordered"> | |
564 | + <thead> | |
565 | + <tr> | |
566 | + <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | |
567 | + <th>Tail</th> | |
568 | + <th>Make</th> | |
569 | + <th>Model</th> | |
570 | + <th>Size</th> | |
571 | + </tr> | |
572 | + </thead> | |
573 | + <tbody> | |
574 | + <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | |
575 | + <!-- <td> | |
576 | + <input type="checkbox" ng-model="aircraftData.selected"/> | |
577 | + </td> --> | |
578 | + <td style="width: 20%"> | |
579 | + <input type="tel" class="form-control" ng-model="aircraftData.tail" required/> | |
580 | + </td> | |
581 | + <td style="width: 20%"> | |
582 | + <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | |
583 | + <option ng-repeat="make in aircraftMakeList">{{make}}</option> | |
584 | + </select> | |
585 | + </td> | |
586 | + <td style="width: 20%"> | |
587 | + <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | |
588 | + <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> | |
589 | + </select> | |
590 | + </td> | |
591 | + <td style="width: 20%"> | |
592 | + <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> | |
593 | + <!-- <select class="form-control" ng-model="aircraftData.size"> | |
594 | + <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | |
595 | + </select> --> | |
596 | + </td> | |
597 | + </tr> | |
598 | + </tbody> | |
599 | + </table> | |
600 | + </div> | |
601 | + <div class="clearfix"></div> | |
602 | + </div> | |
603 | + </div> | |
604 | + <div class="clearfix"></div> | |
605 | + <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | |
606 | + <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | |
607 | + </div> | |
608 | + </div> | |
609 | + </div> | |
610 | + <div class="clearfix"></div> | |
611 | + </div> | |
612 | + </div> | |
613 | + </div> | |
614 | + </div> | |
615 | + <div class="modal-footer" style="border-top: 0;"> | |
616 | + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
617 | + <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveVendorData()">Save</button> | |
618 | + </div> | |
619 | + </div> | |
620 | + </div> | |
621 | +</form> | |
622 | + | |
623 | +<form class="modal multi-step" id="distribute-modal-3" name="aircraftForm"> | |
624 | + <div class="modal-dialog"> | |
625 | + <div class="modal-content"> | |
626 | + <div class="modal-body step-2" data-step="2" style="padding: 0;"> | |
627 | + <div> | |
628 | + <div class="row" style="margin: 0;"> | |
629 | + <p>Are you sure that you want to email pricing to everyone in your contact list</p> | |
630 | + </div> | |
631 | + </div> | |
632 | + </div> | |
633 | + <div class="modal-footer" style="border-top: 0;"> | |
634 | + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | |
635 | + <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="sendMail()">Save</button> | |
636 | + </div> | |
637 | + </div> | |
638 | + </div> | |
639 | +</form> | |
640 | +<!-- Le javascript | |
641 | + ================================================== --> | |
642 | +<!-- Placed at the end of the document so the pages load faster --> | |
643 | +<!-- <script | |
644 | + CKEDITOR.replace( 'editor2', { | |
645 | + height: 250, | |
646 | + extraPlugins: 'divarea' | |
647 | + } ); | |
648 | + </script> --> | ... | ... |
app/partials/viewFuelVendor/viewFuelVendor.service.js
... | ... | @@ -0,0 +1,108 @@ |
1 | +(function(){ | |
2 | + 'use strict'; | |
3 | + angular.module('acufuel') | |
4 | + .service('ViewFuelVendorService', ['$q', '$http', 'BASE_URL', ViewFuelVendorService]); | |
5 | + | |
6 | + function ViewFuelVendorService($q, $http, BASE_URL) { | |
7 | + | |
8 | + this.getFuelOrder = function(id) { | |
9 | + | |
10 | + var deferred = $q.defer(); | |
11 | + $http({ | |
12 | + method : 'GET', | |
13 | + url : BASE_URL.url +'/vendor/'+id, | |
14 | + headers : {'Content-Type': 'application/json'}, | |
15 | + }) | |
16 | + .then(function (result){ | |
17 | + deferred.resolve(result.data); | |
18 | + },function (result){ | |
19 | + deferred.resolve(result.data); | |
20 | + }) | |
21 | + return deferred.promise; | |
22 | + } | |
23 | + | |
24 | + this.getContact = function(id) { | |
25 | + | |
26 | + var deferred = $q.defer(); | |
27 | + $http({ | |
28 | + method : 'GET', | |
29 | + url : BASE_URL.url +'/vendor/contacts/'+id, | |
30 | + headers : {'Content-Type': 'application/json'}, | |
31 | + }) | |
32 | + .then(function (result){ | |
33 | + deferred.resolve(result.data); | |
34 | + },function (result){ | |
35 | + deferred.resolve(result.data); | |
36 | + }) | |
37 | + return deferred.promise; | |
38 | + } | |
39 | + | |
40 | + this.addContact = function(data) { | |
41 | + | |
42 | + var deferred = $q.defer(); | |
43 | + $http({ | |
44 | + method : 'POST', | |
45 | + url : BASE_URL.url +'/vendor/add/contact', | |
46 | + data : data, | |
47 | + headers : {'Content-Type': 'application/json'}, | |
48 | + }) | |
49 | + .then(function (result){ | |
50 | + deferred.resolve(result.data); | |
51 | + },function (result){ | |
52 | + deferred.resolve(result.data); | |
53 | + }) | |
54 | + return deferred.promise; | |
55 | + } | |
56 | + | |
57 | + this.sendMail = function(id) { | |
58 | + | |
59 | + var deferred = $q.defer(); | |
60 | + $http({ | |
61 | + method : 'POST', | |
62 | + url : BASE_URL.url +'/mailPriceToContacts/'+id, | |
63 | + headers : {'Content-Type': 'application/json'}, | |
64 | + }) | |
65 | + .then(function (result){ | |
66 | + deferred.resolve(result.data); | |
67 | + },function (result){ | |
68 | + deferred.resolve(result.data); | |
69 | + }) | |
70 | + return deferred.promise; | |
71 | + } | |
72 | + | |
73 | + this.updateContact = function(data) { | |
74 | + | |
75 | + var deferred = $q.defer(); | |
76 | + $http({ | |
77 | + method : 'PUT', | |
78 | + url : BASE_URL.url +'/vendor', | |
79 | + data : data, | |
80 | + headers : {'Content-Type': 'application/json'}, | |
81 | + }) | |
82 | + .then(function (result){ | |
83 | + deferred.resolve(result.data); | |
84 | + },function (result){ | |
85 | + deferred.resolve(result.data); | |
86 | + }) | |
87 | + return deferred.promise; | |
88 | + } | |
89 | + | |
90 | + this.getAircraft = function(id) { | |
91 | + | |
92 | + var deferred = $q.defer(); | |
93 | + $http({ | |
94 | + method : 'GET', | |
95 | + url : BASE_URL.url +'/vendor/aircrafts/'+id, | |
96 | + headers : {'Content-Type': 'application/json'}, | |
97 | + }) | |
98 | + .then(function (result){ | |
99 | + deferred.resolve(result.data); | |
100 | + },function (result){ | |
101 | + deferred.resolve(result.data); | |
102 | + }) | |
103 | + return deferred.promise; | |
104 | + } | |
105 | + | |
106 | + } | |
107 | + | |
108 | +})(); | |
0 | 109 | \ No newline at end of file | ... | ... |