Commit 736faa380a834c25739c53c18159e79078f73019
1 parent
2e4de2b5e7
Exists in
master
and in
1 other branch
Agregado popover de sinonimos.
Showing
10 changed files
with
209 additions
and
19 deletions
Show diff stats
src/app/components/inicio/inicio.component.html
| 1 | <div class="row m-0 fade-in"> | 1 | <div class="row m-0 fade-in"> |
| 2 | <div class="col-12 p-0"> | 2 | <div class="col-12 p-0"> |
| 3 | 3 | ||
| 4 | <!-- NOMBRE DE SECCION --> | 4 | <!-- NOMBRE DE SECCION --> |
| 5 | <div class="row m-0"> | 5 | <div class="row m-0"> |
| 6 | <div class="col-12 p-0"> | 6 | <div class="col-12 p-0"> |
| 7 | <p class="h5 py-1 bg-gray text-muted text-center">Inicio</p> | 7 | <p class="h5 py-1 bg-gray text-muted text-center">Inicio</p> |
| 8 | </div> | 8 | </div> |
| 9 | </div> | 9 | </div> |
| 10 | 10 | ||
| 11 | <div class="row m-3 d-flex align-items-start disable-user-select"> | 11 | <div class="row m-3 d-flex align-items-start disable-user-select"> |
| 12 | <div class="col-md-5 d-flex align-items-end flex-column"> | 12 | <div class="col-md-5 d-flex align-items-end flex-column"> |
| 13 | 13 | ||
| 14 | <!-- PROMOCIONES --> | 14 | <!-- PROMOCIONES --> |
| 15 | <div class="card bg-white border-0 shadow rounded w-100 mb-auto"> | 15 | <div class="card bg-white border-0 shadow rounded w-100 mb-auto"> |
| 16 | <div class="card-body text-left px-4 py-3"> | 16 | <div class="card-body text-left px-4 py-3"> |
| 17 | <div class="row"> | 17 | <div class="row"> |
| 18 | <div class="col-7"> | 18 | <div class="col-7"> |
| 19 | <p class="h3 card-title">Promociones</p> | 19 | <p class="h3 card-title">Promociones</p> |
| 20 | </div> | 20 | </div> |
| 21 | <div class="col-5 p-0"> | 21 | <div class="col-5 p-0"> |
| 22 | <img src="{{apiUrl}}/imagenes/primario.promociones.png" class="icon-dim m-0"> | 22 | <img src="{{apiUrl}}/imagenes/primario.promociones.png" class="icon-dim m-0"> |
| 23 | </div> | 23 | </div> |
| 24 | </div> | 24 | </div> |
| 25 | <p class="h5 card-text text-muted font-weight-light">Conozca las ofertas del momento.</p> | 25 | <p class="h5 card-text text-muted font-weight-light">Conozca las ofertas del momento.</p> |
| 26 | </div> | 26 | </div> |
| 27 | <div id="carouselIndicators" class="carousel slide" data-ride="carousel"> | 27 | <div id="carouselIndicators" class="carousel slide" data-ride="carousel"> |
| 28 | <div class="carousel-inner"> | 28 | <div class="carousel-inner"> |
| 29 | <div class="carousel-item active"> | 29 | <div class="carousel-item active"> |
| 30 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> | 30 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> |
| 31 | </div> | 31 | </div> |
| 32 | <div class="carousel-item"> | 32 | <div class="carousel-item"> |
| 33 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> | 33 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> |
| 34 | </div> | 34 | </div> |
| 35 | <div class="carousel-item"> | 35 | <div class="carousel-item"> |
| 36 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> | 36 | <img src="{{apiUrl}}/imagenes/testImg3.jpg" class="d-block w-100 m-auto rounded"> |
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | </div> | 39 | </div> |
| 40 | </div> | 40 | </div> |
| 41 | 41 | ||
| 42 | <!-- ORDENAR --> | 42 | <!-- ORDENAR --> |
| 43 | <div class="card card-effect bg-white border-0 shadow rounded w-100 mt-4"> | 43 | <div class="card card-effect bg-white border-0 shadow rounded w-100 mt-4"> |
| 44 | <div class="card-body text-left px-4 py-3"> | 44 | <div class="card-body text-left px-4 py-3"> |
| 45 | <div class="row"> | 45 | <div class="row"> |
| 46 | <div class="col-5"> | 46 | <div class="col-5"> |
| 47 | <p class="h3 card-title">Ordenar Pedido</p> | 47 | <p class="h3 card-title">Ordenar Pedido</p> |
| 48 | </div> | 48 | </div> |
| 49 | <div class="col-7 p-0"> | 49 | <div class="col-7 p-0"> |
| 50 | <img src="{{apiUrl}}/imagenes/primario.ordenar.png" class="icon-dim"> | 50 | <img src="{{apiUrl}}/imagenes/primario.ordenar.png" class="icon-dim"> |
| 51 | </div> | 51 | </div> |
| 52 | </div> | 52 | </div> |
| 53 | <p class="h5 card-text text-muted font-weight-light">Arme su pedido y solo pase a retirar.</p> | 53 | <p class="h5 card-text text-muted font-weight-light">Arme su pedido y solo pase a retirar.</p> |
| 54 | </div> | 54 | </div> |
| 55 | <img | 55 | <img |
| 56 | class="card-img-bottom d-block w-100 mx-auto rounded" | 56 | class="card-img-bottom d-block w-100 mx-auto rounded" |
| 57 | src="{{apiUrl}}/imagenes/cafe.jpg"> | 57 | src="{{apiUrl}}/imagenes/cafe.jpg"> |
| 58 | </div> | 58 | </div> |
| 59 | </div> | 59 | </div> |
| 60 | 60 | ||
| 61 | <div class="col-md-7 d-flex align-items-end flex-column mt-4 mt-md-0"> | 61 | <div class="col-md-7 d-flex align-items-end flex-column mt-4 mt-md-0"> |
| 62 | 62 | ||
| 63 | <!-- CARGAR PRODUCTOS --> | 63 | <!-- CARGAR PRODUCTOS --> |
| 64 | <ng-template #popTemplate> | 64 | <ng-template #popTemplate> |
| 65 | <app-popover-promos | 65 | <app-popover-promos |
| 66 | *ngIf="productoAcargar && !productoEsPromo" | 66 | *ngIf="productoAcargar && !productoEsPromo" |
| 67 | [popover]="popoverDirective" | 67 | [popover]="popoverDirective" |
| 68 | [popoverContent]="popoverContent" | 68 | [popoverContent]="promociones" |
| 69 | (promoSeleccionada)="promoSeleccionada($event)" | 69 | (promoSeleccionada)="promoSeleccionada($event)" |
| 70 | class="fade-in text-white rounded-sm border-0"> | 70 | class="text-white rounded-sm border-0"> |
| 71 | </app-popover-promos> | 71 | </app-popover-promos> |
| 72 | <app-popover-sinonimos | ||
| 73 | *ngIf="promoAcargar && productoEsPromo" | ||
| 74 | [popover]="popoverDirective" | ||
| 75 | [popoverContent]="sinonimos" | ||
| 76 | class="text-white rounded-sm border-0"> | ||
| 77 | </app-popover-sinonimos> | ||
| 72 | </ng-template> | 78 | </ng-template> |
| 73 | <div | 79 | <div |
| 74 | placement="left" | 80 | placement="left" |
| 75 | triggers="" | 81 | triggers="" |
| 76 | [popover]="popTemplate" | 82 | [popover]="popTemplate" |
| 77 | class="w-100" | 83 | class="w-100" |
| 78 | #pop="bs-popover"> | 84 | #pop="bs-popover"> |
| 79 | <div class="card bg-white border-0 shadow rounded mb-auto"> | 85 | <div class="card bg-white border-0 shadow rounded mb-auto"> |
| 80 | <div class="card-body text-left px-4 py-3"> | 86 | <div class="card-body text-left px-4 py-3"> |
| 81 | <div class="row"> | 87 | <div class="row"> |
| 82 | <div class="col-6"> | 88 | <div class="col-6"> |
| 83 | <p class="h3 card-title">Cargar Productos</p> | 89 | <p class="h3 card-title">Cargar Productos</p> |
| 84 | </div> | 90 | </div> |
| 85 | <div class="col-6 p-0"> | 91 | <div class="col-6 p-0"> |
| 86 | <img src="{{apiUrl}}/imagenes/escanear.png" class="icon-dim mb-2"> | 92 | <img src="{{apiUrl}}/imagenes/escanear.png" class="icon-dim mb-2"> |
| 87 | </div> | 93 | </div> |
| 88 | </div> | 94 | </div> |
| 89 | <p class="h5 card-text text-muted font-weight-light"> | 95 | <p class="h5 card-text text-muted font-weight-light"> |
| 90 | Coloque el código de<br> | 96 | Coloque el código de<br> |
| 91 | barras o QR frente al scanner. | 97 | barras o QR frente al scanner. |
| 92 | </p> | 98 | </p> |
| 93 | </div> | 99 | </div> |
| 94 | <div class="row m-4"> | 100 | <div class="row m-4"> |
| 95 | <div class="col card bg-white shadow border-0 w-75 p-0 mx-auto rounded-sm"> | 101 | <div class="col card bg-white shadow border-0 w-75 p-0 mx-auto rounded-sm"> |
| 96 | <!-- IMAGEN DE ESCANER --> | 102 | <!-- IMAGEN DE ESCANER --> |
| 97 | <img | 103 | <img |
| 98 | *ngIf="!productoAcargar" | 104 | *ngIf="!productoAcargar" |
| 99 | class="card-img-top d-block w-100 mx-auto rounded-sm" | 105 | class="card-img-top d-block w-100 mx-auto rounded-sm" |
| 100 | src="{{apiUrl}}/imagenes/escanner.jpg"> | 106 | src="{{apiUrl}}/imagenes/escanner.jpg"> |
| 101 | 107 | ||
| 102 | <!-- PRODUCTO A CARGAR --> | 108 | <!-- PRODUCTO A CARGAR --> |
| 103 | <div class="fade-in m-0" *ngIf="productoAcargar && !productoEsPromo"> | 109 | <div class="fade-in m-0" *ngIf="productoAcargar && !productoEsPromo"> |
| 104 | <img | 110 | <img |
| 105 | class="card-img-top d-block w-100 mx-auto rounded-sm" | 111 | class="card-img-top d-block w-100 mx-auto rounded-sm" |
| 106 | src="{{apiUrl}}/imagenes/testImg.jpg"> | 112 | src="{{apiUrl}}/imagenes/testImg.jpg"> |
| 107 | 113 | ||
| 108 | <div class="row justify-content-between m-3"> | 114 | <div class="row justify-content-between m-3"> |
| 109 | <div class="col-auto text-left px-1"> | 115 | <div class="col-auto text-left px-1"> |
| 110 | <p class="h6 font-weight-bold mb-0">{{productoAcargar.DetArt}}</p> | 116 | <p class="h6 font-weight-bold mb-0">{{productoAcargar.DetArt}}</p> |
| 111 | <p class="h6 mb-0"><small>{{productoAcargar.DetArt}}</small></p> | 117 | <p class="h6 mb-0"><small>{{productoAcargar.DetArt}}</small></p> |
| 112 | </div> | 118 | </div> |
| 113 | <div class="col-4 text-right my-auto"> | 119 | <div class="col-4 text-right my-auto"> |
| 114 | <p class="h5 font-weight-bold mb-0">{{productoAcargar.PreVen | currency}}</p> | 120 | <p class="h5 font-weight-bold mb-0">{{productoAcargar.PreVen | currency}}</p> |
| 115 | </div> | 121 | </div> |
| 116 | </div> | 122 | </div> |
| 117 | </div> | 123 | </div> |
| 118 | 124 | ||
| 119 | <!-- PROMO A CARGAR --> | 125 | <!-- PROMO A CARGAR --> |
| 120 | <div class="fade-in m-0" *ngIf="promoAcargar && productoEsPromo"> | 126 | <div class="fade-in m-0" *ngIf="promoAcargar && productoEsPromo"> |
| 121 | <img | 127 | <img |
| 122 | class="card-img-top d-block w-100 mx-auto rounded-sm" | 128 | class="card-img-top d-block w-100 mx-auto rounded-sm" |
| 123 | src="{{apiUrl}}/imagenes/testImg.jpg"> | 129 | src="{{apiUrl}}/imagenes/testImg.jpg"> |
| 124 | 130 | ||
| 125 | <div class="row justify-content-between m-3"> | 131 | <div class="row justify-content-between m-3"> |
| 126 | <div class="col-12 text-left px-1"> | 132 | <div class="col-12 text-left px-1"> |
| 127 | <p class="h6 font-weight-bold mb-0">{{promoAcargar.nombrePromo}}</p> | 133 | <p class="h6 font-weight-bold mb-0">{{promoAcargar.nombrePromo}}</p> |
| 128 | <p | 134 | <p |
| 129 | class="h6 mb-0" | 135 | class="h6 mb-0" |
| 130 | *ngFor="let producto of promoAcargar.productos"> | 136 | *ngFor="let producto of promoAcargar.productos"> |
| 131 | {{producto.DetArt}} | 137 | {{producto.DetArt}} |
| 132 | </p> | 138 | </p> |
| 133 | </div> | 139 | </div> |
| 134 | <div class="col-12 text-right mt-2 align-self-end"> | 140 | <div class="col-12 text-right mt-2 align-self-end"> |
| 135 | <p class="h5 font-weight-bold mb-0">{{productoAcargar.PreVen | currency}}</p> | 141 | <p class="h5 font-weight-bold mb-0">{{productoAcargar.PreVen | currency}}</p> |
| 136 | </div> | 142 | </div> |
| 137 | </div> | 143 | </div> |
| 138 | </div> | 144 | </div> |
| 139 | 145 | ||
| 140 | </div> | 146 | </div> |
| 141 | <!-- BOTONES --> | 147 | <!-- BOTONES DE CARGAR PRODUCTOS--> |
| 142 | <div | 148 | <div |
| 143 | class="col-5 pr-0" | 149 | class="col-5 pr-0" |
| 144 | *ngIf="productoAcargar && tienePromo"> | 150 | *ngIf="productoAcargar && tienePromo"> |
| 145 | <button | 151 | <button |
| 146 | *ngIf="productoEsPromo" | 152 | *ngIf="productoEsPromo && promoAcargar.sinonimos" |
| 147 | type="button" | 153 | type="button" |
| 148 | class="btn btn-light btn-block shadow-sm" | 154 | class="btn btn-light btn-block shadow-sm" |
| 149 | (click)="pop.show()"> | 155 | (click)="pop.show()"> |
| 150 | <span class="pr-2">Personalizar</span> | 156 | <span class="pr-2">Personalizar</span> |
| 151 | <i class="fa fa-hand-o-up text-purple" aria-hidden="true"></i> | 157 | <i class="fa fa-hand-o-up text-purple" aria-hidden="true"></i> |
| 152 | </button> | 158 | </button> |
| 153 | <button | 159 | <button |
| 154 | *ngIf="!productoEsPromo" | 160 | *ngIf="!productoEsPromo" |
| 155 | type="button" | 161 | type="button" |
| 156 | class="btn btn-primary btn-block shadow-sm" | 162 | class="btn btn-primary btn-block shadow-sm" |
| 157 | (click)="pop.show()"> | 163 | (click)="pop.show()"> |
| 158 | <span class="pr-2">Mostrar promociones</span> | 164 | <span class="pr-2">Mostrar promociones</span> |
| 159 | <i class="fa fa-bullhorn fa-flip-horizontal" aria-hidden="true"></i> | 165 | <i class="fa fa-bullhorn fa-flip-horizontal" aria-hidden="true"></i> |
| 160 | </button> | 166 | </button> |
| 161 | <button type="button" class="btn btn-light btn-block shadow-sm my-3"> | 167 | <button type="button" class="btn btn-light btn-block shadow-sm my-3"> |
| 162 | <span class="pr-2 font-weight-bold">Confirmar</span> | 168 | <span class="pr-2 font-weight-bold">Confirmar</span> |
| 163 | <i class="fa fa-check text-success" aria-hidden="true"></i> | 169 | <i class="fa fa-check text-success" aria-hidden="true"></i> |
| 164 | </button> | 170 | </button> |
| 165 | <button | 171 | <button |
| 166 | type="button" | 172 | type="button" |
| 167 | class="btn btn-light btn-block shadow-sm" | 173 | class="btn btn-light btn-block shadow-sm" |
| 168 | (click)="deshacerCarga()"> | 174 | (click)="deshacerCarga()"> |
| 169 | <span class="pr-2">Deshacer</span> | 175 | <span class="pr-2">Deshacer</span> |
| 170 | <i class="fa fa-undo text-warning" aria-hidden="true"></i> | 176 | <i class="fa fa-undo text-warning" aria-hidden="true"></i> |
| 171 | </button> | 177 | </button> |
| 172 | </div> | 178 | </div> |
| 173 | </div> | 179 | </div> |
| 174 | </div> | 180 | </div> |
| 175 | </div> | 181 | </div> |
| 176 | 182 | ||
| 177 | <!-- BUSCAR PRODUCTOS --> | 183 | <!-- BUSCAR PRODUCTOS --> |
| 178 | <div (click)="goPage('busqueda-productos')" | 184 | <div (click)="goPage('busqueda-productos')" |
| 179 | class="card card-effect bg-white border-0 shadow rounded w-100 mt-4"> | 185 | class="card card-effect bg-white border-0 shadow rounded w-100 mt-4"> |
| 180 | <div class="card-body text-left px-4 py-3"> | 186 | <div class="card-body text-left px-4 py-3"> |
| 181 | <div class="row"> | 187 | <div class="row"> |
| 182 | <div class="col-6"> | 188 | <div class="col-6"> |
| 183 | <p class="h3 card-title">Buscar Productos</p> | 189 | <p class="h3 card-title">Buscar Productos</p> |
| 184 | <p class="h5 card-text text-muted font-weight-light"> | 190 | <p class="h5 card-text text-muted font-weight-light"> |
| 185 | Busque aquí los productos<br> | 191 | Busque aquí los productos<br> |
| 186 | que no tienen código </p> | 192 | que no tienen código </p> |
| 187 | </div> | 193 | </div> |
| 188 | <div class="col-6 p-0"> | 194 | <div class="col-6 p-0"> |
| 189 | <img src="{{apiUrl}}/imagenes/primario.buscar.png" class="icon-dim mb-2"> | 195 | <img src="{{apiUrl}}/imagenes/primario.buscar.png" class="icon-dim mb-2"> |
| 190 | </div> | 196 | </div> |
| 191 | </div> | 197 | </div> |
| 192 | 198 | ||
| 193 | </div> | 199 | </div> |
| 194 | </div> | 200 | </div> |
| 195 | 201 | ||
| 196 | </div> | 202 | </div> |
| 197 | 203 | ||
| 198 | </div> | 204 | </div> |
| 199 | 205 | ||
| 200 | </div> | 206 | </div> |
| 201 | </div> | 207 | </div> |
| 202 | 208 |
src/app/components/popover-promos/popover-promos.component.html
| 1 | <div class="card-body"> | 1 | <div class="card-body fade-left"> |
| 2 | <div class="row"> | 2 | <div class="row"> |
| 3 | <div class="col text-left"> | 3 | <div class="col text-left"> |
| 4 | <p class="h5 card-title"> | 4 | <p class="h5 card-title"> |
| 5 | Este producto forma parte<br> | 5 | Este producto forma parte<br> |
| 6 | de Combos y Promociones | 6 | de Combos y Promociones |
| 7 | </p> | 7 | </p> |
| 8 | </div> | 8 | </div> |
| 9 | </div> | 9 | </div> |
| 10 | 10 | ||
| 11 | <div class="overflow-scroll popover-size pr-2"> | 11 | <div class="overflow-scroll popover-size pr-2"> |
| 12 | <div | 12 | <div |
| 13 | class="row my-2" | 13 | class="row my-2" |
| 14 | *ngFor="let promo of popoverContent"> | 14 | *ngFor="let promo of popoverContent"> |
| 15 | <div class="col text-dark"> | 15 | <div class="col text-dark"> |
| 16 | <div | 16 | <div |
| 17 | class="bg-white card-effect rounded-sm p-2 px-3" | 17 | class="bg-white card-effect rounded-sm p-2 px-3" |
| 18 | (click)="seleccionarPromo(promo)"> | 18 | (click)="seleccionarPromo(promo)"> |
| 19 | <div class="row justify-content-between"> | 19 | <div class="row justify-content-between"> |
| 20 | <div class="col-auto text-left"> | 20 | <div class="col-12 text-left"> |
| 21 | <p class="h5 font-weight-bold mb-0">{{promo.nombrePromo}}</p> | 21 | <p class="h5 mb-0"> |
| 22 | <p | 22 | <small class="font-weight-bold">{{promo.nombrePromo}}</small> |
| 23 | class="h6 mb-0" | 23 | </p> |
| 24 | *ngFor="let producto of promo.productos"> | ||
| 25 | {{producto.DetArt}} | ||
| 26 | </p> | ||
| 27 | </div> | 24 | </div> |
| 28 | <div class="col-auto text-right align-self-end"> | 25 | <div class="col-12 text-right mt-2"> |
| 29 | <p class="h4 font-weight-bold mb-0"> | 26 | <p class="h4 font-weight-bold mb-0"> |
| 30 | {{calcularPrecioDePromo(promo.productos) | currency}} | 27 | {{calcularPrecioDePromo(promo.productos) | currency}} |
| 31 | </p> | 28 | </p> |
| 32 | </div> | 29 | </div> |
| 33 | </div> | 30 | </div> |
| 34 | </div> | 31 | </div> |
| 35 | </div> | 32 | </div> |
| 36 | </div> | 33 | </div> |
| 37 | </div> | 34 | </div> |
| 38 | 35 | ||
| 39 | <div class="row mt-3 justify-content-end"> | 36 | <div class="row mt-3 justify-content-end"> |
| 40 | <div class="col-auto"> | 37 | <div class="col-auto"> |
| 41 | <button | 38 | <button |
| 42 | type="button" | 39 | type="button" |
| 43 | class="btn btn-sm btn-light shadow" | 40 | class="btn btn-sm btn-light shadow" |
| 44 | (click)="hide()"> | 41 | (click)="hide()"> |
| 45 | <span class="pr-2">No, gracias</span> | 42 | <span class="pr-2">No, gracias</span> |
| 46 | <i class="fa fa-times text-danger" aria-hidden="true"></i> | 43 | <i class="fa fa-times text-danger" aria-hidden="true"></i> |
| 47 | </button> | 44 | </button> |
| 48 | </div> | 45 | </div> |
| 49 | </div> | 46 | </div> |
| 50 | 47 | ||
| 51 | </div> | 48 | </div> |
| 52 | 49 |
src/app/components/popover-promos/popover-promos.component.scss
| 1 | .popover-size { | 1 | .popover-size { |
| 2 | max-height: 57vh !important; | 2 | max-height: 57vh !important; |
| 3 | min-height: 40vh !important; | 3 | min-height: 57vh !important; |
| 4 | } | 4 | } |
| 5 | 5 |
src/app/components/popover-sinonimos/popover-sinonimos.component.html
| 1 | <p>popover-sinonimos works!</p> | 1 | <div class="card-body fade-left"> |
| 2 | |||
| 3 | <div class="row m-0"> | ||
| 4 | <div class="col text-left"> | ||
| 5 | <p class="h4 card-title"> | ||
| 6 | Personalice su pedido | ||
| 7 | </p> | ||
| 8 | </div> | ||
| 9 | </div> | ||
| 10 | |||
| 11 | <div class="row m-0"> | ||
| 12 | <div class="col text-left"> | ||
| 13 | <p class="h5 card-title"> | ||
| 14 | Elija una opción | ||
| 15 | </p> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | |||
| 19 | <div class="row m-0 overflow-scroll popover-size pr-2 my-2"> | ||
| 20 | <div class="col"> | ||
| 21 | <div class="row" *ngFor="let sinonimo of popoverContent"> | ||
| 22 | <div class="col pl-4 h6"> | ||
| 23 | <div class="custom-control custom-radio"> | ||
| 24 | <input | ||
| 25 | type="radio" | ||
| 26 | id="{{sinonimo.CodArt}}" | ||
| 27 | name="sinonimoOpciones" | ||
| 28 | class="custom-control-input" | ||
| 29 | (click)="setSinonimo(sinonimo)"> | ||
| 30 | <label | ||
| 31 | class="font-weight-normal custom-control-label" | ||
| 32 | for="{{sinonimo.CodArt}}"> | ||
| 33 | {{sinonimo.DetArt}} | ||
| 34 | </label> | ||
| 35 | </div> | ||
| 36 | </div> | ||
| 37 | </div> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | |||
| 41 | <div class="row mt-3 justify-content-end"> | ||
| 42 | <div class="col-auto"> | ||
| 43 | <button type="button" class="btn btn-sm btn-light shadow" (click)="hidePopover()"> | ||
| 44 | <span class="font-weight-bold pr-2">Continuar</span> | ||
| 45 | <i class="fa fa-check text-success" aria-hidden="true"></i> | ||
| 46 | </button> | ||
| 47 | </div> | ||
| 48 | </div> | ||
| 49 | |||
| 50 | </div> |
src/app/components/popover-sinonimos/popover-sinonimos.component.scss
| 1 | .popover-size { | ||
| 2 | max-height: 57vh !important; | ||
| 3 | min-height: 57vh !important; | ||
| 4 | } |
src/app/components/popover-sinonimos/popover-sinonimos.component.ts
| 1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit, Input } from '@angular/core'; |
| 2 | import { PopoverDirective } from 'ngx-bootstrap'; | ||
| 3 | import { Sinonimo } from 'src/app/wrappers/sinonimo'; | ||
| 2 | 4 | ||
| 3 | @Component({ | 5 | @Component({ |
| 4 | selector: 'app-popover-sinonimos', | 6 | selector: 'app-popover-sinonimos', |
| 5 | templateUrl: './popover-sinonimos.component.html', | 7 | templateUrl: './popover-sinonimos.component.html', |
| 6 | styleUrls: ['./popover-sinonimos.component.scss'] | 8 | styleUrls: ['./popover-sinonimos.component.scss'] |
| 7 | }) | 9 | }) |
| 8 | export class PopoverSinonimosComponent implements OnInit { | 10 | export class PopoverSinonimosComponent implements OnInit { |
| 9 | 11 | ||
| 12 | //Directiva del popover, para poder cerrarlo desde este componente | ||
| 13 | @Input() popover: PopoverDirective; | ||
| 14 | @Input() popoverContent: Sinonimo[]; | ||
| 15 | sinonimoAelegir: Sinonimo; | ||
| 16 | |||
| 10 | constructor() { } | 17 | constructor() { } |
| 11 | 18 | ||
| 12 | ngOnInit() { | 19 | ngOnInit() { |
| 13 | } | 20 | } |
| 14 | 21 | ||
| 22 | hidePopover() { | ||
| 23 | |||
| 24 | this.popover.hide(); | ||
| 25 | } | ||
| 26 | |||
| 27 | setSinonimo(sinonimo: Sinonimo) { | ||
| 28 | |||
| 29 | this.sinonimoAelegir = sinonimo; | ||
| 30 | } | ||
| 31 | |||
| 15 | } | 32 | } |
| 16 | 33 |
src/app/services/producto.service.ts
| 1 | import { Injectable } from '@angular/core'; | 1 | import { Injectable } from '@angular/core'; |
| 2 | import { HttpClient } from '@angular/common/http'; | 2 | import { HttpClient } from '@angular/common/http'; |
| 3 | import { Observable } from 'rxjs'; | 3 | import { Observable } from 'rxjs'; |
| 4 | import { appSettings } from 'src/etc/AppSettings'; | 4 | import { appSettings } from 'src/etc/AppSettings'; |
| 5 | import { Producto } from '../wrappers/producto'; | 5 | import { Producto } from '../wrappers/producto'; |
| 6 | 6 | ||
| 7 | @Injectable({ | 7 | @Injectable({ |
| 8 | providedIn: 'root' | 8 | providedIn: 'root' |
| 9 | }) | 9 | }) |
| 10 | export class ProductoService { | 10 | export class ProductoService { |
| 11 | 11 | ||
| 12 | productos: Producto[] = []; | 12 | productos: Producto[] = []; |
| 13 | productoAcargar: Producto; | 13 | productoAcargar: Producto; |
| 14 | 14 | ||
| 15 | constructor(private http: HttpClient) { } | 15 | constructor(private http: HttpClient) { } |
| 16 | 16 | ||
| 17 | getAll(): Observable<any> { | 17 | getAll(): Observable<any> { |
| 18 | 18 | ||
| 19 | return this.http.get(`${appSettings.apiUrl}/articulos`); | 19 | return this.http.get(`${appSettings.apiUrl}/articulos`); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | setProductos(producto: Producto) { | 22 | setProductos(producto: Producto) { |
| 23 | 23 | ||
| 24 | this.productos.push(producto); | 24 | this.productos.push(producto); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | |||
| 27 | getPromocion(sector, codigo): Observable<any> { | 28 | getPromocion(sector, codigo): Observable<any> { |
| 28 | 29 | ||
| 29 | var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; | 30 | // var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; |
| 31 | var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${2}/${1306}`; | ||
| 30 | return this.http.get(url); | 32 | return this.http.get(url); |
| 31 | } | 33 | } |
| 32 | 34 | ||
| 35 | getPromocionSinonimos(sector, codigo): Observable<any> { | ||
| 36 | |||
| 37 | // var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; | ||
| 38 | var url = `${appSettings.apiUrl}/sinonimos/promo/${2}/${7}`; | ||
| 39 | return this.http.get(url); | ||
| 40 | } | ||
| 33 | } | 41 | } |
| 34 | 42 |
src/app/wrappers/producto.ts
| 1 | export interface Producto { | 1 | export interface Producto { |
| 2 | CodSec: number; | 2 | CodSec: number; |
| 3 | CodArt: number; | 3 | CodArt: number; |
| 4 | DetArt: string; | 4 | DetArt: string; |
| 5 | CodRub: number; | 5 | CodRub: number; |
| 6 | Costo: number; | 6 | Costo: number; |
| 7 | PreNet: number; | 7 | PreNet: number; |
| 8 | ImpInt: number; | 8 | ImpInt: number; |
| 9 | UniVen: number; | 9 | UniVen: number; |
| 10 | FecCos: Date; | 10 | FecCos: Date; |
| 11 | UltAct: Date; | 11 | UltAct: Date; |
| 12 | CodPro: number; | 12 | CodPro: number; |
| 13 | ExiDep: number; | 13 | ExiDep: number; |
| 14 | ExiVta: number; | 14 | ExiVta: number; |
| 15 | MinDep: number; | 15 | MinDep: number; |
| 16 | MaxDep: number; | 16 | MaxDep: number; |
| 17 | MinPVE: number; | 17 | MinPVE: number; |
| 18 | MaxPVE: number; | 18 | MaxPVE: number; |
| 19 | ENTTur: number; | 19 | ENTTur: number; |
| 20 | SINTur: number; | 20 | SINTur: number; |
| 21 | SALTur: number; | 21 | SALTur: number; |
| 22 | IvaSN: boolean; | 22 | IvaSN: boolean; |
| 23 | DepSN: boolean; | 23 | DepSN: boolean; |
| 24 | RubMay: number; | 24 | RubMay: number; |
| 25 | PreVen: number; | 25 | PreVen: number; |
| 26 | IvaCO: number; | 26 | IvaCO: number; |
| 27 | TIP: string; | 27 | TIP: string; |
| 28 | IMPIVA: number; | 28 | IMPIVA: number; |
| 29 | ENTADM: number; | 29 | ENTADM: number; |
| 30 | SALADM: number; | 30 | SALADM: number; |
| 31 | CODIIN: number; | 31 | CODIIN: number; |
| 32 | PRO: boolean; | 32 | PRO: boolean; |
| 33 | FPP: boolean; | 33 | FPP: boolean; |
| 34 | ESS: boolean; | 34 | ESS: boolean; |
| 35 | FID: Date; | 35 | FID: Date; |
| 36 | NID: number; | 36 | NID: number; |
| 37 | FIV: Date; | 37 | FIV: Date; |
| 38 | NIV: number; | 38 | NIV: number; |
| 39 | COO: string; | 39 | COO: string; |
| 40 | CAG: string; | 40 | CAG: string; |
| 41 | CAP: number; | 41 | CAP: number; |
| 42 | UTL: number; | 42 | UTL: number; |
| 43 | NHA: boolean; | 43 | NHA: boolean; |
| 44 | PID: boolean; | 44 | PID: boolean; |
| 45 | PRV: number; | 45 | PRV: number; |
| 46 | PRD: number; | 46 | PRD: number; |
| 47 | ImpInt2: number; | 47 | ImpInt2: number; |
| 48 | E_HD: string; | 48 | E_HD: string; |
| 49 | C_HD: string; | 49 | C_HD: string; |
| 50 | CLA: number; | 50 | CLA: number; |
| 51 | UNICAP: number; | 51 | UNICAP: number; |
| 52 | ELBPRO: string; | 52 | ELBPRO: string; |
| 53 | PPP: number; | 53 | PPP: number; |
| 54 | ALI: number; | 54 | ALI: number; |
| 55 | BAL_TIPO: string; | 55 | BAL_TIPO: string; |
| 56 | PER_MAY: boolean; | 56 | PER_MAY: boolean; |
| 57 | ES_MAY: boolean; | 57 | ES_MAY: boolean; |
| 58 | CLA_MAY: number; | 58 | CLA_MAY: number; |
| 59 | PME_CMP: string; | 59 | PME_CMP: string; |
| 60 | USA_BAL: boolean; | 60 | USA_BAL: boolean; |
| 61 | DET_LAR: string; | 61 | DET_LAR: string; |
| 62 | ROTULO: string; | 62 | ROTULO: string; |
| 63 | REC_MANUAL: boolean; | 63 | REC_MANUAL: boolean; |
| 64 | E_HD1: string; | 64 | E_HD1: string; |
| 65 | C_HD1: string; | 65 | C_HD1: string; |
| 66 | ImpInt3: number; | 66 | ImpInt3: number; |
| 67 | FUA_MAE_YPF: Date; | 67 | FUA_MAE_YPF: Date; |
| 68 | CPQ: number; | 68 | CPQ: number; |
| 69 | EPQ: string; | 69 | EPQ: string; |
| 70 | BPQ: number; | 70 | BPQ: number; |
| 71 | PUPQ: number; | 71 | PUPQ: number; |
| 72 | CORVTO: boolean; | 72 | CORVTO: boolean; |
| 73 | CORVTO_COSTO: number; | 73 | CORVTO_COSTO: number; |
| 74 | UTLFR: number; | 74 | UTLFR: number; |
| 75 | FAMILIA: number; | 75 | FAMILIA: number; |
| 76 | ES_LUB: boolean; | 76 | ES_LUB: boolean; |
| 77 | ES_FERT: boolean; | 77 | ES_FERT: boolean; |
| 78 | AutoFac: boolean; | 78 | AutoFac: boolean; |
| 79 | LitrosPCD: number; | 79 | LitrosPCD: number; |
| 80 | LisPCD: number; | 80 | LisPCD: number; |
| 81 | ImpLey23966: boolean; | 81 | ImpLey23966: boolean; |
| 82 | es_bio: boolean; | 82 | es_bio: boolean; |
| 83 | ExpArbaRev: boolean; | 83 | ExpArbaRev: boolean; |
| 84 | ES_AGROQ: boolean; | 84 | ES_AGROQ: boolean; |
| 85 | ES_PLAST: boolean; | 85 | ES_PLAST: boolean; |
| 86 | es_bio_por: string; | 86 | es_bio_por: string; |
| 87 | IMP_IMP_INT: boolean; | 87 | IMP_IMP_INT: boolean; |
| 88 | id: number; | 88 | id: number; |
| 89 | nombreImagen?: any; | 89 | nombreImagen?: any; |
| 90 | 90 | ||
| 91 | cantidad?:number; | 91 | cantidad?: number; |
| 92 | showCargarProducto?:boolean; | 92 | showCargarProducto?: boolean; |
| 93 | } | 93 | } |
| 94 | 94 |
src/app/wrappers/promocion.ts
| 1 | import { Producto } from './producto'; | 1 | import { Producto } from './producto'; |
| 2 | 2 | ||
| 3 | export interface Promocion { | 3 | export interface Promocion { |
| 4 | idPromo: number; | 4 | idPromo: number; |
| 5 | nombrePromo: string; | 5 | nombrePromo: string; |
| 6 | productos: Producto[]; | 6 | productos: Producto[]; |
| 7 | sinonimos: boolean; | ||
| 8 | sector: number, | ||
| 9 | codigo: number, | ||
| 7 | } | 10 | } |
| 8 | 11 |
src/app/wrappers/sinonimo.ts
| File was created | 1 | export interface Sinonimo { | |
| 2 | EMP: number; | ||
| 3 | ID_SIN: number; | ||
| 4 | SEC: number; | ||
| 5 | COD: string; | ||
| 6 | DET: string; | ||
| 7 | E_HD: string[]; | ||
| 8 | C_HD: string[]; | ||
| 9 | CodSec: number; | ||
| 10 | CodArt: number; | ||
| 11 | DetArt: string; | ||
| 12 | CodRub: number; | ||
| 13 | Costo: number; | ||
| 14 | PreNet: number; | ||
| 15 | ImpInt: number; | ||
| 16 | UniVen: number; | ||
| 17 | FecCos: Date; | ||
| 18 | UltAct: Date; | ||
| 19 | CodPro: number; | ||
| 20 | ExiDep: number; | ||
| 21 | ExiVta: number; | ||
| 22 | MinDep: number; | ||
| 23 | MaxDep: number; | ||
| 24 | MinPVE: number; | ||
| 25 | MaxPVE: number; | ||
| 26 | ENTTur: number; | ||
| 27 | SINTur: number; | ||
| 28 | SALTur: number; | ||
| 29 | IvaSN: boolean; | ||
| 30 | DepSN: boolean; | ||
| 31 | RubMay: number; | ||
| 32 | PreVen: number; | ||
| 33 | IvaCO: number; | ||
| 34 | TIP: string; | ||
| 35 | IMPIVA: number; | ||
| 36 | ENTADM: number; | ||
| 37 | SALADM: number; | ||
| 38 | CODIIN: number; | ||
| 39 | PRO: boolean; | ||
| 40 | FPP: boolean; | ||
| 41 | ESS: boolean; | ||
| 42 | FID: Date; | ||
| 43 | NID: number; | ||
| 44 | FIV: Date; | ||
| 45 | NIV: number; | ||
| 46 | COO: string; | ||
| 47 | CAG: string; | ||
| 48 | CAP: number; | ||
| 49 | UTL: number; | ||
| 50 | NHA: boolean; | ||
| 51 | PID: boolean; | ||
| 52 | PRV: number; | ||
| 53 | PRD: number; | ||
| 54 | ImpInt2: number; | ||
| 55 | CLA: number; | ||
| 56 | UNICAP: number; | ||
| 57 | ELBPRO: string; | ||
| 58 | PPP: number; | ||
| 59 | ALI: number; | ||
| 60 | BAL_TIPO: string; | ||
| 61 | PER_MAY: boolean; | ||
| 62 | ES_MAY: boolean; | ||
| 63 | CLA_MAY: number; | ||
| 64 | PME_CMP: string; | ||
| 65 | USA_BAL: boolean; | ||
| 66 | DET_LAR: string; | ||
| 67 | ROTULO: string; | ||
| 68 | REC_MANUAL: boolean; | ||
| 69 | E_HD1: string; | ||
| 70 | C_HD1: string; | ||
| 71 | ImpInt3: number; | ||
| 72 | FUA_MAE_YPF: Date; | ||
| 73 | CPQ: number; | ||
| 74 | EPQ: string; | ||
| 75 | BPQ: number; | ||
| 76 | PUPQ: number; | ||
| 77 | CORVTO: boolean; | ||
| 78 | CORVTO_COSTO: number; | ||
| 79 | UTLFR: number; | ||
| 80 | FAMILIA: number; | ||
| 81 | ES_LUB: boolean; | ||
| 82 | ES_FERT: boolean; | ||
| 83 | AutoFac: boolean; | ||
| 84 | LitrosPCD: number; | ||
| 85 | LisPCD: number; | ||
| 86 | id: number; | ||
| 87 | ImpLey23966: boolean; | ||
| 88 | es_bio: boolean; | ||
| 89 | ExpArbaRev: boolean; | ||
| 90 | ES_AGROQ: boolean; | ||
| 91 | ES_PLAST: boolean; | ||
| 92 | es_bio_por: string; | ||
| 93 | ID_MARCA: number; | ||
| 94 | ID_ATRB1: number; | ||
| 95 | ID_ATRB2: number; | ||
| 96 | ID_ART_REF: number; | ||
| 97 | ILPC: boolean; | ||
| 98 | CantAgrupar: number; | ||
| 99 | E_HD2: string; | ||
| 100 | PPV: number; | ||
| 101 | PPD: number; | ||
| 102 | MOD_DET: boolean; | ||
| 103 | C_HD2: string; | ||
| 104 | nombreImagen?: any; | ||
| 105 | IMP_IMP_INT: boolean; | ||
| 106 | } | ||
| 107 |