Commit fa8b4f308fed4b1678a496c3887213963b25e415
1 parent
8c22a9c2e2
Exists in
master
Apariencia botones " Buscar - Localizar "
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/views/modal-domicilio.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <div class="row w-100"> | 2 | <div class="row w-100"> |
3 | <div class="col-lg-6"> | 3 | <div class="col-lg-6"> |
4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> | 4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> |
5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> | 5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> |
6 | </div> | 6 | </div> |
7 | <div class="input-group col-lg-6 pr-0 my-2"> | 7 | <div class="input-group col-lg-6 pr-0 my-2"> |
8 | <button | 8 | <button |
9 | class="btn btn-outline-debo mr-2" | 9 | class="btn btn-outline-debo mr-2" |
10 | ng-click="ingreso = true" | 10 | ng-click="ingreso = true" |
11 | ng-show="!ingreso" | 11 | ng-show="!ingreso" |
12 | title="Nuevo"> | 12 | title="Nuevo"> |
13 | <i class="fa fa-plus" aria-hidden="true"></i> | 13 | <i class="fa fa-plus" aria-hidden="true"></i> |
14 | </button> | 14 | </button> |
15 | <input | 15 | <input |
16 | type="text" | 16 | type="text" |
17 | class="form-control form-control-sm" | 17 | class="form-control form-control-sm" |
18 | id="search" | 18 | id="search" |
19 | placeholder="Búsqueda" | 19 | placeholder="Búsqueda" |
20 | ng-model="filters" | 20 | ng-model="filters" |
21 | ng-change="search()" | 21 | ng-change="search()" |
22 | ng-keydown="busquedaDown($event.keyCode)" | 22 | ng-keydown="busquedaDown($event.keyCode)" |
23 | ng-keypress="busquedaPress($event.keyCode)" | 23 | ng-keypress="busquedaPress($event.keyCode)" |
24 | foca-focus="selectedDomicilio == -1" | 24 | foca-focus="selectedDomicilio == -1" |
25 | ng-focus="selectedDomicilio = -1" | 25 | ng-focus="selectedDomicilio = -1" |
26 | teclado-virtual | 26 | teclado-virtual |
27 | > | 27 | > |
28 | <div class="input-group-append"> | 28 | <div class="input-group-append"> |
29 | <button | 29 | <button |
30 | ladda="searchLoading" | 30 | ladda="searchLoading" |
31 | class="btn btn-outline-secondary" | 31 | class="btn btn-outline-secondary" |
32 | type="button" | 32 | type="button" |
33 | ng-click="busquedaPress(13)" | 33 | ng-click="busquedaPress(13)" |
34 | > | 34 | > |
35 | <i class="fa fa-search" aria-hidden="true"></i> | 35 | <i class="fa fa-search" aria-hidden="true"></i> |
36 | </button> | 36 | </button> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
41 | <div class="modal-body" id="modal-body"> | 41 | <div class="modal-body" id="modal-body"> |
42 | 42 | ||
43 | <div ng-show="!primerBusqueda"> | 43 | <div ng-show="!primerBusqueda"> |
44 | Debe realizar una primer búsqueda. | 44 | Debe realizar una primer búsqueda. |
45 | </div> | 45 | </div> |
46 | 46 | ||
47 | <div ng-show="!ingreso"> | 47 | <div ng-show="!ingreso"> |
48 | <table ng-show="!ingreso" class="table table-striped table-sm"> | 48 | <table ng-show="!ingreso" class="table table-striped table-sm"> |
49 | <thead> | 49 | <thead> |
50 | <tr> | 50 | <tr> |
51 | <th>Titulo</th> | 51 | <th>Titulo</th> |
52 | <th>Calle</th> | 52 | <th>Calle</th> |
53 | <th>Localidad</th> | 53 | <th>Localidad</th> |
54 | <th>Provincia</th> | 54 | <th>Provincia</th> |
55 | <th></th> | 55 | <th></th> |
56 | <th></th> | 56 | <th></th> |
57 | </tr> | 57 | </tr> |
58 | </thead> | 58 | </thead> |
59 | <tbody> | 59 | <tbody> |
60 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> | 60 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> |
61 | <td colspan="5"> | 61 | <td colspan="5"> |
62 | No se encontraron resultados. | 62 | No se encontraron resultados. |
63 | </td> | 63 | </td> |
64 | </tr> | 64 | </tr> |
65 | <tr class="selectable" | 65 | <tr class="selectable" |
66 | ng-repeat="(key,domicilio) in currentPageDomicilios"> | 66 | ng-repeat="(key,domicilio) in currentPageDomicilios"> |
67 | <td | 67 | <td |
68 | ng-bind="domicilio.titulo" | 68 | ng-bind="domicilio.titulo" |
69 | ng-click="select(domicilio)" | 69 | ng-click="select(domicilio)" |
70 | ></td> | 70 | ></td> |
71 | <td | 71 | <td |
72 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" | 72 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" |
73 | ng-click="select(domicilio)" | 73 | ng-click="select(domicilio)" |
74 | ></td> | 74 | ></td> |
75 | <td | 75 | <td |
76 | ng-bind="domicilio.Localidad" | 76 | ng-bind="domicilio.Localidad" |
77 | ng-click="select(domicilio)" | 77 | ng-click="select(domicilio)" |
78 | ></td> | 78 | ></td> |
79 | <td | 79 | <td |
80 | ng-bind="domicilio.Provincia" | 80 | ng-bind="domicilio.Provincia" |
81 | ng-click="select(domicilio)" | 81 | ng-click="select(domicilio)" |
82 | ></td> | 82 | ></td> |
83 | <td> | 83 | <td> |
84 | <button | 84 | <button |
85 | type="button" | 85 | type="button" |
86 | class="btn btn-sm p-1 float-right btn-secondary" | 86 | class="btn btn-sm p-1 float-right btn-secondary" |
87 | ng-click="verPuntosDescarga(key)" | 87 | ng-click="verPuntosDescarga(key)" |
88 | title="Puntos de descarga" | 88 | title="Puntos de descarga" |
89 | > | 89 | > |
90 | <small>PD</small> | 90 | <small>PD</small> |
91 | </button> | 91 | </button> |
92 | </td> | 92 | </td> |
93 | <td> | 93 | <td> |
94 | <button | 94 | <button |
95 | type="button" | 95 | type="button" |
96 | class="btn btn-sm p-1 float-right" | 96 | class="btn btn-sm p-1 float-right" |
97 | ng-class="{ | 97 | ng-class="{ |
98 | 'btn-secondary': selectedDomicilio != key + 1, | 98 | 'btn-secondary': selectedDomicilio != key + 1, |
99 | 'btn-primary': selectedDomicilio == key + 1 | 99 | 'btn-primary': selectedDomicilio == key + 1 |
100 | }" | 100 | }" |
101 | foca-focus="selectedDomicilio == {{key + 1}}" | 101 | foca-focus="selectedDomicilio == {{key + 1}}" |
102 | ng-keydown="itemDomicilio($event.keyCode)" | 102 | ng-keydown="itemDomicilio($event.keyCode)" |
103 | ng-click="select(domicilio)" | 103 | ng-click="select(domicilio)" |
104 | title="Seleccionar" | 104 | title="Seleccionar" |
105 | > | 105 | > |
106 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 106 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
107 | </button> | 107 | </button> |
108 | </td> | 108 | </td> |
109 | </tr> | 109 | </tr> |
110 | </tbody> | 110 | </tbody> |
111 | </table> | 111 | </table> |
112 | </div> | 112 | </div> |
113 | <form name="formDomicilio" ng-show="ingreso"> | 113 | <form name="formDomicilio" ng-show="ingreso"> |
114 | <input | 114 | <input |
115 | type="hidden" | 115 | type="hidden" |
116 | ng-model="domicilio.latitud" | 116 | ng-model="domicilio.latitud" |
117 | ng-required="true"> | 117 | ng-required="true"> |
118 | <input | 118 | <input |
119 | type="hidden" | 119 | type="hidden" |
120 | ng-model="domicilio.longitud" | 120 | ng-model="domicilio.longitud" |
121 | ng-required="true"> | 121 | ng-required="true"> |
122 | <div class="row"> | 122 | <div class="row"> |
123 | <div class="col-4"> | 123 | <div class="col-4"> |
124 | <label>Tipo</label> | 124 | <label>Tipo</label> |
125 | <select | 125 | <select |
126 | class="form-control" | 126 | class="form-control" |
127 | ng-disabled="true" | 127 | ng-disabled="true" |
128 | > | 128 | > |
129 | <option ng-value="2">Entrega</option> | 129 | <option ng-value="2">Entrega</option> |
130 | </select> | 130 | </select> |
131 | </div> | 131 | </div> |
132 | <div class="col-8"> | 132 | <div class="col-8"> |
133 | <label>Titulo</label> | 133 | <label>Titulo</label> |
134 | <input | 134 | <input |
135 | type="text" | 135 | type="text" |
136 | foca-focus="ingreso" | 136 | foca-focus="ingreso" |
137 | class="form-control" | 137 | class="form-control" |
138 | ng-model="domicilio.titulo" | 138 | ng-model="domicilio.titulo" |
139 | placeholder="Ingrese título" | 139 | placeholder="Ingrese título" |
140 | ng-required="true" | 140 | ng-required="true" |
141 | ng-keypress="next($event.keyCode)" | 141 | ng-keypress="next($event.keyCode)" |
142 | ng-focus="focused = 1" | 142 | ng-focus="focused = 1" |
143 | foca-focus="focused == 1" | 143 | foca-focus="focused == 1" |
144 | teclado-virtual | 144 | teclado-virtual |
145 | /> | 145 | /> |
146 | </div> | 146 | </div> |
147 | <div class="col-9"> | 147 | <div class="col-9"> |
148 | <label>Calle</label> | 148 | <label>Calle</label> |
149 | <input | 149 | <input |
150 | type="text" | 150 | type="text" |
151 | class="form-control" | 151 | class="form-control" |
152 | ng-model="domicilio.calle" | 152 | ng-model="domicilio.calle" |
153 | placeholder="Ingrese calle" | 153 | placeholder="Ingrese calle" |
154 | ng-required="true" | 154 | ng-required="true" |
155 | ng-keypress="next($event.keyCode)" | 155 | ng-keypress="next($event.keyCode)" |
156 | ng-focus="focused = 2" | 156 | ng-focus="focused = 2" |
157 | foca-focus="focused == 2" | 157 | foca-focus="focused == 2" |
158 | teclado-virtual | 158 | teclado-virtual |
159 | /> | 159 | /> |
160 | </div> | 160 | </div> |
161 | <div class="col-3"> | 161 | <div class="col-3"> |
162 | <label>Nº</label> | 162 | <label>Nº</label> |
163 | <input | 163 | <input |
164 | type="text" | 164 | type="text" |
165 | class="form-control" | 165 | class="form-control" |
166 | ng-model="domicilio.numeroCalle" | 166 | ng-model="domicilio.numeroCalle" |
167 | placeholder="Ingrese Numero" | 167 | placeholder="Ingrese Numero" |
168 | ng-required="true" | 168 | ng-required="true" |
169 | ng-keypress="next($event.keyCode)" | 169 | ng-keypress="next($event.keyCode)" |
170 | ng-focus="focused = 3" | 170 | ng-focus="focused = 3" |
171 | foca-focus="focused == 3" | 171 | foca-focus="focused == 3" |
172 | teclado-virtual | 172 | teclado-virtual |
173 | /> | 173 | /> |
174 | </div> | 174 | </div> |
175 | <div class="col-6"> | 175 | <div class="col-6"> |
176 | <label>Localidad</label> | 176 | <label>Localidad</label> |
177 | <input | 177 | <input |
178 | type="text" | 178 | type="text" |
179 | class="form-control" | 179 | class="form-control" |
180 | ng-model="domicilio.localidad" | 180 | ng-model="domicilio.localidad" |
181 | placeholder="Ingrese localidad" | 181 | placeholder="Ingrese localidad" |
182 | ng-required="true" | 182 | ng-required="true" |
183 | ng-keypress="next($event.keyCode)" | 183 | ng-keypress="next($event.keyCode)" |
184 | ng-focus="focused = 4" | 184 | ng-focus="focused = 4" |
185 | foca-focus="focused == 4" | 185 | foca-focus="focused == 4" |
186 | teclado-virtual | 186 | teclado-virtual |
187 | /> | 187 | /> |
188 | </div> | 188 | </div> |
189 | <div class="col-6"> | 189 | <div class="col-6"> |
190 | <label>Provincia</label> | 190 | <label>Provincia</label> |
191 | <input | 191 | <input |
192 | type="text" | 192 | type="text" |
193 | class="form-control" | 193 | class="form-control" |
194 | ng-model="domicilio.provincia" | 194 | ng-model="domicilio.provincia" |
195 | placeholder="Ingrese provincia" | 195 | placeholder="Ingrese provincia" |
196 | ng-required="true" | 196 | ng-required="true" |
197 | ng-keypress="next($event.keyCode)" | 197 | ng-keypress="next($event.keyCode)" |
198 | ng-focus="focused = 5" | 198 | ng-focus="focused = 5" |
199 | foca-focus="focused == 5" | 199 | foca-focus="focused == 5" |
200 | teclado-virtual | 200 | teclado-virtual |
201 | /> | 201 | /> |
202 | </div> | 202 | </div> |
203 | </div> | 203 | </div> |
204 | <div class="row mt-3"> | 204 | <div class="row mt-3"> |
205 | <div class="col-12"> | 205 | <div class="col-12"> |
206 | <button | 206 | <button |
207 | type="button" | 207 | type="button" |
208 | class="btn btn-primary float-right ml-3" | 208 | class="btn btn-outline-debo float-right ml-3" |
209 | ng-click="localizarDomicilio()">Buscar</button> | 209 | ng-click="localizarDomicilio()">Buscar</button> |
210 | <button | 210 | <button |
211 | type="button" | 211 | type="button" |
212 | class="btn btn-primary float-right" | 212 | class="btn btn-outline-debo float-right" |
213 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" | 213 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" |
214 | ng-click="localizarDomicilio(true)">Localizar</button> | 214 | ng-click="localizarDomicilio(true)">Localizar</button> |
215 | </div> | 215 | </div> |
216 | </div> | 216 | </div> |
217 | </form> | 217 | </form> |
218 | </div> | 218 | </div> |
219 | <div class="modal-footer"> | 219 | <div class="modal-footer"> |
220 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> | 220 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> |
221 | <ul class="pagination pagination-sm mb-0 justify-content-end"> | 221 | <ul class="pagination pagination-sm mb-0 justify-content-end"> |
222 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 222 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
223 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 223 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
224 | <span aria-hidden="true">«</span> | 224 | <span aria-hidden="true">«</span> |
225 | <span class="sr-only">Anterior</span> | 225 | <span class="sr-only">Anterior</span> |
226 | </a> | 226 | </a> |
227 | </li> | 227 | </li> |
228 | <li | 228 | <li |
229 | class="page-item" | 229 | class="page-item" |
230 | ng-repeat="pagina in paginas" | 230 | ng-repeat="pagina in paginas" |
231 | ng-class="{'active': pagina == currentPage}" | 231 | ng-class="{'active': pagina == currentPage}" |
232 | > | 232 | > |
233 | <a | 233 | <a |
234 | class="page-link" | 234 | class="page-link" |
235 | href="javascript:void();" | 235 | href="javascript:void();" |
236 | ng-click="selectPage(pagina)" | 236 | ng-click="selectPage(pagina)" |
237 | ng-bind="pagina" | 237 | ng-bind="pagina" |
238 | ></a> | 238 | ></a> |
239 | </li> | 239 | </li> |
240 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 240 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
241 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 241 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
242 | <span aria-hidden="true">»</span> | 242 | <span aria-hidden="true">»</span> |
243 | <span class="sr-only">Siguiente</span> | 243 | <span class="sr-only">Siguiente</span> |
244 | </a> | 244 | </a> |
245 | </li> | 245 | </li> |
246 | </ul> | 246 | </ul> |
247 | </nav> | 247 | </nav> |
248 | <button | 248 | <button |
249 | ng-show="!ingreso" | 249 | ng-show="!ingreso" |
250 | class="btn btn-sm btn-secondary" | 250 | class="btn btn-sm btn-secondary" |
251 | type="button" | 251 | type="button" |
252 | ng-click="cancel()" | 252 | ng-click="cancel()" |
253 | >Volver | 253 | >Volver |
254 | </button> | 254 | </button> |
255 | <button | 255 | <button |
256 | ng-show="ingreso" | 256 | ng-show="ingreso" |
257 | class="btn btn-secondary btn-sm" | 257 | class="btn btn-secondary btn-sm" |
258 | type="button" | 258 | type="button" |
259 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" | 259 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" |
260 | >Cancelar | 260 | >Cancelar |
261 | </button> | 261 | </button> |
262 | <button | 262 | <button |
263 | ng-show="ingreso" | 263 | ng-show="ingreso" |
264 | class="btn btn-sm btn-primary" | 264 | class="btn btn-sm btn-primary" |
265 | type="button" | 265 | type="button" |
266 | ng-click="agregarDomicilio()" | 266 | ng-click="agregarDomicilio()" |
267 | >Agregar domicilio | 267 | >Agregar domicilio |
268 | </button> | 268 | </button> |
269 | </div> | 269 | </div> |
270 | 270 |