Commit 98b2beef177b989f35ef0c2162f1dd6c79849785

Authored by Swarn Singh
1 parent d011f511c9
Exists in master

contact view go back bug fixed

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', '$state', 'ViewcontactService', 'ViewCompanyService', function($scope, $stateParams, $state, ViewcontactService, ViewCompanyService) { 6 .controller('viewcontactController', ['$scope', '$stateParams', '$state', 'ViewcontactService', 'ViewCompanyService', function($scope, $stateParams, $state, ViewcontactService, ViewCompanyService) {
7 $scope.showLoader = true; 7 $scope.showLoader = true;
8 $scope.showUpdateBtn = false; 8 $scope.showUpdateBtn = false;
9 var contactId = $stateParams.id; 9 var contactId = $stateParams.id;
10 $scope.contactDetail = {}; 10 $scope.contactDetail = {};
11 var contactCompanyId = ""; 11 var contactCompanyId = "";
12 ViewcontactService.getContact(contactId).then(function(result) { 12 ViewcontactService.getContact(contactId).then(function(result) {
13 $scope.contactDetail = result; 13 $scope.contactDetail = result;
14 $scope.showLoader = false; 14 $scope.showLoader = false;
15 contactCompanyId = result.owner.id; 15 contactCompanyId = result.owner.id;
16 }) 16 })
17 17
18 $scope.goBack = function(){
19 window.history.back();
20 }
21
18 $scope.contactIdList = {}; 22 $scope.contactIdList = {};
19 var index; 23 var index;
20 var one = 1; 24 var one = 1;
21 var selectedId; 25 var selectedId;
22 26
23 ViewcontactService.getContactsList(contactId).then(function(list){ 27 ViewcontactService.getContactsList(contactId).then(function(list){
24 $scope.contactIdList = list; 28 $scope.contactIdList = list;
25 index = $scope.contactIdList.indexOf(contactId); 29 index = $scope.contactIdList.indexOf(contactId);
26 selectedId = $scope.contactIdList[index]; 30 selectedId = $scope.contactIdList[index];
27 }) 31 })
28 32
29 $scope.nextContact = function(){ 33 $scope.nextContact = function(){
30 $scope.showLoader = true; 34 $scope.showLoader = true;
31 index = index + one; 35 index = index + one;
32 selectedId = $scope.contactIdList[index]; 36 selectedId = $scope.contactIdList[index];
33 ViewcontactService.getContact(selectedId).then(function(result) { 37 ViewcontactService.getContact(selectedId).then(function(result) {
34 $scope.contactDetail = result; 38 $scope.contactDetail = result;
35 $scope.showLoader = false; 39 $scope.showLoader = false;
36 }) 40 })
37 } 41 }
38 42
39 $scope.prevContact = function(){ 43 $scope.prevContact = function(){
40 $scope.showLoader = true; 44 $scope.showLoader = true;
41 index = index - one; 45 index = index - one;
42 selectedId = $scope.contactIdList[index]; 46 selectedId = $scope.contactIdList[index];
43 ViewcontactService.getContact(selectedId).then(function(result) { 47 ViewcontactService.getContact(selectedId).then(function(result) {
44 $scope.contactDetail = result; 48 $scope.contactDetail = result;
45 $scope.showLoader = false; 49 $scope.showLoader = false;
46 }) 50 })
47 } 51 }
48 52
49 $scope.changePriceEmail = function(id){ 53 $scope.changePriceEmail = function(id){
50 var statusData = "status=" + $scope.contactDetail.priceEmail; 54 var statusData = "status=" + $scope.contactDetail.priceEmail;
51 ViewcontactService.changePriceEmail(id, statusData).then(function(result) { 55 ViewcontactService.changePriceEmail(id, statusData).then(function(result) {
52 if(result.success){ 56 if(result.success){
53 $('#toogleMail').css('display', 'block'); 57 $('#toogleMail').css('display', 'block');
54 if($scope.contactDetail.priceEmail == true){ 58 if($scope.contactDetail.priceEmail == true){
55 $scope.messageText = 'You have enabled price distribution for this contact'; 59 $scope.messageText = 'You have enabled price distribution for this contact';
56 }else{ 60 }else{
57 $scope.messageText = 'You have disabled price distribution for this contact'; 61 $scope.messageText = 'You have disabled price distribution for this contact';
58 } 62 }
59 } 63 }
60 }) 64 })
61 } 65 }
62 66
63 $scope.cancelToogle = function(){ 67 $scope.cancelToogle = function(){
64 $('#toogleMail').css('display', 'none'); 68 $('#toogleMail').css('display', 'none');
65 } 69 }
66 $scope.disableNext = true; 70 $scope.disableNext = true;
67 $scope.disablePrev = true; 71 $scope.disablePrev = true;
68 setInterval(function(){ 72 setInterval(function(){
69 var checkMaxLength = $scope.contactIdList.length - one; 73 var checkMaxLength = $scope.contactIdList.length - one;
70 if (index === checkMaxLength) { 74 if (index === checkMaxLength) {
71 $scope.disableNext = true; 75 $scope.disableNext = true;
72 }else{ 76 }else{
73 $scope.disableNext = false; 77 $scope.disableNext = false;
74 } 78 }
75 if (index === 0) { 79 if (index === 0) {
76 $scope.disablePrev = true; 80 $scope.disablePrev = true;
77 }else{ 81 }else{
78 $scope.disablePrev = false; 82 $scope.disablePrev = false;
79 } 83 }
80 }, 1); 84 }, 1);
81 85
82 $scope.editName = true; 86 $scope.editName = true;
83 $scope.editCompany = true; 87 $scope.editCompany = true;
84 $scope.editAddress = true; 88 $scope.editAddress = true;
85 $scope.editPhone = true; 89 $scope.editPhone = true;
86 $scope.editMobile = true; 90 $scope.editMobile = true;
87 $scope.editEmail = true; 91 $scope.editEmail = true;
88 $scope.editContactNotes = true; 92 $scope.editContactNotes = true;
89 93
90 $scope.nameEdit = function(){ 94 $scope.nameEdit = function(){
91 $scope.editName = false; 95 $scope.editName = false;
92 $scope.showUpdateBtn = true; 96 $scope.showUpdateBtn = true;
93 } 97 }
94 $scope.addressEdit = function(){ 98 $scope.addressEdit = function(){
95 $scope.editAddress = false; 99 $scope.editAddress = false;
96 $scope.showUpdateBtn = true; 100 $scope.showUpdateBtn = true;
97 } 101 }
98 $scope.phoneEdit = function(){ 102 $scope.phoneEdit = function(){
99 $scope.editPhone = false; 103 $scope.editPhone = false;
100 $scope.showUpdateBtn = true; 104 $scope.showUpdateBtn = true;
101 } 105 }
102 $scope.mobileEdit = function(){ 106 $scope.mobileEdit = function(){
103 $scope.editMobile = false; 107 $scope.editMobile = false;
104 $scope.showUpdateBtn = true; 108 $scope.showUpdateBtn = true;
105 } 109 }
106 $scope.emailEdit = function(){ 110 $scope.emailEdit = function(){
107 $scope.editEmail = false; 111 $scope.editEmail = false;
108 $scope.showUpdateBtn = true; 112 $scope.showUpdateBtn = true;
109 } 113 }
110 $scope.notesEdit = function(){ 114 $scope.notesEdit = function(){
111 $scope.editContactNotes = false; 115 $scope.editContactNotes = false;
112 $scope.showUpdateBtn = true; 116 $scope.showUpdateBtn = true;
113 } 117 }
114 118
115 $scope.conData = {}; 119 $scope.conData = {};
116 $scope.contactData = {}; 120 $scope.contactData = {};
117 $scope.contactData.contactList = []; 121 $scope.contactData.contactList = [];
118 $scope.updateContact = function(data){ 122 $scope.updateContact = function(data){
119 $scope.showLoader = true; 123 $scope.showLoader = true;
120 $scope.editName = true; 124 $scope.editName = true;
121 $scope.editCompany = true; 125 $scope.editCompany = true;
122 $scope.editAddress = true; 126 $scope.editAddress = true;
123 $scope.editPhone = true; 127 $scope.editPhone = true;
124 $scope.editMobile = true; 128 $scope.editMobile = true;
125 $scope.editEmail = true; 129 $scope.editEmail = true;
126 $scope.editContactNotes = true; 130 $scope.editContactNotes = true;
127 131
128 $scope.conData.address = data.address; 132 $scope.conData.address = data.address;
129 $scope.conData.email = data.email; 133 $scope.conData.email = data.email;
130 $scope.conData.firstName = data.firstName; 134 $scope.conData.firstName = data.firstName;
131 $scope.conData.id = data.id; 135 $scope.conData.id = data.id;
132 $scope.conData.lastName = data.lastName; 136 $scope.conData.lastName = data.lastName;
133 $scope.conData.mobilePhone = data.mobilePhone; 137 $scope.conData.mobilePhone = data.mobilePhone;
134 $scope.conData.note = data.note; 138 $scope.conData.note = data.note;
135 $scope.conData.password = data.password; 139 $scope.conData.password = data.password;
136 $scope.conData.priceEmail = data.priceEmail; 140 $scope.conData.priceEmail = data.priceEmail;
137 $scope.conData.primaryContact = data.primaryContact; 141 $scope.conData.primaryContact = data.primaryContact;
138 $scope.conData.title = data.title; 142 $scope.conData.title = data.title;
139 $scope.conData.userName = data.userName; 143 $scope.conData.userName = data.userName;
140 $scope.conData.workPhone = data.workPhone; 144 $scope.conData.workPhone = data.workPhone;
141 $scope.conData.companyId = data.owner.id; 145 $scope.conData.companyId = data.owner.id;
142 146
143 $scope.contactData.contactList.push($scope.conData); 147 $scope.contactData.contactList.push($scope.conData);
144 $scope.contactData.contactList.push(); 148 $scope.contactData.contactList.push();
145 ViewcontactService.updateContact($scope.contactData).then(function(result) { 149 ViewcontactService.updateContact($scope.contactData).then(function(result) {
146 if(result.success){ 150 if(result.success){
147 toastr.success(''+result.success+'', { 151 toastr.success(''+result.success+'', {
148 closeButton: true 152 closeButton: true
149 }) 153 })
150 $scope.showUpdateBtn = false; 154 $scope.showUpdateBtn = false;
151 }else{ 155 }else{
152 toastr.error(''+result.statusText+'', { 156 toastr.error(''+result.statusText+'', {
153 closeButton: true 157 closeButton: true
154 }) 158 })
155 } 159 }
156 $scope.showLoader = false; 160 $scope.showLoader = false;
157 }) 161 })
158 } 162 }
159 163
160 $scope.cancelContact = function(){ 164 $scope.cancelContact = function(){
161 $scope.editName = true; 165 $scope.editName = true;
162 $scope.editCompany = true; 166 $scope.editCompany = true;
163 $scope.editAddress = true; 167 $scope.editAddress = true;
164 $scope.editPhone = true; 168 $scope.editPhone = true;
165 $scope.editMobile = true; 169 $scope.editMobile = true;
166 $scope.editEmail = true; 170 $scope.editEmail = true;
167 $scope.editContactNotes = true; 171 $scope.editContactNotes = true;
168 $scope.showUpdateBtn = false; 172 $scope.showUpdateBtn = false;
169 } 173 }
170 174
171 $scope.checkPrimaryContact = function(companyId){ 175 $scope.checkPrimaryContact = function(companyId){
172 if($scope.contactDetail.primaryContact == true){ 176 if($scope.contactDetail.primaryContact == true){
173 ViewCompanyService.checkPrimaryContact(companyId).then(function(result) { 177 ViewCompanyService.checkPrimaryContact(companyId).then(function(result) {
174 console.log(result) 178 console.log(result)
175 if(result.status == 422){ 179 if(result.status == 422){
176 $('#primaryContact').css('display', 'block'); 180 $('#primaryContact').css('display', 'block');
177 } 181 }
178 }) 182 })
179 } 183 }
180 } 184 }
181 185
182 $scope.cancelPrimaryContact = function(){ 186 $scope.cancelPrimaryContact = function(){
183 $('#primaryContact').css('display', 'none'); 187 $('#primaryContact').css('display', 'none');
184 $scope.contactDetail.primaryContact = false; 188 $scope.contactDetail.primaryContact = false;
185 console.log($scope.contactDetail.primaryContact) 189 console.log($scope.contactDetail.primaryContact)
186 } 190 }
187 191
188 $scope.sendPrimaryContact = function(id){ 192 $scope.sendPrimaryContact = function(id){
189 $('#primaryContact').css('display', 'none'); 193 $('#primaryContact').css('display', 'none');
190 var priamryContactData = "companyContactId=" + id + "&primary=" + $scope.contactDetail.primaryContact; 194 var priamryContactData = "companyContactId=" + id + "&primary=" + $scope.contactDetail.primaryContact;
191 195
192 ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) { 196 ViewCompanyService.addPrimaryContact(priamryContactData).then(function(result) {
193 console.log(result) 197 console.log(result)
194 }) 198 })
195 199
196 } 200 }
197 201
198 var deleteContact = ""; 202 var deleteContact = "";
199 $scope.deleteContact = function(id){ 203 $scope.deleteContact = function(id){
200 $('#delete2').css('display', 'block'); 204 $('#delete2').css('display', 'block');
201 deleteContact = id; 205 deleteContact = id;
202 } 206 }
203 207
204 $scope.contactDelete = function(){ 208 $scope.contactDelete = function(){
205 ViewcontactService.deleteContact(deleteContact).then(function(result) { 209 ViewcontactService.deleteContact(deleteContact).then(function(result) {
206 console.log(result) 210 console.log(result)
207 if(result.success){ 211 if(result.success){
208 deleteContact = ""; 212 deleteContact = "";
209 $('#delete2').css('display', 'none'); 213 $('#delete2').css('display', 'none');
210 toastr.success(''+result.success+'', { 214 toastr.success(''+result.success+'', {
211 closeButton: true 215 closeButton: true
212 }) 216 })
213 $state.go('app.viewCompany', {"id": contactCompanyId}); 217 $state.go('app.viewCompany', {"id": contactCompanyId});
214 } 218 }
215 219
216 }) 220 })
217 } 221 }
218 222
219 $scope.cancelDelete = function(){ 223 $scope.cancelDelete = function(){
220 $('#delete2').css('display', 'none'); 224 $('#delete2').css('display', 'none');
221 } 225 }
222 226
223 }]); 227 }]);
224 228
app/partials/viewcontact/viewcontact.html
1 <style type="text/css"> 1 <style type="text/css">
2 .toggle.btn{ 2 .toggle.btn{
3 width: 140px !important; 3 width: 140px !important;
4 } 4 }
5 </style> 5 </style>
6 6
7 <div class="myLoader" ng-show="showLoader"> 7 <div class="myLoader" ng-show="showLoader">
8 <img src="../img/hourglass.gif" width="50px;"> 8 <img src="../img/hourglass.gif" width="50px;">
9 </div> 9 </div>
10 <div class="container"> 10 <div class="container">
11 <div class="row"> 11 <div class="row">
12 <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;"> 12 <div class="col-md-10" style="padding-right: 60px; margin-bottom: 30px;">
13 <div class="widget"> 13 <div class="widget">
14 <div class="widget-header"> 14 <div class="widget-header">
15 <i class="icon-pencil"></i> 15 <i class="icon-pencil"></i>
16 <i class="fa fa-building-o" aria-hidden="true"></i> 16 <i class="fa fa-building-o" aria-hidden="true"></i>
17 <h3>Antioch Flight Department</h3> 17 <h3>Antioch Flight Department</h3>
18 <i class="fa fa-times" areia-hidden="true" ng-click="goBack()" style="float: right; margin-top: 10px; margin-right: 10px; cursor: pointer;"></i>
18 </div> 19 </div>
19 <div class="widget-content" style="padding-left: 0; padding-right: 0; "> 20 <div class="widget-content" style="padding-left: 0; padding-right: 0; ">
20 <div class="container"> 21 <div class="container">
21 <div style="margin-bottom: 25px;"> 22 <div style="margin-bottom: 25px;">
22 <button ng-disabled="disablePrev" class="newButtons" ng-click="prevContact()"> 23 <button ng-disabled="disablePrev" class="newButtons" ng-click="prevContact()">
23 <i class="fa fa-long-arrow-left" aria-hidden="true"></i> 24 <i class="fa fa-long-arrow-left" aria-hidden="true"></i>
24 Previous Contact 25 Previous Contact
25 </button> 26 </button>
26 <button ng-disabled="disableNext" class="newButtons" ng-click="nextContact()"> 27 <button ng-disabled="disableNext" class="newButtons" ng-click="nextContact()">
27 Next Contact 28 Next Contact
28 <i class="fa fa-long-arrow-right" aria-hidden="true"></i> 29 <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
29 </button> 30 </button>
30 </div> 31 </div>
31 <div class="row"> 32 <div class="row">
32 <div class="col-md-6" style="margin-left: 20px;"> 33 <div class="col-md-6" style="margin-left: 20px;">
33 <div class="widget stacked"> 34 <div class="widget stacked">
34 <div class="widget-header"> 35 <div class="widget-header">
35 <i class="fa fa-building-o" aria-hidden="true"></i> 36 <i class="fa fa-building-o" aria-hidden="true"></i>
36 <h3 style="margin-right: 0px;">Contact Detail</h3> 37 <h3 style="margin-right: 0px;">Contact Detail</h3>
37 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteContact(contactDetail.id)" style="color: white;" aria-hidden="true"></i> 38 <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteContact(contactDetail.id)" style="color: white;" aria-hidden="true"></i>
38 <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> 39 <div class="pull-right" style="margin-top: 5px; margin-right: 10px;">
39 <toggle ng-model="contactDetail.priceEmail" style="width: 140px;" ng-change="changePriceEmail(contactDetail.id)" size="customToogle" on="PRICE EMAIL ON" off="PRICE EMAIL OFF"></toggle> 40 <toggle ng-model="contactDetail.priceEmail" style="width: 140px;" ng-change="changePriceEmail(contactDetail.id)" size="customToogle" on="PRICE EMAIL ON" off="PRICE EMAIL OFF"></toggle>
40 </div> 41 </div>
41 42
42 </div> 43 </div>
43 <div class="widget-content"> 44 <div class="widget-content">
44 <div class="row" style="margin-left:0px"> 45 <div class="row" style="margin-left:0px">
45 <div class="col-md-6" style="padding-left: 0px;"> 46 <div class="col-md-6" style="padding-left: 0px;">
46 <h3> 47 <h3>
47 <b ng-show="editName" style="color:#F90;">{{contactDetail.firstName}} {{contactDetail.lastName}}</b> 48 <b ng-show="editName" style="color:#F90;">{{contactDetail.firstName}} {{contactDetail.lastName}}</b>
48 <input type="text" ng-hide="editName" class="form-control" style="width: 49%; float: left; margin-right: 1%;" ng-model="contactDetail.firstName"> 49 <input type="text" ng-hide="editName" class="form-control" style="width: 49%; float: left; margin-right: 1%;" ng-model="contactDetail.firstName">
49 <input type="text" ng-hide="editName" class="form-control" style="width: 49%;" ng-model="contactDetail.lastName"> 50 <input type="text" ng-hide="editName" class="form-control" style="width: 49%;" ng-model="contactDetail.lastName">
50 &nbsp;<i class="fa fa-pencil-square-o" ng-show="editName" ng-click="nameEdit()" style="font-size: 11px;" aria-hidden="true"></i> 51 &nbsp;<i class="fa fa-pencil-square-o" ng-show="editName" ng-click="nameEdit()" style="font-size: 11px;" aria-hidden="true"></i>
51 </h3> 52 </h3>
52 {{contactDetail.owner.companyName}} 53 {{contactDetail.owner.companyName}}
53 </div> 54 </div>
54 <div class="col-md-6"> 55 <div class="col-md-6">
55 <div style="margin-bottom: 10px" class="input-group email-password"> 56 <div style="margin-bottom: 10px" class="input-group email-password">
56 <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span> 57 <span class="input-group-addon email-password"><i class="glyphicon glyphicon-user email-password-icon"></i></span>
57 <input id="login-username" type="text" ng-model="contactDetail.userName" class="form-control email-password" placeholder="username or email"> 58 <input id="login-username" type="text" ng-model="contactDetail.userName" class="form-control email-password" placeholder="username or email">
58 </div> 59 </div>
59 60
60 <!-- <div class="input-group email-password"> 61 <!-- <div class="input-group email-password">
61 <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span> 62 <span class="input-group-addon email-password"><i class="fa fa-key" aria-hidden="true"></i></span>
62 <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password"> 63 <input id="login-password" type="password" class="form-control email-password" name="password" placeholder="password">
63 </div> --> 64 </div> -->
64 </div> 65 </div>
65 </div> 66 </div>
66 <div> 67 <div>
67 <p> 68 <p>
68 <span ng-show="editAddress"> 69 <span ng-show="editAddress">
69 <i class="fa fa-map-marker"></i> {{contactDetail.address}} &nbsp; 70 <i class="fa fa-map-marker"></i> {{contactDetail.address}} &nbsp;
70 <i class="fa fa-pencil-square-o" ng-click="addressEdit()" style="font-size: 11px;" aria-hidden="true"></i> 71 <i class="fa fa-pencil-square-o" ng-click="addressEdit()" style="font-size: 11px;" aria-hidden="true"></i>
71 </span> 72 </span>
72 73
73 <input type="text" ng-hide="editAddress" style="width: 50%;" class="form-control" ng-model="contactDetail.address"> 74 <input type="text" ng-hide="editAddress" style="width: 50%;" class="form-control" ng-model="contactDetail.address">
74 </p> 75 </p>
75 76
76 <p ng-show="editPhone"><i class="fa fa-phone"></i> {{contactDetail.mobilePhone}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="phoneEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> 77 <p ng-show="editPhone"><i class="fa fa-phone"></i> {{contactDetail.mobilePhone}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="phoneEdit()" style="font-size: 11px;" aria-hidden="true"></i></p>
77 <p ng-hide="editPhone"> 78 <p ng-hide="editPhone">
78 <input type="text" style="width: 50%;" ng-model="contactDetail.mobilePhone" class="form-control"> 79 <input type="text" style="width: 50%;" ng-model="contactDetail.mobilePhone" class="form-control">
79 </p> 80 </p>
80 81
81 <p ng-show="editMobile"><i class="fa fa-mobile"></i> {{contactDetail.workPhone}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="mobileEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> 82 <p ng-show="editMobile"><i class="fa fa-mobile"></i> {{contactDetail.workPhone}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="mobileEdit()" style="font-size: 11px;" aria-hidden="true"></i></p>
82 <p ng-hide="editMobile"> 83 <p ng-hide="editMobile">
83 <input type="text" style="width: 50%;" ng-model="contactDetail.workPhone" class="form-control"> 84 <input type="text" style="width: 50%;" ng-model="contactDetail.workPhone" class="form-control">
84 </p> 85 </p>
85 86
86 <p ng-show="editEmail"><i class="fa fa-envelope"></i> {{contactDetail.email}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="emailEdit()" style="font-size: 11px;" aria-hidden="true"></i></p> 87 <p ng-show="editEmail"><i class="fa fa-envelope"></i> {{contactDetail.email}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="emailEdit()" style="font-size: 11px;" aria-hidden="true"></i></p>
87 <p ng-hide="editEmail"> 88 <p ng-hide="editEmail">
88 <input type="email" style="width: 50%;" ng-model="contactDetail.email" class="form-control"> 89 <input type="email" style="width: 50%;" ng-model="contactDetail.email" class="form-control">
89 </p> 90 </p>
90 <div> 91 <div>
91 <input type="checkbox" ng-checked="contactDetail.primaryContact" ng-click="checkPrimaryContact(contactDetail.owner.id)" ng-model="contactDetail.primaryContact">&nbsp; 92 <input type="checkbox" ng-checked="contactDetail.primaryContact" ng-click="checkPrimaryContact(contactDetail.owner.id)" ng-model="contactDetail.primaryContact">&nbsp;
92 <span>Primary Contact </span> 93 <span>Primary Contact </span>
93 </div> 94 </div>
94 </div> 95 </div>
95 </br> 96 </br>
96 <div> 97 <div>
97 <p><b>Contact Notes</b> &nbsp;<i ng-show="editContactNotes" class="fa fa-pencil-square-o" ng-click="notesEdit()" style="font-size: 11px;" aria-hidden="true"></i> 98 <p><b>Contact Notes</b> &nbsp;<i ng-show="editContactNotes" class="fa fa-pencil-square-o" ng-click="notesEdit()" style="font-size: 11px;" aria-hidden="true"></i>
98 <p ng-show="editContactNotes">{{contactDetail.note}}</p> 99 <p ng-show="editContactNotes">{{contactDetail.note}}</p>
99 <p ng-hide="editContactNotes"> 100 <p ng-hide="editContactNotes">
100 <textarea ng-model="contactDetail.note" class="form-control" style="resize: vertical;"></textarea> 101 <textarea ng-model="contactDetail.note" class="form-control" style="resize: vertical;"></textarea>
101 </p> 102 </p>
102 103
103 <div> 104 <div>
104 <button ng-click="updateContact(contactDetail)" ng-show="showUpdateBtn" class="btn btn-success pull-left">Update Contact</button> 105 <button ng-click="updateContact(contactDetail)" ng-show="showUpdateBtn" class="btn btn-success pull-left">Update Contact</button>
105 <button ng-click="cancelContact()" style="margin-left: 5px;" ng-show="showUpdateBtn" class="btn btn-default pull-left">Cancel</button> 106 <button ng-click="cancelContact()" style="margin-left: 5px;" ng-show="showUpdateBtn" class="btn btn-default pull-left">Cancel</button>
106 <button type="button" class="btn btn-primary pull-right">Send Price to This Contacts</button> 107 <button type="button" class="btn btn-primary pull-right">Send Price to This Contacts</button>
107 <div class="clearfix"></div> 108 <div class="clearfix"></div>
108 </div> 109 </div>
109 </div> 110 </div>
110 <!-- <div class="col-md-6"> 111 <!-- <div class="col-md-6">
111 <button type="button" class="btn btn-primary">Send Price to This Contacts</button> 112 <button type="button" class="btn btn-primary">Send Price to This Contacts</button>
112 </div> --> 113 </div> -->
113 </div> 114 </div>
114 </div> 115 </div>
115 </div> 116 </div>
116 </div> 117 </div>
117 </div> 118 </div>
118 </div> 119 </div>
119 </div> 120 </div>
120 </div> 121 </div>
121 </div> 122 </div>
122 123
123 <div class="customConfirmPopBackdrop" id="primaryContact"> 124 <div class="customConfirmPopBackdrop" id="primaryContact">
124 <div class="customModalInner" style="max-width: 400px;"> 125 <div class="customModalInner" style="max-width: 400px;">
125 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 126 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
126 <table> 127 <table>
127 <tr> 128 <tr>
128 <td> 129 <td>
129 <img src="img/info.png" style="width: 50px;"> 130 <img src="img/info.png" style="width: 50px;">
130 </td> 131 </td>
131 <td> 132 <td>
132 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p> 133 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure you want to set this person as your primary contact?</p>
133 </td> 134 </td>
134 </tr> 135 </tr>
135 </table> 136 </table>
136 </div> 137 </div>
137 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 138 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
138 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact(contactDetail.id)">Yes</button> 139 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendPrimaryContact(contactDetail.id)">Yes</button>
139 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button> 140 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelPrimaryContact()">Cancel</button>
140 </div> 141 </div>
141 </div> 142 </div>
142 </div> 143 </div>
143 144
144 <div class="customConfirmPopBackdrop" id="toogleMail"> 145 <div class="customConfirmPopBackdrop" id="toogleMail">
145 <div class="customModalInner" style="max-width: 400px;"> 146 <div class="customModalInner" style="max-width: 400px;">
146 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 147 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
147 <table> 148 <table>
148 <tr> 149 <tr>
149 <!-- <td> 150 <!-- <td>
150 <img src="" style="width: 50px;"> 151 <img src="" style="width: 50px;">
151 </td> --> 152 </td> -->
152 <td> 153 <td>
153 <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> 154 <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p>
154 </td> 155 </td>
155 </tr> 156 </tr>
156 </table> 157 </table>
157 </div> 158 </div>
158 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 159 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
159 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Cancel</button> 160 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Cancel</button>
160 </div> 161 </div>
161 </div> 162 </div>
162 </div> 163 </div>
163 164
164 <div class="customConfirmPopBackdrop" id="delete2"> 165 <div class="customConfirmPopBackdrop" id="delete2">
165 <div class="customModalInner" style="max-width: 400px;"> 166 <div class="customModalInner" style="max-width: 400px;">
166 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 167 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
167 <table> 168 <table>
168 <tr> 169 <tr>
169 <td> 170 <td>
170 <img src="img/info.png" style="width: 50px;"> 171 <img src="img/info.png" style="width: 50px;">
171 </td> 172 </td>
172 <td> 173 <td>
173 <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Contact?</p> 174 <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Contact?</p>
174 </td> 175 </td>
175 </tr> 176 </tr>
176 </table> 177 </table>
177 </div> 178 </div>
178 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 179 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
179 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="contactDelete()">Accept</button> 180 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="contactDelete()">Accept</button>
180 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button> 181 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button>
181 </div> 182 </div>
182 </div> 183 </div>
183 </div> 184 </div>