Commit 5724e5591b1d2094270bd1d978e33f4b263b795e
Exists in
master
Merge branch 'master' of git.viithiisys.com:viithiisys/acufuel
Showing
8 changed files
Show diff stats
app/partials/ContactView/ContactView.controller.js
app/partials/FuelVendors/FuelVendors.controller.js
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | $scope.data = {}; |
14 | 14 | $scope.aircraft = {}; |
15 | 15 | $scope.data.activate = true; |
16 | - | |
16 | + $scope.showLoader = false; | |
17 | 17 | getAllVendor(); |
18 | 18 | |
19 | 19 | function getAllVendor(){ |
... | ... | @@ -99,16 +99,20 @@ |
99 | 99 | }; |
100 | 100 | |
101 | 101 | $scope.getModal = function(makeId, index){ |
102 | + $scope.showLoader = true; | |
102 | 103 | $scope.aircraft.make = makeId; |
103 | 104 | //var makeId = makeId; |
104 | 105 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
106 | + $scope.showLoader = false; | |
105 | 107 | $scope.aircraftDetails[index].aircraftModalList = result; |
106 | 108 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
107 | 109 | }) |
108 | 110 | } |
109 | 111 | |
110 | 112 | $scope.getSize = function(model, index){ |
113 | + $scope.showLoader = true; | |
111 | 114 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
115 | + $scope.showLoader = false; | |
112 | 116 | console.log("result",result) |
113 | 117 | $scope.aircraftDetails[index].aircraftSizeList = result; |
114 | 118 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | ... | ... |
app/partials/FuelVendors/FuelVendors.html
... | ... | @@ -615,7 +615,9 @@ |
615 | 615 | </div> |
616 | 616 | </div> |
617 | 617 | </form> |
618 | - | |
618 | +<div class="myLoader" ng-show="showLoader"> | |
619 | + <img src="../img/hourglass.gif" width="50px;"> | |
620 | +</div> | |
619 | 621 | <script src="js/multi-step-modal.js"></script> |
620 | 622 | <script> |
621 | 623 | sendEvent = function(sel, step) { | ... | ... |
app/partials/customers/customers.controller.js
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | $scope.data = {}; |
12 | 12 | $scope.aircraft = {}; |
13 | 13 | $scope.data.activate = true; |
14 | - | |
14 | + $scope.showLoader = false; | |
15 | 15 | getAllCompanies(); |
16 | 16 | |
17 | 17 | function getAllCompanies(){ |
... | ... | @@ -25,6 +25,8 @@ |
25 | 25 | } |
26 | 26 | |
27 | 27 | $scope.editMargin = function(customer){ |
28 | + event.stopPropagation(); | |
29 | + event.preventDefault() | |
28 | 30 | console.log(customer.masterMargin) |
29 | 31 | |
30 | 32 | var companyMargin = "companyName=" + customer.companyName + "&masterMargin=" + customer.masterMargin |
... | ... | @@ -108,16 +110,20 @@ |
108 | 110 | }; |
109 | 111 | |
110 | 112 | $scope.getModal = function(makeId, index){ |
113 | + $scope.showLoader = true; | |
111 | 114 | $scope.aircraft.make = makeId; |
112 | 115 | //var makeId = makeId; |
113 | 116 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
117 | + $scope.showLoader = false; | |
114 | 118 | $scope.aircraftDetails[index].aircraftModalList = result; |
115 | 119 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
116 | 120 | }) |
117 | 121 | } |
118 | 122 | |
119 | 123 | $scope.getSize = function(model, index){ |
124 | + $scope.showLoader = true; | |
120 | 125 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
126 | + $scope.showLoader = false; | |
121 | 127 | $scope.aircraftDetails[index].aircraftSizeList = result; |
122 | 128 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
123 | 129 | console.log($scope.aircraftDetails[index].size) | ... | ... |
app/partials/customers/customers.html
... | ... | @@ -142,9 +142,9 @@ |
142 | 142 | <th> </th> |
143 | 143 | </thead> |
144 | 144 | <tbody> |
145 | - <tr ng-repeat="customer in companyList"> | |
145 | + <tr ng-repeat="customer in companyList" style="cursor: pointer;" ui-sref="app.viewCompany({id : customer.id})"> | |
146 | 146 | <td class="font-company"> |
147 | - <a style="color: #333; text-decoration: none;" href="#!/viewCompany/{{customer.id}}">{{customer.companyName}}</a> | |
147 | + {{customer.companyName}} | |
148 | 148 | </td> |
149 | 149 | <td class="font-company">{{customer.companyAircraftSize}}</td> |
150 | 150 | <td class="font-company">{{customer.phone}}</td> |
... | ... | @@ -536,7 +536,9 @@ |
536 | 536 | </div> |
537 | 537 | </div> |
538 | 538 | </form> |
539 | - | |
539 | +<div class="myLoader" ng-show="showLoader"> | |
540 | + <img src="../img/hourglass.gif" width="50px;"> | |
541 | +</div> | |
540 | 542 | <script src="js/multi-step-modal.js"></script> |
541 | 543 | <script> |
542 | 544 | sendEvent = function(sel, step) { | ... | ... |
app/partials/viewCompany/viewCompany.controller.js
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | $scope.data.priceEmail = true; |
10 | 10 | $scope.aircraft = {}; |
11 | 11 | $scope.primayData = {}; |
12 | - | |
12 | + $scope.showLoader = false; | |
13 | 13 | |
14 | 14 | CustomersService.getMargin().then(function(result) { |
15 | 15 | $scope.marginList = result; |
... | ... | @@ -101,16 +101,20 @@ |
101 | 101 | }; |
102 | 102 | |
103 | 103 | $scope.getModal = function(makeId, index){ |
104 | + $scope.showLoader = true; | |
104 | 105 | $scope.aircraft.make = makeId; |
105 | 106 | //var makeId = makeId; |
106 | 107 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
108 | + $scope.showLoader = false; | |
107 | 109 | $scope.aircraftDetails[index].aircraftModalList = result; |
108 | 110 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
109 | 111 | }) |
110 | 112 | } |
111 | 113 | |
112 | 114 | $scope.getSize = function(model, index){ |
115 | + $scope.showLoader = true; | |
113 | 116 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
117 | + $scope.showLoader = false; | |
114 | 118 | $scope.aircraftDetails[index].aircraftSizeList = result; |
115 | 119 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
116 | 120 | }) |
... | ... | @@ -219,6 +223,7 @@ |
219 | 223 | |
220 | 224 | $scope.cancelPrimaryContact = function(){ |
221 | 225 | $('#primaryContact').css('display', 'none'); |
226 | + $scope.primaryContact = false; | |
222 | 227 | } |
223 | 228 | |
224 | 229 | $scope.checkPrimaryContact = function(){ |
... | ... | @@ -263,21 +268,29 @@ |
263 | 268 | $scope.cancelCustomField = function(){ |
264 | 269 | $('#customField').css('display', 'none'); |
265 | 270 | } |
271 | + $scope.custom = {}; | |
266 | 272 | $scope.acceptCustomField = function(){ |
267 | - console.log(contactName) | |
268 | - if(contactName == 'phone'){ | |
269 | - var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content | |
270 | - + "&title=" + $scope.custom.title; | |
273 | + if($scope.custom.content == undefined){ | |
274 | + toastr.error('Please add some content', { | |
275 | + closeButton: true | |
276 | + }) | |
271 | 277 | }else{ |
272 | - var customData = "companyId=" + companyId + "&email=" + $scope.custom.content | |
273 | - + "&title=" + $scope.custom.title; | |
274 | - } | |
275 | - ViewCompanyService.addCustomField(customData).then(function(result) { | |
276 | - console.log(result) | |
277 | - if(result != null && result.success){ | |
278 | - $('#customField').css('display', 'none'); | |
278 | + if(contactName == 'phone'){ | |
279 | + var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content | |
280 | + + "&title=" + $scope.custom.title; | |
281 | + }else{ | |
282 | + var customData = "companyId=" + companyId + "&email=" + $scope.custom.content | |
283 | + + "&title=" + $scope.custom.title; | |
279 | 284 | } |
280 | - }) | |
285 | + console.log(customData.email) | |
286 | + ViewCompanyService.addCustomField(customData).then(function(result) { | |
287 | + console.log(result) | |
288 | + if(result != null && result.success){ | |
289 | + $('#customField').css('display', 'none'); | |
290 | + } | |
291 | + }) | |
292 | + } | |
293 | + | |
281 | 294 | |
282 | 295 | } |
283 | 296 | ... | ... |
app/partials/viewCompany/viewCompany.html
... | ... | @@ -698,6 +698,10 @@ |
698 | 698 | </div> |
699 | 699 | </div> |
700 | 700 | |
701 | +<div class="myLoader" ng-show="showLoader"> | |
702 | + <img src="../img/hourglass.gif" width="50px;"> | |
703 | +</div> | |
704 | + | |
701 | 705 | <!-- Le javascript |
702 | 706 | ================================================== --> |
703 | 707 | <!-- Placed at the end of the document so the pages load faster --> | ... | ... |
app/partials/viewFuelVendor/viewFuelVendor.controller.js
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | $scope.data = {}; |
9 | 9 | $scope.data.priceEmail = true; |
10 | 10 | $scope.aircraft = {}; |
11 | - | |
11 | + $scope.showLoader = false; | |
12 | 12 | var value = ""; |
13 | 13 | var vendorId = $stateParams.id; |
14 | 14 | ViewFuelVendorService.getFuelOrder(vendorId).then(function(result) { |
... | ... | @@ -75,16 +75,20 @@ |
75 | 75 | }; |
76 | 76 | |
77 | 77 | $scope.getModal = function(makeId, index){ |
78 | - $scope.aircraft.make = makeId; | |
78 | + $scope.showLoader = true; | |
79 | + $scope.aircraft.make = makeId; | |
79 | 80 | //var makeId = makeId; |
80 | 81 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
82 | + $scope.showLoader = false; | |
81 | 83 | $scope.aircraftDetails[index].aircraftModalList = result; |
82 | 84 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
83 | 85 | }) |
84 | 86 | } |
85 | 87 | |
86 | 88 | $scope.getSize = function(model, index){ |
89 | + $scope.showLoader = true; | |
87 | 90 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
91 | + $scope.showLoader = false; | |
88 | 92 | $scope.aircraftDetails[index].aircraftSizeList = result; |
89 | 93 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
90 | 94 | }) | ... | ... |