Commit e77f489f6e50d66162ea2cef1e6a32bd28e2b65c
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !4
Showing
14 changed files
Show diff stats
.gitignore
angular.json
package.json
| ... | ... | @@ -7,7 +7,8 @@ |
| 7 | 7 | "build": "ng build", |
| 8 | 8 | "test": "ng test", |
| 9 | 9 | "lint": "ng lint", |
| 10 | - "e2e": "ng e2e" | |
| 10 | + "e2e": "ng e2e", | |
| 11 | + "apkToDrop": "cp ./platforms/android/app/build/outputs/apk/debug/app-debug.apk C:/Users/Usuario/Dropbox/Apks_PlanexDEBO/v0.0.1" | |
| 11 | 12 | }, |
| 12 | 13 | "private": true, |
| 13 | 14 | "dependencies": { |
| ... | ... | @@ -56,4 +57,4 @@ |
| 56 | 57 | "android" |
| 57 | 58 | ] |
| 58 | 59 | } |
| 59 | 60 | -} |
| 61 | +} | |
| 60 | 62 | \ No newline at end of file |
src/app/boton-service.service.ts
| 1 | 1 | import { Injectable } from '@angular/core'; |
| 2 | -import { HttpClient } from '@angular/common/http'; | |
| 2 | +// import { HttpClient } from '@angular/common/http'; | |
| 3 | 3 | |
| 4 | 4 | @Injectable({ |
| 5 | 5 | providedIn: 'root' |
| 6 | 6 | }) |
| 7 | 7 | export class BotonServiceService { |
| 8 | 8 | |
| 9 | - constructor(private http: String) { } | |
| 9 | + constructor(/*private http: String*/) { } | |
| 10 | 10 | |
| 11 | 11 | getBotones() { |
| 12 | 12 | // return this.http.get('http://localhost:5555/comprobantes'); |
src/app/botonera/botonera.component.html
| ... | ... | @@ -11,13 +11,13 @@ |
| 11 | 11 | <a |
| 12 | 12 | class="btn btn-outline-dark mt-5 btn-lg" |
| 13 | 13 | href="javascript:void()" |
| 14 | - ng-click="showTerminal()" | |
| 14 | + (click)="showTerminal()" | |
| 15 | 15 | > |
| 16 | 16 | <i class="fa fa-info-circle" aria-hidden="true"></i> |
| 17 | 17 | </a> |
| 18 | 18 | <a class="btn btn-outline-dark mt-5 btn-lg" |
| 19 | 19 | href="javascript:void()" |
| 20 | - ng-click="logout()" | |
| 20 | + routerLink="/login" | |
| 21 | 21 | > |
| 22 | 22 | <i class="fa fa-power-off" aria-hidden="true"></i> |
| 23 | 23 | </a> |
| ... | ... | @@ -27,13 +27,13 @@ |
| 27 | 27 | <a |
| 28 | 28 | class="btn btn-outline-dark btn-lg mr-2" |
| 29 | 29 | href="javascript:void()" |
| 30 | - ng-click="showTerminal()" | |
| 30 | + (click)="showTerminal()" | |
| 31 | 31 | > |
| 32 | 32 | <i class="fa fa-info-circle" aria-hidden="true"></i> |
| 33 | 33 | </a> |
| 34 | 34 | <a class="btn btn-outline-dark btn-lg" |
| 35 | 35 | href="javascript:void()" |
| 36 | - ng-click="logout()" | |
| 36 | + routerLink="/login" | |
| 37 | 37 | > |
| 38 | 38 | <i class="fa fa-power-off" aria-hidden="true"></i> |
| 39 | 39 | </a> |
src/app/botonera/botonera.component.ts
src/app/busqueda-comprobante/busqueda-comprobante.component.html
| ... | ... | @@ -15,6 +15,9 @@ |
| 15 | 15 | </tr> |
| 16 | 16 | </thead> |
| 17 | 17 | <tbody> |
| 18 | + <tr *ngIf="!getPaginaFiltro().length"> | |
| 19 | + <th colspan="3">Por el momento no hay elementos aqui</th> | |
| 20 | + </tr> | |
| 18 | 21 | <tr *ngFor="let comprobante of getPaginaFiltro()"> |
| 19 | 22 | <td> |
| 20 | 23 | {{comprobante.cabecera.TCO + '-' + comprobante.cabecera.TIP + '-' + rellenar(4, comprobante.cabecera.SUC) + '-' + rellenar(8, comprobante.cabecera.NCO)}} |
src/app/busqueda-comprobante/busqueda-comprobante.component.ts
| ... | ... | @@ -19,22 +19,6 @@ export class BusquedaComprobanteComponent implements OnInit { |
| 19 | 19 | ngOnInit() { |
| 20 | 20 | this.comprobanteService.getComprobantes().subscribe((data: Array<Object>) => { |
| 21 | 21 | this.comprobantes = data; |
| 22 | - this.comprobantes.push(this.comprobantes[0]); | |
| 23 | - this.comprobantes.push(this.comprobantes[1]); | |
| 24 | - this.comprobantes.push(this.comprobantes[0]); | |
| 25 | - this.comprobantes.push(this.comprobantes[1]); | |
| 26 | - this.comprobantes.push(this.comprobantes[0]); | |
| 27 | - this.comprobantes.push(this.comprobantes[1]); | |
| 28 | - this.comprobantes.push(this.comprobantes[0]); | |
| 29 | - this.comprobantes.push(this.comprobantes[1]); | |
| 30 | - this.comprobantes.push(this.comprobantes[0]); | |
| 31 | - this.comprobantes.push(this.comprobantes[1]); | |
| 32 | - this.comprobantes.push(this.comprobantes[0]); | |
| 33 | - this.comprobantes.push(this.comprobantes[1]); | |
| 34 | - this.comprobantes.push(this.comprobantes[0]); | |
| 35 | - this.comprobantes.push(this.comprobantes[1]); | |
| 36 | - this.comprobantes.push(this.comprobantes[0]); | |
| 37 | - this.comprobantes.push(this.comprobantes[1]); | |
| 38 | 22 | this.paginar(); |
| 39 | 23 | }); |
| 40 | 24 | } |
src/app/comprobantes/comprobantes.component.html
| ... | ... | @@ -32,27 +32,27 @@ |
| 32 | 32 | <div class="row border"> |
| 33 | 33 | <div class="col-6 col-sm-3 d-flex"> |
| 34 | 34 | <strong>Letra Factura: </strong> |
| 35 | - <label>{{cabecera.TIP}}</label> | |
| 35 | + <label>{{cabecera['TIP']}}</label> | |
| 36 | 36 | </div> |
| 37 | 37 | <div class="col-6 col-sm-3 d-flex"> |
| 38 | 38 | <strong>Tipo Factura: </strong> |
| 39 | - <label>{{cabecera.TCO}}</label> | |
| 39 | + <label>{{cabecera['TCO']}}</label> | |
| 40 | 40 | </div> |
| 41 | 41 | <div class="col-6 col-sm-3 d-flex"> |
| 42 | 42 | <strong>Sucursal: </strong> |
| 43 | - <label>{{cabecera.SUC}}</label> | |
| 43 | + <label>{{cabecera['SUC']}}</label> | |
| 44 | 44 | </div> |
| 45 | 45 | <div class="col-6 col-sm-3 d-flex"> |
| 46 | 46 | <strong>Número: </strong> |
| 47 | - <label>{{cabecera.NCO}}</label> | |
| 47 | + <label>{{cabecera['NCO']}}</label> | |
| 48 | 48 | </div> |
| 49 | 49 | <div class="col-6 col-sm-3 d-flex"> |
| 50 | 50 | <strong>Cuit: </strong> |
| 51 | - <label>{{cabecera.CUI}}</label> | |
| 51 | + <label>{{cabecera['CUI']}}</label> | |
| 52 | 52 | </div> |
| 53 | 53 | <div class="col-12 col-sm-6 d-flex"> |
| 54 | 54 | <strong>Nombre: </strong> |
| 55 | - <label>{{cabecera.NOM}}</label> | |
| 55 | + <label>{{cabecera['NOM']}}</label> | |
| 56 | 56 | </div> |
| 57 | 57 | </div> |
| 58 | 58 | <div class="row border pr-2"> |
src/app/comprobantes/comprobantes.component.ts
| ... | ... | @@ -2,6 +2,7 @@ import { Component, OnInit} from '@angular/core'; |
| 2 | 2 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; |
| 3 | 3 | import { BusquedaComprobanteComponent } from '../busqueda-comprobante/busqueda-comprobante.component'; |
| 4 | 4 | import { ComprobanteService } from './comprobantes.service'; |
| 5 | +import { Router } from '@angular/router'; | |
| 5 | 6 | |
| 6 | 7 | @Component({ |
| 7 | 8 | templateUrl: './comprobantes.component.html', |
| ... | ... | @@ -10,7 +11,10 @@ import { ComprobanteService } from './comprobantes.service'; |
| 10 | 11 | }) |
| 11 | 12 | export class ComprobantesComponent implements OnInit { |
| 12 | 13 | |
| 13 | - constructor(private modalService: NgbModal, public comprobanteService: ComprobanteService) { } | |
| 14 | + constructor( | |
| 15 | + private modalService: NgbModal, | |
| 16 | + public comprobanteService: ComprobanteService, | |
| 17 | + public router: Router) { } | |
| 14 | 18 | |
| 15 | 19 | ngOnInit() { } |
| 16 | 20 | |
| ... | ... | @@ -54,7 +58,7 @@ export class ComprobantesComponent implements OnInit { |
| 54 | 58 | }).length; |
| 55 | 59 | } |
| 56 | 60 | |
| 57 | - guardarComprobante(event: any) { | |
| 61 | + guardarComprobante() { | |
| 58 | 62 | |
| 59 | 63 | if (this.getCantidadArticulosByEstado('pendiente')) { |
| 60 | 64 | alert('No deben quedar articulos pendientes'); |
| ... | ... | @@ -63,7 +67,11 @@ export class ComprobantesComponent implements OnInit { |
| 63 | 67 | this.comprobanteService |
| 64 | 68 | .saveComprobantes({cabecera: this.cabecera, cuerpo: this.cuerpo}) |
| 65 | 69 | .subscribe(data => { |
| 66 | - console.log(data); | |
| 70 | + alert('Comprobante guardado con éxito'); | |
| 71 | + this.router.navigateByUrl('/home'); | |
| 72 | + }, err => { | |
| 73 | + alert('Algo salió mal'); | |
| 74 | + console.log(err); | |
| 67 | 75 | }); |
| 68 | 76 | } |
| 69 | 77 |
src/app/login/login.component.html
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <label>Usuario</label> |
| 9 | 9 | <input |
| 10 | 10 | type="text" |
| 11 | - [(ngModel)]="usuario.idUsuario" | |
| 11 | + [(ngModel)]="usuario['idUsuario']" | |
| 12 | 12 | [ngModelOptions]="{standalone: true}" |
| 13 | 13 | ng-keyup="$event.keyCode == 13 && irPaso(2)" |
| 14 | 14 | [ladda]="loginLoading" |
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | <label>Contraseña</label> |
| 19 | 19 | <input |
| 20 | 20 | type="password" |
| 21 | - [(ngModel)]="usuario.clave" | |
| 21 | + [(ngModel)]="usuario['clave']" | |
| 22 | 22 | [ngModelOptions]="{standalone: true}" |
| 23 | 23 | foca-focus="paso == 2" |
| 24 | 24 | ng-keyup="$event.keyCode == 13 && enviar()" |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | <input |
| 49 | 49 | class="form-control" |
| 50 | 50 | placeholder="Código estación" |
| 51 | - [(ngModel)]="usuario.codigoEntidad" | |
| 51 | + [(ngModel)]="usuario['codigoEntidad']" | |
| 52 | 52 | [ngModelOptions]="{standalone: true}"> |
| 53 | 53 | </div> |
| 54 | 54 | <div> |
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | <input |
| 57 | 57 | class="form-control" |
| 58 | 58 | placeholder="GLN ESTACIÓN" |
| 59 | - [(ngModel)]="usuario.gln" | |
| 59 | + [(ngModel)]="usuario['gln']" | |
| 60 | 60 | [ngModelOptions]="{standalone: true}"/> |
| 61 | 61 | </div> |
| 62 | 62 | </div> |
src/app/login/login.component.ts
| ... | ... | @@ -10,6 +10,7 @@ import { Router } from '@angular/router'; |
| 10 | 10 | export class LoginComponent implements OnInit { |
| 11 | 11 | |
| 12 | 12 | loginLoading: boolean = false; |
| 13 | + configuracionEstacion: boolean = false; | |
| 13 | 14 | usuario: object = {}; |
| 14 | 15 | |
| 15 | 16 | constructor(private loginService: LoginService, private router: Router) { } |
src/etc/AppSetings.ejemplo.ts
src/etc/AppSetings.ts