Add white background, replace constant reload with page reload on employee deletion

This commit is contained in:
Phan Huy Tran 2025-01-08 08:48:37 +01:00
parent e0101a5364
commit 65d8fa6adb
3 changed files with 3 additions and 5 deletions

View File

@ -30,5 +30,7 @@ export class DeleteEmployeeComponent {
deleteEmployee(id: number) {
this.apiService.deleteById(id).subscribe();
location.reload();
}
}

View File

@ -51,10 +51,6 @@ export class EmployeeListComponent implements OnInit{
public ngOnInit(): void {
this.employees$ = this.fetchEmployees();
setInterval(() => {
this.employees$ = this.fetchEmployees();
}, 5000)
}
private fetchEmployees(): Observable<Employee[]> {

View File

@ -9,7 +9,7 @@
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
<body class="mat-typography bg-white">
<app-root></app-root>
</body>
</html>