amb-imagenes.component.html 1.4 KB
<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>