fix: hide unlinked old activities from current work

Imported follow-ups with no person, company, or deal stayed on the board because only linked prior records were archived.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-15 13:02:01 +03:30
co-authored by Cursor
parent 6bff9d2888
commit 582733e2ea
4 changed files with 21 additions and 1 deletions
+7
View File
@@ -305,6 +305,13 @@ export class BillingService {
SELECT 1 FROM "Deal" AS d2
WHERE d2."id" = a."dealId" AND d2."importSource" = 'didar'
)
OR (
a."personId" IS NULL
AND a."companyId" IS NULL
AND a."dealId" IS NULL
AND a."dueAt" IS NOT NULL
AND a."dueAt" < ${cutoff}
)
)
)
)