Commit 3a8323a55e20d50332130b714dbd5da3d82f82b7

Authored by Eric Fernandez
1 parent f74633474c
Exists in master and in 1 other branch validar_pve

fix imagen remplaza

src/app/components/amb-imagenes/amb-imagenes.component.html
... ... @@ -27,7 +27,7 @@
27 27 <td>{{articulo.DET_LAR}}</td>
28 28 <td>
29 29 <img *ngIf="articulo.imagenes.length" src="{{apiUrl}}/imagenes/{{articulo.imagenes[0].imagen}}">
30   - <img id="{{articulo.CodSec + articulo.CodArt}}" *ngIf="!articulo.imagenes.length">
  30 + <img id="{{articulo.CodSec + articulo.CodArt}}" [hidden]="articulo.imagenes.length">
31 31 </td>
32 32 <td><input type="file" accept="image/*" (change)="onFileSelected($event, articulo)"></td>
33 33 </tr>
src/app/components/amb-imagenes/amb-imagenes.component.ts
... ... @@ -34,6 +34,8 @@ export class AmbImagenesComponent implements OnInit {
34 34 this.onLoad(file)
35 35 .then(result => {
36 36  
  37 + articulo.imagenes = [];
  38 +
37 39 document.getElementById(articulo.CodSec + articulo.CodArt)['src'] = result;
38 40  
39 41 this.saveInBase({