Add white background, replace constant reload with page reload on employee deletion (#14)

Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #14
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
This commit is contained in:
Huy 2025-01-08 07:51:13 +00:00
parent e0101a5364
commit b85360fb65
3 changed files with 3 additions and 5 deletions

View File

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

View File

@ -51,10 +51,6 @@ export class EmployeeListComponent implements OnInit{
public ngOnInit(): void { public ngOnInit(): void {
this.employees$ = this.fetchEmployees(); this.employees$ = this.fetchEmployees();
setInterval(() => {
this.employees$ = this.fetchEmployees();
}, 5000)
} }
private fetchEmployees(): Observable<Employee[]> { 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/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head> </head>
<body class="mat-typography"> <body class="mat-typography bg-white">
<app-root></app-root> <app-root></app-root>
</body> </body>
</html> </html>