feat(reports): financial hasData existence flag (service + route)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
getRecentPayments,
|
||||
getRefundLog,
|
||||
getExpenseLedger,
|
||||
financialHasData,
|
||||
} from '@/lib/services/reports/financial.service';
|
||||
|
||||
/**
|
||||
@@ -65,6 +66,7 @@ export const GET = withAuth(
|
||||
recentPayments,
|
||||
refundLog,
|
||||
expenseLedger,
|
||||
hasData,
|
||||
] = await Promise.all([
|
||||
getFinancialKpis(ctx.portId, range),
|
||||
getRevenueByMonth(ctx.portId, range),
|
||||
@@ -76,6 +78,7 @@ export const GET = withAuth(
|
||||
getRecentPayments(ctx.portId, range),
|
||||
getRefundLog(ctx.portId, range),
|
||||
getExpenseLedger(ctx.portId, range),
|
||||
financialHasData(ctx.portId),
|
||||
]);
|
||||
|
||||
return NextResponse.json({
|
||||
@@ -90,6 +93,7 @@ export const GET = withAuth(
|
||||
recentPayments,
|
||||
refundLog,
|
||||
expenseLedger,
|
||||
hasData,
|
||||
range: { from: range.from.toISOString(), to: range.to.toISOString() },
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user