61 lines
2.4 KiB
HTML
61 lines
2.4 KiB
HTML
<nz-table [nzData]="authors()"
|
|
[nzLoading]="authorsLoading()"
|
|
[nzFrontPagination]="false">
|
|
<thead>
|
|
<tr style="text-align: center">
|
|
<th>Prénom</th>
|
|
<th>Nom</th>
|
|
<th>Livre</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody style="text-align: center">
|
|
@for (author of authors(); track author.id) {
|
|
<tr>
|
|
<td>{{ author.name}}</td>
|
|
<td>{{ author.firstName }}</td>
|
|
<td>
|
|
<app-modal type="link" [name]="'Voir les livres'">
|
|
<nz-table [nzData]="authors()"
|
|
[nzFrontPagination]="false">
|
|
<thead>
|
|
<tr style="text-align: center">
|
|
<th>Titre</th>
|
|
<th>ISBN</th>
|
|
<th>Date de publication</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody style="text-align: center">
|
|
@for (book of author.books; track book.id) {
|
|
<tr>
|
|
<td>{{ book.title }}</td>
|
|
<td>{{ book.isbn}}</td>
|
|
<td>{{ book.releaseYear}}</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</nz-table>
|
|
</app-modal>
|
|
</td>
|
|
<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" class="text-red-600 cursor-pointer"></nz-icon>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</nz-table>
|
|
|
|
<div class="hidden">
|
|
<app-modal-icon nameIcon="edit" [name]="'Modifier'">
|
|
<app-update-author></app-update-author>
|
|
</app-modal-icon>
|
|
</div>
|