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:
2026-10-13 18:04:53 +03:30
co-authored by Cursor
parent 5f4cc47c41
commit cf326d1ed9
34 changed files with 637 additions and 105 deletions
@@ -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;