finish all getall into table
This commit is contained in:
58
src/app/components/author-table/author-table.html
Normal file
58
src/app/components/author-table/author-table.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<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>
|
||||
<app-modal [name]="'Modifier'">
|
||||
<app-update-author></app-update-author>
|
||||
</app-modal>
|
||||
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="delete()" class="bg-red-600 border-red-600">Supprimer</button>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</nz-table>
|
||||
Reference in New Issue
Block a user