Commit 93e208626e366e0240c9b337048d8a469c627140
Exists in
master
Merge branch 'master' into 'master'
Master See merge request !6
Showing
2 changed files
Show diff stats
src/app/comprobantes/comprobantes.component.html
| ... | ... | @@ -97,7 +97,8 @@ |
| 97 | 97 | class="form-control-sm col-10" |
| 98 | 98 | type="number" |
| 99 | 99 | (focus)="$event.target.select();" |
| 100 | - (keyup.enter)="articulo.input = false; articulo.recibido = articulo.tempRecibido" | |
| 100 | + (keyup.enter)="inputArticulo(articulo)" | |
| 101 | + (keyup.esc)="articulo.input = false" | |
| 101 | 102 | [(ngModel)]="articulo.tempRecibido" |
| 102 | 103 | [ngModelOptions]="{standalone: true}" autofocus/> |
| 103 | 104 | /{{articulo.CAN}} |
| ... | ... | @@ -118,35 +119,6 @@ |
| 118 | 119 | <th colspan="3" *ngIf="articulosFiltro.length == 0">Por el momento no hay elementos aquí</th> |
| 119 | 120 | </tr> |
| 120 | 121 | </tbody> |
| 121 | - <!-- <tfoot> | |
| 122 | - <nav *ngIf="articulosFiltro.length > 0" class="mr-auto position-absolute mb-5"> | |
| 123 | - <ul class="pagination pagination-sm justify-content mb-0"> | |
| 124 | - <li class="page-item" [ngClass]="{'disabled': paginaActiva == 1}"> | |
| 125 | - <a class="page-link" href="javascript:void();" (click)="paginaActiva = paginaActiva - 1"> | |
| 126 | - <span aria-hidden="true">«</span> | |
| 127 | - <span class="sr-only">Anterior</span> | |
| 128 | - </a> | |
| 129 | - </li> | |
| 130 | - <li | |
| 131 | - class="page-item" | |
| 132 | - *ngFor="let pagina of paginas; index as i" | |
| 133 | - [ngClass]="{'active': pagina == paginaActiva}" | |
| 134 | - > | |
| 135 | - <a | |
| 136 | - class="page-link" | |
| 137 | - href="javascript:void();" | |
| 138 | - (click)="paginaActiva = pagina" | |
| 139 | - >{{pagina}}</a> | |
| 140 | - </li> | |
| 141 | - <li class="page-item" [ngClass]="{'disabled': paginaActiva == paginas.length}"> | |
| 142 | - <a class="page-link" href="javascript:void();" (click)="paginaActiva = paginaActiva + 1"> | |
| 143 | - <span aria-hidden="true">»</span> | |
| 144 | - <span class="sr-only">Siguiente</span> | |
| 145 | - </a> | |
| 146 | - </li> | |
| 147 | - </ul> | |
| 148 | - </nav> | |
| 149 | - </tfoot> --> | |
| 150 | 122 | </table> |
| 151 | 123 | </div> |
| 152 | 124 | </form> |
src/app/comprobantes/comprobantes.component.ts
| ... | ... | @@ -77,7 +77,7 @@ export class ComprobantesComponent implements OnInit { |
| 77 | 77 | |
| 78 | 78 | }, err => { |
| 79 | 79 | |
| 80 | - alert('Algo salió mal'); | |
| 80 | + alert('Algo salió mal...'); | |
| 81 | 81 | this.saveLoading = false; |
| 82 | 82 | console.log(err); |
| 83 | 83 | }); |
| ... | ... | @@ -93,4 +93,13 @@ export class ComprobantesComponent implements OnInit { |
| 93 | 93 | }, (reason) => { }); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + inputArticulo(articulo) { | |
| 97 | + if (articulo.tempRecibido > 999999) { | |
| 98 | + alert('Cantidad máxima superada'); | |
| 99 | + return; | |
| 100 | + } | |
| 101 | + articulo.input = false; | |
| 102 | + articulo.recibido = articulo.tempRecibido; | |
| 103 | + } | |
| 104 | + | |
| 96 | 105 | } |