admin/features/events/detail/admin-event-detail/AdminEventFinancialTab.tsx
alisaza e1eaf5eff5 feat: initial ghabilee-admin backoffice app
Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js
app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
2026-09-05 13:12:59 +03:30

52 lines
1.5 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client'
import type { EventManagementInsights } from '@/services/eventManagement'
import { formatCurrency } from '@/helpers'
import { InsightStat } from './AdminEventDetailUi'
interface AdminEventFinancialTabProps {
insights: EventManagementInsights | null
}
const AdminEventFinancialTab = ({ insights }: AdminEventFinancialTabProps) => {
if (!insights) {
return <p className="p-4 text-sm text-secondary-30">اطلاعاتی یافت نشد.</p>
}
return (
<div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-4">
<InsightStat
label="فروش ناخالص"
value={formatCurrency(insights.financial.grossAmount)}
/>
<InsightStat
label="کمیسیون پلتفرم"
value={formatCurrency(insights.financial.commissionAmount)}
/>
<InsightStat
label="بازپرداخت مهمان"
value={formatCurrency(insights.financial.guestRefundAmount)}
/>
<InsightStat
label="درآمد خالص"
value={formatCurrency(insights.financial.netAmount)}
/>
<InsightStat
label="در انتظار آزادسازی"
value={formatCurrency(insights.financial.heldAmount)}
/>
<InsightStat
label="آماده تسویه"
value={formatCurrency(insights.financial.availableAmount)}
/>
<InsightStat
label="تسویه‌شده"
value={formatCurrency(insights.financial.settledAmount)}
/>
</div>
)
}
export default AdminEventFinancialTab