fix: keep imported follow-ups out of current work

They stayed on the board when a non-prior deal was attached, even though the person was prior.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-15 12:34:40 +03:30
co-authored by Cursor
parent 6bc5e1bec7
commit 6bff9d2888
9 changed files with 102 additions and 16 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ export class ReportsService {
const now = new Date();
const peoplePrior = personPriorWhere(actor.priorLens);
const dealsPrior = dealPriorWhere(actor.priorLens, now);
const activitiesPrior = activityPriorWhere(actor.priorLens, now);
const activitiesPrior = activityPriorWhere(actor.priorLens, now, actor.priorCutoff);
const { jy, jm } = dateToJalali(now);
const sixAgo = addJalaliMonths(jy, jm, -5);
const sixMonthStart = startOfJalaliMonth(sixAgo.jy, sixAgo.jm);
@@ -1553,7 +1553,7 @@ export class ReportsService {
weekAgo.setDate(weekAgo.getDate() - 7);
const peoplePrior = personPriorWhere(actor.priorLens);
const dealsPrior = dealPriorWhere(actor.priorLens, now);
const activitiesPrior = activityPriorWhere(actor.priorLens, now);
const activitiesPrior = activityPriorWhere(actor.priorLens, now, actor.priorCutoff);
const [
wonDeals,