amb-imagenes.component.html
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<app-header></app-header>
<div class="container-fluid">
<div class="row m-3">
<div class="col">
<p class="h2">Configuración imágenes</p>
</div>
</div>
<div class="row search">
<div class="col">
<span class="fa fa-search form-control-lg form-control-search pl-3"></span>
<input
type="text"
class="form-control form-control-lg shadow-sm rounded-pill px-5"
placeholder="Búsqueda productos"
[(ngModel)]="searchTerm"
(ngModelChange)="filterItems()">
</div>
</div>
<div class="row m-3 vh-70 overflow-scroll">
<div class="col">
<h5>Productos</h5>
<table class="table">
<thead>
<tr class="text-center">
<th>Nombre</th>
<th>Descripción</th>
<th colspan="2">Imagen</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let articulo of auxProductos">
<td>{{articulo.DetArt}}</td>
<td>{{articulo.DET_LAR}}</td>
<td>
<img *ngIf="articulo.imagenes.length" src="{{apiUrl}}/imagenes/{{articulo.imagenes[0].imagen}}">
<img id="{{articulo.CodSec + articulo.CodArt}}" [hidden]="articulo.imagenes.length">
</td>
<td><input type="file" accept="image/*" (change)="onFileSelected($event, articulo)"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>