Add activity detail, Jalali pickers, and customer/user profiles.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 21:29:00 +03:30
co-authored by Cursor
parent 574feedfa5
commit f884c60cab
39 changed files with 8255 additions and 441 deletions
+17
View File
@@ -22,3 +22,20 @@ export function formatMoney(amount: number, currency = 'IRR'): string {
return `${amount} ${currency}`;
}
}
/** مثل ماکاپ: ۲۴۰ میلیون ریال */
export function formatCompactMoney(amount: number, currency = 'IRR'): string {
const suffix = currencySuffix(currency);
const abs = Math.abs(amount);
if (abs >= 1_000_000_000) {
const n = amount / 1_000_000_000;
const rounded = Math.abs(n - Math.round(n)) < 0.05 ? Math.round(n) : Math.round(n * 10) / 10;
return `${new Intl.NumberFormat('fa-IR', { maximumFractionDigits: 1 }).format(rounded)} میلیارد ${suffix}`;
}
if (abs >= 1_000_000) {
const n = amount / 1_000_000;
const rounded = Math.abs(n - Math.round(n)) < 0.05 ? Math.round(n) : Math.round(n * 10) / 10;
return `${new Intl.NumberFormat('fa-IR', { maximumFractionDigits: 1 }).format(rounded)} میلیون ${suffix}`;
}
return formatMoney(amount, currency);
}