fixed ui and some bugs

This commit is contained in:
2026-06-28 21:48:17 +03:30
parent 34be7a66dc
commit 218d3e9f5e
25 changed files with 1374 additions and 371 deletions
@@ -0,0 +1,12 @@
export function tahesabStatusLabel(status?: string, tahesabId?: string | null): string {
if (tahesabId) return 'موفق'
if (status === 'failed') return 'ناموفق'
if (status === 'success') return 'موفق'
// pending = ردیف محلی ساخته شده ولی هنوز در نرم‌افزار ته‌حساب ثبت نشده (نه «در صف»)
return 'ارسال نشده'
}
export function canRetryTahesab(record: { tahesab_id?: string | null; sync_status?: string }): boolean {
return !record.tahesab_id || record.sync_status === 'failed'
}