Commit 7a4c13c468cfe6c9399f4e287f9d6e373cf21ef2
1 parent
ab8c78d831
Exists in
master
and in
1 other branch
agrego estructura modales
Showing
3 changed files
with
26 additions
and
18 deletions
 
Show diff stats
src/app/app.module.ts
| 1 | import { BrowserModule } from '@angular/platform-browser'; | 1 | import { BrowserModule } from '@angular/platform-browser'; | 
| 2 | import { NgModule } from '@angular/core'; | 2 | import { NgModule } from '@angular/core'; | 
| 3 | import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; | 3 | import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; | 
| 4 | import { HttpClientModule } from '@angular/common/http'; | 4 | import { HttpClientModule } from '@angular/common/http'; | 
| 5 | import { FormsModule } from '@angular/forms'; | 5 | import { FormsModule } from '@angular/forms'; | 
| 6 | import { LaddaModule } from 'angular2-ladda'; | 6 | import { LaddaModule } from 'angular2-ladda'; | 
| 7 | 7 | ||
| 8 | import { AppRoutingModule } from './app-routing.module'; | 8 | import { AppRoutingModule } from './app-routing.module'; | 
| 9 | import { AppComponent } from './app.component'; | 9 | import { AppComponent } from './app.component'; | 
| 10 | import { AppBotonera } from './botonera/botonera.component'; | 10 | import { AppBotonera } from './botonera/botonera.component'; | 
| 11 | import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | 11 | import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | 
| 12 | import { NombreEmpresaComponent } from './nombre-empresa/nombre-empresa.component'; | 12 | import { NombreEmpresaComponent } from './nombre-empresa/nombre-empresa.component'; | 
| 13 | import { AccionesComponent } from './acciones/acciones.component'; | 13 | import { AccionesComponent } from './acciones/acciones.component'; | 
| 14 | import { LoginComponent } from './login/login.component'; | 14 | import { LoginComponent } from './login/login.component'; | 
| 15 | import { BusquedaComprobanteComponent } from './busqueda-comprobante/busqueda-comprobante.component'; | 15 | import { BusquedaComprobanteComponent } from './busqueda-comprobante/busqueda-comprobante.component'; | 
| 16 | import { ModalAlertComponent } from './modal/modal-alert/modal-alert.component'; | ||
| 16 | 17 | ||
| 17 | @NgModule({ | 18 | @NgModule({ | 
| 18 | declarations: [ | 19 | declarations: [ | 
| 19 | AppComponent, | 20 | AppComponent, | 
| 20 | AppBotonera, | 21 | AppBotonera, | 
| 21 | ComprobantesComponent, | 22 | ComprobantesComponent, | 
| 22 | NombreEmpresaComponent, | 23 | NombreEmpresaComponent, | 
| 23 | AccionesComponent, | 24 | AccionesComponent, | 
| 24 | LoginComponent, | 25 | LoginComponent, | 
| 25 | BusquedaComprobanteComponent | 26 | BusquedaComprobanteComponent, | 
| 27 | ModalAlertComponent | ||
| 26 | ], | 28 | ], | 
| 27 | imports: [ | 29 | imports: [ | 
| 28 | BrowserModule, | 30 | BrowserModule, | 
| 29 | AppRoutingModule, | 31 | AppRoutingModule, | 
| 30 | NgbModule, | 32 | NgbModule, | 
| 31 | HttpClientModule, | 33 | HttpClientModule, | 
| 32 | FormsModule, | 34 | FormsModule, | 
| 33 | LaddaModule | 35 | LaddaModule | 
| 34 | ], | 36 | ], | 
| 35 | entryComponents:[BusquedaComprobanteComponent], | 37 | entryComponents: [ | 
| 38 | BusquedaComprobanteComponent, | ||
| 39 | ModalAlertComponent | ||
| 40 | ], | ||
| 36 | providers: [], | 41 | providers: [], | 
| 37 | bootstrap: [AppComponent] | 42 | bootstrap: [AppComponent] | 
| 38 | }) | 43 | }) | 
| 39 | export class AppModule { } | 44 | export class AppModule { } | 
| 40 | 45 | 
src/app/botonera/botonera.component.html
| 1 | <div class="col-6"> | 1 | <div class="col-6"> | 
| 2 | <img src="assets/img/logo.png" class="botonera-principal-logo"> | 2 | <img src="assets/img/logo.png" class="botonera-principal-logo"> | 
| 3 | </div> | 3 | </div> | 
| 4 | <div class="pt-5 row"> | 4 | <div class="pt-5 row"> | 
| 5 | <div class="swiper col-12"> | 5 | <div class="swiper col-12"> | 
| 6 | <a class="botonera-principal-comprobante" (click)="comprobantes()"> | 6 | <a class="botonera-principal-comprobante" (click)="comprobantes()"> | 
| 7 | <span>Lista comprobantes</span> | 7 | <span>Lista comprobantes</span> | 
| 8 | </a> | 8 | </a> | 
| 9 | </div> | 9 | </div> | 
| 10 | <div class="d-none d-sm-block"> | 10 | <div class="d-none d-sm-block"> | 
| 11 | <a | 11 | <button | 
| 12 | class="btn btn-outline-dark mt-5 btn-lg" | 12 | class="btn btn-outline-dark mt-5 btn-lg" | 
| 13 | href="javascript:void()" | 13 | (click)="showTerminal()" | 
| 14 | (click)="showTerminal()" | ||
| 15 | > | 14 | > | 
| 16 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 15 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 17 | </a> | 16 | </button> | 
| 18 | <a class="btn btn-outline-dark mt-5 btn-lg" | 17 | <a class="btn btn-outline-dark mt-5 btn-lg" | 
| 19 | href="javascript:void()" | 18 | href="javascript:void()" | 
| 20 | routerLink="/login" | 19 | routerLink="/login" | 
| 21 | > | 20 | > | 
| 22 | <i class="fa fa-power-off" aria-hidden="true"></i> | 21 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 23 | </a> | 22 | </a> | 
| 24 | </div> | 23 | </div> | 
| 25 | <div class="row d-md-none fixed-bottom"> | 24 | <div class="row d-md-none fixed-bottom"> | 
| 26 | <div class="w-100 d-flex px-3 acciones-mobile"> | 25 | <div class="w-100 d-flex px-3 acciones-mobile"> | 
| 27 | <a | 26 | <button | 
| 28 | class="btn btn-outline-dark btn-lg mr-2" | 27 | class="btn btn-outline-dark btn-lg mr-2" | 
| 29 | href="javascript:void()" | ||
| 30 | (click)="showTerminal()" | 28 | (click)="showTerminal()" | 
| 31 | > | 29 | > | 
| 32 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 30 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 33 | </a> | 31 | </button> | 
| 34 | <a class="btn btn-outline-dark btn-lg" | 32 | <a class="btn btn-outline-dark btn-lg" | 
| 35 | href="javascript:void()" | 33 | href="javascript:void()" | 
| 36 | routerLink="/login" | 34 | routerLink="/login" | 
| 37 | > | 35 | > | 
| 38 | <i class="fa fa-power-off" aria-hidden="true"></i> | 36 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 39 | </a> | 37 | </a> | 
| 40 | </div> | 38 | </div> | 
| 41 | </div> | 39 | </div> | 
| 42 | </div> | 40 | </div> | 
| 43 | 41 | 
src/app/botonera/botonera.component.ts
| 1 | import { Component, NgZone } from '@angular/core'; | 1 | import { Component, NgZone } from '@angular/core'; | 
| 2 | import { BotonServiceService } from 'src/app/boton-service.service'; | 2 | import { BotonServiceService } from 'src/app/boton-service.service'; | 
| 3 | import { Router } from '@angular/router'; | 3 | import { Router } from '@angular/router'; | 
| 4 | import { ModalService } from '../modal/modal.service'; | ||
| 4 | 5 | ||
| 5 | @Component({ | 6 | @Component({ | 
| 6 | selector: 'app-botonera', | 7 | selector: 'app-botonera', | 
| 7 | templateUrl: './botonera.component.html', | 8 | templateUrl: './botonera.component.html', | 
| 8 | styleUrls: ['./botonera.component.scss'] | 9 | styleUrls: ['./botonera.component.scss'] | 
| 9 | }) | 10 | }) | 
| 10 | 11 | ||
| 11 | export class AppBotonera { | 12 | export class AppBotonera { | 
| 12 | botones = new BotonServiceService().getBotones(); | 13 | botones = new BotonServiceService().getBotones(); | 
| 13 | paginas = [1]; | 14 | paginas = [1]; | 
| 14 | 15 | ||
| 15 | constructor(public router: Router, private ngZone: NgZone) { } | 16 | constructor( | 
| 17 | public router: Router, | ||
| 18 | private ngZone: NgZone, | ||
| 19 | private modalService: ModalService) { } | ||
| 16 | 20 | ||
| 17 | showTerminal() { | 21 | showTerminal() { | 
| 18 | alert('No disponible aún'); | 22 | |
| 23 | this.modalService.alert(`No disponible en este momento.`); | ||
| 19 | } | 24 | } | 
| 20 | 25 | ||
| 21 | comprobantes() { | 26 | comprobantes() { | 
| 22 | this.ngZone.run(() => { | 27 | this.ngZone.run(() => { | 
| 23 | this.router.navigate(['/comprobantes']); | 28 | this.router.navigate(['/comprobantes']); | 
| 24 | }); | 29 | }); | 
| 25 | } | 30 | } | 
| 26 | 31 | ||
| 27 | } | 32 | } | 
| 28 | 33 |