Commit c1cab2898a0078bd5e6c031b41712f951cc6237f
1 parent
1f79a6c5a6
Exists in
develop
Agregadas imagenes en categorias
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
src/app/interfaces/ICategoria.ts
| 1 | export interface ICategoria { | 1 | export interface ICategoria { |
| 2 | id: number; | 2 | id: number; |
| 3 | detalle: string; | 3 | detalle: string; |
| 4 | es_promocion: boolean; | 4 | es_promocion: boolean; |
| 5 | vigencia_desde: Date; | 5 | vigencia_desde: Date; |
| 6 | vigencia_hasta: Date; | 6 | vigencia_hasta: Date; |
| 7 | ES_PEDIDO: boolean; | 7 | ES_PEDIDO: boolean; |
| 8 | selected?: boolean; | 8 | selected?: boolean; |
| 9 | path_imagen?: string; | ||
| 9 | } | 10 | } |
| 10 | 11 |
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-70"> | 15 | <div class="row w-100 mr-4 h-70"> |
| 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"> | 22 | <div class="col-auto btn-effect h-5"> |
| 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 border-left-0 rounded-right scroll-y"> | 36 | class="col-12 px-0 box-categorias border border-primary border-left-0 rounded-right scroll-y"> |
| 37 | <div | 37 | <div |
| 38 | class="row mx-4 mb-2 h-32 justify-content-center tab" | 38 | class="row mx-4 mb-2 h-32 justify-content-center tab" |
| 39 | [ngClass]="{ 'active': allActive, 'border-bottom-effect': !allActive }" | 39 | [ngClass]="{ 'active': allActive, 'border-bottom-effect': !allActive }" |
| 40 | (click)="selectCategoria(-1, 0)"> | 40 | (click)="selectCategoria(-1, 0)"> |
| 41 | <img | 41 | <img |
| 42 | draggable="false" | 42 | draggable="false" |
| 43 | ondragstart="return false;" | 43 | ondragstart="return false;" |
| 44 | (contextmenu)="false" | 44 | (contextmenu)="false" |
| 45 | class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle" | 45 | class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle" |
| 46 | src="assets/img/ir-color.svg"> | 46 | src="assets/img/logo-spot.svg"> |
| 47 | <small class="col-12 px-0 my-1 h-25 align-self-end text-center text-truncate">Todos</small> | 47 | <small class="col-12 px-0 my-1 h-25 align-self-end text-center text-truncate">Todos</small> |
| 48 | </div> | 48 | </div> |
| 49 | <div | 49 | <div |
| 50 | class="row mx-4 mb-2 h-32 justify-content-center tab" | 50 | class="row mx-4 mb-2 h-32 justify-content-center tab" |
| 51 | [ngClass]="{ 'active': categoria.selected, 'border-bottom-effect': !categoria.selected }" | 51 | [ngClass]="{ 'active': categoria.selected, 'border-bottom-effect': !categoria.selected }" |
| 52 | (click)="selectCategoria(i, categoria.id)" | 52 | (click)="selectCategoria(i, categoria.id)" |
| 53 | *ngFor="let categoria of categorias; let i = index;"> | 53 | *ngFor="let categoria of categorias; let i = index;"> |
| 54 | <img | 54 | <img |
| 55 | draggable="false" | 55 | draggable="false" |
| 56 | ondragstart="return false;" | 56 | ondragstart="return false;" |
| 57 | (contextmenu)="false" | 57 | (contextmenu)="false" |
| 58 | class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle" | 58 | class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle" |
| 59 | src="assets/img/ir-color.svg"> | 59 | src="{{urlImagenes}}{{categoria.path_imagen}}"> |
| 60 | <small class="col-12 px-0 my-1 h-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> | 60 | <small class="col-12 px-0 my-1 h-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> |
| 61 | </div> | 61 | </div> |
| 62 | </div> | 62 | </div> |
| 63 | <div class="col-auto btn-effect h-5"> | 63 | <div class="col-auto btn-effect h-5"> |
| 64 | <img | 64 | <img |
| 65 | draggable="false" | 65 | draggable="false" |
| 66 | ondragstart="return false;" | 66 | ondragstart="return false;" |
| 67 | (contextmenu)="false" | 67 | (contextmenu)="false" |
| 68 | class="h-100 d-block mx-auto rotate-90" | 68 | class="h-100 d-block mx-auto rotate-90" |
| 69 | src="assets/img/ir-color.svg" | 69 | src="assets/img/ir-color.svg" |
| 70 | (mousedown)="scrollY(templateCategorias, 100)" | 70 | (mousedown)="scrollY(templateCategorias, 100)" |
| 71 | (mouseup)="mouseup()" | 71 | (mouseup)="mouseup()" |
| 72 | (mouseleave)="mouseup()"> | 72 | (mouseleave)="mouseup()"> |
| 73 | </div> | 73 | </div> |
| 74 | </div> | 74 | </div> |
| 75 | </div> | 75 | </div> |
| 76 | <!-- LISTA DE ARTICULOS --> | 76 | <!-- LISTA DE ARTICULOS --> |
| 77 | <div class="col-7 col-sm-9 col-xl-10 pb-3 h-80 align-self-center scroll-y-visible"> | 77 | <div class="col-7 col-sm-9 col-xl-10 pb-3 h-80 align-self-center scroll-y-visible"> |
| 78 | <div class="row row-cols-1 row-cols-sm-3 row-cols-xl-6"> | 78 | <div class="row row-cols-1 row-cols-sm-3 row-cols-xl-6"> |
| 79 | <!-- ARTICULO --> | 79 | <!-- ARTICULO --> |
| 80 | <div | 80 | <div |
| 81 | class="col px-2 my-1 my-md-3 h-auto" | 81 | class="col px-2 my-1 my-md-3 h-auto" |
| 82 | *ngFor="let articulo of auxArticulos | slice:0:showQuantity;"> | 82 | *ngFor="let articulo of auxArticulos | slice:0:showQuantity;"> |
| 83 | <div class="swing-in-top-fwd card h-auto"> | 83 | <div class="swing-in-top-fwd card h-auto"> |
| 84 | <img | 84 | <img |
| 85 | draggable="false" | 85 | draggable="false" |
| 86 | ondragstart="return false;" | 86 | ondragstart="return false;" |
| 87 | (contextmenu)="false" | 87 | (contextmenu)="false" |
| 88 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | 88 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
| 89 | onerror="this.src='assets/img/image-not-found.jpg'" | 89 | onerror="this.src='assets/img/image-not-found.jpg'" |
| 90 | class="card-img-top h-55 rounded-sm"> | 90 | class="card-img-top h-55 rounded-sm"> |
| 91 | <div class="row mx-0 py-1 h-auto justify-content-center"> | 91 | <div class="row mx-0 py-1 h-auto justify-content-center"> |
| 92 | <p class="col-12 px-1 h6 h-auto text-primary text-center min-h-60">{{articulo.DetArt}}</p> | 92 | <p class="col-12 px-1 h6 h-auto text-primary text-center min-h-60">{{articulo.DetArt}}</p> |
| 93 | <p class="col-12 px-1 h-auto text-center line-height-sm min-h-50"> | 93 | <p class="col-12 px-1 h-auto text-center line-height-sm min-h-50"> |
| 94 | <small>{{articulo.DET_LAR}}</small> | 94 | <small>{{articulo.DET_LAR}}</small> |
| 95 | </p> | 95 | </p> |
| 96 | <div class="col-12 px-1 align-self-end btn-effect h-auto"> | 96 | <div class="col-12 px-1 align-self-end btn-effect h-auto"> |
| 97 | <div | 97 | <div |
| 98 | [ngClass]="{'bg-secondary': articulo.promo}" | 98 | [ngClass]="{'bg-secondary': articulo.promo}" |
| 99 | class="row mx-0 justify-content-between bg-primary badge-pill" | 99 | class="row mx-0 justify-content-between bg-primary badge-pill" |
| 100 | (click)="elegirArticulo(articulo)"> | 100 | (click)="elegirArticulo(articulo)"> |
| 101 | <div class="col px-0 align-self-center text-white text-right"> | 101 | <div class="col px-0 align-self-center text-white text-right"> |
| 102 | {{articulo.PreVen | currency}} | 102 | {{articulo.PreVen | currency}} |
| 103 | </div> | 103 | </div> |
| 104 | <div class="col-5 px-0"> | 104 | <div class="col-5 px-0"> |
| 105 | <img | 105 | <img |
| 106 | draggable="false" | 106 | draggable="false" |
| 107 | ondragstart="return false;" | 107 | ondragstart="return false;" |
| 108 | (contextmenu)="false" | 108 | (contextmenu)="false" |
| 109 | class="d-block ml-auto py-1 icon-30" | 109 | class="d-block ml-auto py-1 icon-30" |
| 110 | src="assets/img/ir.svg"> | 110 | src="assets/img/ir.svg"> |
| 111 | </div> | 111 | </div> |
| 112 | </div> | 112 | </div> |
| 113 | </div> | 113 | </div> |
| 114 | </div> | 114 | </div> |
| 115 | </div> | 115 | </div> |
| 116 | </div> | 116 | </div> |
| 117 | </div> | 117 | </div> |
| 118 | <!-- BOTON VER MAS --> | 118 | <!-- BOTON VER MAS --> |
| 119 | <div class="row mx-0"> | 119 | <div class="row mx-0"> |
| 120 | <div | 120 | <div |
| 121 | *ngIf="showQuantity <= auxArticulos.slice(0, showQuantity).length" | 121 | *ngIf="showQuantity <= auxArticulos.slice(0, showQuantity).length" |
| 122 | class="col-12 px-0 mb-2"> | 122 | class="col-12 px-0 mb-2"> |
| 123 | <button | 123 | <button |
| 124 | (click)="increaseShow()" | 124 | (click)="increaseShow()" |
| 125 | class="btn btn-block btn-outline-primary"> | 125 | class="btn btn-block btn-outline-primary"> |
| 126 | Ver Más | 126 | Ver Más |
| 127 | </button> | 127 | </button> |
| 128 | </div> | 128 | </div> |
| 129 | </div> | 129 | </div> |
| 130 | </div> | 130 | </div> |
| 131 | </div> | 131 | </div> |
| 132 | </div> | 132 | </div> |
| 133 | </div> | 133 | </div> |
| 134 | <!-- FOOTER CARRITO DE COMPRAS --> | 134 | <!-- FOOTER CARRITO DE COMPRAS --> |
| 135 | <div class="row w-90 mx-auto h-auto justify-content-center"> | 135 | <div class="row w-90 mx-auto h-auto justify-content-center"> |
| 136 | <div class="col-12 h-75 px-0 border border-primary rounded"> | 136 | <div class="col-12 h-75 px-0 border border-primary rounded"> |
| 137 | <!-- CABECERA --> | 137 | <!-- CABECERA --> |
| 138 | <div class="row mx-0 h-15 border-bottom border-primary"> | 138 | <div class="row mx-0 h-15 border-bottom border-primary"> |
| 139 | <p class="col align-self-center text-truncate"><small>ARTÍCULOS EN TÚ CARRITO DE COMPRAS</small></p> | 139 | <p class="col align-self-center text-truncate"><small>ARTÍCULOS EN TÚ CARRITO DE COMPRAS</small></p> |
| 140 | </div> | 140 | </div> |
| 141 | <!-- CUERPO --> | 141 | <!-- CUERPO --> |
| 142 | <div class="row h-85 mx-0 justify-content-around"> | 142 | <div class="row h-85 mx-0 justify-content-around"> |
| 143 | <!-- BOTON SCROLL IZQUIERDA --> | 143 | <!-- BOTON SCROLL IZQUIERDA --> |
| 144 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> | 144 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> |
| 145 | <img | 145 | <img |
| 146 | draggable="false" | 146 | draggable="false" |
| 147 | ondragstart="return false;" | 147 | ondragstart="return false;" |
| 148 | (contextmenu)="false" | 148 | (contextmenu)="false" |
| 149 | class="icon-30 rotate-180-neg" | 149 | class="icon-30 rotate-180-neg" |
| 150 | src="assets/img/ir-fondo-color.svg" | 150 | src="assets/img/ir-fondo-color.svg" |
| 151 | (mousedown)="scrollX(templateCarrito, -100)" | 151 | (mousedown)="scrollX(templateCarrito, -100)" |
| 152 | (mouseup)="mouseup()" | 152 | (mouseup)="mouseup()" |
| 153 | (mouseleave)="mouseup()"> | 153 | (mouseleave)="mouseup()"> |
| 154 | </div> | 154 | </div> |
| 155 | <!-- CARRITO --> | 155 | <!-- CARRITO --> |
| 156 | <div class="col-6 col-sm-8 col-md-9 col-lg-10 h-100"> | 156 | <div class="col-6 col-sm-8 col-md-9 col-lg-10 h-100"> |
| 157 | <div #templateCarrito class="row flex-row flex-nowrap h-100 mx-0 my-2 scroll-x"> | 157 | <div #templateCarrito class="row flex-row flex-nowrap h-100 mx-0 my-2 scroll-x"> |
| 158 | <!-- MENSAJE DE ADVERTENCIA --> | 158 | <!-- MENSAJE DE ADVERTENCIA --> |
| 159 | <div *ngIf="!articuloService.carrito.length" class="col h-100"> | 159 | <div *ngIf="!articuloService.carrito.length" class="col h-100"> |
| 160 | <p class="text-center py-5">No hay articulos en el carrito</p> | 160 | <p class="text-center py-5">No hay articulos en el carrito</p> |
| 161 | </div> | 161 | </div> |
| 162 | <!-- ARTICULOS --> | 162 | <!-- ARTICULOS --> |
| 163 | <div | 163 | <div |
| 164 | class="col-10 col-sm-4 col-lg-2 px-2 px-xl-4 align-self-center border-right border-primary" | 164 | class="col-10 col-sm-4 col-lg-2 px-2 px-xl-4 align-self-center border-right border-primary" |
| 165 | *ngFor="let articulo of articuloService.carrito; let i = index;"> | 165 | *ngFor="let articulo of articuloService.carrito; let i = index;"> |
| 166 | <div class="swing-in-top-fwd"> | 166 | <div class="swing-in-top-fwd"> |
| 167 | <img | 167 | <img |
| 168 | draggable="false" | 168 | draggable="false" |
| 169 | ondragstart="return false;" | 169 | ondragstart="return false;" |
| 170 | (contextmenu)="false" | 170 | (contextmenu)="false" |
| 171 | class="d-block img-fluid p-2 mx-auto rounded" | 171 | class="d-block img-fluid p-2 mx-auto rounded" |
| 172 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | 172 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
| 173 | onerror="this.src='assets/img/image-not-found.jpg'"> | 173 | onerror="this.src='assets/img/image-not-found.jpg'"> |
| 174 | <p class="d-block mt-auto text-center text-primary text-truncate"> | 174 | <p class="d-block mt-auto text-center text-primary text-truncate"> |
| 175 | <small>{{articulo.DetArt}}</small> | 175 | <small>{{articulo.DetArt}}</small> |
| 176 | </p> | 176 | </p> |
| 177 | </div> | 177 | </div> |
| 178 | </div> | 178 | </div> |
| 179 | </div> | 179 | </div> |
| 180 | </div> | 180 | </div> |
| 181 | <!-- BOTON SCROLL DERECHA --> | 181 | <!-- BOTON SCROLL DERECHA --> |
| 182 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> | 182 | <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> |
| 183 | <img | 183 | <img |
| 184 | draggable="false" | 184 | draggable="false" |
| 185 | ondragstart="return false;" | 185 | ondragstart="return false;" |
| 186 | (contextmenu)="false" | 186 | (contextmenu)="false" |
| 187 | class="icon-30" | 187 | class="icon-30" |
| 188 | src="assets/img/ir-fondo-color.svg" | 188 | src="assets/img/ir-fondo-color.svg" |
| 189 | (mousedown)="scrollX(templateCarrito, 100)" | 189 | (mousedown)="scrollX(templateCarrito, 100)" |
| 190 | (mouseup)="mouseup()" | 190 | (mouseup)="mouseup()" |
| 191 | (mouseleave)="mouseup()"> | 191 | (mouseleave)="mouseup()"> |
| 192 | </div> | 192 | </div> |
| 193 | </div> | 193 | </div> |
| 194 | </div> | 194 | </div> |
| 195 | <!-- VER CARRITO Y TOTAL--> | 195 | <!-- VER CARRITO Y TOTAL--> |
| 196 | <div | 196 | <div |
| 197 | class="col-auto p-0 mt-2 ml-auto h-20" | 197 | class="col-auto p-0 mt-2 ml-auto h-20" |
| 198 | *ngIf="articuloService.carrito.length"> | 198 | *ngIf="articuloService.carrito.length"> |
| 199 | <div | 199 | <div |
| 200 | class="btn-effect col-auto align-self-center px-0 bg-white" | 200 | class="btn-effect col-auto align-self-center px-0 bg-white" |
| 201 | [routerLink]="['/carrito']"> | 201 | [routerLink]="['/carrito']"> |
| 202 | <div class="row justify-content-between mx-0"> | 202 | <div class="row justify-content-between mx-0"> |
| 203 | <div class="col-auto align-self-center text-primary">TOTAL</div> | 203 | <div class="col-auto align-self-center text-primary">TOTAL</div> |
| 204 | <div class="col-auto p-0 bg-primary d-none d-sm-block bg-total"> | 204 | <div class="col-auto p-0 bg-primary d-none d-sm-block bg-total"> |
| 205 | <p class="text-center text-white mt-1 py-1">{{articuloService.subTotal | currency}}</p> | 205 | <p class="text-center text-white mt-1 py-1">{{articuloService.subTotal | currency}}</p> |
| 206 | </div> | 206 | </div> |
| 207 | <div class="col-auto align-self-center text-primary ml-2 bg-light">VER CARRITO</div> | 207 | <div class="col-auto align-self-center text-primary ml-2 bg-light">VER CARRITO</div> |
| 208 | <div class="col-auto p-0 bg-primary d-none d-sm-block"> | 208 | <div class="col-auto p-0 bg-primary d-none d-sm-block"> |
| 209 | <img | 209 | <img |
| 210 | draggable="false" | 210 | draggable="false" |
| 211 | ondragstart="return false;" | 211 | ondragstart="return false;" |
| 212 | (contextmenu)="false" | 212 | (contextmenu)="false" |
| 213 | class="p-2 icon-40" | 213 | class="p-2 icon-40" |
| 214 | src="assets/img/carrito.svg"> | 214 | src="assets/img/carrito.svg"> |
| 215 | </div> | 215 | </div> |
| 216 | </div> | 216 | </div> |
| 217 | </div> | 217 | </div> |
| 218 | </div> | 218 | </div> |
| 219 | 219 | ||
| 220 | </div> | 220 | </div> |
| 221 | </div> | 221 | </div> |
| 222 | 222 | ||
| 223 | </div> | 223 | </div> |
| 224 | 224 |