Commit 3cab9e8a3978f3a4d9aaf69365058d8e974bc340
1 parent
4bda5699a8
Exists in
master
implement view contact api
Showing
14 changed files
with
122 additions
and
328 deletions
Show diff stats
app/index.html
... | ... | @@ -114,7 +114,6 @@ |
114 | 114 | <script src="partials/updateFuelManager/updateFuelManager.controller.js"></script> |
115 | 115 | <script src="partials/viewCompany/viewCompany.controller.js"></script> |
116 | 116 | <script src="partials/dashboard/dashboard.controller.js"></script> |
117 | - <script src="partials/AirList/AirList.controller.js"></script> | |
118 | 117 | <script src="partials/fuelOrders/fuelOrders.controller.js"></script> |
119 | 118 | <script src="partials/DispatchFuel/DispatchFuel.controller.js"></script> |
120 | 119 | <script src="partials/searchDispatchFuel/searchDispatchFuel.controller.js"></script> |
... | ... | @@ -124,7 +123,7 @@ |
124 | 123 | <script src="partials/FuelVendors/FuelVendors.controller.js"></script> |
125 | 124 | <script src="partials/delselected/delselected.controller.js"></script> |
126 | 125 | <script src="partials/pricingcontact/pricingcontact.controller.js"></script> |
127 | - <script src="partials/AntiochFlightDepartment/AntiochFlightDepartment.controller.js"></script> | |
126 | + <script src="partials/viewcontact/viewcontact.controller.js"></script> | |
128 | 127 | |
129 | 128 | <script src="partials/main/main.controller.js"></script> |
130 | 129 | <div ui-view></div> |
... | ... | @@ -148,7 +147,6 @@ |
148 | 147 | <script src="partials/updateFuelManager/updateFuelManager.service.js"></script> |
149 | 148 | <script src="partials/viewCompany/viewCompany.service.js"></script> |
150 | 149 | <script src="partials/dashboard/dashboard.service.js"></script> |
151 | - <script src="partials/AirList/AirList.service.js"></script> | |
152 | 150 | <script src="partials/fuelOrders/fuelOrders.service.js"></script> |
153 | 151 | <script src="partials/DispatchFuel/DispatchFuel.service.js"></script> |
154 | 152 | <script src="partials/searchDispatchFuel/searchDispatchFuel.service.js"></script> |
... | ... | @@ -158,7 +156,7 @@ |
158 | 156 | <script src="partials/FuelVendors/FuelVendors.service.js"></script> |
159 | 157 | <script src="partials/delselected/delselected.service.js"></script> |
160 | 158 | <script src="partials/pricingcontact/pricingcontact.service.js"></script> |
161 | - <script src="partials/AntiochFlightDepartment/AntiochFlightDepartment.service.js"></script> | |
159 | + <script src="partials/viewcontact/viewcontact.service.js"></script> | |
162 | 160 | |
163 | 161 | <script src="partials/main/main.service.js"></script> |
164 | 162 | </body> | ... | ... |
app/js/app.js
... | ... | @@ -111,12 +111,6 @@ |
111 | 111 | controller: "dashboardController" |
112 | 112 | }) |
113 | 113 | |
114 | - .state("app.AirList", { | |
115 | - url: "/AirList", | |
116 | - templateUrl: "partials/AirList/AirList.html", | |
117 | - controller: "AirListController" | |
118 | - }) | |
119 | - | |
120 | 114 | .state("app.elements", { |
121 | 115 | url: "/elements", |
122 | 116 | templateUrl: "partials/elements/elements.html", |
... | ... | @@ -227,10 +221,10 @@ |
227 | 221 | controller: "pricingcontactController" |
228 | 222 | }) |
229 | 223 | |
230 | - .state("app.AntiochFlightDepartment", { | |
231 | - url: "/AntiochFlightDepartment", | |
232 | - templateUrl: "partials/AntiochFlightDepartment/AntiochFlightDepartment.html", | |
233 | - controller: "AntiochFlightDepartmentcontroller" | |
224 | + .state("app.viewContact", { | |
225 | + url: "/viewContact/:id", | |
226 | + templateUrl: "partials/viewcontact/viewcontact.html", | |
227 | + controller: "viewcontactController" | |
234 | 228 | }) |
235 | 229 | } |
236 | 230 | ]) | ... | ... |
app/partials/AirList/AirList.controller.js
app/partials/AirList/AirList.html
... | ... | @@ -1,195 +0,0 @@ |
1 | -<div class="container"> | |
2 | - <div class="row"> | |
3 | - <div class="col-md-7" style="padding-right: 60px;"> | |
4 | - <div class="widget"> | |
5 | - <div class="widget-header"> | |
6 | - <i class="icon-pencil"></i> | |
7 | - <i class="fa fa-tasks" aria-hidden="true"></i> | |
8 | - <h3>Add a New Company</h3> | |
9 | - </div> | |
10 | - <div class="widget-content" style="padding-left: 0; padding-right: 0;"> | |
11 | - <div class="container"> | |
12 | - <div class="row"> | |
13 | - <div class="col-md-6" style="margin-left: 20px;"> | |
14 | - <div class="widget-header"> | |
15 | - <i class="fa fa-plane"></i> | |
16 | - <h3>Aircraft List</h3> | |
17 | - </div> | |
18 | - <div class="widget-content" style="padding:0px"> | |
19 | - <div class="table-responsive"> | |
20 | - <table class="table table-bordered table-hover table-striped"> | |
21 | - <thead> | |
22 | - <tr> | |
23 | - <th>Tail</th> | |
24 | - <th>Make</th> | |
25 | - <th>Model</th> | |
26 | - <th>Size</th> | |
27 | - <th>Margin</th> | |
28 | - </tr> | |
29 | - </thead> | |
30 | - <tbody> | |
31 | - <tr> | |
32 | - <td> | |
33 | - <input type="text" style="width:100px;" class="form-control"> | |
34 | - </td> | |
35 | - <td> | |
36 | - <select class="form-control" style="height:31px;"> | |
37 | - <option>Margin1</option> | |
38 | - <option>Margin2</option> | |
39 | - </select> | |
40 | - </td> | |
41 | - <td> | |
42 | - <select class="form-control" style="height:31px;"> | |
43 | - <option>Margin1</option> | |
44 | - <option>Margin2</option> | |
45 | - </select> | |
46 | - </td> | |
47 | - <td> | |
48 | - <select class="form-control" style="height:31px;"> | |
49 | - <option>Margin1</option> | |
50 | - <option>Margin2</option> | |
51 | - </select> | |
52 | - </td> | |
53 | - <td> | |
54 | - <select class="form-control" style="height:31px;"> | |
55 | - <option>Margin1</option> | |
56 | - <option>Margin2</option> | |
57 | - </select> | |
58 | - </td> | |
59 | - </tr> | |
60 | - <tr> | |
61 | - <td> | |
62 | - <input type="text" style="width:100px;" class="form-control"> | |
63 | - </td> | |
64 | - <td> | |
65 | - <select class="form-control" style="height:31px;"> | |
66 | - <option>Margin1</option> | |
67 | - <option>Margin2</option> | |
68 | - </select> | |
69 | - </td> | |
70 | - <td> | |
71 | - <select class="form-control" style="height:31px;"> | |
72 | - <option>Margin1</option> | |
73 | - <option>Margin2</option> | |
74 | - </select> | |
75 | - </td> | |
76 | - <td> | |
77 | - <select class="form-control" style="height:31px;"> | |
78 | - <option>Margin1</option> | |
79 | - <option>Margin2</option> | |
80 | - </select> | |
81 | - </td> | |
82 | - <td> | |
83 | - <select class="form-control" style="height:31px;"> | |
84 | - <option>Margin1</option> | |
85 | - <option>Margin2</option> | |
86 | - </select> | |
87 | - </td> | |
88 | - </tr> | |
89 | - <tr> | |
90 | - <td> | |
91 | - <input type="text" style="width:100px;" class="form-control"> | |
92 | - </td> | |
93 | - <td> | |
94 | - <select class="form-control" style="height:31px;"> | |
95 | - <option>Margin1</option> | |
96 | - <option>Margin2</option> | |
97 | - </select> | |
98 | - </td> | |
99 | - <td> | |
100 | - <select class="form-control" style="height:31px;"> | |
101 | - <option>Margin1</option> | |
102 | - <option>Margin2</option> | |
103 | - </select> | |
104 | - </td> | |
105 | - <td> | |
106 | - <select class="form-control" style="height:31px;"> | |
107 | - <option>Margin1</option> | |
108 | - <option>Margin2</option> | |
109 | - </select> | |
110 | - </td> | |
111 | - <td> | |
112 | - <select class="form-control" style="height:31px;"> | |
113 | - <option>Margin1</option> | |
114 | - <option>Margin2</option> | |
115 | - </select> | |
116 | - </td> | |
117 | - </tr> | |
118 | - <tr> | |
119 | - <td> | |
120 | - <input type="text" style="width:100px;" class="form-control"> | |
121 | - </td> | |
122 | - <td> | |
123 | - <select class="form-control" style="height:31px;"> | |
124 | - <option>Margin1</option> | |
125 | - <option>Margin2</option> | |
126 | - </select> | |
127 | - </td> | |
128 | - <td> | |
129 | - <select class="form-control" style="height:31px;"> | |
130 | - <option>Margin1</option> | |
131 | - <option>Margin2</option> | |
132 | - </select> | |
133 | - </td> | |
134 | - <td> | |
135 | - <select class="form-control" style="height:31px;"> | |
136 | - <option>Margin1</option> | |
137 | - <option>Margin2</option> | |
138 | - </select> | |
139 | - </td> | |
140 | - <td> | |
141 | - <select class="form-control" style="height:31px;"> | |
142 | - <option>Margin1</option> | |
143 | - <option>Margin2</option> | |
144 | - </select> | |
145 | - </td> | |
146 | - </tr> | |
147 | - <tr> | |
148 | - <td> | |
149 | - <input type="text" style="width:100px;" class="form-control"> | |
150 | - </td> | |
151 | - <td> | |
152 | - <select class="form-control" style="height:31px;"> | |
153 | - <option>Margin1</option> | |
154 | - <option>Margin2</option> | |
155 | - </select> | |
156 | - </td> | |
157 | - <td> | |
158 | - <select class="form-control" style="height:31px;"> | |
159 | - <option>Margin1</option> | |
160 | - <option>Margin2</option> | |
161 | - </select> | |
162 | - </td> | |
163 | - <td> | |
164 | - <select class="form-control" style="height:31px;"> | |
165 | - <option>Margin1</option> | |
166 | - <option>Margin2</option> | |
167 | - </select> | |
168 | - </td> | |
169 | - <td> | |
170 | - <select class="form-control" style="height:31px;"> | |
171 | - <option>Margin1</option> | |
172 | - <option>Margin2</option> | |
173 | - </select> | |
174 | - </td> | |
175 | - </tr> | |
176 | - </tbody> | |
177 | - </table> | |
178 | - </div> | |
179 | - <div class="clearfix"></div> | |
180 | - </div> | |
181 | - <div class="col-xs-12" style=" padding: 15px; text-align: right;"> | |
182 | - <button type="button" class="btn btn-default">Cancel</button> | |
183 | - <button type="button" class="btn btn-warning">Go Back</button> | |
184 | - <button type="button" class="btn btn-success">Save</button> | |
185 | - <!-- <button type="button" class="btn btn-default" style="padding: 3px 12px; border-radius: 0;">Cancel</button> --> | |
186 | - </div> | |
187 | - | |
188 | - </div> | |
189 | - </div> | |
190 | - </div> | |
191 | - </div> | |
192 | - </div> | |
193 | - </div> | |
194 | - </div> | |
195 | -</div> | |
196 | 0 | \ No newline at end of file |
app/partials/AirList/AirList.service.js
app/partials/AntiochFlightDepartment/AntiochFlightDepartment.controller.js
... | ... | @@ -1,16 +0,0 @@ |
1 | -'use strict'; | |
2 | - | |
3 | - //Load controller | |
4 | - angular.module('acufuel') | |
5 | - | |
6 | - .controller('AntiochFlightDepartmentcontroller', ['$scope',function($scope) { | |
7 | - | |
8 | - $scope.test = "Testing..."; | |
9 | - | |
10 | - $(function() { | |
11 | - $('#toggle-five').bootstrapToggle(); | |
12 | - console.log("hello"); | |
13 | - }) | |
14 | - | |
15 | - | |
16 | - }]); |
app/partials/AntiochFlightDepartment/AntiochFlightDepartment.html
... | ... | @@ -1,64 +0,0 @@ |
1 | -<div class="container"> | |
2 | - <div class="row"> | |
3 | - <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;"> | |
4 | - <div class="widget"> | |
5 | - <div class="widget-header"> | |
6 | - <i class="icon-pencil"></i> | |
7 | - <i class="fa fa-building-o" aria-hidden="true"></i> | |
8 | - <h3>Antioch Flight Department</h3> | |
9 | - </div> | |
10 | - <div class="widget-content" style="padding-left: 0; padding-right: 0; "> | |
11 | - <div class="container"> | |
12 | - <div class="row"> | |
13 | - <div class="col-md-6" style="margin-left: 20px;"> | |
14 | - <div class="widget stacked"> | |
15 | - <div class="widget-header"> | |
16 | - <i class="fa fa-building-o" aria-hidden="true"></i> | |
17 | - <h3>Contact Detail</h3> | |
18 | - <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 30px;"> | |
19 | - <div><input id="toggle-five" checked type="checkbox" data-size="mini" data-width="110" data-toggle="toggle" data-on="PRICE EMAIL ON" data-off="PRICE EMAIL OFF"> | |
20 | - </div> | |
21 | - </div> | |
22 | - </div> | |
23 | - <div class="widget-content"> | |
24 | - <div class="row" style="margin-left:0px"> | |
25 | - <div class="col-md-6"> | |
26 | - <h3 style="color:#F90;"> | |
27 | - <b>Monica Smith</b> | |
28 | - </h3> | |
29 | - </div> | |
30 | - <div class="col-md-6"> | |
31 | - <div style="margin-bottom: 10px" class="input-group email-password"> | |
32 | - <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span> | |
33 | - <input id="login-username" type="text" class="form-control email-password" name="username" value="" placeholder="username or email"> | |
34 | - </div> | |
35 | - | |
36 | - <div class="input-group email-password"> | |
37 | - <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span> | |
38 | - <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password"> | |
39 | - </div> | |
40 | - </div> | |
41 | - </div> | |
42 | - <div> | |
43 | - <p><i class="fa fa-map-marker"></i> Reviera State Rd32 <input type="checkbox"></p> | |
44 | - <p><i class="fa fa-phone"></i> (310) 2342-3433 <input type="checkbox"></p> | |
45 | - <p><i class="fa fa-envelope"></i> freed@gmail.com <input type="checkbox"></p> | |
46 | - </div> | |
47 | - </br> | |
48 | - <div> | |
49 | - <p><b>Company Notes</b> <input type="checkbox"></p> | |
50 | - <p>This is the test data. note will be written in this</p> | |
51 | - <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | |
52 | - </div> | |
53 | - <!-- <div class="col-md-6"> | |
54 | - <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | |
55 | - </div> --> | |
56 | - </div> | |
57 | - </div> | |
58 | - </div> | |
59 | - </div> | |
60 | - </div> | |
61 | - </div> | |
62 | - </div> | |
63 | - </div> | |
64 | -</div> | |
65 | 0 | \ No newline at end of file |
app/partials/AntiochFlightDepartment/AntiochFlightDepartment.service.js
... | ... | @@ -1,13 +0,0 @@ |
1 | -(function(){ | |
2 | - 'use strict'; | |
3 | - angular.module('acufuel') | |
4 | - .service('AntiochFlightDepartmentService', ['$q', '$http', 'BE', AntiochFlightDepartmentService]); | |
5 | - | |
6 | - function AntiochFlightDepartmentService($q, $http, BE) { | |
7 | - var temp = {}; | |
8 | - | |
9 | - | |
10 | - | |
11 | - } | |
12 | - | |
13 | -})(); | |
14 | 0 | \ No newline at end of file |
app/partials/fuelManager/fuelManager.html
... | ... | @@ -360,7 +360,7 @@ |
360 | 360 | <div> |
361 | 361 | <div class="col-md-4"> |
362 | 362 | <i class="fa fa-plus-circle {{jets.id}}" ng-click="toggleChild(jets.id)" aria-hidden="true"></i> |
363 | - <span style="margin-left: 5px;">{{jets.rampFeesAndAvoidance.aircraftType}}</span> | |
363 | + <span style="margin-left: 5px;">{{jets.size}}</span> | |
364 | 364 | </div> |
365 | 365 | <div class="col-md-2"> |
366 | 366 | <input type="text" ng-model="jets.rampFeesAndAvoidance.rampFees" name=""> | ... | ... |
app/partials/viewCompany/viewCompany.html
... | ... | @@ -294,7 +294,11 @@ |
294 | 294 | <tbody> |
295 | 295 | <tr ng-repeat="contact in companyContactList"> |
296 | 296 | <td class="my-toggle-switch"><input id="{{contact.id}}" checked type="checkbox" data-size="mini" data-toggle="toggle"></td> |
297 | - <td>{{contact.firstName}}</td> | |
297 | + <td> | |
298 | + <a href="#!/viewContact/{{contact.id}}"> | |
299 | + {{contact.firstName}} | |
300 | + </a> | |
301 | + </td> | |
298 | 302 | <td>{{contact.lastName}}</td> |
299 | 303 | <td>{{contact.title}}</td> |
300 | 304 | </tr> | ... | ... |
app/partials/viewCompany/viewCompany.service.js
app/partials/viewcontact/viewcontact.controller.js
... | ... | @@ -0,0 +1,17 @@ |
1 | +'use strict'; | |
2 | + | |
3 | + //Load controller | |
4 | + angular.module('acufuel') | |
5 | + | |
6 | + .controller('viewcontactController', ['$scope', '$stateParams', 'ViewcontactService', function($scope, $stateParams, ViewcontactService) { | |
7 | + | |
8 | + $(function() { | |
9 | + $('#toggle-five').bootstrapToggle(); | |
10 | + }) | |
11 | + | |
12 | + var contactId = $stateParams.id; | |
13 | + ViewcontactService.getContact(contactId).then(function(result) { | |
14 | + $scope.contactDetail = result; | |
15 | + }) | |
16 | + | |
17 | + }]); | ... | ... |
app/partials/viewcontact/viewcontact.html
... | ... | @@ -0,0 +1,66 @@ |
1 | +<div class="container"> | |
2 | + <div class="row"> | |
3 | + <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;"> | |
4 | + <div class="widget"> | |
5 | + <div class="widget-header"> | |
6 | + <i class="icon-pencil"></i> | |
7 | + <i class="fa fa-building-o" aria-hidden="true"></i> | |
8 | + <h3>Antioch Flight Department</h3> | |
9 | + </div> | |
10 | + <div class="widget-content" style="padding-left: 0; padding-right: 0; "> | |
11 | + <div class="container"> | |
12 | + <div class="row"> | |
13 | + <div class="col-md-6" style="margin-left: 20px;"> | |
14 | + <div class="widget stacked"> | |
15 | + <div class="widget-header"> | |
16 | + <i class="fa fa-building-o" aria-hidden="true"></i> | |
17 | + <h3>Contact Detail</h3> | |
18 | + <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 30px;"> | |
19 | + <div><input id="toggle-five" checked type="checkbox" data-size="mini" data-width="110" data-toggle="toggle" data-on="PRICE EMAIL ON" data-off="PRICE EMAIL OFF"> | |
20 | + </div> | |
21 | + </div> | |
22 | + </div> | |
23 | + <div class="widget-content"> | |
24 | + <div class="row" style="margin-left:0px"> | |
25 | + <div class="col-md-6" style="padding-left: 0px;"> | |
26 | + <h3> | |
27 | + <b style="color:#F90;">{{contactDetail.firstName}} {{contactDetail.lastName}}</b> | |
28 | + <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 11px;" aria-hidden="true"></i> | |
29 | + </h3> | |
30 | + {{contactDetail.owner.companyName}} | |
31 | + </div> | |
32 | + <div class="col-md-6"> | |
33 | + <div style="margin-bottom: 10px" class="input-group email-password"> | |
34 | + <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span> | |
35 | + <input id="login-username" type="text" ng-model="contatctDetail.userName" class="form-control email-password" name="username" value="" placeholder="username or email"> | |
36 | + </div> | |
37 | + | |
38 | + <!-- <div class="input-group email-password"> | |
39 | + <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span> | |
40 | + <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password"> | |
41 | + </div> --> | |
42 | + </div> | |
43 | + </div> | |
44 | + <div> | |
45 | + <p><i class="fa fa-map-marker"></i> {{contactDetail.address}} <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 11px;" aria-hidden="true"></i></p> | |
46 | + <p><i class="fa fa-phone"></i> (310) 2342-3433 <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 11px;" aria-hidden="true"></i></p> | |
47 | + <p><i class="fa fa-envelope"></i> {{contactDetail.email}} <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 11px;" aria-hidden="true"></i></p> | |
48 | + </div> | |
49 | + </br> | |
50 | + <div> | |
51 | + <p><b>Contact Notes</b> <i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 11px;" aria-hidden="true"></i> | |
52 | + <p>{{contactDetail.note}}</p> | |
53 | + <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | |
54 | + </div> | |
55 | + <!-- <div class="col-md-6"> | |
56 | + <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | |
57 | + </div> --> | |
58 | + </div> | |
59 | + </div> | |
60 | + </div> | |
61 | + </div> | |
62 | + </div> | |
63 | + </div> | |
64 | + </div> | |
65 | + </div> | |
66 | +</div> | |
0 | 67 | \ No newline at end of file | ... | ... |
app/partials/viewcontact/viewcontact.service.js
... | ... | @@ -0,0 +1,26 @@ |
1 | +(function(){ | |
2 | + 'use strict'; | |
3 | + angular.module('acufuel') | |
4 | + .service('ViewcontactService', ['$q', '$http', 'BASE_URL', ViewcontactService]); | |
5 | + | |
6 | + function ViewcontactService($q, $http, BASE_URL) { | |
7 | + | |
8 | + this.getContact = function(id) { | |
9 | + | |
10 | + var deferred = $q.defer(); | |
11 | + $http({ | |
12 | + method : 'GET', | |
13 | + url : BASE_URL.url +'/company/contact/'+id, | |
14 | + headers : {'Content-Type': 'application/json'}, | |
15 | + }) | |
16 | + .then(function (result){ | |
17 | + deferred.resolve(result.data); | |
18 | + },function (result){ | |
19 | + deferred.resolve(result.data); | |
20 | + }) | |
21 | + return deferred.promise; | |
22 | + } | |
23 | + | |
24 | + } | |
25 | + | |
26 | +})(); | |
0 | 27 | \ No newline at end of file | ... | ... |