Improve deal board activity cues with relative dates and a quick activity list popup.
EOF Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -226,6 +226,17 @@ export function formatRelativeContact(iso: string | null | undefined): string {
|
||||
return `${toFaDigits(days)} روز پیش`;
|
||||
}
|
||||
|
||||
/** تاریخ نسبی تقویمی برای کارتها: امروز / ۳ روز پیش / ۵ روز مانده */
|
||||
export function formatRelativeDayLabel(iso: string | null | undefined): string {
|
||||
if (!iso) return '—';
|
||||
const d = new Date(iso);
|
||||
if (Number.isNaN(d.getTime())) return '—';
|
||||
const daysAhead = calendarDaysBetween(new Date(), d);
|
||||
if (daysAhead === 0) return 'امروز';
|
||||
if (daysAhead > 0) return `${toFaDigits(daysAhead)} روز مانده`;
|
||||
return `${toFaDigits(-daysAhead)} روز پیش`;
|
||||
}
|
||||
|
||||
/** فعالیت بعدی: امروز ۱۶:۳۰ / فردا ۱۰:۰۰ / ۲۴ مرداد ۱۱:۲۰ */
|
||||
export function formatNextSlot(iso: string | null | undefined): string {
|
||||
if (!iso) return '—';
|
||||
|
||||
Reference in New Issue
Block a user