mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
Add files via upload
This commit is contained in:
@@ -198,9 +198,9 @@ export default function Referral() {
|
||||
</div>
|
||||
</div>
|
||||
{ref.has_paid ? (
|
||||
<span className="badge-success">Paid</span>
|
||||
<span className="badge-success">{t('referral.status.paid')}</span>
|
||||
) : (
|
||||
<span className="badge-neutral">Pending</span>
|
||||
<span className="badge-neutral">{t('referral.status.pending')}</span>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
@@ -232,7 +232,7 @@ export default function Referral() {
|
||||
{earning.referral_first_name || earning.referral_username || 'Referral'}
|
||||
</div>
|
||||
<div className="text-xs text-dark-500 mt-0.5">
|
||||
{earning.reason} • {new Date(earning.created_at).toLocaleDateString()}
|
||||
{t(`referral.reasons.${earning.reason}`, earning.reason)} • {new Date(earning.created_at).toLocaleDateString()}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-success-400 font-semibold">
|
||||
|
||||
@@ -220,7 +220,9 @@ export default function Subscription() {
|
||||
if (!selectedTariff) {
|
||||
throw new Error('Tariff not selected')
|
||||
}
|
||||
const days = useCustomDays ? customDays : (selectedTariffPeriod?.days || 30)
|
||||
// For daily tariffs, always use 1 day
|
||||
const isDailyTariff = selectedTariff.is_daily || (selectedTariff.daily_price_kopeks && selectedTariff.daily_price_kopeks > 0)
|
||||
const days = isDailyTariff ? 1 : (useCustomDays ? customDays : (selectedTariffPeriod?.days || 30))
|
||||
const trafficGb = useCustomTraffic && selectedTariff.custom_traffic_enabled ? customTrafficGb : undefined
|
||||
return subscriptionApi.purchaseTariff(selectedTariff.id, days, trafficGb)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user