abm-imagenes.component.html
3.74 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<app-header></app-header>
<div class="container-fluid">
<div class="row m-3">
<div class="col">
<p class="h2">Configuración de imágenes</p>
</div>
</div>
<div class="row mx-3 search">
<div class="col">
<span
title="Buscar"
class="fa fa-search form-control-lg form-control-search pl-3"
(click)="search()"></span>
<input
type="text"
class="form-control form-control-lg shadow-sm rounded-pill px-5"
placeholder="Búsqueda productos"
[(ngModel)]="searchTerm"
[disabled]="buscando"
(keyup.enter)="search()">
</div>
</div>
<div class="row m-3 vh-60 overflow-scroll">
<div class="col">
<h5>Productos</h5>
<table class="table table-striped table-hover table-borderless shadow">
<thead>
<tr class="bg-primary text-center text-white shadow-sm">
<th>Nombre</th>
<th colspan="2">Imagen</th>
</tr>
</thead>
<tbody>
<tr class="shadow-sm" *ngFor="let articulo of articulos">
<td class="align-middle">
<p class="m-0">{{articulo.DET_LAR}}</p>
<p class="m-0"><small>Descripción: {{articulo.DET_LAR}}</small></p>
<p class="m-0"><small>Sector: {{articulo.CodSec}}</small></p>
<p class="m-0"><small>Código: {{articulo.CodArt}}</small></p>
</td>
<td>
<img
*ngIf="articulo.imagenes.length == 0"
class="fade-in w-100 mx-auto img-fluid"
src="{{apiImagenes}}/imagenes/noImage.jpg">
<carousel [interval]="false">
<slide *ngFor="let item of articulo.imagenes; let index = index">
<img
*ngIf="!item.fromGallery"
class="fade-in img-fluid w-100"
src="{{apiImagenes}}/imagenes/{{item.imagen}}">
<img
*ngIf="item.fromGallery"
class="fade-in img-fluid w-100"
src="{{item.base64}}">
<button
(click)="deleteImage(articulo.imagenes, index)"
type="button"
class="btn btn-lg btn-delete-image position-absolute">
<i class="fa fa-trash text-dark" aria-hidden="true"></i>
</button>
</slide>
</carousel>
</td>
<td class="align-middle text-center">
<div class="custom-file">
<input
type="file"
class="custom-file-input"
id="customFileLang"
accept="image/*"
(change)="onFileSelected($event, articulo)"
lang="es"
multiple>
<label class="custom-file-label text-left pr-5" for="customFileLang">
<small>Seleccionar archivo</small>
</label>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row" *ngIf="paginationData">
<div>
</div>
<div class="col">
<span class="text-danger">
Por el momento la paginación no funciona.
</span>
<pagination
[disabled]="true"
[rotate]="false"
[(ngModel)]="paginationData.page"
[totalItems]="paginationData.rowCount"
[maxSize]="10"
[itemsPerPage]="paginationData.pageSize"
(pageChanged)="pageChanged($event)"
[boundaryLinks]="true"
[disabled]="disabledPaginador"
previousText="‹"
nextText="›"
firstText="«"
lastText="»"
></pagination>
</div>
</div>
</div>