Commit 1338268a39e2bd69559a8a9b5c94c808dae21b20

Authored by Eric Fernandez
Exists in master and in 1 other branch develop

Merge branch 'master' into 'master'

refactor agregar domicilio en modal

See merge request modulos-npm/foca-modal-domicilio!3
src/js/controller.js
1 angular.module('focaModalDomicilio') 1 angular.module('focaModalDomicilio')
2 .controller('focaModalDomicilioController', 2 .controller('focaModalDomicilioController',
3 [ 3 [
4 '$filter', 4 '$filter',
5 '$scope', 5 '$scope',
6 '$uibModalInstance', 6 '$uibModalInstance',
7 'idCliente', 7 'idCliente',
8 'focaModalDomicilioService', 8 'focaModalDomicilioService',
9 function($filter, $scope, $uibModalInstance, idCliente,focaModalDomicilioService) { 9 function($filter, $scope, $uibModalInstance, idCliente, focaModalDomicilioService) {
10 10
11 $scope.buscar = function() { 11 $scope.buscar = function() {
12 focaModalDomicilioService.getDomiciliosByIdCliente($scope.idCliente).then( 12 focaModalDomicilioService
13 function(res) { 13 .getDomiciliosEntregaByIdCliente($scope.idCliente)
14 .then(function(res) {
14 $scope.domicilios = res.data; 15 $scope.domicilios = res.data;
15 $scope.search(); 16 $scope.search();
16 $scope.primerBusqueda = true; 17 $scope.primerBusqueda = true;
17 } 18 }
18 ); 19 );
19 }; 20 };
20 $scope.idCliente = idCliente; 21 $scope.idCliente = idCliente;
21 $scope.buscar(); 22 $scope.buscar();
22 $scope.ingreso = false; 23 $scope.ingreso = false;
23 $scope.primerBusqueda = false; 24 $scope.primerBusqueda = false;
24 $scope.contactos = [{}]; 25 $scope.contactos = [{}];
25 // pagination 26 // pagination
26 $scope.numPerPage = 5; 27 $scope.numPerPage = 5;
27 $scope.currentPage = 1; 28 $scope.currentPage = 1;
28 $scope.filteredDomicilios = []; 29 $scope.filteredDomicilios = [];
29 $scope.currentPageDomicilios = []; 30 $scope.currentPageDomicilios = [];
30 $scope.selectedDomicilio = -1; 31 $scope.selectedDomicilio = -1;
31 32
32 //METODOS 33 //METODOS
33 $scope.search = function() { 34 $scope.search = function() {
34 $scope.filteredDomicilios = $filter('filter')( 35 $scope.filteredDomicilios = $filter('filter')(
35 $scope.domicilios, 36 $scope.domicilios,
36 {$: $scope.filters} 37 {$: $scope.filters}
37 ); 38 );
38 39
39 $scope.lastPage = Math.ceil( 40 $scope.lastPage = Math.ceil(
40 $scope.filteredDomicilios.length / $scope.numPerPage 41 $scope.filteredDomicilios.length / $scope.numPerPage
41 ); 42 );
42 43
43 $scope.resetPage(); 44 $scope.resetPage();
44 }; 45 };
45 46
46 $scope.resetPage = function() { 47 $scope.resetPage = function() {
47 $scope.currentPage = 1; 48 $scope.currentPage = 1;
48 $scope.selectPage(1); 49 $scope.selectPage(1);
49 }; 50 };
50 51
51 $scope.selectPage = function(page) { 52 $scope.selectPage = function(page) {
52 var start = (page - 1) * $scope.numPerPage; 53 var start = (page - 1) * $scope.numPerPage;
53 var end = start + $scope.numPerPage; 54 var end = start + $scope.numPerPage;
54 $scope.paginas = []; 55 $scope.paginas = [];
55 $scope.paginas = calcularPages(page); 56 $scope.paginas = calcularPages(page);
56 $scope.currentPageDomicilios = $scope.filteredDomicilios.slice(start, end); 57 $scope.currentPageDomicilios = $scope.filteredDomicilios.slice(start, end);
57 $scope.currentPage = page; 58 $scope.currentPage = page;
58 }; 59 };
59 60
60 $scope.select = function(domicilio) { 61 $scope.select = function(domicilio) {
61 $uibModalInstance.close(domicilio); 62 $uibModalInstance.close(domicilio);
62 }; 63 };
63 64
64 $scope.cancel = function() { 65 $scope.cancel = function() {
65 $uibModalInstance.dismiss('cancel'); 66 $uibModalInstance.dismiss('cancel');
66 }; 67 };
67 68
68 $scope.busquedaDown = function(key) { 69 $scope.busquedaDown = function(key) {
69 if (key === 40) { 70 if (key === 40) {
70 primera(key); 71 primera(key);
71 } 72 }
72 }; 73 };
73 74
74 $scope.busquedaPress = function(key) { 75 $scope.busquedaPress = function(key) {
75 if (key === 13) { 76 if (key === 13) {
76 primera(key); 77 primera(key);
77 } 78 }
78 }; 79 };
79 80
80 $scope.itemDomicilio = function(key) { 81 $scope.itemDomicilio = function(key) {
81 if (key === 38) { 82 if (key === 38) {
82 anterior(key); 83 anterior(key);
83 } 84 }
84 85
85 if (key === 40) { 86 if (key === 40) {
86 siguiente(key); 87 siguiente(key);
87 } 88 }
88 89
89 if (key === 37) { 90 if (key === 37) {
90 retrocederPagina(); 91 retrocederPagina();
91 } 92 }
92 93
93 if (key === 39) { 94 if (key === 39) {
94 avanzarPagina(); 95 avanzarPagina();
95 } 96 }
96 }; 97 };
97 98
98 $scope.agregarContacto = function() { 99 $scope.agregarDomicilio = function() {
99 $scope.contactos.push({item: $scope.contactos[$scope.contactos.length]}); 100 $scope.domicilio.valores = [];
100 };
101
102 $scope.quitarContacto = function(key) {
103 $scope.contactos.splice(key, 1);
104 };
105
106 $scope.agregarDomicilio= function() {
107 $scope.domicilio.idCliente = $scope.idCliente; 101 $scope.domicilio.idCliente = $scope.idCliente;
108 $scope.domicilio.idDomicilioTipo = 2; //siempre es tipo de entrega 102 if($scope.domicilio.calle) {
109 for(var i = 0; i < $scope.contactos.length; i++) { 103 $scope.domicilio.valores.push({
110 $scope.contactos[i].idCliente = idCliente; 104 ID_ADAC_1: 1,
111 focaModalDomicilioService.guardarContacto($scope.contactos[i]); 105 dato: $scope.domicilio.calle
106 });
112 } 107 }
113 focaModalDomicilioService 108 if($scope.domicilio.numeroCalle) {
114 .guardarDomicilio($scope.domicilio) 109 $scope.domicilio.valores.push({
115 .then(function() { 110 ID_ADAC_1: 2,
116 $scope.buscar(); 111 dato: $scope.domicilio.numeroCalle
117 }); 112 });
118 $scope.ingreso = false; 113 }
119 $scope.domicilio = {}; 114 if($scope.domicilio.localidad) {
120 $scope.contactos = [{}]; 115 $scope.domicilio.valores.push({
116 ID_ADAC_1: 3,
117 dato: $scope.domicilio.localidad
118 });
119 }
120 if($scope.domicilio.provincia) {
121 $scope.domicilio.valores.push({
122 ID_ADAC_1: 4,
123 dato: $scope.domicilio.provincia
124 });
125 }
126 //domicilios de entrega corresponden al 1
127 focaModalDomicilioService
128 .obtenerUltimoPorNivelPadre(1)
129 .then(function(res) {
130 $scope.domicilio.nivel1 = 1;//domicilio de entrega corresponde 1
131 $scope.domicilio.nivel2 = res.data[0].ultimo + 1;
132 focaModalDomicilioService
133 .guardarDomicilio($scope.domicilio)
134 .then(function() {
135 $scope.buscar();
136 $scope.ingreso = false;
137 $scope.domicilio = {};
138 });
139 });
121 }; 140 };
122 141
123 function calcularPages(paginaActual) { 142 function calcularPages(paginaActual) {
124 var paginas = []; 143 var paginas = [];
125 paginas.push(paginaActual); 144 paginas.push(paginaActual);
126 145
127 if (paginaActual - 1 > 1) { 146 if (paginaActual - 1 > 1) {
128 147
129 paginas.unshift(paginaActual - 1); 148 paginas.unshift(paginaActual - 1);
130 if (paginaActual - 2 > 1) { 149 if (paginaActual - 2 > 1) {
131 paginas.unshift(paginaActual - 2); 150 paginas.unshift(paginaActual - 2);
132 } 151 }
133 } 152 }
134 153
135 if (paginaActual + 1 < $scope.lastPage) { 154 if (paginaActual + 1 < $scope.lastPage) {
136 paginas.push(paginaActual + 1); 155 paginas.push(paginaActual + 1);
137 if (paginaActual + 2 < $scope.lastPage) { 156 if (paginaActual + 2 < $scope.lastPage) {
138 paginas.push(paginaActual + 2); 157 paginas.push(paginaActual + 2);
139 } 158 }
140 } 159 }
141 160
142 if (paginaActual !== 1) { 161 if (paginaActual !== 1) {
143 paginas.unshift(1); 162 paginas.unshift(1);
144 } 163 }
145 164
146 if (paginaActual !== $scope.lastPage) { 165 if (paginaActual !== $scope.lastPage) {
147 paginas.push($scope.lastPage); 166 paginas.push($scope.lastPage);
148 } 167 }
149 168
150 return paginas; 169 return paginas;
151 } 170 }
152 171
153 function primera() { 172 function primera() {
154 $scope.selectedDomicilio = 0; 173 $scope.selectedDomicilio = 0;
155 } 174 }
156 175
157 function anterior() { 176 function anterior() {
158 if ($scope.selectedDomicilio === 0 && $scope.currentPage > 1) { 177 if ($scope.selectedDomicilio === 0 && $scope.currentPage > 1) {
159 retrocederPagina(); 178 retrocederPagina();
160 } else { 179 } else {
161 $scope.selectedDomicilio--; 180 $scope.selectedDomicilio--;
162 } 181 }
163 } 182 }
164 183
165 function siguiente() { 184 function siguiente() {
166 if ($scope.selectedDomicilio < $scope.currentPageDomicilios.length ) { 185 if ($scope.selectedDomicilio < $scope.currentPageDomicilios.length ) {
167 $scope.selectedDomicilio++; 186 $scope.selectedDomicilio++;
168 } else { 187 } else {
169 avanzarPagina(); 188 avanzarPagina();
170 } 189 }
171 } 190 }
172 191
173 function retrocederPagina() { 192 function retrocederPagina() {
174 if ($scope.currentPage > 1) { 193 if ($scope.currentPage > 1) {
175 $scope.selectPage($scope.currentPage - 1); 194 $scope.selectPage($scope.currentPage - 1);
176 $scope.selectedDomicilio = $scope.numPerPage - 1; 195 $scope.selectedDomicilio = $scope.numPerPage - 1;
177 } 196 }
178 } 197 }
179 198
180 function avanzarPagina() { 199 function avanzarPagina() {
181 if ($scope.currentPage < $scope.lastPage) { 200 if ($scope.currentPage < $scope.lastPage) {
182 $scope.selectPage($scope.currentPage + 1); 201 $scope.selectPage($scope.currentPage + 1);
1 angular.module('focaModalDomicilio') 1 angular.module('focaModalDomicilio')
2 .service('focaModalDomicilioService', [ 2 .service('focaModalDomicilioService', [
3 '$http', 3 '$http',
4 'API_ENDPOINT', 4 'API_ENDPOINT',
5 function($http, API_ENDPOINT) { 5 function($http, API_ENDPOINT) {
6 return { 6 return {
7 getDomiciliosByIdCliente: function(id) { 7 getDomiciliosEntregaByIdCliente: function(id) {
8 var idTipoDom = 2;//El tipo para nota de pedido es 2 (tipo de entrega)
9 return $http.get(API_ENDPOINT.URL + 8 return $http.get(API_ENDPOINT.URL +
10 '/domicilio/tipo/' + idTipoDom + '/cliente/' + id); 9 '/domicilio/entrega/cliente/' + id);
11 }, 10 },
12 guardarDomicilio: function(domicilio) { 11 guardarDomicilio: function(domicilio) {
13 return $http.post(API_ENDPOINT.URL + '/domicilio', {domicilio: domicilio}); 12 return $http.post(API_ENDPOINT.URL + '/domicilio', {domicilio: domicilio});
14 }, 13 },
15 guardarContacto: function(contacto) { 14 guardarContacto: function(contacto) {
16 return $http.post(API_ENDPOINT.URL + '/contacto', {contacto: contacto}); 15 return $http.post(API_ENDPOINT.URL + '/contacto', {contacto: contacto});
16 },
17 obtenerUltimoPorNivelPadre: function(nivel1) {
18 return $http.get(API_ENDPOINT.URL + '/domicilio/ultimo/' + nivel1);
17 } 19 }
18 }; 20 };
19 } 21 }
20 ]); 22 ]);
src/views/modal-domicilio.html
1 <div class="modal-header"> 1 <div class="modal-header">
2 <h3 class="modal-title">Busqueda de Domicilios</h3> 2 <h3 class="modal-title">Busqueda de Domicilios</h3>
3 </div> 3 </div>
4 <div class="modal-body" id="modal-body"> 4 <div class="modal-body" id="modal-body">
5 <div class="input-group mb-3" ng-show="!ingreso"> 5 <div class="input-group mb-3" ng-show="!ingreso">
6 <input 6 <input
7 type="text" 7 type="text"
8 class="form-control" 8 class="form-control"
9 placeholder="Busqueda" 9 placeholder="Busqueda"
10 ng-model="filters" 10 ng-model="filters"
11 ng-change="search()" 11 ng-change="search()"
12 ng-keydown="busquedaDown($event.keyCode)" 12 ng-keydown="busquedaDown($event.keyCode)"
13 ng-keypress="busquedaPress($event.keyCode)" 13 ng-keypress="busquedaPress($event.keyCode)"
14 foca-focus="selectedDomicilio == -1" 14 foca-focus="selectedDomicilio == -1"
15 ng-focus="selectedDomicilio = -1" 15 ng-focus="selectedDomicilio = -1"
16 > 16 >
17 <table ng-show="!ingreso" class="table table-striped table-sm"> 17 <table ng-show="!ingreso" class="table table-striped table-sm">
18 <thead> 18 <thead>
19 <tr> 19 <tr>
20 <th>Domicilio</th> 20 <th>Titulo</th>
21 <th>Calle</th>
21 <th>Localidad</th> 22 <th>Localidad</th>
22 <th>Provincia</th> 23 <th>Provincia</th>
23 <th colspan="5" class="text-center">Contacto</th>
24 <th></th> 24 <th></th>
25 </tr> 25 </tr>
26 <tr>
27 <th></th>
28 <th></th>
29 <th></th>
30 <th>Tipo</th>
31 <th>Contacto</th>
32 </tr>
33 </thead> 26 </thead>
34 <tbody> 27 <tbody>
35 <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> 28 <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda">
36 <td colspan="6"> 29 <td colspan="5">
37 No se encontraron resultados. 30 No se encontraron resultados.
38 </td> 31 </td>
39 </tr> 32 </tr>
40 <tr> 33 <tr>
41 <td colspan="5" ng-show="!ingreso"> 34 <td colspan="4" ng-show="!ingreso">
42 <input 35 <input
43 class="form-control form-control-sm" 36 class="form-control form-control-sm"
44 type="text" 37 type="text"
45 placeholder="Selección manual" 38 placeholder="Selección manual"
46 readonly 39 readonly
47 ng-click="ingreso = !ingreso" 40 ng-click="ingreso = !ingreso"
48 /> 41 />
49 </td> 42 </td>
50 <td colspan="1" ng-show="!ingreso"> 43 <td colspan="1" ng-show="!ingreso">
51 <button 44 <button
52 type="button" 45 type="button"
53 class="btn btn-sm p-1 float-right" 46 class="btn btn-sm p-1 float-right"
54 ng-class="{ 47 ng-class="{
55 'btn-secondary': selectedDomicilio != 0, 48 'btn-secondary': selectedDomicilio != 0,
56 'btn-primary': selectedDomicilio == 0 49 'btn-primary': selectedDomicilio == 0
57 }" 50 }"
58 foca-focus="selectedDomicilio == 0" 51 foca-focus="selectedDomicilio == 0"
59 ng-keydown="itemDomicilio($event.keyCode)" 52 ng-keydown="itemDomicilio($event.keyCode)"
60 ng-click="ingreso = !ingreso" 53 ng-click="ingreso = !ingreso"
61 > 54 >
62 <i class="fa fa-arrow-right" aria-hidden="true"></i> 55 <i class="fa fa-arrow-right" aria-hidden="true"></i>
63 </button> 56 </button>
64 </td> 57 </td>
65 </tr> 58 </tr>
66 <tr class="selectable" 59 <tr class="selectable"
67 ng-repeat="(key,domicilio) in currentPageDomicilios" 60 ng-repeat="(key,domicilio) in currentPageDomicilios"
68 ng-click="select(domicilio)"> 61 ng-click="select(domicilio)">
69 <td ng-bind="domicilio.dom"></td> 62 <td ng-bind="domicilio.titulo"></td>
70 <td ng-bind="domicilio.loc"></td> 63 <td ng-bind="domicilio.Calle + ' ' + domicilio.Numero"></td>
71 <td ng-bind="domicilio.pci"></td> 64 <td ng-bind="domicilio.Localidad"></td>
72 <td ng-bind="domicilio.contacto[0].tipo"></td> 65 <td ng-bind="domicilio.Provincia"></td>
73 <td ng-bind="domicilio.contacto[0].contacto"></td>
74 <td> 66 <td>
75 <button 67 <button
76 type="button" 68 type="button"
77 class="btn p-2 float-right" 69 class="btn p-2 float-right"
78 ng-class="{ 70 ng-class="{
79 'btn-secondary': selectedDomicilio != key + 1, 71 'btn-secondary': selectedDomicilio != key + 1,
80 'btn-primary': selectedDomicilio == key + 1 72 'btn-primary': selectedDomicilio == key + 1
81 }" 73 }"
82 foca-focus="selectedDomicilio == {{key + 1}}" 74 foca-focus="selectedDomicilio == {{key + 1}}"
83 ng-keydown="itemDomicilio($event.keyCode)" 75 ng-keydown="itemDomicilio($event.keyCode)"
84 > 76 >
85 <i class="fa fa-arrow-right" aria-hidden="true"></i> 77 <i class="fa fa-arrow-right" aria-hidden="true"></i>
86 </button> 78 </button>
87 </td> 79 </td>
88 </tr> 80 </tr>
89 </tbody> 81 </tbody>
90 </table> 82 </table>
91 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso"> 83 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso">
92 <ul class="pagination justify-content-end"> 84 <ul class="pagination justify-content-end">
93 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 85 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
94 <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)"> 86 <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)">
95 <span aria-hidden="true">&laquo;</span> 87 <span aria-hidden="true">&laquo;</span>
96 <span class="sr-only">Anterior</span> 88 <span class="sr-only">Anterior</span>
97 </a> 89 </a>
98 </li> 90 </li>
99 <li 91 <li
100 class="page-item" 92 class="page-item"
101 ng-repeat="pagina in paginas" 93 ng-repeat="pagina in paginas"
102 ng-class="{'active': pagina == currentPage}" 94 ng-class="{'active': pagina == currentPage}"
103 > 95 >
104 <a 96 <a
105 class="page-link" 97 class="page-link"
106 href="#" 98 href="#"
107 ng-click="selectPage(pagina)" 99 ng-click="selectPage(pagina)"
108 ng-bind="pagina" 100 ng-bind="pagina"
109 ></a> 101 ></a>
110 </li> 102 </li>
111 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 103 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
112 <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)"> 104 <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)">
113 <span aria-hidden="true">&raquo;</span> 105 <span aria-hidden="true">&raquo;</span>
114 <span class="sr-only">Siguiente</span> 106 <span class="sr-only">Siguiente</span>
115 </a> 107 </a>
116 </li> 108 </li>
117 </ul> 109 </ul>
118 </nav> 110 </nav>
119 </div> 111 </div>
120 <form name="formDomicilio" ng-show="ingreso"> 112 <form name="formDomicilio" ng-show="ingreso">
121 <div class="row"> 113 <div class="row">
122 <div class="col-4"> 114 <div class="col-4">
123 <label>Tipo</label> 115 <label>Tipo</label>
124 <select 116 <select
125 class="form-control" 117 class="form-control"
126 ng-disabled="true" 118 ng-disabled="true"
127 > 119 >
128 <option ng-value="2">Entrega</option> 120 <option ng-value="2">Entrega</option>
129 </select> 121 </select>
130 </div> 122 </div>
131 <div class="col-4"> 123 <div class="col-8">
132 <label>Código Postal</label> 124 <label>Titulo</label>
133 <input 125 <input
134 type="text" 126 type="text"
135 foca-focus="ingreso" 127 foca-focus="ingreso"
136 class="form-control" 128 class="form-control"
137 ng-model="domicilio.cpo" 129 ng-model="domicilio.titulo"
130 placeholder="Ingrese título"
131 ng-required="true"
132 />
133 </div>
134 <div class="col-9">
135 <label>Calle</label>
136 <input
137 type="text"
138 class="form-control"
139 ng-model="domicilio.calle"
140 placeholder="Ingrese calle"
138 ng-required="true" 141 ng-required="true"
139 placeholder="Ingrese código postal"
140 /> 142 />
141 </div> 143 </div>
142 <div class="col-12"> 144 <div class="col-3">
143 <label>Domicilio</label> 145 <label>Nº</label>
144 <input 146 <input
145 type="text" 147 type="text"
146 class="form-control" 148 class="form-control"
147 ng-model="domicilio.dom" 149 ng-model="domicilio.numeroCalle"
150 placeholder="Ingrese Numero"
148 ng-required="true" 151 ng-required="true"
149 placeholder="Ingrese domicilio"
150 /> 152 />
151 </div> 153 </div>
152 <div class="col-6"> 154 <div class="col-6">
153 <label>Localidad</label> 155 <label>Localidad</label>
154 <input 156 <input
155 type="text" 157 type="text"
156 class="form-control" 158 class="form-control"
157 ng-model="domicilio.loc" 159 ng-model="domicilio.localidad"
158 ng-required="true"
159 placeholder="Ingrese localidad" 160 placeholder="Ingrese localidad"
161 ng-required="true"
160 /> 162 />
161 </div> 163 </div>
162 <div class="col-6"> 164 <div class="col-6">
163 <label>Provincia</label> 165 <label>Provincia</label>
164 <input 166 <input
165 type="text" 167 type="text"
166 class="form-control" 168 class="form-control"
167 ng-model="domicilio.pci" 169 ng-model="domicilio.provincia"
168 ng-required="true"
169 placeholder="Ingrese provincia" 170 placeholder="Ingrese provincia"
171 ng-required="true"
170 /> 172 />
171 </div> 173 </div>
172 <label class="col-12">Ingrese Contactos</label>
173 <div class="col-12 form-row mb-1" ng-repeat="(key, contacto) in contactos">
174 <div class="col-3">
175 <select class="form-control" ng-model="contacto.tipo" ng-required="true">
176 <option ng-value="0">Teléfono Móvil</option>
177 <option ng-value="1">Teléfono Fijo</option>
178 <option ng-value="2">Fax</option>
179 <option ng-value="3">Email</option>
180 </select>
181 </div>
182 <div class="col-7">
183 <input
184 type="text"
185 class="form-control"
186 ng-model="contacto.contacto"
187 placeholder="Ingrese contacto"
188 ng-required="true"
189 >
190 </div>
191 <div class="col-1">
192 <button
193 type="button"
194 class="form-control"
195 ng-click="quitarContacto(key)"
196 ng-disabled="contactos.length === 1"
197 ><i class="fa fa-minus" aria-hidden="true"></i>
198 </button>
199 </div>
200 <div class="col-1">
201 <button
202 type="button"
203 class="form-control"
204 ng-click="agregarContacto()"
205 ><i class="fa fa-plus" aria-hidden="true"></i>
206 </button>
207 </div>
208 </div>
209 </div> 174 </div>
210 </form> 175 </form>
211 </div> 176 </div>
212 <div class="modal-footer"> 177 <div class="modal-footer">
213 <button 178 <button
214 ng-show="!ingreso" 179 ng-show="!ingreso"
215 class="btn btn-secondary" 180 class="btn btn-secondary"
216 type="button" 181 type="button"
217 ng-click="cancel()" 182 ng-click="cancel()"
218 >Seleccionar otro cliente 183 >Seleccionar otro cliente
219 </button> 184 </button>
220 <button 185 <button
221 ng-show="ingreso" 186 ng-show="ingreso"