Refine history modal loading state and MGM chart gating

This commit is contained in:
2569718930@qq.com
2026-03-29 21:09:16 +08:00
parent d0e1bea941
commit efb5e426b7
3 changed files with 124 additions and 12 deletions
+7
View File
@@ -2247,6 +2247,12 @@ export function getHistorySummary(
});
}
const mgmSettledCount = settledData.reduce((count, row) => {
return toFinite(row.mgm) != null ? count + 1 : count;
}, 0);
const mgmSeriesComplete =
settledData.length >= 2 && mgmSettledCount === settledData.length;
return {
dates: recentData.map((row) => row.date),
debMae: debErrors.length
@@ -2274,6 +2280,7 @@ export function getHistorySummary(
hitRate: debErrors.length
? Number(((hits / debErrors.length) * 100).toFixed(0))
: null,
mgmSeriesComplete,
mgms: recentData.map((row) => row.mgm ?? null),
recentData,
settledCount: comparableSettledData.length,