Files
khata-ui/src/features/report/useReport.ts

14 lines
391 B
TypeScript

import { useResourceByName } from "../../../react-openapi";
export interface ReportParams {
period: "weekly" | "monthly" | "yearly" | "fyly";
rolling?: boolean;
report_date?: string;
group_by?: ("flow" | "payee" | "tags")[];
ignore_self?: boolean;
}
export function useReport(params: ReportParams) {
const { useList } = useResourceByName("reports");
return useList(params);
}