diff --git a/src/app/components/author-table/author-table.html b/src/app/components/author-table/author-table.html
index de6fd4c..e7b9e11 100644
--- a/src/app/components/author-table/author-table.html
+++ b/src/app/components/author-table/author-table.html
@@ -40,14 +40,16 @@
diff --git a/src/app/components/author-table/author-table.ts b/src/app/components/author-table/author-table.ts
index 8c4197b..a778d1f 100644
--- a/src/app/components/author-table/author-table.ts
+++ b/src/app/components/author-table/author-table.ts
@@ -1,21 +1,23 @@
import {Component, inject, OnInit, signal} from '@angular/core';
import {Modal} from "../modal/modal";
-import {NzButtonComponent} from "ng-zorro-antd/button";
import {AuthorsService, GetAuthorDto} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {NzTableComponent} from "ng-zorro-antd/table";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {UpdateAuthor} from "../update-author/update-author";
+import {ModalIcon} from "../modal-icon/modal-icon";
+import {NzIconDirective} from "ng-zorro-antd/icon";
@Component({
selector: 'app-author-table',
imports: [
Modal,
- NzButtonComponent,
NzTableComponent,
NzDividerComponent,
- UpdateAuthor
+ UpdateAuthor,
+ ModalIcon,
+ NzIconDirective
],
templateUrl: './author-table.html',
styleUrl: './author-table.css',
diff --git a/src/app/components/book-table/book-table.html b/src/app/components/book-table/book-table.html
index f8faad7..2ed82c8 100644
--- a/src/app/components/book-table/book-table.html
+++ b/src/app/components/book-table/book-table.html
@@ -19,14 +19,16 @@
| {{ book.releaseYear}} |
diff --git a/src/app/components/book-table/book-table.ts b/src/app/components/book-table/book-table.ts
index aed1efa..b9e51cb 100644
--- a/src/app/components/book-table/book-table.ts
+++ b/src/app/components/book-table/book-table.ts
@@ -1,21 +1,21 @@
import {Component, inject, OnInit, signal} from '@angular/core'; // Importation de la fonction input() et des components
-import {Modal} from "../modal/modal";
-import {NzButtonComponent} from "ng-zorro-antd/button";
import {BooksService, GetBookDto} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {NzTableComponent} from "ng-zorro-antd/table";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {UpdateBook} from "../update-book/update-book";
+import {ModalIcon} from "../modal-icon/modal-icon";
+import {NzIconDirective} from "ng-zorro-antd/icon";
@Component({
selector: 'app-book-table',
imports: [
- Modal,
- NzButtonComponent,
NzTableComponent,
NzDividerComponent,
UpdateBook,
+ ModalIcon,
+ NzIconDirective,
],
templateUrl: './book-table.html',
styleUrl: './book-table.css',
diff --git a/src/app/components/loan-table/loan-table.html b/src/app/components/loan-table/loan-table.html
index 4d0c569..e10882b 100644
--- a/src/app/components/loan-table/loan-table.html
+++ b/src/app/components/loan-table/loan-table.html
@@ -20,14 +20,16 @@
{{ loan.effectiveReturningDate | date: 'dd/MM/yyyy'}} |
diff --git a/src/app/components/loan-table/loan-table.ts b/src/app/components/loan-table/loan-table.ts
index 18941e1..dcd7a2e 100644
--- a/src/app/components/loan-table/loan-table.ts
+++ b/src/app/components/loan-table/loan-table.ts
@@ -1,23 +1,23 @@
import {Component, inject, OnInit, signal} from '@angular/core';
import {DatePipe} from "@angular/common";
-import {Modal} from "../modal/modal";
-import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzTableComponent} from "ng-zorro-antd/table";
import {UpdateLoan} from "../update-loan/update-loan";
import {GetLoanDto, LoansService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {NzDividerComponent} from "ng-zorro-antd/divider";
+import {ModalIcon} from "../modal-icon/modal-icon";
+import {NzIconDirective} from "ng-zorro-antd/icon";
@Component({
selector: 'app-loan-table',
imports: [
DatePipe,
- Modal,
- NzButtonComponent,
NzTableComponent,
UpdateLoan,
NzDividerComponent,
+ ModalIcon,
+ NzIconDirective,
],
templateUrl: './loan-table.html',
styleUrl: './loan-table.css',
diff --git a/src/app/components/modal-icon/modal-icon.css b/src/app/components/modal-icon/modal-icon.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/components/modal-icon/modal-icon.html b/src/app/components/modal-icon/modal-icon.html
new file mode 100644
index 0000000..102ad5c
--- /dev/null
+++ b/src/app/components/modal-icon/modal-icon.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/components/modal-icon/modal-icon.ts b/src/app/components/modal-icon/modal-icon.ts
new file mode 100644
index 0000000..bd96d30
--- /dev/null
+++ b/src/app/components/modal-icon/modal-icon.ts
@@ -0,0 +1,36 @@
+import { Component, Input } from '@angular/core';
+import {NzModalComponent} from "ng-zorro-antd/modal";
+import {NzIconDirective} from "ng-zorro-antd/icon";
+
+@Component({
+ selector: 'app-modal-icon',
+ imports: [
+ NzModalComponent,
+ NzIconDirective
+ ],
+ templateUrl: './modal-icon.html',
+ styleUrl: './modal-icon.css',
+})
+export class ModalIcon {
+ @Input() nameIcon: string = '';
+ @Input() name: string = '';
+
+ isVisible = false;
+ isOkLoading = false;
+
+ showModal(): void {
+ this.isVisible = true;
+ }
+
+ handleOk(): void {
+ this.isOkLoading = true;
+ setTimeout(() => {
+ this.isVisible = false;
+ this.isOkLoading = false;
+ }, 1000);
+ }
+
+ handleCancel(): void {
+ this.isVisible = false;
+ }
+}
\ No newline at end of file
diff --git a/src/app/components/user-table/user-table.html b/src/app/components/user-table/user-table.html
index b308c99..ce3715f 100644
--- a/src/app/components/user-table/user-table.html
+++ b/src/app/components/user-table/user-table.html
@@ -45,14 +45,16 @@
diff --git a/src/app/components/user-table/user-table.ts b/src/app/components/user-table/user-table.ts
index d60f69b..76ab53b 100644
--- a/src/app/components/user-table/user-table.ts
+++ b/src/app/components/user-table/user-table.ts
@@ -2,22 +2,24 @@ import {Component, inject, OnInit, signal} from '@angular/core';
import {NzTableComponent} from "ng-zorro-antd/table";
import {Modal} from "../modal/modal";
import {DatePipe} from "@angular/common";
-import {NzButtonComponent} from "ng-zorro-antd/button";
import {UpdateUser} from "../update-user/update-user";
import {GetUserDto, UsersService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {NzDividerComponent} from "ng-zorro-antd/divider";
+import {ModalIcon} from "../modal-icon/modal-icon";
+import {NzIconDirective} from "ng-zorro-antd/icon";
@Component({
selector: 'app-user-table',
imports: [
DatePipe,
Modal,
- NzButtonComponent,
NzTableComponent,
UpdateUser,
NzDividerComponent,
+ ModalIcon,
+ NzIconDirective,
],
templateUrl: './user-table.html',
styleUrl: './user-table.css',
|