chore: dockerize monorepo with multi-stage builds and update frontend

This commit is contained in:
s.esmaeili
2026-09-10 20:11:27 +03:30
parent d6f9d63e14
commit efb0051ab9
28 changed files with 4179 additions and 1069 deletions
+12 -2
View File
@@ -3,8 +3,13 @@
*/
const FARSI_DIGITS = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
export function toFarsiDigits(val: number | string | null | undefined): string {
export function toFarsiDigits(val: number | string | null | undefined | any): string {
if (val === null || val === undefined) return '';
if (typeof val === 'object' && val !== null && 'value' in val) {
val = val.value;
if (val === null || val === undefined) return '';
}
if (typeof val === 'object') return '';
return String(val)
.replace(/[0-9]/g, (d) => FARSI_DIGITS[+d])
.replace(/[٠-٩]/g, (d) => FARSI_DIGITS[d.charCodeAt(0) - 1632]);
@@ -13,8 +18,13 @@ export function toFarsiDigits(val: number | string | null | undefined): string {
/**
* قالب‌بندی اعداد با جداکننده هزارگان و ارقام فارسی
*/
export function formatFarsiNumber(val: number | string | null | undefined): string {
export function formatFarsiNumber(val: number | string | null | undefined | any): string {
if (val === null || val === undefined || val === '') return '';
if (typeof val === 'object' && val !== null && 'value' in val) {
val = val.value;
if (val === null || val === undefined || val === '') return '';
}
if (typeof val === 'object') return '';
const num = typeof val === 'string' ? parseFloat(toEnglishDigits(val)) : val;
if (isNaN(num)) return toFarsiDigits(val);
const formatted = new Intl.NumberFormat('fa-IR').format(num);
+2
View File
@@ -185,6 +185,8 @@ export interface DashboardStatsDto {
totalDistributedPrizes: number;
consumedChances: number;
activePrizesCount: number;
activeCampaignsCount?: number;
winRate?: number;
}
export interface SpinsByDayDataPoint {