add form to create employee

Reviewed-on: #18
Reviewed-by: Get in my car i have candy <huydw@proton.me>
This commit is contained in:
2025-01-09 09:59:01 +00:00
parent 0caefccc70
commit 9ceb0b803e
8 changed files with 141 additions and 8 deletions

View File

@ -19,4 +19,8 @@ export default class EmployeeApiService {
public getAll(): Observable<Employee[]> {
return this.http.get<Employee[]>(`${EmployeeApiService.BASE_URL}/employees`)
}
public create(employee: Employee) {
return this.http.post<Employee>(`${EmployeeApiService.BASE_URL}/employees`, employee)
}
}