feat : ajout d'une colonne montant dans les Frais employé

This commit is contained in:
2026-03-18 15:40:31 +01:00
parent f9cd5a0143
commit f047e3ed4b
9 changed files with 104 additions and 12 deletions

View File

@@ -32,12 +32,13 @@ export const useEmployeeMileage = (employee: Ref<Employee | null>, reloadEmploye
mileageDataLoaded.value = false
}
const submitCreateMileage = async (data: { month: string; kilometers: number; comment?: string }, file?: File) => {
const submitCreateMileage = async (data: { month: string; kilometers: number; amount: number; comment?: string }, file?: File) => {
if (!employee.value) return
const result = await createMileageAllowance({
employeeId: employee.value.id,
month: data.month,
kilometers: data.kilometers,
amount: data.amount,
comment: data.comment
})
if (file && result?.id) {
@@ -46,7 +47,7 @@ export const useEmployeeMileage = (employee: Ref<Employee | null>, reloadEmploye
await reloadEmployee()
}
const submitUpdateMileage = async (id: number, data: { month: string; kilometers: number; comment?: string }, file?: File) => {
const submitUpdateMileage = async (id: number, data: { month: string; kilometers: number; amount: number; comment?: string }, file?: File) => {
await updateMileageAllowance(id, data)
if (file) {
await uploadReceipt(apiBase, id, file)