mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
pass unit into revenue report
This commit is contained in:
parent
cd6a28ea4a
commit
52d9dd2871
2 changed files with 4 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ export function useResultQuery<T = any>(
|
||||||
) {
|
) {
|
||||||
const { websiteId, ...parameters } = params;
|
const { websiteId, ...parameters } = params;
|
||||||
const { post, useQuery } = useApi();
|
const { post, useQuery } = useApi();
|
||||||
const { startDate, endDate, timezone } = useDateParameters();
|
const { startDate, endDate, timezone, unit } = useDateParameters();
|
||||||
const filters = useFilterParameters();
|
const filters = useFilterParameters();
|
||||||
|
|
||||||
return useQuery<T>({
|
return useQuery<T>({
|
||||||
|
|
@ -22,6 +22,7 @@ export function useResultQuery<T = any>(
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
timezone,
|
timezone,
|
||||||
|
unit,
|
||||||
...params,
|
...params,
|
||||||
...filters,
|
...filters,
|
||||||
},
|
},
|
||||||
|
|
@ -35,6 +36,7 @@ export function useResultQuery<T = any>(
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
timezone,
|
timezone,
|
||||||
|
unit,
|
||||||
...parameters,
|
...parameters,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ export const revenueReportSchema = z.object({
|
||||||
parameters: z.object({
|
parameters: z.object({
|
||||||
startDate: z.coerce.date(),
|
startDate: z.coerce.date(),
|
||||||
endDate: z.coerce.date(),
|
endDate: z.coerce.date(),
|
||||||
|
unit: unitParam.optional(),
|
||||||
timezone: z.string().optional(),
|
timezone: z.string().optional(),
|
||||||
currency: z.string(),
|
currency: z.string(),
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue