Commit 2c878eabc68055f6ebe59964629dfe98ceb949bb
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master(efernandez) See merge request !25
Showing
6 changed files
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 { 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 { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component'; | 8 | import { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component'; |
9 | import { PagoComponent } from './components/pago/pago.component'; | ||
9 | 10 | ||
10 | const routes: Routes = [ | 11 | const routes: Routes = [ |
11 | { path: '', component: HomeComponent }, | 12 | { path: '', component: HomeComponent }, |
12 | { path: 'home', component: HomeComponent }, | 13 | { path: 'home', component: HomeComponent }, |
13 | { path: 'abm-imagenes', component: AmbImagenesComponent }, | 14 | { path: 'abm-imagenes', component: AmbImagenesComponent }, |
14 | { | 15 | { |
15 | path: '', | 16 | path: '', |
16 | component: MasterComponent, | 17 | component: MasterComponent, |
17 | children: [ | 18 | children: [ |
18 | { path: 'inicio', component: InicioComponent }, | 19 | { path: 'inicio', component: InicioComponent }, |
19 | { path: 'busqueda-productos', component: BusquedaProductosComponent }, | 20 | { path: 'busqueda-productos', component: BusquedaProductosComponent }, |
20 | { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent } | 21 | { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent }, |
22 | { path: 'pago', component: PagoComponent } | ||
21 | ] | 23 | ] |
22 | }, | 24 | }, |
23 | { path: '**', redirectTo: '/home', pathMatch: 'full' }, | 25 | { path: '**', redirectTo: '/home', pathMatch: 'full' }, |
24 | ]; | 26 | ]; |
25 | 27 | ||
26 | @NgModule({ | 28 | @NgModule({ |
27 | imports: [RouterModule.forRoot(routes)], | 29 | imports: [RouterModule.forRoot(routes)], |
28 | exports: [RouterModule] | 30 | exports: [RouterModule] |
29 | }) | 31 | }) |
30 | 32 | ||
31 | export class AppRoutingModule { } | 33 | export class AppRoutingModule { } |
32 | 34 |
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 | //#endregion | 9 | //#endregion |
10 | 10 | ||
11 | //#region COMPONENTS | 11 | //#region COMPONENTS |
12 | import { AppComponent } from './app.component'; | 12 | import { AppComponent } from './app.component'; |
13 | import { HeaderComponent } from './components/header/header.component'; | 13 | import { HeaderComponent } from './components/header/header.component'; |
14 | import { SidebarComponent } from './components/sidebar/sidebar.component'; | 14 | import { SidebarComponent } from './components/sidebar/sidebar.component'; |
15 | import { CarouselComponent } from './components/carousel/carousel.component'; | 15 | import { CarouselComponent } from './components/carousel/carousel.component'; |
16 | import { HomeComponent } from './components/home/home.component'; | 16 | import { HomeComponent } from './components/home/home.component'; |
17 | import { InicioComponent } from './components/inicio/inicio.component'; | 17 | import { InicioComponent } from './components/inicio/inicio.component'; |
18 | import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; | 18 | import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; |
19 | import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component'; | 19 | import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component'; |
20 | import { MasterComponent } from './components/master/master.component'; | 20 | import { MasterComponent } from './components/master/master.component'; |
21 | import { PopoverPromosComponent } from './components/popover-promos/popover-promos.component'; | 21 | import { PopoverPromosComponent } from './components/popover-promos/popover-promos.component'; |
22 | import { PopoverSinonimosComponent } from './components/popover-sinonimos/popover-sinonimos.component'; | 22 | import { PopoverSinonimosComponent } from './components/popover-sinonimos/popover-sinonimos.component'; |
23 | import { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component'; | 23 | import { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component'; |
24 | import { PagoComponent } from './components/pago/pago.component'; | ||
24 | //#endregion | 25 | //#endregion |
25 | 26 | ||
26 | @NgModule({ | 27 | @NgModule({ |
27 | declarations: [ | 28 | declarations: [ |
28 | AppComponent, | 29 | AppComponent, |
29 | HeaderComponent, | 30 | HeaderComponent, |
30 | SidebarComponent, | 31 | SidebarComponent, |
31 | CarouselComponent, | 32 | CarouselComponent, |
32 | HomeComponent, | 33 | HomeComponent, |
33 | InicioComponent, | 34 | InicioComponent, |
34 | BusquedaProductosComponent, | 35 | BusquedaProductosComponent, |
35 | ConfirmacionCarritoComponent, | 36 | ConfirmacionCarritoComponent, |
36 | MasterComponent, | 37 | MasterComponent, |
37 | PopoverPromosComponent, | 38 | PopoverPromosComponent, |
38 | PopoverSinonimosComponent, | 39 | PopoverSinonimosComponent, |
39 | AmbImagenesComponent | 40 | AmbImagenesComponent, |
41 | PagoComponent | ||
40 | ], | 42 | ], |
41 | imports: [ | 43 | imports: [ |
42 | BrowserModule, | 44 | BrowserModule, |
43 | AppRoutingModule, | 45 | AppRoutingModule, |
44 | HttpClientModule, | 46 | HttpClientModule, |
45 | FormsModule, | 47 | FormsModule, |
46 | ReactiveFormsModule, | 48 | ReactiveFormsModule, |
47 | ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), | 49 | ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), |
48 | TooltipModule.forRoot(), | 50 | TooltipModule.forRoot(), |
49 | PopoverModule.forRoot() | 51 | PopoverModule.forRoot() |
50 | ], | 52 | ], |
51 | providers: [], | 53 | providers: [], |
52 | bootstrap: [AppComponent] | 54 | bootstrap: [AppComponent] |
53 | }) | 55 | }) |
54 | export class AppModule { } | 56 | export class AppModule { } |
55 | 57 |
src/app/components/pago/pago.component.html
File was created | 1 | <div class="row"> | |
2 | |||
3 | <div class="col-12"> | ||
4 | |||
5 | <!-- NOMBRE DE SECCION --> | ||
6 | <div class="row m-0"> | ||
7 | <div class="col-12 p-0"> | ||
8 | <p class="h5 py-1 bg-gray text-muted text-center">Pago <i class="fa fa-usd"></i></p> | ||
9 | </div> | ||
10 | </div> | ||
11 | |||
12 | <div class="row m-3 d-flex align-items-center"> | ||
13 | <div class="col-4"> | ||
14 | <h1>Mi Compra <i class="fa fa-shopping-cart "></i></h1> | ||
15 | </div> | ||
16 | <div class="col-8"> | ||
17 | <h2>Seleccione medio de pago</h2> | ||
18 | </div> | ||
19 | </div> | ||
20 | |||
21 | </div> | ||
22 | |||
23 | <div class="col-6 card bg-white border-0 shadow rounded mb-auto"> | ||
24 | <h3>Pago con tarjeta de débito/crédito</h3> | ||
25 | <div class="card-body"> | ||
26 | <img src="{{apiUrl}}/imagenes/posnet.jpg"> | ||
27 | </div> | ||
28 | </div> | ||
29 | |||
30 | <div class="col-6 card bg-white border-0 shadow rounded mb-auto"> | ||
31 | <h3>Pago con QR mercado pago</h3> | ||
32 | <div class="card-body"> | ||
33 | <img src="{{apiUrl}}/imagenes/qrmp.jpg" alt=""> | ||
34 | </div> | ||
35 | </div> | ||
36 | </div> | ||
37 |
src/app/components/pago/pago.component.scss
src/app/components/pago/pago.component.spec.ts
File was created | 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
2 | |||
3 | import { PagoComponent } from './pago.component'; | ||
4 | |||
5 | describe('PagoComponent', () => { | ||
6 | let component: PagoComponent; | ||
7 | let fixture: ComponentFixture<PagoComponent>; | ||
8 | |||
9 | beforeEach(async(() => { | ||
10 | TestBed.configureTestingModule({ | ||
11 | declarations: [ PagoComponent ] | ||
12 | }) | ||
13 | .compileComponents(); | ||
14 | })); | ||
15 | |||
16 | beforeEach(() => { | ||
17 | fixture = TestBed.createComponent(PagoComponent); | ||
18 | component = fixture.componentInstance; | ||
19 | fixture.detectChanges(); | ||
20 | }); | ||
21 | |||
22 | it('should create', () => { | ||
23 | expect(component).toBeTruthy(); | ||
24 | }); | ||
25 | }); | ||
26 |
src/app/components/pago/pago.component.ts
File was created | 1 | import { Component, OnInit } from '@angular/core'; | |
2 | import { appSettings } from 'src/etc/AppSettings'; | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'app-pago', | ||
6 | templateUrl: './pago.component.html', | ||
7 | styleUrls: ['./pago.component.scss'] | ||
8 | }) | ||
9 | export class PagoComponent implements OnInit { | ||
10 | |||
11 | private apiUrl: string = appSettings.apiUrl; | ||
12 | |||
13 | constructor() { } | ||
14 | |||
15 | ngOnInit() { | ||
16 | } | ||
17 | |||
18 | } | ||
19 |