Commit da1fa303aa5ce81df1b1fd2ad34f9c8127684e16
1 parent
4aa4e681b5
Exists in
develop
ng lint
Showing
5 changed files
with
15 additions
and
18 deletions
Show diff stats
src/app/app-routing.module.ts
| 1 | import { NgModule } from '@angular/core'; | 1 | import { NgModule } from '@angular/core'; |
| 2 | import { Routes, RouterModule } from '@angular/router'; | 2 | import { Routes, RouterModule } from '@angular/router'; |
| 3 | import { SplashScreenComponent } from './modules/splash-screen/splash-screen.component'; | 3 | import { SplashScreenComponent } from './modules/splash-screen/splash-screen.component'; |
| 4 | import { AdminComponent } from './modules/admin/admin.component'; | 4 | import { AdminComponent } from './modules/admin/admin.component'; |
| 5 | 5 | ||
| 6 | const routes: Routes = [ | 6 | const routes: Routes = [ |
| 7 | { path: '', component: SplashScreenComponent }, | 7 | { path: '', component: SplashScreenComponent }, |
| 8 | { | 8 | { |
| 9 | path: '', | 9 | path: '', |
| 10 | component: AdminComponent, | 10 | component: AdminComponent, |
| 11 | children: [ | 11 | children: [ |
| 12 | { | 12 | { |
| 13 | path: 'info-formas-pago', | 13 | path: 'info-formas-pago', |
| 14 | loadChildren: () => import('./modules/info-formas-pago/info-formas-pago.module').then(m => m.InfoFormasPagoModule) | 14 | loadChildren: () => import('./modules/info-formas-pago/info-formas-pago.module').then(m => m.InfoFormasPagoModule) |
| 15 | }, | 15 | }, |
| 16 | { | 16 | { |
| 17 | path: 'indicaciones-pago-tarjeta', | 17 | path: 'indicaciones-pago-tarjeta', |
| 18 | loadChildren: () => import('./modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta.module').then(m => m.indicacionesPagoTarjetaModule) | 18 | loadChildren: () => import('./modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta.module').then(m => m.IndicacionesPagoTarjetaModule) |
| 19 | }, | 19 | }, |
| 20 | { | 20 | { |
| 21 | path: 'opcion-pedido', | 21 | path: 'opcion-pedido', |
| 22 | loadChildren: () => import('./modules/opcion-pedido/opcion-pedido.module').then(m => m.OpcionPedidoModule) | 22 | loadChildren: () => import('./modules/opcion-pedido/opcion-pedido.module').then(m => m.OpcionPedidoModule) |
| 23 | }, | 23 | }, |
| 24 | { | 24 | { |
| 25 | path: 'seleccion-articulos', | 25 | path: 'seleccion-articulos', |
| 26 | loadChildren: () => import('./modules/seleccion-articulos/seleccion-articulos.module').then(m => m.SeleccionArticulosModule) | 26 | loadChildren: () => import('./modules/seleccion-articulos/seleccion-articulos.module').then(m => m.SeleccionArticulosModule) |
| 27 | }, | 27 | }, |
| 28 | { | 28 | { |
| 29 | path: 'carrito', | 29 | path: 'carrito', |
| 30 | loadChildren: () => import('./modules/carrito/carrito.module').then(m => m.CarritoModule) | 30 | loadChildren: () => import('./modules/carrito/carrito.module').then(m => m.CarritoModule) |
| 31 | }, | 31 | }, |
| 32 | { | 32 | { |
| 33 | path: 'forma-pago', | 33 | path: 'forma-pago', |
| 34 | loadChildren: () => import('./modules/forma-pago/forma-pago.module').then(m => m.FormaPagoModule) | 34 | loadChildren: () => import('./modules/forma-pago/forma-pago.module').then(m => m.FormaPagoModule) |
| 35 | }, | 35 | }, |
| 36 | { | 36 | { |
| 37 | path: 'pago-electronico', | 37 | path: 'pago-electronico', |
| 38 | loadChildren: () => import('./modules/pago-electronico/pago-electronico.module').then(m => m.PagoElectronicoModule) | 38 | loadChildren: () => import('./modules/pago-electronico/pago-electronico.module').then(m => m.PagoElectronicoModule) |
| 39 | }, | 39 | }, |
| 40 | { | 40 | { |
| 41 | path: 'pago-tarjeta', | 41 | path: 'pago-tarjeta', |
| 42 | loadChildren: () => import('./modules/pago-tarjeta/pago-tarjeta.module').then(m => m.PagoTarjetaModule) | 42 | loadChildren: () => import('./modules/pago-tarjeta/pago-tarjeta.module').then(m => m.PagoTarjetaModule) |
| 43 | }, | 43 | }, |
| 44 | ] | 44 | ] |
| 45 | }, | 45 | }, |
| 46 | { | 46 | { |
| 47 | path: 'mensaje-final', | 47 | path: 'mensaje-final', |
| 48 | loadChildren: () => import('./modules/mensaje-final/mensaje-final.module').then(m => m.MensajeFinalModule) | 48 | loadChildren: () => import('./modules/mensaje-final/mensaje-final.module').then(m => m.MensajeFinalModule) |
| 49 | }, | 49 | }, |
| 50 | { | 50 | { |
| 51 | path: 'pedidos-salientes', | 51 | path: 'pedidos-salientes', |
| 52 | loadChildren: () => import('./modules/pedidos-salientes/pedidos-salientes.module').then(m => m.PedidosSalientesModule) | 52 | loadChildren: () => import('./modules/pedidos-salientes/pedidos-salientes.module').then(m => m.PedidosSalientesModule) |
| 53 | }, | 53 | }, |
| 54 | { | 54 | { |
| 55 | path: 'comanda', | 55 | path: 'comanda', |
| 56 | loadChildren: () => import('./modules/comanda/comanda.module').then(m => m.ComandaModule) | 56 | loadChildren: () => import('./modules/comanda/comanda.module').then(m => m.ComandaModule) |
| 57 | }, | 57 | }, |
| 58 | { | 58 | { |
| 59 | path: 'cancelar-compra', | 59 | path: 'cancelar-compra', |
| 60 | loadChildren: () => import('./shared/cancelar-compra/cancelar-compra.module').then(m => m.CancelarCompraModule) | 60 | loadChildren: () => import('./shared/cancelar-compra/cancelar-compra.module').then(m => m.CancelarCompraModule) |
| 61 | }, | 61 | }, |
| 62 | { path: '**', redirectTo: '', pathMatch: 'full' }, | 62 | { path: '**', redirectTo: '', pathMatch: 'full' }, |
| 63 | ]; | 63 | ]; |
| 64 | 64 | ||
| 65 | @NgModule({ | 65 | @NgModule({ |
| 66 | imports: [RouterModule.forRoot(routes, { useHash: true })], | 66 | imports: [RouterModule.forRoot(routes, { useHash: true })], |
| 67 | exports: [RouterModule] | 67 | exports: [RouterModule] |
| 68 | }) | 68 | }) |
| 69 | export class AppRoutingModule { } | 69 | export class AppRoutingModule { } |
| 70 | 70 |
src/app/modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta-routing.module.ts
| 1 | import { NgModule } from '@angular/core'; | 1 | import { NgModule } from '@angular/core'; |
| 2 | import { Routes, RouterModule } from '@angular/router'; | 2 | import { Routes, RouterModule } from '@angular/router'; |
| 3 | import { IndicacionesPagoTarjetaComponent } from './indicaciones-pago-tarjeta.component'; | 3 | import { IndicacionesPagoTarjetaComponent } from './indicaciones-pago-tarjeta.component'; |
| 4 | 4 | ||
| 5 | const routes: Routes = [ | 5 | const routes: Routes = [ |
| 6 | { path: '', component: IndicacionesPagoTarjetaComponent } | 6 | { path: '', component: IndicacionesPagoTarjetaComponent } |
| 7 | ]; | 7 | ]; |
| 8 | 8 | ||
| 9 | @NgModule({ | 9 | @NgModule({ |
| 10 | imports: [RouterModule.forChild(routes)], | 10 | imports: [RouterModule.forChild(routes)], |
| 11 | exports: [RouterModule] | 11 | exports: [RouterModule] |
| 12 | }) | 12 | }) |
| 13 | export class indicacionesPagoTarjetaRoutingModule { } | 13 | export class IndicacionesPagoTarjetaRoutingModule { } |
| 14 | 14 |
src/app/modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta.component.ts
| 1 | import { Component, OnInit, OnChanges } from '@angular/core'; | 1 | import { Component, OnInit, OnChanges } from '@angular/core'; |
| 2 | 2 | ||
| 3 | @Component({ | 3 | @Component({ |
| 4 | selector: 'app-indicaciones-pago-tarjeta', | 4 | selector: 'app-indicaciones-pago-tarjeta', |
| 5 | templateUrl: './indicaciones-pago-tarjeta.component.html', | 5 | templateUrl: './indicaciones-pago-tarjeta.component.html', |
| 6 | styleUrls: ['./indicaciones-pago-tarjeta.component.scss'] | 6 | styleUrls: ['./indicaciones-pago-tarjeta.component.scss'] |
| 7 | }) | 7 | }) |
| 8 | export class IndicacionesPagoTarjetaComponent implements OnInit { | 8 | export class IndicacionesPagoTarjetaComponent implements OnInit { |
| 9 | mediaPantalla:boolean; | 9 | mediaPantalla: boolean; |
| 10 | constructor() { } | 10 | constructor() { } |
| 11 | 11 | ||
| 12 | ngOnInit() {} | 12 | ngOnInit() {} |
| 13 | |||
| 14 | ngOnChanges() { | ||
| 15 | } | ||
| 16 | } | 13 | } |
| 17 | 14 |
src/app/modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta.module.ts
| 1 | import { NgModule } from '@angular/core'; | 1 | import { NgModule } from '@angular/core'; |
| 2 | import { CommonModule } from '@angular/common'; | 2 | import { CommonModule } from '@angular/common'; |
| 3 | 3 | ||
| 4 | import { indicacionesPagoTarjetaRoutingModule } from './indicaciones-pago-tarjeta-routing.module'; | 4 | import { IndicacionesPagoTarjetaRoutingModule } from './indicaciones-pago-tarjeta-routing.module'; |
| 5 | import { IndicacionesPagoTarjetaComponent } from './indicaciones-pago-tarjeta.component'; | 5 | import { IndicacionesPagoTarjetaComponent } from './indicaciones-pago-tarjeta.component'; |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | @NgModule({ | 8 | @NgModule({ |
| 9 | declarations: [IndicacionesPagoTarjetaComponent], | 9 | declarations: [IndicacionesPagoTarjetaComponent], |
| 10 | imports: [ | 10 | imports: [ |
| 11 | CommonModule, | 11 | CommonModule, |
| 12 | indicacionesPagoTarjetaRoutingModule | 12 | IndicacionesPagoTarjetaRoutingModule |
| 13 | ] | 13 | ] |
| 14 | }) | 14 | }) |
| 15 | export class indicacionesPagoTarjetaModule { } | 15 | export class IndicacionesPagoTarjetaModule { } |
| 16 | 16 |
src/app/modules/mensaje-final/mensaje-final.component.ts
| 1 | import { Component, OnInit } from "@angular/core"; | 1 | import { Component, OnInit } from '@angular/core'; |
| 2 | import { ArticuloService } from "src/app/services/articulo/articulo.service"; | 2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
| 3 | import { Router } from "@angular/router"; | 3 | import { Router } from '@angular/router'; |
| 4 | 4 | ||
| 5 | @Component({ | 5 | @Component({ |
| 6 | selector: "app-mensaje-final", | 6 | selector: 'app-mensaje-final', |
| 7 | templateUrl: "./mensaje-final.component.html", | 7 | templateUrl: './mensaje-final.component.html', |
| 8 | styleUrls: ["./mensaje-final.component.scss"] | 8 | styleUrls: ['./mensaje-final.component.scss'] |
| 9 | }) | 9 | }) |
| 10 | export class MensajeFinalComponent implements OnInit { | 10 | export class MensajeFinalComponent implements OnInit { |
| 11 | timer: any; | 11 | timer: any; |
| 12 | 12 | ||
| 13 | constructor( | 13 | constructor( |
| 14 | public articuloService: ArticuloService, | 14 | public articuloService: ArticuloService, |
| 15 | private router: Router | 15 | private router: Router |
| 16 | ) {} | 16 | ) {} |
| 17 | 17 | ||
| 18 | ngOnInit() { | 18 | ngOnInit() { |
| 19 | this.mediaPantalla(); | 19 | this.mediaPantalla(); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | OnDestroy() {} | 22 | OnDestroy() {} |
| 23 | 23 | ||
| 24 | goToSplash() { | 24 | goToSplash() { |
| 25 | this.articuloService.cleanShoppingCar(); | 25 | this.articuloService.cleanShoppingCar(); |
| 26 | this.router.navigate([""]); | 26 | this.router.navigate(['']); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | mediaPantalla() { | 29 | mediaPantalla() { |
| 30 | if ($("body").hasClass("media-pantalla")) { | 30 | if ($('body').hasClass('media-pantalla')) { |
| 31 | $("body").removeClass("media-pantalla"); | 31 | $('body').removeClass('media-pantalla'); |
| 32 | } | 32 | } |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | 35 |