Commit e5491961e5674905bd91ffafa3ae1da77d422b51
1 parent
82ab6cfc90
Exists in
master
and in
1 other branch
boton puntos de descarga
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 | <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 | <input | 60 | <input |
| 61 | class="form-control form-control-sm" | 61 | class="form-control form-control-sm" |
| 62 | type="text" | 62 | type="text" |
| 63 | placeholder="Nuevo domicilio" | 63 | placeholder="Nuevo domicilio" |
| 64 | readonly | 64 | readonly |
| 65 | ng-click="ingreso = !ingreso" | 65 | ng-click="ingreso = !ingreso" |
| 66 | /> | 66 | /> |
| 67 | </td> | 67 | </td> |
| 68 | </tr> | 68 | </tr> |
| 69 | <tr class="selectable" | 69 | <tr class="selectable" |
| 70 | ng-repeat="(key,domicilio) in currentPageDomicilios"> | 70 | ng-repeat="(key,domicilio) in currentPageDomicilios"> |
| 71 | <td | 71 | <td |
| 72 | ng-bind="domicilio.titulo" | 72 | ng-bind="domicilio.titulo" |
| 73 | ng-click="select(domicilio)" | 73 | ng-click="select(domicilio)" |
| 74 | ></td> | 74 | ></td> |
| 75 | <td | 75 | <td |
| 76 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" | 76 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" |
| 77 | ng-click="select(domicilio)" | 77 | ng-click="select(domicilio)" |
| 78 | ></td> | 78 | ></td> |
| 79 | <td | 79 | <td |
| 80 | ng-bind="domicilio.Localidad" | 80 | ng-bind="domicilio.Localidad" |
| 81 | ng-click="select(domicilio)" | 81 | ng-click="select(domicilio)" |
| 82 | ></td> | 82 | ></td> |
| 83 | <td | 83 | <td |
| 84 | ng-bind="domicilio.Provincia" | 84 | ng-bind="domicilio.Provincia" |
| 85 | ng-click="select(domicilio)" | 85 | ng-click="select(domicilio)" |
| 86 | ></td> | 86 | ></td> |
| 87 | <td> | 87 | <td> |
| 88 | <button | 88 | <button |
| 89 | type="button" | 89 | type="button" |
| 90 | class="btn btn-sm p-1 float-right btn-secondary" | 90 | class="btn btn-sm p-1 float-right btn-secondary" |
| 91 | ng-click="verPuntosDescarga(key)" | 91 | ng-click="verPuntosDescarga(key)" |
| 92 | title="Puntos de descarga" | 92 | title="Puntos de descarga" |
| 93 | > | 93 | > |
| 94 | <i class="fa fa-arrow-down" aria-hidden="true"></i> | 94 | <small>PD</small> |
| 95 | </button> | 95 | </button> |
| 96 | </td> | 96 | </td> |
| 97 | <td> | 97 | <td> |
| 98 | <button | 98 | <button |
| 99 | type="button" | 99 | type="button" |
| 100 | class="btn btn-sm p-1 float-right" | 100 | class="btn btn-sm p-1 float-right" |
| 101 | ng-class="{ | 101 | ng-class="{ |
| 102 | 'btn-secondary': selectedDomicilio != key + 1, | 102 | 'btn-secondary': selectedDomicilio != key + 1, |
| 103 | 'btn-primary': selectedDomicilio == key + 1 | 103 | 'btn-primary': selectedDomicilio == key + 1 |
| 104 | }" | 104 | }" |
| 105 | foca-focus="selectedDomicilio == {{key + 1}}" | 105 | foca-focus="selectedDomicilio == {{key + 1}}" |
| 106 | ng-keydown="itemDomicilio($event.keyCode)" | 106 | ng-keydown="itemDomicilio($event.keyCode)" |
| 107 | ng-click="select(domicilio)" | 107 | ng-click="select(domicilio)" |
| 108 | title="Seleccionar" | 108 | title="Seleccionar" |
| 109 | > | 109 | > |
| 110 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 110 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 111 | </button> | 111 | </button> |
| 112 | </td> | 112 | </td> |
| 113 | </tr> | 113 | </tr> |
| 114 | </tbody> | 114 | </tbody> |
| 115 | </table> | 115 | </table> |
| 116 | </div> | 116 | </div> |
| 117 | <form name="formDomicilio" ng-show="ingreso"> | 117 | <form name="formDomicilio" ng-show="ingreso"> |
| 118 | <div class="row"> | 118 | <div class="row"> |
| 119 | <div class="col-4"> | 119 | <div class="col-4"> |
| 120 | <label>Tipo</label> | 120 | <label>Tipo</label> |
| 121 | <select | 121 | <select |
| 122 | class="form-control" | 122 | class="form-control" |
| 123 | ng-disabled="true" | 123 | ng-disabled="true" |
| 124 | > | 124 | > |
| 125 | <option ng-value="2">Entrega</option> | 125 | <option ng-value="2">Entrega</option> |
| 126 | </select> | 126 | </select> |
| 127 | </div> | 127 | </div> |
| 128 | <div class="col-8"> | 128 | <div class="col-8"> |
| 129 | <label>Titulo</label> | 129 | <label>Titulo</label> |
| 130 | <input | 130 | <input |
| 131 | type="text" | 131 | type="text" |
| 132 | foca-focus="ingreso" | 132 | foca-focus="ingreso" |
| 133 | class="form-control" | 133 | class="form-control" |
| 134 | ng-model="domicilio.titulo" | 134 | ng-model="domicilio.titulo" |
| 135 | placeholder="Ingrese título" | 135 | placeholder="Ingrese título" |
| 136 | ng-required="true" | 136 | ng-required="true" |
| 137 | teclado-virtual | 137 | teclado-virtual |
| 138 | /> | 138 | /> |
| 139 | </div> | 139 | </div> |
| 140 | <div class="col-9"> | 140 | <div class="col-9"> |
| 141 | <label>Calle</label> | 141 | <label>Calle</label> |
| 142 | <input | 142 | <input |
| 143 | type="text" | 143 | type="text" |
| 144 | class="form-control" | 144 | class="form-control" |
| 145 | ng-model="domicilio.calle" | 145 | ng-model="domicilio.calle" |
| 146 | placeholder="Ingrese calle" | 146 | placeholder="Ingrese calle" |
| 147 | ng-required="true" | 147 | ng-required="true" |
| 148 | /> | 148 | /> |
| 149 | </div> | 149 | </div> |
| 150 | <div class="col-3"> | 150 | <div class="col-3"> |
| 151 | <label>Nº</label> | 151 | <label>Nº</label> |
| 152 | <input | 152 | <input |
| 153 | type="text" | 153 | type="text" |
| 154 | class="form-control" | 154 | class="form-control" |
| 155 | ng-model="domicilio.numeroCalle" | 155 | ng-model="domicilio.numeroCalle" |
| 156 | placeholder="Ingrese Numero" | 156 | placeholder="Ingrese Numero" |
| 157 | ng-required="true" | 157 | ng-required="true" |
| 158 | teclado-virtual | 158 | teclado-virtual |
| 159 | /> | 159 | /> |
| 160 | </div> | 160 | </div> |
| 161 | <div class="col-6"> | 161 | <div class="col-6"> |
| 162 | <label>Localidad</label> | 162 | <label>Localidad</label> |
| 163 | <input | 163 | <input |
| 164 | type="text" | 164 | type="text" |
| 165 | class="form-control" | 165 | class="form-control" |
| 166 | ng-model="domicilio.localidad" | 166 | ng-model="domicilio.localidad" |
| 167 | placeholder="Ingrese localidad" | 167 | placeholder="Ingrese localidad" |
| 168 | ng-required="true" | 168 | ng-required="true" |
| 169 | teclado-virtual | 169 | teclado-virtual |
| 170 | /> | 170 | /> |
| 171 | </div> | 171 | </div> |
| 172 | <div class="col-6"> | 172 | <div class="col-6"> |
| 173 | <label>Provincia</label> | 173 | <label>Provincia</label> |
| 174 | <input | 174 | <input |
| 175 | type="text" | 175 | type="text" |
| 176 | class="form-control" | 176 | class="form-control" |
| 177 | ng-model="domicilio.provincia" | 177 | ng-model="domicilio.provincia" |
| 178 | placeholder="Ingrese provincia" | 178 | placeholder="Ingrese provincia" |
| 179 | ng-required="true" | 179 | ng-required="true" |
| 180 | /> | 180 | /> |
| 181 | </div> | 181 | </div> |
| 182 | </div> | 182 | </div> |
| 183 | </form> | 183 | </form> |
| 184 | </div> | 184 | </div> |
| 185 | <div class="modal-footer"> | 185 | <div class="modal-footer"> |
| 186 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> | 186 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> |
| 187 | <ul class="pagination pagination-sm mb-0 justify-content-end"> | 187 | <ul class="pagination pagination-sm mb-0 justify-content-end"> |
| 188 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 188 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 189 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 189 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
| 190 | <span aria-hidden="true">«</span> | 190 | <span aria-hidden="true">«</span> |
| 191 | <span class="sr-only">Anterior</span> | 191 | <span class="sr-only">Anterior</span> |
| 192 | </a> | 192 | </a> |
| 193 | </li> | 193 | </li> |
| 194 | <li | 194 | <li |
| 195 | class="page-item" | 195 | class="page-item" |
| 196 | ng-repeat="pagina in paginas" | 196 | ng-repeat="pagina in paginas" |
| 197 | ng-class="{'active': pagina == currentPage}" | 197 | ng-class="{'active': pagina == currentPage}" |
| 198 | > | 198 | > |
| 199 | <a | 199 | <a |
| 200 | class="page-link" | 200 | class="page-link" |
| 201 | href="javascript:void();" | 201 | href="javascript:void();" |
| 202 | ng-click="selectPage(pagina)" | 202 | ng-click="selectPage(pagina)" |
| 203 | ng-bind="pagina" | 203 | ng-bind="pagina" |
| 204 | ></a> | 204 | ></a> |
| 205 | </li> | 205 | </li> |
| 206 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 206 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
| 207 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 207 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
| 208 | <span aria-hidden="true">»</span> | 208 | <span aria-hidden="true">»</span> |
| 209 | <span class="sr-only">Siguiente</span> | 209 | <span class="sr-only">Siguiente</span> |
| 210 | </a> | 210 | </a> |
| 211 | </li> | 211 | </li> |
| 212 | </ul> | 212 | </ul> |
| 213 | </nav> | 213 | </nav> |
| 214 | <button | 214 | <button |
| 215 | ng-show="!ingreso" | 215 | ng-show="!ingreso" |
| 216 | class="btn btn-sm btn-secondary" | 216 | class="btn btn-sm btn-secondary" |
| 217 | type="button" | 217 | type="button" |
| 218 | ng-click="cancel()" | 218 | ng-click="cancel()" |
| 219 | >Volver | 219 | >Volver |
| 220 | </button> | 220 | </button> |
| 221 | <button | 221 | <button |
| 222 | ng-show="ingreso" | 222 | ng-show="ingreso" |
| 223 | class="btn btn-secondary btn-sm" | 223 | class="btn btn-secondary btn-sm" |
| 224 | type="button" | 224 | type="button" |
| 225 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" | 225 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" |
| 226 | >Cancelar | 226 | >Cancelar |
| 227 | </button> | 227 | </button> |
| 228 | <button | 228 | <button |
| 229 | ng-show="ingreso" | 229 | ng-show="ingreso" |
| 230 | class="btn btn-sm btn-primary" | 230 | class="btn btn-sm btn-primary" |
| 231 | type="button" | 231 | type="button" |
| 232 | ng-click="agregarDomicilio()" | 232 | ng-click="agregarDomicilio()" |
| 233 | ng-disabled="!formDomicilio.$valid" | 233 | ng-disabled="!formDomicilio.$valid" |
| 234 | >Agregar domicilio | 234 | >Agregar domicilio |
| 235 | </button> | 235 | </button> |
| 236 | </div> | 236 | </div> |
| 237 | 237 |