Initial admin edits

This commit is contained in:
2026-10-01 20:50:23 +03:30
parent 990883ae11
commit 16806a4d3c
124 changed files with 1964 additions and 740 deletions
+18
View File
@@ -0,0 +1,18 @@
import type { Company } from '@/types'
/** هم‌تراز با slug شرکت دریافت‌کننده پرداخت در سرور */
export const PAYMENT_RECIPIENT_COMPANY_SLUG = 'nademitex'
export function productCompanyIdForForm(
companyId: string | undefined,
companyList: Company[],
): string {
const row = companyList.find((c) => c.id === companyId)
if (!row || row.slug === PAYMENT_RECIPIENT_COMPANY_SLUG) return ''
return companyId ?? ''
}
export function resolveProductCompanyPayload(formCompanyId: string): string | undefined {
const trimmed = formCompanyId.trim()
return trimmed.length > 0 ? trimmed : undefined
}