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