Commit 1aea015d1c53af5fa726cbad0cddaa8037914f51
1 parent
0a8a854013
Exists in
develop
Fix
Reglas de lint
Showing
6 changed files
with
6 additions
and
6 deletions
Show diff stats
src/app/modules/carrito/carrito.component.html
1 | <div class="h-92 bg-white fade-in-left"> | 1 | <div class="h-92 bg-white fade-in-left"> |
2 | <!-- PUBLICIDADES --> | 2 | <!-- PUBLICIDADES --> |
3 | <app-header-publicidad></app-header-publicidad> | 3 | <app-header-publicidad></app-header-publicidad> |
4 | 4 | ||
5 | <div class="h-75 carrito-content"> | 5 | <div class="h-75 carrito-content"> |
6 | <!-- CABECERA --> | 6 | <!-- CABECERA --> |
7 | <div class="row mx-3 h-auto border border-primary rounded-sm"> | 7 | <div class="row mx-3 h-auto border border-primary rounded-sm"> |
8 | <div class="col-12 px-0 py-2 align-self-center"> | 8 | <div class="col-12 px-0 py-2 align-self-center"> |
9 | <div class="px-3"> | 9 | <div class="px-3"> |
10 | <p class="h6 text-truncate">ESTE ES TÚ CARRITO DE COMPRAS</p> | 10 | <p class="h6 text-truncate">ESTE ES TÚ CARRITO DE COMPRAS</p> |
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
13 | </div> | 13 | </div> |
14 | 14 | ||
15 | <!-- CARRITO --> | 15 | <!-- CARRITO --> |
16 | <div | 16 | <div |
17 | class="row mx-2 mt-4 h-80 h-lg-60 align-content-start scroll-y-visible" | 17 | class="row mx-2 mt-4 h-80 h-lg-60 align-content-start scroll-y-visible" |
18 | (scroll)="scrollEvent($event)"> | 18 | (scroll)="scrollEvent($event)"> |
19 | <!-- MENSAJE DE ADVERTENCIA --> | 19 | <!-- MENSAJE DE ADVERTENCIA --> |
20 | <div class="col-10 align-self-center alert alert-primary" *ngIf="!articuloService.carrito.length"> | 20 | <div class="col-10 align-self-center alert alert-primary" *ngIf="!articuloService.carrito.length"> |
21 | <p class="h5 text-center">No hay artículos en el carrito</p> | 21 | <p class="h5 text-center">No hay artículos en el carrito</p> |
22 | </div> | 22 | </div> |
23 | <!-- ARTICULOS --> | 23 | <!-- ARTICULOS --> |
24 | <div | 24 | <div |
25 | class="col-12 col-xl-6 p-2 h-50 h-md-25 h-xl-40 text-center text-truncate carrito-articulo" | 25 | class="col-12 col-xl-6 p-2 h-50 h-md-25 h-xl-40 text-center text-truncate carrito-articulo" |
26 | *ngFor="let articulo of articuloService.carrito; let i = index;" | 26 | *ngFor="let articulo of articuloService.carrito; let i = index;" |
27 | @EnterLeave> | 27 | @EnterLeave> |
28 | <!-- ARTICULO --> | 28 | <!-- ARTICULO --> |
29 | <div class="h-100 border border-primary rounded-sm"> | 29 | <div class="h-100 border border-primary rounded-sm"> |
30 | <div class="row align-items-center mx-0 h-100"> | 30 | <div class="row align-items-center mx-0 h-100"> |
31 | <!-- NOMBRE E IMAGEN --> | 31 | <!-- NOMBRE E IMAGEN --> |
32 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> | 32 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> |
33 | <img | 33 | <img |
34 | draggable="false" | 34 | draggable="false" |
35 | ondragstart="return false;" | 35 | ondragstart="return false;" |
36 | (contextmenu)="false" | 36 | (contextmenu)="false" |
37 | class="d-none d-md-block mx-auto h-55 rounded-sm shadow-sm" | 37 | class="d-none d-md-block mx-auto h-55 rounded-sm shadow-sm" |
38 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | 38 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
39 | onerror="this.src='assets/img/image-not-found.jpg'"> | 39 | onerror="this.src='assets/img/image-not-found.jpg'"> |
40 | <div class="row mx-0 h-100 h-md-45"> | 40 | <div class="row mx-0 h-100 h-md-45"> |
41 | <p class="col text-primary text-truncate align-self-center"> | 41 | <p class="col text-primary text-truncate align-self-center"> |
42 | <small>{{articulo.DetArt}}</small> | 42 | <small>{{articulo.DetArt}}</small> |
43 | </p> | 43 | </p> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | <!-- CANTIDAD --> | 46 | <!-- CANTIDAD --> |
47 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> | 47 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> |
48 | <p class="h-40"><small>CANT</small></p> | 48 | <p class="h-40"><small>CANT</small></p> |
49 | <articulo-cantidad [articulo]="articulo"></articulo-cantidad> | 49 | <app-articulo-cantidad [articulo]="articulo"></app-articulo-cantidad> |
50 | </div> | 50 | </div> |
51 | <!-- PRECIO --> | 51 | <!-- PRECIO --> |
52 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> | 52 | <div class="col-6 col-md-3 h-50 h-md-100 border-right border-primary"> |
53 | <p class="h-40"><small>PRECIO</small></p> | 53 | <p class="h-40"><small>PRECIO</small></p> |
54 | <div class="py-1 badge-pill bg-dark text-white"> | 54 | <div class="py-1 badge-pill bg-dark text-white"> |
55 | <p><small>{{articulo.PreVen | currency}}</small></p> | 55 | <p><small>{{articulo.PreVen | currency}}</small></p> |
56 | </div> | 56 | </div> |
57 | </div> | 57 | </div> |
58 | <!-- ELIMINAR --> | 58 | <!-- ELIMINAR --> |
59 | <div class="col-6 col-md-3 align-self-center"> | 59 | <div class="col-6 col-md-3 align-self-center"> |
60 | <div class="row mx-0 justify-content-center"> | 60 | <div class="row mx-0 justify-content-center"> |
61 | <div | 61 | <div |
62 | class="col-auto px-3 py-1 btn-effect bg-primary badge-pill text-white" | 62 | class="col-auto px-3 py-1 btn-effect bg-primary badge-pill text-white" |
63 | (click)="deleteArticulo(i)"> | 63 | (click)="deleteArticulo(i)"> |
64 | <span> | 64 | <span> |
65 | <small class="pr-2">ELIMINAR</small> | 65 | <small class="pr-2">ELIMINAR</small> |
66 | <img | 66 | <img |
67 | draggable="false" | 67 | draggable="false" |
68 | ondragstart="return false;" | 68 | ondragstart="return false;" |
69 | (contextmenu)="false" | 69 | (contextmenu)="false" |
70 | class="icon-20 rotate-45" | 70 | class="icon-20 rotate-45" |
71 | src="assets/img/mas-blanco.svg"> | 71 | src="assets/img/mas-blanco.svg"> |
72 | </span> | 72 | </span> |
73 | </div> | 73 | </div> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | <!-- TOTAL --> | 80 | <!-- TOTAL --> |
81 | <div class="row mx-3 mt-2 h-auto justify-content-end"> | 81 | <div class="row mx-3 mt-2 h-auto justify-content-end"> |
82 | <div class="col-auto align-self-center text-primary"><small>TOTAL</small></div> | 82 | <div class="col-auto align-self-center text-primary"><small>TOTAL</small></div> |
83 | <div class="col-auto px-3 bg-primary badge-pill"> | 83 | <div class="col-auto px-3 bg-primary badge-pill"> |
84 | <p class="text-center text-white py-1">{{articuloService.subTotal | currency}}</p> | 84 | <p class="text-center text-white py-1">{{articuloService.subTotal | currency}}</p> |
85 | </div> | 85 | </div> |
86 | </div> | 86 | </div> |
87 | <!-- CONTINUAR --> | 87 | <!-- CONTINUAR --> |
88 | <div | 88 | <div |
89 | *ngIf="articuloService.carrito.length" | 89 | *ngIf="articuloService.carrito.length" |
90 | class="row mx-3 mt-4 h-auto justify-content-end"> | 90 | class="row mx-3 mt-4 h-auto justify-content-end"> |
91 | <div | 91 | <div |
92 | class="col-auto py-2 px-3 align-self-center btn-effect bg-primary badge-pill text-white" | 92 | class="col-auto py-2 px-3 align-self-center btn-effect bg-primary badge-pill text-white" |
93 | [routerLink]="['/forma-pago']"> | 93 | [routerLink]="['/forma-pago']"> |
94 | <span> | 94 | <span> |
95 | <small class="pr-2">CONTINUAR</small> | 95 | <small class="pr-2">CONTINUAR</small> |
96 | <img | 96 | <img |
97 | draggable="false" | 97 | draggable="false" |
98 | ondragstart="return false;" | 98 | ondragstart="return false;" |
99 | (contextmenu)="false" | 99 | (contextmenu)="false" |
100 | class="icon-20" | 100 | class="icon-20" |
101 | src="assets/img/ir.svg"> | 101 | src="assets/img/ir.svg"> |
102 | </span> | 102 | </span> |
103 | </div> | 103 | </div> |
104 | </div> | 104 | </div> |
105 | </div> | 105 | </div> |
106 | 106 | ||
107 | </div> | 107 | </div> |
108 | 108 |
src/app/modules/info-formas-pago/info-formas-pago.component.ts
1 | import { Component, OnInit, TemplateRef, OnDestroy } from '@angular/core'; | 1 | import { Component, OnInit, TemplateRef, OnDestroy } from '@angular/core'; |
2 | import { BsModalService } from 'ngx-bootstrap/modal'; | 2 | import { BsModalService } from 'ngx-bootstrap/modal'; |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'app-formas-pago', | 5 | selector: 'app-formas-pago', |
6 | templateUrl: './info-formas-pago.component.html', | 6 | templateUrl: './info-formas-pago.component.html', |
7 | styleUrls: ['./info-formas-pago.component.scss'] | 7 | styleUrls: ['./info-formas-pago.component.scss'] |
8 | }) | 8 | }) |
9 | export class InfoFormasPagoComponent implements OnInit, OnDestroy { | 9 | export class InfoFormasPagoComponent implements OnInit, OnDestroy { |
10 | mediaPantalla = false; | 10 | mediaPantalla = false; |
11 | timer: any; | 11 | timer: any; |
12 | 12 | ||
13 | constructor( | 13 | constructor( |
14 | private modalService: BsModalService, | 14 | private modalService: BsModalService, |
15 | ) { } | 15 | ) { } |
16 | 16 | ||
17 | ngOnInit() { } | 17 | ngOnInit() { } |
18 | 18 | ||
19 | ngOnDestroy() { | 19 | ngOnDestroy() { |
20 | if (this.timer) clearTimeout(this.timer); | 20 | if (this.timer) clearTimeout(this.timer); |
21 | } | 21 | } |
22 | 22 | ||
23 | openGoCaja(templateRef: TemplateRef<any>) { | 23 | openGoCaja(templateRef: TemplateRef<any>) { |
24 | let modalRef = this.modalService.show(templateRef, { class: 'modal-promo modal-sm modal-dialog-centered' }); | 24 | const modalRef = this.modalService.show(templateRef, { class: 'modal-promo modal-sm modal-dialog-centered' }); |
25 | this.timer = setTimeout(() => { | 25 | this.timer = setTimeout(() => { |
26 | modalRef.hide(); | 26 | modalRef.hide(); |
27 | }, 3000); | 27 | }, 3000); |
28 | } | 28 | } |
29 | } | 29 | } |
30 | 30 |
src/app/modules/opcion-pedido/opcion-pedido.component.ts
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { Router } from '@angular/router'; | 2 | import { Router } from '@angular/router'; |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'app-opcion-pedido', | 5 | selector: 'app-opcion-pedido', |
6 | templateUrl: './opcion-pedido.component.html', | 6 | templateUrl: './opcion-pedido.component.html', |
7 | styleUrls: ['./opcion-pedido.component.scss'] | 7 | styleUrls: ['./opcion-pedido.component.scss'] |
8 | }) | 8 | }) |
9 | export class OpcionPedidoComponent implements OnInit { | 9 | export class OpcionPedidoComponent implements OnInit { |
10 | 10 | ||
11 | constructor( | 11 | constructor( |
12 | private router: Router, | 12 | private router: Router, |
13 | ) { } | 13 | ) { } |
14 | 14 | ||
15 | ngOnInit() { | 15 | ngOnInit() { |
16 | this.reducirPantalla(); | 16 | this.reducirPantalla(); |
17 | } | 17 | } |
18 | 18 | ||
19 | goTo(path) { | 19 | goTo(path) { |
20 | this.router.navigate([path]); | 20 | this.router.navigate([path]); |
21 | } | 21 | } |
22 | 22 | ||
23 | seleccionPedido(lugar) { | 23 | seleccionPedido(lugar) { |
24 | lugar === 'true' ? lugar = true : false; | 24 | lugar = lugar === 'true' ? true : false; |
25 | localStorage.setItem('pedidoParaLlevar', lugar); | 25 | localStorage.setItem('pedidoParaLlevar', lugar); |
26 | } | 26 | } |
27 | 27 | ||
28 | reducirPantalla() { | 28 | reducirPantalla() { |
29 | if ($('body').hasClass('media-pantalla')) { | 29 | if ($('body').hasClass('media-pantalla')) { |
30 | $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); | 30 | $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); |
31 | } | 31 | } |
32 | } | 32 | } |
33 | } | 33 | } |
34 | 34 |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
1 | <div class="h-92 bg-white fade-in-left"> | 1 | <div class="h-92 bg-white fade-in-left"> |
2 | <!-- PUBLICIDADES --> | 2 | <!-- PUBLICIDADES --> |
3 | <app-header-publicidad></app-header-publicidad> | 3 | <app-header-publicidad></app-header-publicidad> |
4 | 4 | ||
5 | <div class="row mx-0 h-80 align-items-end"> | 5 | <div class="row mx-0 h-80 align-items-end"> |
6 | <!-- CABECERA --> | 6 | <!-- CABECERA --> |
7 | <div class="row w-100 mx-3 h-auto border border-primary rounded-sm"> | 7 | <div class="row w-100 mx-3 h-auto border border-primary rounded-sm"> |
8 | <div class="col-12 p-2 align-self-center"> | 8 | <div class="col-12 p-2 align-self-center"> |
9 | <div class="px-3"> | 9 | <div class="px-3"> |
10 | <p class="h6 text-truncate">SELECCIONÁ TÚ COMIDA Y/O BEBIDA</p> | 10 | <p class="h6 text-truncate">SELECCIONÁ TÚ COMIDA Y/O BEBIDA</p> |
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
13 | </div> | 13 | </div> |
14 | <!-- CUERPO --> | 14 | <!-- CUERPO --> |
15 | <div class="row w-100 mr-4 h-50 h-md-70" id="content"> | 15 | <div class="row w-100 mr-4 h-50 h-md-70" id="content"> |
16 | <div class="col-12 h-100 px-0 py-3"> | 16 | <div class="col-12 h-100 px-0 py-3"> |
17 | <div class="row mx-0 h-100"> | 17 | <div class="row mx-0 h-100"> |
18 | <!-- FILTRO CATEGORIAS --> | 18 | <!-- FILTRO CATEGORIAS --> |
19 | <div class="col-5 col-sm-3 col-xl-2 h-100"> | 19 | <div class="col-5 col-sm-3 col-xl-2 h-100"> |
20 | <p class="h6 h-6 m-0 text-center"><small>CATEGORÍAS</small></p> | 20 | <p class="h6 h-6 m-0 text-center"><small>CATEGORÍAS</small></p> |
21 | <div class="row mx-0 h-94 justify-content-center align-items-center"> | 21 | <div class="row mx-0 h-94 justify-content-center align-items-center"> |
22 | <div class="col-auto btn-effect h-5 cat-btn"> | 22 | <div class="col-auto btn-effect h-5 cat-btn"> |
23 | <img | 23 | <img |
24 | draggable="false" | 24 | draggable="false" |
25 | ondragstart="return false;" | 25 | ondragstart="return false;" |
26 | (contextmenu)="false" | 26 | (contextmenu)="false" |
27 | class="h-100 d-block mx-auto rotate-90-neg" | 27 | class="h-100 d-block mx-auto rotate-90-neg" |
28 | src="assets/img/ir-color.svg" | 28 | src="assets/img/ir-color.svg" |
29 | (mousedown)="scrollY(templateCategorias, -100)" | 29 | (mousedown)="scrollY(templateCategorias, -100)" |
30 | (mouseup)="mouseup()" | 30 | (mouseup)="mouseup()" |
31 | (mouseleave)="mouseup()"> | 31 | (mouseleave)="mouseup()"> |
32 | </div> | 32 | </div> |
33 | <!-- CATEGORIAS --> | 33 | <!-- CATEGORIAS --> |
34 | <div | 34 | <div |
35 | #templateCategorias | 35 | #templateCategorias |
36 | class="col-12 px-0 box-categorias border border-primary py-1 | 36 | class="col-12 px-0 box-categorias border border-primary py-1 |
37 | border-left-0 rounded-right scroll-y cat-box" | 37 | border-left-0 rounded-right scroll-y cat-box" |
38 | (scroll)="scrollEvent($event)"> | 38 | (scroll)="scrollEvent($event)"> |
39 | <div | 39 | <div |
40 | class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | 40 | class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" |
41 | [ngClass]="{ 'active rounded-sm shadow': allActive, 'border-bottom-effect': !allActive, | 41 | [ngClass]="{ 'active rounded-sm shadow': allActive, 'border-bottom-effect': !allActive, |
42 | 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" | 42 | 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" |
43 | (click)="selectCategoria(-1, 0)"> | 43 | (click)="selectCategoria(-1, 0)"> |
44 | <img | 44 | <img |
45 | draggable="false" | 45 | draggable="false" |
46 | ondragstart="return false;" | 46 | ondragstart="return false;" |
47 | (contextmenu)="false" | 47 | (contextmenu)="false" |
48 | class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" | 48 | class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" |
49 | src="assets/img/logo-spot.svg"> | 49 | src="assets/img/logo-spot.svg"> |
50 | <small class="col-12 px-0 my-1 h-100 h-md-25 align-self-end text-center text-truncate">Todos</small> | 50 | <small class="col-12 px-0 my-1 h-100 h-md-25 align-self-end text-center text-truncate">Todos</small> |
51 | </div> | 51 | </div> |
52 | <div | 52 | <div |
53 | class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | 53 | class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" |
54 | [ngClass]="{ 'active rounded-sm shadow': categoria.selected, 'border-bottom-effect': !categoria.selected, | 54 | [ngClass]="{ 'active rounded-sm shadow': categoria.selected, 'border-bottom-effect': !categoria.selected, |
55 | 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" | 55 | 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" |
56 | (click)="selectCategoria(i, categoria.id)" | 56 | (click)="selectCategoria(i, categoria.id)" |
57 | *ngFor="let categoria of categorias; let i = index;"> | 57 | *ngFor="let categoria of categorias; let i = index;"> |
58 | <img | 58 | <img |
59 | draggable="false" | 59 | draggable="false" |
60 | ondragstart="return false;" | 60 | ondragstart="return false;" |
61 | (contextmenu)="false" | 61 | (contextmenu)="false" |
62 | class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" | 62 | class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" |
63 | [ngClass]="{'media-pantalla' : boxCarrito.classList.contains('media-pantalla')}" | 63 | [ngClass]="{'media-pantalla' : boxCarrito.classList.contains('media-pantalla')}" |
64 | src="{{urlImagenes}}{{categoria.path_imagen}}" | 64 | src="{{urlImagenes}}{{categoria.path_imagen}}" |
65 | onerror="this.src='assets/img/image-not-found.jpg'"> | 65 | onerror="this.src='assets/img/image-not-found.jpg'"> |
66 | <small class="col-12 px-1 my-1 h-100 h-md-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> | 66 | <small class="col-12 px-1 my-1 h-100 h-md-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> |
67 | </div> | 67 | </div> |
68 | </div> | 68 | </div> |
69 | <div class="col-auto btn-effect h-5 cat-btn"> | 69 | <div class="col-auto btn-effect h-5 cat-btn"> |
70 | <img | 70 | <img |
71 | draggable="false" | 71 | draggable="false" |
72 | ondragstart="return false;" | 72 | ondragstart="return false;" |
73 | (contextmenu)="false" | 73 | (contextmenu)="false" |
74 | class="h-100 d-block mx-auto rotate-90" | 74 | class="h-100 d-block mx-auto rotate-90" |
75 | src="assets/img/ir-color.svg" | 75 | src="assets/img/ir-color.svg" |
76 | (mousedown)="scrollY(templateCategorias, 100)" | 76 | (mousedown)="scrollY(templateCategorias, 100)" |
77 | (mouseup)="mouseup()" | 77 | (mouseup)="mouseup()" |
78 | (mouseleave)="mouseup()"> | 78 | (mouseleave)="mouseup()"> |
79 | </div> | 79 | </div> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | <!-- LISTA DE ARTICULOS --> | 82 | <!-- LISTA DE ARTICULOS --> |
83 | <div | 83 | <div |
84 | class="col-7 col-sm-9 col-xl-10 pb-3 h-100 align-self-center scroll-y-visible" | 84 | class="col-7 col-sm-9 col-xl-10 pb-3 h-100 align-self-center scroll-y-visible" |
85 | (scroll)="scrollEvent($event)"> | 85 | (scroll)="scrollEvent($event)"> |
86 | <div class="row row-cols-1 row-cols-sm-3 row-cols-xl-6"> | 86 | <div class="row row-cols-1 row-cols-sm-3 row-cols-xl-6"> |
87 | <!-- ARTICULO --> | 87 | <!-- ARTICULO --> |
88 | <div | 88 | <div |
89 | class="col px-2 my-1 my-md-3 h-auto" | 89 | class="col px-2 my-1 my-md-3 h-auto" |
90 | *ngFor="let articulo of auxArticulos | slice:0:showQuantity;"> | 90 | *ngFor="let articulo of auxArticulos | slice:0:showQuantity;"> |
91 | <div | 91 | <div |
92 | class="swing-in-top-fwd btn-effect card h-auto" | 92 | class="swing-in-top-fwd btn-effect card h-auto" |
93 | (click)="selectArticulo(articulo)"> | 93 | (click)="selectArticulo(articulo)"> |
94 | <img | 94 | <img |
95 | draggable="false" | 95 | draggable="false" |
96 | ondragstart="return false;" | 96 | ondragstart="return false;" |
97 | (contextmenu)="false" | 97 | (contextmenu)="false" |
98 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | 98 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
99 | onerror="this.src='assets/img/image-not-found.jpg'" | 99 | onerror="this.src='assets/img/image-not-found.jpg'" |
100 | class="card-img-top h-30 h-md-55 rounded-sm"> | 100 | class="card-img-top h-30 h-md-55 rounded-sm"> |
101 | <div class="row mx-0 py-1 h-auto justify-content-center"> | 101 | <div class="row mx-0 py-1 h-auto justify-content-center"> |
102 | <p | 102 | <p |
103 | [ngClass]="{'text-primary': articulo.PRO, 'text-secondary': !articulo.PRO}" | 103 | [ngClass]="{'text-primary': articulo.PRO, 'text-secondary': !articulo.PRO}" |
104 | class="col-12 px-1 h6 h-auto text-center min-h-60"> | 104 | class="col-12 px-1 h6 h-auto text-center min-h-60"> |
105 | {{articulo.DetArt.toUpperCase()}} | 105 | {{articulo.DetArt.toUpperCase()}} |
106 | </p> | 106 | </p> |
107 | <div class="col-12 px-1 align-self-end h-auto"> | 107 | <div class="col-12 px-1 align-self-end h-auto"> |
108 | <div | 108 | <div |
109 | [ngClass]="{'bg-primary': articulo.PRO, 'bg-secondary': !articulo.PRO}" | 109 | [ngClass]="{'bg-primary': articulo.PRO, 'bg-secondary': !articulo.PRO}" |
110 | class="row mx-0 justify-content-between badge-pill"> | 110 | class="row mx-0 justify-content-between badge-pill"> |
111 | <div class="col px-0 align-self-center text-white text-right"> | 111 | <div class="col px-0 align-self-center text-white text-right"> |
112 | {{articulo.PreVen | currency}} | 112 | {{articulo.PreVen | currency}} |
113 | </div> | 113 | </div> |
114 | <div class="col-5 px-0"> | 114 | <div class="col-5 px-0"> |
115 | <img | 115 | <img |
116 | draggable="false" | 116 | draggable="false" |
117 | ondragstart="return false;" | 117 | ondragstart="return false;" |
118 | (contextmenu)="false" | 118 | (contextmenu)="false" |
119 | class="d-block ml-auto py-1 icon-30" | 119 | class="d-block ml-auto py-1 icon-30" |
120 | src="assets/img/ir.svg"> | 120 | src="assets/img/ir.svg"> |
121 | </div> | 121 | </div> |
122 | </div> | 122 | </div> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | </div> | 125 | </div> |
126 | </div> | 126 | </div> |
127 | </div> | 127 | </div> |
128 | <!-- BOTON VER MAS --> | 128 | <!-- BOTON VER MAS --> |
129 | <div class="row mx-0"> | 129 | <div class="row mx-0"> |
130 | <div | 130 | <div |
131 | *ngIf="showQuantity <= auxArticulos.slice(0, showQuantity).length" | 131 | *ngIf="showQuantity <= auxArticulos.slice(0, showQuantity).length" |
132 | class="col-12 px-0 mb-2"> | 132 | class="col-12 px-0 mb-2"> |
133 | <button | 133 | <button |
134 | (click)="increaseShow()" | 134 | (click)="increaseShow()" |
135 | class="btn btn-block btn-outline-primary"> | 135 | class="btn btn-block btn-outline-primary"> |
136 | Ver Más | 136 | Ver Más |
137 | </button> | 137 | </button> |
138 | </div> | 138 | </div> |
139 | </div> | 139 | </div> |
140 | </div> | 140 | </div> |
141 | </div> | 141 | </div> |
142 | </div> | 142 | </div> |
143 | </div> | 143 | </div> |
144 | <!-- FOOTER CARRITO DE COMPRAS --> | 144 | <!-- FOOTER CARRITO DE COMPRAS --> |
145 | <div class="row w-90 mx-auto h-auto justify-content-center"> | 145 | <div class="row w-90 mx-auto h-auto justify-content-center"> |
146 | <div class="h-75 px-0 border border-primary rounded" #boxCarrito | 146 | <div class="h-75 px-0 border border-primary rounded" #boxCarrito |
147 | [ngClass]="boxCarrito.classList.contains('media-pantalla') | 147 | [ngClass]="boxCarrito.classList.contains('media-pantalla') |
148 | ? 'col-8' : 'col-12'" id="boxCarrito"> | 148 | ? 'col-8' : 'col-12'" id="boxCarrito"> |
149 | <!-- CABECERA --> | 149 | <!-- CABECERA --> |
150 | <div class="row mx-0 h-15 border-bottom border-primary"> | 150 | <div class="row mx-0 h-15 border-bottom border-primary"> |
151 | <p class="col align-self-center text-truncate"><small>ARTÍCULOS EN TÚ CARRITO DE COMPRAS</small></p> | 151 | <p class="col align-self-center text-truncate"><small>ARTÍCULOS EN TÚ CARRITO DE COMPRAS</small></p> |
152 | </div> | 152 | </div> |
153 | <!-- CUERPO --> | 153 | <!-- CUERPO --> |
154 | <div class="row h-85 mx-0 justify-content-around"> | 154 | <div class="row h-85 mx-0 justify-content-around"> |
155 | <!-- BOTON SCROLL IZQUIERDA --> | 155 | <!-- BOTON SCROLL IZQUIERDA --> |
156 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> | 156 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> |
157 | <img | 157 | <img |
158 | draggable="false" | 158 | draggable="false" |
159 | ondragstart="return false;" | 159 | ondragstart="return false;" |
160 | (contextmenu)="false" | 160 | (contextmenu)="false" |
161 | class="icon-30 rotate-180-neg" | 161 | class="icon-30 rotate-180-neg" |
162 | src="assets/img/ir-fondo-color.svg" | 162 | src="assets/img/ir-fondo-color.svg" |
163 | (mousedown)="scrollX(templateCarrito, -100)" | 163 | (mousedown)="scrollX(templateCarrito, -100)" |
164 | (mouseup)="mouseup()" | 164 | (mouseup)="mouseup()" |
165 | (mouseleave)="mouseup()"> | 165 | (mouseleave)="mouseup()"> |
166 | </div> | 166 | </div> |
167 | <!-- CARRITO --> | 167 | <!-- CARRITO --> |
168 | <div class="col-6 col-sm-8 col-lg-10 h-100"> | 168 | <div class="col-6 col-sm-8 col-lg-10 h-100"> |
169 | <div | 169 | <div |
170 | #templateCarrito | 170 | #templateCarrito |
171 | class="row flex-row flex-nowrap h-100 mx-0 my-2 scroll-x" | 171 | class="row flex-row flex-nowrap h-100 mx-0 my-2 scroll-x" |
172 | (scroll)="scrollEvent($event)"> | 172 | (scroll)="scrollEvent($event)"> |
173 | <!-- ARTICULOS --> | 173 | <!-- ARTICULOS --> |
174 | <div | 174 | <div |
175 | class="col-10 col-sm-4 col-lg-2 px-2 px-xl-4 align-self-center border-right border-primary" | 175 | class="col-10 col-sm-4 col-lg-2 px-2 px-xl-4 align-self-center border-right border-primary" |
176 | *ngFor="let articulo of articuloService.carrito; let i = index;" | 176 | *ngFor="let articulo of articuloService.carrito; let i = index;" |
177 | @EnterLeave> | 177 | @EnterLeave> |
178 | <img | 178 | <img |
179 | class="btn-effect icon-20 mr-2 position-absolute right-0" | 179 | class="btn-effect icon-20 mr-2 position-absolute right-0" |
180 | src="assets/img/icono-cancelar-color.svg" | 180 | src="assets/img/icono-cancelar-color.svg" |
181 | (click)="deleteArticulo(i)"> | 181 | (click)="deleteArticulo(i)"> |
182 | <img | 182 | <img |
183 | draggable="false" | 183 | draggable="false" |
184 | ondragstart="return false;" | 184 | ondragstart="return false;" |
185 | (contextmenu)="false" | 185 | (contextmenu)="false" |
186 | class="d-block img-fluid p-2 mx-auto rounded" | 186 | class="d-block img-fluid p-2 mx-auto rounded" |
187 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | 187 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
188 | onerror="this.src='assets/img/image-not-found.jpg'"> | 188 | onerror="this.src='assets/img/image-not-found.jpg'"> |
189 | <p class="d-block mt-auto text-center text-primary text-truncate"> | 189 | <p class="d-block mt-auto text-center text-primary text-truncate"> |
190 | <small>{{articulo.DetArt}}</small> | 190 | <small>{{articulo.DetArt}}</small> |
191 | </p> | 191 | </p> |
192 | <articulo-cantidad [articulo]="articulo"></articulo-cantidad> | 192 | <app-articulo-cantidad [articulo]="articulo"></app-articulo-cantidad> |
193 | </div> | 193 | </div> |
194 | <!-- MENSAJE DE ADVERTENCIA --> | 194 | <!-- MENSAJE DE ADVERTENCIA --> |
195 | <div *ngIf="!articuloService.carrito.length" class="col h-100"> | 195 | <div *ngIf="!articuloService.carrito.length" class="col h-100"> |
196 | <p class="text-center py-5">No hay articulos en el carrito</p> | 196 | <p class="text-center py-5">No hay articulos en el carrito</p> |
197 | </div> | 197 | </div> |
198 | </div> | 198 | </div> |
199 | </div> | 199 | </div> |
200 | <!-- BOTON SCROLL DERECHA --> | 200 | <!-- BOTON SCROLL DERECHA --> |
201 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> | 201 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> |
202 | <img | 202 | <img |
203 | draggable="false" | 203 | draggable="false" |
204 | ondragstart="return false;" | 204 | ondragstart="return false;" |
205 | (contextmenu)="false" | 205 | (contextmenu)="false" |
206 | class="icon-30" | 206 | class="icon-30" |
207 | src="assets/img/ir-fondo-color.svg" | 207 | src="assets/img/ir-fondo-color.svg" |
208 | (mousedown)="scrollX(templateCarrito, 100)" | 208 | (mousedown)="scrollX(templateCarrito, 100)" |
209 | (mouseup)="mouseup()" | 209 | (mouseup)="mouseup()" |
210 | (mouseleave)="mouseup()"> | 210 | (mouseleave)="mouseup()"> |
211 | </div> | 211 | </div> |
212 | </div> | 212 | </div> |
213 | </div> | 213 | </div> |
214 | <!-- TOTAL--> | 214 | <!-- TOTAL--> |
215 | <div | 215 | <div |
216 | class="col-auto mt-2 ml-auto h-20"> | 216 | class="col-auto mt-2 ml-auto h-20"> |
217 | <div class="row mx-0"> | 217 | <div class="row mx-0"> |
218 | <div class="col-auto align-self-center text-primary">TOTAL</div> | 218 | <div class="col-auto align-self-center text-primary">TOTAL</div> |
219 | <div class="col-auto bg-primary badge-pill"> | 219 | <div class="col-auto bg-primary badge-pill"> |
220 | <p class="text-center text-white mt-1 py-1">{{articuloService.subTotal | currency}}</p> | 220 | <p class="text-center text-white mt-1 py-1">{{articuloService.subTotal | currency}}</p> |
221 | </div> | 221 | </div> |
222 | </div> | 222 | </div> |
223 | </div> | 223 | </div> |
224 | 224 | ||
225 | <!-- VER CARRITO --> | 225 | <!-- VER CARRITO --> |
226 | <div | 226 | <div |
227 | class="col-auto px-0 mt-2 h-20" | 227 | class="col-auto px-0 mt-2 h-20" |
228 | *ngIf="articuloService.carrito.length" | 228 | *ngIf="articuloService.carrito.length" |
229 | [ngClass]="{'ml-auto pb-3' : boxCarrito.classList.contains('media-pantalla')}"> | 229 | [ngClass]="{'ml-auto pb-3' : boxCarrito.classList.contains('media-pantalla')}"> |
230 | <div | 230 | <div |
231 | class="btn-effect col-auto px-0 align-self-center bg-white" | 231 | class="btn-effect col-auto px-0 align-self-center bg-white" |
232 | [routerLink]="['/carrito']"> | 232 | [routerLink]="['/carrito']"> |
233 | <div class="row mx-0 bg-light"> | 233 | <div class="row mx-0 bg-light"> |
234 | <div class="col-auto p-0 bg-primary"> | 234 | <div class="col-auto p-0 bg-primary"> |
235 | <img | 235 | <img |
236 | draggable="false" | 236 | draggable="false" |
237 | ondragstart="return false;" | 237 | ondragstart="return false;" |
238 | (contextmenu)="false" | 238 | (contextmenu)="false" |
239 | class="p-2 icon-40" | 239 | class="p-2 icon-40" |
240 | src="assets/img/carrito.svg"> | 240 | src="assets/img/carrito.svg"> |
241 | </div> | 241 | </div> |
242 | <div class="col-auto align-self-center text-primary d-none d-sm-block">IR AL CARRITO</div> | 242 | <div class="col-auto align-self-center text-primary d-none d-sm-block">IR AL CARRITO</div> |
243 | </div> | 243 | </div> |
244 | </div> | 244 | </div> |
245 | </div> | 245 | </div> |
246 | 246 | ||
247 | </div> | 247 | </div> |
248 | </div> | 248 | </div> |
249 | 249 | ||
250 | </div> | 250 | </div> |
251 | 251 |
src/app/shared/articulo-cantidad/articulo-cantidad.component.ts
1 | import { Component, OnInit, Input } from '@angular/core'; | 1 | import { Component, OnInit, Input } from '@angular/core'; |
2 | import { IArticulo } from 'src/app/interfaces/IArticulo'; | 2 | import { IArticulo } from 'src/app/interfaces/IArticulo'; |
3 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; | 3 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'articulo-cantidad', | 6 | selector: 'app-articulo-cantidad', |
7 | templateUrl: './articulo-cantidad.component.html', | 7 | templateUrl: './articulo-cantidad.component.html', |
8 | styleUrls: ['./articulo-cantidad.component.scss'] | 8 | styleUrls: ['./articulo-cantidad.component.scss'] |
9 | }) | 9 | }) |
10 | export class ArticuloCantidadComponent implements OnInit { | 10 | export class ArticuloCantidadComponent implements OnInit { |
11 | @Input() articulo: IArticulo; | 11 | @Input() articulo: IArticulo; |
12 | 12 | ||
13 | constructor(private articuloService: ArticuloService) { } | 13 | constructor(private articuloService: ArticuloService) { } |
14 | 14 | ||
15 | ngOnInit() { } | 15 | ngOnInit() { } |
16 | 16 | ||
17 | substractCant(articulo: IArticulo) { | 17 | substractCant(articulo: IArticulo) { |
18 | this.articuloService.substractCant(articulo); | 18 | this.articuloService.substractCant(articulo); |
19 | } | 19 | } |
20 | 20 | ||
21 | addCant(articulo: IArticulo) { | 21 | addCant(articulo: IArticulo) { |
22 | this.articuloService.addCant(articulo); | 22 | this.articuloService.addCant(articulo); |
23 | } | 23 | } |
24 | 24 | ||
25 | } | 25 | } |
26 | 26 |
src/app/shared/sinonimo/sinonimo.component.html
1 | <div class="bg-primary rounded text-white"> | 1 | <div class="bg-primary rounded text-white"> |
2 | <div class="modal-header"> | 2 | <div class="modal-header"> |
3 | <p class="h4">Elige una opción</p> | 3 | <p class="h4">Elige una opción</p> |
4 | </div> | 4 | </div> |
5 | 5 | ||
6 | <div class="modal-body"> | 6 | <div class="modal-body"> |
7 | <div | 7 | <div |
8 | class="lista-sinonimos scroll-y-visible" | 8 | class="lista-sinonimos scroll-y-visible" |
9 | *ngFor="let s of sinonimos"> | 9 | *ngFor="let s of sinonimos"> |
10 | <div *ngFor="let articulo of s.productos"> | 10 | <div *ngFor="let articulo of s.productos"> |
11 | <div class="custom-control custom-checkbox"> | 11 | <div class="custom-control custom-checkbox"> |
12 | <input | 12 | <input |
13 | type="checkbox" | 13 | type="checkbox" |
14 | class="custom-control-input" | 14 | class="custom-control-input" |
15 | [(ngModel)]="articulo.seleccionado" | 15 | [(ngModel)]="articulo.seleccionado" |
16 | (click)="selectArticulo(articulo)" | 16 | (click)="selectArticulo(articulo)" |
17 | [id]="articulo.id"> | 17 | [id]="articulo.id"> |
18 | <label | 18 | <label |
19 | class="custom-control-label" | 19 | class="custom-control-label" |
20 | [for]="articulo.id"> | 20 | [for]="articulo.id"> |
21 | {{articulo.DET_LAR}} | 21 | {{articulo.DET_LAR}} |
22 | </label> | 22 | </label> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | 27 | ||
28 | <div class="modal-footer"> | 28 | <div class="modal-footer"> |
29 | <div | 29 | <div |
30 | [ngClass]="validate()" | 30 | [ngClass]="validate()" |
31 | class="d-inline-block py-1 bg-white badge-pill text-primary" | 31 | class="d-inline-block py-1 bg-white badge-pill text-primary" |
32 | (click)="continue()"> | 32 | (click)="continue()"> |
33 | CONTINUAR | 33 | CONTINUAR |
34 | <img | 34 | <img |
35 | draggable="false" | 35 | draggable="false" |
36 | ondragstart="return false;" | 36 | ondragstart="return false;" |
37 | (contextmenu)="false" | 37 | (contextmenu)="false" |
38 | class="icon-30" | 38 | class="icon-30" |
39 | src="assets/img/ir-color.svg"> | 39 | src="assets/img/ir-color.svg"> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | 43 |