Compare View

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