Commit 1c76f818a5a99ff489f1110d87ca34d809864ec2
1 parent
0515fbb873
Exists in
master
and in
1 other branch
fix ruta
Showing
5 changed files
with
21 additions
and
12 deletions
 
Show diff stats
angular.json
| 1 | { | 1 | { | 
| 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", | 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", | 
| 3 | "version": 1, | 3 | "version": 1, | 
| 4 | "newProjectRoot": "projects", | 4 | "newProjectRoot": "projects", | 
| 5 | "projects": { | 5 | "projects": { | 
| 6 | "distribucion-comprobantes": { | 6 | "distribucion-comprobantes": { | 
| 7 | "projectType": "application", | 7 | "projectType": "application", | 
| 8 | "schematics": {}, | 8 | "schematics": {}, | 
| 9 | "root": "", | 9 | "root": "", | 
| 10 | "sourceRoot": "src", | 10 | "sourceRoot": "src", | 
| 11 | "prefix": "app", | 11 | "prefix": "app", | 
| 12 | "architect": { | 12 | "architect": { | 
| 13 | "build": { | 13 | "build": { | 
| 14 | "builder": "@angular-devkit/build-angular:browser", | 14 | "builder": "@angular-devkit/build-angular:browser", | 
| 15 | "options": { | 15 | "options": { | 
| 16 | "outputPath": "www", | 16 | "outputPath": "www", | 
| 17 | "index": "src/index.html", | 17 | "index": "src/index.html", | 
| 18 | "main": "src/main.ts", | 18 | "main": "src/main.ts", | 
| 19 | "polyfills": "src/polyfills.ts", | 19 | "polyfills": "src/polyfills.ts", | 
| 20 | "tsConfig": "tsconfig.app.json", | 20 | "tsConfig": "tsconfig.app.json", | 
| 21 | "assets": [ | 21 | "assets": [ | 
| 22 | "src/favicon.ico", | 22 | "src/favicon.ico", | 
| 23 | "src/assets" | 23 | "src/assets" | 
| 24 | ], | 24 | ], | 
| 25 | "styles": [ | 25 | "styles": [ | 
| 26 | "src/styles.css", | 26 | "src/styles.css", | 
| 27 | "node_modules/bootstrap/dist/css/bootstrap.min.css" | 27 | "node_modules/bootstrap/dist/css/bootstrap.min.css", | 
| 28 | "node_modules/font-awesome/css/font-awesome.min.css", | ||
| 29 | "node_modules/ladda/dist/ladda.min.css" | ||
| 28 | ], | 30 | ], | 
| 29 | "scripts": [ | 31 | "scripts": [ | 
| 32 | "node_modules/jquery/jquery.min.js", | ||
| 30 | "node_modules/bootstrap/dist/js/bootstrap.min.js" | 33 | "node_modules/bootstrap/dist/js/bootstrap.min.js" | 
| 31 | ] | 34 | ] | 
| 32 | }, | 35 | }, | 
| 33 | "configurations": { | 36 | "configurations": { | 
| 34 | "production": { | 37 | "production": { | 
| 35 | "fileReplacements": [ | 38 | "fileReplacements": [ | 
| 36 | { | 39 | { | 
| 37 | "replace": "src/environments/environment.ts", | 40 | "replace": "src/environments/environment.ts", | 
| 38 | "with": "src/environments/environment.prod.ts" | 41 | "with": "src/environments/environment.prod.ts" | 
| 39 | } | 42 | } | 
| 40 | ], | 43 | ], | 
| 41 | "optimization": true, | 44 | "optimization": true, | 
| 42 | "outputHashing": "all", | 45 | "outputHashing": "all", | 
| 43 | "sourceMap": false, | 46 | "sourceMap": false, | 
| 44 | "extractCss": true, | 47 | "extractCss": true, | 
| 45 | "namedChunks": false, | 48 | "namedChunks": false, | 
| 46 | "aot": true, | 49 | "aot": true, | 
| 47 | "extractLicenses": true, | 50 | "extractLicenses": true, | 
| 48 | "vendorChunk": false, | 51 | "vendorChunk": false, | 
| 49 | "buildOptimizer": true, | 52 | "buildOptimizer": true, | 
| 50 | "budgets": [ | 53 | "budgets": [ | 
| 51 | { | 54 | { | 
| 52 | "type": "initial", | 55 | "type": "initial", | 
| 53 | "maximumWarning": "2mb", | 56 | "maximumWarning": "2mb", | 
| 54 | "maximumError": "5mb" | 57 | "maximumError": "5mb" | 
| 55 | } | 58 | } | 
| 56 | ] | 59 | ] | 
| 57 | } | 60 | } | 
| 58 | } | 61 | } | 
| 59 | }, | 62 | }, | 
| 60 | "serve": { | 63 | "serve": { | 
| 61 | "builder": "@angular-devkit/build-angular:dev-server", | 64 | "builder": "@angular-devkit/build-angular:dev-server", | 
| 62 | "options": { | 65 | "options": { | 
| 63 | "browserTarget": "distribucion-comprobantes:build" | 66 | "browserTarget": "distribucion-comprobantes:build" | 
| 64 | }, | 67 | }, | 
| 65 | "configurations": { | 68 | "configurations": { | 
| 66 | "production": { | 69 | "production": { | 
| 67 | "browserTarget": "distribucion-comprobantes:build:production" | 70 | "browserTarget": "distribucion-comprobantes:build:production" | 
| 68 | } | 71 | } | 
| 69 | } | 72 | } | 
| 70 | }, | 73 | }, | 
| 71 | "extract-i18n": { | 74 | "extract-i18n": { | 
| 72 | "builder": "@angular-devkit/build-angular:extract-i18n", | 75 | "builder": "@angular-devkit/build-angular:extract-i18n", | 
| 73 | "options": { | 76 | "options": { | 
| 74 | "browserTarget": "distribucion-comprobantes:build" | 77 | "browserTarget": "distribucion-comprobantes:build" | 
| 75 | } | 78 | } | 
| 76 | }, | 79 | }, | 
| 77 | "test": { | 80 | "test": { | 
| 78 | "builder": "@angular-devkit/build-angular:karma", | 81 | "builder": "@angular-devkit/build-angular:karma", | 
| 79 | "options": { | 82 | "options": { | 
| 80 | "main": "src/test.ts", | 83 | "main": "src/test.ts", | 
| 81 | "polyfills": "src/polyfills.ts", | 84 | "polyfills": "src/polyfills.ts", | 
| 82 | "tsConfig": "tsconfig.spec.json", | 85 | "tsConfig": "tsconfig.spec.json", | 
| 83 | "karmaConfig": "karma.conf.js", | 86 | "karmaConfig": "karma.conf.js", | 
| 84 | "assets": [ | 87 | "assets": [ | 
| 85 | "src/favicon.ico", | 88 | "src/favicon.ico", | 
| 86 | "src/assets" | 89 | "src/assets" | 
| 87 | ], | 90 | ], | 
| 88 | "styles": [ | 91 | "styles": [ | 
| 89 | "src/styles.css" | 92 | "src/styles.css" | 
| 90 | ], | 93 | ], | 
| 91 | "scripts": [] | 94 | "scripts": [] | 
| 92 | } | 95 | } | 
| 93 | }, | 96 | }, | 
| 94 | "lint": { | 97 | "lint": { | 
| 95 | "builder": "@angular-devkit/build-angular:tslint", | 98 | "builder": "@angular-devkit/build-angular:tslint", | 
| 96 | "options": { | 99 | "options": { | 
| 97 | "tsConfig": [ | 100 | "tsConfig": [ | 
| 98 | "tsconfig.app.json", | 101 | "tsconfig.app.json", | 
| 99 | "tsconfig.spec.json", | 102 | "tsconfig.spec.json", | 
| 100 | "e2e/tsconfig.json" | 103 | "e2e/tsconfig.json" | 
| 101 | ], | 104 | ], | 
| 102 | "exclude": [ | 105 | "exclude": [ | 
| 103 | "**/node_modules/**" | 106 | "**/node_modules/**" | 
| 104 | ] | 107 | ] | 
| 105 | } | 108 | } | 
| 106 | }, | 109 | }, | 
| 107 | "e2e": { | 110 | "e2e": { | 
| 108 | "builder": "@angular-devkit/build-angular:protractor", | 111 | "builder": "@angular-devkit/build-angular:protractor", | 
| 109 | "options": { | 112 | "options": { | 
| 110 | "protractorConfig": "e2e/protractor.conf.js", | 113 | "protractorConfig": "e2e/protractor.conf.js", | 
| 111 | "devServerTarget": "distribucion-comprobantes:serve" | 114 | "devServerTarget": "distribucion-comprobantes:serve" | 
| 112 | }, | 115 | }, | 
| 113 | "configurations": { | 116 | "configurations": { | 
| 114 | "production": { | 117 | "production": { | 
| 115 | "devServerTarget": "distribucion-comprobantes:serve:production" | 118 | "devServerTarget": "distribucion-comprobantes:serve:production" | 
| 116 | } | 119 | } | 
| 117 | } | 120 | } | 
| 118 | } | 121 | } | 
| 119 | } | 122 | } | 
| 120 | }}, | 123 | }}, | 
| 121 | "defaultProject": "distribucion-comprobantes" | 124 | "defaultProject": "distribucion-comprobantes" | 
| 122 | } | 125 | } | 
| 123 | 126 | 
src/app/app-routing.module.ts
| 1 | import { NgModule } from '@angular/core'; | 1 | import { NgModule } from '@angular/core'; | 
| 2 | import { Routes, RouterModule, Router, NavigationEnd} from '@angular/router'; | 2 | import { Routes, RouterModule, Router, NavigationEnd} from '@angular/router'; | 
| 3 | import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | 3 | import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | 
| 4 | import { AppBotonera } from './botonera/botonera.component'; | 4 | import { AppBotonera } from './botonera/botonera.component'; | 
| 5 | import { LoginComponent } from './login/login.component'; | 5 | import { LoginComponent } from './login/login.component'; | 
| 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; | 
| 7 | 7 | ||
| 8 | const routes: Routes = [ | 8 | const routes: Routes = [ | 
| 9 | { path: 'comprobantes', component: ComprobantesComponent, pathMatch: 'full' }, | 9 | { path: 'comprobantes', component: ComprobantesComponent}, | 
| 10 | { path: '', redirectTo: 'home', pathMatch: 'full' }, | 10 | { path: '', redirectTo: 'home', pathMatch: 'full' }, | 
| 11 | { path: 'home', component: AppBotonera }, | 11 | { path: 'home', component: AppBotonera }, | 
| 12 | { path: 'login', component: LoginComponent } | 12 | { path: 'login', component: LoginComponent } | 
| 13 | ]; | 13 | ]; | 
| 14 | 14 | ||
| 15 | @NgModule({ | 15 | @NgModule({ | 
| 16 | imports: [RouterModule.forRoot(routes)], | 16 | imports: [RouterModule.forRoot(routes)], | 
| 17 | exports: [RouterModule] | 17 | exports: [RouterModule] | 
| 18 | }) | 18 | }) | 
| 19 | export class AppRoutingModule { | 19 | export class AppRoutingModule { | 
| 20 | 20 | ||
| 21 | constructor(private router: Router, private modalService: NgbModal) { | 21 | constructor(public router: Router, public modalService: NgbModal) { | 
| 22 | 22 | ||
| 23 | // this.router.events.subscribe(() => { | 23 | this.router.events.subscribe(() => { | 
| 24 | // this.modalService.dismissAll(); | 24 | this.modalService.dismissAll(); | 
| 25 | // }); | 25 | }); | 
| 26 | } | 26 | } | 
| 27 | 27 | ||
| 28 | } | 28 | } | 
| 29 | 29 | 
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" routerLink="/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 | <a | 
| 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 | href="javascript:void()" | 
| 14 | (click)="showTerminal()" | 14 | (click)="showTerminal()" | 
| 15 | > | 15 | > | 
| 16 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 16 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 17 | </a> | 17 | </a> | 
| 18 | <a class="btn btn-outline-dark mt-5 btn-lg" | 18 | <a class="btn btn-outline-dark mt-5 btn-lg" | 
| 19 | href="javascript:void()" | 19 | href="javascript:void()" | 
| 20 | routerLink="/login" | 20 | routerLink="/login" | 
| 21 | > | 21 | > | 
| 22 | <i class="fa fa-power-off" aria-hidden="true"></i> | 22 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 23 | </a> | 23 | </a> | 
| 24 | </div> | 24 | </div> | 
| 25 | <div class="row d-md-none fixed-bottom"> | 25 | <div class="row d-md-none fixed-bottom"> | 
| 26 | <div class="w-100 d-flex px-3 acciones-mobile"> | 26 | <div class="w-100 d-flex px-3 acciones-mobile"> | 
| 27 | <a | 27 | <a | 
| 28 | class="btn btn-outline-dark btn-lg mr-2" | 28 | class="btn btn-outline-dark btn-lg mr-2" | 
| 29 | href="javascript:void()" | 29 | href="javascript:void()" | 
| 30 | (click)="showTerminal()" | 30 | (click)="showTerminal()" | 
| 31 | > | 31 | > | 
| 32 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 32 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 33 | </a> | 33 | </a> | 
| 34 | <a class="btn btn-outline-dark btn-lg" | 34 | <a class="btn btn-outline-dark btn-lg" | 
| 35 | href="javascript:void()" | 35 | href="javascript:void()" | 
| 36 | routerLink="/login" | 36 | routerLink="/login" | 
| 37 | > | 37 | > | 
| 38 | <i class="fa fa-power-off" aria-hidden="true"></i> | 38 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 39 | </a> | 39 | </a> | 
| 40 | </div> | 40 | </div> | 
| 41 | </div> | 41 | </div> | 
| 42 | </div> | 42 | </div> | 
| 43 | 43 | 
src/app/botonera/botonera.component.ts
| 1 | import { Component } 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 | 4 | ||
| 4 | @Component({ | 5 | @Component({ | 
| 5 | selector: 'app-botonera', | 6 | selector: 'app-botonera', | 
| 6 | templateUrl: './botonera.component.html', | 7 | templateUrl: './botonera.component.html', | 
| 7 | styleUrls: ['./botonera.component.scss'] | 8 | styleUrls: ['./botonera.component.scss'] | 
| 8 | }) | 9 | }) | 
| 9 | 10 | ||
| 10 | export class AppBotonera { | 11 | export class AppBotonera { | 
| 11 | botones = new BotonServiceService().getBotones(); | 12 | botones = new BotonServiceService().getBotones(); | 
| 12 | paginas = [1]; | 13 | paginas = [1]; | 
| 13 | 14 | ||
| 15 | constructor(public router: Router, private ngZone: NgZone) { } | ||
| 16 | |||
| 14 | showTerminal() { | 17 | showTerminal() { | 
| 15 | alert('No disponible aún'); | 18 | alert('No disponible aún'); | 
| 16 | } | 19 | } | 
| 17 | 20 | ||
| 21 | comprobantes() { | ||
| 22 | this.ngZone.run(() => { | ||
| 23 | this.router.navigate(['/comprobantes']); | ||
| 24 | }); | ||
| 25 | } | ||
| 26 | |||
| 18 | } | 27 | } | 
| 19 | 28 | 
src/styles.css
| 1 | /* You can add global styles to this file, and also import other style files */ | 1 | /* You can add global styles to this file, and also import other style files */ | 
| 2 | @import '../node_modules/font-awesome/css/font-awesome.min.css'; | ||
| 3 | @import '../node_modules/ladda/dist/ladda.min.css'; | ||
| 4 | @import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; | ||
| 5 | 2 | ||
| 6 | body { | 3 | body { | 
| 7 | background-color: #cccccc; | 4 | background-color: #cccccc !important; | 
| 8 | } | 5 | } | 
| 9 | 6 |