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
3a498333a6
commit
52f812d9e5
2 changed files with 4 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ export function useResultQuery<T = any>(
|
|||
) {
|
||||
const { websiteId, ...parameters } = params;
|
||||
const { post, useQuery } = useApi();
|
||||
const { startDate, endDate, timezone } = useDateParameters();
|
||||
const { startDate, endDate, timezone, unit } = useDateParameters();
|
||||
const filters = useFilterParameters();
|
||||
|
||||
return useQuery<T>({
|
||||
|
|
@ -22,6 +22,7 @@ export function useResultQuery<T = any>(
|
|||
startDate,
|
||||
endDate,
|
||||
timezone,
|
||||
unit,
|
||||
...params,
|
||||
...filters,
|
||||
},
|
||||
|
|
@ -35,6 +36,7 @@ export function useResultQuery<T = any>(
|
|||
startDate,
|
||||
endDate,
|
||||
timezone,
|
||||
unit,
|
||||
...parameters,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ export const revenueReportSchema = z.object({
|
|||
parameters: z.object({
|
||||
startDate: z.coerce.date(),
|
||||
endDate: z.coerce.date(),
|
||||
unit: unitParam.optional(),
|
||||
timezone: z.string().optional(),
|
||||
currency: z.string(),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue