Commit 70f4dec40e04b6c0276a1e5179f78e039bedb755
1 parent
156e4de0b8
Exists in
master
Agregado metodo para limpiar carrito.
Showing
2 changed files
with
18 additions
and
5 deletions
Show diff stats
src/app/components/cancelar-compra/cancelar-compra.component.html
1 | <div class="container-fluid background-image"> | 1 | <div class="container-fluid p-0 background-image"> |
2 | <div class="row"> | 2 | <div class="row m-0"> |
3 | <div class="col p-0"> | 3 | <div class="col p-0"> |
4 | <div class="vh-100 d-flex align-content-strech flex-wrap disable-user-select"> | 4 | <div class="vh-100 fade-in d-flex align-content-strech flex-wrap disable-user-select"> |
5 | 5 | ||
6 | <!-- HEADER --> | 6 | <!-- HEADER --> |
7 | <div class="row m-0 w-100 bg-primary-gradient-horizontal"> | 7 | <div class="row m-0 w-100 bg-primary-gradient-horizontal"> |
8 | <div class="col-6 bg-white rounded-bottom-right"> | 8 | <div class="col-6 bg-white rounded-bottom-right"> |
9 | <div class="row h-100"> | 9 | <div class="row h-100"> |
10 | <div class="col d-flex align-items-center"> | 10 | <div class="col d-flex align-items-center"> |
11 | <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logoaxion.png"> | 11 | <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logoaxion.png"> |
12 | </div> | 12 | </div> |
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | </div> | 15 | </div> |
16 | 16 | ||
17 | <!-- INFO --> | 17 | <!-- INFO --> |
18 | <div class="row m-0 w-100"> | 18 | <div class="row m-0 w-100"> |
19 | <div class="col-4 offset-2"> | 19 | <div class="col-4 offset-2"> |
20 | <div class="row h-100"> | 20 | <div class="row h-100"> |
21 | <div class="col-12 py-4"> | 21 | <div class="col-12 py-4"> |
22 | <div class="card h-100 rounded"> | 22 | <div class="card h-100 rounded"> |
23 | <img src="{{apiUrl}}/imagenes/atencion.svg" class="w-50 mx-auto my-auto"> | 23 | <img src="{{apiUrl}}/imagenes/atencion.svg" class="w-50 mx-auto my-auto"> |
24 | <div class="my-auto"> | 24 | <div class="my-auto"> |
25 | <p class="display-3 card-text text-center font-weight-bold"> | 25 | <p class="display-3 card-text text-center font-weight-bold"> |
26 | Atención | 26 | Atención |
27 | </p> | 27 | </p> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | </div> | 31 | </div> |
32 | </div> | 32 | </div> |
33 | <div class="col-6 text-center text-white my-auto"> | 33 | <div class="col-6 text-center text-white my-auto"> |
34 | <p class="display-3 font-weight-bold mb-5"> | 34 | <p class="display-3 font-weight-bold mb-5"> |
35 | Usted esta a punto<br>de cancelar su compra | 35 | Usted esta a punto<br>de cancelar su compra |
36 | </p> | 36 | </p> |
37 | <p class="display-4 m-0"> | 37 | <p class="display-4 m-0"> |
38 | Perderá los datos y<br>productos ya ingresados | 38 | Perderá los datos y<br>productos ya ingresados |
39 | </p> | 39 | </p> |
40 | <div class="d-flex justify-content-center mt-2"> | 40 | <div class="d-flex justify-content-center mt-2"> |
41 | <button | 41 | <button |
42 | type="button" | 42 | type="button" |
43 | class="btn btn-lg btn-light shadow mr-4" | 43 | class="btn btn-lg btn-light shadow mr-4" |
44 | (click)="volverPreviousPage()"> | 44 | (click)="volverPreviousPage()"> |
45 | <span class="pr-2">Volver a mi compra</span> | 45 | <span class="pr-2">Volver a mi compra</span> |
46 | <i class="fa fa-undo text-warning"></i> | 46 | <i class="fa fa-undo text-warning"></i> |
47 | </button> | 47 | </button> |
48 | <button type="button" class="btn btn-lg btn-light shadow ml-4"> | 48 | <button |
49 | type="button" | ||
50 | class="btn btn-lg btn-light shadow ml-4" | ||
51 | (click)="limpiarCarritoYvolver()"> | ||
49 | <span class="pr-2">Si, terminar</span> | 52 | <span class="pr-2">Si, terminar</span> |
50 | <i class="fa fa-times text-danger"></i> | 53 | <i class="fa fa-times text-danger"></i> |
51 | </button> | 54 | </button> |
52 | </div> | 55 | </div> |
53 | </div> | 56 | </div> |
54 | </div> | 57 | </div> |
55 | 58 | ||
56 | <!-- FOOTER --> | 59 | <!-- FOOTER --> |
57 | <div class="row m-0 w-100 bg-gray"> | 60 | <div class="row m-0 w-100 bg-gray"> |
58 | <div class="col-6 bg-white offset-6 rounded-top-left"> | 61 | <div class="col-6 bg-white offset-6 rounded-top-left"> |
59 | <div class="row h-100"> | 62 | <div class="row h-100"> |
60 | <div class="col d-flex align-items-center"> | 63 | <div class="col d-flex align-items-center"> |
61 | <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logodebo.png"> | 64 | <img class="w-25 mx-auto d-block" src="{{apiUrl}}/imagenes/logodebo.png"> |
62 | </div> | 65 | </div> |
63 | </div> | 66 | </div> |
64 | </div> | 67 | </div> |
65 | </div> | 68 | </div> |
66 | 69 | ||
67 | </div> | 70 | </div> |
68 | </div> | 71 | </div> |
69 | </div> | 72 | </div> |
70 | </div> | 73 | </div> |
71 | 74 |
src/app/components/cancelar-compra/cancelar-compra.component.ts
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { appSettings } from 'src/etc/AppSettings'; | 2 | import { appSettings } from 'src/etc/AppSettings'; |
3 | import { Location } from '@angular/common'; | 3 | import { Location } from '@angular/common'; |
4 | import { Router } from '@angular/router'; | ||
4 | 5 | ||
5 | @Component({ | 6 | @Component({ |
6 | selector: 'app-cancelar-compra', | 7 | selector: 'app-cancelar-compra', |
7 | templateUrl: './cancelar-compra.component.html', | 8 | templateUrl: './cancelar-compra.component.html', |
8 | styleUrls: ['./cancelar-compra.component.scss'] | 9 | styleUrls: ['./cancelar-compra.component.scss'] |
9 | }) | 10 | }) |
10 | export class CancelarCompraComponent implements OnInit { | 11 | export class CancelarCompraComponent implements OnInit { |
11 | 12 | ||
12 | private apiUrl: string = appSettings.apiUrl; | 13 | private apiUrl: string = appSettings.apiUrl; |
13 | 14 | ||
14 | constructor(private location: Location) { } | 15 | constructor( |
16 | private location: Location, | ||
17 | private router: Router | ||
18 | ) { } | ||
15 | 19 | ||
16 | ngOnInit() { | 20 | ngOnInit() { |
17 | } | 21 | } |
18 | 22 | ||
19 | volverPreviousPage() { | 23 | volverPreviousPage() { |
24 | |||
20 | this.location.back(); | 25 | this.location.back(); |
21 | } | 26 | } |
22 | 27 | ||
28 | limpiarCarritoYvolver(){ | ||
29 | |||
30 | this.router.navigate(['/home']); | ||
31 | } | ||
32 | |||
23 | } | 33 | } |
24 | 34 |