fix: persist explicit review status and align review counters
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user