feat(profitability): set default period to this_month on omnichannel margin page

This commit is contained in:
Your Name committed 2026-10-18 22:00:42 +07:00
1 parent dbc6c513db
commit 9a18463bda
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -295,7 +295,7 @@ export const profitabilityRoute = new Elysia({ prefix: "/profitability" })
.get("/omnichannel", async ({ query }) => {
const search = (query.search || "").trim().toLowerCase();
const channel = (query.channel || "all").trim().toLowerCase();
const dateRange = resolveDateRange(query.period, query.startDate, query.endDate);
const dateRange = resolveDateRange(query.period || "this_month", query.startDate, query.endDate);
// 1. Fetch mapped marketplace products with master variants & BOM
const mpProducts = await prisma.marketplaceProduct.findMany({