Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a18463bda | ||
|
|
dbc6c513db |
No files matched your search
@@ -107,7 +107,7 @@ export default function OmnichannelMarginPage() {
|
|||||||
// Filters
|
// Filters
|
||||||
const [search, setSearch] = useState('');
|
const [search, setSearch] = useState('');
|
||||||
const [channelFilter, setChannelFilter] = useState<'all' | 'shopee' | 'lazada' | 'tiktok'>('all');
|
const [channelFilter, setChannelFilter] = useState<'all' | 'shopee' | 'lazada' | 'tiktok'>('all');
|
||||||
const [dateFilter, setDateFilter] = useState<DateFilterState>({ period: 'all' });
|
const [dateFilter, setDateFilter] = useState<DateFilterState>({ period: 'this_month' });
|
||||||
const [sortBy, setSortBy] = useState('revenue_desc');
|
const [sortBy, setSortBy] = useState('revenue_desc');
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ export const profitabilityRoute = new Elysia({ prefix: "/profitability" })
|
|||||||
.get("/omnichannel", async ({ query }) => {
|
.get("/omnichannel", async ({ query }) => {
|
||||||
const search = (query.search || "").trim().toLowerCase();
|
const search = (query.search || "").trim().toLowerCase();
|
||||||
const channel = (query.channel || "all").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
|
// 1. Fetch mapped marketplace products with master variants & BOM
|
||||||
const mpProducts = await prisma.marketplaceProduct.findMany({
|
const mpProducts = await prisma.marketplaceProduct.findMany({
|
||||||
|
|||||||
Reference in new issue
Block a user