Commit a7a7cfeca7d51ea363d2c320341b5fb24af42180
1 parent
c95befcd3a
Exists in
master
fuel vendor page implementation
Showing
7 changed files
with
192 additions
and
392 deletions
Show diff stats
app/partials/FuelVendors/FuelVendors.controller.js
... | ... | @@ -10,13 +10,12 @@ |
10 | 10 | $(document).ready(function() { |
11 | 11 | $('#example').DataTable(); |
12 | 12 | }); |
13 | - | |
13 | + $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | |
14 | 14 | $scope.reset = function(){ |
15 | 15 | $("input").val(""); |
16 | 16 | } |
17 | 17 | |
18 | 18 | $scope.data = {}; |
19 | - $scope.aircraft = {}; | |
20 | 19 | $scope.data.activate = true; |
21 | 20 | $scope.showLoader = false; |
22 | 21 | getAllVendor(); |
... | ... | @@ -54,15 +53,16 @@ |
54 | 53 | }) |
55 | 54 | } |
56 | 55 | |
57 | - getData(); | |
58 | - function getData(){ | |
59 | - CustomersService.getAircraftMake().then(function(result) { | |
60 | - $scope.aircraftMakeList = result; | |
61 | - }) | |
62 | - } | |
63 | - | |
64 | - CustomersService.getMargin().then(function(result) { | |
65 | - $scope.marginList = result; | |
56 | + // CustomersService.getMargin().then(function(result) { | |
57 | + // $scope.marginList = result; | |
58 | + // }) | |
59 | + | |
60 | + CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | |
61 | + $scope.jetMarginList = result; | |
62 | + }) | |
63 | + | |
64 | + CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | |
65 | + $scope.avgsMarginList = result; | |
66 | 66 | }) |
67 | 67 | |
68 | 68 | $scope.showCompanyError = false; |
... | ... | @@ -97,83 +97,9 @@ |
97 | 97 | FuelVendorsService.addVendor(vendorData).then(function(result) { |
98 | 98 | console.log("result",result) |
99 | 99 | $scope.accountId = result; |
100 | - $scope.aircraft.accountId = $scope.accountId; | |
101 | 100 | }) |
102 | - $(sel).trigger('next.m.' + step); | |
103 | - getData(); | |
104 | 101 | } |
102 | + $('#vendor-modal-3').modal('hide'); | |
105 | 103 | } |
106 | 104 | |
107 | - $scope.aircraftDetails = [{ | |
108 | - 'tail':'', | |
109 | - 'make': '', | |
110 | - 'model': '', | |
111 | - 'sizeId' : '', | |
112 | - 'marginId': $scope.data.masterMargin | |
113 | - }]; | |
114 | - | |
115 | - $scope.addNew = function(){ | |
116 | - $scope.aircraftDetails.push({ | |
117 | - 'tail':'', | |
118 | - 'make': '', | |
119 | - 'model': '', | |
120 | - 'sizeId' : '', | |
121 | - 'marginId': '' | |
122 | - }); | |
123 | - console.log($scope.aircraftDetails) | |
124 | - }; | |
125 | - | |
126 | - $scope.getModal = function(makeId, index){ | |
127 | - $scope.showLoader = true; | |
128 | - $scope.aircraft.make = makeId; | |
129 | - //var makeId = makeId; | |
130 | - CustomersService.getModal($scope.aircraft.make).then(function(result) { | |
131 | - $scope.showLoader = false; | |
132 | - $scope.aircraftDetails[index].aircraftModalList = result; | |
133 | - //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | |
134 | - }) | |
135 | - } | |
136 | - | |
137 | - $scope.getSize = function(model, index){ | |
138 | - $scope.showLoader = true; | |
139 | - CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | |
140 | - $scope.showLoader = false; | |
141 | - console.log("result",result) | |
142 | - $scope.aircraftDetails[index].aircraftSizeList = result; | |
143 | - //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | |
144 | - console.log($scope.aircraftDetails[index].size) | |
145 | - }) | |
146 | - } | |
147 | - | |
148 | - $scope.aircraftListData = {}; | |
149 | - $scope.addData = []; | |
150 | - $scope.saveVendorData = function(){ | |
151 | - for(var i=0; i<$scope.aircraftDetails.length;i++){ | |
152 | - $scope.addData.push({ | |
153 | - 'tail': $scope.aircraftDetails[i].tail, | |
154 | - 'make': $scope.aircraftDetails[i].make, | |
155 | - 'model': $scope.aircraftDetails[i].model, | |
156 | - 'sizeId' : $scope.aircraftDetails[i].sizeId, | |
157 | - 'marginId': $scope.aircraftDetails[i].marginId | |
158 | - }); | |
159 | - } | |
160 | - $scope.aircraftListData.aircraftList = $scope.addData; | |
161 | - $scope.aircraftListData.accountId = $scope.aircraft.accountId; | |
162 | - | |
163 | - FuelVendorsService.addVendorAicraft($scope.aircraftListData).then(function(result) { | |
164 | - console.log(result) | |
165 | - | |
166 | - if(result != null && result.success){ | |
167 | - toastr.success(''+result.success+'', { | |
168 | - closeButton: true | |
169 | - }) | |
170 | - $('#vendor-modal-3').modal('hide'); | |
171 | - getAllVendor(); | |
172 | - }else{ | |
173 | - toastr.error(''+result.statusText+'', { | |
174 | - closeButton: true | |
175 | - }) | |
176 | - } | |
177 | - }); | |
178 | - } | |
179 | 105 | } |
180 | 106 | \ No newline at end of file | ... | ... |
app/partials/FuelVendors/FuelVendors.html
... | ... | @@ -336,7 +336,7 @@ |
336 | 336 | </div> |
337 | 337 | <div class="clearfix"></div><br> |
338 | 338 | <div class="col-xs-12"> |
339 | - <div class="col-md-8"> | |
339 | + <div class="col-md-7"> | |
340 | 340 | <div class="pull-left"> |
341 | 341 | <label class="new-input-label"><b>Relationship </b></label> |
342 | 342 | </div> |
... | ... | @@ -347,41 +347,46 @@ |
347 | 347 | </div> |
348 | 348 | <div class="clearfix"></div> |
349 | 349 | </div> |
350 | + <div class="col-md-2 Airport" style="text-align: right;"> | |
351 | + <b>Certificate Type</b> | |
352 | + </div> | |
353 | + <div class="col-md-3 Airport"> | |
354 | + <select required class="form-control" ng-model="data.certificateType"> | |
355 | + <option value="" disabled selected hidden>Select...</option> | |
356 | + <option value="corporate">Part 91 (Corporate)</option> | |
357 | + <option value="charter">Part 135 (Charter)</option> | |
358 | + <option value="scheduled">Part 121 (Scheduled)</option> | |
359 | + <option value="military">Military</option> | |
360 | + <option value="government">Government</option> | |
361 | + </select> | |
362 | + </div> | |
363 | + <div class="clearfix"></div> | |
350 | 364 | </div> |
351 | 365 | <div class="clearfix"></div> |
352 | 366 | <br/> |
353 | 367 | <div class="col-xs-12"> |
354 | 368 | <div class="col-md-6"> |
355 | 369 | <div class="pull-left" style="width: 110px;"> |
356 | - <b>Master Margin</b> | |
370 | + <b>JET A Margin</b> | |
357 | 371 | </div> |
358 | 372 | <div class="pull-left"> |
359 | - <!-- <select required class="form-control" style="max-width: 250px;" ng-model="data.masterMargin"> | |
360 | - <option value="" disabled selected hidden>Select </option> | |
361 | - <option value="margin1">Margin1</option> | |
362 | - <option value="margin2">Margin2</option> | |
363 | - <option value="vendorsonly">Vendors Only</option> | |
364 | - <option value="margintenants">Margin Tenants</option> | |
365 | - </select> --> | |
366 | - <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in marginList" required ng-change="removeMarginValidation()"></select> | |
373 | + <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | |
374 | + <option value="" disabled>Select...</option> | |
375 | + </select> | |
367 | 376 | <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> |
368 | 377 | </div> |
369 | 378 | <div class="clearfix"></div> |
370 | 379 | </div> |
371 | 380 | |
372 | 381 | <div class="col-md-3 Airport" style="text-align: right;"> |
373 | - <b>Certificate Type</b> | |
382 | + <b>AVGAS 100LL Margin</b> | |
374 | 383 | </div> |
375 | 384 | <div class="col-md-3 Airport"> |
376 | - <select required class="form-control" ng-model="data.certificateType"> | |
377 | - <option value="" disabled selected hidden>Select </option> | |
378 | - <option value="corporate">Part 91 (Corporate)</option> | |
379 | - <option value="charter">Part 135 (Charter)</option> | |
380 | - <option value="scheduled">Part 121 (Scheduled)</option> | |
381 | - <option value="military">Military</option> | |
382 | - <option value="government">Government</option> | |
385 | + <select class="form-control marginSelectBox" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | |
386 | + <option value="" disabled>Select...</option> | |
383 | 387 | </select> |
384 | 388 | </div> |
389 | + <div class="clearfix"></div> | |
385 | 390 | </div> |
386 | 391 | <div class="clearfix"></div> |
387 | 392 | <br/> |
... | ... | @@ -465,138 +470,6 @@ |
465 | 470 | </div> |
466 | 471 | </div> |
467 | 472 | <div class="clearfix"></div> |
468 | - <!-- <br/> | |
469 | - <div class="col-xs-12"> | |
470 | - <div class="col-md-2 Airport"></div> | |
471 | - <div class="col-md-10 Airport"> | |
472 | - <div class="pull-right"> | |
473 | - <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | |
474 | - <button type="button" class="btn btn-warning" ng-click="addAircraft()">Next: Add Aircraft</button> | |
475 | - </div> | |
476 | - </div> | |
477 | - </div> --> | |
478 | - </div> | |
479 | - </div> | |
480 | - <div class="clearfix"></div> | |
481 | - </div> | |
482 | - </div> | |
483 | - </div> | |
484 | - </div> | |
485 | - <div class="modal-body step-2" data-step="2" style="padding: 0;"> | |
486 | - <div> | |
487 | - <div class="row" style="margin: 0;"> | |
488 | - <div> | |
489 | - <div class="widget" style="margin-bottom: 0;"> | |
490 | - <div class="widget-header"> | |
491 | - <i class="icon-pencil"></i> | |
492 | - <i class="fa fa-tasks" aria-hidden="true"></i> | |
493 | - <h3>Add a New Vendor</h3> | |
494 | - <div class="clearfix"></div> | |
495 | - </div> | |
496 | - <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | |
497 | - <div class="col-xs-12"> | |
498 | - <div class="widget-header"> | |
499 | - <i class="fa fa-list"></i> | |
500 | - <h3>Aircraft List</h3> | |
501 | - </div> | |
502 | - <div class="widget-content" style="padding:0px;border: 0px; "> | |
503 | - <div class="table-responsive"> | |
504 | - <!-- <table class="table table-bordered table-hover table-striped addRow" style="margin-bottom: 0px;"> | |
505 | - <thead> | |
506 | - <tr> | |
507 | - <th>Tail</th> | |
508 | - <th>Make</th> | |
509 | - <th>Model</th> | |
510 | - <th>Size</th> | |
511 | - <th>Margin</th> | |
512 | - </tr> | |
513 | - </thead> | |
514 | - <tbody> | |
515 | - <tr> | |
516 | - <td> | |
517 | - <input type="text" style="width:100px;" ng-model="aircraft.tail" class="form-control"> | |
518 | - </td> | |
519 | - <td style="width: 25%;"> | |
520 | - <select class="form-control" ng-model="aircraft.make" ng-change="getModal()"> | |
521 | - <option ng-repeat="make in aircraftMakeList">{{make}}</option> | |
522 | - </select> | |
523 | - </td> | |
524 | - <td style="width: 20%;"> | |
525 | - <select class="form-control" ng-model="aircraft.model" ng-change="getSize()"> | |
526 | - <option ng-repeat="model in aircraftModalList">{{model}}</option> | |
527 | - </select> | |
528 | - </td> | |
529 | - <td style="width: 25%;"> | |
530 | - <select class="form-control" ng-model="aircraft.size"> | |
531 | - <option ng-repeat="size in aircraftSizeList">{{size}}</option> | |
532 | - </select> | |
533 | - </td> | |
534 | - <td> | |
535 | - <select class="form-control"> | |
536 | - <option>Margin1</option> | |
537 | - <option>Margin2</option> | |
538 | - </select> | |
539 | - </td> | |
540 | - </tr> | |
541 | - </tbody> | |
542 | - | |
543 | - </table> --> | |
544 | - <table class="table table-striped table-bordered"> | |
545 | - <thead> | |
546 | - <tr> | |
547 | - <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | |
548 | - <th>Tail</th> | |
549 | - <th>Make</th> | |
550 | - <th>Model</th> | |
551 | - <th>Size</th> | |
552 | - <th>Margin</th> | |
553 | - </tr> | |
554 | - </thead> | |
555 | - <tbody> | |
556 | - <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | |
557 | - <!-- <td> | |
558 | - <input type="checkbox" ng-model="aircraftData.selected"/> | |
559 | - </td> --> | |
560 | - <td style="width: 20%"> | |
561 | - <input type="text" class="form-control" ng-model="aircraftData.tail" required/> | |
562 | - </td> | |
563 | - <td style="width: 20%"> | |
564 | - <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | |
565 | - <option ng-repeat="make in aircraftMakeList">{{make}}</option> | |
566 | - </select> | |
567 | - </td> | |
568 | - <td style="width: 20%"> | |
569 | - <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | |
570 | - <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> | |
571 | - </select> | |
572 | - </td> | |
573 | - <td style="width: 20%"> | |
574 | - <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> | |
575 | - <!-- <select class="form-control" ng-model="aircraftData.size"> | |
576 | - <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | |
577 | - </select> --> | |
578 | - </td> | |
579 | - <td> | |
580 | - <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in marginList"></select> | |
581 | - </td> | |
582 | - </tr> | |
583 | - </tbody> | |
584 | - </table> | |
585 | - </div> | |
586 | - <div class="clearfix"></div> | |
587 | - </div> | |
588 | - </div> | |
589 | - <div class="clearfix"></div> | |
590 | - <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | |
591 | - <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | |
592 | - </div> | |
593 | - <!-- <div class="col-xs-12" style="margin-bottom: 20px;"> | |
594 | - <div class="pull-right"> | |
595 | - <button type="button" class="btn btn-default" ng-click="cancelCraft()">Cancel</button> | |
596 | - <button type="button" class="btn btn-warning" ng-click="goBack()">Go Back</button> | |
597 | - <button type="button" class="btn btn-success" ng-click="goBack()">Save</button> | |
598 | - </div> | |
599 | - </div> --> | |
600 | 473 | </div> |
601 | 474 | </div> |
602 | 475 | <div class="clearfix"></div> |
... | ... | @@ -604,15 +477,9 @@ |
604 | 477 | </div> |
605 | 478 | </div> |
606 | 479 | </div> |
607 | - <!-- <div class="modal-body step-3" data-step="3"> | |
608 | - This is the final step. | |
609 | - </div> --> | |
610 | 480 | <div class="modal-footer" style="border-top: 0;"> |
611 | 481 | <button type="button" class="btn btn-default" ng-click="reset()" data-dismiss="modal">Cancel</button> |
612 | - <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData('#vendor-modal-3', 2)">Next: Add Aircraft</button> | |
613 | - <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#vendor-modal-3', 1)">Go Back</button> | |
614 | - <!-- <button type="button" class="btn btn-primary step step-2" data-step="2" onclick="sendEvent('#vendor-modal-3', 3)">Continue</button> --> | |
615 | - <button type="button" class="btn btn-success step step-2" data-step="2" ng-click="saveVendorData()">Save</button> | |
482 | + <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addFirstData()">Save</button> | |
616 | 483 | </div> |
617 | 484 | </div> |
618 | 485 | </div> | ... | ... |
app/partials/customers/customers.controller.js
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | $(document).ready(function() { |
9 | 9 | $('#example').DataTable(); |
10 | 10 | }); |
11 | - | |
11 | + $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) | |
12 | 12 | $scope.reset2 = function(){ |
13 | 13 | $("input").val(""); |
14 | 14 | } |
... | ... | @@ -122,9 +122,13 @@ |
122 | 122 | }) |
123 | 123 | } |
124 | 124 | |
125 | - $scope.marginFilterOptions = []; | |
126 | - CustomersService.getMargin().then(function(result) { | |
127 | - $scope.marginList = result; | |
125 | + | |
126 | + // CustomersService.getMargin().then(function(result) { | |
127 | + // $scope.marginList = result; | |
128 | + // }) | |
129 | + $scope.marginFilterOptions = []; | |
130 | + CustomersService.getJetMargin($scope.userProfileId).then(function(result) { | |
131 | + $scope.jetMarginList = result; | |
128 | 132 | $scope.marginFilterOptions.push({ |
129 | 133 | 'id': '', 'title': 'Show All' |
130 | 134 | }); |
... | ... | @@ -134,10 +138,13 @@ |
134 | 138 | 'title': result[i].marginName |
135 | 139 | }) |
136 | 140 | } |
137 | - console.log('$scope.marginFilterOptions', $scope.marginFilterOptions); | |
141 | + }) | |
138 | 142 | |
139 | - //$scope.marginFilter = $scope.marginList; | |
143 | + CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { | |
144 | + $scope.avgsMarginList = result; | |
140 | 145 | }) |
146 | + | |
147 | + | |
141 | 148 | $scope.showCompanyError = false; |
142 | 149 | $scope.showMarginError = false; |
143 | 150 | |
... | ... | @@ -164,7 +171,7 @@ |
164 | 171 | + $scope.data.state + "&country=" + $scope.data.country + "&zipcode=" + $scope.data.zipcode + "&internalNote=" |
165 | 172 | + $scope.data.internalNote + "&certificateType=" + $scope.data.certificateType + "&baseTenant=" + $scope.data.baseTenant |
166 | 173 | + "&fuelerlinxCustomer=" + $scope.data.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.data.contractFuelVendor |
167 | - + "&activate=" + $scope.data.activate + "&baseIcao=" + $scope.data.baseIcao; | |
174 | + + "&activate=" + $scope.data.activate + "&baseIcao=" + $scope.data.baseIcao + "&avgasMargin=" + $scope.data.avgasMargin; | |
168 | 175 | |
169 | 176 | CustomersService.addCompany(companyData).then(function(result) { |
170 | 177 | $scope.accountId = result; |
... | ... | @@ -180,7 +187,8 @@ |
180 | 187 | 'make': '', |
181 | 188 | 'model': '', |
182 | 189 | 'sizeId' : '', |
183 | - 'marginId': $scope.data.masterMargin | |
190 | + 'marginId': $scope.data.masterMargin, | |
191 | + 'avgasMarginId': $scope.data.avgasMargin | |
184 | 192 | }]; |
185 | 193 | |
186 | 194 | $scope.addNew = function(){ |
... | ... | @@ -189,7 +197,8 @@ |
189 | 197 | 'make': '', |
190 | 198 | 'model': '', |
191 | 199 | 'sizeId' : '', |
192 | - 'marginId': '' | |
200 | + 'marginId': $scope.data.masterMargin, | |
201 | + 'avgasMarginId': $scope.data.avgasMargin | |
193 | 202 | }); |
194 | 203 | }; |
195 | 204 | |
... | ... | @@ -222,7 +231,8 @@ |
222 | 231 | 'make': $scope.aircraftDetails[i].make, |
223 | 232 | 'model': $scope.aircraftDetails[i].model, |
224 | 233 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
225 | - 'marginId': $scope.aircraftDetails[i].marginId | |
234 | + 'marginId': $scope.aircraftDetails[i].marginId, | |
235 | + 'avgasMarginId': $scope.aircraftDetails[i].avgasMarginId | |
226 | 236 | }); |
227 | 237 | } |
228 | 238 | $scope.aircraftListData.aircraftList = $scope.addData; | ... | ... |
app/partials/customers/customers.html
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | <button type="button" ng-if="row.activate == false" class="btn btn-warning btn-xs">InActive</button> |
123 | 123 | </td> |
124 | 124 | <td data-title="'Margin Setting'" filter="{masterMargin: 'select'}" filter-data="marginFilterOptions" sortable="'masterMargin'"> |
125 | - <select class="form-control" ng-click="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in marginList" required></select> | |
125 | + <select class="form-control" ng-change="editMargin(row)" style="height:31px;" ng-model="row.masterMargin" ng-selected="" ng-options="margin.id as margin.marginName for margin in jetMarginList" required></select> | |
126 | 126 | </td> |
127 | 127 | <td data-title="'All In'" filter="{allIn: 'text'}" sortable="'allIn'"> |
128 | 128 | {{row.allIn}} |
... | ... | @@ -286,7 +286,7 @@ |
286 | 286 | </div> |
287 | 287 | <div class="clearfix"></div><br> |
288 | 288 | <div class="col-xs-12"> |
289 | - <div class="col-md-8"> | |
289 | + <div class="col-md-7"> | |
290 | 290 | <div class="pull-left"> |
291 | 291 | <label class="new-input-label"><b>Relationship </b></label> |
292 | 292 | </div> |
... | ... | @@ -297,42 +297,47 @@ |
297 | 297 | </div> |
298 | 298 | <div class="clearfix"></div> |
299 | 299 | </div> |
300 | + <div class="col-md-2 Airport" style="text-align: right;"> | |
301 | + <b>Certificate Type</b> | |
302 | + </div> | |
303 | + <div class="col-md-3 Airport"> | |
304 | + <select required class="form-control" ng-model="data.certificateType"> | |
305 | + <option value="" disabled selected hidden>Select...</option> | |
306 | + <option value="corporate">Part 91 (Corporate)</option> | |
307 | + <option value="charter">Part 135 (Charter)</option> | |
308 | + <option value="scheduled">Part 121 (Scheduled)</option> | |
309 | + <option value="military">Military</option> | |
310 | + <option value="government">Government</option> | |
311 | + </select> | |
312 | + </div> | |
313 | + <div class="clearfix"></div> | |
300 | 314 | </div> |
301 | 315 | <div class="clearfix"></div> |
302 | 316 | <br/> |
303 | 317 | <div class="col-xs-12"> |
304 | 318 | <div class="col-md-6"> |
305 | 319 | <div class="pull-left" style="width: 110px;"> |
306 | - <b>Master Margin</b> | |
320 | + <b>JET A Margin</b> | |
307 | 321 | </div> |
308 | 322 | <div class="pull-left"> |
309 | - <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in marginList" required ng-change="removeMarginValidation()"></select> | |
310 | - <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | |
323 | + <select class="form-control marginSelectBox" ng-model="data.masterMargin" ng-options="margin.id as margin.marginName for margin in jetMarginList" required ng-change="removeMarginValidation()"> | |
324 | + <option value="" disabled>Select...</option> | |
325 | + </select> | |
326 | + <label ng-show="showMarginError" class="customErrorMessage">This field is required.</label> | |
311 | 327 | |
312 | - <!-- <select required class="form-control" style="max-width: 250px;" ng-model="data.masterMargin"> | |
313 | - <option value="" disabled selected hidden>Select </option> | |
314 | - <option value="margin1">Margin1</option> | |
315 | - <option value="margin2">Margin2</option> | |
316 | - <option value="vendorsonly">Vendors Only</option> | |
317 | - <option value="margintenants">Margin Tenants</option> | |
318 | - </select> --> | |
328 | + <div class="clearfix"></div> | |
319 | 329 | </div> |
320 | - <div class="clearfix"></div> | |
321 | - </div> | |
330 | + </div> | |
322 | 331 | |
323 | 332 | <div class="col-md-3 Airport" style="text-align: right;"> |
324 | - <b>Certificate Type</b> | |
333 | + <b>AVGAS 100LL Margin</b> | |
325 | 334 | </div> |
326 | 335 | <div class="col-md-3 Airport"> |
327 | - <select required class="form-control" ng-model="data.certificateType"> | |
328 | - <option value="" disabled selected hidden>Select </option> | |
329 | - <option value="corporate">Part 91 (Corporate)</option> | |
330 | - <option value="charter">Part 135 (Charter)</option> | |
331 | - <option value="scheduled">Part 121 (Scheduled)</option> | |
332 | - <option value="military">Military</option> | |
333 | - <option value="government">Government</option> | |
336 | + <select class="form-control marginSelectBox" ng-model="data.avgasMargin" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | |
337 | + <option value="" disabled>Select...</option> | |
334 | 338 | </select> |
335 | 339 | </div> |
340 | + <div class="clearfix"></div> | |
336 | 341 | </div> |
337 | 342 | <div class="clearfix"></div> |
338 | 343 | <br/> |
... | ... | @@ -500,7 +505,8 @@ |
500 | 505 | <th>Make</th> |
501 | 506 | <th>Model</th> |
502 | 507 | <th>Size</th> |
503 | - <th>Margin</th> | |
508 | + <th>JET A Margin</th> | |
509 | + <th>AVGS 100LL Margin</th> | |
504 | 510 | </tr> |
505 | 511 | </thead> |
506 | 512 | <tbody> |
... | ... | @@ -508,27 +514,38 @@ |
508 | 514 | <!-- <td> |
509 | 515 | <input type="checkbox" ng-model="aircraftData.selected"/> |
510 | 516 | </td> --> |
511 | - <td style="width: 20%"> | |
517 | + <td style="width: 15%"> | |
512 | 518 | <input type="text" class="form-control" ng-model="aircraftData.tail" required/> |
513 | 519 | </td> |
514 | - <td style="width: 20%"> | |
520 | + <td style="width: 17%"> | |
515 | 521 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
516 | 522 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
523 | + <option value="" disabled>Select...</option> | |
517 | 524 | </select> |
518 | 525 | </td> |
519 | - <td style="width: 20%"> | |
526 | + <td style="width: 17%"> | |
520 | 527 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
521 | 528 | <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> |
529 | + <option value="" disabled>Select...</option> | |
522 | 530 | </select> |
523 | 531 | </td> |
524 | - <td style="width: 20%"> | |
525 | - <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> | |
532 | + <td style="width: 17%"> | |
533 | + <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"> | |
534 | + <option value="" disabled>Select...</option> | |
535 | + </select> | |
526 | 536 | <!-- <select class="form-control" ng-model="aircraftData.size"> |
527 | 537 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> |
528 | 538 | </select> --> |
529 | 539 | </td> |
530 | - <td> | |
531 | - <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in marginList"></select> | |
540 | + <td style="width: 17%"> | |
541 | + <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in jetMarginList"> | |
542 | + <option value="" disabled>Select...</option> | |
543 | + </select> | |
544 | + </td> | |
545 | + <td style="width: 17%"> | |
546 | + <select class="form-control marginSelectBox" ng-model="aircraftData.avgasMarginId" ng-options="avgs.id as avgs.marginName for avgs in avgsMarginList"> | |
547 | + <option value="" disabled>Select...</option> | |
548 | + </select> | |
532 | 549 | </td> |
533 | 550 | </tr> |
534 | 551 | </tbody> | ... | ... |
app/partials/customers/customers.service.js
... | ... | @@ -37,6 +37,36 @@ |
37 | 37 | return deferred.promise; |
38 | 38 | } |
39 | 39 | |
40 | + this.getJetMargin = function(id){ | |
41 | + var deferred = $q.defer(); | |
42 | + $http({ | |
43 | + method : 'GET', | |
44 | + url : BASE_URL.url +'/margin/getJetAType/'+id, | |
45 | + headers : {'Content-Type': 'application/json'}, | |
46 | + }) | |
47 | + .then(function (result){ | |
48 | + deferred.resolve(result.data); | |
49 | + },function (result){ | |
50 | + deferred.resolve(result.data); | |
51 | + }) | |
52 | + return deferred.promise; | |
53 | + } | |
54 | + | |
55 | + this.getAvgMargin = function(id){ | |
56 | + var deferred = $q.defer(); | |
57 | + $http({ | |
58 | + method : 'GET', | |
59 | + url : BASE_URL.url +'/margin/getAVGASType/'+id, | |
60 | + headers : {'Content-Type': 'application/json'}, | |
61 | + }) | |
62 | + .then(function (result){ | |
63 | + deferred.resolve(result.data); | |
64 | + },function (result){ | |
65 | + deferred.resolve(result.data); | |
66 | + }) | |
67 | + return deferred.promise; | |
68 | + } | |
69 | + | |
40 | 70 | this.addCompany = function(data) { |
41 | 71 | |
42 | 72 | var deferred = $q.defer(); | ... | ... |
app/partials/viewCompany/viewCompany.html
... | ... | @@ -292,7 +292,7 @@ |
292 | 292 | </td> |
293 | 293 | <td style="color:#55AF8B;">$3659</td> |
294 | 294 | <td> |
295 | - <!-- <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> --> | |
295 | + <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteAircraft(aircraft.id)" aria-hidden="true"></i> | |
296 | 296 | </td> |
297 | 297 | </tr> |
298 | 298 | </tbody> | ... | ... |
app/partials/viewFuelVendor/viewFuelVendor.html
... | ... | @@ -221,55 +221,63 @@ |
221 | 221 | </div> |
222 | 222 | </div> |
223 | 223 | <div class="col-md-6"> |
224 | - <div class="widget"> | |
225 | - <div class="widget-header"> | |
226 | - <i class="fa fa-plane"></i> | |
227 | - <h3>Aircraft List</h3> | |
228 | - <div class="pull-right"> | |
229 | - <button type="submit" class="btn btn-success btn-sm" data-toggle="modal" ng-click="clearAircrafts()" data-target="#aircraft-modal-3" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i> Add Aircraft</button> | |
230 | - </div> | |
231 | - </div> | |
232 | - <div class="widget-content" style="padding:0px"> | |
233 | - <div class="table-responsive"> | |
234 | - <table class="table table-bordered table-hover table-striped"> | |
235 | - <thead> | |
236 | - <tr> | |
237 | - <th>Tail #</th> | |
238 | - <th>Make</th> | |
239 | - <th>Model</th> | |
240 | - <th>JET-A</th> | |
241 | - <th>All in</th> | |
242 | - <th>AVGAS</th> | |
243 | - <th>All in</th> | |
244 | - <th></th> | |
245 | - </tr> | |
246 | - </thead> | |
247 | - <tbody> | |
248 | - <tr ng-repeat="aircraft in contactAircraftList"> | |
249 | - <td>{{aircraft.tail}}</td> | |
250 | - <td>{{aircraft.make}}</td> | |
251 | - <td>{{aircraft.model}}</td> | |
252 | - <td> | |
253 | - <select class="form-control" style="height:31px;"> | |
254 | - <option>Margin1</option> | |
255 | - <option>Margin2</option> | |
256 | - </select> | |
257 | - </td> | |
258 | - <td style="color:#55AF8B;">$3659</td> | |
259 | - <td> | |
260 | - <select class="form-control" style="height:31px;"> | |
261 | - <option>Margin1</option> | |
262 | - <option>Margin2</option> | |
263 | - </select> | |
264 | - </td> | |
265 | - <td style="color:#55AF8B;">$3659</td> | |
266 | - <td></td> | |
267 | - </tr> | |
268 | - </tbody> | |
269 | - </table> | |
270 | - </div> | |
271 | - </div> | |
272 | - </div> | |
224 | + <div class="widget"> | |
225 | + <div class="widget-header"> | |
226 | + <i class="fa fa-pencil"></i> | |
227 | + <h3>Price Manager Reference</h3> | |
228 | + </div> | |
229 | + <div class="widget-content"> | |
230 | + <div class="table-responsive"> | |
231 | + <table class="table table-hover table-striped"> | |
232 | + <thead> | |
233 | + <tr> | |
234 | + <th>Omit</th> | |
235 | + <th>Product</th> | |
236 | + <th>Cost</th> | |
237 | + <th>PAP (Margin)</th> | |
238 | + <th>PAP (Total)</th> | |
239 | + <th style="color:#F90">Expires</th> | |
240 | + </tr> | |
241 | + </thead> | |
242 | + <tbody> | |
243 | + <tr> | |
244 | + <td><input type="checkbox"></td> | |
245 | + <td>Jet-A Full Service</td> | |
246 | + <td>$2.123</td> | |
247 | + <td>$23000</td> | |
248 | + <td style="color:#55AF8B;">$3659</td> | |
249 | + <td style="color:#F90">3/15/2017</td> | |
250 | + </tr> | |
251 | + <tr> | |
252 | + <td><input type="checkbox"></td> | |
253 | + <td>Jet-A Full Service</td> | |
254 | + <td>$2.123</td> | |
255 | + <td>$23000</td> | |
256 | + <td style="color:#55AF8B;">$3659</td> | |
257 | + <td style="color:#F90">3/15/2017</td> | |
258 | + </tr> | |
259 | + <tr> | |
260 | + <tr> | |
261 | + <td><input type="checkbox"></td> | |
262 | + <td>Jet-A Full Service</td> | |
263 | + <td>$2.123</td> | |
264 | + <td>$23000</td> | |
265 | + <td style="color:#55AF8B;">$3659</td> | |
266 | + <td style="color:#F90">3/15/2017</td> | |
267 | + </tr> | |
268 | + <tr> | |
269 | + <td><input type="checkbox"></td> | |
270 | + <td>Jet-A Full Service</td> | |
271 | + <td>$2.123</td> | |
272 | + <td>$23000</td> | |
273 | + <td style="color:#55AF8B;">$3659</td> | |
274 | + <td style="color:#F90">3/15/2017</td> | |
275 | + </tr> | |
276 | + </tbody> | |
277 | + </table> | |
278 | + </div> | |
279 | + </div> | |
280 | + </div> | |
273 | 281 | </div> |
274 | 282 | </div> |
275 | 283 | <div class="row" style="margin-left:0px"> |
... | ... | @@ -310,65 +318,7 @@ |
310 | 318 | </div> |
311 | 319 | </div> |
312 | 320 | </div> |
313 | - <div class="col-md-6"> | |
314 | - <div class="widget"> | |
315 | - <div class="widget-header"> | |
316 | - <i class="fa fa-pencil"></i> | |
317 | - <h3>Price Manager Reference</h3> | |
318 | - </div> | |
319 | - <div class="widget-content"> | |
320 | - <div class="table-responsive"> | |
321 | - <table class="table table-hover table-striped"> | |
322 | - <thead> | |
323 | - <tr> | |
324 | - <th>Omit</th> | |
325 | - <th>Product</th> | |
326 | - <th>Cost</th> | |
327 | - <th>PAP (Margin)</th> | |
328 | - <th>PAP (Total)</th> | |
329 | - <th style="color:#F90">Expires</th> | |
330 | - </tr> | |
331 | - </thead> | |
332 | - <tbody> | |
333 | - <tr> | |
334 | - <td><input type="checkbox"></td> | |
335 | - <td>Jet-A Full Service</td> | |
336 | - <td>$2.123</td> | |
337 | - <td>$23000</td> | |
338 | - <td style="color:#55AF8B;">$3659</td> | |
339 | - <td style="color:#F90">3/15/2017</td> | |
340 | - </tr> | |
341 | - <tr> | |
342 | - <td><input type="checkbox"></td> | |
343 | - <td>Jet-A Full Service</td> | |
344 | - <td>$2.123</td> | |
345 | - <td>$23000</td> | |
346 | - <td style="color:#55AF8B;">$3659</td> | |
347 | - <td style="color:#F90">3/15/2017</td> | |
348 | - </tr> | |
349 | - <tr> | |
350 | - <tr> | |
351 | - <td><input type="checkbox"></td> | |
352 | - <td>Jet-A Full Service</td> | |
353 | - <td>$2.123</td> | |
354 | - <td>$23000</td> | |
355 | - <td style="color:#55AF8B;">$3659</td> | |
356 | - <td style="color:#F90">3/15/2017</td> | |
357 | - </tr> | |
358 | - <tr> | |
359 | - <td><input type="checkbox"></td> | |
360 | - <td>Jet-A Full Service</td> | |
361 | - <td>$2.123</td> | |
362 | - <td>$23000</td> | |
363 | - <td style="color:#55AF8B;">$3659</td> | |
364 | - <td style="color:#F90">3/15/2017</td> | |
365 | - </tr> | |
366 | - </tbody> | |
367 | - </table> | |
368 | - </div> | |
369 | - </div> | |
370 | - </div> | |
371 | - </div> | |
321 | + | |
372 | 322 | </div> |
373 | 323 | </div> |
374 | 324 | <!-- /widget-content --> | ... | ... |