fix: keep birthdays and show Shamsi dates
Imported customers keep their birthday, and assistant text plus remaining calendars use the Jalali date. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import type {
|
||||
MontifySyncResultDto,
|
||||
MontifyTransactionDto,
|
||||
} from '@mento/shared';
|
||||
import { parseBirthDate } from '../../common/excel';
|
||||
import { PrismaService } from '../../prisma/prisma.service';
|
||||
import { normalizeEmail, normalizePhone } from '../../contacts/normalize';
|
||||
import { carryPreviousSource } from '../../contacts/person-source';
|
||||
@@ -487,6 +488,9 @@ export class MontifySyncService {
|
||||
...(mobile && (ownedByStore || !person.mobile) ? { mobile } : {}),
|
||||
...(email && (ownedByStore || !person.email) ? { email } : {}),
|
||||
...(str(c.job) && !person.position ? { position: str(c.job) } : {}),
|
||||
...(!person.birthDate && parseBirthDate(profile.birthday)
|
||||
? { birthDate: parseBirthDate(profile.birthday) }
|
||||
: {}),
|
||||
addresses: merged as Prisma.InputJsonValue,
|
||||
tags,
|
||||
...(!existingLink && !ownedByStore && !person.previousImportSource
|
||||
@@ -511,6 +515,7 @@ export class MontifySyncService {
|
||||
tags: [row.label],
|
||||
importSource: 'montify',
|
||||
sourceRef: externalId,
|
||||
birthDate: parseBirthDate(profile.birthday),
|
||||
},
|
||||
});
|
||||
personId = created.id;
|
||||
|
||||
Reference in New Issue
Block a user