feat: show the full work history and load every lead stage on the board

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 19:47:32 +03:30
co-authored by Cursor
parent 2cc81bb596
commit 831c682eb3
13 changed files with 669 additions and 66 deletions
@@ -51,6 +51,7 @@ export class AuditLogsService {
q?: string;
actorUserId?: string;
entityType?: string;
action?: string;
page?: number;
limit?: number;
},
@@ -61,6 +62,7 @@ export class AuditLogsService {
organizationId,
...(opts.actorUserId ? { actorUserId: opts.actorUserId } : {}),
...(opts.entityType ? { entityType: opts.entityType } : {}),
...(opts.action ? { action: opts.action } : {}),
};
const search = buildSearchWhere<Prisma.AuditLogWhereInput>(opts.q, (t) => [
{ summary: ci(t) },
@@ -97,10 +99,17 @@ export class AuditLogsService {
entityType: string | null;
entityId: string | null;
summary: string;
meta: Prisma.JsonValue | null;
ip: string | null;
createdAt: Date;
actor: { id: string; fullName: string } | null;
}): AuditLogDto {
const meta =
row.meta && typeof row.meta === 'object' && !Array.isArray(row.meta)
? (row.meta as { label?: unknown; detail?: unknown })
: null;
const label = typeof meta?.label === 'string' ? meta.label : null;
const detail = typeof meta?.detail === 'string' ? meta.detail : null;
return {
id: row.id,
action: row.action,
@@ -109,6 +118,8 @@ export class AuditLogsService {
entityType: row.entityType,
entityId: row.entityId,
summary: row.summary,
label,
detail,
actor: row.actor,
ip: row.ip,
createdAt: row.createdAt.toISOString(),