Ajout des notification + page employé (#6)
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #6 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #6.
This commit is contained in:
18
frontend/services/employee-leave-summary.ts
Normal file
18
frontend/services/employee-leave-summary.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { EmployeeLeaveSummary } from './dto/employee-leave-summary'
|
||||
|
||||
export const getEmployeeLeaveSummary = async (employeeId: number, year?: number) => {
|
||||
const api = useApi()
|
||||
const query: Record<string, string> = {}
|
||||
if (year) query.year = String(year)
|
||||
|
||||
return api.get<EmployeeLeaveSummary>(`/employees/${employeeId}/leave-summary`, query, { toast: false })
|
||||
}
|
||||
|
||||
export const updateFractionedDays = async (employeeId: number, fractionedDays: number, year?: number) => {
|
||||
const api = useApi()
|
||||
const body: Record<string, unknown> = { fractionedDays }
|
||||
if (year) body.year = year
|
||||
|
||||
return api.patch(`/employees/${employeeId}/fractioned-days`, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user