financial_system/frontend/src/api/reports.ts
2026-06-18 13:21:20 +08:00

12 lines
423 B
TypeScript

import { apiFetch } from "./http";
import type { PayrollReportResponse } from "./types";
export function getPayrollReport(salaryMonth = ""): Promise<PayrollReportResponse> {
const params = new URLSearchParams();
if (salaryMonth) {
params.set("salary_month", salaryMonth);
}
const query = params.toString();
return apiFetch<PayrollReportResponse>(`/api/reports/payroll-summary${query ? `?${query}` : ""}`);
}