Keep previous import source and code when a person is re-imported from another source
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,8 @@ type PersonRow = {
|
||||
previousLastName: string | null;
|
||||
importSource: string;
|
||||
sourceRef: string | null;
|
||||
previousImportSource: string | null;
|
||||
previousSourceRef: string | null;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
mobile: string | null;
|
||||
@@ -119,6 +121,7 @@ export class PeopleService {
|
||||
{ mobile: { contains: q.trim() } },
|
||||
{ phone: { contains: q.trim() } },
|
||||
{ sourceRef: { contains: q.trim() } },
|
||||
{ previousSourceRef: { contains: q.trim() } },
|
||||
{ company: { name: { contains: q.trim(), mode: 'insensitive' } } },
|
||||
],
|
||||
}
|
||||
@@ -373,6 +376,8 @@ export class PeopleService {
|
||||
previousFullName: previousFullName || null,
|
||||
importSource,
|
||||
sourceRef: row.sourceRef,
|
||||
previousImportSource: row.previousImportSource,
|
||||
previousSourceRef: row.previousSourceRef,
|
||||
fullName: `${row.firstName} ${row.lastName}`.trim(),
|
||||
email: row.email,
|
||||
phone: row.phone,
|
||||
|
||||
Reference in New Issue
Block a user