Commit c555af3123373967abbbeb4f4f5ed2abd63966fc
1 parent
90e918562d
Exists in
master
price email, company status and contact view page implementation and gulp file implementation
Showing
9 changed files
with
172 additions
and
21 deletions
Show diff stats
app/partials/ContactView/ContactView.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 | 5 | ||
6 | .controller('ContactViewController', ['$scope', '$uibModal', 'ContactViewService', 'ViewCompanyService', function($scope, $uibModal, ContactViewService, ViewCompanyService) { | 6 | .controller('ContactViewController', ['$scope', '$uibModal', 'ContactViewService', 'ViewCompanyService', function($scope, $uibModal, ContactViewService, ViewCompanyService) { |
7 | $(function() { | 7 | $(function() { |
8 | $('#toggle-one12').bootstrapToggle(); | 8 | $('#toggle-one120').bootstrapToggle(); |
9 | $('#toggle-two21').bootstrapToggle(); | 9 | $('#toggle-two21').bootstrapToggle(); |
10 | }) | 10 | }) |
11 | 11 | ||
12 | $(document).ready(function() { | 12 | $(document).ready(function() { |
13 | $('#contacts').DataTable(); | 13 | $('#contacts').DataTable(); |
14 | }); | 14 | }); |
15 | 15 | ||
16 | ContactViewService.getContacts().then(function(result) { | 16 | ContactViewService.getContacts().then(function(result) { |
17 | console.log('==========',result); | 17 | console.log('==========',result); |
18 | $scope.contactList = result; | 18 | $scope.contactList = result; |
19 | for(var i=0; i<$scope.contactList.length; i++){ | ||
20 | console.log("adadas") | ||
21 | $scope.contactList[i].value = "" | ||
22 | console.log($scope.contactList[i].priceEmail) | ||
23 | if($scope.contactList[i].priceEmail == 'true'){ | ||
24 | console.log(aaya) | ||
25 | $scope.contactList[i].value = 'on'; | ||
26 | }else{ | ||
27 | console.log("nai") | ||
28 | $scope.contactList[i].value = 'off' | ||
29 | } | ||
30 | |||
31 | $('#toggle-one12'+ [i]).bootstrapToggle($scope.contactList[i].value) | ||
32 | } | ||
33 | console.log($scope.contactList) | ||
19 | 34 | ||
20 | }) | 35 | }) |
21 | 36 | ||
22 | ContactViewService.getCompanies().then(function(result) { | 37 | ContactViewService.getCompanies().then(function(result) { |
23 | console.log('==========',result); | 38 | console.log('==========',result); |
24 | $scope.companies = result; | 39 | $scope.companies = result; |
25 | 40 | ||
26 | }) | 41 | }) |
27 | 42 | ||
28 | $scope.contactData = {}; | 43 | $scope.contactData = {}; |
29 | $scope.contactData.contactList = []; | 44 | $scope.contactData.contactList = []; |
30 | $scope.addContact = function(){ | 45 | $scope.addContact = function(){ |
31 | console.log('==== $scope.data======', $scope.data); | 46 | console.log('==== $scope.data======', $scope.data); |
32 | $scope.contactData.contactList.push($scope.data); | 47 | $scope.contactData.contactList.push($scope.data); |
33 | ViewCompanyService.addContact($scope.contactData).then(function(result) { | 48 | ViewCompanyService.addContact($scope.contactData).then(function(result) { |
34 | if(result.success){ | 49 | if(result.success){ |
35 | toastr.success(''+result.success+'', { | 50 | toastr.success(''+result.success+'', { |
36 | closeButton: true | 51 | closeButton: true |
37 | }) | 52 | }) |
38 | $('#contact-modal-3').modal('hide'); | 53 | $('#contact-modal-3').modal('hide'); |
39 | }else{ | 54 | }else{ |
40 | toastr.error(''+result.statusText+'', { | 55 | toastr.error(''+result.statusText+'', { |
41 | closeButton: true | 56 | closeButton: true |
42 | }) | 57 | }) |
43 | } | 58 | } |
44 | }) | 59 | }) |
45 | } | 60 | } |
46 | 61 | ||
47 | }]); | 62 | }]); |
app/partials/ContactView/ContactView.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 | </style> | 5 | </style> |
6 | <div class="main"> | 6 | <div class="main"> |
7 | <div class="container"> | 7 | <div class="container"> |
8 | <div class="row"> | 8 | <div class="row"> |
9 | <div class="col-md-12"> | 9 | <div class="col-md-12"> |
10 | <div class="widget stacked "> | 10 | <div class="widget stacked "> |
11 | <div class="widget-content"> | 11 | <div class="widget-content"> |
12 | <div class="tabbable"> | 12 | <div class="tabbable"> |
13 | <ul class="nav nav-tabs"> | 13 | <ul class="nav nav-tabs"> |
14 | <li> | 14 | <li> |
15 | <a ui-sref="app.customers">Company View | 15 | <a ui-sref="app.customers">Company View |
16 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 16 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
17 | </a> | 17 | </a> |
18 | </li> | 18 | </li> |
19 | <li class="active"> | 19 | <li class="active"> |
20 | <a ui-sref="app.ContactView">Contact View | 20 | <a ui-sref="app.ContactView">Contact View |
21 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 21 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
22 | </a> | 22 | </a> |
23 | </li> | 23 | </li> |
24 | <li> | 24 | <li> |
25 | <a ui-sref="app.FuelVendors">Fuel Vendors | 25 | <a ui-sref="app.FuelVendors">Fuel Vendors |
26 | <i class="fa fa-caret-down" aria-hidden="true"></i> | 26 | <i class="fa fa-caret-down" aria-hidden="true"></i> |
27 | </a> | 27 | </a> |
28 | </li> | 28 | </li> |
29 | <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> | 29 | <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> |
30 | <li><button type="button" class="btn btn-default btn-sm">Clear Search And Filters</button></li> | 30 | <li><button type="button" class="btn btn-default btn-sm">Clear Search And Filters</button></li> |
31 | <li style="float: right"> <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm"> <i class="fa fa-plus" aria-hidden="true"></i> Add Contact </button></li> | 31 | <li style="float: right"> <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm"> <i class="fa fa-plus" aria-hidden="true"></i> Add Contact </button></li> |
32 | </ul> | 32 | </ul> |
33 | <br> | 33 | <br> |
34 | <div class="tab-content customer-table" style="margin:0px"> | 34 | <div class="tab-content customer-table" style="margin:0px"> |
35 | <div class="tab-pane active" id="companyView"> | 35 | <div class="tab-pane active" id="companyView"> |
36 | <table class="table table-striped"> | 36 | <table class="table table-striped"> |
37 | <thead> | 37 | <thead> |
38 | <tr> | 38 | <tr> |
39 | <th> | 39 | <th> |
40 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 40 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
41 | <label class="font-company">Company Name <i class="fa fa-sort" aria-hidden="true"></i></label> | 41 | <label class="font-company">Last Name <i class="fa fa-sort" aria-hidden="true"></i></label> |
42 | </th> | 42 | </th> |
43 | 43 | ||
44 | <th> | 44 | <th> |
45 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 45 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
46 | <label class="font-company">Main Phone <i class="fa fa-sort" aria-hidden="true"></i></label> | 46 | <label class="font-company">First Phone <i class="fa fa-sort" aria-hidden="true"></i></label> |
47 | </th> | 47 | </th> |
48 | <th> | 48 | <th> |
49 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 49 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
50 | <label class="font-company">Primary Contact <i class="fa fa-sort" aria-hidden="true"></i></label> | 50 | <label class="font-company">Company Name <i class="fa fa-sort" aria-hidden="true"></i></label> |
51 | </th> | 51 | </th> |
52 | 52 | ||
53 | <th> | 53 | <th> |
54 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 54 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
55 | <label class="font-company">Status <i class="fa fa-sort" aria-hidden="true"></i></label> | 55 | <label class="font-company">Work Phone <i class="fa fa-sort" aria-hidden="true"></i></label> |
56 | <th> | ||
57 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | ||
58 | <label class="font-company">Mobile Phone <i class="fa fa-sort" aria-hidden="true"></i></label> | ||
59 | </th> | ||
60 | <th> | ||
61 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | ||
62 | <label class="font-company">Title <i class="fa fa-sort" aria-hidden="true"></i></label> | ||
63 | </th> | ||
64 | |||
56 | <th> | 65 | <th> |
57 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 66 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
58 | <label class="font-company">Source <i class="fa fa-sort" aria-hidden="true"></i></label> | 67 | <label class="font-company">Price Email<i class="fa fa-sort" aria-hidden="true"></i></label> |
59 | </th> | 68 | </th> |
60 | <th> | 69 | <th> |
61 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 70 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
62 | <label class="font-company">Margin Setting <i class="fa fa-sort" aria-hidden="true"></i></label> | 71 | <label class="font-company">Username<i class="fa fa-sort" aria-hidden="true"></i></label> |
63 | </th> | 72 | </th> |
64 | <th> | 73 | <th> |
65 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> | 74 | <input type="text" class="form-control" style="height:31px;" name="name" id="name"> |
66 | <label class="font-company">All In <i class="fa fa-sort" aria-hidden="true"></i></label> | 75 | <label class="font-company">Password<i class="fa fa-sort" aria-hidden="true"></i></label> |
67 | </th> | 76 | </th> |
68 | </tr> | 77 | </tr> |
69 | </thead> | 78 | </thead> |
70 | <tbody> | 79 | <tbody> |
71 | <tr ng-repeat="contact in contactList"> | 80 | <tr ng-repeat="contact in contactList"> |
72 | <td>{{contact.lastName}}</td> | 81 | <td>{{contact.lastName}}</td> |
73 | <td>{{contact.firstName}}</td> | 82 | <td>{{contact.firstName}}</td> |
74 | <td>{{contact.owner.companyName}}</td> | 83 | <td>{{contact.owner.companyName}}</td> |
75 | <td>{{contact.workPhone}}</td> | 84 | <td>{{contact.workPhone}}</td> |
76 | <td>{{contact.mobilePhone}}</td> | 85 | <td>{{contact.mobilePhone}}</td> |
77 | <td>{{contact.title}}</td> | 86 | <td>{{contact.title}}</td> |
78 | <td>{{contact.username}}</td> | 87 | <td> |
79 | <td>{{contact.priceEmail}}</td> | 88 | <div class="my-toggle-switch" ng-click="changePriceEmail()"> |
89 | <div> | ||
90 | <input id="toggle-one12{{$index}}" checked type="checkbox" data-size="mini" data-width="110" data-toggle="toggle" data-on="PRICE EMAIL ON" data-off="PRICE EMAIL OFF"> | ||
91 | </div> | ||
92 | </div> | ||
93 | </td> | ||
94 | <td>{{contact.userName}}</td> | ||
95 | <td>{{contact.password}}</td> | ||
80 | </tr> | 96 | </tr> |
81 | </tbody> | 97 | </tbody> |
82 | </table> | 98 | </table> |
83 | <div class="row" style="margin-left: 0px;"> | 99 | <div class="row" style="margin-left: 0px;"> |
84 | <div class="col-md-2"> | 100 | <div class="col-md-2"> |
85 | <button type="button" class="btn btn-warning">Export Customers</button> | 101 | <button type="button" class="btn btn-warning">Export Customers</button> |
86 | </div> | 102 | </div> |
87 | <div class="col-md-10"> | 103 | <div class="col-md-10"> |
88 | <div class="row" style="margin-left: 0px;"> | 104 | <div class="row" style="margin-left: 0px;"> |
89 | <div class="col-md-6"> | 105 | <div class="col-md-6"> |
90 | </div> | 106 | </div> |
91 | <div class="col-md-2"> | 107 | <div class="col-md-2"> |
92 | <select class="form-control"> | 108 | <select class="form-control"> |
93 | <option>20 Records Per Page</option> | 109 | <option>20 Records Per Page</option> |
94 | <option>50 Records Per Page</option> | 110 | <option>50 Records Per Page</option> |
95 | <option>100 Records Per Page</option> | 111 | <option>100 Records Per Page</option> |
96 | </select> | 112 | </select> |
97 | </div> | 113 | </div> |
98 | <div class="col-md-4"> | 114 | <div class="col-md-4"> |
99 | <ul class="pagination" style="margin:0px"> | 115 | <ul class="pagination" style="margin:0px"> |
100 | <li><a href="javascript:;">ยซ</a></li> | 116 | <li><a href="javascript:;">ยซ</a></li> |
101 | <li class="active"><a href="#">1</a></li> | 117 | <li class="active"><a href="#">1</a></li> |
102 | <li><a href="javascript:;">2</a></li> | 118 | <li><a href="javascript:;">2</a></li> |
103 | <li><a href="javascript:;">3</a></li> | 119 | <li><a href="javascript:;">3</a></li> |
104 | <li><a href="javascript:;">4</a></li> | 120 | <li><a href="javascript:;">4</a></li> |
105 | <li><a href="javascript:;">5</a></li> | 121 | <li><a href="javascript:;">5</a></li> |
106 | <li><a href="javascript:;">ยป</a></li> | 122 | <li><a href="javascript:;">ยป</a></li> |
107 | </ul> | 123 | </ul> |
108 | </div> | 124 | </div> |
109 | </div> | 125 | </div> |
110 | </div> | 126 | </div> |
111 | </div> | 127 | </div> |
112 | </div> | 128 | </div> |
113 | </div> | 129 | </div> |
114 | </div> | 130 | </div> |
115 | </div> | 131 | </div> |
116 | <!-- /widget-content --> | 132 | <!-- /widget-content --> |
117 | </div> | 133 | </div> |
118 | <!-- /widget --> | 134 | <!-- /widget --> |
119 | </div> | 135 | </div> |
120 | <!-- /span8 --> | 136 | <!-- /span8 --> |
121 | </div> | 137 | </div> |
122 | <!-- /row --> | 138 | <!-- /row --> |
123 | </div> | 139 | </div> |
124 | <!-- /container --> | 140 | <!-- /container --> |
125 | </div> | 141 | </div> |
126 | <!-- /main --> | 142 | <!-- /main --> |
127 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> | 143 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> |
128 | <div class="modal-dialog modal-lg"> | 144 | <div class="modal-dialog modal-lg"> |
129 | <div class="modal-content"> | 145 | <div class="modal-content"> |
130 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 146 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
131 | <div> | 147 | <div> |
132 | <div class="row" style="margin: 0;"> | 148 | <div class="row" style="margin: 0;"> |
133 | <div> | 149 | <div> |
134 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | 150 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> |
135 | <div class="widget-header"> | 151 | <div class="widget-header"> |
136 | <i class="icon-pencil"></i> | 152 | <i class="icon-pencil"></i> |
137 | <i class="fa fa-tasks" aria-hidden="true"></i> | 153 | <i class="fa fa-tasks" aria-hidden="true"></i> |
138 | <h3>Add a New Contact</h3> | 154 | <h3>Add a New Contact</h3> |
139 | <div class="clearfix"></div> | 155 | <div class="clearfix"></div> |
140 | </div> | 156 | </div> |
141 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 157 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
142 | <div class="col-xs-12"> | 158 | <div class="col-xs-12"> |
143 | <div class="col-md-6"> | 159 | <div class="col-md-6"> |
144 | <div class="pull-left" style="width: 110px;"> | 160 | <div class="pull-left" style="width: 110px;"> |
145 | <label class="new-input-label"><b>First Name</b></label> | 161 | <label class="new-input-label"><b>First Name</b></label> |
146 | </div> | 162 | </div> |
147 | <div class="pull-left" style="margin-left: 15px;"> | 163 | <div class="pull-left" style="margin-left: 15px;"> |
148 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | 164 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> |
149 | </div> | 165 | </div> |
150 | <div class="clearfix"></div> | 166 | <div class="clearfix"></div> |
151 | </div> | 167 | </div> |
152 | <div class="col-md-6"> | 168 | <div class="col-md-6"> |
153 | 169 | ||
154 | <div class="pull-left" style="width: 110px;"> | 170 | <div class="pull-left" style="width: 110px;"> |
155 | <label class="new-input-label"><b>Last Name</b></label> | 171 | <label class="new-input-label"><b>Last Name</b></label> |
156 | </div> | 172 | </div> |
157 | <div class="pull-left" style="margin-left: 15px;"> | 173 | <div class="pull-left" style="margin-left: 15px;"> |
158 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | 174 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> |
159 | </div> | 175 | </div> |
160 | <div class="clearfix"></div> | 176 | <div class="clearfix"></div> |
161 | </div> | 177 | </div> |
162 | </div> | 178 | </div> |
163 | <div class="clearfix"></div><br> | 179 | <div class="clearfix"></div><br> |
164 | <div class="col-xs-12"> | 180 | <div class="col-xs-12"> |
165 | <div class="col-md-6"> | 181 | <div class="col-md-6"> |
166 | <div class="pull-left" style="width: 110px;"> | 182 | <div class="pull-left" style="width: 110px;"> |
167 | <label class="new-input-label"><b>Title</b></label> | 183 | <label class="new-input-label"><b>Title</b></label> |
168 | </div> | 184 | </div> |
169 | <div class="pull-left" style="margin-left: 15px;"> | 185 | <div class="pull-left" style="margin-left: 15px;"> |
170 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | 186 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> |
171 | </div> | 187 | </div> |
172 | <div class="clearfix"></div> | 188 | <div class="clearfix"></div> |
173 | </div> | 189 | </div> |
174 | <div class="col-md-6"> | 190 | <div class="col-md-6"> |
175 | 191 | ||
176 | <div class="pull-left" style="width: 110px;"> | 192 | <div class="pull-left" style="width: 110px;"> |
177 | <label class="new-input-label"><b>Email</b></label> | 193 | <label class="new-input-label"><b>Email</b></label> |
178 | </div> | 194 | </div> |
179 | <div class="pull-left" style="margin-left: 15px;"> | 195 | <div class="pull-left" style="margin-left: 15px;"> |
180 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | 196 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> |
181 | </div> | 197 | </div> |
182 | <div class="clearfix"></div> | 198 | <div class="clearfix"></div> |
183 | </div> | 199 | </div> |
184 | </div> | 200 | </div> |
185 | <div class="clearfix"></div><br> | 201 | <div class="clearfix"></div><br> |
186 | <div class="col-xs-12"> | 202 | <div class="col-xs-12"> |
187 | <div class="col-md-6"> | 203 | <div class="col-md-6"> |
188 | <div class="pull-left" style="width: 110px;"> | 204 | <div class="pull-left" style="width: 110px;"> |
189 | <label class="new-input-label"><b>Username</b></label> | 205 | <label class="new-input-label"><b>Username</b></label> |
190 | </div> | 206 | </div> |
191 | <div class="pull-left" style="margin-left: 15px;"> | 207 | <div class="pull-left" style="margin-left: 15px;"> |
192 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | 208 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> |
193 | </div> | 209 | </div> |
194 | <div class="clearfix"></div> | 210 | <div class="clearfix"></div> |
195 | </div> | 211 | </div> |
196 | <div class="col-md-6"> | 212 | <div class="col-md-6"> |
197 | 213 | ||
198 | <div class="pull-left" style="width: 110px;"> | 214 | <div class="pull-left" style="width: 110px;"> |
199 | <label class="new-input-label"><b>Password</b></label> | 215 | <label class="new-input-label"><b>Password</b></label> |
200 | </div> | 216 | </div> |
201 | <div class="pull-left" style="margin-left: 15px;"> | 217 | <div class="pull-left" style="margin-left: 15px;"> |
202 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | 218 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> |
203 | </div> | 219 | </div> |
204 | <div class="clearfix"></div> | 220 | <div class="clearfix"></div> |
205 | </div> | 221 | </div> |
206 | </div> | 222 | </div> |
207 | <div class="clearfix"></div><br> | 223 | <div class="clearfix"></div><br> |
208 | <div class="col-xs-12"> | 224 | <div class="col-xs-12"> |
209 | <div class="col-md-6"> | 225 | <div class="col-md-6"> |
210 | <div class="pull-left" style="width: 110px;"> | 226 | <div class="pull-left" style="width: 110px;"> |
211 | <label class="new-input-label"><b>Work Phone</b></label> | 227 | <label class="new-input-label"><b>Work Phone</b></label> |
212 | </div> | 228 | </div> |
213 | <div class="pull-left" style="margin-left: 15px;"> | 229 | <div class="pull-left" style="margin-left: 15px;"> |
214 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | 230 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> |
215 | </div> | 231 | </div> |
216 | <div class="clearfix"></div> | 232 | <div class="clearfix"></div> |
217 | </div> | 233 | </div> |
218 | <div class="col-md-6"> | 234 | <div class="col-md-6"> |
219 | 235 | ||
220 | <div class="pull-left" style="width: 110px;"> | 236 | <div class="pull-left" style="width: 110px;"> |
221 | <label class="new-input-label"><b>Mobile Phone</b></label> | 237 | <label class="new-input-label"><b>Mobile Phone</b></label> |
222 | </div> | 238 | </div> |
223 | <div class="pull-left" style="margin-left: 15px;"> | 239 | <div class="pull-left" style="margin-left: 15px;"> |
224 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | 240 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> |
225 | </div> | 241 | </div> |
226 | <div class="clearfix"></div> | 242 | <div class="clearfix"></div> |
227 | </div> | 243 | </div> |
228 | </div> | 244 | </div> |
229 | <div class="clearfix"></div><br> | 245 | <div class="clearfix"></div><br> |
230 | <div class="col-xs-12"> | 246 | <div class="col-xs-12"> |
231 | <div class="col-md-12"> | 247 | <div class="col-md-12"> |
232 | <div class="pull-left" style="width: 110px;"> | 248 | <div class="pull-left" style="width: 110px;"> |
233 | <label class="new-input-label"><b>Address</b></label> | 249 | <label class="new-input-label"><b>Address</b></label> |
234 | </div> | 250 | </div> |
235 | <div class="pull-right" style="width: calc(100% - 123px);"> | 251 | <div class="pull-right" style="width: calc(100% - 123px);"> |
236 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | 252 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> |
237 | </div> | 253 | </div> |
238 | <div class="clearfix"></div> | 254 | <div class="clearfix"></div> |
239 | </div> | 255 | </div> |
240 | </div> | 256 | </div> |
241 | <div class="clearfix"></div><br> | 257 | <div class="clearfix"></div><br> |
242 | <div class="col-xs-12"> | 258 | <div class="col-xs-12"> |
243 | <div class="col-md-12"> | 259 | <div class="col-md-12"> |
244 | <div class="pull-left" style="width: 110px;"> | 260 | <div class="pull-left" style="width: 110px;"> |
245 | <label class="new-input-label"><b>Company</b></label> | 261 | <label class="new-input-label"><b>Company</b></label> |
246 | </div> | 262 | </div> |
247 | <div class="pull-right" style="width: calc(100% - 123px);"> | 263 | <div class="pull-right" style="width: calc(100% - 123px);"> |
248 | <select class="form-control" ng-model="data.companyId"> | 264 | <select class="form-control" ng-model="data.companyId"> |
249 | <option value="{{company.id}}" ng-repeat="company in companies">{{company.companyName}}</option> | 265 | <option value="{{company.id}}" ng-repeat="company in companies">{{company.companyName}}</option> |
250 | </select> | 266 | </select> |
251 | </div> | 267 | </div> |
252 | <div class="clearfix"></div> | 268 | <div class="clearfix"></div> |
253 | </div> | 269 | </div> |
254 | </div> | 270 | </div> |
255 | 271 | ||
256 | 272 | ||
257 | <div class="clearfix"></div> | 273 | <div class="clearfix"></div> |
258 | <br/> | 274 | <br/> |
259 | <div class="col-xs-12"> | 275 | <div class="col-xs-12"> |
260 | <div class="col-md-3"> | 276 | <div class="col-md-3"> |
261 | <div class="pull-left my-toggle-switch"> | 277 | <div class="pull-left my-toggle-switch"> |
262 | <div style="color: #ff9a01;">Price Email     | 278 | <div style="color: #ff9a01;">Price Email     |
263 | <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> | 279 | <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> |
264 | </div> | 280 | </div> |
265 | </div> | 281 | </div> |
266 | <div class="clearfix"></div> | 282 | <div class="clearfix"></div> |
267 | </div> | 283 | </div> |
268 | <div class="col-md-3"> | 284 | <div class="col-md-3"> |
269 | <div class="pull-left my-toggle-switch"> | 285 | <div class="pull-left my-toggle-switch"> |
270 | <div style="color: #ff9a01;">Primary Contact     | 286 | <div style="color: #ff9a01;">Primary Contact     |
271 | <input type="checkbox" ng-model="data.primaryContact"> | 287 | <input type="checkbox" ng-model="data.primaryContact"> |
272 | </div> | 288 | </div> |
273 | </div> | 289 | </div> |
274 | <div class="clearfix"></div> | 290 | <div class="clearfix"></div> |
275 | </div> | 291 | </div> |
276 | <div class="col-md-6"> | 292 | <div class="col-md-6"> |
277 | <div class="pull-left" style="width: 110px;"> | 293 | <div class="pull-left" style="width: 110px;"> |
278 | <label class="new-input-label"><b>Internal Note</b></label> | 294 | <label class="new-input-label"><b>Internal Note</b></label> |
279 | </div> | 295 | </div> |
280 | <div class="pull-left" style="width: calc(100% - 110px);"> | 296 | <div class="pull-left" style="width: calc(100% - 110px);"> |
281 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | 297 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> |
282 | </div> | 298 | </div> |
283 | </div> | 299 | </div> |
284 | <div class="clearfix"></div> | 300 | <div class="clearfix"></div> |
285 | </div> | 301 | </div> |
286 | <div class="clearfix"></div><br> | 302 | <div class="clearfix"></div><br> |
287 | </div> | 303 | </div> |
288 | </div> | 304 | </div> |
289 | <div class="clearfix"></div> | 305 | <div class="clearfix"></div> |
290 | </div> | 306 | </div> |
291 | </div> | 307 | </div> |
292 | </div> | 308 | </div> |
293 | </div> | 309 | </div> |
294 | <div class="modal-footer" style="border-top: 0;"> | 310 | <div class="modal-footer" style="border-top: 0;"> |
295 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | 311 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
296 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | 312 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> |
297 | </div> | 313 | </div> |
298 | </div> | 314 | </div> |
299 | </div> | 315 | </div> |
300 | </form> | 316 | </form> |
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', 'CustomersService', function($scope , $uibModal, $stateParams, ViewCompanyService, CustomersService) { | 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 = {}; | 10 | $scope.aircraft = {}; |
11 | $scope.primayData = {}; | 11 | $scope.primayData = {}; |
12 | 12 | ||
13 | $(function() { | 13 | $(function() { |
14 | $('#company-one2').bootstrapToggle(); | 14 | $('#company-one2').bootstrapToggle(); |
15 | }) | 15 | }) |
16 | 16 | ||
17 | $(function() { | 17 | $(function() { |
18 | $('#toggle-one1').bootstrapToggle(); | 18 | $('#toggle-one1').bootstrapToggle(); |
19 | }) | 19 | }) |
20 | $(function() { | 20 | $(function() { |
21 | $('#toggle-two').bootstrapToggle(); | 21 | $('#toggle-two').bootstrapToggle(); |
22 | }) | 22 | }) |
23 | $(function() { | 23 | $(function() { |
24 | $('#toggle-three').bootstrapToggle(); | 24 | $('#toggle-three').bootstrapToggle(); |
25 | }) | 25 | }) |
26 | $(function() { | 26 | $(function() { |
27 | $('#toggle-four').bootstrapToggle(); | 27 | $('#toggle-four').bootstrapToggle(); |
28 | }) | 28 | }) |
29 | 29 | ||
30 | $(function() { | 30 | $(function() { |
31 | $('#price-one2').bootstrapToggle(); | 31 | $('#price-one2').bootstrapToggle(); |
32 | $('#price-one2').change(function() { | 32 | $('#price-one2').change(function() { |
33 | $('#console-event').html('Toggle: ' + $(this).prop('checked')); | 33 | $('#console-event').html('Toggle: ' + $(this).prop('checked')); |
34 | $scope.data.priceEmail = $(this).prop('checked'); | 34 | $scope.data.priceEmail = $(this).prop('checked'); |
35 | }) | 35 | }) |
36 | }) | 36 | }) |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | CustomersService.getMargin().then(function(result) { | 40 | CustomersService.getMargin().then(function(result) { |
41 | $scope.marginList = result; | 41 | $scope.marginList = result; |
42 | }) | 42 | }) |
43 | 43 | ||
44 | var value = ""; | 44 | var value = ""; |
45 | var companyId = $stateParams.id; | 45 | var companyId = $stateParams.id; |
46 | ViewCompanyService.getCompany(companyId).then(function(result) { | 46 | ViewCompanyService.getCompany(companyId).then(function(result) { |
47 | $scope.companyData = result; | 47 | $scope.companyData = result; |
48 | if(result.margin != null){ | 48 | if(result.margin != null){ |
49 | $scope.companyData.masterMargin = result.margin.id; | 49 | $scope.companyData.masterMargin = result.margin.id; |
50 | } | 50 | } |
51 | 51 | ||
52 | if($scope.companyData.activate == true){ | 52 | if($scope.companyData.activate == true){ |
53 | value = 'on'; | 53 | value = 'on'; |
54 | }else{ | 54 | }else{ |
55 | value = 'off' | 55 | value = 'off' |
56 | } | 56 | } |
57 | $('#company-one2').bootstrapToggle(value) | 57 | $('#company-one2').bootstrapToggle(value) |
58 | }) | 58 | }) |
59 | 59 | ||
60 | $(function() { | 60 | $scope.changeStatus = function(){ |
61 | $('#company-one2').bootstrapToggle(); | 61 | $('#company-one2').bootstrapToggle(); |
62 | $('#company-one2').change(function() { | 62 | $('#company-one2').change(function() { |
63 | $('#console-event').html('Toggle: ' + $(this).prop('checked')); | 63 | $('#console-event').html('Toggle: ' + $(this).prop('checked')); |
64 | $scope.companyData.activate = $(this).prop('checked'); | 64 | $scope.companyData.activate = $(this).prop('checked'); |
65 | console.log($scope.companyData.activate) | 65 | console.log($scope.companyData.activate) |
66 | var statusData = "status=" + $scope.companyData.activate; | 66 | var statusData = "status=" + $scope.companyData.activate; |
67 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { | 67 | ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { |
68 | 68 | if(result.success){ | |
69 | toastr.success(''+result.success+'', { | ||
70 | closeButton: true | ||
71 | }) | ||
72 | } | ||
69 | }) | 73 | }) |
70 | }) | 74 | }) |
71 | }) | 75 | } |
72 | 76 | ||
73 | 77 | ||
74 | getContactList(); | 78 | getContactList(); |
75 | function getContactList(){ | 79 | function getContactList(){ |
76 | ViewCompanyService.getContact(companyId).then(function(result) { | 80 | ViewCompanyService.getContact(companyId).then(function(result) { |
77 | $scope.companyContactList = result; | 81 | $scope.companyContactList = result; |
78 | for(var i=0;i<$scope.companyContactList.length; i++){ | 82 | for(var i=0;i<$scope.companyContactList.length; i++){ |
79 | if($scope.companyContactList[i].priceEmail == true){ | 83 | if($scope.companyContactList[i].priceEmail == true){ |
80 | $scope.companyContactList[i].value1 = 'on'; | 84 | $scope.companyContactList[i].value1 = 'on'; |
81 | console.log('aya') | 85 | console.log('aya') |
82 | }else{ | 86 | }else{ |
83 | $scope.companyContactList[i].value1 = 'off'; | 87 | $scope.companyContactList[i].value1 = 'off'; |
84 | 88 | ||
85 | } | 89 | } |
86 | console.log($scope.companyContactList[i]) | 90 | console.log($scope.companyContactList[i]) |
87 | $('#'+$scope.companyContactList[i].id).bootstrapToggle($scope.companyContactList[i].value1) | 91 | $('#'+$scope.companyContactList[i].id).bootstrapToggle($scope.companyContactList[i].value1) |
88 | } | 92 | } |
89 | }) | 93 | }) |
90 | } | 94 | } |
91 | 95 | ||
92 | getAircraftList(); | 96 | getAircraftList(); |
93 | function getAircraftList(){ | 97 | function getAircraftList(){ |
94 | ViewCompanyService.getAircraft(companyId).then(function(result) { | 98 | ViewCompanyService.getAircraft(companyId).then(function(result) { |
95 | $scope.contactAircraftList = result; | 99 | $scope.contactAircraftList = result; |
96 | }) | 100 | }) |
97 | } | 101 | } |
98 | 102 | ||
99 | 103 | ||
100 | $scope.contactData = {}; | 104 | $scope.contactData = {}; |
101 | $scope.contactData.contactList = []; | 105 | $scope.contactData.contactList = []; |
102 | $scope.addContact = function(){ | 106 | $scope.addContact = function(){ |
103 | $scope.data.companyId = companyId; | 107 | $scope.data.companyId = companyId; |
104 | $scope.contactData.contactList.push($scope.data); | 108 | $scope.contactData.contactList.push($scope.data); |
105 | ViewCompanyService.addContact($scope.contactData).then(function(result) { | 109 | ViewCompanyService.addContact($scope.contactData).then(function(result) { |
106 | console.log(result) | 110 | console.log(result) |
107 | if(result.status == 200){ | 111 | if(result.status == 200){ |
108 | // toastr.success(''+result.success+'', { | 112 | // toastr.success(''+result.success+'', { |
109 | // closeButton: true | 113 | // closeButton: true |
110 | // }) | 114 | // }) |
111 | $('#contact-modal-3').modal('hide'); | 115 | $('#contact-modal-3').modal('hide'); |
112 | $scope.primayData.id = result.data; | 116 | $scope.primayData.id = result.data; |
113 | $scope.sendPrimaryContact(); | 117 | $scope.sendPrimaryContact(); |
114 | getContactList(); | 118 | getContactList(); |
115 | }else{ | 119 | }else{ |
116 | toastr.error(''+result.statusText+'', { | 120 | toastr.error(''+result.statusText+'', { |
117 | closeButton: true | 121 | closeButton: true |
118 | }) | 122 | }) |
119 | } | 123 | } |
120 | }) | 124 | }) |
121 | } | 125 | } |
122 | 126 | ||
123 | getData(); | 127 | getData(); |
124 | function getData(){ | 128 | function getData(){ |
125 | CustomersService.getAircraftMake().then(function(result) { | 129 | CustomersService.getAircraftMake().then(function(result) { |
126 | $scope.aircraftMakeList = result; | 130 | $scope.aircraftMakeList = result; |
127 | }) | 131 | }) |
128 | } | 132 | } |
129 | 133 | ||
130 | $scope.aircraftDetails = [{ | 134 | $scope.aircraftDetails = [{ |
131 | 'tail':'', | 135 | 'tail':'', |
132 | 'make': '', | 136 | 'make': '', |
133 | 'model': '', | 137 | 'model': '', |
134 | 'sizeId' : '', | 138 | 'sizeId' : '', |
135 | 'marginId': '' | 139 | 'marginId': '' |
136 | }]; | 140 | }]; |
137 | 141 | ||
138 | $scope.addNew = function(){ | 142 | $scope.addNew = function(){ |
139 | $scope.aircraftDetails.push({ | 143 | $scope.aircraftDetails.push({ |
140 | 'tail':'', | 144 | 'tail':'', |
141 | 'make': '', | 145 | 'make': '', |
142 | 'model': '', | 146 | 'model': '', |
143 | 'sizeId' : '', | 147 | 'sizeId' : '', |
144 | 'marginId': '' | 148 | 'marginId': '' |
145 | }); | 149 | }); |
146 | console.log($scope.aircraftDetails) | 150 | console.log($scope.aircraftDetails) |
147 | }; | 151 | }; |
148 | 152 | ||
149 | $scope.getModal = function(makeId, index){ | 153 | $scope.getModal = function(makeId, index){ |
150 | $scope.aircraft.make = makeId; | 154 | $scope.aircraft.make = makeId; |
151 | //var makeId = makeId; | 155 | //var makeId = makeId; |
152 | CustomersService.getModal($scope.aircraft.make).then(function(result) { | 156 | CustomersService.getModal($scope.aircraft.make).then(function(result) { |
153 | $scope.aircraftDetails[index].aircraftModalList = result; | 157 | $scope.aircraftDetails[index].aircraftModalList = result; |
154 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; | 158 | //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; |
155 | }) | 159 | }) |
156 | } | 160 | } |
157 | 161 | ||
158 | $scope.getSize = function(model, index){ | 162 | $scope.getSize = function(model, index){ |
159 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { | 163 | CustomersService.getAircraftSize($scope.aircraft.make, model).then(function(result) { |
160 | $scope.aircraftDetails[index].aircraftSizeList = result; | 164 | $scope.aircraftDetails[index].aircraftSizeList = result; |
161 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; | 165 | //$scope.aircraftDetails[index].size = $scope.aircraftSizeList[0]; |
162 | }) | 166 | }) |
163 | } | 167 | } |
164 | 168 | ||
165 | $scope.aircraftListData = {}; | 169 | $scope.aircraftListData = {}; |
166 | $scope.addData = []; | 170 | $scope.addData = []; |
167 | $scope.saveCompanyData = function(){ | 171 | $scope.saveCompanyData = function(){ |
168 | for(var i=0; i<$scope.aircraftDetails.length;i++){ | 172 | for(var i=0; i<$scope.aircraftDetails.length;i++){ |
169 | $scope.addData.push({ | 173 | $scope.addData.push({ |
170 | 'tail': $scope.aircraftDetails[i].tail, | 174 | 'tail': $scope.aircraftDetails[i].tail, |
171 | 'make': $scope.aircraftDetails[i].make, | 175 | 'make': $scope.aircraftDetails[i].make, |
172 | 'model': $scope.aircraftDetails[i].model, | 176 | 'model': $scope.aircraftDetails[i].model, |
173 | 'sizeId' : $scope.aircraftDetails[i].sizeId, | 177 | 'sizeId' : $scope.aircraftDetails[i].sizeId, |
174 | 'marginId': $scope.aircraftDetails[i].marginId | 178 | 'marginId': $scope.aircraftDetails[i].marginId |
175 | }); | 179 | }); |
176 | } | 180 | } |
177 | console.log($scope.addData) | 181 | console.log($scope.addData) |
178 | $scope.aircraftListData.aircraftList = $scope.addData; | 182 | $scope.aircraftListData.aircraftList = $scope.addData; |
179 | $scope.aircraftListData.accountId = companyId; | 183 | $scope.aircraftListData.accountId = companyId; |
180 | 184 | ||
181 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { | 185 | CustomersService.addAircraft($scope.aircraftListData).then(function(result) { |
182 | if(result != null && result.success){ | 186 | if(result != null && result.success){ |
183 | toastr.success(''+result.success+'', { | 187 | toastr.success(''+result.success+'', { |
184 | closeButton: true | 188 | closeButton: true |
185 | }) | 189 | }) |
186 | $('#aircraft-modal-3').modal('hide'); | 190 | $('#aircraft-modal-3').modal('hide'); |
187 | getAircraftList(); | 191 | getAircraftList(); |
188 | }else{ | 192 | }else{ |
189 | toastr.error(''+result.statusText+'', { | 193 | toastr.error(''+result.statusText+'', { |
190 | closeButton: true | 194 | closeButton: true |
191 | }) | 195 | }) |
192 | } | 196 | } |
193 | }); | 197 | }); |
194 | 198 | ||
195 | } | 199 | } |
196 | $scope.showNoteData = true; | 200 | $scope.showNoteData = true; |
197 | $scope.showCompanyName = true; | 201 | $scope.showCompanyName = true; |
198 | $scope.showAddress = true; | 202 | $scope.showAddress = true; |
199 | $scope.showNote = function(){ | 203 | $scope.showNote = function(){ |
200 | $scope.showNoteData = false; | 204 | $scope.showNoteData = false; |
201 | } | 205 | } |
202 | 206 | ||
203 | $scope.company = function(){ | 207 | $scope.company = function(){ |
204 | $scope.showCompanyName = false; | 208 | $scope.showCompanyName = false; |
205 | } | 209 | } |
206 | 210 | ||
207 | $scope.addressChange = function(){ | 211 | $scope.addressChange = function(){ |
208 | $scope.showAddress = false; | 212 | $scope.showAddress = false; |
209 | } | 213 | } |
210 | 214 | ||
211 | $scope.editData = function(inputName) { | 215 | $scope.editData = function(inputName) { |
212 | console.log($scope.companyData) | 216 | console.log($scope.companyData) |
213 | if(inputName == 'showNoteData'){ | 217 | if(inputName == 'showNoteData'){ |
214 | $scope.showNoteData = true; | 218 | $scope.showNoteData = true; |
215 | }else if(inputName == 'showCompanyName'){ | 219 | }else if(inputName == 'showCompanyName'){ |
216 | $scope.showCompanyName = true; | 220 | $scope.showCompanyName = true; |
217 | }else if(inputName == 'showAddress'){ | 221 | }else if(inputName == 'showAddress'){ |
218 | $scope.showAddress = true; | 222 | $scope.showAddress = true; |
219 | } | 223 | } |
220 | 224 | ||
221 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin | 225 | var companyData = "companyName=" + $scope.companyData.companyName + "&masterMargin=" + $scope.companyData.masterMargin |
222 | + "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" | 226 | + "&addressOne=" + $scope.companyData.addressOne + "&addressTwo=" + $scope.companyData.addressTwo + "&city=" + $scope.companyData.city + "&state=" |
223 | + $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" | 227 | + $scope.companyData.state + "&country=" + $scope.companyData.country + "&zipcode=" + $scope.companyData.zipcode + "&internalNote=" |
224 | + $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant | 228 | + $scope.companyData.internalNote + "&certificateType=" + $scope.companyData.certificateType + "&baseTenant=" + $scope.companyData.baseTenant |
225 | + "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor | 229 | + "&fuelerlinxCustomer=" + $scope.companyData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.companyData.contractFuelVendor |
226 | + "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId; | 230 | + "&activate=" + $scope.companyData.activate + "&baseIcao=" + $scope.companyData.baseIcao + "&companyId=" + companyId; |
227 | 231 | ||
228 | ViewCompanyService.updateContact(companyData).then(function(result) { | 232 | ViewCompanyService.updateContact(companyData).then(function(result) { |
229 | if(result != null && result.success){ | 233 | if(result != null && result.success){ |
230 | toastr.success(''+result.success+'', { | 234 | toastr.success(''+result.success+'', { |
231 | closeButton: true | 235 | closeButton: true |
232 | }) | 236 | }) |
233 | }else{ | 237 | }else{ |
234 | toastr.error(''+result.statusText+'', { | 238 | toastr.error(''+result.statusText+'', { |
235 | closeButton: true | 239 | closeButton: true |
236 | }) | 240 | }) |
237 | } | 241 | } |
238 | }) | 242 | }) |
239 | 243 | ||
240 | } | 244 | } |
241 | 245 | ||
242 | $scope.sendMail = function(){ | 246 | $scope.sendMail = function(){ |
243 | ViewCompanyService.sendMail(companyId).then(function(result) { | 247 | ViewCompanyService.sendMail(companyId).then(function(result) { |
244 | if(result != null && result.success){ | 248 | if(result != null && result.success){ |
245 | toastr.success(''+result.success+'', { | 249 | toastr.success(''+result.success+'', { |
246 | closeButton: true | 250 | closeButton: true |
247 | }) | 251 | }) |
248 | $('#confirm1').css('display', 'none'); | 252 | $('#confirm1').css('display', 'none'); |
249 | }else{ | 253 | }else{ |
250 | toastr.error(''+result.statusText+'', { | 254 | toastr.error(''+result.statusText+'', { |
251 | closeButton: true | 255 | closeButton: true |
252 | }) | 256 | }) |
253 | } | 257 | } |
254 | }) | 258 | }) |
255 | } | 259 | } |
256 | 260 | ||
257 | $scope.openConfirmMail = function(){ | 261 | $scope.openConfirmMail = function(){ |
258 | $('#confirm1').css('display', 'block'); | 262 | $('#confirm1').css('display', 'block'); |
259 | } | 263 | } |
260 | 264 | ||
261 | 265 | ||
262 | $scope.cancelAndCloseConfirm = function(){ | 266 | $scope.cancelAndCloseConfirm = function(){ |
263 | $('#confirm1').css('display', 'none'); | 267 | $('#confirm1').css('display', 'none'); |
264 | } | 268 | } |
265 | 269 | ||
266 | $scope.cancelPrimaryContact = function(){ | 270 | $scope.cancelPrimaryContact = function(){ |
267 | $('#primaryContact').css('display', 'none'); | 271 | $('#primaryContact').css('display', 'none'); |
268 | } | 272 | } |
269 | 273 | ||
270 | $scope.checkPrimaryContact = function(){ | 274 | $scope.checkPrimaryContact = function(){ |
271 | if($scope.primaryContact == true){ | 275 | if($scope.primaryContact == true){ |
272 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { | 276 | ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { |
273 | console.log(result) | 277 | console.log(result) |
274 | if(result.status == 422){ | 278 | if(result.status == 422){ |
275 | $('#primaryContact').css('display', 'block'); | 279 | $('#primaryContact').css('display', 'block'); |
276 | } | 280 | } |
277 | }) | 281 | }) |
278 | } | 282 | } |
279 | } | 283 | } |
280 | 284 | ||
281 | $scope.sendPrimaryContact = function(){ | 285 | $scope.sendPrimaryContact = function(){ |
282 | $scope.primaryContact = true; | 286 | $scope.primaryContact = true; |
283 | $('#primaryContact').css('display', 'none'); | 287 | $('#primaryContact').css('display', 'none'); |
284 | if($scope.primayData.id != null || $scope.primayData.id != undefined){ | 288 | if($scope.primayData.id != null || $scope.primayData.id != undefined){ |
285 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; | 289 | var priamryContactData = "companyContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; |
286 | 290 | ||
287 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { | 291 | ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { |
288 | console.log(result) | 292 | console.log(result) |
289 | }) | 293 | }) |
290 | } | 294 | } |
291 | 295 | ||
292 | } | 296 | } |
293 | 297 | ||
294 | var contactName = ''; | 298 | var contactName = ''; |
295 | $scope.addCustom = function(value){ | 299 | $scope.addCustom = function(value){ |
296 | console.log(value) | 300 | console.log(value) |
297 | if(value != null){ | 301 | if(value != null){ |
298 | contactName = value; | 302 | contactName = value; |
299 | $('#customField').css('display', 'block'); | 303 | $('#customField').css('display', 'block'); |
300 | } | 304 | } |
301 | 305 | ||
302 | } | 306 | } |
303 | $scope.acceptCustomField = function(){ | 307 | $scope.acceptCustomField = function(){ |
304 | console.log(contactName) | 308 | console.log(contactName) |
305 | if(contactName == 'phone'){ | 309 | if(contactName == 'phone'){ |
306 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content | 310 | var customData = "companyId=" + companyId + "&contactNumber=" + $scope.custom.content |
307 | + "&title=" + $scope.custom.title; | 311 | + "&title=" + $scope.custom.title; |
308 | }else{ | 312 | }else{ |
309 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content | 313 | var customData = "companyId=" + companyId + "&email=" + $scope.custom.content |
310 | + "&title=" + $scope.custom.title; | 314 | + "&title=" + $scope.custom.title; |
311 | } | 315 | } |
312 | ViewCompanyService.addCustomField(customData).then(function(result) { | 316 | ViewCompanyService.addCustomField(customData).then(function(result) { |
313 | console.log(result) | 317 | console.log(result) |
314 | if(result != null && result.success){ | 318 | if(result != null && result.success){ |
315 | $('#customField').css('display', 'none'); | 319 | $('#customField').css('display', 'none'); |
316 | } | 320 | } |
317 | }) | 321 | }) |
318 | 322 | ||
319 | } | 323 | } |
320 | 324 | ||
321 | }]); | 325 | }]); |
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 | 53 | ||
54 | .button1 { | 54 | .button1 { |
55 | display: inline-block; | 55 | display: inline-block; |
56 | height: 35px; | 56 | height: 35px; |
57 | line-height: 35px; | 57 | line-height: 35px; |
58 | padding-right: 15px; | 58 | padding-right: 15px; |
59 | padding-left: 50px; | 59 | padding-left: 50px; |
60 | position: relative; | 60 | position: relative; |
61 | background-color:rgb(41,127,184); | 61 | background-color:rgb(41,127,184); |
62 | color:rgb(255,255,255); | 62 | color:rgb(255,255,255); |
63 | text-decoration: none; | 63 | text-decoration: none; |
64 | text-transform: uppercase; | 64 | text-transform: uppercase; |
65 | letter-spacing: 1px; | 65 | letter-spacing: 1px; |
66 | margin-bottom: 15px; | 66 | margin-bottom: 15px; |
67 | border: 0; | 67 | border: 0; |
68 | 68 | ||
69 | 69 | ||
70 | border-radius: 5px; | 70 | border-radius: 5px; |
71 | -moz-border-radius: 5px; | 71 | -moz-border-radius: 5px; |
72 | -webkit-border-radius: 5px; | 72 | -webkit-border-radius: 5px; |
73 | text-shadow:0px 1px 0px rgba(0,0,0,0.5); | 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; | 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); | 75 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); |
76 | 76 | ||
77 | -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); | 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); | 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); | 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)"; | 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); | 81 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); |
82 | } | 82 | } |
83 | 83 | ||
84 | .button1 span { | 84 | .button1 span { |
85 | position: absolute; | 85 | position: absolute; |
86 | left: 0; | 86 | left: 0; |
87 | top: 0; | 87 | top: 0; |
88 | width: 35px; | 88 | width: 35px; |
89 | background-color:rgba(0,0,0,0.5); | 89 | background-color:rgba(0,0,0,0.5); |
90 | 90 | ||
91 | -webkit-border-top-left-radius: 5px; | 91 | -webkit-border-top-left-radius: 5px; |
92 | -webkit-border-bottom-left-radius: 5px; | 92 | -webkit-border-bottom-left-radius: 5px; |
93 | -moz-border-radius-topleft: 5px; | 93 | -moz-border-radius-topleft: 5px; |
94 | -moz-border-radius-bottomleft: 5px; | 94 | -moz-border-radius-bottomleft: 5px; |
95 | border-top-left-radius: 5px; | 95 | border-top-left-radius: 5px; |
96 | border-bottom-left-radius: 5px; | 96 | border-bottom-left-radius: 5px; |
97 | border-right: 1px solid rgba(0,0,0,0.15); | 97 | border-right: 1px solid rgba(0,0,0,0.15); |
98 | } | 98 | } |
99 | 99 | ||
100 | .button1:hover span, .button1.active span { | 100 | .button1:hover span, .button1.active span { |
101 | background-color:rgb(0,102,26); | 101 | background-color:rgb(0,102,26); |
102 | border-right: 1px solid rgba(0,0,0,0.3); | 102 | border-right: 1px solid rgba(0,0,0,0.3); |
103 | } | 103 | } |
104 | 104 | ||
105 | .button1:active { | 105 | .button1:active { |
106 | margin-top: 2px; | 106 | margin-top: 2px; |
107 | margin-bottom: 13px; | 107 | margin-bottom: 13px; |
108 | 108 | ||
109 | -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); | 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); | 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); | 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)"; | 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); | 113 | filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); |
114 | } | 114 | } |
115 | 115 | ||
116 | .button1.turquoise { | 116 | .button1.turquoise { |
117 | background: #449d44; | 117 | background: #449d44; |
118 | } | 118 | } |
119 | 119 | ||
120 | </style> | 120 | </style> |
121 | <div class="col-xs-12 col-md-11"> | 121 | <div class="col-xs-12 col-md-11"> |
122 | <div class="row" style="margin-left:0px"> | 122 | <div class="row" style="margin-left:0px"> |
123 | <div class="col-md-12"> | 123 | <div class="col-md-12"> |
124 | <div class="widget"> | 124 | <div class="widget"> |
125 | <div class="widget-header"> | 125 | <div class="widget-header"> |
126 | <i class="fa fa-building-o" aria-hidden="true"></i> | 126 | <i class="fa fa-building-o" aria-hidden="true"></i> |
127 | <h3>Antioch Flight Department</h3> | 127 | <h3>Antioch Flight Department</h3> |
128 | <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> |
129 | </div> | 129 | </div> |
130 | <!-- /widget-header --> | 130 | <!-- /widget-header --> |
131 | <div class="widget-content"> | 131 | <div class="widget-content"> |
132 | <div class="row" style="margin-left:0px"> | 132 | <div class="row" style="margin-left:0px"> |
133 | <div class="col-md-6"> | 133 | <div class="col-md-6"> |
134 | <div class="widget"> | 134 | <div class="widget"> |
135 | <div class="widget-header"> | 135 | <div class="widget-header"> |
136 | <i class="fa fa-building-o" aria-hidden="true"></i> | 136 | <i class="fa fa-building-o" aria-hidden="true"></i> |
137 | <h3>Company Details</h3> | 137 | <h3>Company Details</h3> |
138 | <label>BASE ICAO</label> | 138 | <label>BASE ICAO</label> |
139 | <input type="tel" ng-model="companyData.baseIcao" style="line-height: 18px;width: 50px;padding: 0px 9px;" ng-blur="editData()"/> | 139 | <input type="tel" ng-model="companyData.baseIcao" style="line-height: 18px;width: 50px;padding: 0px 9px;" ng-blur="editData()"/> |
140 | <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 10px;"> | 140 | <div class="pull-right my-toggle-switch" ng-click="changeStatus()" style="margin-top: 10px; margin-right: 10px;"> |
141 | <div><input id="company-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="Active" data-off="Dactive"> | 141 | <div><input id="company-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="Active" data-off="Dactive"> |
142 | </div> | 142 | </div> |
143 | </div> | 143 | </div> |
144 | </div> | 144 | </div> |
145 | <div class="widget-content"> | 145 | <div class="widget-content"> |
146 | <div class="row" style="margin-left:0px;"> | 146 | <div class="row" style="margin-left:0px;"> |
147 | <div class="col-md-7" style="padding-left: 0;"> | 147 | <div class="col-md-7" style="padding-left: 0;"> |
148 | <h4 ng-show="showCompanyName"> | 148 | <h4 ng-show="showCompanyName"> |
149 | <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> | 149 | <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> |
150 | </h4> | 150 | </h4> |
151 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control" ng-blur="editData('showCompanyName')"/> | 151 | <input type="tel" ng-hide="showCompanyName" ng-model="companyData.companyName" class="form-control" ng-blur="editData('showCompanyName')"/> |
152 | </div> | 152 | </div> |
153 | <div class="col-md-5"> | 153 | <div class="col-md-5"> |
154 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType" ng-click="editData()"> | 154 | <select class="form-control" style="padding: 4px 8px;background: #ebebeb;" ng-model="companyData.certificateType" ng-click="editData()"> |
155 | <option class="optionclass" disabled selected>Certificate Type</option> | 155 | <option class="optionclass" disabled selected>Certificate Type</option> |
156 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> | 156 | <option class="optionclass" value="corporate">Part 91 (Corporate)</option> |
157 | <option class="optionclass" value="charter">Part 135 (Charter)</option> | 157 | <option class="optionclass" value="charter">Part 135 (Charter)</option> |
158 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> | 158 | <option class="optionclass" value="scheduled">Part 121 (Scheduled)</option> |
159 | <option class="optionclass" value="military">Military</option> | 159 | <option class="optionclass" value="military">Military</option> |
160 | <option class="optionclass" value="government">Government</option> | 160 | <option class="optionclass" value="government">Government</option> |
161 | </select> | 161 | </select> |
162 | </div> | 162 | </div> |
163 | </div> | 163 | </div> |
164 | <div> | 164 | <div> |
165 | <p class="new-label"> | 165 | <p class="new-label"> |
166 | <span>Master Margin Setting </span> | 166 | <span>Master Margin Setting </span> |
167 | <!-- <select class="form-control" ng-model="companyData.masterMargin" ng-options="margin.id as margin.marginName for margin in marginList"></select> --> | 167 | <!-- <select class="form-control" ng-model="companyData.masterMargin" ng-options="margin.id as margin.marginName for margin in marginList"></select> --> |
168 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-model="companyData.masterMargin" ng-click="editData()"> | 168 | <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-model="companyData.masterMargin" ng-click="editData()"> |
169 | <option ng-repeat="margin in marginList" value="{{margin.id}}">{{margin.marginName}}</option> | 169 | <option ng-repeat="margin in marginList" value="{{margin.id}}">{{margin.marginName}}</option> |
170 | </select> | 170 | </select> |
171 | <span> See Aircrart List</span> | 171 | <span> See Aircrart List</span> |
172 | <div class="clearfix"></div> | 172 | <div class="clearfix"></div> |
173 | </p> | 173 | </p> |
174 | </div> | 174 | </div> |
175 | <div class="row" style="margin-left:0px;"> | 175 | <div class="row" style="margin-left:0px;"> |
176 | <div class="col-md-5" style="padding-left: 0;"> | 176 | <div class="col-md-5" style="padding-left: 0;"> |
177 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.baseTenant"> Tenant/Base Customer | 177 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.baseTenant"> Tenant/Base Customer |
178 | </div> | 178 | </div> |
179 | <div class="col-md-5" style="padding-left: 0;"> | 179 | <div class="col-md-5" style="padding-left: 0;"> |
180 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.fuelerlinxCustomer"> FuelerLinx Customer | 180 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.fuelerlinxCustomer"> FuelerLinx Customer |
181 | </div> | 181 | </div> |
182 | </div> | 182 | </div> |
183 | <div> | 183 | <div> |
184 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.contractFuelVendor"> CAA Member | 184 | <input type="checkbox" name="" ng-click="editData()" ng-model="companyData.contractFuelVendor"> CAA Member |
185 | </div> | 185 | </div> |
186 | </br> | 186 | </br> |
187 | <div class="new-address"> | 187 | <div class="new-address"> |
188 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{companyData.addressOne}} {{companyData.addressTwo}} <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> | 188 | <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{companyData.addressOne}} {{companyData.addressTwo}} <i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> |
189 | 189 | ||
190 | <div ng-hide="showAddress"> | 190 | <div ng-hide="showAddress"> |
191 | <label>Address1</label> | 191 | <label>Address1</label> |
192 | <input type="tel" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" ng-blur="editData('showAddress')"/> | 192 | <input type="tel" ng-hide="showAddress" ng-model="companyData.addressOne" class="form-control" ng-blur="editData('showAddress')"/> |
193 | <label>Address2</label> | 193 | <label>Address2</label> |
194 | <input type="tel" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" ng-blur="editData('showAddress')"/> | 194 | <input type="tel" ng-hide="showAddress" ng-model="companyData.addressTwo" class="form-control" ng-blur="editData('showAddress')"/> |
195 | </div> | 195 | </div> |
196 | 196 | ||
197 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"><i class="fa fa-phone"></i> {{data.contactNumber}} <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | 197 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.contactNumber != null"><i class="fa fa-phone"></i> {{data.contactNumber}} <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> |
198 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"><i class="fa fa-envelope"></i> {{data.email}} <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> | 198 | <p ng-repeat="data in companyData.companyCustomContacts" ng-if="data.email != null"><i class="fa fa-envelope"></i> {{data.email}} <i class="fa fa-pencil-square-o" aria-hidden="true"></i></p> |
199 | </div> | 199 | </div> |
200 | <div class="new-add-select"> | 200 | <div class="new-add-select"> |
201 | <select class="form-control" ng-model="value" ng-click="addCustom(value)" style="background: #ebebeb;padding: 4px 8px;width: 115px;"> | 201 | <select class="form-control" ng-model="value" ng-click="addCustom(value)" style="background: #ebebeb;padding: 4px 8px;width: 115px;"> |
202 | <option disabled selected>Add Field</option> | 202 | <option disabled selected>Add Field</option> |
203 | <option value="phone" class="optionclass">Add Phone</option> | 203 | <option value="phone" class="optionclass">Add Phone</option> |
204 | <option value="email" class="optionclass">Add Email</option> | 204 | <option value="email" class="optionclass">Add Email</option> |
205 | </select> | 205 | </select> |
206 | </div> | 206 | </div> |
207 | <div> | 207 | <div> |
208 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> | 208 | <p style="margin-bottom: 0;"><b>Company Notes</b> <i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> |
209 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> | 209 | <p ng-show="showNoteData">{{companyData.internalNote}}</p> |
210 | <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> | 210 | <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> |
211 | </div> | 211 | </div> |
212 | <div class="dis"> | 212 | <div class="dis"> |
213 | <button type="button" ng-click="openConfirmMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> | 213 | <button type="button" ng-click="openConfirmMail()" class="btn btn-primary">Distribute Price to Company Contacts</button> |
214 | </div> | 214 | </div> |
215 | <div><button type="button" class="btn btn-info">Setup Fuel</button></div> | 215 | <div><button type="button" class="btn btn-info">Setup Fuel</button></div> |
216 | </div> | 216 | </div> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | <div class="col-md-6"> | 219 | <div class="col-md-6"> |
220 | <div class="widget"> | 220 | <div class="widget"> |
221 | <div class="widget-header"> | 221 | <div class="widget-header"> |
222 | <i class="fa fa-plane"></i> | 222 | <i class="fa fa-plane"></i> |
223 | <h3>Aircraft List</h3> | 223 | <h3>Aircraft List</h3> |
224 | <div class="pull-right"> | 224 | <div class="pull-right"> |
225 | <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> | 225 | <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> |
226 | </div> | 226 | </div> |
227 | </div> | 227 | </div> |
228 | <div class="widget-content" style="padding:0px"> | 228 | <div class="widget-content" style="padding:0px"> |
229 | <div class="table-responsive"> | 229 | <div class="table-responsive"> |
230 | <table class="table table-bordered table-hover table-striped"> | 230 | <table class="table table-bordered table-hover table-striped"> |
231 | <thead> | 231 | <thead> |
232 | <tr> | 232 | <tr> |
233 | <th>Tail #</th> | 233 | <th>Tail #</th> |
234 | <th>Make</th> | 234 | <th>Make</th> |
235 | <th>Model</th> | 235 | <th>Model</th> |
236 | <th>JET-A</th> | 236 | <th>JET-A</th> |
237 | <th>All in</th> | 237 | <th>All in</th> |
238 | <th>AVGAS</th> | 238 | <th>AVGAS</th> |
239 | <th>All in</th> | 239 | <th>All in</th> |
240 | <th></th> | 240 | <th></th> |
241 | </tr> | 241 | </tr> |
242 | </thead> | 242 | </thead> |
243 | <tbody> | 243 | <tbody> |
244 | <tr ng-repeat="aircraft in contactAircraftList"> | 244 | <tr ng-repeat="aircraft in contactAircraftList"> |
245 | <td>{{aircraft.tail}}</td> | 245 | <td>{{aircraft.tail}}</td> |
246 | <td>{{aircraft.make}}</td> | 246 | <td>{{aircraft.make}}</td> |
247 | <td>{{aircraft.model}}</td> | 247 | <td>{{aircraft.model}}</td> |
248 | <td> | 248 | <td> |
249 | <select class="form-control" style="height:31px;"> | 249 | <select class="form-control" style="height:31px;"> |
250 | <option>Margin1</option> | 250 | <option>Margin1</option> |
251 | <option>Margin2</option> | 251 | <option>Margin2</option> |
252 | </select> | 252 | </select> |
253 | </td> | 253 | </td> |
254 | <td style="color:#55AF8B;">$3659</td> | 254 | <td style="color:#55AF8B;">$3659</td> |
255 | <td> | 255 | <td> |
256 | <select class="form-control" style="height:31px;"> | 256 | <select class="form-control" style="height:31px;"> |
257 | <option>Margin1</option> | 257 | <option>Margin1</option> |
258 | <option>Margin2</option> | 258 | <option>Margin2</option> |
259 | </select> | 259 | </select> |
260 | </td> | 260 | </td> |
261 | <td style="color:#55AF8B;">$3659</td> | 261 | <td style="color:#55AF8B;">$3659</td> |
262 | <td></td> | 262 | <td></td> |
263 | </tr> | 263 | </tr> |
264 | </tbody> | 264 | </tbody> |
265 | </table> | 265 | </table> |
266 | </div> | 266 | </div> |
267 | </div> | 267 | </div> |
268 | </div> | 268 | </div> |
269 | </div> | 269 | </div> |
270 | </div> | 270 | </div> |
271 | <div class="row" style="margin-left:0px"> | 271 | <div class="row" style="margin-left:0px"> |
272 | <div class="col-md-6"> | 272 | <div class="col-md-6"> |
273 | <div class="widget"> | 273 | <div class="widget"> |
274 | <div class="widget-header"> | 274 | <div class="widget-header"> |
275 | <i class="fa fa-user"></i> | 275 | <i class="fa fa-user"></i> |
276 | <h3>Contact List</h3> | 276 | <h3>Contact List</h3> |
277 | <div class="pull-right"> | 277 | <div class="pull-right"> |
278 | <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> | 278 | <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> |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div class="widget-content" style="padding:0px"> | 281 | <div class="widget-content" style="padding:0px"> |
282 | <div class="table-responsive"> | 282 | <div class="table-responsive"> |
283 | <table class="table table-bordered table-hover table-striped"> | 283 | <table class="table table-bordered table-hover table-striped"> |
284 | <thead> | 284 | <thead> |
285 | <tr> | 285 | <tr> |
286 | <th>Price Email</th> | 286 | <th>Price Email</th> |
287 | <th>First Name</th> | 287 | <th>First Name</th> |
288 | <th>Last Name</th> | 288 | <th>Last Name</th> |
289 | <th>Title</th> | 289 | <th>Title</th> |
290 | </tr> | 290 | </tr> |
291 | </thead> | 291 | </thead> |
292 | <tbody> | 292 | <tbody> |
293 | <tr ng-repeat="contact in companyContactList"> | 293 | <tr ng-repeat="contact in companyContactList"> |
294 | <td class="my-toggle-switch"><input id="{{contact.id}}" checked type="checkbox" data-size="mini" data-toggle="toggle"></td> | 294 | <td class="my-toggle-switch"><input id="{{contact.id}}" checked type="checkbox" data-size="mini" data-toggle="toggle"></td> |
295 | <td> | 295 | <td> |
296 | <a href="#!/viewContact/{{contact.id}}"> | 296 | <a href="#!/viewContact/{{contact.id}}"> |
297 | {{contact.firstName}} | 297 | {{contact.firstName}} |
298 | </a> | 298 | </a> |
299 | </td> | 299 | </td> |
300 | <td>{{contact.lastName}}</td> | 300 | <td>{{contact.lastName}}</td> |
301 | <td>{{contact.title}}</td> | 301 | <td>{{contact.title}}</td> |
302 | </tr> | 302 | </tr> |
303 | </tbody> | 303 | </tbody> |
304 | </table> | 304 | </table> |
305 | </div> | 305 | </div> |
306 | </div> | 306 | </div> |
307 | </div> | 307 | </div> |
308 | </div> | 308 | </div> |
309 | <div class="col-md-6"> | 309 | <div class="col-md-6"> |
310 | <div class="widget"> | 310 | <div class="widget"> |
311 | <div class="widget-header"> | 311 | <div class="widget-header"> |
312 | <i class="fa fa-pencil"></i> | 312 | <i class="fa fa-pencil"></i> |
313 | <h3>Price Manager Reference</h3> | 313 | <h3>Price Manager Reference</h3> |
314 | </div> | 314 | </div> |
315 | <div class="widget-content"> | 315 | <div class="widget-content"> |
316 | <div class="table-responsive"> | 316 | <div class="table-responsive"> |
317 | <table class="table table-hover table-striped"> | 317 | <table class="table table-hover table-striped"> |
318 | <thead> | 318 | <thead> |
319 | <tr> | 319 | <tr> |
320 | <th>Omit</th> | 320 | <th>Omit</th> |
321 | <th>Product</th> | 321 | <th>Product</th> |
322 | <th>Cost</th> | 322 | <th>Cost</th> |
323 | <th>PAP (Margin)</th> | 323 | <th>PAP (Margin)</th> |
324 | <th>PAP (Total)</th> | 324 | <th>PAP (Total)</th> |
325 | <th style="color:#F90">Expires</th> | 325 | <th style="color:#F90">Expires</th> |
326 | </tr> | 326 | </tr> |
327 | </thead> | 327 | </thead> |
328 | <tbody> | 328 | <tbody> |
329 | <tr> | 329 | <tr> |
330 | <td><input type="checkbox"></td> | 330 | <td><input type="checkbox"></td> |
331 | <td>Jet-A Full Service</td> | 331 | <td>Jet-A Full Service</td> |
332 | <td>$2.123</td> | 332 | <td>$2.123</td> |
333 | <td>$23000</td> | 333 | <td>$23000</td> |
334 | <td style="color:#55AF8B;">$3659</td> | 334 | <td style="color:#55AF8B;">$3659</td> |
335 | <td style="color:#F90">3/15/2017</td> | 335 | <td style="color:#F90">3/15/2017</td> |
336 | </tr> | 336 | </tr> |
337 | <tr> | 337 | <tr> |
338 | <td><input type="checkbox"></td> | 338 | <td><input type="checkbox"></td> |
339 | <td>Jet-A Full Service</td> | 339 | <td>Jet-A Full Service</td> |
340 | <td>$2.123</td> | 340 | <td>$2.123</td> |
341 | <td>$23000</td> | 341 | <td>$23000</td> |
342 | <td style="color:#55AF8B;">$3659</td> | 342 | <td style="color:#55AF8B;">$3659</td> |
343 | <td style="color:#F90">3/15/2017</td> | 343 | <td style="color:#F90">3/15/2017</td> |
344 | </tr> | 344 | </tr> |
345 | <tr> | 345 | <tr> |
346 | <tr> | 346 | <tr> |
347 | <td><input type="checkbox"></td> | 347 | <td><input type="checkbox"></td> |
348 | <td>Jet-A Full Service</td> | 348 | <td>Jet-A Full Service</td> |
349 | <td>$2.123</td> | 349 | <td>$2.123</td> |
350 | <td>$23000</td> | 350 | <td>$23000</td> |
351 | <td style="color:#55AF8B;">$3659</td> | 351 | <td style="color:#55AF8B;">$3659</td> |
352 | <td style="color:#F90">3/15/2017</td> | 352 | <td style="color:#F90">3/15/2017</td> |
353 | </tr> | 353 | </tr> |
354 | <tr> | 354 | <tr> |
355 | <td><input type="checkbox"></td> | 355 | <td><input type="checkbox"></td> |
356 | <td>Jet-A Full Service</td> | 356 | <td>Jet-A Full Service</td> |
357 | <td>$2.123</td> | 357 | <td>$2.123</td> |
358 | <td>$23000</td> | 358 | <td>$23000</td> |
359 | <td style="color:#55AF8B;">$3659</td> | 359 | <td style="color:#55AF8B;">$3659</td> |
360 | <td style="color:#F90">3/15/2017</td> | 360 | <td style="color:#F90">3/15/2017</td> |
361 | </tr> | 361 | </tr> |
362 | </tbody> | 362 | </tbody> |
363 | </table> | 363 | </table> |
364 | </div> | 364 | </div> |
365 | </div> | 365 | </div> |
366 | </div> | 366 | </div> |
367 | </div> | 367 | </div> |
368 | </div> | 368 | </div> |
369 | </div> | 369 | </div> |
370 | <!-- /widget-content --> | 370 | <!-- /widget-content --> |
371 | </div> | 371 | </div> |
372 | <!-- /widget --> | 372 | <!-- /widget --> |
373 | </div> | 373 | </div> |
374 | <!-- /span6 --> | 374 | <!-- /span6 --> |
375 | </div> | 375 | </div> |
376 | <!-- /widget --> | 376 | <!-- /widget --> |
377 | </div> | 377 | </div> |
378 | <!-- /container --> | 378 | <!-- /container --> |
379 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> | 379 | <form class="modal multi-step" id="contact-modal-3" name="companyForm"> |
380 | <div class="modal-dialog modal-lg"> | 380 | <div class="modal-dialog modal-lg"> |
381 | <div class="modal-content"> | 381 | <div class="modal-content"> |
382 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> | 382 | <div class="modal-body step-1" data-step="1" style="padding: 0;"> |
383 | <div> | 383 | <div> |
384 | <div class="row" style="margin: 0;"> | 384 | <div class="row" style="margin: 0;"> |
385 | <div> | 385 | <div> |
386 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> | 386 | <div class="widget" style="margin-bottom: 0; box-shadow: none;"> |
387 | <div class="widget-header"> | 387 | <div class="widget-header"> |
388 | <i class="icon-pencil"></i> | 388 | <i class="icon-pencil"></i> |
389 | <i class="fa fa-tasks" aria-hidden="true"></i> | 389 | <i class="fa fa-tasks" aria-hidden="true"></i> |
390 | <h3>Add a New Contact</h3> | 390 | <h3>Add a New Contact</h3> |
391 | <div class="clearfix"></div> | 391 | <div class="clearfix"></div> |
392 | </div> | 392 | </div> |
393 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 393 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
394 | <div class="col-xs-12"> | 394 | <div class="col-xs-12"> |
395 | <div class="col-md-6"> | 395 | <div class="col-md-6"> |
396 | <div class="pull-left" style="width: 110px;"> | 396 | <div class="pull-left" style="width: 110px;"> |
397 | <label class="new-input-label"><b>First Name</b></label> | 397 | <label class="new-input-label"><b>First Name</b></label> |
398 | </div> | 398 | </div> |
399 | <div class="pull-left" style="margin-left: 15px;"> | 399 | <div class="pull-left" style="margin-left: 15px;"> |
400 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> | 400 | <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> |
401 | </div> | 401 | </div> |
402 | <div class="clearfix"></div> | 402 | <div class="clearfix"></div> |
403 | </div> | 403 | </div> |
404 | <div class="col-md-6"> | 404 | <div class="col-md-6"> |
405 | 405 | ||
406 | <div class="pull-left" style="width: 110px;"> | 406 | <div class="pull-left" style="width: 110px;"> |
407 | <label class="new-input-label"><b>Last Name</b></label> | 407 | <label class="new-input-label"><b>Last Name</b></label> |
408 | </div> | 408 | </div> |
409 | <div class="pull-left" style="margin-left: 15px;"> | 409 | <div class="pull-left" style="margin-left: 15px;"> |
410 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> | 410 | <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> |
411 | </div> | 411 | </div> |
412 | <div class="clearfix"></div> | 412 | <div class="clearfix"></div> |
413 | </div> | 413 | </div> |
414 | </div> | 414 | </div> |
415 | <div class="clearfix"></div><br> | 415 | <div class="clearfix"></div><br> |
416 | <div class="col-xs-12"> | 416 | <div class="col-xs-12"> |
417 | <div class="col-md-6"> | 417 | <div class="col-md-6"> |
418 | <div class="pull-left" style="width: 110px;"> | 418 | <div class="pull-left" style="width: 110px;"> |
419 | <label class="new-input-label"><b>Title</b></label> | 419 | <label class="new-input-label"><b>Title</b></label> |
420 | </div> | 420 | </div> |
421 | <div class="pull-left" style="margin-left: 15px;"> | 421 | <div class="pull-left" style="margin-left: 15px;"> |
422 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> | 422 | <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> |
423 | </div> | 423 | </div> |
424 | <div class="clearfix"></div> | 424 | <div class="clearfix"></div> |
425 | </div> | 425 | </div> |
426 | <div class="col-md-6"> | 426 | <div class="col-md-6"> |
427 | 427 | ||
428 | <div class="pull-left" style="width: 110px;"> | 428 | <div class="pull-left" style="width: 110px;"> |
429 | <label class="new-input-label"><b>Email</b></label> | 429 | <label class="new-input-label"><b>Email</b></label> |
430 | </div> | 430 | </div> |
431 | <div class="pull-left" style="margin-left: 15px;"> | 431 | <div class="pull-left" style="margin-left: 15px;"> |
432 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> | 432 | <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> |
433 | </div> | 433 | </div> |
434 | <div class="clearfix"></div> | 434 | <div class="clearfix"></div> |
435 | </div> | 435 | </div> |
436 | </div> | 436 | </div> |
437 | <div class="clearfix"></div><br> | 437 | <div class="clearfix"></div><br> |
438 | <div class="col-xs-12"> | 438 | <div class="col-xs-12"> |
439 | <div class="col-md-6"> | 439 | <div class="col-md-6"> |
440 | <div class="pull-left" style="width: 110px;"> | 440 | <div class="pull-left" style="width: 110px;"> |
441 | <label class="new-input-label"><b>Username</b></label> | 441 | <label class="new-input-label"><b>Username</b></label> |
442 | </div> | 442 | </div> |
443 | <div class="pull-left" style="margin-left: 15px;"> | 443 | <div class="pull-left" style="margin-left: 15px;"> |
444 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> | 444 | <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> |
445 | </div> | 445 | </div> |
446 | <div class="clearfix"></div> | 446 | <div class="clearfix"></div> |
447 | </div> | 447 | </div> |
448 | <div class="col-md-6"> | 448 | <div class="col-md-6"> |
449 | 449 | ||
450 | <div class="pull-left" style="width: 110px;"> | 450 | <div class="pull-left" style="width: 110px;"> |
451 | <label class="new-input-label"><b>Password</b></label> | 451 | <label class="new-input-label"><b>Password</b></label> |
452 | </div> | 452 | </div> |
453 | <div class="pull-left" style="margin-left: 15px;"> | 453 | <div class="pull-left" style="margin-left: 15px;"> |
454 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> | 454 | <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> |
455 | </div> | 455 | </div> |
456 | <div class="clearfix"></div> | 456 | <div class="clearfix"></div> |
457 | </div> | 457 | </div> |
458 | </div> | 458 | </div> |
459 | <div class="clearfix"></div><br> | 459 | <div class="clearfix"></div><br> |
460 | <div class="col-xs-12"> | 460 | <div class="col-xs-12"> |
461 | <div class="col-md-6"> | 461 | <div class="col-md-6"> |
462 | <div class="pull-left" style="width: 110px;"> | 462 | <div class="pull-left" style="width: 110px;"> |
463 | <label class="new-input-label"><b>Work Phone</b></label> | 463 | <label class="new-input-label"><b>Work Phone</b></label> |
464 | </div> | 464 | </div> |
465 | <div class="pull-left" style="margin-left: 15px;"> | 465 | <div class="pull-left" style="margin-left: 15px;"> |
466 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> | 466 | <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> |
467 | </div> | 467 | </div> |
468 | <div class="clearfix"></div> | 468 | <div class="clearfix"></div> |
469 | </div> | 469 | </div> |
470 | <div class="col-md-6"> | 470 | <div class="col-md-6"> |
471 | 471 | ||
472 | <div class="pull-left" style="width: 110px;"> | 472 | <div class="pull-left" style="width: 110px;"> |
473 | <label class="new-input-label"><b>Mobile Phone</b></label> | 473 | <label class="new-input-label"><b>Mobile Phone</b></label> |
474 | </div> | 474 | </div> |
475 | <div class="pull-left" style="margin-left: 15px;"> | 475 | <div class="pull-left" style="margin-left: 15px;"> |
476 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> | 476 | <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> |
477 | </div> | 477 | </div> |
478 | <div class="clearfix"></div> | 478 | <div class="clearfix"></div> |
479 | </div> | 479 | </div> |
480 | </div> | 480 | </div> |
481 | <div class="clearfix"></div><br> | 481 | <div class="clearfix"></div><br> |
482 | <div class="col-xs-12"> | 482 | <div class="col-xs-12"> |
483 | <div class="col-md-12"> | 483 | <div class="col-md-12"> |
484 | <div class="pull-left" style="width: 110px;"> | 484 | <div class="pull-left" style="width: 110px;"> |
485 | <label class="new-input-label"><b>Address</b></label> | 485 | <label class="new-input-label"><b>Address</b></label> |
486 | </div> | 486 | </div> |
487 | <div class="pull-right" style="width: calc(100% - 123px);"> | 487 | <div class="pull-right" style="width: calc(100% - 123px);"> |
488 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> | 488 | <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> |
489 | </div> | 489 | </div> |
490 | <div class="clearfix"></div> | 490 | <div class="clearfix"></div> |
491 | </div> | 491 | </div> |
492 | </div> | 492 | </div> |
493 | <div class="clearfix"></div> | 493 | <div class="clearfix"></div> |
494 | <br/> | 494 | <br/> |
495 | <div class="col-xs-12"> | 495 | <div class="col-xs-12"> |
496 | <div class="col-md-3"> | 496 | <div class="col-md-3"> |
497 | <div class="pull-left my-toggle-switch"> | 497 | <div class="pull-left my-toggle-switch"> |
498 | <div style="color: #ff9a01;">Price Email     | 498 | <div style="color: #ff9a01;">Price Email     |
499 | <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> | 499 | <input id="price-one2" checked type="checkbox" data-size="mini" data-width="55" data-toggle="toggle" data-on="On" data-off="Off"> |
500 | </div> | 500 | </div> |
501 | </div> | 501 | </div> |
502 | <div class="clearfix"></div> | 502 | <div class="clearfix"></div> |
503 | </div> | 503 | </div> |
504 | <div class="col-md-3"> | 504 | <div class="col-md-3"> |
505 | <div class="pull-left my-toggle-switch"> | 505 | <div class="pull-left my-toggle-switch"> |
506 | <div style="color: #ff9a01;">Primary Contact     | 506 | <div style="color: #ff9a01;">Primary Contact     |
507 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> | 507 | <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> |
508 | </div> | 508 | </div> |
509 | </div> | 509 | </div> |
510 | <div class="clearfix"></div> | 510 | <div class="clearfix"></div> |
511 | </div> | 511 | </div> |
512 | <div class="col-md-6"> | 512 | <div class="col-md-6"> |
513 | <div class="pull-left" style="width: 110px;"> | 513 | <div class="pull-left" style="width: 110px;"> |
514 | <label class="new-input-label"><b>Internal Note</b></label> | 514 | <label class="new-input-label"><b>Internal Note</b></label> |
515 | </div> | 515 | </div> |
516 | <div class="pull-left" style="width: calc(100% - 110px);"> | 516 | <div class="pull-left" style="width: calc(100% - 110px);"> |
517 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> | 517 | <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> |
518 | </div> | 518 | </div> |
519 | </div> | 519 | </div> |
520 | <div class="clearfix"></div> | 520 | <div class="clearfix"></div> |
521 | </div> | 521 | </div> |
522 | <div class="clearfix"></div><br> | 522 | <div class="clearfix"></div><br> |
523 | </div> | 523 | </div> |
524 | </div> | 524 | </div> |
525 | <div class="clearfix"></div> | 525 | <div class="clearfix"></div> |
526 | </div> | 526 | </div> |
527 | </div> | 527 | </div> |
528 | </div> | 528 | </div> |
529 | </div> | 529 | </div> |
530 | <div class="modal-footer" style="border-top: 0;"> | 530 | <div class="modal-footer" style="border-top: 0;"> |
531 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | 531 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
532 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> | 532 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> |
533 | </div> | 533 | </div> |
534 | </div> | 534 | </div> |
535 | </div> | 535 | </div> |
536 | </form> | 536 | </form> |
537 | <div class="clearfix"></div> | 537 | <div class="clearfix"></div> |
538 | 538 | ||
539 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> | 539 | <form class="modal multi-step" id="aircraft-modal-3" name="aircraftForm"> |
540 | <div class="modal-dialog modal-lg"> | 540 | <div class="modal-dialog modal-lg"> |
541 | <div class="modal-content"> | 541 | <div class="modal-content"> |
542 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> | 542 | <div class="modal-body step-2" data-step="2" style="padding: 0;"> |
543 | <div> | 543 | <div> |
544 | <div class="row" style="margin: 0;"> | 544 | <div class="row" style="margin: 0;"> |
545 | <div> | 545 | <div> |
546 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> | 546 | <div class="widget" style="margin-bottom: 0;box-shadow: none;"> |
547 | <div class="widget-header"> | 547 | <div class="widget-header"> |
548 | <i class="icon-pencil"></i> | 548 | <i class="icon-pencil"></i> |
549 | <i class="fa fa-tasks" aria-hidden="true"></i> | 549 | <i class="fa fa-tasks" aria-hidden="true"></i> |
550 | <h3>Add a New Aircraft</h3> | 550 | <h3>Add a New Aircraft</h3> |
551 | <div class="clearfix"></div> | 551 | <div class="clearfix"></div> |
552 | </div> | 552 | </div> |
553 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> | 553 | <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> |
554 | <div class="col-xs-12"> | 554 | <div class="col-xs-12"> |
555 | <div class="widget-header"> | 555 | <div class="widget-header"> |
556 | <i class="fa fa-list"></i> | 556 | <i class="fa fa-list"></i> |
557 | <h3>Aircraft List</h3> | 557 | <h3>Aircraft List</h3> |
558 | </div> | 558 | </div> |
559 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> | 559 | <div class="widget-content" style="padding:0px;border: 0px; padding: 0px !important;"> |
560 | <div class="table-responsive"> | 560 | <div class="table-responsive"> |
561 | <table class="table table-striped table-bordered"> | 561 | <table class="table table-striped table-bordered"> |
562 | <thead> | 562 | <thead> |
563 | <tr> | 563 | <tr> |
564 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> | 564 | <!-- <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /></th> --> |
565 | <th>Tail</th> | 565 | <th>Tail</th> |
566 | <th>Make</th> | 566 | <th>Make</th> |
567 | <th>Model</th> | 567 | <th>Model</th> |
568 | <th>Size</th> | 568 | <th>Size</th> |
569 | <th>Margin</th> | 569 | <th>Margin</th> |
570 | </tr> | 570 | </tr> |
571 | </thead> | 571 | </thead> |
572 | <tbody> | 572 | <tbody> |
573 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> | 573 | <tr ng-repeat="aircraftData in aircraftDetails track by $index"> |
574 | <!-- <td> | 574 | <!-- <td> |
575 | <input type="checkbox" ng-model="aircraftData.selected"/> | 575 | <input type="checkbox" ng-model="aircraftData.selected"/> |
576 | </td> --> | 576 | </td> --> |
577 | <td style="width: 20%"> | 577 | <td style="width: 20%"> |
578 | <input type="tel" class="form-control" ng-model="aircraftData.tail" required/> | 578 | <input type="tel" class="form-control" ng-model="aircraftData.tail" required/> |
579 | </td> | 579 | </td> |
580 | <td style="width: 20%"> | 580 | <td style="width: 20%"> |
581 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> | 581 | <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)"> |
582 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> | 582 | <option ng-repeat="make in aircraftMakeList">{{make}}</option> |
583 | </select> | 583 | </select> |
584 | </td> | 584 | </td> |
585 | <td style="width: 20%"> | 585 | <td style="width: 20%"> |
586 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> | 586 | <select class="form-control" ng-model="aircraftData.model" ng-change="getSize(aircraftData.model, $index)"> |
587 | <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> | 587 | <option ng-repeat="model in aircraftData.aircraftModalList">{{model}}</option> |
588 | </select> | 588 | </select> |
589 | </td> | 589 | </td> |
590 | <td style="width: 20%"> | 590 | <td style="width: 20%"> |
591 | <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> | 591 | <select class="form-control" ng-model="aircraftData.sizeId" ng-options="size.aircraftSize.id as size.aircraftSize.size for size in aircraftData.aircraftSizeList"></select> |
592 | <!-- <select class="form-control" ng-model="aircraftData.size"> | 592 | <!-- <select class="form-control" ng-model="aircraftData.size"> |
593 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> | 593 | <option ng-repeat="size in aircraftData.aircraftSizeList">{{size}}</option> |
594 | </select> --> | 594 | </select> --> |
595 | </td> | 595 | </td> |
596 | <td> | 596 | <td> |
597 | <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in marginList"></select> | 597 | <select class="form-control" ng-model="aircraftData.marginId" ng-options="margin.id as margin.marginName for margin in marginList"></select> |
598 | </td> | 598 | </td> |
599 | </tr> | 599 | </tr> |
600 | </tbody> | 600 | </tbody> |
601 | </table> | 601 | </table> |
602 | </div> | 602 | </div> |
603 | <div class="clearfix"></div> | 603 | <div class="clearfix"></div> |
604 | </div> | 604 | </div> |
605 | </div> | 605 | </div> |
606 | <div class="clearfix"></div> | 606 | <div class="clearfix"></div> |
607 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> | 607 | <div class="col-xs-12" style="margin-bottom: 50px;margin-top: 10px;"> |
608 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> | 608 | <button ng-click="addNew()" class="button1 turquoise pull-right"><span>+</span>Add Aircraft</button> |
609 | </div> | 609 | </div> |
610 | </div> | 610 | </div> |
611 | </div> | 611 | </div> |
612 | <div class="clearfix"></div> | 612 | <div class="clearfix"></div> |
613 | </div> | 613 | </div> |
614 | </div> | 614 | </div> |
615 | </div> | 615 | </div> |
616 | </div> | 616 | </div> |
617 | <div class="modal-footer" style="border-top: 0;"> | 617 | <div class="modal-footer" style="border-top: 0;"> |
618 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | 618 | <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
619 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveCompanyData()">Save</button> | 619 | <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="saveCompanyData()">Save</button> |
620 | </div> | 620 | </div> |
621 | </div> | 621 | </div> |
622 | </div> | 622 | </div> |
623 | </form> | 623 | </form> |
624 | 624 | ||
625 | <div class="customConfirmPopBackdrop" id="confirm1"> | 625 | <div class="customConfirmPopBackdrop" id="confirm1"> |
626 | <div class="customModalInner" style="max-width: 400px;"> | 626 | <div class="customModalInner" style="max-width: 400px;"> |
627 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 627 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
628 | <table> | 628 | <table> |
629 | <tr> | 629 | <tr> |
630 | <td> | 630 | <td> |
631 | <img src="img/info.png" style="width: 50px;"> | 631 | <img src="img/info.png" style="width: 50px;"> |
632 | </td> | 632 | </td> |
633 | <td> | 633 | <td> |
634 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> | 634 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> |
635 | </td> | 635 | </td> |
636 | </tr> | 636 | </tr> |
637 | </table> | 637 | </table> |
638 | </div> | 638 | </div> |
639 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 639 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
640 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> | 640 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> |
641 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> | 641 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> |
642 | </div> | 642 | </div> |
643 | </div> | 643 | </div> |
644 | </div> | 644 | </div> |
645 | 645 | ||
646 | <div class="customConfirmPopBackdrop" id="primaryContact"> | 646 | <div class="customConfirmPopBackdrop" id="primaryContact"> |
647 | <div class="customModalInner" style="max-width: 400px;"> | 647 | <div class="customModalInner" style="max-width: 400px;"> |
648 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 648 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
649 | <table> | 649 | <table> |
650 | <tr> | 650 | <tr> |
651 | <td> | 651 | <td> |
652 | <img src="img/info.png" style="width: 50px;"> | 652 | <img src="img/info.png" style="width: 50px;"> |
653 | </td> | 653 | </td> |
654 | <td> | 654 | <td> |
655 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> | 655 | <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> |
656 | </td> | 656 | </td> |
657 | </tr> | 657 | </tr> |
658 | </table> | 658 | </table> |
659 | </div> | 659 | </div> |
660 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 660 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
661 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> | 661 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact()">Yes</button> |
662 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> | 662 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> |
663 | </div> | 663 | </div> |
664 | </div> | 664 | </div> |
665 | </div> | 665 | </div> |
666 | 666 | ||
667 | <div class="customConfirmPopBackdrop" id="customField"> | 667 | <div class="customConfirmPopBackdrop" id="customField"> |
668 | <div class="customModalInner" style="max-width: 400px;"> | 668 | <div class="customModalInner" style="max-width: 400px;"> |
669 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> | 669 | <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> |
670 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> | 670 | <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> |
671 | <div class="col-md-10"> | 671 | <div class="col-md-10"> |
672 | <form> | 672 | <form> |
673 | Title:<br> | 673 | Title:<br> |
674 | <input type="text" name="firstname" ng-model="custom.title"><br> | 674 | <input type="text" name="firstname" ng-model="custom.title"><br> |
675 | Content:<br> | 675 | Content:<br> |
676 | <input type="text" name="lastname" ng-model="custom.content"> | 676 | <input type="text" name="lastname" ng-model="custom.content"> |
677 | </form> | 677 | </form> |
678 | </div> | 678 | </div> |
679 | <div class="clearfix"></div> | 679 | <div class="clearfix"></div> |
680 | </div> | 680 | </div> |
681 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> | 681 | <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> |
682 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField()">Accept</button> | 682 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField()">Accept</button> |
683 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> | 683 | <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> |
684 | </div> | 684 | </div> |
685 | </div> | 685 | </div> |
686 | </div> | 686 | </div> |
687 | 687 | ||
688 | <!-- Le javascript | 688 | <!-- Le javascript |
689 | ================================================== --> | 689 | ================================================== --> |
690 | <!-- Placed at the end of the document so the pages load faster --> | 690 | <!-- Placed at the end of the document so the pages load faster --> |
691 | <!-- <script | 691 | <!-- <script |
692 | CKEDITOR.replace( 'editor2', { | 692 | CKEDITOR.replace( 'editor2', { |
693 | height: 250, | 693 | height: 250, |
694 | extraPlugins: 'divarea' | 694 | extraPlugins: 'divarea' |
695 | } ); | 695 | } ); |
696 | </script> --> | 696 | </script> --> |
697 | 697 |
app/partials/viewcontact/viewcontact.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 | 5 | ||
6 | .controller('viewcontactController', ['$scope', '$stateParams', 'ViewcontactService', function($scope, $stateParams, ViewcontactService) { | 6 | .controller('viewcontactController', ['$scope', '$stateParams', 'ViewcontactService', function($scope, $stateParams, ViewcontactService) { |
7 | 7 | ||
8 | $(function() { | 8 | $(function() { |
9 | $('#toggle-five').bootstrapToggle(); | 9 | $('#toggle-five').bootstrapToggle(); |
10 | }) | 10 | }) |
11 | 11 | ||
12 | var contactId = $stateParams.id; | 12 | var contactId = $stateParams.id; |
13 | $scope.contactDetail = {}; | 13 | $scope.contactDetail = {}; |
14 | var value = ""; | ||
14 | ViewcontactService.getContact(contactId).then(function(result) { | 15 | ViewcontactService.getContact(contactId).then(function(result) { |
15 | $scope.contactDetail = result; | 16 | $scope.contactDetail = result; |
17 | checkValue($scope.contactDetail.priceEmail); | ||
16 | }) | 18 | }) |
17 | 19 | ||
18 | $scope.contactIdList = {}; | 20 | $scope.contactIdList = {}; |
19 | var index; | 21 | var index; |
20 | var one = 1; | 22 | var one = 1; |
21 | var selectedId; | 23 | var selectedId; |
22 | 24 | ||
23 | ViewcontactService.getContactsList(contactId).then(function(list){ | 25 | ViewcontactService.getContactsList(contactId).then(function(list){ |
24 | $scope.contactIdList = list; | 26 | $scope.contactIdList = list; |
25 | index = $scope.contactIdList.indexOf(contactId); | 27 | index = $scope.contactIdList.indexOf(contactId); |
26 | selectedId = $scope.contactIdList[index] | 28 | selectedId = $scope.contactIdList[index] |
27 | }) | 29 | }) |
28 | 30 | ||
29 | $scope.nextContact = function(){ | 31 | $scope.nextContact = function(){ |
30 | index = index + one; | 32 | index = index + one; |
31 | selectedId = $scope.contactIdList[index]; | 33 | selectedId = $scope.contactIdList[index]; |
32 | ViewcontactService.getContact(selectedId).then(function(result) { | 34 | ViewcontactService.getContact(selectedId).then(function(result) { |
33 | $scope.contactDetail = result; | 35 | $scope.contactDetail = result; |
36 | checkValue($scope.contactDetail.priceEmail); | ||
34 | }) | 37 | }) |
35 | } | 38 | } |
36 | 39 | ||
37 | $scope.prevContact = function(){ | 40 | $scope.prevContact = function(){ |
38 | index = index - one; | 41 | index = index - one; |
39 | selectedId = $scope.contactIdList[index]; | 42 | selectedId = $scope.contactIdList[index]; |
40 | ViewcontactService.getContact(selectedId).then(function(result) { | 43 | ViewcontactService.getContact(selectedId).then(function(result) { |
41 | $scope.contactDetail = result; | 44 | $scope.contactDetail = result; |
45 | checkValue($scope.contactDetail.priceEmail); | ||
42 | }) | 46 | }) |
43 | } | 47 | } |
44 | 48 | ||
49 | function checkValue(priceEmail){ | ||
50 | if(priceEmail == true){ | ||
51 | value = 'on'; | ||
52 | }else{ | ||
53 | console.log("nai") | ||
54 | value = 'off' | ||
55 | } | ||
56 | $('#toggle-five').bootstrapToggle(value) | ||
57 | } | ||
58 | |||
59 | $scope.changePriceEmail = function(){ | ||
60 | $('#toggle-five').bootstrapToggle(); | ||
61 | $('#toggle-five').change(function() { | ||
62 | $scope.activate = $(this).prop('checked'); | ||
63 | console.log($scope.activate) | ||
64 | var statusData = "status=" + $scope.activate; | ||
65 | ViewcontactService.changePriceEmail(contactId, statusData).then(function(result) { | ||
66 | if(result.success){ | ||
67 | toastr.success(''+result.success+'', { | ||
68 | closeButton: true | ||
69 | }) | ||
70 | } | ||
71 | }) | ||
72 | }) | ||
73 | } | ||
74 | |||
45 | setInterval(function(){ | 75 | setInterval(function(){ |
46 | var checkMaxLength = $scope.contactIdList.length - one; | 76 | var checkMaxLength = $scope.contactIdList.length - one; |
47 | if (index === checkMaxLength) { | 77 | if (index === checkMaxLength) { |
48 | $scope.disableNext = true; | 78 | $scope.disableNext = true; |
49 | }else{ | 79 | }else{ |
50 | $scope.disableNext = false; | 80 | $scope.disableNext = false; |
51 | } | 81 | } |
52 | if (index === 0) { | 82 | if (index === 0) { |
53 | $scope.disablePrev = true; | 83 | $scope.disablePrev = true; |
54 | }else{ | 84 | }else{ |
55 | $scope.disablePrev = false; | 85 | $scope.disablePrev = false; |
56 | } | 86 | } |
57 | }, 3); | 87 | }, 3); |
58 | 88 | ||
59 | $scope.editName = true; | 89 | $scope.editName = true; |
60 | $scope.editCompany = true; | 90 | $scope.editCompany = true; |
61 | $scope.editAddress = true; | 91 | $scope.editAddress = true; |
62 | $scope.editPhone = true; | 92 | $scope.editPhone = true; |
63 | $scope.editMobile = true; | 93 | $scope.editMobile = true; |
64 | $scope.editEmail = true; | 94 | $scope.editEmail = true; |
65 | $scope.editContactNotes = true; | 95 | $scope.editContactNotes = true; |
66 | 96 | ||
67 | $scope.nameEdit = function(){ | 97 | $scope.nameEdit = function(){ |
68 | $scope.editName = false; | 98 | $scope.editName = false; |
69 | } | 99 | } |
70 | $scope.addressEdit = function(){ | 100 | $scope.addressEdit = function(){ |
71 | $scope.editAddress = false; | 101 | $scope.editAddress = false; |
72 | } | 102 | } |
73 | $scope.phoneEdit = function(){ | 103 | $scope.phoneEdit = function(){ |
74 | $scope.editPhone = false; | 104 | $scope.editPhone = false; |
75 | } | 105 | } |
76 | $scope.mobileEdit = function(){ | 106 | $scope.mobileEdit = function(){ |
77 | $scope.editMobile = false; | 107 | $scope.editMobile = false; |
78 | } | 108 | } |
79 | $scope.emailEdit = function(){ | 109 | $scope.emailEdit = function(){ |
80 | $scope.editEmail = false; | 110 | $scope.editEmail = false; |
81 | } | 111 | } |
82 | $scope.notesEdit = function(){ | 112 | $scope.notesEdit = function(){ |
83 | $scope.editContactNotes = false; | 113 | $scope.editContactNotes = false; |
84 | } | 114 | } |
85 | 115 | ||
86 | $scope.conData = {}; | 116 | $scope.conData = {}; |
87 | $scope.contactData = {}; | 117 | $scope.contactData = {}; |
88 | $scope.contactData.contactList = []; | 118 | $scope.contactData.contactList = []; |
89 | $scope.updateContact = function(data){ | 119 | $scope.updateContact = function(data){ |
90 | $scope.editName = true; | 120 | $scope.editName = true; |
91 | $scope.editCompany = true; | 121 | $scope.editCompany = true; |
92 | $scope.editAddress = true; | 122 | $scope.editAddress = true; |
93 | $scope.editPhone = true; | 123 | $scope.editPhone = true; |
94 | $scope.editMobile = true; | 124 | $scope.editMobile = true; |
95 | $scope.editEmail = true; | 125 | $scope.editEmail = true; |
96 | $scope.editContactNotes = true; | 126 | $scope.editContactNotes = true; |
97 | 127 | ||
98 | $scope.conData.address = data.address; | 128 | $scope.conData.address = data.address; |
99 | $scope.conData.email = data.email; | 129 | $scope.conData.email = data.email; |
100 | $scope.conData.firstName = data.firstName; | 130 | $scope.conData.firstName = data.firstName; |
101 | $scope.conData.id = data.id; | 131 | $scope.conData.id = data.id; |
102 | $scope.conData.lastName = data.lastName; | 132 | $scope.conData.lastName = data.lastName; |
103 | $scope.conData.mobilePhone = data.mobilePhone; | 133 | $scope.conData.mobilePhone = data.mobilePhone; |
104 | $scope.conData.note = data.note; | 134 | $scope.conData.note = data.note; |
105 | $scope.conData.password = data.password; | 135 | $scope.conData.password = data.password; |
106 | $scope.conData.priceEmail = data.priceEmail; | 136 | $scope.conData.priceEmail = data.priceEmail; |
107 | $scope.conData.primaryContact = data.primaryContact; | 137 | $scope.conData.primaryContact = data.primaryContact; |
108 | $scope.conData.title = data.title; | 138 | $scope.conData.title = data.title; |
109 | $scope.conData.userName = data.userName; | 139 | $scope.conData.userName = data.userName; |
110 | $scope.conData.workPhone = data.workPhone; | 140 | $scope.conData.workPhone = data.workPhone; |
111 | $scope.conData.companyId = data.owner.id; | 141 | $scope.conData.companyId = data.owner.id; |
112 | 142 | ||
113 | $scope.contactData.contactList.push($scope.conData); | 143 | $scope.contactData.contactList.push($scope.conData); |
114 | $scope.contactData.contactList.push(); | 144 | $scope.contactData.contactList.push(); |
115 | ViewcontactService.updateContact($scope.contactData).then(function(result) { | 145 | ViewcontactService.updateContact($scope.contactData).then(function(result) { |
116 | if(result.success){ | 146 | if(result.success){ |
117 | toastr.success(''+result.success+'', { | 147 | toastr.success(''+result.success+'', { |
118 | closeButton: true | 148 | closeButton: true |
119 | }) | 149 | }) |
120 | }else{ | 150 | }else{ |
121 | toastr.error(''+result.statusText+'', { | 151 | toastr.error(''+result.statusText+'', { |
122 | closeButton: true | 152 | closeButton: true |
123 | }) | 153 | }) |
124 | } | 154 | } |
125 | }) | 155 | }) |
126 | } | 156 | } |
127 | 157 | ||
128 | }]); | 158 | }]); |
129 | 159 |
app/partials/viewcontact/viewcontact.html
1 | <div class="container"> | 1 | <div class="container"> |
2 | <div class="row"> | 2 | <div class="row"> |
3 | <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;"> | 3 | <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;"> |
4 | <div class="widget"> | 4 | <div class="widget"> |
5 | <div class="widget-header"> | 5 | <div class="widget-header"> |
6 | <i class="icon-pencil"></i> | 6 | <i class="icon-pencil"></i> |
7 | <i class="fa fa-building-o" aria-hidden="true"></i> | 7 | <i class="fa fa-building-o" aria-hidden="true"></i> |
8 | <h3>Antioch Flight Department</h3> | 8 | <h3>Antioch Flight Department</h3> |
9 | </div> | 9 | </div> |
10 | <div class="widget-content" style="padding-left: 0; padding-right: 0; "> | 10 | <div class="widget-content" style="padding-left: 0; padding-right: 0; "> |
11 | <div class="container"> | 11 | <div class="container"> |
12 | <div style="margin-bottom: 25px;"> | 12 | <div style="margin-bottom: 25px;"> |
13 | <button ng-disabled="disablePrev" class="newButtons" ng-click="prevContact()"> | 13 | <button ng-disabled="disablePrev" class="newButtons" ng-click="prevContact()"> |
14 | <i class="fa fa-long-arrow-left" aria-hidden="true"></i> | 14 | <i class="fa fa-long-arrow-left" aria-hidden="true"></i> |
15 | Previous Contact | 15 | Previous Contact |
16 | </button> | 16 | </button> |
17 | <button ng-disabled="disableNext" class="newButtons" ng-click="nextContact()"> | 17 | <button ng-disabled="disableNext" class="newButtons" ng-click="nextContact()"> |
18 | Next Contact | 18 | Next Contact |
19 | <i class="fa fa-long-arrow-right" aria-hidden="true"></i> | 19 | <i class="fa fa-long-arrow-right" aria-hidden="true"></i> |
20 | </button> | 20 | </button> |
21 | </div> | 21 | </div> |
22 | <div class="row"> | 22 | <div class="row"> |
23 | <div class="col-md-6" style="margin-left: 20px;"> | 23 | <div class="col-md-6" style="margin-left: 20px;"> |
24 | <div class="widget stacked"> | 24 | <div class="widget stacked"> |
25 | <div class="widget-header"> | 25 | <div class="widget-header"> |
26 | <i class="fa fa-building-o" aria-hidden="true"></i> | 26 | <i class="fa fa-building-o" aria-hidden="true"></i> |
27 | <h3>Contact Detail</h3> | 27 | <h3>Contact Detail</h3> |
28 | <div class="pull-right my-toggle-switch" style="margin-top: 10px; margin-right: 30px;"> | 28 | <div class="pull-right my-toggle-switch" ng-click="changePriceEmail()" style="margin-top: 10px; margin-right: 30px;"> |
29 | <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"> | 29 | <div> |
30 | <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"> | ||
30 | </div> | 31 | </div> |
31 | </div> | 32 | </div> |
32 | </div> | 33 | </div> |
33 | <div class="widget-content"> | 34 | <div class="widget-content"> |
34 | <div class="row" style="margin-left:0px"> | 35 | <div class="row" style="margin-left:0px"> |
35 | <div class="col-md-6" style="padding-left: 0px;"> | 36 | <div class="col-md-6" style="padding-left: 0px;"> |
36 | <h3> | 37 | <h3> |
37 | <b ng-show="editName" style="color:#F90;">{{contactDetail.firstName}} {{contactDetail.lastName}}</b> | 38 | <b ng-show="editName" style="color:#F90;">{{contactDetail.firstName}} {{contactDetail.lastName}}</b> |
38 | <input type="text" ng-hide="editName" class="form-control" ng-blur="updateContact(contactDetail)" style="width: 49%; float: left;" ng-model="contactDetail.firstName"> | 39 | <input type="text" ng-hide="editName" class="form-control" ng-blur="updateContact(contactDetail)" style="width: 49%; float: left;" ng-model="contactDetail.firstName"> |
39 | <input type="text" ng-hide="editName" class="form-control" ng-blur="updateContact(contactDetail)" style="width: 49%;" ng-model="contactDetail.lastName"> | 40 | <input type="text" ng-hide="editName" class="form-control" ng-blur="updateContact(contactDetail)" style="width: 49%;" ng-model="contactDetail.lastName"> |
40 | <i class="fa fa-pencil-square-o" ng-show="editName" ng-click="nameEdit()" style="font-size: 11px;" aria-hidden="true"></i> | 41 | <i class="fa fa-pencil-square-o" ng-show="editName" ng-click="nameEdit()" style="font-size: 11px;" aria-hidden="true"></i> |
41 | </h3> | 42 | </h3> |
42 | {{contactDetail.owner.companyName}} | 43 | {{contactDetail.owner.companyName}} |
43 | </div> | 44 | </div> |
44 | <div class="col-md-6"> | 45 | <div class="col-md-6"> |
45 | <div style="margin-bottom: 10px" class="input-group email-password"> | 46 | <div style="margin-bottom: 10px" class="input-group email-password"> |
46 | <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span> | 47 | <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span> |
47 | <input id="login-username" type="text" ng-blur="updateContact(contactDetail)" ng-model="contactDetail.userName" class="form-control email-password" placeholder="username or email"> | 48 | <input id="login-username" type="text" ng-blur="updateContact(contactDetail)" ng-model="contactDetail.userName" class="form-control email-password" placeholder="username or email"> |
48 | </div> | 49 | </div> |
49 | 50 | ||
50 | <!-- <div class="input-group email-password"> | 51 | <!-- <div class="input-group email-password"> |
51 | <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span> | 52 | <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span> |
52 | <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password"> | 53 | <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password"> |
53 | </div> --> | 54 | </div> --> |
54 | </div> | 55 | </div> |
55 | </div> | 56 | </div> |
56 | <div> | 57 | <div> |
57 | <p> | 58 | <p> |
58 | <span ng-show="editAddress"> | 59 | <span ng-show="editAddress"> |
59 | <i class="fa fa-map-marker"></i> {{contactDetail.address}} | 60 | <i class="fa fa-map-marker"></i> {{contactDetail.address}} |
60 | <i class="fa fa-pencil-square-o" ng-click="addressEdit()" style="font-size: 11px;" aria-hidden="true"></i> | 61 | <i class="fa fa-pencil-square-o" ng-click="addressEdit()" style="font-size: 11px;" aria-hidden="true"></i> |
61 | </span> | 62 | </span> |
62 | 63 | ||
63 | <input type="text" ng-hide="editAddress" class="form-control" ng-model="contactDetail.address" ng-blur="updateContact(contactDetail)"> | 64 | <input type="text" ng-hide="editAddress" class="form-control" ng-model="contactDetail.address" ng-blur="updateContact(contactDetail)"> |
64 | </p> | 65 | </p> |
65 | 66 | ||
66 | <p ng-show="editPhone"><i class="fa fa-phone"></i> {{contactDetail.mobilePhone}} <i class="fa fa-pencil-square-o" ng-click="phoneEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> | 67 | <p ng-show="editPhone"><i class="fa fa-phone"></i> {{contactDetail.mobilePhone}} <i class="fa fa-pencil-square-o" ng-click="phoneEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> |
67 | <p ng-hide="editPhone"> | 68 | <p ng-hide="editPhone"> |
68 | <input type="text" ng-model="contactDetail.mobilePhone" ng-blur="updateContact(contactDetail)" class="form-control"> | 69 | <input type="text" ng-model="contactDetail.mobilePhone" ng-blur="updateContact(contactDetail)" class="form-control"> |
69 | </p> | 70 | </p> |
70 | 71 | ||
71 | <p ng-show="editMobile"><i class="fa fa-mobile"></i> {{contactDetail.workPhone}} <i class="fa fa-pencil-square-o" ng-click="mobileEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> | 72 | <p ng-show="editMobile"><i class="fa fa-mobile"></i> {{contactDetail.workPhone}} <i class="fa fa-pencil-square-o" ng-click="mobileEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> |
72 | <p ng-hide="editMobile"> | 73 | <p ng-hide="editMobile"> |
73 | <input type="text" ng-model="contactDetail.workPhone" ng-blur="updateContact(contactDetail)" class="form-control"> | 74 | <input type="text" ng-model="contactDetail.workPhone" ng-blur="updateContact(contactDetail)" class="form-control"> |
74 | </p> | 75 | </p> |
75 | 76 | ||
76 | <p ng-show="editEmail"><i class="fa fa-envelope"></i> {{contactDetail.email}} <i class="fa fa-pencil-square-o" ng-click="emailEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> | 77 | <p ng-show="editEmail"><i class="fa fa-envelope"></i> {{contactDetail.email}} <i class="fa fa-pencil-square-o" ng-click="emailEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> |
77 | <p ng-hide="editEmail"> | 78 | <p ng-hide="editEmail"> |
78 | <input type="email" ng-model="contactDetail.email" ng-blur="updateContact(contactDetail)" class="form-control"> | 79 | <input type="email" ng-model="contactDetail.email" ng-blur="updateContact(contactDetail)" class="form-control"> |
79 | </p> | 80 | </p> |
80 | </div> | 81 | </div> |
81 | </br> | 82 | </br> |
82 | <div> | 83 | <div> |
83 | <p><b>Contact Notes</b> <i ng-show="editContactNotes" class="fa fa-pencil-square-o" ng-click="notesEdit()" style="font-size: 11px;" aria-hidden="true"></i> | 84 | <p><b>Contact Notes</b> <i ng-show="editContactNotes" class="fa fa-pencil-square-o" ng-click="notesEdit()" style="font-size: 11px;" aria-hidden="true"></i> |
84 | <p ng-show="editContactNotes">{{contactDetail.note}}</p> | 85 | <p ng-show="editContactNotes">{{contactDetail.note}}</p> |
85 | <p ng-hide="editContactNotes"> | 86 | <p ng-hide="editContactNotes"> |
86 | <input type="text" ng-model="contactDetail.note" ng-blur="updateContact(contactDetail)" class="form-control"> | 87 | <input type="text" ng-model="contactDetail.note" ng-blur="updateContact(contactDetail)" class="form-control"> |
87 | </p> | 88 | </p> |
88 | 89 | ||
89 | <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | 90 | <button type="button" class="btn btn-primary">Send Price to This Contacts</button> |
90 | </div> | 91 | </div> |
91 | <!-- <div class="col-md-6"> | 92 | <!-- <div class="col-md-6"> |
92 | <button type="button" class="btn btn-primary">Send Price to This Contacts</button> | 93 | <button type="button" class="btn btn-primary">Send Price to This Contacts</button> |
93 | </div> --> | 94 | </div> --> |
94 | </div> | 95 | </div> |
95 | </div> | 96 | </div> |
96 | </div> | 97 | </div> |
97 | </div> | 98 | </div> |
98 | </div> | 99 | </div> |
99 | </div> | 100 | </div> |
100 | </div> | 101 | </div> |
101 | </div> | 102 | </div> |
102 | </div> | 103 | </div> |
app/partials/viewcontact/viewcontact.service.js
1 | (function(){ | 1 | (function(){ |
2 | 'use strict'; | 2 | 'use strict'; |
3 | angular.module('acufuel') | 3 | angular.module('acufuel') |
4 | .service('ViewcontactService', ['$q', '$http', 'BASE_URL', ViewcontactService]); | 4 | .service('ViewcontactService', ['$q', '$http', 'BASE_URL', ViewcontactService]); |
5 | 5 | ||
6 | function ViewcontactService($q, $http, BASE_URL) { | 6 | function ViewcontactService($q, $http, BASE_URL) { |
7 | 7 | ||
8 | this.getContact = function(id) { | 8 | this.getContact = 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/contact/'+id, | 13 | url : BASE_URL.url +'/company/contact/'+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.getContactsList = function(id) { | 24 | this.getContactsList = 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/idList/'+id, | 29 | url : BASE_URL.url +'/company/contact/idList/'+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.updateContact = function(data) { | 40 | this.updateContact = function(data) { |
41 | var deferred = $q.defer(); | 41 | var deferred = $q.defer(); |
42 | $http({ | 42 | $http({ |
43 | method : 'PUT', | 43 | method : 'PUT', |
44 | url : BASE_URL.url +'/company/contact', | 44 | url : BASE_URL.url +'/company/contact', |
45 | data : data, | 45 | data : data, |
46 | headers : {'Content-Type': 'application/json'}, | 46 | headers : {'Content-Type': 'application/json'}, |
47 | }) | 47 | }) |
48 | .then(function (result){ | 48 | .then(function (result){ |
49 | deferred.resolve(result.data); | 49 | deferred.resolve(result.data); |
50 | },function (result){ | 50 | },function (result){ |
51 | deferred.resolve(result.data); | 51 | deferred.resolve(result.data); |
52 | }) | 52 | }) |
53 | return deferred.promise; | 53 | return deferred.promise; |
54 | } | 54 | } |
55 | |||
56 | this.changePriceEmail = function(contactId, data) { | ||
57 | var deferred = $q.defer(); | ||
58 | $http({ | ||
59 | method : 'PUT', | ||
60 | url : BASE_URL.url +'/company/contact/status/'+ contactId, | ||
61 | data : data, | ||
62 | headers : {'Content-Type': 'application/json'}, | ||
63 | }) | ||
64 | .then(function (result){ | ||
65 | deferred.resolve(result.data); | ||
66 | },function (result){ | ||
67 | deferred.resolve(result.data); | ||
68 | }) | ||
69 | return deferred.promise; | ||
70 | } | ||
55 | 71 | ||
56 | } | 72 | } |
57 | 73 | ||
58 | })(); | 74 | })(); |
gulpfile.js
1 | // gulp | 1 | /* jshint node:true */ |
2 | var gulp = require('gulp'); | 2 | 'use strict'; |
3 | 3 | ||
4 | // plugins | 4 | var gulp = require('gulp'); |
5 | var karma = require('karma').server; | ||
6 | var argv = require('yargs').argv; | ||
7 | var $ = require('gulp-load-plugins')(); | ||
5 | var connect = require('gulp-connect'); | 8 | var connect = require('gulp-connect'); |
9 | var jshint = require('gulp-jshint'); | ||
10 | var uglify = require('gulp-uglify'); | ||
11 | var minifyCSS = require('gulp-minify-css'); | ||
12 | var clean = require('gulp-clean'); | ||
13 | var runSequence = require('run-sequence'); | ||
6 | 14 | ||
7 | 15 | gulp.task('lint', function() { | |
16 | gulp.src(['./app/**/*.js', '!./app/bower_components/**']) | ||
17 | //.pipe(jshint()) | ||
18 | .pipe(jshint.reporter('default')) | ||
19 | //.pipe(jshint.reporter('fail')); | ||
20 | }); | ||
21 | gulp.task('clean', function() { | ||
22 | gulp.src('./dist/*') | ||
23 | .pipe(clean({force: true})); | ||
24 | }); | ||
25 | gulp.task('minify-css', function() { | ||
26 | var opts = {comments:true,spare:true,processImport: false}; | ||
27 | gulp.src(['./app/**/*.css', '!./app/bower_components/**']) | ||
28 | .pipe(minifyCSS(opts)) | ||
29 | .pipe(gulp.dest('./dist/')) | ||
30 | }); | ||
31 | gulp.task('minify-js', function() { | ||
32 | gulp.src(['./app/**/*.js', '!./app/bower_components/**']) | ||
33 | /*.pipe(uglify({ | ||
34 | // inSourceMap: | ||
35 | // outSourceMap: "app.js.map" | ||
36 | }))*/ | ||
37 | .pipe(gulp.dest('./dist/')) | ||
38 | }); | ||
39 | gulp.task('copy-images', function () { | ||
40 | gulp.src('./app/img/**') | ||
41 | .pipe(gulp.dest('dist/img')); | ||
42 | }); | ||
43 | gulp.task('copy-fonts', function () { | ||
44 | gulp.src('./app/font/**') | ||
45 | .pipe(gulp.dest('dist/font')); | ||
46 | }); | ||
47 | gulp.task('copy-bower-components', function () { | ||
48 | gulp.src('./app/bower_components/**') | ||
49 | .pipe(gulp.dest('dist/bower_components')); | ||
50 | }); | ||
51 | gulp.task('copy-html-files', function () { | ||
52 | gulp.src('./app/**/*.html') | ||
53 | .pipe(gulp.dest('dist/')); | ||
54 | }); | ||
8 | gulp.task('connect', function () { | 55 | gulp.task('connect', function () { |
9 | connect.server({ | 56 | connect.server({ |
10 | root: 'app/', | 57 | root: 'app/', |
11 | port: 8888 | 58 | port: 8888 |
12 | }); | 59 | }); |
13 | }); | 60 | }); |
61 | gulp.task('connectDist', function () { | ||
62 | connect.server({ | ||
63 | root: 'dist/', | ||
64 | port: 9999 | ||
65 | }); | ||
66 | }); | ||
67 | |||
68 | |||
69 | // default task | ||
70 | gulp.task('default', | ||
71 | ['lint', 'connect'] | ||
72 | ); | ||
73 | gulp.task('build', function() { | ||
74 | runSequence( | ||
75 | ['clean'], | ||
76 | ['lint', 'minify-css', 'minify-js', 'copy-html-files', 'copy-bower-components', 'copy-fonts', 'copy-images', 'connectDist'] | ||
77 | ); | ||
78 | }); | ||
14 | 79 |
package.json
1 | { | 1 | { |
2 | "name": "acufuel", | 2 | "name": "acufuel", |
3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
4 | "description": "", | 4 | "description": "", |
5 | "main": "index.js", | 5 | "main": "index.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "test": "echo \"Error: no test specified\" && exit 1" | 7 | "test": "echo \"Error: no test specified\" && exit 1" |
8 | }, | 8 | }, |
9 | "author": "", | 9 | "author": "", |
10 | "license": "ISC", | 10 | "license": "ISC", |
11 | "dependencies": { | 11 | "dependencies": { |
12 | "bower": "^1.8.0", | 12 | "bower": "^1.8.0", |
13 | "gulp": "^3.9.1", | 13 | "gulp": "^3.9.1", |
14 | "gulp-clean": "^0.3.2", | 14 | "gulp-clean": "^0.3.2", |
15 | "gulp-connect": "^5.0.0", | 15 | "gulp-connect": "^5.0.0", |
16 | "gulp-jshint": "^2.0.4", | 16 | "gulp-jshint": "^2.0.4", |
17 | "gulp-load-plugins": "^1.5.0", | ||
17 | "gulp-minify-css": "^1.2.4", | 18 | "gulp-minify-css": "^1.2.4", |
18 | "gulp-uglify": "^2.0.1" | 19 | "gulp-uglify": "^2.0.1", |
20 | "jshint": "^2.9.4", | ||
21 | "karma": "^1.7.0", | ||
22 | "run-sequence": "^1.2.2" | ||
19 | } | 23 | } |
20 | } | 24 | } |
21 | 25 |