Files
library-frontend/src/app/components/book-table/book-table.html

38 lines
1.4 KiB
HTML

<nz-table [nzData]="books()"
[nzLoading]="booksLoading()"
[nzFrontPagination]="false">
<thead>
<tr style="text-align: center">
<th>Titre</th>
<th>ISBN</th>
<th>Auteur</th>
<th>Date de publication</th>
<th>Action</th>
</tr>
</thead>
<tbody style="text-align: center">
@for (book of books(); track book.id) {
<tr>
<td>{{ book.title}}</td>
<td>{{ book.isbn }}</td>
<td>{{ book.bookAuthorName }} {{ book.bookAuthorFirstName }}</td>
<td>{{ book.releaseYear}}</td>
<div style="justify-content: center; display: flex">
<td>
<div style="display: flex; align-items: center;">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(book.id)" class="text-red-600 cursor-pointer"></nz-icon>
</div>
</td>
</div>
</tr>
}
</tbody>
</nz-table>
<div class="hidden">
<app-modal-icon nameIcon="edit" [name]="'Modifier'">
<app-update-book></app-update-book>
</app-modal-icon>
</div>