diff --git a/src/app/components/create-book/create-book.html b/src/app/components/create-book/create-book.html index 7726c8a..4f8ab5f 100644 --- a/src/app/components/create-book/create-book.html +++ b/src/app/components/create-book/create-book.html @@ -25,7 +25,7 @@ - + @for (author of authors(); track author.id) { } diff --git a/src/app/components/create-book/create-book.ts b/src/app/components/create-book/create-book.ts index 1987146..19098d4 100644 --- a/src/app/components/create-book/create-book.ts +++ b/src/app/components/create-book/create-book.ts @@ -37,4 +37,8 @@ export class CreateBook implements OnInit { async ngOnInit() { await this.fetchAuthors(); } + + filterAuthor(input: string, option: any) { + return option.nzLabel.toLowerCase().includes(input.toLowerCase()); + } } diff --git a/src/app/components/create-loan/create-loan.html b/src/app/components/create-loan/create-loan.html index 5f4b071..2216db8 100644 --- a/src/app/components/create-loan/create-loan.html +++ b/src/app/components/create-loan/create-loan.html @@ -5,7 +5,7 @@ - + @for (user of users(); track user.id) { } @@ -19,7 +19,7 @@ - + @for (book of books(); track book.id) { } diff --git a/src/app/components/create-loan/create-loan.ts b/src/app/components/create-loan/create-loan.ts index 6cf0a61..9379fec 100644 --- a/src/app/components/create-loan/create-loan.ts +++ b/src/app/components/create-loan/create-loan.ts @@ -60,4 +60,8 @@ export class CreateLoan implements OnInit { await this.fetchUsers(); await this.fetchBooks(); } + + filter(input: string, option: any) { + return option.nzLabel.toLowerCase().includes(input.toLowerCase()); + } } diff --git a/src/app/components/loan-table/loan-table.html b/src/app/components/loan-table/loan-table.html index 589798d..a7b6d5f 100644 --- a/src/app/components/loan-table/loan-table.html +++ b/src/app/components/loan-table/loan-table.html @@ -1,5 +1,6 @@ + [nzLoading]="loansLoading()" + [nzFrontPagination]="false"> Utilisateur diff --git a/src/app/components/update-book/update-book.html b/src/app/components/update-book/update-book.html index b61401c..def70e8 100644 --- a/src/app/components/update-book/update-book.html +++ b/src/app/components/update-book/update-book.html @@ -25,7 +25,7 @@ - + @for (author of authors(); track author.id) { } diff --git a/src/app/components/update-book/update-book.ts b/src/app/components/update-book/update-book.ts index 0a04e01..8e4860a 100644 --- a/src/app/components/update-book/update-book.ts +++ b/src/app/components/update-book/update-book.ts @@ -49,4 +49,8 @@ export class UpdateBook implements OnInit { async ngOnInit() { await this.fetchAuthors(); } + + filterAuthor(input: string, option: any) { + return option.nzLabel.toLowerCase().includes(input.toLowerCase()); + } } diff --git a/src/app/components/update-loan/update-loan.html b/src/app/components/update-loan/update-loan.html index e785279..c767274 100644 --- a/src/app/components/update-loan/update-loan.html +++ b/src/app/components/update-loan/update-loan.html @@ -5,7 +5,7 @@ - + @for (user of users(); track user.id) { } @@ -19,7 +19,7 @@ - + @for (book of books(); track book.id) { } diff --git a/src/app/components/update-loan/update-loan.ts b/src/app/components/update-loan/update-loan.ts index d85f676..681e53b 100644 --- a/src/app/components/update-loan/update-loan.ts +++ b/src/app/components/update-loan/update-loan.ts @@ -84,4 +84,8 @@ export class UpdateLoan implements OnInit { await this.fetchUsers(); await this.fetchBooks(); } + + filter(input: string, option: any) { + return option.nzLabel.toLowerCase().includes(input.toLowerCase()); + } }