Commit 111ec4b8a31c877f3f9bdf71bafb862103968232

Authored by Marcelo Puebla
1 parent 10f7e2aa3d
Exists in master and in 1 other branch validar_pve

Agregado componente para cancelar la compra del carrito.

src/app/app-routing.module.ts
... ... @@ -7,12 +7,14 @@ import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/
7 7 import { MasterComponent } from './components/master/master.component';
8 8 import { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component';
9 9 import { PagoComponent } from './components/pago/pago.component';
  10 +import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component';
10 11  
11 12 const routes: Routes = [
12 13 { path: '', component: HomeComponent },
13 14 { path: 'home', component: HomeComponent },
14 15 { path: 'abm-imagenes', component: AmbImagenesComponent },
15 16 { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent },
  17 + { path: 'cancelar-compra', component: CancelarCompraComponent },
16 18 {
17 19 path: '',
18 20 component: MasterComponent,
src/app/app.module.ts
... ... @@ -21,6 +21,7 @@ import { PopoverPromosComponent } from './components/popover-promos/popover-prom
21 21 import { PopoverSinonimosComponent } from './components/popover-sinonimos/popover-sinonimos.component';
22 22 import { AmbImagenesComponent } from './components/amb-imagenes/amb-imagenes.component';
23 23 import { PagoComponent } from './components/pago/pago.component';
  24 +import { CancelarCompraComponent } from './components/cancelar-compra/cancelar-compra.component';
24 25 //#endregion
25 26  
26 27 @NgModule({
... ... @@ -36,7 +37,8 @@ import { PagoComponent } from './components/pago/pago.component';
36 37 PopoverPromosComponent,
37 38 PopoverSinonimosComponent,
38 39 AmbImagenesComponent,
39   - PagoComponent
  40 + PagoComponent,
  41 + CancelarCompraComponent
40 42 ],
41 43 imports: [
42 44 BrowserModule,
src/app/components/cancelar-compra/cancelar-compra.component.html
... ... @@ -0,0 +1,67 @@
  1 +<div class="container-fluid background-image">
  2 + <div class="row">
  3 + <div class="col p-0">
  4 + <div class="vh-100 d-flex align-content-strech flex-wrap disable-user-select">
  5 +
  6 + <!-- HEADER -->
  7 + <div class="row m-0 w-100 bg-primary-gradient-horizontal">
  8 + <div class="col-6 bg-white rounded-bottom-right">
  9 + <div class="row h-100">
  10 + <div class="col d-flex align-items-center">
  11 + <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logoaxion.png">
  12 + </div>
  13 + </div>
  14 + </div>
  15 + </div>
  16 +
  17 + <!-- INFO DE BIENVENIDA -->
  18 + <div class="row w-100">
  19 + <div class="col-4 offset-2">
  20 + <div class="row h-100">
  21 + <div class="col-12 py-4">
  22 + <div class="card h-100 rounded">
  23 + <img src="{{apiUrl}}/imagenes/atencion.svg" class="w-50 mx-auto my-auto">
  24 + <div class="my-auto">
  25 + <p class="display-3 card-text text-center font-weight-bold">
  26 + Atención
  27 + </p>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + </div>
  32 + </div>
  33 + <div class="col-6 text-center text-white my-auto">
  34 + <p class="display-3 font-weight-bold mb-5">
  35 + Usted esta a punto<br>de cancelar su compra
  36 + </p>
  37 + <p class="display-4 m-0">
  38 + Perderá los datos y<br>productos ya ingresados
  39 + </p>
  40 + <div class="d-flex justify-content-center mt-2">
  41 + <button type="button" class="btn btn-lg btn-light shadow mr-4">
  42 + <span class="pr-2">Volver a mi compra</span>
  43 + <i class="fa fa-undo text-warning"></i>
  44 + </button>
  45 + <button type="button" class="btn btn-lg btn-light shadow ml-4">
  46 + <span class="pr-2">Si, terminar</span>
  47 + <i class="fa fa-times text-danger"></i>
  48 + </button>
  49 + </div>
  50 + </div>
  51 + </div>
  52 +
  53 + <!-- FOOTER -->
  54 + <div class="row m-0 w-100 bg-gray">
  55 + <div class="col-6 bg-white offset-6 rounded-top-left">
  56 + <div class="row h-100">
  57 + <div class="col d-flex align-items-center">
  58 + <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logodebo.png">
  59 + </div>
  60 + </div>
  61 + </div>
  62 + </div>
  63 +
  64 + </div>
  65 + </div>
  66 + </div>
  67 +</div>
src/app/components/cancelar-compra/cancelar-compra.component.scss
src/app/components/cancelar-compra/cancelar-compra.component.spec.ts
... ... @@ -0,0 +1,25 @@
  1 +import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  2 +
  3 +import { CancelarCompraComponent } from './cancelar-compra.component';
  4 +
  5 +describe('CancelarCompraComponent', () => {
  6 + let component: CancelarCompraComponent;
  7 + let fixture: ComponentFixture<CancelarCompraComponent>;
  8 +
  9 + beforeEach(async(() => {
  10 + TestBed.configureTestingModule({
  11 + declarations: [ CancelarCompraComponent ]
  12 + })
  13 + .compileComponents();
  14 + }));
  15 +
  16 + beforeEach(() => {
  17 + fixture = TestBed.createComponent(CancelarCompraComponent);
  18 + component = fixture.componentInstance;
  19 + fixture.detectChanges();
  20 + });
  21 +
  22 + it('should create', () => {
  23 + expect(component).toBeTruthy();
  24 + });
  25 +});
src/app/components/cancelar-compra/cancelar-compra.component.ts
... ... @@ -0,0 +1,18 @@
  1 +import { Component, OnInit } from '@angular/core';
  2 +import { appSettings } from 'src/etc/AppSettings';
  3 +
  4 +@Component({
  5 + selector: 'app-cancelar-compra',
  6 + templateUrl: './cancelar-compra.component.html',
  7 + styleUrls: ['./cancelar-compra.component.scss']
  8 +})
  9 +export class CancelarCompraComponent implements OnInit {
  10 +
  11 + private apiUrl: string = appSettings.apiUrl;
  12 +
  13 + constructor() { }
  14 +
  15 + ngOnInit() {
  16 + }
  17 +
  18 +}
src/app/components/home/home.component.scss
... ... @@ -1,25 +0,0 @@
1   -.background-image {
2   - background-image: url(http://10.231.45.117:4705/autoservicio/imagenes/homeBackground.jpg);
3   - background-repeat: no-repeat;
4   - background-size: cover;
5   -}
6   -
7   -.w-20 {
8   - width: 20% !important;
9   -}
10   -
11   -.rounded-bottom-right {
12   - border-bottom-right-radius: 10rem;
13   - &:before {
14   - border-radius: 0 40px 40px 0;
15   - background-color: #fff;
16   - }
17   -}
18   -
19   -.rounded-top-left {
20   - border-top-left-radius: 10rem;
21   -}
22   -
23   -.bg-gray {
24   - background-color: #cccccc;
25   -}
... ... @@ -116,3 +116,25 @@ body {
116 116 .sidebar {
117 117 right: 0;
118 118 }
  119 +
  120 +.background-image {
  121 + background-image: url(http://10.231.45.117:4705/autoservicio/imagenes/homeBackground.jpg);
  122 + background-repeat: no-repeat;
  123 + background-size: cover;
  124 +}
  125 +
  126 +.rounded-bottom-right {
  127 + border-bottom-right-radius: 10rem;
  128 + &:before {
  129 + border-radius: 0 40px 40px 0;
  130 + background-color: #fff;
  131 + }
  132 +}
  133 +
  134 +.rounded-top-left {
  135 + border-top-left-radius: 10rem;
  136 +}
  137 +
  138 +.bg-gray {
  139 + background-color: #cccccc;
  140 +}