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
@@ -6,6 +6,7 @@ import {
} from '@nestjs/common';
import type { Request } from 'express';
import { Observable, tap } from 'rxjs';
import { auditStory } from './audit-detail';
import { AuditLogsService } from './audit-logs.service';
const SKIP_PREFIXES = [
@@ -73,7 +74,6 @@ export class AuditLogsInterceptor implements NestInterceptor {
const actorUserId = req.user?.userId ?? req.user?.id ?? null;
const { entityType, entityId } = inferEntity(path);
const action = actionLabel(method, path);
const summary = `${action} ${entityType ?? 'منبع'} از مسیر ${path.split('?')[0]}`;
const ip =
(req.headers['x-forwarded-for'] as string | undefined)?.split(',')[0]?.trim() ||
req.ip ||
@@ -81,7 +81,11 @@ export class AuditLogsInterceptor implements NestInterceptor {
return next.handle().pipe(
tap({
next: () => {
next: (response) => {
const story = auditStory(method, req.body, response);
const summary =
story.summary ||
`${action} ${entityType ?? 'منبع'} از مسیر ${path.split('?')[0]}`;
void this.audit.write({
organizationId,
actorUserId,
@@ -91,6 +95,7 @@ export class AuditLogsInterceptor implements NestInterceptor {
entityType,
entityId,
summary,
meta: story.label || story.detail ? { label: story.label, detail: story.detail } : null,
ip,
});
},