Commit dbb7642a8842473ef16565c47ddb38f64a52812b

Authored by Eric Fernandez
1 parent 62e2409095
Exists in master

first commit

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 { HomeComponent } from './components/home/home.component'; 3 import { HomeComponent } from './components/home/home.component';
4 import { InicioComponent } from './components/inicio/inicio.component'; 4 import { InicioComponent } from './components/inicio/inicio.component';
5 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; 5 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component';
6 import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component'; 6 import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component';
7 import { MasterComponent } from './components/master/master.component'; 7 import { MasterComponent } from './components/master/master.component';
8 import { PagoComponent } from './components/pago/pago.component'; 8 import { PagoComponent } from './components/pago/pago.component';
9 import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component'; 9 import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component';
10 import { MensajeFinalComponent } from './components/mensaje-final/mensaje-final.component'; 10 import { MensajeFinalComponent } from './components/mensaje-final/mensaje-final.component';
11 import { ComandaComponent } from './components/comanda/comanda.component'; 11 import { ComandaComponent } from './components/comanda/comanda.component';
12 import { PedidosSalientesComponent } from './components/pedidos-salientes/pedidos-salientes.component';
12 13
13 const routes: Routes = [ 14 const routes: Routes = [
14 { path: '', component: HomeComponent }, 15 { path: '', component: HomeComponent },
15 { path: 'home', component: HomeComponent }, 16 { path: 'home', component: HomeComponent },
16 { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent }, 17 { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent },
17 { path: 'pago', component: PagoComponent }, 18 { path: 'pago', component: PagoComponent },
18 { path: 'cancelar-compra', component: CancelarCompraComponent }, 19 { path: 'cancelar-compra', component: CancelarCompraComponent },
19 { path: 'mensaje-final', component: MensajeFinalComponent }, 20 { path: 'mensaje-final', component: MensajeFinalComponent },
20 { path: 'comanda', component: ComandaComponent }, 21 { path: 'comanda', component: ComandaComponent },
22 { path: 'pedidos-salientes', component: PedidosSalientesComponent },
21 { 23 {
22 path: '', 24 path: '',
23 component: MasterComponent, 25 component: MasterComponent,
24 children: [ 26 children: [
25 { path: 'inicio', component: InicioComponent }, 27 { path: 'inicio', component: InicioComponent },
26 { path: 'busqueda-productos', component: BusquedaProductosComponent } 28 { path: 'busqueda-productos', component: BusquedaProductosComponent }
27 ] 29 ]
28 }, 30 },
29 { path: '**', redirectTo: '/home', pathMatch: 'full' }, 31 { path: '**', redirectTo: '/home', pathMatch: 'full' },
30 ]; 32 ];
31 33
32 @NgModule({ 34 @NgModule({
33 imports: [RouterModule.forRoot(routes, {onSameUrlNavigation: 'reload'})], 35 imports: [RouterModule.forRoot(routes, {onSameUrlNavigation: 'reload'})],
34 exports: [RouterModule] 36 exports: [RouterModule]
35 }) 37 })
36 38
37 export class AppRoutingModule { } 39 export class AppRoutingModule { }
38 40
src/app/app.module.ts
1 //#region MODULES 1 //#region MODULES
2 import { BrowserModule } from '@angular/platform-browser'; 2 import { BrowserModule } from '@angular/platform-browser';
3 import { NgModule } from '@angular/core'; 3 import { NgModule } from '@angular/core';
4 import { AppRoutingModule } from './app-routing.module'; 4 import { AppRoutingModule } from './app-routing.module';
5 import { HttpClientModule } from '@angular/common/http'; 5 import { HttpClientModule } from '@angular/common/http';
6 import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 6 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7 import { TooltipModule } from 'ngx-bootstrap/tooltip'; 7 import { TooltipModule } from 'ngx-bootstrap/tooltip';
8 import { PopoverModule } from 'ngx-bootstrap/popover'; 8 import { PopoverModule } from 'ngx-bootstrap/popover';
9 import { CarouselModule } from 'ngx-bootstrap/carousel'; 9 import { CarouselModule } from 'ngx-bootstrap/carousel';
10 import { PaginationModule } from 'ngx-bootstrap/pagination'; 10 import { PaginationModule } from 'ngx-bootstrap/pagination';
11 //#endregion 11 //#endregion
12 12
13 //#region Keyboard 13 //#region Keyboard
14 import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 14 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
15 import { MatButtonModule } from '@angular/material/button'; 15 import { MatButtonModule } from '@angular/material/button';
16 import { MatKeyboardModule } from '@ngx-material-keyboard/core'; 16 import { MatKeyboardModule } from '@ngx-material-keyboard/core';
17 //#endregion 17 //#endregion
18 18
19 //#region COMPONENTS 19 //#region COMPONENTS
20 import { AppComponent } from './app.component'; 20 import { AppComponent } from './app.component';
21 import { HeaderComponent } from './components/header/header.component'; 21 import { HeaderComponent } from './components/header/header.component';
22 import { SidebarComponent } from './components/sidebar/sidebar.component'; 22 import { SidebarComponent } from './components/sidebar/sidebar.component';
23 import { HomeComponent } from './components/home/home.component'; 23 import { HomeComponent } from './components/home/home.component';
24 import { InicioComponent } from './components/inicio/inicio.component'; 24 import { InicioComponent } from './components/inicio/inicio.component';
25 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; 25 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component';
26 import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component'; 26 import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component';
27 import { MasterComponent } from './components/master/master.component'; 27 import { MasterComponent } from './components/master/master.component';
28 import { PopoverPromosComponent } from './components/popover-promos/popover-promos.component'; 28 import { PopoverPromosComponent } from './components/popover-promos/popover-promos.component';
29 import { PopoverSinonimosComponent } from './components/popover-sinonimos/popover-sinonimos.component'; 29 import { PopoverSinonimosComponent } from './components/popover-sinonimos/popover-sinonimos.component';
30 import { PagoComponent } from './components/pago/pago.component'; 30 import { PagoComponent } from './components/pago/pago.component';
31 import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component'; 31 import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component';
32 import { MensajeFinalComponent } from './components/mensaje-final/mensaje-final.component'; 32 import { MensajeFinalComponent } from './components/mensaje-final/mensaje-final.component';
33 import { ComandaComponent } from './components/comanda/comanda.component'; 33 import { ComandaComponent } from './components/comanda/comanda.component';
34 import { PedidosSalientesComponent } from './components/pedidos-salientes/pedidos-salientes.component';
34 //#endregion 35 //#endregion
35 36
36 @NgModule({ 37 @NgModule({
37 declarations: [ 38 declarations: [
38 AppComponent, 39 AppComponent,
39 HeaderComponent, 40 HeaderComponent,
40 SidebarComponent, 41 SidebarComponent,
41 HomeComponent, 42 HomeComponent,
42 InicioComponent, 43 InicioComponent,
43 BusquedaProductosComponent, 44 BusquedaProductosComponent,
44 ConfirmacionCarritoComponent, 45 ConfirmacionCarritoComponent,
45 MasterComponent, 46 MasterComponent,
46 PopoverPromosComponent, 47 PopoverPromosComponent,
47 PopoverSinonimosComponent, 48 PopoverSinonimosComponent,
48 PagoComponent, 49 PagoComponent,
49 CancelarCompraComponent, 50 CancelarCompraComponent,
50 MensajeFinalComponent, 51 MensajeFinalComponent,
51 ComandaComponent 52 ComandaComponent,
53 PedidosSalientesComponent
52 ], 54 ],
53 imports: [ 55 imports: [
54 BrowserModule, 56 BrowserModule,
55 AppRoutingModule, 57 AppRoutingModule,
56 HttpClientModule, 58 HttpClientModule,
57 FormsModule, 59 FormsModule,
58 ReactiveFormsModule, 60 ReactiveFormsModule,
59 ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), 61 ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
60 TooltipModule.forRoot(), 62 TooltipModule.forRoot(),
61 PopoverModule.forRoot(), 63 PopoverModule.forRoot(),
62 BrowserAnimationsModule, 64 BrowserAnimationsModule,
63 MatKeyboardModule, 65 MatKeyboardModule,
64 MatButtonModule, 66 MatButtonModule,
65 CarouselModule.forRoot(), 67 CarouselModule.forRoot(),
66 PaginationModule.forRoot() 68 PaginationModule.forRoot()
67 ], 69 ],
68 providers: [], 70 providers: [],
69 bootstrap: [AppComponent] 71 bootstrap: [AppComponent]
70 }) 72 })
71 export class AppModule { } 73 export class AppModule { }
72 74
src/app/components/pedidos-salientes/pedidos-salientes.component.html
File was created 1 <div class="bg-primary-gradient">
2 <div class="row">
3 <div class="mx-auto my-5">
4 <h1>Su pedido ya esta listo.</h1>
5 </div>
6 </div>
7 </div>
8
src/app/components/pedidos-salientes/pedidos-salientes.component.scss
src/app/components/pedidos-salientes/pedidos-salientes.component.spec.ts
File was created 1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
3 import { PedidosSalientesComponent } from './pedidos-salientes.component';
4
5 describe('PedidosSalientesComponent', () => {
6 let component: PedidosSalientesComponent;
7 let fixture: ComponentFixture<PedidosSalientesComponent>;
8
9 beforeEach(async(() => {
10 TestBed.configureTestingModule({
11 declarations: [ PedidosSalientesComponent ]
12 })
13 .compileComponents();
14 }));
15
16 beforeEach(() => {
17 fixture = TestBed.createComponent(PedidosSalientesComponent);
18 component = fixture.componentInstance;
19 fixture.detectChanges();
20 });
21
22 it('should create', () => {
23 expect(component).toBeTruthy();
24 });
25 });
26
src/app/components/pedidos-salientes/pedidos-salientes.component.ts
File was created 1 import { Component, OnInit } from '@angular/core';
2
3 @Component({
4 selector: 'app-pedidos-salientes',
5 templateUrl: './pedidos-salientes.component.html',
6 styleUrls: ['./pedidos-salientes.component.scss']
7 })
8 export class PedidosSalientesComponent implements OnInit {
9
10 constructor() { }
11
12 ngOnInit() {
13 }
14
15 }
16