Track person import source and previous names; add source report and edit UX.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-04 12:01:21 +03:30
co-authored by Cursor
parent e144b2277a
commit 8b37525f2f
15 changed files with 632 additions and 25 deletions
+37
View File
@@ -702,10 +702,43 @@ export const PERSON_MOOD_LABELS: Record<PersonMood, string> = {
special: "مشتری خاص",
};
/** منبع ورود شخص به CRM */
export const PERSON_IMPORT_SOURCES = [
"manual",
"tahesab",
"didar",
"excel",
"phone",
"lead_form",
"other",
] as const;
export type PersonImportSource = (typeof PERSON_IMPORT_SOURCES)[number];
export const PERSON_IMPORT_SOURCE_LABELS: Record<PersonImportSource, string> = {
manual: "دستی",
tahesab: "ته‌حساب",
didar: "دیدار",
excel: "اکسل",
phone: "مخاطبین گوشی",
lead_form: "فرم لید",
other: "سایر",
};
export interface PersonImportSourceStatDto {
source: PersonImportSource | string;
label: string;
count: number;
}
export interface PersonDto {
id: string;
firstName: string;
lastName: string;
previousFirstName: string | null;
previousLastName: string | null;
previousFullName: string | null;
importSource: PersonImportSource | string;
sourceRef: string | null;
fullName: string;
email: string | null;
phone: string | null;
@@ -730,6 +763,10 @@ export interface PersonDto {
export interface CreatePersonRequest {
firstName?: string;
lastName?: string;
previousFirstName?: string | null;
previousLastName?: string | null;
importSource?: PersonImportSource | string;
sourceRef?: string | null;
email?: string;
phone?: string;
mobile?: string;