update the adminpage ui

This commit is contained in:
2026-09-25 16:29:41 +05:30
parent 91e4db8217
commit b36a30385c
168 changed files with 10535 additions and 1008 deletions

View File

@@ -0,0 +1,21 @@
import type {NextRequest} from 'next/server';
import {engagementApi} from '@/services/api/engagementApi';
import {toReportWindow, toSiteParam} from '@/services/api/range';
import {serveUpstream} from '@/shared/services/bff';
import {toJourney} from '@/features/engagement/services/mapEngagement';
export const dynamic = 'force-dynamic';
/**
* GET /api/reports/journey — visit → take part → buy → come back → refer.
*
* Distinct people per stage. Not a strict funnel, and the panel says so.
*/
export async function GET(req: NextRequest) {
return serveUpstream(req, async (token, query) => {
const window = toReportWindow(query.range, new Date(query.nowMs));
return toJourney(
await engagementApi.journey(token, window, toSiteParam(query.storeId)),
);
});
}