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

Merged
ptran merged 1 commits from refactor/spazzing into main 2025-01-08 07:51:13 +00:00
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>