pass unit into revenue report
This commit is contained in:
1 parent
3a498333a6
commit
52f812d9e5
2 files changed
+4
-1
No files matched your search
@@ -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(),
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user