Commit 2df54299cb1f205e492006ac56829f4c522311be

Authored by Luis Suarez
Exists in develop

Merge branch 'develop' of http://git.focasoftware.com/angular/autoservicio-axion into develop

Actualizando a version mas reciente
src/app/interfaces/IArticulo.ts
... ... @@ -31,6 +31,10 @@ export interface IArticulo {
31 31 SECA?: number;
32 32 SECP?: number;
33 33 MKT_DESC?: string;
  34 + NHA?: boolean;
  35 + FECHA_VIGENCIA_HASTA?: Date;
  36 + FECHA_VIGENCIA_DESDE?: Date;
  37 + ExiVta?: number;
34 38 }
35 39  
36 40 export interface ICodigoBarra {
src/app/modules/pedidos-salientes/pedidos-salientes.component.html
1   -<div class="row mx-0 py-5 px-2 h-100 justify-content-around">
2   - <div class="col-4">
3   - <div class="p-3 bg-white text-center shadow-lg rounded h-100">
4   - <p class="h5 mt-3">ESTAMOS</p>
5   - <p class="h3 font-weight-bold text-secondary">preparando</p>
6   - <p class="h5">TU PEDIDO</p>
7   - <div
8   - *ngFor="let pedido of pedidosPendientes; let i = index"
9   - [hidden]="i > 3"
10   - class="font-weight-bold mb-2 text-muted">
11   - <p class="display-4">{{rellenar(pedido.id.toString().slice(0), 3)}}</p>
12   - </div>
13   - </div>
14   - </div>
15   - <div class="col-4">
  1 +<div class="row mt-2 justify-content-center h-15">
  2 + <div class="col-3 col-lg-2">
16 3 <img
17 4 draggable="false"
18 5 ondragstart="return false;"
19 6 (contextmenu)="false"
20   - class="w-40 h-auto d-block mx-auto"
  7 + class="w-60 h-auto d-block mx-auto"
21 8 src="assets/img/logo-spot.svg">
22   - <div class="p-3 text-center h-100">
23   - <p class="h5 mt-3">LISTO PARA</p>
24   - <p class="h3 font-weight-bold text-primary">retirar</p>
25   - <div *ngIf="pedidosFinalizados.length">
26   - <p class="display-1 mt-2 text-primary mb-0">{{rellenar(pedidosFinalizados[0].id.toString().slice(0), 3)}}</p>
27   - </div>
28   - <p class="h3 font-weight-bold text-info mt-2">¡Que lo disfrutes!</p>
29   - </div>
30 9 </div>
31   - <div class="col-4">
  10 +</div>
  11 +<div class="row mt-n5 mx-0 justify-content-around h-75">
  12 + <div class="col-5 col-md-6 col-lg-4 h-100">
32 13 <div class="p-3 bg-white text-center shadow-lg rounded h-100">
33   - <p class="h5 mt-3">YA FUÉ</p>
34   - <p class="h3 font-weight-bold text-primary">entregado</p>
35   - <p class="h5">TU PEDIDO</p>
  14 + <h5 class="pt-3">ESTAMOS</h5>
  15 + <h3 class="font-weight-bold text-secondary">preparando</h3>
  16 + <h5>TU PEDIDO</h5>
36 17 <div
37   - *ngFor="let pedido of pedidosFinalizados; let i = index"
38   - [hidden]="i > 4 || i == 0"
  18 + *ngFor="let pedido of pedidosPendientes; let i = index"
  19 + [hidden]="i > 3"
39 20 class="font-weight-bold mb-2 text-muted">
40   - <p class="display-4">{{rellenar(pedido.id.toString().slice(0), 3)}}</p>
  21 + <h1 class="display-4">{{rellenar(pedido.id.toString().slice(0), 3)}}</h1>
  22 + </div>
  23 + </div>
  24 + </div>
  25 + <div class="col-5 col-md-6 col-lg-4 h-100">
  26 + <div class="p-3 bg-white shadow-lg rounded text-center h-100">
  27 + <h5 class="pt-3">LISTO PARA</h5>
  28 + <h3 class="font-weight-bold text-primary">retirar</h3>
  29 + <div *ngIf="pedidoFinalizado.length">
  30 + <h1 class="display-1 mt-4 text-primary mb-0">{{rellenar(pedidoFinalizado[0].id.toString().slice(0), 3)}}</h1>
  31 + <hr class="line mt-0">
41 32 </div>
  33 + <h3 class="font-weight-bold text-info mt-4">¡Que lo disfrutes!</h3>
42 34 </div>
43 35 </div>
44 36 </div>
src/app/modules/pedidos-salientes/pedidos-salientes.component.ts
... ... @@ -7,7 +7,7 @@ import { ComandaService } from &#39;src/app/services/comanda/comanda.service&#39;;
7 7 styleUrls: ['./pedidos-salientes.component.scss']
8 8 })
9 9 export class PedidosSalientesComponent implements OnInit {
10   - pedidosFinalizados = [];
  10 + pedidoFinalizado = [];
11 11 cicloTime;
12 12 pedidosPendientes = [];
13 13  
... ... @@ -28,7 +28,7 @@ export class PedidosSalientesComponent implements OnInit {
28 28 buscarPedidosFinalizados() {
29 29 this.comandaServices.getPendientesEntrega()
30 30 .subscribe((pedidos: []) => {
31   - this.pedidosFinalizados = pedidos;
  31 + this.pedidoFinalizado = pedidos;
32 32 });
33 33 }
34 34  
src/app/modules/seleccion-articulos/no-stock/no-stock.component.html
... ... @@ -0,0 +1,24 @@
  1 +<div class="bg-primary rounded">
  2 + <div class="modal-body">
  3 + <img
  4 + draggable="false"
  5 + ondragstart="return false;"
  6 + (contextmenu)="false"
  7 + (click)="close()"
  8 + class="btn-effect icon-30 mt-2 mr-2 position-absolute top-0 right-0 z-index"
  9 + src="assets/img/icono-cancelar-blanco.svg">
  10 + <div class="row mx-0 my-2">
  11 + <img
  12 + draggable="false"
  13 + ondragstart="return false;"
  14 + (contextmenu)="false"
  15 + class="d-block mx-auto icon-60"
  16 + src="assets/img/sin-stock-2.svg">
  17 + <div class="col-12 py-3">
  18 + <p class="text-white text-center h4">
  19 + Disculpá, este articulo no está disponible por el momento
  20 + </p>
  21 + </div>
  22 + </div>
  23 + </div>
  24 +</div>
src/app/modules/seleccion-articulos/no-stock/no-stock.component.scss
src/app/modules/seleccion-articulos/no-stock/no-stock.component.spec.ts
... ... @@ -0,0 +1,25 @@
  1 +import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  2 +
  3 +import { NoStockComponent } from './no-stock.component';
  4 +
  5 +describe('NoStockComponent', () => {
  6 + let component: NoStockComponent;
  7 + let fixture: ComponentFixture<NoStockComponent>;
  8 +
  9 + beforeEach(async(() => {
  10 + TestBed.configureTestingModule({
  11 + declarations: [ NoStockComponent ]
  12 + })
  13 + .compileComponents();
  14 + }));
  15 +
  16 + beforeEach(() => {
  17 + fixture = TestBed.createComponent(NoStockComponent);
  18 + component = fixture.componentInstance;
  19 + fixture.detectChanges();
  20 + });
  21 +
  22 + it('should create', () => {
  23 + expect(component).toBeTruthy();
  24 + });
  25 +});
src/app/modules/seleccion-articulos/no-stock/no-stock.component.ts
... ... @@ -0,0 +1,27 @@
  1 +import { Component, OnInit } from '@angular/core';
  2 +import { BsModalRef } from 'ngx-bootstrap/modal';
  3 +import { Subject } from 'rxjs';
  4 +
  5 +@Component({
  6 + selector: 'app-no-stock',
  7 + templateUrl: './no-stock.component.html',
  8 + styleUrls: ['./no-stock.component.scss']
  9 +})
  10 +export class NoStockComponent implements OnInit {
  11 + onClose: Subject<any>;
  12 +
  13 + constructor(
  14 + private modalRef: BsModalRef,
  15 + ) {
  16 + this.onClose = new Subject();
  17 + }
  18 +
  19 + ngOnInit() {
  20 + }
  21 +
  22 + close() {
  23 + this.onClose.next();
  24 + this.modalRef.hide();
  25 + }
  26 +
  27 +}
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
... ... @@ -48,6 +48,13 @@
48 48 draggable="false"
49 49 ondragstart="return false;"
50 50 (contextmenu)="false"
  51 + *ngIf="articulo.ExiVta < 1"
  52 + class="w-50 position-fixed right-0"
  53 + src="assets/img/sin-stock.svg">
  54 + <img
  55 + draggable="false"
  56 + ondragstart="return false;"
  57 + (contextmenu)="false"
51 58 src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}"
52 59 onerror="this.src='assets/img/imagen-no-encontrada.jpg'"
53 60 class="card-img-top w-100 h-auto h-md-55 rounded-sm">
src/app/modules/seleccion-articulos/seleccion-articulos.component.ts
... ... @@ -12,6 +12,7 @@ import { SinonimoComponent } from &#39;src/app/shared/sinonimo/sinonimo.component&#39;;
12 12 import { FiltroCategoriasComponent } from './filtro-categorias/filtro-categorias.component';
13 13 import * as _ from 'lodash';
14 14 import { ANIMATIONS } from 'src/app/utils/animations';
  15 +import { NoStockComponent } from './no-stock/no-stock.component';
15 16  
16 17 @Component({
17 18 selector: 'app-seleccion-articulos',
... ... @@ -97,7 +98,18 @@ export class SeleccionArticulosComponent implements OnInit, AfterViewInit, OnDes
97 98 }
98 99  
99 100 selectArticulo(articulo: IArticulo) {
100   - this.getByID(articulo.id);
  101 + if (articulo.ExiVta < 1) {
  102 + if (this.modalRef) return;
  103 + this.modalRef = this.modalService.show(NoStockComponent, {
  104 + class: 'modal-dialog-centered',
  105 + backdrop: false,
  106 + ignoreBackdropClick: true,
  107 + });
  108 + this.modalRef.content.onClose
  109 + .subscribe(() => this.modalRef = null);
  110 + } else {
  111 + this.getByID(articulo.id);
  112 + }
101 113 }
102 114  
103 115 getByID(id: number) {
src/app/modules/seleccion-articulos/seleccion-articulos.module.ts
... ... @@ -12,6 +12,7 @@ import { FormsModule } from &#39;@angular/forms&#39;;
12 12 import { ConfirmacionComponent } from 'src/app/shared/confirmacion/confirmacion.component';
13 13 import { ArticuloCantidadComponent } from 'src/app/shared/articulo-cantidad/articulo-cantidad.component';
14 14 import { FiltroCategoriasComponent } from './filtro-categorias/filtro-categorias.component';
  15 +import { NoStockComponent } from './no-stock/no-stock.component';
15 16  
16 17 @NgModule({
17 18 declarations: [
... ... @@ -22,6 +23,7 @@ import { FiltroCategoriasComponent } from &#39;./filtro-categorias/filtro-categorias
22 23 ConfirmacionComponent,
23 24 ArticuloCantidadComponent,
24 25 FiltroCategoriasComponent,
  26 + NoStockComponent,
25 27 ],
26 28 imports: [
27 29 CommonModule,
... ... @@ -32,6 +34,6 @@ import { FiltroCategoriasComponent } from &#39;./filtro-categorias/filtro-categorias
32 34 SharedModule
33 35 ],
34 36 exports: [HeaderPublicidadComponent, ArticuloCantidadComponent],
35   - entryComponents: [PromocionComponent, ConfirmacionComponent, SinonimoComponent]
  37 + entryComponents: [PromocionComponent, ConfirmacionComponent, SinonimoComponent, NoStockComponent]
36 38 })
37 39 export class SeleccionArticulosModule { }
src/assets/img/sin-stock-2.svg
... ... @@ -0,0 +1,18 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  3 +<!-- Creator: CorelDRAW X7 -->
  4 +<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="10.5274mm" height="10.5274mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
  5 +viewBox="0 0 733 733"
  6 + xmlns:xlink="http://www.w3.org/1999/xlink">
  7 + <defs>
  8 + <style type="text/css">
  9 + <![CDATA[
  10 + .fil0 {fill:#F4B223}
  11 + ]]>
  12 + </style>
  13 + </defs>
  14 + <g id="Capa_x0020_1">
  15 + <metadata id="CorelCorpID_0Corel-Layer"/>
  16 + <path class="fil0" d="M360 592l7 0 191 -108 0 -237c-11,-6 -182,-99 -191,-107l-6 0 -191 107 -1 237c35,19 64,36 96,53l95 55zm179 -367l76 -76c50,58 81,134 81,217 0,183 -147,330 -330,330 -83,0 -159,-31 -217,-81l83 -83c-11,-6 -21,-12 -32,-18l-76 76c-54,-59 -87,-137 -87,-224 0,-182 147,-329 329,-329 87,0 165,33 224,87l-84 84c12,6 23,12 33,17zm-173 508c-202,0 -366,-164 -366,-367 0,-202 164,-366 366,-366 203,0 367,164 367,366 0,203 -164,367 -367,367zm8 -372l0 203c13,-5 29,-16 41,-22 20,-11 111,-64 123,-68l0 -203c-9,2 -31,17 -41,22 -19,10 -112,64 -123,68zm-184 113c12,4 28,15 40,22l124 68 0 -204c-14,-4 -102,-55 -122,-67 -12,-6 -30,-18 -43,-22l1 203zm11 -221c10,8 43,24 57,32 21,13 20,4 60,-17 16,-9 109,-60 116,-67 -19,-11 -37,-21 -57,-32 -19,-10 -18,-5 -59,19l-117 65zm93 52l58 33c17,9 12,7 29,-3l145 -82 -57 -32c-16,-10 -13,-8 -29,1l-87 49c-7,3 -53,28 -59,34zm159 42c-8,2 -54,30 -57,35 -3,8 -1,36 -1,45 0,14 -4,36 15,30 4,-2 23,-15 29,-18 7,-4 24,-12 26,-19 2,-5 1,-37 1,-45 0,-11 2,-33 -13,-28zm-38 45l0 37c38,-18 31,-16 31,-54 -11,4 -20,11 -31,17z"/>
  17 + </g>
  18 +</svg>
src/assets/img/sin-stock.svg
... ... @@ -0,0 +1,43 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  3 +<!-- Creator: CorelDRAW X7 -->
  4 +<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="25.1549mm" height="25.1762mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
  5 +viewBox="0 0 238 238"
  6 + xmlns:xlink="http://www.w3.org/1999/xlink">
  7 + <defs>
  8 + <font id="FontID0" horiz-adv-x="790" font-variant="normal" style="fill-rule:nonzero" font-weight="400">
  9 + <font-face
  10 + font-family="Gotham Bold">
  11 + <font-face-src>
  12 + <font-face-name name="Gotham-Bold"/>
  13 + </font-face-src>
  14 + </font-face>
  15 + <missing-glyph><path d="M0 0z"/></missing-glyph>
  16 + <glyph unicode="c" horiz-adv-x="571" d="M321.002 -11.9972c106.993,0 167.001,40.9868 219.004,98.0063l-88.9975 90.0009c-37.0168,-35.01 -72.0051,-57.0195 -123.004,-57.0195 -82.9989,0 -136.005,66.0065 -136.005,148.002l0 2.00681c0,79.0071 54.0092,145.995 130.006,145.995 53.9874,0 87.9941,-22.991 122.001,-59.0044l92.9893 100.013c-49.9956,55.9942 -112.992,90.0009 -213.987,90.0009 -164.013,0 -281.018,-126.014 -281.018,-279.011l0 -1.98499c0,-152.997 118.009,-277.005 279.011,-277.005z"/>
  17 + <glyph unicode="t" horiz-adv-x="414" d="M248.997 -9.00881c50.999,0 87.9941,12.019 119.994,31.0182l0 122.001c-21.9876,-12.019 -46.9854,-18.9992 -74.9935,-18.9992 -34.0066,0 -48.9922,16.9924 -48.9922,51.9806l0 229.016 125.992 0 0 129.984 -125.992 0 0 137.008 -152.016 0 0 -137.008 -63.9997 0 0 -129.984 63.9997 0 0 -254.014c0,-123.986 63.0181,-161.003 156.007,-161.003z"/>
  18 + <glyph unicode="n" horiz-adv-x="623" d="M67.9914 0l152.016 0 0 298.992c0,72.0051 36.995,109 94.9961,109 58.001,0 92.0077,-36.995 92.0077,-109l0 -298.992 151.994 0 0 347.003c0,123.004 -67.0099,199.001 -182.009,199.001 -77.0003,0 -122.001,-41.0086 -156.989,-86.0091l0 75.9969 -152.016 0 0 -535.992z"/>
  19 + <glyph unicode="k" horiz-adv-x="592" d="M67.9914 0l152.016 0 0 163.009 52.984 55.9942 140.018 -219.004 173.981 0 -210.998 324.993 204.018 210.998 -182.009 0 -177.995 -194.987 0 388.993 -152.016 0 0 -729.997z"/>
  20 + <glyph unicode=" " horiz-adv-x="299" d=""/>
  21 + <glyph unicode="S" horiz-adv-x="639" d="M332.999 -9.9904c150.99,0 257.002,77.9819 257.002,216.997l0 1.98499c0,122.001 -80.0105,173 -221.992,210.017 -121.019,30.9964 -151.012,45.982 -151.012,91.9859l0 2.00681c0,34.0066 30.9964,60.9894 90.0009,60.9894 59.0044,0 119.994,-25.9794 182.009,-68.9949l79.9887 116.002c-71.0017,56.9976 -157.992,88.9975 -259.99,88.9975 -143.007,0 -245.005,-84.0023 -245.005,-210.998l0 -2.00681c0,-138.993 91.0043,-177.995 232.004,-213.987 117.005,-29.993 141,-49.9956 141,-88.9975l0 -2.00681c0,-41.0086 -37.9984,-66.0065 -100.995,-66.0065 -80.0105,0 -146.017,33.0032 -209.013,85.0057l-91.0043 -109c84.0023,-74.9935 191.017,-111.988 297.007,-111.988z"/>
  22 + <glyph unicode="o" horiz-adv-x="663" d="M330.992 -11.9972c167.001,0 291.009,124.989 291.009,278.99l0 2.00681c0,154.001 -123.004,277.005 -289.002,277.005 -167.001,0 -291.009,-125.011 -291.009,-279.011l0 -1.98499c0,-154.001 123.004,-277.005 289.002,-277.005zm2.00681 130.988c-84.0023,0 -141,69.0167 -141,148.002l0 2.00681c0,79.0071 52.0024,145.995 138.993,145.995 84.0023,0 141,-68.9949 141,-148.002l0 -1.98499c0,-79.0071 -52.0024,-146.017 -138.993,-146.017z"/>
  23 + <glyph unicode="i" horiz-adv-x="302" d="M71.0017 594.996l159.999 0 0 135.001 -159.999 0 0 -135.001zm3.9918 -594.996l152.016 0 0 535.992 -152.016 0 0 -535.992z"/>
  24 + </font>
  25 + <style type="text/css">
  26 + <![CDATA[
  27 + @font-face { font-family:"Gotham Bold";font-variant:normal;font-weight:normal;src:url("#FontID0") format(svg)}
  28 + .fil0 {fill:#AF006A}
  29 + .fil1 {fill:#F4B223}
  30 + .fil2 {fill:white}
  31 + .fnt0 {font-weight:normal;font-size:43.3536px;font-family:'Gotham Bold'}
  32 + ]]>
  33 + </style>
  34 + </defs>
  35 + <g id="Capa_x0020_1">
  36 + <metadata id="CorelCorpID_0Corel-Layer"/>
  37 + <path class="fil0" d="M20 0l190 0c15,0 28,13 28,28l0 190c0,16 -30,27 -41,16l-193 -193c-10,-11 0,-41 16,-41z"/>
  38 + <path class="fil1" d="M177 93l1 0 26 -14 0 -33c-2,0 -25,-13 -26,-14l-1 0 -26 14 0 33c5,2 9,5 13,7l13 7zm24 -49l11 -11c7,8 11,18 11,30 0,25 -20,45 -45,45 -11,0 -22,-5 -30,-11l12 -12c-2,-1 -3,-1 -5,-2l-10 10c-7,-8 -12,-19 -12,-30 0,-25 20,-45 45,-45 12,0 22,4 30,12l-11 11c1,1 3,2 4,3zm-23 69c-28,0 -50,-23 -50,-50 0,-28 22,-50 50,-50 27,0 50,22 50,50 0,27 -23,50 -50,50zm1 -51l0 28c2,-1 4,-2 6,-3 2,-2 15,-9 16,-10l0 -27c-1,0 -4,2 -5,3 -3,1 -16,9 -17,9zm-25 15c2,1 4,2 5,3l17 10 0 -28c-2,-1 -14,-8 -16,-9 -2,-1 -4,-3 -6,-3l0 27zm1 -30c2,1 6,4 8,5 3,1 3,0 8,-3 2,-1 15,-8 16,-9 -3,-1 -5,-3 -8,-4 -2,-1 -2,-1 -8,2l-16 9zm13 7l8 5c2,1 2,1 4,0l20 -12 -8 -4c-2,-1 -2,-1 -4,0l-12 7c-1,0 -7,4 -8,4zm22 6c-1,0 -8,4 -8,5 -1,1 0,5 0,6 0,2 -1,5 2,4 0,0 3,-2 4,-2 1,-1 3,-2 3,-3 1,-1 0,-5 0,-6 0,-2 1,-5 -1,-4zm-5 6l0 5c5,-2 4,-2 4,-7 -2,0 -3,1 -4,2z"/>
  39 + <g transform="matrix(0.707107 0.707107 -0.707107 0.707107 1190.88 669.458)">
  40 + <text x="-1258" y="386" class="fil2 fnt0">Sin Stock</text>
  41 + </g>
  42 + </g>
  43 +</svg>