deleted notifs components
This commit is contained in:
@@ -9,7 +9,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-table',
|
||||
selector: 'app-user-table',
|
||||
imports: [
|
||||
ModalNav,
|
||||
NzIconDirective,
|
||||
@@ -17,8 +17,8 @@ import {firstValueFrom} from "rxjs";
|
||||
ProfilForm,
|
||||
NzDividerComponent
|
||||
],
|
||||
templateUrl: './user-table.html',
|
||||
styleUrl: './user-table.css',
|
||||
templateUrl: './user-table.html',
|
||||
styleUrl: './user-table.css',
|
||||
})
|
||||
export class UserTable implements OnInit {
|
||||
private usersService = inject(UsersService);
|
||||
@@ -47,7 +47,7 @@ export class UserTable implements OnInit {
|
||||
this.usersLoading.set(false)
|
||||
}
|
||||
|
||||
async delete(user:number) {
|
||||
async delete(user: number) {
|
||||
try {
|
||||
await firstValueFrom(this.usersService.deleteUserEndpoint(user))
|
||||
this.notificationService.success(
|
||||
@@ -89,8 +89,9 @@ export class UserTable implements OnInit {
|
||||
}
|
||||
|
||||
selectedUser: GetUserDto | null = null;
|
||||
|
||||
openEditModal(user: GetUserDto) {
|
||||
this.selectedUser = { ...user };
|
||||
this.selectedUser = {...user};
|
||||
this.modal().showModal();
|
||||
}
|
||||
|
||||
@@ -102,9 +103,11 @@ export class UserTable implements OnInit {
|
||||
modal.isVisible = false;
|
||||
await this.fetchUsers();
|
||||
}
|
||||
|
||||
onModalCancel(modal: ModalNav) {
|
||||
modal.isVisible = false;
|
||||
}
|
||||
|
||||
filterUser(input: string, option: any) {
|
||||
return option.nzLabel.toLowerCase().includes(input.toLowerCase());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user