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>
16 lines
635 B
TypeScript
16 lines
635 B
TypeScript
import type { EmployeeRttSummary } from './dto/employee-rtt-summary'
|
|
|
|
export const getEmployeeRttSummary = async (employeeId: number, year?: number) => {
|
|
const api = useApi()
|
|
const query = year ? { year } : {}
|
|
return api.get<EmployeeRttSummary>(`/employees/${employeeId}/rtt-summary`, query, { toast: false })
|
|
}
|
|
|
|
export const createRttPayment = async (employeeId: number, month: number, minutes: number, rate: '25' | '50', year?: number) => {
|
|
const api = useApi()
|
|
const body: Record<string, unknown> = { month, minutes, rate }
|
|
if (year) body.year = year
|
|
return api.patch(`/employees/${employeeId}/rtt-payments`, body)
|
|
}
|
|
|