change file structure

Reviewed-on: #21
Reviewed-by: Get in my car i have candy <huydw@proton.me>
This commit is contained in:
2025-01-09 09:13:06 +00:00
parent c938ef8465
commit 10f1e09ccd
20 changed files with 33 additions and 33 deletions

View File

@ -0,0 +1,36 @@
import {Component, Inject, inject} from '@angular/core';
import {Employee} from "../Employee";
import {
MAT_DIALOG_DATA,
MatDialogActions,
MatDialogClose,
MatDialogContent,
MatDialogTitle
} from "@angular/material/dialog";
import {MatButton} from "@angular/material/button";
import EmployeeApiService from "../../services/employee-api.service";
@Component({
selector: 'app-delete-employee',
imports: [
MatDialogContent,
MatDialogTitle,
MatDialogActions,
MatButton,
MatDialogClose
],
templateUrl: './delete.component.html',
standalone: true,
styleUrl: './delete.component.css'
})
export class DeleteComponent {
private apiService: EmployeeApiService = inject(EmployeeApiService);
protected employee: Employee = inject(MAT_DIALOG_DATA);
deleteEmployee(id: number) {
this.apiService.deleteById(id).subscribe();
location.reload();
}
}