50 lines
2.1 KiB
HTML
50 lines
2.1 KiB
HTML
<div class="shadow-xl rounded-md p-2">
|
|
<div class="flex fex-row justify-between mb-2">
|
|
<p> please click save at the end</p>
|
|
<div class="flex items-end self-end">
|
|
<button pButton pRipple type="button" icon="pi pi-file" label="Attach Photo" class="p-button-sm"
|
|
(click)="newSupportDoc($event)"></button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="p-4">
|
|
<p-table [value]="FileList" sortMode="multiple" class="p-datatable-sm"
|
|
[loading]="loading">
|
|
|
|
<ng-template pTemplate="header">
|
|
<tr>
|
|
<th>Id</th>
|
|
<th pSortableColumn="description">Description<p-sortIcon field="description"></p-sortIcon>
|
|
</th>
|
|
<th>Photo Type</th>
|
|
<th>Action</th>
|
|
|
|
</tr>
|
|
</ng-template>
|
|
<ng-template pTemplate="body" let-item>
|
|
<tr>
|
|
<td>{{item.id}}</td>
|
|
<td >{{item.photo}}</td>
|
|
<td>{{item.photoType}}</td>
|
|
<td>
|
|
|
|
<button pButton type="button" icon="pi pi-times"
|
|
pTooltip="Delete" class="p-button-rounded text-red-500 p-button-text p-button-raised mr-2"
|
|
(click)="remove(item.id)"></button>
|
|
|
|
@if (item.id > 0) {
|
|
<button pButton type="button" icon="pi pi-file"
|
|
pTooltip="Download Photo"
|
|
class="p-button-rounded p-button-text p-button-raised"
|
|
(click)="downloadAttachment(item.id)"></button>
|
|
}
|
|
</td>
|
|
</tr>
|
|
</ng-template>
|
|
</p-table>
|
|
|
|
<div class="flex items-end justify-end mt-4">
|
|
<button pButton pRipple type="button" icon="pi pi-times" label="Close" class="p-button-sm"
|
|
(click)="onClose($event)"></button>
|
|
</div>
|
|
</div> |