Commit b698be187900a0f2e4f2e6d7d0e76ca2a4e83d42
1 parent
0cf138f96f
Exists in
master
nombre de leyenda
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/views/modal-domicilio.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <h5 class="modal-title">Busqueda de Domicilios</h5> | 2 | <h5 class="modal-title">Busqueda de Domicilios</h5> |
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" ng-show="!ingreso"> | 5 | <div class="input-group" ng-show="!ingreso"> |
6 | <input | 6 | <input |
7 | type="text" | 7 | type="text" |
8 | class="form-control form-control-sm" | 8 | class="form-control form-control-sm" |
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 | teclado-virtual | 16 | teclado-virtual |
17 | > | 17 | > |
18 | <table ng-show="!ingreso" class="table table-striped table-sm"> | 18 | <table ng-show="!ingreso" class="table table-striped table-sm"> |
19 | <thead> | 19 | <thead> |
20 | <tr> | 20 | <tr> |
21 | <th>Titulo</th> | 21 | <th>Titulo</th> |
22 | <th>Calle</th> | 22 | <th>Calle</th> |
23 | <th>Localidad</th> | 23 | <th>Localidad</th> |
24 | <th>Provincia</th> | 24 | <th>Provincia</th> |
25 | <th></th> | 25 | <th></th> |
26 | </tr> | 26 | </tr> |
27 | </thead> | 27 | </thead> |
28 | <tbody> | 28 | <tbody> |
29 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> | 29 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> |
30 | <td colspan="5"> | 30 | <td colspan="5"> |
31 | No se encontraron resultados. | 31 | No se encontraron resultados. |
32 | </td> | 32 | </td> |
33 | </tr> | 33 | </tr> |
34 | <tr> | 34 | <tr> |
35 | <td colspan="4" ng-show="!ingreso"> | 35 | <td colspan="4" ng-show="!ingreso"> |
36 | <input | 36 | <input |
37 | class="form-control form-control-sm" | 37 | class="form-control form-control-sm" |
38 | type="text" | 38 | type="text" |
39 | placeholder="Selección manual" | 39 | placeholder="Nuevo domicilio" |
40 | readonly | 40 | readonly |
41 | ng-click="ingreso = !ingreso" | 41 | ng-click="ingreso = !ingreso" |
42 | /> | 42 | /> |
43 | </td> | 43 | </td> |
44 | <td colspan="1" ng-show="!ingreso"> | 44 | <td colspan="1" ng-show="!ingreso"> |
45 | <button | 45 | <button |
46 | type="button" | 46 | type="button" |
47 | class="btn btn-sm p-1 float-right" | 47 | class="btn btn-sm p-1 float-right" |
48 | ng-class="{ | 48 | ng-class="{ |
49 | 'btn-secondary': selectedDomicilio != 0, | 49 | 'btn-secondary': selectedDomicilio != 0, |
50 | 'btn-primary': selectedDomicilio == 0 | 50 | 'btn-primary': selectedDomicilio == 0 |
51 | }" | 51 | }" |
52 | foca-focus="selectedDomicilio == 0" | 52 | foca-focus="selectedDomicilio == 0" |
53 | ng-keydown="itemDomicilio($event.keyCode)" | 53 | ng-keydown="itemDomicilio($event.keyCode)" |
54 | ng-click="ingreso = !ingreso" | 54 | ng-click="ingreso = !ingreso" |
55 | > | 55 | > |
56 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 56 | <i class="fa fa-arrow-right" aria-hidden="true"></i> |
57 | </button> | 57 | </button> |
58 | </td> | 58 | </td> |
59 | </tr> | 59 | </tr> |
60 | <tr class="selectable" | 60 | <tr class="selectable" |
61 | ng-repeat="(key,domicilio) in currentPageDomicilios" | 61 | ng-repeat="(key,domicilio) in currentPageDomicilios" |
62 | ng-click="select(domicilio)"> | 62 | ng-click="select(domicilio)"> |
63 | <td ng-bind="domicilio.titulo"></td> | 63 | <td ng-bind="domicilio.titulo"></td> |
64 | <td ng-bind="domicilio.Calle + ' ' + domicilio.Numero"></td> | 64 | <td ng-bind="domicilio.Calle + ' ' + domicilio.Numero"></td> |
65 | <td ng-bind="domicilio.Localidad"></td> | 65 | <td ng-bind="domicilio.Localidad"></td> |
66 | <td ng-bind="domicilio.Provincia"></td> | 66 | <td ng-bind="domicilio.Provincia"></td> |
67 | <td> | 67 | <td> |
68 | <button | 68 | <button |
69 | type="button" | 69 | type="button" |
70 | class="btn btn-sm p-1 float-right" | 70 | class="btn btn-sm p-1 float-right" |
71 | ng-class="{ | 71 | ng-class="{ |
72 | 'btn-secondary': selectedDomicilio != key + 1, | 72 | 'btn-secondary': selectedDomicilio != key + 1, |
73 | 'btn-primary': selectedDomicilio == key + 1 | 73 | 'btn-primary': selectedDomicilio == key + 1 |
74 | }" | 74 | }" |
75 | foca-focus="selectedDomicilio == {{key + 1}}" | 75 | foca-focus="selectedDomicilio == {{key + 1}}" |
76 | ng-keydown="itemDomicilio($event.keyCode)" | 76 | ng-keydown="itemDomicilio($event.keyCode)" |
77 | > | 77 | > |
78 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 78 | <i class="fa fa-arrow-right" aria-hidden="true"></i> |
79 | </button> | 79 | </button> |
80 | </td> | 80 | </td> |
81 | </tr> | 81 | </tr> |
82 | </tbody> | 82 | </tbody> |
83 | </table> | 83 | </table> |
84 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso"> | 84 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso"> |
85 | <ul class="pagination pagination-sm mb-0 justify-content-end"> | 85 | <ul class="pagination pagination-sm mb-0 justify-content-end"> |
86 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 86 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
87 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 87 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
88 | <span aria-hidden="true">«</span> | 88 | <span aria-hidden="true">«</span> |
89 | <span class="sr-only">Anterior</span> | 89 | <span class="sr-only">Anterior</span> |
90 | </a> | 90 | </a> |
91 | </li> | 91 | </li> |
92 | <li | 92 | <li |
93 | class="page-item" | 93 | class="page-item" |
94 | ng-repeat="pagina in paginas" | 94 | ng-repeat="pagina in paginas" |
95 | ng-class="{'active': pagina == currentPage}" | 95 | ng-class="{'active': pagina == currentPage}" |
96 | > | 96 | > |
97 | <a | 97 | <a |
98 | class="page-link" | 98 | class="page-link" |
99 | href="javascript:void();" | 99 | href="javascript:void();" |
100 | ng-click="selectPage(pagina)" | 100 | ng-click="selectPage(pagina)" |
101 | ng-bind="pagina" | 101 | ng-bind="pagina" |
102 | ></a> | 102 | ></a> |
103 | </li> | 103 | </li> |
104 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 104 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
105 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 105 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
106 | <span aria-hidden="true">»</span> | 106 | <span aria-hidden="true">»</span> |
107 | <span class="sr-only">Siguiente</span> | 107 | <span class="sr-only">Siguiente</span> |
108 | </a> | 108 | </a> |
109 | </li> | 109 | </li> |
110 | </ul> | 110 | </ul> |
111 | </nav> | 111 | </nav> |
112 | </div> | 112 | </div> |
113 | <form name="formDomicilio" ng-show="ingreso"> | 113 | <form name="formDomicilio" ng-show="ingreso"> |
114 | <div class="row"> | 114 | <div class="row"> |
115 | <div class="col-4"> | 115 | <div class="col-4"> |
116 | <label>Tipo</label> | 116 | <label>Tipo</label> |
117 | <select | 117 | <select |
118 | class="form-control" | 118 | class="form-control" |
119 | ng-disabled="true" | 119 | ng-disabled="true" |
120 | > | 120 | > |
121 | <option ng-value="2">Entrega</option> | 121 | <option ng-value="2">Entrega</option> |
122 | </select> | 122 | </select> |
123 | </div> | 123 | </div> |
124 | <div class="col-8"> | 124 | <div class="col-8"> |
125 | <label>Titulo</label> | 125 | <label>Titulo</label> |
126 | <input | 126 | <input |
127 | type="text" | 127 | type="text" |
128 | foca-focus="ingreso" | 128 | foca-focus="ingreso" |
129 | class="form-control" | 129 | class="form-control" |
130 | ng-model="domicilio.titulo" | 130 | ng-model="domicilio.titulo" |
131 | placeholder="Ingrese título" | 131 | placeholder="Ingrese título" |
132 | ng-required="true" | 132 | ng-required="true" |
133 | teclado-virtual | 133 | teclado-virtual |
134 | /> | 134 | /> |
135 | </div> | 135 | </div> |
136 | <div class="col-9"> | 136 | <div class="col-9"> |
137 | <label>Calle</label> | 137 | <label>Calle</label> |
138 | <input | 138 | <input |
139 | type="text" | 139 | type="text" |
140 | class="form-control" | 140 | class="form-control" |
141 | ng-model="domicilio.calle" | 141 | ng-model="domicilio.calle" |
142 | placeholder="Ingrese calle" | 142 | placeholder="Ingrese calle" |
143 | ng-required="true" | 143 | ng-required="true" |
144 | /> | 144 | /> |
145 | </div> | 145 | </div> |
146 | <div class="col-3"> | 146 | <div class="col-3"> |
147 | <label>Nº</label> | 147 | <label>Nº</label> |
148 | <input | 148 | <input |
149 | type="text" | 149 | type="text" |
150 | class="form-control" | 150 | class="form-control" |
151 | ng-model="domicilio.numeroCalle" | 151 | ng-model="domicilio.numeroCalle" |
152 | placeholder="Ingrese Numero" | 152 | placeholder="Ingrese Numero" |
153 | ng-required="true" | 153 | ng-required="true" |
154 | teclado-virtual | 154 | teclado-virtual |
155 | /> | 155 | /> |
156 | </div> | 156 | </div> |
157 | <div class="col-6"> | 157 | <div class="col-6"> |
158 | <label>Localidad</label> | 158 | <label>Localidad</label> |
159 | <input | 159 | <input |
160 | type="text" | 160 | type="text" |
161 | class="form-control" | 161 | class="form-control" |
162 | ng-model="domicilio.localidad" | 162 | ng-model="domicilio.localidad" |
163 | placeholder="Ingrese localidad" | 163 | placeholder="Ingrese localidad" |
164 | ng-required="true" | 164 | ng-required="true" |
165 | teclado-virtual | 165 | teclado-virtual |
166 | /> | 166 | /> |
167 | </div> | 167 | </div> |
168 | <div class="col-6"> | 168 | <div class="col-6"> |
169 | <label>Provincia</label> | 169 | <label>Provincia</label> |
170 | <input | 170 | <input |
171 | type="text" | 171 | type="text" |
172 | class="form-control" | 172 | class="form-control" |
173 | ng-model="domicilio.provincia" | 173 | ng-model="domicilio.provincia" |
174 | placeholder="Ingrese provincia" | 174 | placeholder="Ingrese provincia" |
175 | ng-required="true" | 175 | ng-required="true" |
176 | /> | 176 | /> |
177 | </div> | 177 | </div> |
178 | </div> | 178 | </div> |
179 | </form> | 179 | </form> |
180 | </div> | 180 | </div> |
181 | <div class="modal-footer"> | 181 | <div class="modal-footer"> |
182 | <button | 182 | <button |
183 | ng-show="!ingreso" | 183 | ng-show="!ingreso" |
184 | class="btn btn-sm btn-secondary" | 184 | class="btn btn-sm btn-secondary" |
185 | type="button" | 185 | type="button" |
186 | ng-click="cancel()" | 186 | ng-click="cancel()" |
187 | >Seleccionar otro cliente | 187 | >Seleccionar otro cliente |
188 | </button> | 188 | </button> |
189 | <button | 189 | <button |
190 | ng-show="ingreso" | 190 | ng-show="ingreso" |
191 | class="btn btn-secondary btn-sm" | 191 | class="btn btn-secondary btn-sm" |
192 | type="button" | 192 | type="button" |
193 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" | 193 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" |
194 | >Cancelar | 194 | >Cancelar |
195 | </button> | 195 | </button> |
196 | <button | 196 | <button |
197 | ng-show="ingreso" | 197 | ng-show="ingreso" |
198 | class="btn btn-sm btn-primary" | 198 | class="btn btn-sm btn-primary" |
199 | type="button" | 199 | type="button" |
200 | ng-click="agregarDomicilio()" | 200 | ng-click="agregarDomicilio()" |
201 | ng-disabled="!formDomicilio.$valid" | 201 | ng-disabled="!formDomicilio.$valid" |
202 | >Agregar domicilio | 202 | >Agregar domicilio |
203 | </button> | 203 | </button> |
204 | </div> | 204 | </div> |
205 | 205 |