This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: add revenue monthly by year chart dashboard
- Loading branch information
1 parent
6bcce94
commit e39fab0
Showing
11 changed files
with
60 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { useQuery } from "@tanstack/react-query" | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query" | ||
|
||
import reportService from "./report.service" | ||
|
||
export default function useGetOrderGrownByDay() { | ||
return useQuery({ | ||
queryKey: ["order-grown-by-day"], | ||
queryFn: () => reportService.getOrderGrownByDay(), | ||
placeholderData: keepPreviousData, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { useQuery } from "@tanstack/react-query" | ||
|
||
import reportService from "./report.service" | ||
import { RevenueByYearParams } from "./report.type" | ||
|
||
export default function useGetRevenueByYear( | ||
options: Partial<RevenueByYearParams> | ||
) { | ||
return useQuery({ | ||
queryKey: ["revenue-by-year", options], | ||
queryFn: () => reportService.getRevenueByYear(options), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { useQuery } from "@tanstack/react-query" | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query" | ||
|
||
import reportService from "./report.service" | ||
|
||
export default function useGetTodayRevenue() { | ||
return useQuery({ | ||
queryKey: ["total-revenue-by-day"], | ||
queryFn: () => reportService.getTodayRevenue(), | ||
placeholderData: keepPreviousData, | ||
}) | ||
} |