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:
parent
90cccf4fdb
commit
5ba4db66af
@ -30,5 +30,7 @@ export class DeleteEmployeeComponent {
|
||||
|
||||
deleteEmployee(id: number) {
|
||||
this.apiService.deleteById(id).subscribe();
|
||||
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
@ -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[]> {
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user