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
+12 -2
View File
@@ -7,6 +7,7 @@ import {
calendarDaysBetween,
formatClockFa,
formatJalaliNumeric,
rewriteGregorianDates,
toFaDigits,
} from '@/lib/jalali';
import {
@@ -141,6 +142,9 @@ const mailHref = computed(() =>
const registeredAt = computed(() =>
person.value?.createdAt ? formatJalaliNumeric(new Date(person.value.createdAt)) : '—',
);
const birthDateLabel = computed(() =>
person.value?.birthDate ? formatJalaliNumeric(new Date(person.value.birthDate)) : '—',
);
const externalCode = computed(() => {
if (person.value?.sourceRef?.trim()) return person.value.sourceRef.trim();
const fields = person.value?.customFields ?? {};
@@ -239,8 +243,8 @@ const smart = computed(() =>
);
const shownSmart = computed(() => ({
text: aiSummary.value?.text || smart.value.text,
cta: aiSummary.value?.cta || smart.value.cta,
text: rewriteGregorianDates(aiSummary.value?.text || smart.value.text),
cta: rewriteGregorianDates(aiSummary.value?.cta || smart.value.cta),
ctaKind: aiSummary.value?.ctaKind || smart.value.ctaKind,
}));
@@ -367,6 +371,7 @@ const infoEmpty = computed(() => {
!p.position &&
!p.website &&
!p.instagram &&
!p.birthDate &&
!p.referrer &&
!(p.addresses?.length) &&
!p.company &&
@@ -687,6 +692,10 @@ watch(() => route.query.tab, readTab, { immediate: true });
<dt>سمت</dt>
<dd>{{ person.position || '—' }}</dd>
</div>
<div class="fact">
<dt>تاریخ تولد</dt>
<dd>{{ birthDateLabel }}</dd>
</div>
<div class="fact">
<dt>تاریخ ثبت</dt>
<dd>{{ registeredAt }}</dd>
@@ -993,6 +1002,7 @@ watch(() => route.query.tab, readTab, { immediate: true });
</div>
<div><dt>شرکت</dt><dd>{{ person.company?.name || '—' }}</dd></div>
<div><dt>مسئول</dt><dd>{{ person.owner?.fullName || '—' }}</dd></div>
<div><dt>تاریخ تولد</dt><dd>{{ birthDateLabel }}</dd></div>
<div><dt>تاریخ ثبت</dt><dd>{{ registeredAt }}</dd></div>
<div>
<dt>باشگاه</dt>