fix: persist explicit review status and align review counters

This commit is contained in:
2026-09-06 09:02:28 +03:00
parent a9036cf909
commit f88a0c7bfe
7 changed files with 360 additions and 5 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ export function companyStats(tenders) {
winRate: resulted ? Math.round((won.length / resulted) * 100) : 0,
wonTotal,
tracked: tenders.filter((t) => t.takipte).length,
reviewed: tenders.filter((t) => t.incelendi || (t.kanbanStatus && t.kanbanStatus !== 'incelenecek')).length,
reviewed: tenders.filter((t) => Boolean(t.incelendi)).length,
contracts: won.length,
};
}
+1 -1
View File
@@ -8,7 +8,7 @@ export function applyTenderStates(tenders, records = {}) {
return record ? { ...t, ...record.data } : t;
});
for (const [key, record] of Object.entries(records)) {
if (!seen.has(key) && record.snapshot && (record.data.takipte || record.data.gorev))
if (!seen.has(key) && record.snapshot && (record.data.takipte || record.data.gorev || record.data.incelendi || record.data.bidDraft || record.data.notes?.length))
result.push({ ...record.snapshot, ...record.data });
}
return result;