forked from jiaoly/financial_system
12 lines
423 B
TypeScript
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}` : ""}`);
|
|
}
|