feat: add Leave API endpoints + frontend API module
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import api from './index'
|
||||
|
||||
export const leavesApi = {
|
||||
list(params?: Record<string, any>) {
|
||||
return api.get('/leaves/', { params })
|
||||
},
|
||||
create(data: Record<string, any>) {
|
||||
return api.post('/leaves/', data)
|
||||
},
|
||||
update(id: string, data: Record<string, any>) {
|
||||
return api.put(`/leaves/${id}`, data)
|
||||
},
|
||||
delete(id: string) {
|
||||
return api.delete(`/leaves/${id}`)
|
||||
},
|
||||
overview(params?: Record<string, any>) {
|
||||
return api.get('/leaves/overview', { params })
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user