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
e0101a5364
commit
b85360fb65
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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[]> {
|
||||||
|
@ -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>
|
||||||
|
Reference in New Issue
Block a user