feat: add Leave API endpoints + frontend API module

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 13:05:49 +08:00
parent 2633513ce3
commit b6105295bb
3 changed files with 148 additions and 1 deletions
+19
View File
@@ -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 })
},
}