Commit 14bad0d6e714b2227e87b7cb547de48ae5f95eff

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

Merge branch 'master' into 'master'

Master

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